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

#include </tmp/quassel/src/common/bufferviewmanager.h>

Inheritance diagram for BufferViewManager:
Collaboration diagram for BufferViewManager:

Public Slots

void addBufferViewConfig (BufferViewConfig *config)
void addBufferViewConfig (int bufferViewConfigId)
void newBufferViewConfig (int bufferViewConfigId)
void deleteBufferViewConfig (int bufferViewConfigId)
QVariantList initBufferViewIds () const
void initSetBufferViewIds (const QVariantList bufferViewIds)
virtual void requestCreateBufferView (const QVariantMap &properties)
virtual void requestCreateBufferViews (const QVariantList &properties)
virtual void requestDeleteBufferView (int bufferViewId)
virtual void requestDeleteBufferViews (const QVariantList &bufferViews)
virtual void setInitialized ()
void requestUpdate (const QVariantMap &properties)
virtual void update (const QVariantMap &properties)

Signals

void bufferViewConfigAdded (int bufferViewConfigId)
void bufferViewConfigDeleted (int bufferViewConfigId)
void initDone ()
void updatedRemotely ()
void updated ()

Public Member Functions

 BufferViewManager (SignalProxy *proxy, QObject *parent=0)
virtual const QMetaObject * syncMetaObject () const
QList< BufferViewConfig * > bufferViewConfigs () const
BufferViewConfigbufferViewConfig (int bufferViewId) const
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

Protected Types

typedef QHash< int,
BufferViewConfig * > 
BufferViewConfigHash

Protected Member Functions

const BufferViewConfigHashbufferViewConfigHash ()
virtual BufferViewConfigbufferViewConfigFactory (int bufferViewConfigId)
void sync_call__ (SignalProxy::ProxyMode modeType, const char *funcname,...) const
void renameObject (const QString &newName)

Private Attributes

BufferViewConfigHash _bufferViewConfigs
SignalProxy_proxy

Static Private Attributes

static const int _classNameOffset__ = QByteArray(staticMetaObject.className()).length() + 2

Detailed Description

Definition at line 32 of file bufferviewmanager.h.

Member Typedef Documentation

typedef QHash<int, BufferViewConfig *> BufferViewConfigHash
protected

Definition at line 69 of file bufferviewmanager.h.

Constructor & Destructor Documentation

BufferViewManager ( SignalProxy proxy,
QObject *  parent = 0 
)

Definition at line 27 of file bufferviewmanager.cpp.

References SyncableObject::synchronize().

Member Function Documentation

virtual const QMetaObject* syncMetaObject ( ) const
inlinevirtual

Reimplemented from SyncableObject.

Reimplemented in CoreBufferViewManager.

Definition at line 40 of file bufferviewmanager.h.

void addBufferViewConfig ( int  bufferViewConfigId)
slot
void newBufferViewConfig ( int  bufferViewConfigId)
inlineslot

Definition at line 48 of file bufferviewmanager.h.

References addBufferViewConfig().

Referenced by initSetBufferViewIds().

void deleteBufferViewConfig ( int  bufferViewConfigId)
slot
QVariantList initBufferViewIds ( ) const
slot

Definition at line 84 of file bufferviewmanager.cpp.

References _bufferViewConfigs.

void initSetBufferViewIds ( const QVariantList  bufferViewIds)
slot

Definition at line 97 of file bufferviewmanager.cpp.

References newBufferViewConfig().

virtual void requestCreateBufferView ( const QVariantMap &  properties)
inlinevirtualslot

Definition at line 55 of file bufferviewmanager.h.

References ARG, and REQUEST.

Referenced by ClientBufferViewManager::setInitialized().

virtual void requestCreateBufferViews ( const QVariantList &  properties)
inlinevirtualslot

Definition at line 56 of file bufferviewmanager.h.

References ARG, and REQUEST.

Referenced by BufferViewSettingsPage::save().

virtual void requestDeleteBufferView ( int  bufferViewId)
inlinevirtualslot

Definition at line 57 of file bufferviewmanager.h.

References ARG, and REQUEST.

virtual void requestDeleteBufferViews ( const QVariantList &  bufferViews)
inlinevirtualslot

Definition at line 58 of file bufferviewmanager.h.

References ARG, and REQUEST.

Referenced by BufferViewSettingsPage::save().

void bufferViewConfigAdded ( int  bufferViewConfigId)
signal

Referenced by addBufferViewConfig().

void bufferViewConfigDeleted ( int  bufferViewConfigId)
signal

Referenced by deleteBufferViewConfig().

const BufferViewConfigHash& bufferViewConfigHash ( )
inlineprotected
BufferViewConfig * bufferViewConfigFactory ( int  bufferViewConfigId)
protectedvirtual

Reimplemented in ClientBufferViewManager.

Definition at line 44 of file bufferviewmanager.cpp.

Referenced by addBufferViewConfig().

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

Member Data Documentation

const int _classNameOffset__ = QByteArray(staticMetaObject.className()).length() + 2
staticprivate

Definition at line 34 of file bufferviewmanager.h.

SignalProxy* _proxy
private

Definition at line 75 of file bufferviewmanager.h.

Referenced by addBufferViewConfig().


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