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

#include </tmp/quassel/src/core/corealiasmanager.h>

Inheritance diagram for CoreAliasManager:
Collaboration diagram for CoreAliasManager:

Public Types

typedef QList< AliasAliasList
typedef QList< QPair
< BufferInfo, QString > > 
CommandList

Public Slots

virtual QVariantMap initAliases () const
virtual void initSetAliases (const QVariantMap &aliases)
virtual void addAlias (const QString &name, const QString &expansion)
virtual void setInitialized ()
void requestUpdate (const QVariantMap &properties)
virtual void update (const QVariantMap &properties)

Signals

void initDone ()
void updatedRemotely ()
void updated ()

Public Member Functions

 CoreAliasManager (CoreSession *parent)
virtual const QMetaObject * syncMetaObject () const
int indexOf (const QString &name) const
bool contains (const QString &name) const
bool isEmpty () const
int count () const
void removeAt (int index)
Aliasoperator[] (int i)
const Aliasoperator[] (int i) const
const AliasListaliases () const
CommandList processInput (const BufferInfo &info, const QString &message)
virtual QVariantMap toVariantMap ()
 Stores the object's state into a QVariantMap.
virtual void fromVariantMap (const QVariantMap &properties)
 Initialize the object's state from a given QVariantMap.
virtual bool isInitialized () const
void setAllowClientUpdates (bool allow)
bool allowClientUpdates () const

Static Public Member Functions

static AliasList defaults ()

Protected Member Functions

const Networknetwork (NetworkId) const
void setAliases (const QList< Alias > &aliases)
void sync_call__ (SignalProxy::ProxyMode modeType, const char *funcname,...) const
void renameObject (const QString &newName)

Private Slots

void save () const

Private Member Functions

void loadDefaults ()

Detailed Description

Definition at line 28 of file corealiasmanager.h.

Member Typedef Documentation

typedef QList<Alias> AliasList
inherited

Definition at line 45 of file aliasmanager.h.

typedef QList<QPair<BufferInfo, QString> > CommandList
inherited

Definition at line 58 of file aliasmanager.h.

Constructor & Destructor Documentation

CoreAliasManager ( CoreSession parent)
explicit

Member Function Documentation

virtual const QMetaObject* syncMetaObject ( ) const
inlinevirtual

Reimplemented from SyncableObject.

Definition at line 36 of file corealiasmanager.h.

const Network * network ( NetworkId  id) const
protectedvirtual

Implements AliasManager.

Definition at line 59 of file corealiasmanager.cpp.

void save ( ) const
privateslot
void loadDefaults ( )
private
int indexOf ( const QString &  name) const
inherited

Definition at line 39 of file aliasmanager.cpp.

References AliasManager::_aliases.

Referenced by AliasManager::contains().

bool contains ( const QString &  name) const
inlineinherited
bool isEmpty ( ) const
inlineinherited

Definition at line 49 of file aliasmanager.h.

References AliasManager::_aliases.

Referenced by AliasesModel::loadDefaults().

int count ( ) const
inlineinherited

Definition at line 50 of file aliasmanager.h.

References AliasManager::_aliases.

Referenced by AliasManager::processInput(), and AliasesModel::rowCount().

void removeAt ( int  index)
inlineinherited

Definition at line 51 of file aliasmanager.h.

References AliasManager::_aliases.

Referenced by AliasesModel::loadDefaults(), and AliasesModel::removeAlias().

Alias& operator[] ( int  i)
inlineinherited

Definition at line 52 of file aliasmanager.h.

References AliasManager::_aliases.

const Alias& operator[] ( int  i) const
inlineinherited

Definition at line 53 of file aliasmanager.h.

References AliasManager::_aliases.

const AliasList& aliases ( ) const
inlineinherited
AliasManager::AliasList defaults ( )
staticinherited

Definition at line 95 of file aliasmanager.cpp.

References AliasManager::aliases().

Referenced by loadDefaults(), and AliasesModel::loadDefaults().

AliasManager::CommandList processInput ( const BufferInfo info,
const QString &  message 
)
inherited
QVariantMap initAliases ( ) const
virtualslotinherited

Definition at line 49 of file aliasmanager.cpp.

References AliasManager::_aliases, and AliasManager::aliases().

Referenced by save().

void initSetAliases ( const QVariantMap &  aliases)
virtualslotinherited

Definition at line 66 of file aliasmanager.cpp.

References AliasManager::_aliases.

void addAlias ( const QString &  name,
const QString &  expansion 
)
virtualslotinherited
void setAliases ( const QList< Alias > &  aliases)
inlineprotectedinherited

Definition at line 69 of file aliasmanager.h.

References AliasManager::_aliases, and AliasManager::aliases().

QVariantMap toVariantMap ( )
virtualinherited

Stores the object's state into a QVariantMap.

The default implementation takes dynamic properties as well as getters that have names starting with "init" and stores them in a QVariantMap. Override this method in derived classes in order to store the object state in a custom form.

Note
This is used by SignalProxy to transmit the state of the object to clients that request the initial object state. Later updates use a different mechanism and assume that the state is completely covered by properties and init* getters. DO NOT OVERRIDE THIS unless you know exactly what you do!
Returns
The object's state in a QVariantMap

Definition at line 91 of file syncableobject.cpp.

References SignalProxy::ExtendedMetaObject::methodBaseName(), and SignalProxy::ExtendedMetaObject::methodName().

Referenced by BufferViewSettingsPage::cloneConfig(), AliasesModel::commit(), IgnoreListModel::commit(), ClientBufferViewConfig::ensureDecoration(), IrcConnectionWizard::finishClicked(), SignalProxy::initData(), CoreNetworkConfig::save(), BufferViewSettingsPage::save(), and ClientBufferViewManager::setInitialized().

void fromVariantMap ( const QVariantMap &  properties)
virtualinherited

Initialize the object's state from a given QVariantMap.

See Also
toVariantMap() for important information concerning this method.

Definition at line 135 of file syncableobject.cpp.

References SyncableObject::setInitValue().

Referenced by BufferViewConfig::BufferViewConfig(), BufferViewSettingsPage::cloneConfig(), Network::newIrcChannel(), Network::newIrcUser(), SignalProxy::setInitData(), and SyncableObject::update().

void setAllowClientUpdates ( bool  allow)
inlineinherited
bool allowClientUpdates ( ) const
inlineinherited

Definition at line 82 of file syncableobject.h.

References SyncableObject::_allowClientUpdates.

Referenced by SyncableObject::requestUpdate().

void update ( const QVariantMap &  properties)
virtualslotinherited
void sync_call__ ( SignalProxy::ProxyMode  modeType,
const char *  funcname,
  ... 
) const
protectedinherited
void renameObject ( const QString &  newName)
protectedinherited
void initDone ( )
signalinherited
void updatedRemotely ( )
signalinherited
void updated ( )
signalinherited

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