diff --git a/bobbycar-app.pro b/bobbycar-app.pro index 293814d..04e0f14 100644 --- a/bobbycar-app.pro +++ b/bobbycar-app.pro @@ -9,14 +9,16 @@ HEADERS += \ deviceinfo.h \ devicefinder.h \ devicehandler.h \ - bluetoothbaseclass.h + bluetoothbaseclass.h \ + settings.h SOURCES += main.cpp \ connectionhandler.cpp \ deviceinfo.cpp \ devicefinder.cpp \ devicehandler.cpp \ - bluetoothbaseclass.cpp + bluetoothbaseclass.cpp \ + settings.cpp RESOURCES += qml.qrc \ images.qrc diff --git a/qml/Livedata.qml b/qml/Livedata.qml index e6a96cb..f91515e 100644 --- a/qml/Livedata.qml +++ b/qml/Livedata.qml @@ -126,6 +126,8 @@ GamePage { } Row { + anchors.bottomMargin: 30 + spacing: 10 Label { text: 'iMotMax:' color: GameSettings.textColor @@ -139,6 +141,7 @@ GamePage { } Row { + spacing: 10 Label { text: 'iDcMax:' color: GameSettings.textColor diff --git a/qml/settings.qml b/qml/settings.qml index 60dc072..28dd285 100644 --- a/qml/settings.qml +++ b/qml/settings.qml @@ -1,5 +1,6 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 +import Shared 1.0 GamePage { id: livedatePage @@ -14,18 +15,78 @@ GamePage { } Rectangle { - id: container - anchors.centerIn: parent + id: viewContainer + anchors.top: parent.top + anchors.topMargin: GameSettings.fieldMargin + messageHeight + anchors.bottomMargin: GameSettings.fieldMargin anchors.horizontalCenter: parent.horizontalCenter - width: Math.min(livedatePage.width, livedatePage.height-GameSettings.fieldHeight*4) - 2*GameSettings.fieldMargin - height: livedatePage.height-GameSettings.fieldHeight*4 - radius: GameSettings.buttonRadius + width: parent.width - GameSettings.fieldMargin*2 color: GameSettings.viewColor + radius: GameSettings.buttonRadius + Text { - id: test - text: qsTr("text") - color: "white" + id: title + width: parent.width + height: GameSettings.fieldHeight + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color: GameSettings.textColor + font.pixelSize: GameSettings.mediumFontSize + text: qsTr("WIFIS") + + BottomLine { + height: 1; + width: parent.width + color: "#898989" + } + } + + + ListView { + id: wifis + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.top: title.bottom + //model: deviceFinder.devices // Needs to be changed + clip: true + + delegate: Rectangle { + id: box + height:GameSettings.fieldHeight * 1.2 + width: parent.width + color: index % 2 === 0 ? GameSettings.delegate1Color : GameSettings.delegate2Color + + MouseArea { + anchors.fill: parent + onClicked: { + //Handle editor + } + } + + Text { + id: device + font.pixelSize: GameSettings.smallFontSize + text: modelData.ssid + anchors.top: parent.top + anchors.topMargin: parent.height * 0.1 + anchors.leftMargin: parent.height * 0.1 + anchors.left: parent.left + color: GameSettings.textColor + } +/* + Text { + id: deviceAddress + font.pixelSize: GameSettings.smallFontSize + text: modelData.deviceAddress + anchors.bottom: parent.bottom + anchors.bottomMargin: parent.height * 0.1 + anchors.rightMargin: parent.height * 0.1 + anchors.right: parent.right + color: Qt.darker(GameSettings.textColor) + }*/ + } } } } diff --git a/settings.cpp b/settings.cpp new file mode 100644 index 0000000..ab1f08d --- /dev/null +++ b/settings.cpp @@ -0,0 +1,6 @@ +#include "settings.h" + +settings::settings() +{ + +} diff --git a/settings.h b/settings.h new file mode 100644 index 0000000..f855612 --- /dev/null +++ b/settings.h @@ -0,0 +1,11 @@ +#ifndef SETTINGS_H +#define SETTINGS_H + + +class settings +{ +public: + settings(); +}; + +#endif // SETTINGS_H