diff --git a/CMakeLists.txt b/CMakeLists.txt index 007acda357026b82bb99139a53feea668653d60b..f77499d73f94cd81c49dea56921e85d2b32a6310 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ################# diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml index 122617d63b861e3bb58f6a5182800192a5a245b8..0d17b69476adbe3534b16ea3cc5d78fbb63fa0a9 100644 --- a/src/contents/ui/main.qml +++ b/src/contents/ui/main.qml @@ -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 + } } } }