summaryrefslogtreecommitdiff
path: root/src/frontend/qtquick/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/qtquick/main.qml')
-rw-r--r--src/frontend/qtquick/main.qml64
1 files changed, 61 insertions, 3 deletions
diff --git a/src/frontend/qtquick/main.qml b/src/frontend/qtquick/main.qml
index 3775f2b..2a942d0 100644
--- a/src/frontend/qtquick/main.qml
+++ b/src/frontend/qtquick/main.qml
@@ -1,13 +1,71 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
-import QtQuick.Window 2.15
-Window {
+ApplicationWindow {
width: 640
height: 480
visible: true
- // TODO grab this from config.h
title: PROJECT_TITLE
+
+ id: root
+
+ Drawer {
+ id: drawer
+
+ width: Math.min(root.width, root.height) / 3 * 2
+ height: root.height
+
+ ListView {
+ currentIndex: -1
+ anchors.fill: parent
+
+ delegate: ItemDelegate {
+ width: parent.width
+ text: model.text
+ highlighted: ListView.isCurrentItem
+ onClicked: {
+ drawer.close()
+ model.triggered()
+ }
+ }
+
+ model: ListModel {
+ ListElement {
+ text: qsTr("Preferences...")
+ triggered: function() { preferencesDialog.open(); }
+ }
+ ListElement {
+ text: qsTr("Reload...")
+ triggered: function() { /* reload from database */ }
+ }
+ ListElement {
+ text: qsTr("About...")
+ triggered: function() { aboutDialog.open() }
+ }
+ }
+
+ ScrollIndicator.vertical: ScrollIndicator { }
+ }
+ }
+
+ header: ToolBar {
+ ToolButton {
+ id: menuButton
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ // TODO create icon for the drawer
+ //icon.source: "..."
+ onClicked: drawer.open()
+ }
+ Label {
+ anchors.centerIn: parent
+ // TODO determine what title to set
+ //text: ...
+ font.pixelSize: 20
+ elide: Label.ElideRight
+ }
+ }
+
// DropDown for groups (including an "all" option)
Item {