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

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

Inheritance diagram for Identity:
Collaboration diagram for Identity:

Public Slots

void setId (IdentityId id)
void setIdentityName (const QString &name)
void setRealName (const QString &realName)
void setNicks (const QStringList &nicks)
void setAwayNick (const QString &awayNick)
void setAwayNickEnabled (bool enabled)
void setAwayReason (const QString &awayReason)
void setAwayReasonEnabled (bool enabled)
void setAutoAwayEnabled (bool enabled)
void setAutoAwayTime (int time)
void setAutoAwayReason (const QString &reason)
void setAutoAwayReasonEnabled (bool enabled)
void setDetachAwayEnabled (bool enabled)
void setDetachAwayReason (const QString &reason)
void setDetachAwayReasonEnabled (bool enabled)
void setIdent (const QString &ident)
void setKickReason (const QString &reason)
void setPartReason (const QString &reason)
void setQuitReason (const QString &reason)
void copyFrom (const Identity &other)
virtual void setInitialized ()
void requestUpdate (const QVariantMap &properties)
virtual void update (const QVariantMap &properties)

Signals

void idSet (IdentityId id)
void nicksSet (const QStringList &nicks)
void initDone ()
void updatedRemotely ()
void updated ()

Public Member Functions

 Identity (IdentityId id=0, QObject *parent=0)
 Identity (const Identity &other, QObject *parent=0)
virtual const QMetaObject * syncMetaObject () const
void setToDefaults ()
bool operator== (const Identity &other) const
bool operator!= (const Identity &other) const
bool isValid () const
IdentityId id () const
const QString & identityName () const
const QString & realName () const
const QStringList & nicks () const
const QString & awayNick () const
bool awayNickEnabled () const
const QString & awayReason () const
bool awayReasonEnabled () const
bool autoAwayEnabled () const
int autoAwayTime () const
const QString & autoAwayReason () const
bool autoAwayReasonEnabled () const
bool detachAwayEnabled () const
const QString & detachAwayReason () const
bool detachAwayReasonEnabled () const
const QString & ident () const
const QString & kickReason () const
const QString & partReason () const
const QString & quitReason () 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 Member Functions

void sync_call__ (SignalProxy::ProxyMode modeType, const char *funcname,...) const
void renameObject (const QString &newName)

Properties

IdentityId identityId
QString identityName
QString realName
QStringList nicks
QString awayNick
bool awayNickEnabled
QString awayReason
bool awayReasonEnabled
bool autoAwayEnabled
int autoAwayTime
QString autoAwayReason
bool autoAwayReasonEnabled
bool detachAwayEnabled
QString detachAwayReason
bool detachAwayReasonEnabled
QString ident
QString kickReason
QString partReason
QString quitReason

Private Member Functions

void init ()
QString defaultNick ()
QString defaultRealName ()

Private Attributes

IdentityId _identityId
QString _identityName
QString _realName
QStringList _nicks
QString _awayNick
bool _awayNickEnabled
QString _awayReason
bool _awayReasonEnabled
bool _autoAwayEnabled
int _autoAwayTime
QString _autoAwayReason
bool _autoAwayReasonEnabled
bool _detachAwayEnabled
QString _detachAwayReason
bool _detachAwayReasonEnabled
QString _ident
QString _kickReason
QString _partReason
QString _quitReason

Static Private Attributes

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

Friends

QDataStream & operator>> (QDataStream &in, Identity &identity)

Detailed Description

Definition at line 33 of file identity.h.

Constructor & Destructor Documentation

Identity ( IdentityId  id = 0,
QObject *  parent = 0 
)

Definition at line 46 of file identity.cpp.

Identity ( const Identity other,
QObject *  parent = 0 
)

Definition at line 55 of file identity.cpp.

References init().

Member Function Documentation

virtual const QMetaObject* syncMetaObject ( ) const
inlinevirtual

Reimplemented from SyncableObject.

Definition at line 61 of file identity.h.

bool operator== ( const Identity other) const

Definition at line 351 of file identity.cpp.

bool operator!= ( const Identity other) const

Definition at line 370 of file identity.cpp.

bool isValid ( ) const
inline

Definition at line 68 of file identity.h.

References id(), and SignedId::isValid().

const QString& identityName ( ) const
inline

Definition at line 71 of file identity.h.

References _identityName.

Referenced by setIdentityName().

const QString& realName ( ) const
inline

Definition at line 72 of file identity.h.

References _realName.

Referenced by defaultRealName(), and setRealName().

const QStringList& nicks ( ) const
inline

Definition at line 73 of file identity.h.

References _nicks.

Referenced by setNicks().

const QString& awayNick ( ) const
inline

Definition at line 74 of file identity.h.

References _awayNick.

bool awayNickEnabled ( ) const
inline

Definition at line 75 of file identity.h.

References _awayNickEnabled.

const QString& awayReason ( ) const
inline

Definition at line 76 of file identity.h.

References _awayReason.

bool awayReasonEnabled ( ) const
inline

Definition at line 77 of file identity.h.

References _awayReasonEnabled.

bool autoAwayEnabled ( ) const
inline

Definition at line 78 of file identity.h.

References _autoAwayEnabled.

int autoAwayTime ( ) const
inline

Definition at line 79 of file identity.h.

References _autoAwayTime.

const QString& autoAwayReason ( ) const
inline

Definition at line 80 of file identity.h.

References _autoAwayReason.

bool autoAwayReasonEnabled ( ) const
inline

Definition at line 81 of file identity.h.

References _autoAwayReasonEnabled.

bool detachAwayEnabled ( ) const
inline

Definition at line 82 of file identity.h.

References _detachAwayEnabled.

const QString& detachAwayReason ( ) const
inline

Definition at line 83 of file identity.h.

References _detachAwayReason.

bool detachAwayReasonEnabled ( ) const
inline

Definition at line 84 of file identity.h.

References _detachAwayReasonEnabled.

const QString& ident ( ) const
inline

Definition at line 85 of file identity.h.

References _ident.

Referenced by setIdent().

const QString& kickReason ( ) const
inline

Definition at line 86 of file identity.h.

References _kickReason.

const QString& partReason ( ) const
inline

Definition at line 87 of file identity.h.

References _partReason.

const QString& quitReason ( ) const
inline

Definition at line 88 of file identity.h.

References _quitReason.

void setRealName ( const QString &  realName)
slot

Definition at line 217 of file identity.cpp.

References _realName, ARG, realName(), and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setNicks ( const QStringList &  nicks)
slot

Definition at line 224 of file identity.cpp.

References _nicks, ARG, nicks(), nicksSet(), and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAwayNick ( const QString &  awayNick)
slot

Definition at line 232 of file identity.cpp.

References _awayNick, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAwayNickEnabled ( bool  enabled)
slot

Definition at line 246 of file identity.cpp.

References _awayNickEnabled, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAwayReason ( const QString &  awayReason)
slot

Definition at line 239 of file identity.cpp.

References _awayReason, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAwayReasonEnabled ( bool  enabled)
slot

Definition at line 253 of file identity.cpp.

References _awayReasonEnabled, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAutoAwayEnabled ( bool  enabled)
slot

Definition at line 260 of file identity.cpp.

References _autoAwayEnabled, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAutoAwayTime ( int  time)
slot

Definition at line 267 of file identity.cpp.

References _autoAwayTime, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAutoAwayReason ( const QString &  reason)
slot

Definition at line 274 of file identity.cpp.

References _autoAwayReason, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setAutoAwayReasonEnabled ( bool  enabled)
slot
void setDetachAwayEnabled ( bool  enabled)
slot

Definition at line 288 of file identity.cpp.

References _detachAwayEnabled, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setDetachAwayReason ( const QString &  reason)
slot

Definition at line 295 of file identity.cpp.

References _detachAwayReason, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setDetachAwayReasonEnabled ( bool  enabled)
slot
void setIdent ( const QString &  ident)
slot

Definition at line 309 of file identity.cpp.

References _ident, ARG, ident(), and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setKickReason ( const QString &  reason)
slot

Definition at line 316 of file identity.cpp.

References _kickReason, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setPartReason ( const QString &  reason)
slot

Definition at line 323 of file identity.cpp.

References _partReason, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void setQuitReason ( const QString &  reason)
slot

Definition at line 330 of file identity.cpp.

References _quitReason, ARG, and SYNC.

Referenced by PostgreSqlStorage::identities(), SqliteStorage::identities(), and setToDefaults().

void copyFrom ( const Identity other)
slot
void idSet ( IdentityId  id)
signal
void nicksSet ( const QStringList &  nicks)
signal

Referenced by setNicks().

void init ( )
private

Definition at line 99 of file identity.cpp.

References SyncableObject::setAllowClientUpdates(), and toInt().

Referenced by Identity().

QString defaultNick ( )
private

Definition at line 106 of file identity.cpp.

References CFStringToQString().

Referenced by setToDefaults().

QString defaultRealName ( )
private

Definition at line 145 of file identity.cpp.

References CFStringToQString(), and realName().

Referenced by setToDefaults().

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

Friends And Related Function Documentation

QDataStream& operator>> ( QDataStream &  in,
Identity identity 
)
friend

Definition at line 385 of file identity.cpp.

Member Data Documentation

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

Definition at line 35 of file identity.h.

IdentityId _identityId
private

Definition at line 135 of file identity.h.

Referenced by id(), and setId().

QString _identityName
private

Definition at line 136 of file identity.h.

Referenced by identityName(), and setIdentityName().

QString _realName
private

Definition at line 136 of file identity.h.

Referenced by realName(), and setRealName().

QStringList _nicks
private

Definition at line 137 of file identity.h.

Referenced by nicks(), and setNicks().

QString _awayNick
private

Definition at line 138 of file identity.h.

Referenced by awayNick(), and setAwayNick().

bool _awayNickEnabled
private

Definition at line 139 of file identity.h.

Referenced by awayNickEnabled(), and setAwayNickEnabled().

QString _awayReason
private

Definition at line 140 of file identity.h.

Referenced by awayReason(), and setAwayReason().

bool _awayReasonEnabled
private

Definition at line 141 of file identity.h.

Referenced by awayReasonEnabled(), and setAwayReasonEnabled().

bool _autoAwayEnabled
private

Definition at line 142 of file identity.h.

Referenced by autoAwayEnabled(), and setAutoAwayEnabled().

int _autoAwayTime
private

Definition at line 143 of file identity.h.

Referenced by autoAwayTime(), and setAutoAwayTime().

QString _autoAwayReason
private

Definition at line 144 of file identity.h.

Referenced by autoAwayReason(), and setAutoAwayReason().

bool _autoAwayReasonEnabled
private

Definition at line 145 of file identity.h.

Referenced by autoAwayReasonEnabled(), and setAutoAwayReasonEnabled().

bool _detachAwayEnabled
private

Definition at line 146 of file identity.h.

Referenced by detachAwayEnabled(), and setDetachAwayEnabled().

QString _detachAwayReason
private

Definition at line 147 of file identity.h.

Referenced by detachAwayReason(), and setDetachAwayReason().

bool _detachAwayReasonEnabled
private

Definition at line 148 of file identity.h.

Referenced by detachAwayReasonEnabled(), and setDetachAwayReasonEnabled().

QString _ident
private

Definition at line 149 of file identity.h.

Referenced by ident(), and setIdent().

QString _kickReason
private

Definition at line 149 of file identity.h.

Referenced by kickReason(), and setKickReason().

QString _partReason
private

Definition at line 149 of file identity.h.

Referenced by partReason(), and setPartReason().

QString _quitReason
private

Definition at line 149 of file identity.h.

Referenced by quitReason(), and setQuitReason().

Property Documentation

IdentityId identityId
readwrite

Definition at line 38 of file identity.h.

bool autoAwayEnabled
readwrite

Definition at line 46 of file identity.h.

Referenced by IdentityEditWidget::displayIdentity().

bool detachAwayReasonEnabled
readwrite

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