![]() |
KVIrc 5.2.6
Developer APIs
|
#include <KviCoreActions.h>
Public Member Functions | |
QAction * | addToCustomToolBar (KviCustomToolBar *pTool) override |
Adds the action to the given toolbar. | |
bool | addToPopupMenu (QMenu *pMenu) override |
Adds the action to the given popup. | |
KviSubmenuAction (QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=nullptr, const QString &szBigIconId=QString(), KviIconManager::SmallIcon eSmallIcon=KviIconManager::None, unsigned int uFlags=0) | |
~KviSubmenuAction () | |
![]() | |
virtual void | activate () |
Executes the action. | |
KviKvsAction (QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=nullptr, const QString &szBigIconId=QString(), const QString &szSmallIconId=QString(), unsigned int uFlags=0, const QString &szKeySequence=QString()) | |
Constructs the action object. | |
KviKvsAction (QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=nullptr, const QString &szBigIconId=QString(), KviIconManager::SmallIcon eSmallIcon=KviIconManager::None, unsigned int uFlags=0, const QString &szKeySequence=QString()) | |
Constructs the action object. | |
const QString & | scriptCode () |
Returns the code of the script contained in the action. | |
virtual | ~KviKvsAction () |
Destroys the action object. | |
![]() | |
QPixmap * | bigIcon () |
Returns the big icon associated to the action. | |
const QString & | bigIconId () const |
Returns the id of the big icon associated to the action. | |
KviActionCategory * | category () const |
Returns the category of the action. | |
virtual const QString & | description () |
Returns the description of the action. | |
unsigned int | flags () const |
Returns the flag associated to the action. | |
bool | isEnabled () const |
Returns true if the action is enabled. | |
virtual bool | isKviUserActionNeverOverrideThis () |
Returns true if the action is user-defined. | |
const QString & | keySequence () const |
Returns the shortcut of the action. | |
KviAction (QObject *pParent, QString szName, QString szVisibleName, QString szDescription, KviActionCategory *pCategory=nullptr, QString szBigIconId=QString(), KviIconManager::SmallIcon eSmallIcon=KviIconManager::None, unsigned int uFlags=0, QString szKeySequence=QString()) | |
Constructs the action object. | |
KviAction (QObject *pParent, QString szName, QString szVisibleName, QString szDescription, KviActionCategory *pCategory=nullptr, QString szBigIconId=QString(), QString szSmallIconId=QString(), unsigned int uFlags=0, QString szKeySequence=QString()) | |
Constructs the action object. | |
const QString & | name () const |
Returns the name of the action. | |
virtual void | setEnabled (bool bEnabled) |
Enables the action. | |
QPixmap * | smallIcon () |
Returns the small icon associated to the action. | |
const QString & | smallIconId () const |
Returns the id of the small icon associated to the action. | |
void | suicide () |
Destroys itself. Maybe the best function in the whole APIs :) | |
virtual const QString & | visibleName () |
Returns the visible name of the action. | |
virtual | ~KviAction () |
Destroys the action object. | |
Protected Slots | |
virtual void | popupAboutToShow () |
virtual void | popupActivated (QAction *pAction) |
![]() | |
virtual void | actionDestroyed () |
Removes the action from the list. | |
virtual void | activeContextChanged () |
Enables or disables the action upon checking the active context. | |
virtual void | activeContextStateChanged () |
Enables or disables the action upon checking the active context. | |
virtual void | activeWindowChanged () |
Enables or disables the action upon checking the active window. | |
virtual void | activeWindowSelectionStateChanged (bool bSelectedNow) |
Enables or disables the action upon checking the active window. | |
virtual void | reloadImages () |
Reloads the images. | |
Protected Member Functions | |
void | setup () override |
Enables or disables the action upon starting KVIrc. | |
![]() | |
std::unordered_set< QAction * > const & | actionList () const |
Returns the list of actions associated to the action. | |
void | registerAccelerator () |
Registers the action shortcut in the application. | |
void | registerAction (QAction *pAction) |
Adds the action to the list. | |
bool | setupDone () const |
Returns true if the setup is finished. | |
void | unregisterAccelerator () |
Removes the action shortcut from the application. | |
Protected Attributes | |
QMenu * | m_pPopup |
![]() | |
QString | m_szScript |
![]() | |
KviIconManager::SmallIcon | m_eSmallIcon |
QPointer< QShortcut > | m_pAccel |
std::unordered_set< QAction * > | m_pActionList |
KviActionCategory * | m_pCategory = nullptr |
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 |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
void | activated () |
Emitted when the action is being activated. | |
![]() | |
static int | validateFlags (int iFlagsToValidate) |
Validates the flags of the action. | |
KviSubmenuAction::KviSubmenuAction | ( | QObject * | pParent, |
const QString & | szName, | ||
const QString & | szScriptCode, | ||
const QString & | szVisibleName, | ||
const QString & | szDescription, | ||
KviActionCategory * | pCategory = nullptr, | ||
const QString & | szBigIconId = QString(), | ||
KviIconManager::SmallIcon | eSmallIcon = KviIconManager::None, | ||
unsigned int | uFlags = 0 ) |
References KviKvsAction::KviKvsAction(), and m_pPopup.
Referenced by KviJoinChannelAction::KviJoinChannelAction().
KviSubmenuAction::~KviSubmenuAction | ( | ) |
References m_pPopup.
|
overridevirtual |
Adds the action to the given toolbar.
pParentToolBar | The toolbar where to add the action |
Reimplemented from KviAction.
References KviKvsAction::activate(), KviAction::bigIcon(), connect(), KviAction::isEnabled(), m_pPopup, KviAction::name(), p, KviAction::registerAction(), KviKvsAction::scriptCode(), setup(), KviAction::setupDone(), t, and KviAction::visibleName().
|
overridevirtual |
Adds the action to the given popup.
pMenu | The menu where to add the action |
Reimplemented from KviAction.
References KviAction::isEnabled(), m_pPopup, p, setup(), KviAction::setupDone(), KviAction::smallIcon(), and KviAction::visibleName().
|
protectedvirtualslot |
Referenced by setup().
|
protectedvirtualslot |
Referenced by setup().
|
overrideprotectedvirtual |
Enables or disables the action upon starting KVIrc.
Reimplemented from KviAction.
References connect(), m_pPopup, popupAboutToShow(), popupActivated(), and KviAction::setup().
Referenced by addToCustomToolBar(), and addToPopupMenu().
|
protected |