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 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 #################
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
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 {
|
Kirigami.CardsListView {
|
||||||
color: "black"
|
id: monitorView
|
||||||
anchors.fill: parent
|
model: ListModel {
|
||||||
|
id: monitorTypes
|
||||||
|
}
|
||||||
|
|
||||||
Controls.Label {
|
delegate: Kirigami.Card {
|
||||||
text: qsTr("Hello Kirigami")
|
id: card
|
||||||
color: "white"
|
banner {
|
||||||
anchors.centerIn: parent
|
title: model.title
|
||||||
|
titleIcon: model.icon
|
||||||
|
}
|
||||||
|
contentItem: Controls.Label {
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
text: model.chartType
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user