mirror of https://github.com/Nheko-Reborn/nheko
parent
dc173581f1
commit
8e611abe87
@ -0,0 +1,11 @@ |
||||
import QtQuick 2.1 |
||||
|
||||
Rectangle { |
||||
anchors.fill: parent |
||||
|
||||
Text { |
||||
anchors.centerIn: parent |
||||
text: qsTr("No room open") |
||||
font.pointSize: 24 |
||||
} |
||||
} |
@ -0,0 +1,10 @@ |
||||
#include "TimelineViewManager.h" |
||||
|
||||
TimelineViewManager::TimelineViewManager(QWidget *parent) |
||||
{ |
||||
view = new QQuickView(); |
||||
container = QWidget::createWindowContainer(view, parent); |
||||
container->setMinimumSize(200, 200); |
||||
view->setSource(QUrl("qrc:///qml/TimelineView.qml")); |
||||
// view->rootContext()->setContextProperty(room);
|
||||
} |
@ -0,0 +1,72 @@ |
||||
#pragma once |
||||
|
||||
#include <QQuickView> |
||||
#include <QWidget> |
||||
|
||||
#include <mtx/responses.hpp> |
||||
|
||||
#include "Cache.h" |
||||
#include "Utils.h" |
||||
|
||||
// temporary for stubs
|
||||
#pragma GCC diagnostic push |
||||
#pragma GCC diagnostic ignored "-Wunused-parameter" |
||||
|
||||
class TimelineViewManager : public QObject |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
TimelineViewManager(QWidget *parent = 0); |
||||
QWidget *getWidget() const { return container; } |
||||
|
||||
void initialize(const mtx::responses::Rooms &rooms) {} |
||||
void addRoom(const QString &room_id) {} |
||||
|
||||
void sync(const mtx::responses::Rooms &rooms) {} |
||||
void clearAll() {} |
||||
|
||||
signals: |
||||
void clearRoomMessageCount(QString roomid); |
||||
void updateRoomsLastMessage(const QString &user, const DescInfo &info); |
||||
|
||||
public slots: |
||||
void updateReadReceipts(const QString &room_id, const std::vector<QString> &event_ids) {} |
||||
void removeTimelineEvent(const QString &room_id, const QString &event_id) {} |
||||
void initWithMessages(const std::map<QString, mtx::responses::Timeline> &msgs) {} |
||||
|
||||
void setHistoryView(const QString &room_id) {} |
||||
void queueTextMessage(const QString &msg) {} |
||||
void queueReplyMessage(const QString &reply, const RelatedInfo &related) {} |
||||
void queueEmoteMessage(const QString &msg) {} |
||||
void queueImageMessage(const QString &roomid, |
||||
const QString &filename, |
||||
const QString &url, |
||||
const QString &mime, |
||||
uint64_t dsize, |
||||
const QSize &dimensions) |
||||
{} |
||||
void queueFileMessage(const QString &roomid, |
||||
const QString &filename, |
||||
const QString &url, |
||||
const QString &mime, |
||||
uint64_t dsize) |
||||
{} |
||||
void queueAudioMessage(const QString &roomid, |
||||
const QString &filename, |
||||
const QString &url, |
||||
const QString &mime, |
||||
uint64_t dsize) |
||||
{} |
||||
void queueVideoMessage(const QString &roomid, |
||||
const QString &filename, |
||||
const QString &url, |
||||
const QString &mime, |
||||
uint64_t dsize) |
||||
{} |
||||
|
||||
private: |
||||
QQuickView *view; |
||||
QWidget *container; |
||||
}; |
||||
|
||||
#pragma GCC diagnostic pop |
Loading…
Reference in new issue