X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fnetworkmodel.h;h=9359ad39d731cfb8f8420500439e2f3f3eeec6eb;hp=8dceb5a485b0cbb5b1681e99bb327dfc2efc1e20;hb=cb6520b432302dc6579a8e99cb9cd249a6effb9d;hpb=e8a5c49548759045b49c208c250c6f61c7fdfcd5 diff --git a/src/client/networkmodel.h b/src/client/networkmodel.h index 8dceb5a4..9359ad39 100644 --- a/src/client/networkmodel.h +++ b/src/client/networkmodel.h @@ -40,6 +40,43 @@ class QAbstractItemView; class Network; class IrcChannel; +/***************************************** + * Network Items + *****************************************/ +class NetworkItem : public PropertyMapItem { + Q_OBJECT + Q_PROPERTY(QString networkName READ networkName) + Q_PROPERTY(QString currentServer READ currentServer) + Q_PROPERTY(int nickCount READ nickCount) + +public: + NetworkItem(const NetworkId &netid, AbstractTreeItem *parent = 0); + + virtual quint64 id() const; + virtual QVariant data(int column, int row) const; + + bool isActive() const; + + inline const NetworkId &networkId() const { return _networkId; } + QString networkName() const; + QString currentServer() const; + int nickCount() const; + + virtual QString toolTip(int column) const; + +public slots: + void setNetworkName(const QString &networkName); + void setCurrentServer(const QString &serverName); + + void attachNetwork(Network *network); + void attachIrcChannel(const QString &channelName); + +private: + NetworkId _networkId; + + QPointer _network; +}; + /***************************************** * Fancy Buffer Items *****************************************/ @@ -103,44 +140,6 @@ private: IrcChannel *_ircChannel; }; - -/***************************************** - * Network Items - *****************************************/ -class NetworkItem : public PropertyMapItem { - Q_OBJECT - Q_PROPERTY(QString networkName READ networkName) - Q_PROPERTY(QString currentServer READ currentServer) - Q_PROPERTY(int nickCount READ nickCount) - -public: - NetworkItem(const NetworkId &netid, AbstractTreeItem *parent = 0); - - virtual quint64 id() const; - virtual QVariant data(int column, int row) const; - - bool isActive() const; - - inline const NetworkId &networkId() const { return _networkId; } - QString networkName() const; - QString currentServer() const; - int nickCount() const; - - virtual QString toolTip(int column) const; - -public slots: - void setNetworkName(const QString &networkName); - void setCurrentServer(const QString &serverName); - - void attachNetwork(Network *network); - void attachIrcChannel(const QString &channelName); - -private: - NetworkId _networkId; - - QPointer _network; -}; - /***************************************** * User Category Items (like @vh etc.) *****************************************/