Communi  3.0.0
A cross-platform IRC framework written with Qt
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Macros Groups Pages
ircchannel.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2008-2013 The Communi Project
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 * License for more details.
13 */
14 
15 #ifndef IRCCHANNEL_H
16 #define IRCCHANNEL_H
17 
18 #include <IrcGlobal>
19 #include <IrcBuffer>
20 #include <QtCore/qmetatype.h>
21 
22 IRC_BEGIN_NAMESPACE
23 
24 class IrcChannelPrivate;
25 
26 class IRC_MODEL_EXPORT IrcChannel : public IrcBuffer
27 {
28  Q_OBJECT
29  Q_PROPERTY(QString mode READ mode NOTIFY modeChanged)
30  Q_PROPERTY(QString topic READ topic NOTIFY topicChanged)
31 
32 public:
33  Q_INVOKABLE explicit IrcChannel(QObject* parent = 0);
34  virtual ~IrcChannel();
35 
36  QString mode() const;
37  QString topic() const;
38 
39  virtual bool isActive() const;
40 
41 public Q_SLOTS:
42  void part(const QString& reason = QString());
43 
44 Q_SIGNALS:
45  void modeChanged(const QString& mode);
46  void topicChanged(const QString& topic);
47 
48 private:
49  Q_DECLARE_PRIVATE(IrcChannel)
50  Q_DISABLE_COPY(IrcChannel)
51 };
52 
53 #ifndef QT_NO_DEBUG_STREAM
54 IRC_MODEL_EXPORT QDebug operator<<(QDebug debug, const IrcChannel* channel);
55 #endif // QT_NO_DEBUG_STREAM
56 
57 IRC_END_NAMESPACE
58 
59 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcChannel*))
60 Q_DECLARE_METATYPE(QList<IRC_PREPEND_NAMESPACE(IrcChannel*)>)
61 
62 #endif // IRCCHANNEL
Keeps track of channel status.
Definition: ircchannel.h:26
Keeps track of buffer status.
Definition: ircbuffer.h:34