KVIrc
4.9.2
DeveloperAPIs
|
#include <KviKvsUserAction.h>
Public Member Functions | |
const QString & | category () |
virtual const QString & | description () |
Returns the description of the action. More... | |
const QString & | descriptionCode () |
void | exportToKvs (QString &szBuffer) |
KviKvsUserAction (QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleNameCode, const QString &szDescriptionCode, const QString &szCategory, const QString &szBigIconId, const QString &szSmallIconId, unsigned int uFlags, const QString &szKeySequence=QString()) | |
KviKvsUserAction (QObject *pParent) | |
void | suicide () |
virtual const QString & | visibleName () |
Returns the visible name of the action. More... | |
const QString & | visibleNameCode () |
~KviKvsUserAction () | |
Public Member Functions inherited from KviKvsAction | |
virtual void | activate () |
Executes the action. More... | |
KviKvsAction (QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=NULL, const QString &szBigIconId=QString(), const QString &szSmallIconId=QString(), unsigned int uFlags=0, const QString &szKeySequence=QString()) | |
Contructs the action object. More... | |
KviKvsAction (QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=NULL, const QString &szBigIconId=QString(), KviIconManager::SmallIcon eSmallIcon=KviIconManager::None, unsigned int uFlags=0, const QString &szKeySequence=QString()) | |
Contructs the action object. More... | |
const QString & | scriptCode () |
Returns the code of the script contained in the action. More... | |
virtual | ~KviKvsAction () |
Destroys the action object. More... | |
Public Member Functions inherited from KviAction | |
virtual QAction * | addToCustomToolBar (KviCustomToolBar *pParentToolBar) |
Adds the action to the given toolbar. More... | |
virtual bool | addToPopupMenu (QMenu *pMenu) |
Adds the action to the given popup. More... | |
QPixmap * | bigIcon () |
Returns the big icon associated to the action. More... | |
const QString & | bigIconId () const |
Returns the id of the big icon associated to the action. More... | |
KviActionCategory * | category () const |
Returns the category of the action. More... | |
unsigned int | flags () |
Returns the flag associated to the action. More... | |
bool | isEnabled () const |
Returns true if the action is enabled. More... | |
const QString & | keySequence () const |
Returns the shortcut of the action. More... | |
KviAction (QObject *pParent, const QString &szName, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=NULL, const QString &szBigIconId=QString(), const QString &szSmallIconId=QString(), unsigned int uFlags=0, const QString &szKeySequence=QString()) | |
Constructs the action object. More... | |
KviAction (QObject *pParent, const QString &szName, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=NULL, const QString &szBigIconId=QString(), KviIconManager::SmallIcon eSmallIcon=KviIconManager::None, unsigned int uFlags=0, const QString &szKeySequence=QString()) | |
Constructs the action object. More... | |
const QString & | name () const |
Returns the name of the action. More... | |
virtual void | setEnabled (bool bEnabled) |
Enables the action. More... | |
QPixmap * | smallIcon () |
Returns the small icon associated to the action. More... | |
const QString & | smallIconId () const |
Returns the id of the small icon associated to the action. More... | |
void | suicide () |
Destroys itself. Maybe the best function in the whole APIs :) More... | |
virtual | ~KviAction () |
Destroys the action object. More... | |
Static Public Member Functions | |
static KviKvsUserAction * | createInstance (QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleNameCode, const QString &szDescriptionCode, const QString &szCategory, const QString &szBigIconId, const QString &szSmallIcon, unsigned int uFlags, const QString &szKeySequence=QString()) |
static void | exportToKvs (QString &szBuffer, const QString &szName, const QString &szScriptCode, const QString &szVisibleName, const QString &szDescription, const QString &szCategory, const QString &szBigIcon, const QString &szSmallIcon, unsigned int uFlags, const QString &szKeySequence) |
Static Public Member Functions inherited from KviAction | |
static int | validateFlags (int iFlagsToValidate) |
Validates the flags of the action. More... | |
Protected Member Functions | |
virtual bool | isKviUserActionNeverOverrideThis () |
Returns true if the action is user-defined. More... | |
bool | load (KviConfigurationFile *pCfg) |
void | save (KviConfigurationFile *pCfg) |
Protected Member Functions inherited from KviAction | |
KviPointerList< QAction > * | actionList () |
Returns the list of actions associated to the action. More... | |
void | registerAccelerator () |
Registers the action shortcut in the application. More... | |
void | registerAction (QAction *pAction) |
Adds the action to the list. More... | |
virtual void | setup () |
Enables or disables the action upon starting KVIrc. More... | |
bool | setupDone () const |
Returns true if the setup is finished. More... | |
void | unregisterAccelerator () |
Removes the action shortcut from the application. More... | |
Protected Attributes | |
KviKvsScript * | m_pDescriptionScript |
KviKvsScript * | m_pVisibleNameScript |
QString | m_szCategory |
Protected Attributes inherited from KviKvsAction | |
QString | m_szScript |
Protected Attributes inherited from KviAction | |
KviIconManager::SmallIcon | m_eSmallIcon |
QPointer< QShortcut > | m_pAccel |
KviPointerList< QAction > * | m_pActionList |
KviActionCategory * | m_pCategory |
QString | m_szBigIconId |
QString | m_szDescription |
QString | m_szKeySequence |
QString | m_szName |
QString | m_szSmallIconId |
QString | m_szVisibleName |
unsigned int | m_uFlags |
unsigned short int | m_uInternalFlags |
Friends | |
class | KviActionManager |
Additional Inherited Members | |
Public Types inherited from KviAction | |
enum | Flags { NeedsContext = 1, NeedsConnection = 2, WindowConsole = 4, WindowChannel = 8, WindowQuery = 16, WindowDccChat = 32, InternalWindowMask = WindowConsole | WindowChannel | WindowQuery | WindowDccChat, EnableAtLogin = 64, WindowOnlyIfUsersSelected = 128 } |
Holds the flags of an action. More... | |
enum | InternalFlags { Enabled = 1, SetupDone = 2 } |
Holds the internal flags of an action. More... | |
Public Slots inherited from KviAction | |
Signals inherited from KviAction | |
void | activated () |
Emitted when the action is being activated. More... | |
Protected Slots inherited from KviAction | |
virtual void | actionDestroyed () |
Removes the action from the list. More... | |
virtual void | activeContextChanged () |
Enables or disables the action upon checking the active context. More... | |
virtual void | activeContextStateChanged () |
Enables or disables the action upon checking the active context. More... | |
virtual void | activeWindowChanged () |
Enables or disables the action upon checking the active window. More... | |
virtual void | activeWindowSelectionStateChanged (bool bSelectedNow) |
Enables or disables the action upon checking the active window. More... | |
virtual void | reloadImages () |
Reloads the images. More... | |
KviKvsUserAction::KviKvsUserAction | ( | QObject * | pParent, |
const QString & | szName, | ||
const QString & | szScriptCode, | ||
const QString & | szVisibleNameCode, | ||
const QString & | szDescriptionCode, | ||
const QString & | szCategory, | ||
const QString & | szBigIconId, | ||
const QString & | szSmallIconId, | ||
unsigned int | uFlags, | ||
const QString & | szKeySequence = QString() |
||
) |
References KviActionManager::category(), KviActionManager::instance(), KviAction::m_pCategory, m_pDescriptionScript, m_pVisibleNameScript, m_szCategory, and KviKvsScript::Parameter.
Referenced by createInstance().
KviKvsUserAction::KviKvsUserAction | ( | QObject * | pParent | ) |
References m_pDescriptionScript, and m_pVisibleNameScript.
KviKvsUserAction::~KviKvsUserAction | ( | ) |
References m_pDescriptionScript, and m_pVisibleNameScript.
|
inline |
|
static |
References KviKvsUserAction().
Referenced by action_kvs_cmd_create(), and ActionEditor::commit().
|
virtual |
Returns the description of the action.
Reimplemented from KviAction.
References KviKvsScript::code(), g_pActiveWindow, m_pDescriptionScript, KviAction::m_szDescription, and KviKvsScript::run().
const QString & KviKvsUserAction::descriptionCode | ( | ) |
References KviKvsScript::code(), m_pDescriptionScript, and KviAction::m_szDescription.
Referenced by exportToKvs().
|
static |
References KviCommandFormatter::blockFromBuffer(), KviAction::EnableAtLogin, KviAction::InternalWindowMask, KviAction::NeedsConnection, KviAction::NeedsContext, KviAction::WindowChannel, KviAction::WindowConsole, KviAction::WindowDccChat, KviAction::WindowOnlyIfUsersSelected, and KviAction::WindowQuery.
Referenced by ActionEditor::exportActions(), and exportToKvs().
void KviKvsUserAction::exportToKvs | ( | QString & | szBuffer | ) |
|
protectedvirtual |
Returns true if the action is user-defined.
Reimplemented from KviAction.
|
protected |
References KviActionManager::category(), KviConfigurationFile::group(), KviActionManager::instance(), KviAction::m_pCategory, m_pDescriptionScript, m_pVisibleNameScript, KviAction::m_szBigIconId, m_szCategory, KviAction::m_szDescription, KviAction::m_szKeySequence, KviAction::m_szName, KviKvsAction::m_szScript, KviAction::m_szSmallIconId, KviAction::m_szVisibleName, KviAction::m_uFlags, KviKvsScript::Parameter, KviConfigurationFile::readEntry(), and KviConfigurationFile::readUIntEntry().
Referenced by KviActionManager::load().
|
protected |
References KviKvsScript::code(), m_pDescriptionScript, m_pVisibleNameScript, KviAction::m_szBigIconId, m_szCategory, KviAction::m_szKeySequence, KviAction::m_szName, KviKvsAction::m_szScript, KviAction::m_szSmallIconId, KviAction::m_uFlags, KviConfigurationFile::setGroup(), and KviConfigurationFile::writeEntry().
|
inline |
|
virtual |
Returns the visible name of the action.
Reimplemented from KviAction.
References KviKvsScript::code(), g_pActiveWindow, m_pVisibleNameScript, KviAction::m_szVisibleName, and KviKvsScript::run().
const QString & KviKvsUserAction::visibleNameCode | ( | ) |
References KviKvsScript::code(), m_pVisibleNameScript, and KviAction::m_szVisibleName.
Referenced by exportToKvs().
|
friend |
|
protected |
Referenced by description(), descriptionCode(), KviKvsUserAction(), load(), save(), and ~KviKvsUserAction().
|
protected |
Referenced by KviKvsUserAction(), load(), save(), visibleName(), visibleNameCode(), and ~KviKvsUserAction().
|
protected |
Referenced by exportToKvs(), KviKvsUserAction(), load(), and save().