Changeset View
Changeset View
Standalone View
Standalone View
src/matrix-sticker-pack.hpp
| Show All 33 Lines | class MatrixStickerPack : public KazvAbstractListModel | ||||
| lager::reader<Kazv::json> m_images; | lager::reader<Kazv::json> m_images; | ||||
| public: | public: | ||||
| explicit MatrixStickerPack(lager::reader<MatrixStickerPackSource> source, QObject *parent = 0); | explicit MatrixStickerPack(lager::reader<MatrixStickerPackSource> source, QObject *parent = 0); | ||||
| ~MatrixStickerPack() override; | ~MatrixStickerPack() override; | ||||
| Q_INVOKABLE MatrixSticker *at(int index) const; | Q_INVOKABLE MatrixSticker *at(int index) const; | ||||
| LAGER_QT_READER(QString, packName); | |||||
| Q_INVOKABLE bool hasShortCode(const QString &shortCode) const; | Q_INVOKABLE bool hasShortCode(const QString &shortCode) const; | ||||
| /** | /** | ||||
| * Add a sticker to the pack and return the source of the | * Add a sticker to the pack and return the source of the | ||||
| * modified pack. | * modified pack. | ||||
| * | * | ||||
| * @param shortCode The short code of the sticker. | * @param shortCode The short code of the sticker. | ||||
| * @param event The event of the sticker. | * @param event The event of the sticker. | ||||
| * @return The MatrixStickerPackSource of the modified pack. | * @return The MatrixStickerPackSource of the modified pack. | ||||
| */ | */ | ||||
| Q_INVOKABLE QVariant addSticker(const QString &shortCode, MatrixEvent *event) const; | Q_INVOKABLE QVariant addSticker(const QString &shortCode, MatrixEvent *event) const; | ||||
| }; | }; | ||||