diff options
Diffstat (limited to 'src/ImagePackListModel.h')
-rw-r--r-- | src/ImagePackListModel.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/ImagePackListModel.h b/src/ImagePackListModel.h index 2aa5abb2..0b39729a 100644 --- a/src/ImagePackListModel.h +++ b/src/ImagePackListModel.h @@ -11,31 +11,31 @@ class SingleImagePackModel; class ImagePackListModel : public QAbstractListModel { - Q_OBJECT - Q_PROPERTY(bool containsAccountPack READ containsAccountPack CONSTANT) + Q_OBJECT + Q_PROPERTY(bool containsAccountPack READ containsAccountPack CONSTANT) public: - enum Roles - { - DisplayName = Qt::UserRole, - AvatarUrl, - FromAccountData, - FromCurrentRoom, - StateKey, - RoomId, - }; - - ImagePackListModel(const std::string &roomId, QObject *parent = nullptr); - QHash<int, QByteArray> roleNames() const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role) const override; - - Q_INVOKABLE SingleImagePackModel *packAt(int row); - Q_INVOKABLE SingleImagePackModel *newPack(bool inRoom); - - bool containsAccountPack() const; + enum Roles + { + DisplayName = Qt::UserRole, + AvatarUrl, + FromAccountData, + FromCurrentRoom, + StateKey, + RoomId, + }; + + ImagePackListModel(const std::string &roomId, QObject *parent = nullptr); + QHash<int, QByteArray> roleNames() const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role) const override; + + Q_INVOKABLE SingleImagePackModel *packAt(int row); + Q_INVOKABLE SingleImagePackModel *newPack(bool inRoom); + + bool containsAccountPack() const; private: - std::string room_id; + std::string room_id; - std::vector<QSharedPointer<SingleImagePackModel>> packs; + std::vector<QSharedPointer<SingleImagePackModel>> packs; }; |