Page MenuHomePhorge

matrix-room-timeline.hpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

matrix-room-timeline.hpp

/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include <libkazv-config.hpp>
#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
#include <QObject>
#include <QQmlEngine>
#include <QAbstractListModel>
#include <lager/extra/qt.hpp>
#include <client/room/room.hpp>
class MatrixEvent;
class MatrixRoomTimeline : public QAbstractListModel
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("")
Kazv::Room m_room;
lager::reader<Kazv::EventList> m_timeline;
int m_internalCount;
lager::reader<immer::flex_vector<Kazv::LocalEchoDesc>> m_localEchoes;
lager::reader<immer::map<std::string, std::string>> m_timelineGaps;
public:
explicit MatrixRoomTimeline(Kazv::Room room, QObject *parent = 0);
~MatrixRoomTimeline() override;
LAGER_QT_READER(int, count);
LAGER_QT_READER(QStringList, eventIds);
LAGER_QT_READER(QSet<QString>, gaps);
int rowCount(const QModelIndex &index) const override;
QVariant data(const QModelIndex &index, int role) const override;
Q_INVOKABLE MatrixEvent *at(int index) const;
private Q_SLOTS:
void updateInternalCount();
};

File Metadata

Mime Type
text/x-c++
Expires
Sun, Dec 1, 9:13 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41644
Default Alt Text
matrix-room-timeline.hpp (1 KB)

Event Timeline