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

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

Inheritance diagram for IrcChannel:
Collaboration diagram for IrcChannel:

Public Slots

void setTopic (const QString &topic)
void setPassword (const QString &password)
void setEncrypted (bool encrypted)
void joinIrcUsers (const QList< IrcUser * > &users, const QStringList &modes)
void joinIrcUsers (const QStringList &nicks, const QStringList &modes)
void joinIrcUser (IrcUser *ircuser)
void part (IrcUser *ircuser)
void part (const QString &nick)
void setUserModes (IrcUser *ircuser, const QString &modes)
void setUserModes (const QString &nick, const QString &modes)
void addUserMode (IrcUser *ircuser, const QString &mode)
void addUserMode (const QString &nick, const QString &mode)
void removeUserMode (IrcUser *ircuser, const QString &mode)
void removeUserMode (const QString &nick, const QString &mode)
void addChannelMode (const QChar &mode, const QString &value)
void removeChannelMode (const QChar &mode, const QString &value)
QVariantMap initUserModes () const
QVariantMap initChanModes () const
void initSetUserModes (const QVariantMap &usermodes)
void initSetChanModes (const QVariantMap &chanModes)
virtual void setInitialized ()
void requestUpdate (const QVariantMap &properties)
virtual void update (const QVariantMap &properties)

Signals

void topicSet (const QString &topic)
void encryptedSet (bool encrypted)
void ircUsersJoined (QList< IrcUser * > ircusers)
void ircUserParted (IrcUser *ircuser)
void ircUserNickSet (IrcUser *ircuser, QString nick)
void ircUserModeAdded (IrcUser *ircuser, QString mode)
void ircUserModeRemoved (IrcUser *ircuser, QString mode)
void ircUserModesSet (IrcUser *ircuser, QString modes)
void parted ()
void initDone ()
void updatedRemotely ()
void updated ()

Public Member Functions

 IrcChannel (const QString &channelname, Network *network)
 ~IrcChannel ()
bool isKnownUser (IrcUser *ircuser) const
bool isValidChannelUserMode (const QString &mode) const
QString name () const
QString topic () const
QString password () const
bool encrypted () const
Networknetwork () const
QList< IrcUser * > ircUsers () const
QString userModes (IrcUser *ircuser) const
QString userModes (const QString &nick) const
bool hasMode (const QChar &mode) const
QString modeValue (const QChar &mode) const
QStringList modeValueList (const QChar &mode) const
QString channelModeString () 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
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 name
QString topic
QString password
bool encrypted

Private Slots

void ircUserDestroyed ()
void ircUserNickSet (QString nick)

Private Attributes

bool _initialized
QString _name
QString _topic
QString _password
bool _encrypted
QHash< IrcUser *, QString > _userModes
Network_network
QTextCodec * _codecForEncoding
QTextCodec * _codecForDecoding
QHash< QChar, QStringList > _A_channelModes
QHash< QChar, QString > _B_channelModes
QHash< QChar, QString > _C_channelModes
QSet< QChar > _D_channelModes

Static Private Attributes

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

Detailed Description

Definition at line 35 of file ircchannel.h.

Constructor & Destructor Documentation

IrcChannel ( const QString &  channelname,
Network network 
)

Definition at line 34 of file ircchannel.cpp.

~IrcChannel ( )

Definition at line 48 of file ircchannel.cpp.

Member Function Documentation

bool isKnownUser ( IrcUser ircuser) const

Definition at line 56 of file ircchannel.cpp.

References _userModes, name(), and IrcUser::nick.

Referenced by addUserMode(), part(), removeUserMode(), and setUserModes().

bool isValidChannelUserMode ( const QString &  mode) const

Definition at line 72 of file ircchannel.cpp.

References name().

Referenced by addUserMode(), and removeUserMode().

QString name ( ) const
inline

Definition at line 52 of file ircchannel.h.

References _name.

Referenced by isKnownUser(), and isValidChannelUserMode().

QString topic ( ) const
inline

Definition at line 53 of file ircchannel.h.

References _topic.

Referenced by setTopic().

QString password ( ) const
inline

Definition at line 54 of file ircchannel.h.

References _password.

Referenced by setPassword().

bool encrypted ( ) const
inline

Definition at line 55 of file ircchannel.h.

References _encrypted.

Referenced by setEncrypted().

QList<IrcUser *> ircUsers ( ) const
inline
QString userModes ( IrcUser ircuser) const
QString userModes ( const QString &  nick) const

Definition at line 92 of file ircchannel.cpp.

References network(), and userModes().

QString modeValue ( const QChar &  mode) const
QStringList modeValueList ( const QChar &  mode) const
QString channelModeString ( ) const

Definition at line 591 of file ircchannel.cpp.

References _B_channelModes, _C_channelModes, and _D_channelModes.

Referenced by ChannelBufferItem::toolTip().

QTextCodec* codecForEncoding ( ) const
inline

Definition at line 68 of file ircchannel.h.

References _codecForEncoding.

Referenced by encodeString().

QTextCodec* codecForDecoding ( ) const
inline

Definition at line 69 of file ircchannel.h.

References _codecForDecoding.

Referenced by decodeString().

void setCodecForEncoding ( const QString &  codecName)

Definition at line 98 of file ircchannel.cpp.

void setCodecForEncoding ( QTextCodec *  codec)

Definition at line 104 of file ircchannel.cpp.

References _codecForEncoding.

void setCodecForDecoding ( const QString &  codecName)

Definition at line 110 of file ircchannel.cpp.

void setCodecForDecoding ( QTextCodec *  codec)

Definition at line 116 of file ircchannel.cpp.

References _codecForDecoding.

QString decodeString ( const QByteArray &  text) const
QByteArray encodeString ( const QString &  string) const
void setPassword ( const QString &  password)
slot

Definition at line 149 of file ircchannel.cpp.

References _password, ARG, password(), and SYNC.

void setEncrypted ( bool  encrypted)
slot

Definition at line 155 of file ircchannel.cpp.

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

void joinIrcUsers ( const QStringList &  nicks,
const QStringList &  modes 
)
slot

Definition at line 206 of file ircchannel.cpp.

References joinIrcUsers(), network(), and Network::newIrcUser().

void joinIrcUser ( IrcUser ircuser)
slot

Definition at line 215 of file ircchannel.cpp.

References joinIrcUsers().

Referenced by IrcUser::joinChannel().

void part ( IrcUser ircuser)
slot
void part ( const QString &  nick)
slot

Definition at line 251 of file ircchannel.cpp.

References network(), and part().

void setUserModes ( IrcUser ircuser,
const QString &  modes 
)
slot

Definition at line 258 of file ircchannel.cpp.

References _userModes, ARG, ircUserModesSet(), isKnownUser(), IrcUser::nick, and SYNC_OTHER.

Referenced by setUserModes().

void setUserModes ( const QString &  nick,
const QString &  modes 
)
slot

Definition at line 269 of file ircchannel.cpp.

References network(), and setUserModes().

void addUserMode ( IrcUser ircuser,
const QString &  mode 
)
slot
void addUserMode ( const QString &  nick,
const QString &  mode 
)
slot

Definition at line 290 of file ircchannel.cpp.

References addUserMode(), and network().

void removeUserMode ( IrcUser ircuser,
const QString &  mode 
)
slot
void removeUserMode ( const QString &  nick,
const QString &  mode 
)
slot

Definition at line 311 of file ircchannel.cpp.

References network(), and removeUserMode().

QVariantMap initUserModes ( ) const
slot

Definition at line 318 of file ircchannel.cpp.

References _userModes.

QVariantMap initChanModes ( ) const
slot

Definition at line 344 of file ircchannel.cpp.

References _A_channelModes, _B_channelModes, _C_channelModes, and _D_channelModes.

void initSetUserModes ( const QVariantMap &  usermodes)
slot

Definition at line 330 of file ircchannel.cpp.

References joinIrcUsers(), network(), and Network::newIrcUser().

void initSetChanModes ( const QVariantMap &  chanModes)
slot

Definition at line 384 of file ircchannel.cpp.

References _A_channelModes, _B_channelModes, _C_channelModes, and _D_channelModes.

void topicSet ( const QString &  topic)
signal

Referenced by setTopic().

void encryptedSet ( bool  encrypted)
signal

Referenced by setEncrypted().

void ircUsersJoined ( QList< IrcUser * >  ircusers)
signal

Referenced by joinIrcUsers().

void ircUserParted ( IrcUser ircuser)
signal

Referenced by part().

void ircUserNickSet ( IrcUser ircuser,
QString  nick 
)
signal

Referenced by ircUserNickSet(), and joinIrcUsers().

void ircUserModeAdded ( IrcUser ircuser,
QString  mode 
)
signal

Referenced by addUserMode().

void ircUserModeRemoved ( IrcUser ircuser,
QString  mode 
)
signal

Referenced by removeUserMode().

void ircUserModesSet ( IrcUser ircuser,
QString  modes 
)
signal

Referenced by setUserModes().

void parted ( )
signal

Referenced by part().

void ircUserDestroyed ( )
privateslot

Definition at line 414 of file ircchannel.cpp.

References _userModes.

void ircUserNickSet ( QString  nick)
privateslot

Definition at line 424 of file ircchannel.cpp.

References ircUserNickSet().

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 37 of file ircchannel.h.

bool _initialized
private

Definition at line 135 of file ircchannel.h.

QString _name
private

Definition at line 136 of file ircchannel.h.

Referenced by name().

QString _topic
private

Definition at line 137 of file ircchannel.h.

Referenced by setTopic(), and topic().

QString _password
private

Definition at line 138 of file ircchannel.h.

Referenced by password(), and setPassword().

bool _encrypted
private

Definition at line 139 of file ircchannel.h.

Referenced by encrypted(), and setEncrypted().

QHash<IrcUser *, QString> _userModes
private
Network* _network
private

Definition at line 143 of file ircchannel.h.

Referenced by network().

QTextCodec* _codecForEncoding
private

Definition at line 145 of file ircchannel.h.

Referenced by codecForEncoding(), encodeString(), and setCodecForEncoding().

QTextCodec* _codecForDecoding
private

Definition at line 146 of file ircchannel.h.

Referenced by codecForDecoding(), decodeString(), and setCodecForDecoding().

QHash<QChar, QStringList> _A_channelModes
private
QHash<QChar, QString> _B_channelModes
private
QHash<QChar, QString> _C_channelModes
private
QSet<QChar> _D_channelModes
private

Property Documentation

QString topic
readwrite

Definition at line 41 of file ircchannel.h.

Referenced by ChannelBufferItem::topic().

QString password
readwrite

Definition at line 42 of file ircchannel.h.

bool encrypted
readwrite

Definition at line 43 of file ircchannel.h.

Referenced by InputWidget::dataChanged().


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