Preparation for messageeventmodel.
This commit is contained in:
@@ -17,7 +17,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
SOURCES += main.cpp \
|
||||
matrix/controller.cpp \
|
||||
matrix/roomlistmodel.cpp \
|
||||
matrix/imageprovider.cpp
|
||||
matrix/imageprovider.cpp \
|
||||
matrix/messageeventmodel.cpp
|
||||
|
||||
RESOURCES += \
|
||||
res.qrc
|
||||
@@ -50,4 +51,5 @@ DISTFILES += \
|
||||
HEADERS += \
|
||||
matrix/controller.h \
|
||||
matrix/roomlistmodel.h \
|
||||
matrix/imageprovider.h
|
||||
matrix/imageprovider.h \
|
||||
matrix/messageeventmodel.h
|
||||
|
||||
@@ -11,6 +11,7 @@ Controller::~Controller() {
|
||||
}
|
||||
|
||||
void Controller::login(QString home, QString user, QString pass) {
|
||||
if(!isLogin) {
|
||||
if(home.isEmpty()) home = "matrix.org";
|
||||
|
||||
qDebug() << "UserID:" << userID;
|
||||
@@ -26,6 +27,9 @@ void Controller::login(QString home, QString user, QString pass) {
|
||||
qDebug() << "Using given credential.";
|
||||
m_connection->connectToServer("@"+user+":"+home, pass, "");
|
||||
}
|
||||
} else {
|
||||
qDebug() << "You are already logged in.";
|
||||
}
|
||||
}
|
||||
|
||||
void Controller::setConnection(QMatrixClient::Connection* conn) {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import "qrc:/qml/form"
|
||||
|
||||
import Matrique 0.1
|
||||
|
||||
Page {
|
||||
property var roomListModel
|
||||
property RoomListModel roomListModel
|
||||
|
||||
ListForm {
|
||||
id: roomListForm
|
||||
@@ -16,5 +19,6 @@ Page {
|
||||
id: roomForm
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: roomListForm.width
|
||||
roomIndex: roomListForm.currentIndex
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,15 @@ Page {
|
||||
TabButton {
|
||||
text: qsTr("Overview")
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr("Interface")
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr("Network")
|
||||
}
|
||||
|
||||
TabButton {
|
||||
text: qsTr("Sync")
|
||||
}
|
||||
@@ -36,5 +42,9 @@ Page {
|
||||
Page {
|
||||
|
||||
}
|
||||
|
||||
Page {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import "qrc:/qml/component"
|
||||
|
||||
Item {
|
||||
property var listModel
|
||||
property alias currentIndex: listView.currentIndex
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
@@ -6,6 +6,8 @@ import QtGraphicalEffects 1.0
|
||||
import "qrc:/qml/component"
|
||||
|
||||
Item {
|
||||
property int roomIndex
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
Reference in New Issue
Block a user