29 #ifndef IRCUSERMODEL_H 30 #define IRCUSERMODEL_H 34 #include <QtCore/qmetatype.h> 35 #include <QtCore/qstringlist.h> 36 #include <QtCore/qabstractitemmodel.h> 43 class IrcUserModelPrivate;
48 Q_PROPERTY(
int count READ count NOTIFY countChanged)
49 Q_PROPERTY(
bool empty READ isEmpty NOTIFY emptyChanged)
51 Q_PROPERTY(
QStringList titles READ titles NOTIFY titlesChanged)
53 Q_PROPERTY(
Irc::DataRole displayRole READ displayRole WRITE setDisplayRole)
54 Q_PROPERTY(
IrcChannel* channel READ channel WRITE setChannel NOTIFY channelChanged)
55 Q_PROPERTY(
Irc::SortMethod sortMethod READ sortMethod WRITE setSortMethod)
56 Q_PROPERTY(
Qt::SortOrder sortOrder READ sortOrder WRITE setSortOrder)
70 Q_INVOKABLE
IrcUser* get(
int index) const;
72 Q_INVOKABLE
bool contains(const
QString& name) const;
73 Q_INVOKABLE
int indexOf(
IrcUser* user) const;
75 Irc::DataRole displayRole() const;
76 void setDisplayRole(
Irc::DataRole role);
78 Irc::SortMethod sortMethod() const;
79 void setSortMethod(
Irc::SortMethod method);
81 Qt::SortOrder sortOrder() const;
82 void setSortOrder(
Qt::SortOrder order);
94 void sort(
int column = 0,
Qt::SortOrder order =
Qt::AscendingOrder);
95 void sort(
Irc::SortMethod method,
Qt::SortOrder order =
Qt::AscendingOrder);
100 void aboutToBeAdded(
IrcUser* user);
101 void aboutToBeRemoved(
IrcUser* user);
102 void countChanged(
int count);
103 void emptyChanged(
bool empty);
110 virtual
bool lessThan(
IrcUser* one,
IrcUser* another,
Irc::SortMethod method) const;
113 friend class IrcUserLessThan;
114 friend class IrcChannelPrivate;
115 friend class IrcUserGreaterThan;
117 Q_DECLARE_PRIVATE(IrcUserModel)
118 Q_DISABLE_COPY(IrcUserModel)
123 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcUserModel*))
125 #endif // IRCUSERMODEL_H
Keeps track of user status on a channel.
Definition: ircuser.h:42
Keeps track of channel users.
Definition: ircusermodel.h:45
Keeps track of channel status.
Definition: ircchannel.h:40
The base class of all messages.
Definition: ircmessage.h:47
Miscellaneous identifiers used throughout the library.
Definition: irc.h:39