Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112738
matrix-room-timeline.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
matrix-room-timeline.hpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020-2024 tusooa <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
<
immer
::
flex_vector
<
std
::
string
>>
m_timelineEventIds
;
lager
::
reader
<
immer
::
map
<
std
::
string
,
Kazv
::
Event
>>
m_messagesMap
;
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
(
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
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Nov 23, 11:05 PM (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39187
Default Alt Text
matrix-room-timeline.hpp (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment