X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircchannel.h;h=bcb6f59e30d42e5971d3a4e38ee953d32fdec7dd;hp=c0ee07058d78744392971bdb24a30a48ff01900c;hb=6eefdfc697067d184a589fc8a231b16316c09106;hpb=4a5065255e652dd0c301bac0db41b7afb777ef49 diff --git a/src/common/ircchannel.h b/src/common/ircchannel.h index c0ee0705..bcb6f59e 100644 --- a/src/common/ircchannel.h +++ b/src/common/ircchannel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,8 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef IRCCHANNEL_H -#define IRCCHANNEL_H +#pragma once + +#include "common-export.h" #include #include @@ -32,18 +33,18 @@ class IrcUser; class Network; -class IrcChannel : public SyncableObject +class COMMON_EXPORT IrcChannel : public SyncableObject { - SYNCABLE_OBJECT Q_OBJECT + SYNCABLE_OBJECT - Q_PROPERTY(QString name READ name STORED false) - Q_PROPERTY(QString topic READ topic WRITE setTopic STORED false) - Q_PROPERTY(QString password READ password WRITE setPassword STORED false) + Q_PROPERTY(QString name READ name) + Q_PROPERTY(QString topic READ topic WRITE setTopic) + Q_PROPERTY(QString password READ password WRITE setPassword) + Q_PROPERTY(bool encrypted READ encrypted WRITE setEncrypted) public : - IrcChannel(const QString &channelname, Network *network); - ~IrcChannel(); + IrcChannel(const QString &channelname, Network *network); bool isKnownUser(IrcUser *ircuser) const; bool isValidChannelUserMode(const QString &mode) const; @@ -51,6 +52,7 @@ public : inline QString name() const { return _name; } inline QString topic() const { return _topic; } inline QString password() const { return _password; } + inline bool encrypted() const { return _encrypted; } inline Network *network() const { return _network; } inline QList ircUsers() const { return _userModes.keys(); } @@ -76,6 +78,7 @@ public : public slots: void setTopic(const QString &topic); void setPassword(const QString &password); + void setEncrypted(bool encrypted); void joinIrcUsers(const QList &users, const QStringList &modes); void joinIrcUsers(const QStringList &nicks, const QStringList &modes); @@ -106,6 +109,7 @@ public slots: signals: void topicSet(const QString &topic); // needed by NetworkModel + void encryptedSet(bool encrypted); // void passwordSet(const QString &password); // void userModesSet(QString nick, QString modes); // void userModeAdded(QString nick, QString mode); @@ -113,7 +117,7 @@ signals: // void channelModeAdded(const QChar &mode, const QString &value); // void channelModeRemoved(const QChar &mode, const QString &value); - void ircUsersJoined(QList ircusers); + void ircUsersJoined(const QList &ircusers); // void ircUsersJoined(QStringList nicks, QStringList modes); void ircUserParted(IrcUser *ircuser); void ircUserNickSet(IrcUser *ircuser, QString nick); @@ -132,6 +136,7 @@ private: QString _name; QString _topic; QString _password; + bool _encrypted; QHash _userModes; @@ -145,6 +150,3 @@ private: QHash _C_channelModes; QSet _D_channelModes; }; - - -#endif