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

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

Inheritance diagram for BufferSyncer:
Collaboration diagram for BufferSyncer:

Public Slots

QVariantList initLastSeenMsg () const
void initSetLastSeenMsg (const QVariantList &)
QVariantList initMarkerLines () const
void initSetMarkerLines (const QVariantList &)
virtual void requestSetLastSeenMsg (BufferId buffer, const MsgId &msgId)
virtual void requestSetMarkerLine (BufferId buffer, const MsgId &msgId)
virtual void requestRemoveBuffer (BufferId buffer)
virtual void removeBuffer (BufferId buffer)
virtual void requestRenameBuffer (BufferId buffer, QString newName)
virtual void renameBuffer (BufferId buffer, QString newName)
virtual void requestMergeBuffersPermanently (BufferId buffer1, BufferId buffer2)
virtual void mergeBuffersPermanently (BufferId buffer1, BufferId buffer2)
virtual void requestPurgeBufferIds ()
virtual void requestMarkBufferAsRead (BufferId buffer)
virtual void markBufferAsRead (BufferId buffer)
virtual void setInitialized ()
void requestUpdate (const QVariantMap &properties)
virtual void update (const QVariantMap &properties)

Signals

void lastSeenMsgSet (BufferId buffer, const MsgId &msgId)
void markerLineSet (BufferId buffer, const MsgId &msgId)
void bufferRemoved (BufferId buffer)
void bufferRenamed (BufferId buffer, QString newName)
void buffersPermanentlyMerged (BufferId buffer1, BufferId buffer2)
void bufferMarkedAsRead (BufferId buffer)
void initDone ()
void updatedRemotely ()
void updated ()

Public Member Functions

 BufferSyncer (QObject *parent)
 BufferSyncer (const QHash< BufferId, MsgId > &lastSeenMsg, const QHash< BufferId, MsgId > &markerLines, QObject *parent)
virtual const QMetaObject * syncMetaObject () const
MsgId lastSeenMsg (BufferId buffer) const
MsgId markerLine (BufferId buffer) 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 Slots

bool setLastSeenMsg (BufferId buffer, const MsgId &msgId)
bool setMarkerLine (BufferId buffer, const MsgId &msgId)

Protected Member Functions

QList< BufferIdlastSeenBufferIds () const
QList< BufferIdmarkerLineBufferIds () const
QHash< BufferId, MsgIdmarkerLines () const
void sync_call__ (SignalProxy::ProxyMode modeType, const char *funcname,...) const
void renameObject (const QString &newName)

Private Attributes

QHash< BufferId, MsgId_lastSeenMsg
QHash< BufferId, MsgId_markerLines

Static Private Attributes

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

Detailed Description

Definition at line 27 of file buffersyncer.h.

Constructor & Destructor Documentation

BufferSyncer ( QObject *  parent)
explicit

Definition at line 24 of file buffersyncer.cpp.

BufferSyncer ( const QHash< BufferId, MsgId > &  lastSeenMsg,
const QHash< BufferId, MsgId > &  markerLines,
QObject *  parent 
)
explicit

Definition at line 30 of file buffersyncer.cpp.

Member Function Documentation

virtual const QMetaObject* syncMetaObject ( ) const
inlinevirtual

Reimplemented from SyncableObject.

Definition at line 36 of file buffersyncer.h.

MsgId lastSeenMsg ( BufferId  buffer) const

Definition at line 38 of file buffersyncer.cpp.

References _lastSeenMsg.

Referenced by setLastSeenMsg(), and CoreBufferSyncer::storeDirtyIds().

MsgId markerLine ( BufferId  buffer) const

Definition at line 60 of file buffersyncer.cpp.

References _markerLines.

Referenced by CoreBufferSyncer::storeDirtyIds().

QVariantList initLastSeenMsg ( ) const
slot

Definition at line 81 of file buffersyncer.cpp.

References _lastSeenMsg.

void initSetLastSeenMsg ( const QVariantList &  list)
slot

Definition at line 94 of file buffersyncer.cpp.

References _lastSeenMsg, and setLastSeenMsg().

QVariantList initMarkerLines ( ) const
slot

Definition at line 104 of file buffersyncer.cpp.

References _markerLines.

void initSetMarkerLines ( const QVariantList &  list)
slot

Definition at line 117 of file buffersyncer.cpp.

References _markerLines, and setMarkerLine().

virtual void requestSetLastSeenMsg ( BufferId  buffer,
const MsgId msgId 
)
inlinevirtualslot

Definition at line 48 of file buffersyncer.h.

References ARG, and REQUEST.

Referenced by Client::setBufferLastSeenMsg().

virtual void requestSetMarkerLine ( BufferId  buffer,
const MsgId msgId 
)
inlinevirtualslot

Definition at line 49 of file buffersyncer.h.

References ARG, REQUEST, and setMarkerLine().

Referenced by Client::setMarkerLine().

virtual void requestRemoveBuffer ( BufferId  buffer)
inlinevirtualslot

Definition at line 51 of file buffersyncer.h.

References ARG, and REQUEST.

Referenced by Client::removeBuffer().

void removeBuffer ( BufferId  buffer)
virtualslot

Definition at line 127 of file buffersyncer.cpp.

References _lastSeenMsg, _markerLines, ARG, bufferRemoved(), and SYNC.

virtual void requestRenameBuffer ( BufferId  buffer,
QString  newName 
)
inlinevirtualslot

Definition at line 54 of file buffersyncer.h.

References ARG, and REQUEST.

Referenced by Client::renameBuffer().

virtual void renameBuffer ( BufferId  buffer,
QString  newName 
)
inlinevirtualslot

Definition at line 55 of file buffersyncer.h.

References ARG, bufferRenamed(), and SYNC.

virtual void requestMergeBuffersPermanently ( BufferId  buffer1,
BufferId  buffer2 
)
inlinevirtualslot

Definition at line 57 of file buffersyncer.h.

References ARG, and REQUEST.

Referenced by Client::mergeBuffersPermanently().

void mergeBuffersPermanently ( BufferId  buffer1,
BufferId  buffer2 
)
virtualslot

Definition at line 138 of file buffersyncer.cpp.

References _lastSeenMsg, _markerLines, ARG, buffersPermanentlyMerged(), and SYNC.

virtual void requestPurgeBufferIds ( )
inlinevirtualslot

Definition at line 60 of file buffersyncer.h.

References NO_ARG, and REQUEST.

Referenced by Client::purgeKnownBufferIds().

virtual void requestMarkBufferAsRead ( BufferId  buffer)
inlinevirtualslot

Definition at line 62 of file buffersyncer.h.

References ARG, bufferMarkedAsRead(), and REQUEST.

Referenced by Client::markBufferAsRead().

virtual void markBufferAsRead ( BufferId  buffer)
inlinevirtualslot

Definition at line 63 of file buffersyncer.h.

References ARG, bufferMarkedAsRead(), and SYNC.

Referenced by CoreBufferSyncer::requestMarkBufferAsRead().

void lastSeenMsgSet ( BufferId  buffer,
const MsgId msgId 
)
signal

Referenced by setLastSeenMsg().

void markerLineSet ( BufferId  buffer,
const MsgId msgId 
)
signal

Referenced by setMarkerLine().

void bufferRemoved ( BufferId  buffer)
signal

Referenced by removeBuffer().

void bufferRenamed ( BufferId  buffer,
QString  newName 
)
signal

Referenced by renameBuffer().

void buffersPermanentlyMerged ( BufferId  buffer1,
BufferId  buffer2 
)
signal

Referenced by mergeBuffersPermanently().

void bufferMarkedAsRead ( BufferId  buffer)
signal
bool setLastSeenMsg ( BufferId  buffer,
const MsgId msgId 
)
protectedslot
bool setMarkerLine ( BufferId  buffer,
const MsgId msgId 
)
protectedslot
QList<BufferId> lastSeenBufferIds ( ) const
inlineprotected

Definition at line 78 of file buffersyncer.h.

References _lastSeenMsg.

Referenced by CoreBufferSyncer::purgeBufferIds().

QList<BufferId> markerLineBufferIds ( ) const
inlineprotected

Definition at line 79 of file buffersyncer.h.

References _markerLines.

Referenced by CoreBufferSyncer::purgeBufferIds().

QHash<BufferId, MsgId> markerLines ( ) const
inlineprotected

Definition at line 80 of file buffersyncer.h.

References _markerLines.

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 29 of file buffersyncer.h.


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