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