34 #include <QtCore/qobject.h>
35 #include <QtCore/qvariant.h>
36 #include <QtCore/qmetatype.h>
37 #include <QtCore/qscopedpointer.h>
47 class IrcBufferPrivate;
52 Q_PROPERTY(QString title READ title NOTIFY titleChanged)
53 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
54 Q_PROPERTY(QString prefix READ prefix WRITE setPrefix NOTIFY prefixChanged)
55 Q_PROPERTY(
IrcConnection* connection READ connection CONSTANT)
56 Q_PROPERTY(
IrcNetwork* network READ network CONSTANT)
58 Q_PROPERTY(
bool active READ isActive NOTIFY activeChanged)
59 Q_PROPERTY(
bool channel READ isChannel CONSTANT)
60 Q_PROPERTY(
bool sticky READ isSticky WRITE setSticky NOTIFY stickyChanged)
61 Q_PROPERTY(
bool persistent READ isPersistent WRITE setPersistent NOTIFY persistentChanged)
62 Q_PROPERTY(QVariantMap userData READ userData WRITE setUserData NOTIFY userDataChanged)
73 Q_INVOKABLE
explicit IrcBuffer(QObject* parent =
nullptr);
76 QString title()
const;
78 QString prefix()
const;
80 bool isChannel()
const;
87 virtual bool isActive()
const;
89 bool isSticky()
const;
90 void setSticky(
bool sticky);
92 bool isPersistent()
const;
93 void setPersistent(
bool persistent);
95 QVariantMap userData()
const;
96 void setUserData(
const QVariantMap& data);
98 Q_INVOKABLE
bool sendCommand(
IrcCommand* command);
100 virtual IrcBuffer *clone(QObject* parent =
nullptr);
103 void setName(
const QString& name);
104 void setPrefix(
const QString& prefix);
106 virtual void close(
const QString& reason = QString());
109 void titleChanged(
const QString& title);
110 void nameChanged(
const QString& name);
111 void prefixChanged(
const QString& name);
114 void activeChanged(
bool active);
115 void stickyChanged(
bool sticky);
116 void persistentChanged(
bool persistent);
117 void userDataChanged(
const QVariantMap& data);
120 IrcBuffer(IrcBufferPrivate& dd, QObject* parent);
122 QScopedPointer<IrcBufferPrivate> d_ptr;
127 #ifndef QT_NO_DEBUG_STREAM
128 IRC_MODEL_EXPORT QDebug operator<<(QDebug debug,
const IrcBuffer* buffer);
133 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(
IrcBuffer*))
134 Q_DECLARE_METATYPE(QList<IRC_PREPEND_NAMESPACE(
IrcBuffer*)>)
Keeps track of buffers.
Definition: ircbuffermodel.h:48
Keeps track of buffer status.
Definition: ircbuffer.h:50
void messageReceived(IrcMessage *message)
Keeps track of channel status.
Definition: ircchannel.h:41
Provides the most common commands.
Definition: irccommand.h:45
Provides means to establish a connection to an IRC server.
Definition: ircconnection.h:49
The base class of all messages.
Definition: ircmessage.h:48
Provides network information and capability management.
Definition: ircnetwork.h:44