Rename History to Timeline
In order to be compatible with the Matrix terminology
This commit is contained in:
parent
78677e6adf
commit
4b4035eebc
9 changed files with 73 additions and 73 deletions
|
|
@ -22,11 +22,11 @@
|
|||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
|
||||
#include "HistoryViewManager.h"
|
||||
#include "MatrixClient.h"
|
||||
#include "RoomInfo.h"
|
||||
#include "RoomList.h"
|
||||
#include "TextInputWidget.h"
|
||||
#include "TimelineViewManager.h"
|
||||
#include "TopRoomBar.h"
|
||||
#include "UserInfoWidget.h"
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ private:
|
|||
Ui::ChatPage *ui;
|
||||
|
||||
RoomList *room_list_;
|
||||
HistoryViewManager *view_manager_;
|
||||
TimelineViewManager *view_manager_;
|
||||
|
||||
TopRoomBar *top_bar_;
|
||||
TextInputWidget *text_input_;
|
||||
|
|
|
|||
|
|
@ -24,18 +24,18 @@
|
|||
|
||||
#include "Sync.h"
|
||||
|
||||
class HistoryViewItem : public QWidget
|
||||
class TimelineItem : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
// For remote messages.
|
||||
HistoryViewItem(const Event &event, bool with_sender, const QString &color, QWidget *parent = 0);
|
||||
TimelineItem(const Event &event, bool with_sender, const QString &color, QWidget *parent = 0);
|
||||
|
||||
// For local messages.
|
||||
HistoryViewItem(const QString &userid, const QString &color, const QString &body, QWidget *parent = 0);
|
||||
HistoryViewItem(const QString &body, QWidget *parent = 0);
|
||||
TimelineItem(const QString &userid, const QString &color, const QString &body, QWidget *parent = 0);
|
||||
TimelineItem(const QString &body, QWidget *parent = 0);
|
||||
|
||||
~HistoryViewItem();
|
||||
~TimelineItem();
|
||||
|
||||
private:
|
||||
void generateBody(const QString &body);
|
||||
|
|
@ -24,8 +24,8 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
#include "HistoryViewItem.h"
|
||||
#include "Sync.h"
|
||||
#include "TimelineItem.h"
|
||||
|
||||
// Contains info about a message shown in the history view
|
||||
// but not yet confirmed by the homeserver through sync.
|
||||
|
|
@ -33,9 +33,9 @@ struct PendingMessage {
|
|||
int txn_id;
|
||||
QString body;
|
||||
QString event_id;
|
||||
HistoryViewItem *widget;
|
||||
TimelineItem *widget;
|
||||
|
||||
PendingMessage(int txn_id, QString body, QString event_id, HistoryViewItem *widget)
|
||||
PendingMessage(int txn_id, QString body, QString event_id, TimelineItem *widget)
|
||||
: txn_id(txn_id)
|
||||
, body(body)
|
||||
, event_id(event_id)
|
||||
|
|
@ -44,14 +44,14 @@ struct PendingMessage {
|
|||
}
|
||||
};
|
||||
|
||||
class HistoryView : public QWidget
|
||||
class TimelineView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit HistoryView(QWidget *parent = 0);
|
||||
explicit HistoryView(const QList<Event> &events, QWidget *parent = 0);
|
||||
~HistoryView();
|
||||
explicit TimelineView(QWidget *parent = 0);
|
||||
explicit TimelineView(const QList<Event> &events, QWidget *parent = 0);
|
||||
~TimelineView();
|
||||
|
||||
void addHistoryItem(const Event &event, const QString &color, bool with_sender);
|
||||
int addEvents(const QList<Event> &events);
|
||||
|
|
@ -23,18 +23,18 @@
|
|||
#include <QStackedWidget>
|
||||
#include <QWidget>
|
||||
|
||||
#include "HistoryView.h"
|
||||
#include "TimelineView.h"
|
||||
#include "MatrixClient.h"
|
||||
#include "RoomInfo.h"
|
||||
#include "Sync.h"
|
||||
|
||||
class HistoryViewManager : public QStackedWidget
|
||||
class TimelineViewManager : public QStackedWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
HistoryViewManager(QSharedPointer<MatrixClient> client, QWidget *parent);
|
||||
~HistoryViewManager();
|
||||
TimelineViewManager(QSharedPointer<MatrixClient> client, QWidget *parent);
|
||||
~TimelineViewManager();
|
||||
|
||||
void initialize(const Rooms &rooms);
|
||||
void sync(const Rooms &rooms);
|
||||
|
|
@ -56,7 +56,7 @@ private slots:
|
|||
|
||||
private:
|
||||
RoomInfo active_room_;
|
||||
QMap<QString, HistoryView *> views_;
|
||||
QMap<QString, TimelineView *> views_;
|
||||
QSharedPointer<MatrixClient> client_;
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue