MCPcopy Create free account
hub / github.com/davidar/tensor / RoomListModel

Class RoomListModel

client/models/roomlistmodel.h:30–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30class RoomListModel: public QAbstractListModel
31{
32 Q_OBJECT
33 public:
34 RoomListModel(QObject* parent=0);
35 virtual ~RoomListModel();
36
37 Q_INVOKABLE void setConnection(QMatrixClient::Connection* connection);
38 Q_INVOKABLE QMatrixClient::Room* roomAt(int row);
39
40 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
41 int rowCount(const QModelIndex& parent=QModelIndex()) const override;
42
43 private slots:
44 void namesChanged(QMatrixClient::Room* room);
45 void unreadMessagesChanged(QMatrixClient::Room* room);
46 void addRoom(QMatrixClient::Room* room);
47
48 private:
49 QMatrixClient::Connection* m_connection;
50 QList<QMatrixClient::Room*> m_rooms;
51};
52
53#endif // ROOMLISTMODEL_H

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected