KVIrc
4.9.2
DeveloperAPIs
|
#include <KviCoreActions.h>
Public Member Functions | |
virtual QAction * | addToCustomToolBar (KviCustomToolBar *pTool) |
Adds the action to the given toolbar. More... | |
virtual bool | addToPopupMenu (QMenu *pMenu) |
Adds the action to the given popup. More... | |
KviConnectAction (QObject *pParent) | |
Public Member Functions inherited from KviAction | |
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... | |
virtual const QString & | description () |
Returns the description 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... | |
virtual bool | isKviUserActionNeverOverrideThis () |
Returns true if the action is user-defined. 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 const QString & | visibleName () |
Returns the visible name of the action. More... | |
virtual | ~KviAction () |
Destroys the action object. More... | |
Protected Member Functions | |
virtual void | activate () |
Activates the action. 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 | reloadImages () |
Reloads the images. More... | |
virtual void | setup () |
Enables or disables the action upon starting KVIrc. More... | |
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... | |
bool | setupDone () const |
Returns true if the setup is finished. More... | |
void | unregisterAccelerator () |
Removes the action shortcut from the application. More... | |
Protected Attributes | |
QString | m_szAbortConnectionString |
QString | m_szConnectString |
QString | m_szDisconnectString |
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 |
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... | |
Static Public Member Functions inherited from KviAction | |
static int | validateFlags (int iFlagsToValidate) |
Validates the flags of the action. More... | |
Protected Slots inherited from KviAction | |
virtual void | actionDestroyed () |
Removes the action from the list. 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... | |
KviConnectAction::KviConnectAction | ( | QObject * | pParent | ) |
|
protectedvirtual |
Activates the action.
It's called when the user activates the action clicking on the toolbar, the menu or by hitting its shortcut.
Reimplemented from KviAction.
References KviMainWindow::activeContext(), c, KviIrcContext::connectOrDisconnect(), and g_pMainWindow.
Referenced by addToCustomToolBar(), and addToPopupMenu().
|
protectedvirtual |
Enables or disables the action upon checking the active context.
If the context doesn't exist, the action is disabled
Called when the frame changes the active context.
Reimplemented from KviAction.
References activeContextStateChanged().
|
protectedvirtual |
Enables or disables the action upon checking the active context.
Called when the frame changes the state of the context
Reimplemented from KviAction.
References KviAction::actionList(), KviMainWindow::activeContext(), c, KviIrcContext::Connected, KviIrcContext::Connecting, KviPointerList< T >::first(), g_pIconManager, g_pMainWindow, KviIconManager::getBigIcon(), KviIrcContext::Idle, KVI_BIGICON_CONNECTED, KVI_BIGICON_CONNECTING, KVI_BIGICON_DISCONNECTED, KVI_OPTION_BOOL, KviOption_boolShowIconsInPopupMenus, KviIrcContext::LoggingIn, m_szAbortConnectionString, m_szConnectString, m_szDisconnectString, KviPointerList< T >::next(), p, KviIrcContext::PendingReconnection, and KviIrcContext::state().
Referenced by activeContextChanged(), addToCustomToolBar(), and reloadImages().
|
virtual |
Adds the action to the given toolbar.
pParentToolBar | The toolbar where to add the action |
Reimplemented from KviAction.
References activate(), activeContextStateChanged(), connect(), g_pIconManager, KviIconManager::getBigIcon(), KVI_BIGICON_DISCONNECTED, KVI_COREACTION_CONNECT, m_szConnectString, KviAction::registerAction(), setup(), and KviAction::setupDone().
|
virtual |
Adds the action to the given popup.
pMenu | The menu where to add the action |
Reimplemented from KviAction.
References activate(), KviMainWindow::activeContext(), c, KviIrcContext::Connected, KviIrcContext::Connecting, g_pMainWindow, KviIrcContext::Idle, KviIrcContext::LoggingIn, m_szAbortConnectionString, m_szConnectString, m_szDisconnectString, KviAction::m_szKeySequence, KviIrcContext::PendingReconnection, setup(), KviAction::setupDone(), KviIrcContext::state(), and t().
|
protectedvirtual |
Reloads the images.
Called when the application wants to refresh the images in the toolbar
Reimplemented from KviAction.
References activeContextStateChanged().
|
protectedvirtual |
Enables or disables the action upon starting KVIrc.
Reimplemented from KviAction.
References __tr2qs, m_szAbortConnectionString, m_szConnectString, m_szDisconnectString, and KviAction::setup().
Referenced by addToCustomToolBar(), and addToPopupMenu().
|
protected |
Referenced by activeContextStateChanged(), addToPopupMenu(), and setup().
|
protected |
Referenced by activeContextStateChanged(), addToCustomToolBar(), addToPopupMenu(), and setup().
|
protected |
Referenced by activeContextStateChanged(), addToPopupMenu(), and setup().