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

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

Inheritance diagram for NetworkModelController:
Collaboration diagram for NetworkModelController:

Classes

class  JoinDlg
 Input dialog for joining a channel. More...

Public Types

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 }

Signals

void showChannelList (NetworkId)
void showIgnoreList (QString)

Public Member Functions

 NetworkModelController (QObject *parent=0)
virtual ~NetworkModelController ()
Actionaction (ActionType type) const
 Q_DECLARE_FLAGS (ItemActiveStates, ItemActiveState) public slots
virtual void disconnectedFromCore ()

Protected Slots

virtual void actionTriggered (QAction *)

Protected Member Functions

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 handleNetworkAction (ActionType, QAction *)
virtual void handleBufferAction (ActionType, QAction *)
virtual void handleHideAction (ActionType, QAction *)
virtual void handleNickAction (ActionType, QAction *action)
virtual void handleGeneralAction (ActionType, QAction *)
virtual void handleExternalAction (ActionType, QAction *)

Private Attributes

NetworkModel_model
ActionCollection_actionCollection
QHash< ActionType, Action * > _actionByType
QList< QModelIndex > _indexList
MessageFilter_messageFilter
QString _contextItem
 Channel name or nick to provide context menu for.
QObject * _receiver
const char * _method

Detailed Description

Definition at line 34 of file networkmodelcontroller.h.

Member Enumeration Documentation

enum ActionType
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.

Enumerator:
InactiveState 
ActiveState 

Definition at line 117 of file networkmodelcontroller.h.

Constructor & Destructor Documentation

NetworkModelController ( QObject *  parent = 0)

Definition at line 41 of file networkmodelcontroller.cpp.

References _actionCollection, and actionTriggered().

~NetworkModelController ( )
virtual

Definition at line 51 of file networkmodelcontroller.cpp.

Member Function Documentation

Q_DECLARE_FLAGS ( ItemActiveStates  ,
ItemActiveState   
)
inline

Definition at line 121 of file networkmodelcontroller.h.

virtual void disconnectedFromCore ( )
inlinevirtual

Definition at line 125 of file networkmodelcontroller.h.

Referenced by GraphicalUi::disconnectedFromCore().

ActionCollection * actionCollection ( ) const
inlineprotected

Definition at line 205 of file networkmodelcontroller.h.

References _actionCollection.

QString contextItem ( ) const
inlineprotected

Channel name or nick to provide context menu for.

Definition at line 209 of file networkmodelcontroller.h.

References _contextItem.

Referenced by ContextMenuActionProvider::addActions(), ContextMenuActionProvider::addIrcUserActions(), handleGeneralAction(), and setContextItem().

QObject * receiver ( ) const
inlineprotected

Definition at line 210 of file networkmodelcontroller.h.

References _receiver.

Referenced by handleExternalAction(), and setSlot().

const char * method ( ) const
inlineprotected

Definition at line 211 of file networkmodelcontroller.h.

References _method.

Referenced by handleExternalAction(), and setSlot().

void setIndexList ( const QList< QModelIndex > &  list)
protected

Definition at line 87 of file networkmodelcontroller.cpp.

References _indexList.

void setMessageFilter ( MessageFilter filter)
protected

Definition at line 93 of file networkmodelcontroller.cpp.

References _messageFilter.

Referenced by ContextMenuActionProvider::addActions(), and handleHideAction().

void setContextItem ( const QString &  contextItem)
protected

Definition at line 99 of file networkmodelcontroller.cpp.

References _contextItem, and contextItem().

Referenced by ContextMenuActionProvider::addActions().

void setSlot ( QObject *  receiver,
const char *  method 
)
protected

Definition at line 105 of file networkmodelcontroller.cpp.

References _method, _receiver, method(), and receiver().

Referenced by ContextMenuActionProvider::addActions().

Action * registerAction ( ActionType  type,
const QString &  text,
bool  checkable = false 
)
protected
Action * registerAction ( NetworkModelController::ActionType  type,
const QIcon &  icon,
const QString &  text,
bool  checkable = false 
)
protected
bool checkRequirements ( const QModelIndex &  index,
ItemActiveStates  requiredActiveState = QFlags<ItemActiveState>(ActiveState | InactiveState) 
)
protected
QString nickName ( const QModelIndex &  index) const
protected
BufferId findQueryBuffer ( const QModelIndex &  index,
const QString &  predefinedNick = QString() 
) const
protected
BufferId findQueryBuffer ( NetworkId  networkId,
const QString &  nickName 
) const
protected

Definition at line 158 of file networkmodelcontroller.cpp.

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

void showChannelList ( NetworkId  )
signal

Referenced by handleGeneralAction().

void showIgnoreList ( QString  )
signal
void handleExternalAction ( ActionType  type,
QAction *  action 
)
protectedvirtual

Definition at line 203 of file networkmodelcontroller.cpp.

References method(), and receiver().

Referenced by actionTriggered().

Member Data Documentation

NetworkModel* _model
private

Definition at line 165 of file networkmodelcontroller.h.

ActionCollection* _actionCollection
private
QHash<ActionType, Action *> _actionByType
private

Definition at line 171 of file networkmodelcontroller.h.

Referenced by action(), and registerAction().

QList<QModelIndex> _indexList
private

Definition at line 173 of file networkmodelcontroller.h.

Referenced by handleHideAction(), indexList(), and setIndexList().

MessageFilter* _messageFilter
private

Definition at line 174 of file networkmodelcontroller.h.

Referenced by handleHideAction(), messageFilter(), and setMessageFilter().

QString _contextItem
private

Channel name or nick to provide context menu for.

Definition at line 175 of file networkmodelcontroller.h.

Referenced by contextItem(), and setContextItem().

QObject* _receiver
private

Definition at line 176 of file networkmodelcontroller.h.

Referenced by receiver(), and setSlot().

const char* _method
private

Definition at line 177 of file networkmodelcontroller.h.

Referenced by method(), and setSlot().


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