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-03-26 20:52:43 +11:00
|
|
|
import "side_pane" 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-03-22 21:24:19 +11:00
|
|
|
function show_page(componentName) {
|
|
|
|
pageStack.replace(componentName + ".qml")
|
|
|
|
}
|
2019-04-15 02:56:30 +10:00
|
|
|
function show_room(user_id, room_obj) {
|
2019-03-26 18:19:55 +11:00
|
|
|
pageStack.replace(
|
2019-04-15 02:56:30 +10:00
|
|
|
"chat/Root.qml", { user_id: user_id, room: room_obj }
|
2019-03-26 18:19:55 +11:00
|
|
|
)
|
2019-03-22 14:28:14 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
id: "pageStack"
|
2019-04-12 03:22:43 +10:00
|
|
|
// initialItem: Chat.Root {
|
|
|
|
//user: Backend.accountsModel.get(0)
|
|
|
|
//room: Backend.roomsModel[Backend.accountsModel.get(0).user_id].get(0)
|
|
|
|
//}
|
2019-03-22 14:28:14 +11:00
|
|
|
|
|
|
|
onCurrentItemChanged: currentItem.forceActiveFocus()
|
|
|
|
|
|
|
|
// Buggy
|
|
|
|
replaceExit: null
|
|
|
|
popExit: null
|
|
|
|
pushExit: null
|
|
|
|
}
|
|
|
|
}
|