diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-07 15:03:13 +0200 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-07 15:40:01 +0200 |
commit | 54249d9c37ce3994b03123ee6367c7f5519d3b40 (patch) | |
tree | cb9657620cda008edaf87299b4b3878e757c097b /src/main.qml | |
parent | 3b2c865566aea43ab21afadcd34f58db0a5d5ab8 (diff) | |
download | RWA.Support.DesktopApp-54249d9c37ce3994b03123ee6367c7f5519d3b40.tar.gz RWA.Support.DesktopApp-54249d9c37ce3994b03123ee6367c7f5519d3b40.tar.bz2 RWA.Support.DesktopApp-54249d9c37ce3994b03123ee6367c7f5519d3b40.zip |
Introduce RWAHostModel. RWAHost's are now loaded on start.
Scene_remote_{view, control} are no longer available if no host is selected.
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") |