Add bluetooth to requirements. Fix up main screen to represent app layout.

This commit is contained in:
2019-11-06 17:16:45 -05:00
parent d9810079a9
commit 6e06af6fa2
2 changed files with 30 additions and 11 deletions

View File

@@ -28,7 +28,7 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
################# Find dependencies ################# ################# Find dependencies #################
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg QuickControls2) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg QuickControls2 Bluetooth)
find_package(KF5Kirigami2 ${KF5_MIN_VERSION}) find_package(KF5Kirigami2 ${KF5_MIN_VERSION})
################# Enable C++11 features for clang and gcc ################# ################# Enable C++11 features for clang and gcc #################

View File

@@ -5,24 +5,43 @@ import QtQuick.Controls 2.0 as Controls
Kirigami.ApplicationWindow { Kirigami.ApplicationWindow {
id: root id: root
title: "Hello" title: "QiFlora"
pageStack.initialPage: mainPageComponent pageStack.initialPage: mainPageComponent
Component { Component {
id: mainPageComponent id: mainPageComponent
Kirigami.Page { Kirigami.ScrollablePage {
title: "Hello" mainAction: Kirigami.Action {
iconName: "view-refresh"
text: i18n("Query Device")
}
title: "Monitor"
Rectangle { Component.onCompleted: {
color: "black" monitorTypes.append({"chartType": "temperature", "title": i18n("Temperature"), "icon": "filename-bpm-amarok"});
anchors.fill: parent monitorTypes.append({"chartType": "moisture", "title": i18n("Moisture"), "icon": "colors-chromablue"});
monitorTypes.append({"chartType": "conductivity", "title": i18n("Conductivity"), "icon": "quickopen"});
monitorTypes.append({"chartType": "brightness", "title": i18n("Brightness"), "icon": "contrast"});
}
Controls.Label { Kirigami.CardsListView {
text: qsTr("Hello Kirigami") id: monitorView
color: "white" model: ListModel {
anchors.centerIn: parent id: monitorTypes
}
delegate: Kirigami.Card {
id: card
banner {
title: model.title
titleIcon: model.icon
}
contentItem: Controls.Label {
wrapMode: Text.WordWrap
text: model.chartType
}
} }
} }
} }