Page MenuHomePhorge

matrix-sticker-pack-list.hpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

matrix-sticker-pack-list.hpp

/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include <libkazv-config.hpp>
#include <immer/config.hpp>
#include <QObject>
#include <QQmlEngine>
#include <QAbstractListModel>
#include <immer/flex_vector.hpp>
#include <lager/reader.hpp>
#include <lager/extra/qt.hpp>
#include <client/client.hpp>
#include <base/event.hpp>
#include "matrix-sticker-pack-source.hpp"
class MatrixStickerPack;
class MatrixStickerPackList : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("")
Kazv::Client m_client;
lager::reader<immer::flex_vector<MatrixStickerPackSource>> m_events;
int m_internalCount;
public:
explicit MatrixStickerPackList(Kazv::Client client, QObject *parent = 0);
~MatrixStickerPackList() override;
LAGER_QT_READER(int, count);
Q_INVOKABLE MatrixStickerPack *at(int index) const;
QVariant data(const QModelIndex &index, int role) const override;
int rowCount(const QModelIndex &parent) const override;
private Q_SLOTS:
void updateInternalCount();
};

File Metadata

Mime Type
text/x-c++
Expires
Sun, Dec 1, 6:49 PM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41810
Default Alt Text
matrix-sticker-pack-list.hpp (1 KB)

Event Timeline