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

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

Inheritance diagram for CoreBufferSyncer:
Collaboration diagram for CoreBufferSyncer:

Public Slots

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 bufferId)
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)
void storeDirtyIds ()
QVariantList initLastSeenMsg () const
void initSetLastSeenMsg (const QVariantList &)
QVariantList initMarkerLines () const
void initSetMarkerLines (const QVariantList &)
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

 CoreBufferSyncer (CoreSession *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

virtual void customEvent (QEvent *event)
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 Member Functions

void purgeBufferIds ()

Private Attributes

CoreSession_coreSession
bool _purgeBuffers
QSet< BufferIddirtyLastSeenBuffers
QSet< BufferIddirtyMarkerLineBuffers

Detailed Description

Definition at line 28 of file corebuffersyncer.h.

Constructor & Destructor Documentation

Member Function Documentation

void requestSetLastSeenMsg ( BufferId  buffer,
const MsgId msgId 
)
virtualslot

Definition at line 44 of file corebuffersyncer.cpp.

References dirtyLastSeenBuffers, and BufferSyncer::setLastSeenMsg().

void requestSetMarkerLine ( BufferId  buffer,
const MsgId msgId 
)
virtualslot

Definition at line 51 of file corebuffersyncer.cpp.

References dirtyMarkerLineBuffers, and BufferSyncer::setMarkerLine().

virtual void requestRemoveBuffer ( BufferId  buffer)
inlinevirtualslot

Definition at line 40 of file corebuffersyncer.h.

References removeBuffer().

virtual void requestRenameBuffer ( BufferId  buffer,
QString  newName 
)
inlinevirtualslot

Definition at line 43 of file corebuffersyncer.h.

References renameBuffer().

void renameBuffer ( BufferId  buffer,
QString  newName 
)
virtualslot
virtual void requestMergeBuffersPermanently ( BufferId  buffer1,
BufferId  buffer2 
)
inlinevirtualslot

Definition at line 46 of file corebuffersyncer.h.

References mergeBuffersPermanently().

void mergeBuffersPermanently ( BufferId  buffer1,
BufferId  buffer2 
)
virtualslot
void requestPurgeBufferIds ( )
virtualslot

Definition at line 157 of file corebuffersyncer.cpp.

References _purgeBuffers.

virtual void requestMarkBufferAsRead ( BufferId  buffer)
inlinevirtualslot

Definition at line 51 of file corebuffersyncer.h.

References BufferSyncer::markBufferAsRead().

void customEvent ( QEvent *  event)
protectedvirtual

Definition at line 147 of file corebuffersyncer.cpp.

References purgeBufferIds().

virtual const QMetaObject* syncMetaObject ( ) const
inlinevirtualinherited

Reimplemented from SyncableObject.

Definition at line 36 of file buffersyncer.h.

MsgId lastSeenMsg ( BufferId  buffer) const
inherited

Definition at line 38 of file buffersyncer.cpp.

References BufferSyncer::_lastSeenMsg.

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

MsgId markerLine ( BufferId  buffer) const
inherited

Definition at line 60 of file buffersyncer.cpp.

References BufferSyncer::_markerLines.

Referenced by storeDirtyIds().

QVariantList initLastSeenMsg ( ) const
slotinherited

Definition at line 81 of file buffersyncer.cpp.

References BufferSyncer::_lastSeenMsg.

void initSetLastSeenMsg ( const QVariantList &  list)
slotinherited

Definition at line 94 of file buffersyncer.cpp.

References BufferSyncer::_lastSeenMsg, and BufferSyncer::setLastSeenMsg().

QVariantList initMarkerLines ( ) const
slotinherited

Definition at line 104 of file buffersyncer.cpp.

References BufferSyncer::_markerLines.

void initSetMarkerLines ( const QVariantList &  list)
slotinherited

Definition at line 117 of file buffersyncer.cpp.

References BufferSyncer::_markerLines, and BufferSyncer::setMarkerLine().

virtual void markBufferAsRead ( BufferId  buffer)
inlinevirtualslotinherited

Definition at line 63 of file buffersyncer.h.

References ARG, BufferSyncer::bufferMarkedAsRead(), and SYNC.

Referenced by requestMarkBufferAsRead().

void lastSeenMsgSet ( BufferId  buffer,
const MsgId msgId 
)
signalinherited
void markerLineSet ( BufferId  buffer,
const MsgId msgId 
)
signalinherited
void bufferRemoved ( BufferId  buffer)
signalinherited
void bufferRenamed ( BufferId  buffer,
QString  newName 
)
signalinherited
void buffersPermanentlyMerged ( BufferId  buffer1,
BufferId  buffer2 
)
signalinherited
void bufferMarkedAsRead ( BufferId  buffer)
signalinherited
bool setLastSeenMsg ( BufferId  buffer,
const MsgId msgId 
)
protectedslotinherited
bool setMarkerLine ( BufferId  buffer,
const MsgId msgId 
)
protectedslotinherited
QList<BufferId> lastSeenBufferIds ( ) const
inlineprotectedinherited

Definition at line 78 of file buffersyncer.h.

References BufferSyncer::_lastSeenMsg.

Referenced by purgeBufferIds().

QList<BufferId> markerLineBufferIds ( ) const
inlineprotectedinherited

Definition at line 79 of file buffersyncer.h.

References BufferSyncer::_markerLines.

Referenced by purgeBufferIds().

QHash<BufferId, MsgId> markerLines ( ) const
inlineprotectedinherited

Definition at line 80 of file buffersyncer.h.

References BufferSyncer::_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

CoreSession* _coreSession
private
bool _purgeBuffers
private

Definition at line 60 of file corebuffersyncer.h.

Referenced by purgeBufferIds(), and requestPurgeBufferIds().

QSet<BufferId> dirtyLastSeenBuffers
private

Definition at line 62 of file corebuffersyncer.h.

Referenced by requestSetLastSeenMsg(), and storeDirtyIds().

QSet<BufferId> dirtyMarkerLineBuffers
private

Definition at line 63 of file corebuffersyncer.h.

Referenced by requestSetMarkerLine(), and storeDirtyIds().


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