15 #ifndef IRCUSERMODEL_H
16 #define IRCUSERMODEL_H
20 #include <QtCore/qstringlist.h>
21 #include <QtCore/qabstractitemmodel.h>
28 class IrcUserModelPrivate;
33 Q_PROPERTY(
int count READ count NOTIFY countChanged)
36 Q_PROPERTY(Irc::
DataRole displayRole READ displayRole WRITE setDisplayRole)
37 Q_PROPERTY(
IrcChannel* channel READ channel WRITE setChannel NOTIFY channelChanged)
38 Q_PROPERTY(Irc::
SortMethod sortMethod READ sortMethod WRITE setSortMethod)
39 Q_PROPERTY(Qt::SortOrder sortOrder READ sortOrder WRITE setSortOrder)
51 Q_INVOKABLE
IrcUser* get(
int index) const;
53 Q_INVOKABLE
bool contains(const
QString& name) const;
54 Q_INVOKABLE
int indexOf(
IrcUser* user) const;
57 void setDisplayRole(Irc::
DataRole role);
62 Qt::SortOrder sortOrder() const;
63 void setSortOrder(Qt::SortOrder order);
75 void sort(
int column = 0, Qt::SortOrder order = Qt::AscendingOrder);
76 void sort(Irc::
SortMethod method, Qt::SortOrder order = Qt::AscendingOrder);
81 void aboutToBeAdded(
IrcUser* user);
82 void aboutToBeRemoved(
IrcUser* user);
83 void countChanged(
int count);
92 friend class IrcUserLessThan;
93 friend class IrcChannelPrivate;
94 friend class IrcUserGreaterThan;
96 Q_DECLARE_PRIVATE(IrcUserModel)
97 Q_DISABLE_COPY(IrcUserModel)
102 #endif // IRCUSERMODEL_H
Keeps track of channel status.
Definition: ircchannel.h:26
Keeps track of user status on a channel.
Definition: ircuser.h:28
SortMethod
Definition: irc.h:78
Keeps track of channel users.
Definition: ircusermodel.h:30
The base class of all messages.
Definition: ircmessage.h:32
DataRole
Definition: irc.h:68