15 #ifndef IRCBUFFERMODEL_H
16 #define IRCBUFFERMODEL_H
20 #include <QtCore/qstringlist.h>
21 #include <QtCore/qabstractitemmodel.h>
30 class IrcBufferModelPrivate;
35 Q_PROPERTY(
int count READ count NOTIFY countChanged)
36 Q_PROPERTY(Qt::SortOrder sortOrder READ sortOrder WRITE setSortOrder)
37 Q_PROPERTY(Irc::
SortMethod sortMethod READ sortMethod WRITE setSortMethod)
38 Q_PROPERTY(
QStringList channels READ channels NOTIFY channelsChanged)
39 Q_PROPERTY(Irc::
DataRole displayRole READ displayRole WRITE setDisplayRole)
41 Q_PROPERTY(
IrcConnection* connection READ connection WRITE setConnection NOTIFY connectionChanged)
42 Q_PROPERTY(
IrcNetwork* network READ network NOTIFY networkChanged)
43 Q_PROPERTY(
IrcBuffer* bufferPrototype READ bufferPrototype WRITE setBufferPrototype NOTIFY bufferPrototypeChanged)
44 Q_PROPERTY(
IrcChannel* channelPrototype READ channelPrototype WRITE setChannelPrototype NOTIFY channelPrototypeChanged)
58 Q_INVOKABLE
IrcBuffer* get(
int index) const;
60 Q_INVOKABLE
bool contains(const
QString& title) const;
61 Q_INVOKABLE
int indexOf(
IrcBuffer* buffer) const;
65 Q_INVOKABLE
void remove(const
QString& title);
66 Q_INVOKABLE
void remove(
IrcBuffer* buffer);
68 Qt::SortOrder sortOrder() const;
69 void setSortOrder(Qt::SortOrder order);
75 void setDisplayRole(Irc::
DataRole role);
86 void setBufferPrototype(
IrcBuffer* prototype);
89 void setChannelPrototype(
IrcChannel* prototype);
93 void sort(
int column = 0, Qt::SortOrder order = Qt::AscendingOrder);
94 void sort(Irc::
SortMethod method, Qt::SortOrder order = Qt::AscendingOrder);
97 void countChanged(
int count);
101 void aboutToBeRemoved(
IrcBuffer* buffer);
107 void bufferPrototypeChanged(
IrcBuffer* prototype);
108 void channelPrototypeChanged(
IrcChannel* prototype);
118 friend class IrcBufferLessThan;
119 friend class IrcBufferGreaterThan;
121 Q_DECLARE_PRIVATE(IrcBufferModel)
122 Q_DISABLE_COPY(IrcBufferModel)
124 Q_PRIVATE_SLOT(d_func(),
void _irc_connectionStatusChanged())
125 Q_PRIVATE_SLOT(d_func(),
void _irc_bufferDestroyed(
IrcBuffer*))
130 #endif // IRCBUFFERMODEL_H
Keeps track of channel status.
Definition: ircchannel.h:26
SortMethod
Definition: irc.h:78
Keeps track of buffer status.
Definition: ircbuffer.h:34
Provides means to establish a connection to an IRC server.
Definition: ircconnection.h:32
The base class of all messages.
Definition: ircmessage.h:32
DataRole
Definition: irc.h:68
Keeps track of buffers.
Definition: ircbuffermodel.h:32
Provides network information and capability management.
Definition: ircnetwork.h:29