Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
ToolBarActionProvider Class Reference

#include </tmp/quassel/src/uisupport/toolbaractionprovider.h>

Inheritance diagram for ToolBarActionProvider:
Collaboration diagram for ToolBarActionProvider:

Public Types

enum  ToolBarType { MainToolBar, ChatViewToolBar, NickToolBar }
enum  ActionType {
  NetworkMask = 0x0f, NetworkConnect = 0x01, NetworkDisconnect = 0x02, NetworkConnectAll = 0x03,
  NetworkDisconnectAll = 0x04, BufferMask = 0xf0, BufferJoin = 0x10, BufferPart = 0x20,
  BufferSwitchTo = 0x30, BufferRemove = 0x40, HideMask = 0x0f00, HideJoin = 0x0100,
  HidePart = 0x0200, HideQuit = 0x0300, HideNick = 0x0400, HideMode = 0x0500,
  HideDayChange = 0x0600, HideTopic = 0x0700, HideJoinPartQuit = 0xd00, HideUseDefaults = 0xe00,
  HideApplyToAll = 0xf00, GeneralMask = 0xf000, JoinChannel = 0x1000, ShowChannelList = 0x2000,
  ShowIgnoreList = 0x3000, NickMask = 0xff0000, NickWhois = 0x010000, NickQuery = 0x020000,
  NickSwitchTo = 0x030000, NickCtcpVersion = 0x040000, NickCtcpPing = 0x050000, NickCtcpTime = 0x060000,
  NickCtcpClientinfo = 0x070000, NickOp = 0x080000, NickDeop = 0x090000, NickVoice = 0x0a0000,
  NickDevoice = 0x0b0000, NickHalfop = 0x0c0000, NickDehalfop = 0x0d0000, NickKick = 0x0e0000,
  NickBan = 0x0f0000, NickKickBan = 0x100000, NickIgnoreUser = 0x200000, NickIgnoreHost = 0x300000,
  NickIgnoreDomain = 0x400000, NickIgnoreCustom = 0x500000, NickIgnoreToggleEnabled0 = 0x600000, NickIgnoreToggleEnabled1 = 0x700000,
  NickIgnoreToggleEnabled2 = 0x800000, NickIgnoreToggleEnabled3 = 0x900000, NickIgnoreToggleEnabled4 = 0xa00000, ExternalMask = 0xff000000,
  HideBufferTemporarily = 0x01000000, HideBufferPermanently = 0x02000000
}
enum  ItemActiveState { InactiveState = 0x01, ActiveState = 0x02 }

Public Slots

virtual void disconnectedFromCore ()

Signals

void showChannelList (NetworkId)
void showIgnoreList (QString)

Public Member Functions

 ToolBarActionProvider (QObject *parent=0)
virtual ~ToolBarActionProvider ()
void addActions (QToolBar *, ToolBarType type)
Actionaction (ActionType type) const
 Q_DECLARE_FLAGS (ItemActiveStates, ItemActiveState) public slots

Protected Slots

virtual void actionTriggered (QAction *)

Protected Member Functions

virtual void handleNetworkAction (ActionType, QAction *)
virtual void handleBufferAction (ActionType, QAction *)
virtual void handleNickAction (ActionType, QAction *)
virtual void handleGeneralAction (ActionType, QAction *)
ActionCollectionactionCollection () const
QList< QModelIndex > indexList () const
MessageFiltermessageFilter () const
QString contextItem () const
 Channel name or nick to provide context menu for.
QObject * receiver () const
const char * method () const
void setIndexList (const QModelIndex &)
void setIndexList (const QList< QModelIndex > &)
void setMessageFilter (MessageFilter *)
void setContextItem (const QString &)
void setSlot (QObject *receiver, const char *method)
ActionregisterAction (ActionType type, const QString &text, bool checkable=false)
ActionregisterAction (NetworkModelController::ActionType type, const QIcon &icon, const QString &text, bool checkable=false)
bool checkRequirements (const QModelIndex &index, ItemActiveStates requiredActiveState=QFlags< ItemActiveState >(ActiveState|InactiveState))
QString nickName (const QModelIndex &index) const
BufferId findQueryBuffer (const QModelIndex &index, const QString &predefinedNick=QString()) const
BufferId findQueryBuffer (NetworkId, const QString &nickName) const
void removeBuffers (const QModelIndexList &indexList)
virtual void handleHideAction (ActionType, QAction *)
virtual void handleExternalAction (ActionType, QAction *)

Private Slots

void networkCreated (NetworkId id)
void networkRemoved (NetworkId id)
void networkUpdated (const Network *net=0)
void connectOrDisconnectNet ()
void currentBufferChanged (const QModelIndex &)
void nickSelectionChanged (const QModelIndexList &)
void updateStates ()

Private Attributes

QMenu * _networksConnectMenu
QMenu * _networksDisconnectMenu
QHash< NetworkId, Action * > _networkActions
QModelIndex _currentBuffer
QModelIndexList _selectedNicks

Detailed Description

Definition at line 28 of file toolbaractionprovider.h.

Member Enumeration Documentation

Enumerator:
MainToolBar 
ChatViewToolBar 
NickToolBar 

Definition at line 36 of file toolbaractionprovider.h.

enum ActionType
inherited
Enumerator:
NetworkMask 
NetworkConnect 
NetworkDisconnect 
NetworkConnectAll 
NetworkDisconnectAll 
BufferMask 
BufferJoin 
BufferPart 
BufferSwitchTo 
BufferRemove 
HideMask 
HideJoin 
HidePart 
HideQuit 
HideNick 
HideMode 
HideDayChange 
HideTopic 
HideJoinPartQuit 
HideUseDefaults 
HideApplyToAll 
GeneralMask 
JoinChannel 
ShowChannelList 
ShowIgnoreList 
NickMask 
NickWhois 
NickQuery 
NickSwitchTo 
NickCtcpVersion 
NickCtcpPing 
NickCtcpTime 
NickCtcpClientinfo 
NickOp 
NickDeop 
NickVoice 
NickDevoice 
NickHalfop 
NickDehalfop 
NickKick 
NickBan 
NickKickBan 
NickIgnoreUser 
NickIgnoreHost 
NickIgnoreDomain 
NickIgnoreCustom 
NickIgnoreToggleEnabled0 
NickIgnoreToggleEnabled1 
NickIgnoreToggleEnabled2 
NickIgnoreToggleEnabled3 
NickIgnoreToggleEnabled4 
ExternalMask 
HideBufferTemporarily 
HideBufferPermanently 

Definition at line 43 of file networkmodelcontroller.h.

enum ItemActiveState
inherited
Enumerator:
InactiveState 
ActiveState 

Definition at line 117 of file networkmodelcontroller.h.

Constructor & Destructor Documentation

~ToolBarActionProvider ( )
virtual

Definition at line 68 of file toolbaractionprovider.cpp.

Member Function Documentation

void disconnectedFromCore ( )
virtualslot

Definition at line 73 of file toolbaractionprovider.cpp.

References _currentBuffer, and updateStates().

Referenced by GraphicalUi::disconnectedFromCore().

void handleNetworkAction ( ActionType  type,
QAction *  action 
)
protectedvirtual

Reimplemented from NetworkModelController.

Definition at line 131 of file toolbaractionprovider.cpp.

References _currentBuffer, and NetworkModelController::setIndexList().

void handleBufferAction ( ActionType  type,
QAction *  action 
)
protectedvirtual

Reimplemented from NetworkModelController.

Definition at line 138 of file toolbaractionprovider.cpp.

References _currentBuffer, and NetworkModelController::setIndexList().

void handleNickAction ( ActionType  type,
QAction *  action 
)
protectedvirtual

Reimplemented from NetworkModelController.

Definition at line 145 of file toolbaractionprovider.cpp.

References _selectedNicks, and NetworkModelController::setIndexList().

void handleGeneralAction ( ActionType  type,
QAction *  action 
)
protectedvirtual

Reimplemented from NetworkModelController.

Definition at line 152 of file toolbaractionprovider.cpp.

References _currentBuffer, and NetworkModelController::setIndexList().

void networkCreated ( NetworkId  id)
privateslot
void networkRemoved ( NetworkId  id)
privateslot

Definition at line 172 of file toolbaractionprovider.cpp.

References _networkActions.

Referenced by ToolBarActionProvider().

void connectOrDisconnectNet ( )
privateslot
void currentBufferChanged ( const QModelIndex &  index)
privateslot

Definition at line 116 of file toolbaractionprovider.cpp.

References _currentBuffer, and updateStates().

void nickSelectionChanged ( const QModelIndexList &  indexList)
privateslot
Q_DECLARE_FLAGS ( ItemActiveStates  ,
ItemActiveState   
)
inlineinherited

Definition at line 121 of file networkmodelcontroller.h.

ActionCollection * actionCollection ( ) const
inlineprotectedinherited
QString contextItem ( ) const
inlineprotectedinherited
QObject * receiver ( ) const
inlineprotectedinherited
const char * method ( ) const
inlineprotectedinherited
void setIndexList ( const QModelIndex &  index)
protectedinherited
void setIndexList ( const QList< QModelIndex > &  list)
protectedinherited

Definition at line 87 of file networkmodelcontroller.cpp.

References NetworkModelController::_indexList.

void setMessageFilter ( MessageFilter filter)
protectedinherited
void setContextItem ( const QString &  contextItem)
protectedinherited
void setSlot ( QObject *  receiver,
const char *  method 
)
protectedinherited
Action * registerAction ( ActionType  type,
const QString &  text,
bool  checkable = false 
)
protectedinherited
Action * registerAction ( NetworkModelController::ActionType  type,
const QIcon &  icon,
const QString &  text,
bool  checkable = false 
)
protectedinherited
bool checkRequirements ( const QModelIndex &  index,
ItemActiveStates  requiredActiveState = QFlags<ItemActiveState>(ActiveState | InactiveState) 
)
protectedinherited
BufferId findQueryBuffer ( const QModelIndex &  index,
const QString &  predefinedNick = QString() 
) const
protectedinherited
BufferId findQueryBuffer ( NetworkId  networkId,
const QString &  nickName 
) const
protectedinherited

Definition at line 158 of file networkmodelcontroller.cpp.

References NetworkModel::bufferId(), and Client::networkModel().

void showChannelList ( NetworkId  )
signalinherited
void showIgnoreList ( QString  )
signalinherited
void handleExternalAction ( ActionType  type,
QAction *  action 
)
protectedvirtualinherited

Member Data Documentation

QMenu* _networksConnectMenu
private

Definition at line 65 of file toolbaractionprovider.h.

Referenced by networkUpdated(), and ToolBarActionProvider().

QMenu * _networksDisconnectMenu
private

Definition at line 65 of file toolbaractionprovider.h.

Referenced by networkUpdated(), and ToolBarActionProvider().

QHash<NetworkId, Action *> _networkActions
private

Definition at line 66 of file toolbaractionprovider.h.

Referenced by networkCreated(), networkRemoved(), and networkUpdated().

QModelIndexList _selectedNicks
private

Definition at line 68 of file toolbaractionprovider.h.

Referenced by handleNickAction(), and nickSelectionChanged().


The documentation for this class was generated from the following files: