29 #ifndef IRCBUFFERMODEL_H
30 #define IRCBUFFERMODEL_H
34 #include <QtCore/qstringlist.h>
35 #include <QtCore/qabstractitemmodel.h>
44 class IrcBufferModelPrivate;
49 Q_PROPERTY(
int count READ count NOTIFY countChanged)
50 Q_PROPERTY(
bool empty READ isEmpty NOTIFY emptyChanged)
51 Q_PROPERTY(Qt::SortOrder sortOrder READ sortOrder WRITE setSortOrder)
52 Q_PROPERTY(Irc::
SortMethod sortMethod READ sortMethod WRITE setSortMethod)
53 Q_PROPERTY(
QStringList channels READ channels NOTIFY channelsChanged)
54 Q_PROPERTY(Irc::
DataRole displayRole READ displayRole WRITE setDisplayRole)
55 Q_PROPERTY(
bool persistent READ isPersistent WRITE setPersistent NOTIFY persistentChanged)
57 Q_PROPERTY(
IrcConnection* connection READ connection WRITE setConnection NOTIFY connectionChanged)
58 Q_PROPERTY(
IrcNetwork* network READ network NOTIFY networkChanged)
59 Q_PROPERTY(
IrcBuffer* bufferPrototype READ bufferPrototype WRITE setBufferPrototype NOTIFY bufferPrototypeChanged)
60 Q_PROPERTY(
IrcChannel* channelPrototype READ channelPrototype WRITE setChannelPrototype NOTIFY channelPrototypeChanged)
61 Q_PROPERTY(
int joinDelay READ joinDelay WRITE setJoinDelay NOTIFY joinDelayChanged)
76 Q_INVOKABLE
IrcBuffer* get(
int index) const;
78 Q_INVOKABLE
bool contains(const
QString& title) const;
79 Q_INVOKABLE
int indexOf(
IrcBuffer* buffer) const;
83 Q_INVOKABLE
void remove(const
QString& title);
84 Q_INVOKABLE
void remove(
IrcBuffer* buffer);
86 Qt::SortOrder sortOrder() const;
87 void setSortOrder(Qt::SortOrder order);
93 void setDisplayRole(Irc::
DataRole role);
95 bool isPersistent() const;
96 void setPersistent(
bool persistent);
107 void setBufferPrototype(
IrcBuffer* prototype);
110 void setChannelPrototype(
IrcChannel* prototype);
112 int joinDelay() const;
113 void setJoinDelay(
int delay);
121 void sort(
int column = 0, Qt::SortOrder order = Qt::AscendingOrder);
122 void sort(Irc::
SortMethod method, Qt::SortOrder order = Qt::AscendingOrder);
125 void countChanged(
int count);
126 void emptyChanged(
bool empty);
130 void aboutToBeRemoved(
IrcBuffer* buffer);
131 void persistentChanged(
bool persistent);
137 void bufferPrototypeChanged(
IrcBuffer* prototype);
138 void channelPrototypeChanged(
IrcChannel* prototype);
139 void destroyed(IrcBufferModel* model);
140 void joinDelayChanged(
int delay);
150 friend class IrcBufferLessThan;
151 friend class IrcBufferGreaterThan;
153 Q_DECLARE_PRIVATE(IrcBufferModel)
154 Q_DISABLE_COPY(IrcBufferModel)
156 Q_PRIVATE_SLOT(d_func(),
void _irc_connected())
157 Q_PRIVATE_SLOT(d_func(),
void _irc_disconnected())
158 Q_PRIVATE_SLOT(d_func(),
void _irc_bufferDestroyed(
IrcBuffer*))
159 Q_PRIVATE_SLOT(d_func(),
void _irc_restoreBuffers())
164 #endif // IRCBUFFERMODEL_H
DataRole
Definition: irc.h:82
Provides means to establish a connection to an IRC server.
Definition: ircconnection.h:48
Provides network information and capability management.
Definition: ircnetwork.h:43
Q_INVOKABLE QString version()
Definition: irc.cpp:56
Keeps track of buffer status.
Definition: ircbuffer.h:49
Keeps track of channel status.
Definition: ircchannel.h:40
Keeps track of buffers.
Definition: ircbuffermodel.h:46
The base class of all messages.
Definition: ircmessage.h:47
SortMethod
Definition: irc.h:92