2019-04-20 17:36:21 -04:00
|
|
|
import QtQuick 2.7
|
2019-03-22 20:45:22 -04:00
|
|
|
import QtQuick.Controls 1.4 as Controls1
|
2019-03-21 23:28:14 -04:00
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.4
|
2019-04-20 17:36:21 -04:00
|
|
|
import "sidePane" as SidePane
|
2019-03-26 05:52:43 -04:00
|
|
|
import "chat" as Chat
|
2019-03-21 23:28:14 -04:00
|
|
|
|
2019-03-25 18:29:46 -04:00
|
|
|
//https://doc.qt.io/qt-5/qml-qtquick-controls-splitview.html
|
2019-03-22 20:45:22 -04:00
|
|
|
Controls1.SplitView {
|
2019-03-21 23:28:14 -04:00
|
|
|
anchors.fill: parent
|
|
|
|
|
2019-03-26 05:52:43 -04:00
|
|
|
SidePane.Root {
|
2019-03-26 03:19:55 -04:00
|
|
|
Layout.minimumWidth: 36
|
|
|
|
width: 200
|
2019-03-25 18:29:46 -04:00
|
|
|
}
|
2019-03-21 23:28:14 -04:00
|
|
|
|
|
|
|
StackView {
|
2019-04-21 15:20:20 -04:00
|
|
|
function showRoom(userId, roomId) {
|
2019-03-26 03:19:55 -04:00
|
|
|
pageStack.replace(
|
2019-04-20 17:36:21 -04:00
|
|
|
"chat/Root.qml", { userId: userId, roomId: roomId }
|
2019-03-26 03:19:55 -04:00
|
|
|
)
|
2019-04-20 03:29:24 -04:00
|
|
|
console.log("replaced")
|
2019-03-21 23:28:14 -04:00
|
|
|
}
|
|
|
|
|
2019-04-20 17:45:51 -04:00
|
|
|
id: pageStack
|
2019-03-21 23:28:14 -04:00
|
|
|
|
|
|
|
onCurrentItemChanged: currentItem.forceActiveFocus()
|
|
|
|
|
2019-04-21 10:44:04 -04:00
|
|
|
initialItem: Item { // TODO: (test, remove)
|
|
|
|
Keys.onPressed: pageStack.showRoom(
|
|
|
|
"@test_mary:matrix.org", "!TSXGsbBbdwsdylIOJZ:matrix.org"
|
2019-04-21 15:20:20 -04:00
|
|
|
//"@test_mary:matrix.org", "!TEXkdeErtVCMqClNfb:matrix.org"
|
2019-04-20 17:36:21 -04:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2019-03-21 23:28:14 -04:00
|
|
|
// Buggy
|
|
|
|
replaceExit: null
|
|
|
|
popExit: null
|
|
|
|
pushExit: null
|
|
|
|
}
|
|
|
|
}
|