diff options
Diffstat (limited to 'src/main.qml')
-rw-r--r-- | src/main.qml | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/main.qml b/src/main.qml index 3574a8c..8a19d54 100644 --- a/src/main.qml +++ b/src/main.qml @@ -182,8 +182,9 @@ ApplicationWindow { */ Drawer { id: sidebar_drawer - y: top_menu_bar_frame.height + objectName: "sidebar_drawer" + y: top_menu_bar_frame.height width: !inPortrait ? Math.min(300, Math.max(200, window.width * 0.333)) : (window.width * 0.5) height: window.height - top_menu_bar_frame.height @@ -194,6 +195,9 @@ ApplicationWindow { margins: -2 visible: !inPortrait + signal rwaHostSelected(string host_uuid) + property bool rwaHostIsSelected: false + ListView { id: sidebar_listview boundsBehavior: Flickable.StopAtBounds @@ -202,6 +206,21 @@ ApplicationWindow { anchors.fill: parent model: mainModel + header: ComboBox { + id: server_chooser + objectName: "server_chooser" + width: parent.width + height: 50 + model: mainqmladaptor.rwaHostModel + + textRole: "alias" + onCurrentIndexChanged: { + var rwa_host = mainqmladaptor.rwaHostModel + sidebar_drawer.rwaHostSelected(rwa_host[currentIndex].uuid) + sidebar_drawer.rwaHostIsSelected = true + } + } + footer: ItemDelegate { id: footer text: " " + qsTr("Settings") @@ -234,6 +253,9 @@ ApplicationWindow { main_content_replace(scene_url, StackView.Transition) } + + // Disabled till a RWAHost object is selected. + enabled: sidebar_drawer.rwaHostIsSelected } ListItem { text: " " + qsTr("Remote View") @@ -244,6 +266,9 @@ ApplicationWindow { main_content_replace(scene_url, StackView.Transition) } + + // Disabled till a RWAHost object is selected. + enabled: sidebar_drawer.rwaHostIsSelected } ListItem { text: " " + qsTr("Add RWA-Server") |