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

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

Inheritance diagram for IrcUser:
Collaboration diagram for IrcUser:

Public Slots

void setUser (const QString &user)
void setHost (const QString &host)
void setNick (const QString &nick)
void setRealName (const QString &realName)
void setAway (const bool &away)
void setAwayMessage (const QString &awayMessage)
void setIdleTime (const QDateTime &idleTime)
void setLoginTime (const QDateTime &loginTime)
void setServer (const QString &server)
void setIrcOperator (const QString &ircOperator)
void setLastAwayMessage (const int &lastAwayMessage)
void setWhoisServiceReply (const QString &whoisServiceReply)
void setSuserHost (const QString &suserHost)
void setEncrypted (bool encrypted)
void updateHostmask (const QString &mask)
void setUserModes (const QString &modes)
void joinChannel (IrcChannel *channel)
void joinChannel (const QString &channelname)
void partChannel (IrcChannel *channel)
void partChannel (const QString &channelname)
void quit ()
void addUserModes (const QString &modes)
void removeUserModes (const QString &modes)
virtual void setInitialized ()
void requestUpdate (const QVariantMap &properties)
virtual void update (const QVariantMap &properties)

Signals

void nickSet (QString newnick)
void awaySet (bool away)
void encryptedSet (bool encrypted)
void userModesSet (QString modes)
void userModesAdded (QString modes)
void userModesRemoved (QString modes)
void channelParted (QString channel)
void quited ()
void lastChannelActivityUpdated (BufferId id, const QDateTime &newTime)
void lastSpokenToUpdated (BufferId id, const QDateTime &newTime)
void initDone ()
void updatedRemotely ()
void updated ()

Public Member Functions

 IrcUser (const QString &hostmask, Network *network)
virtual ~IrcUser ()
QString user () const
QString host () const
QString nick () const
QString realName () const
QString hostmask () const
bool isAway () const
QString awayMessage () const
QDateTime idleTime ()
QDateTime loginTime () const
QString server () const
QString ircOperator () const
int lastAwayMessage () const
QString whoisServiceReply () const
QString suserHost () const
bool encrypted () const
Networknetwork () const
QString userModes () const
QStringList channels () const
QTextCodec * codecForEncoding () const
QTextCodec * codecForDecoding () const
void setCodecForEncoding (const QString &codecName)
void setCodecForEncoding (QTextCodec *codec)
void setCodecForDecoding (const QString &codecName)
void setCodecForDecoding (QTextCodec *codec)
QString decodeString (const QByteArray &text) const
QByteArray encodeString (const QString &string) const
QDateTime lastChannelActivity (BufferId id) const
void setLastChannelActivity (BufferId id, const QDateTime &time)
QDateTime lastSpokenTo (BufferId id) const
void setLastSpokenTo (BufferId id, const QDateTime &time)
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
virtual const QMetaObject * syncMetaObject () 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

QString user
QString host
QString nick
QString realName
bool away
QString awayMessage
QDateTime idleTime
QDateTime loginTime
QString server
QString ircOperator
int lastAwayMessage
QString whoisServiceReply
QString suserHost
bool encrypted
QStringList channels
QString userModes

Private Slots

void updateObjectName ()
void channelDestroyed ()

Private Member Functions

bool operator== (const IrcUser &ircuser2)
bool operator== (const QString &nickname)

Private Attributes

bool _initialized
QString _nick
QString _user
QString _host
QString _realName
QString _awayMessage
bool _away
QString _server
QDateTime _idleTime
QDateTime _idleTimeSet
QDateTime _loginTime
QString _ircOperator
int _lastAwayMessage
QString _whoisServiceReply
QString _suserHost
bool _encrypted
QSet< IrcChannel * > _channels
QString _userModes
Network_network
QTextCodec * _codecForEncoding
QTextCodec * _codecForDecoding
QHash< BufferId, QDateTime > _lastActivity
QHash< BufferId, QDateTime > _lastSpokenTo

Static Private Attributes

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

Detailed Description

Definition at line 37 of file ircuser.h.

Constructor & Destructor Documentation

IrcUser ( const QString &  hostmask,
Network network 
)

Definition at line 32 of file ircuser.cpp.

~IrcUser ( )
virtual

Definition at line 54 of file ircuser.cpp.

Member Function Documentation

QString user ( ) const
inline

Definition at line 64 of file ircuser.h.

References _user.

Referenced by hostmask(), setUser(), and updateHostmask().

QString host ( ) const
inline

Definition at line 65 of file ircuser.h.

References _host.

Referenced by hostmask(), setHost(), and updateHostmask().

QString nick ( ) const
inline

Definition at line 66 of file ircuser.h.

References _nick.

Referenced by hostmask(), and setNick().

QString realName ( ) const
inline

Definition at line 67 of file ircuser.h.

References _realName.

Referenced by setRealName().

QString awayMessage ( ) const
inline

Definition at line 70 of file ircuser.h.

References _awayMessage.

Referenced by setAwayMessage().

QDateTime idleTime ( )

Referenced by setIdleTime().

QDateTime loginTime ( ) const
inline

Definition at line 72 of file ircuser.h.

References _loginTime.

Referenced by setLoginTime().

QString server ( ) const
inline

Definition at line 73 of file ircuser.h.

References _server.

Referenced by setServer().

QString ircOperator ( ) const
inline

Definition at line 74 of file ircuser.h.

References _ircOperator.

Referenced by setIrcOperator().

int lastAwayMessage ( ) const
inline

Definition at line 75 of file ircuser.h.

References _lastAwayMessage.

Referenced by setLastAwayMessage().

QString whoisServiceReply ( ) const
inline

Definition at line 76 of file ircuser.h.

References _whoisServiceReply.

Referenced by setWhoisServiceReply().

QString suserHost ( ) const
inline

Definition at line 77 of file ircuser.h.

References _suserHost.

Referenced by setSuserHost().

bool encrypted ( ) const
inline

Definition at line 78 of file ircuser.h.

References _encrypted.

Referenced by setEncrypted().

QString userModes ( ) const
inline

Definition at line 81 of file ircuser.h.

References _userModes.

QStringList channels ( ) const

Referenced by quit().

QTextCodec* codecForEncoding ( ) const
inline

Definition at line 86 of file ircuser.h.

References _codecForEncoding.

Referenced by encodeString().

QTextCodec* codecForDecoding ( ) const
inline

Definition at line 87 of file ircuser.h.

References _codecForDecoding.

Referenced by decodeString().

void setCodecForEncoding ( const QString &  codecName)

Definition at line 88 of file ircuser.cpp.

void setCodecForEncoding ( QTextCodec *  codec)

Definition at line 94 of file ircuser.cpp.

References _codecForEncoding.

void setCodecForDecoding ( const QString &  codecName)

Definition at line 100 of file ircuser.cpp.

void setCodecForDecoding ( QTextCodec *  codec)

Definition at line 106 of file ircuser.cpp.

References _codecForDecoding.

QString decodeString ( const QByteArray &  text) const

Definition at line 112 of file ircuser.cpp.

References codecForDecoding(), Network::decodeString(), and network().

Referenced by CoreNetwork::userDecode().

QByteArray encodeString ( const QString &  string) const

Definition at line 119 of file ircuser.cpp.

References codecForEncoding(), Network::encodeString(), and network().

Referenced by CoreNetwork::userEncode().

QDateTime lastChannelActivity ( BufferId  id) const
inline

Definition at line 97 of file ircuser.h.

References _lastActivity.

Referenced by TabCompleter::CompletionKey::operator<().

void setLastChannelActivity ( BufferId  id,
const QDateTime &  time 
)

Definition at line 382 of file ircuser.cpp.

References _lastActivity, and lastChannelActivityUpdated().

Referenced by NetworkModel::updateBufferActivity().

QDateTime lastSpokenTo ( BufferId  id) const
inline

Definition at line 99 of file ircuser.h.

References _lastSpokenTo.

Referenced by TabCompleter::CompletionKey::operator<().

void setLastSpokenTo ( BufferId  id,
const QDateTime &  time 
)

Definition at line 389 of file ircuser.cpp.

References _lastSpokenTo, and lastSpokenToUpdated().

Referenced by ClientUserInputHandler::handleUserInput().

void setUser ( const QString &  user)
slot
void setHost ( const QString &  host)
slot
void setNick ( const QString &  nick)
slot

Definition at line 223 of file ircuser.cpp.

References _nick, ARG, nick(), nickSet(), SYNC, and updateObjectName().

Referenced by CoreSessionEventProcessor::lateProcessIrcEventNick().

void setRealName ( const QString &  realName)
slot
void setAwayMessage ( const QString &  awayMessage)
slot
void setIdleTime ( const QDateTime &  idleTime)
slot

Definition at line 168 of file ircuser.cpp.

References _idleTime, _idleTimeSet, ARG, idleTime(), and SYNC.

Referenced by CoreSessionEventProcessor::processIrcEvent317().

void setLoginTime ( const QDateTime &  loginTime)
slot

Definition at line 178 of file ircuser.cpp.

References _loginTime, ARG, loginTime(), and SYNC.

Referenced by CoreSessionEventProcessor::processIrcEvent317().

void setServer ( const QString &  server)
slot
void setIrcOperator ( const QString &  ircOperator)
slot

Definition at line 196 of file ircuser.cpp.

References _ircOperator, ARG, ircOperator(), and SYNC.

Referenced by CoreSessionEventProcessor::processIrcEvent313().

void setLastAwayMessage ( const int &  lastAwayMessage)
slot

Definition at line 205 of file ircuser.cpp.

References _lastAwayMessage, ARG, lastAwayMessage(), and SYNC.

Referenced by EventStringifier::processIrcEvent301().

void setWhoisServiceReply ( const QString &  whoisServiceReply)
slot

Definition at line 234 of file ircuser.cpp.

References _whoisServiceReply, ARG, SYNC, and whoisServiceReply().

Referenced by CoreSessionEventProcessor::processIrcEvent307().

void setSuserHost ( const QString &  suserHost)
slot

Definition at line 243 of file ircuser.cpp.

References _suserHost, ARG, suserHost(), and SYNC.

Referenced by CoreSessionEventProcessor::processIrcEvent310().

void setEncrypted ( bool  encrypted)
slot

Definition at line 252 of file ircuser.cpp.

References _encrypted, ARG, encrypted(), encryptedSet(), and SYNC.

void updateHostmask ( const QString &  mask)
slot

Definition at line 266 of file ircuser.cpp.

References host(), hostFromMask(), hostmask(), setHost(), setUser(), user(), and userFromMask().

Referenced by Network::updateNickFromMask().

void setUserModes ( const QString &  modes)
slot

Definition at line 346 of file ircuser.cpp.

References _userModes, ARG, SYNC, and userModesSet().

void joinChannel ( IrcChannel channel)
slot
void joinChannel ( const QString &  channelname)
slot

Definition at line 288 of file ircuser.cpp.

References joinChannel(), and network().

void partChannel ( const QString &  channelname)
slot

Definition at line 308 of file ircuser.cpp.

References Network::ircChannel(), network(), and partChannel().

void addUserModes ( const QString &  modes)
slot

Definition at line 354 of file ircuser.cpp.

References _userModes, ARG, SYNC, and userModesAdded().

Referenced by CoreSessionEventProcessor::processIrcEventMode().

void removeUserModes ( const QString &  modes)
slot

Definition at line 369 of file ircuser.cpp.

References _userModes, ARG, SYNC, and userModesRemoved().

Referenced by CoreSessionEventProcessor::processIrcEventMode().

void nickSet ( QString  newnick)
signal

Referenced by setNick().

void awaySet ( bool  away)
signal

Referenced by setAway().

void encryptedSet ( bool  encrypted)
signal

Referenced by setEncrypted().

void userModesSet ( QString  modes)
signal

Referenced by setUserModes().

void userModesAdded ( QString  modes)
signal

Referenced by addUserModes().

void userModesRemoved ( QString  modes)
signal

Referenced by removeUserModes().

void channelParted ( QString  channel)
signal
void quited ( )
signal

Referenced by quit().

void lastChannelActivityUpdated ( BufferId  id,
const QDateTime &  newTime 
)
signal

Referenced by setLastChannelActivity().

void lastSpokenToUpdated ( BufferId  id,
const QDateTime &  newTime 
)
signal

Referenced by setLastSpokenTo().

void updateObjectName ( )
privateslot

Definition at line 260 of file ircuser.cpp.

References _nick, network(), SyncableObject::renameObject(), and toInt().

Referenced by setNick().

void channelDestroyed ( )
privateslot

Definition at line 334 of file ircuser.cpp.

References _channels, Network::isMe(), network(), and quit().

bool operator== ( const IrcUser ircuser2)
inlineprivate

Definition at line 162 of file ircuser.h.

References _nick, and nick.

bool operator== ( const QString &  nickname)
inlineprivate

Definition at line 168 of file ircuser.h.

References _nick.

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 39 of file ircuser.h.

bool _initialized
private

Definition at line 174 of file ircuser.h.

QString _nick
private

Definition at line 176 of file ircuser.h.

Referenced by nick(), operator==(), setNick(), and updateObjectName().

QString _user
private

Definition at line 177 of file ircuser.h.

Referenced by setUser(), and user().

QString _host
private

Definition at line 178 of file ircuser.h.

Referenced by host(), and setHost().

QString _realName
private

Definition at line 179 of file ircuser.h.

Referenced by realName(), and setRealName().

QString _awayMessage
private

Definition at line 180 of file ircuser.h.

Referenced by awayMessage(), and setAwayMessage().

bool _away
private

Definition at line 181 of file ircuser.h.

Referenced by isAway(), and setAway().

QString _server
private

Definition at line 182 of file ircuser.h.

Referenced by server(), and setServer().

QDateTime _idleTime
private

Definition at line 183 of file ircuser.h.

Referenced by setIdleTime().

QDateTime _idleTimeSet
private

Definition at line 184 of file ircuser.h.

Referenced by setIdleTime().

QDateTime _loginTime
private

Definition at line 185 of file ircuser.h.

Referenced by loginTime(), and setLoginTime().

QString _ircOperator
private

Definition at line 186 of file ircuser.h.

Referenced by ircOperator(), and setIrcOperator().

int _lastAwayMessage
private

Definition at line 187 of file ircuser.h.

Referenced by lastAwayMessage(), and setLastAwayMessage().

QString _whoisServiceReply
private

Definition at line 188 of file ircuser.h.

Referenced by setWhoisServiceReply(), and whoisServiceReply().

QString _suserHost
private

Definition at line 189 of file ircuser.h.

Referenced by setSuserHost(), and suserHost().

bool _encrypted
private

Definition at line 190 of file ircuser.h.

Referenced by encrypted(), and setEncrypted().

QSet<IrcChannel *> _channels
private

Definition at line 193 of file ircuser.h.

Referenced by channelDestroyed(), joinChannel(), partChannel(), and quit().

QString _userModes
private

Definition at line 194 of file ircuser.h.

Referenced by addUserModes(), removeUserModes(), setUserModes(), and userModes().

Network* _network
private

Definition at line 196 of file ircuser.h.

Referenced by network().

QTextCodec* _codecForEncoding
private

Definition at line 198 of file ircuser.h.

Referenced by codecForEncoding(), and setCodecForEncoding().

QTextCodec* _codecForDecoding
private

Definition at line 199 of file ircuser.h.

Referenced by codecForDecoding(), and setCodecForDecoding().

QHash<BufferId, QDateTime> _lastActivity
private

Definition at line 201 of file ircuser.h.

Referenced by lastChannelActivity(), and setLastChannelActivity().

QHash<BufferId, QDateTime> _lastSpokenTo
private

Definition at line 202 of file ircuser.h.

Referenced by lastSpokenTo(), and setLastSpokenTo().

Property Documentation

QString user
readwrite
QString realName
readwrite
bool away
readwrite

Definition at line 46 of file ircuser.h.

Referenced by setAway().

QString awayMessage
readwrite

Definition at line 47 of file ircuser.h.

Referenced by CoreNetwork::disconnectFromIrc(), and QueryBufferItem::toolTip().

QDateTime idleTime
readwrite

Definition at line 48 of file ircuser.h.

Referenced by QueryBufferItem::toolTip().

QDateTime loginTime
readwrite

Definition at line 49 of file ircuser.h.

Referenced by QueryBufferItem::toolTip().

QString server
readwrite

Definition at line 50 of file ircuser.h.

Referenced by QueryBufferItem::toolTip().

QString ircOperator
readwrite

Definition at line 51 of file ircuser.h.

Referenced by QueryBufferItem::toolTip().

int lastAwayMessage
readwrite

Definition at line 52 of file ircuser.h.

Referenced by EventStringifier::processIrcEvent301().

QString whoisServiceReply
readwrite

Definition at line 53 of file ircuser.h.

Referenced by QueryBufferItem::toolTip().

QString suserHost
readwrite

Definition at line 54 of file ircuser.h.

Referenced by QueryBufferItem::toolTip().

bool encrypted
readwrite

Definition at line 55 of file ircuser.h.

Referenced by InputWidget::dataChanged().


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