moment/harmonyqml/components/UI.qml

41 lines
966 B
QML
Raw Normal View History

import QtQuick 2.7
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
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
Controls1.SplitView {
2019-03-22 14:28:14 +11:00
anchors.fill: parent
SidePane.Root {
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 00:44:04 +10:00
function showRoom(userId, roomId, isInvite) {
pageStack.replace(
"chat/Root.qml", { userId: userId, roomId: roomId }
)
console.log("replaced")
2019-03-22 14:28:14 +11:00
}
id: pageStack
2019-03-22 14:28:14 +11:00
onCurrentItemChanged: currentItem.forceActiveFocus()
2019-04-22 00:44:04 +10:00
initialItem: Item { // TODO: (test, remove)
Keys.onPressed: pageStack.showRoom(
"@test_mary:matrix.org", "!TSXGsbBbdwsdylIOJZ:matrix.org"
)
}
2019-03-22 14:28:14 +11:00
// Buggy
replaceExit: null
popExit: null
pushExit: null
}
}