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)
62 Q_PROPERTY(
bool monitorEnabled READ isMonitorEnabled WRITE setMonitorEnabled NOTIFY monitorEnabledChanged)
77 Q_INVOKABLE
IrcBuffer* get(
int index) const;
79 Q_INVOKABLE
bool contains(const
QString& title) const;
80 Q_INVOKABLE
int indexOf(
IrcBuffer* buffer) const;
84 Q_INVOKABLE
void remove(const
QString& title);
85 Q_INVOKABLE
void remove(
IrcBuffer* buffer);
87 Qt::SortOrder sortOrder() const;
88 void setSortOrder(
Qt::SortOrder order);
96 bool isPersistent() const;
97 void setPersistent(
bool persistent);
108 void setBufferPrototype(
IrcBuffer* prototype);
111 void setChannelPrototype(
IrcChannel* prototype);
113 int joinDelay() const;
114 void setJoinDelay(
int delay);
116 bool isMonitorEnabled() const;
117 void setMonitorEnabled(
bool enabled);
125 void sort(
int column = 0,
Qt::SortOrder order =
Qt::AscendingOrder);
129 void countChanged(
int count);
130 void emptyChanged(
bool empty);
134 void aboutToBeRemoved(
IrcBuffer* buffer);
135 void persistentChanged(
bool persistent);
141 void bufferPrototypeChanged(
IrcBuffer* prototype);
142 void channelPrototypeChanged(
IrcChannel* prototype);
143 void destroyed(IrcBufferModel* model);
144 void joinDelayChanged(
int delay);
145 void monitorEnabledChanged(
bool enabled);
155 friend class IrcBufferLessThan;
156 friend class IrcBufferGreaterThan;
158 Q_DECLARE_PRIVATE(IrcBufferModel)
159 Q_DISABLE_COPY(IrcBufferModel)
161 Q_PRIVATE_SLOT(d_func(),
void _irc_connected())
162 Q_PRIVATE_SLOT(d_func(),
void _irc_disconnected())
163 Q_PRIVATE_SLOT(d_func(),
void _irc_bufferDestroyed(
IrcBuffer*))
164 Q_PRIVATE_SLOT(d_func(),
void _irc_restoreBuffers())
165 Q_PRIVATE_SLOT(d_func(),
void _irc_monitorStatus())
170 #endif // IRCBUFFERMODEL_H
DataRole
Definition: irc.h:82
Miscellaneous identifiers used throughout the library.
Definition: irc.h:40
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