Add bluetooth to requirements. Fix up main screen to represent app layout.
This commit is contained in:
@@ -28,7 +28,7 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
|
||||
################# 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})
|
||||
|
||||
################# Enable C++11 features for clang and gcc #################
|
||||
|
||||
@@ -5,24 +5,43 @@ import QtQuick.Controls 2.0 as Controls
|
||||
Kirigami.ApplicationWindow {
|
||||
id: root
|
||||
|
||||
title: "Hello"
|
||||
title: "QiFlora"
|
||||
|
||||
pageStack.initialPage: mainPageComponent
|
||||
|
||||
Component {
|
||||
id: mainPageComponent
|
||||
|
||||
Kirigami.Page {
|
||||
title: "Hello"
|
||||
Kirigami.ScrollablePage {
|
||||
mainAction: Kirigami.Action {
|
||||
iconName: "view-refresh"
|
||||
text: i18n("Query Device")
|
||||
}
|
||||
title: "Monitor"
|
||||
|
||||
Component.onCompleted: {
|
||||
monitorTypes.append({"chartType": "temperature", "title": i18n("Temperature"), "icon": "filename-bpm-amarok"});
|
||||
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"});
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "black"
|
||||
anchors.fill: parent
|
||||
Kirigami.CardsListView {
|
||||
id: monitorView
|
||||
model: ListModel {
|
||||
id: monitorTypes
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
text: qsTr("Hello Kirigami")
|
||||
color: "white"
|
||||
anchors.centerIn: parent
|
||||
delegate: Kirigami.Card {
|
||||
id: card
|
||||
banner {
|
||||
title: model.title
|
||||
titleIcon: model.icon
|
||||
}
|
||||
contentItem: Controls.Label {
|
||||
wrapMode: Text.WordWrap
|
||||
text: model.chartType
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user