More preparations for wireless settings

This commit is contained in:
CommanderRedYT
2021-08-16 18:18:07 +02:00
parent a3c0a58c47
commit f495d3d253
5 changed files with 93 additions and 10 deletions

View File

@ -9,14 +9,16 @@ HEADERS += \
deviceinfo.h \ deviceinfo.h \
devicefinder.h \ devicefinder.h \
devicehandler.h \ devicehandler.h \
bluetoothbaseclass.h bluetoothbaseclass.h \
settings.h
SOURCES += main.cpp \ SOURCES += main.cpp \
connectionhandler.cpp \ connectionhandler.cpp \
deviceinfo.cpp \ deviceinfo.cpp \
devicefinder.cpp \ devicefinder.cpp \
devicehandler.cpp \ devicehandler.cpp \
bluetoothbaseclass.cpp bluetoothbaseclass.cpp \
settings.cpp
RESOURCES += qml.qrc \ RESOURCES += qml.qrc \
images.qrc images.qrc

View File

@ -126,6 +126,8 @@ GamePage {
} }
Row { Row {
anchors.bottomMargin: 30
spacing: 10
Label { Label {
text: 'iMotMax:' text: 'iMotMax:'
color: GameSettings.textColor color: GameSettings.textColor
@ -139,6 +141,7 @@ GamePage {
} }
Row { Row {
spacing: 10
Label { Label {
text: 'iDcMax:' text: 'iDcMax:'
color: GameSettings.textColor color: GameSettings.textColor

View File

@ -1,5 +1,6 @@
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import Shared 1.0
GamePage { GamePage {
id: livedatePage id: livedatePage
@ -14,18 +15,78 @@ GamePage {
} }
Rectangle { Rectangle {
id: container id: viewContainer
anchors.centerIn: parent anchors.top: parent.top
anchors.topMargin: GameSettings.fieldMargin + messageHeight
anchors.bottomMargin: GameSettings.fieldMargin
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: Math.min(livedatePage.width, livedatePage.height-GameSettings.fieldHeight*4) - 2*GameSettings.fieldMargin width: parent.width - GameSettings.fieldMargin*2
height: livedatePage.height-GameSettings.fieldHeight*4
radius: GameSettings.buttonRadius
color: GameSettings.viewColor color: GameSettings.viewColor
radius: GameSettings.buttonRadius
Text { Text {
id: test id: title
text: qsTr("text") width: parent.width
color: "white" 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)
}*/
}
} }
} }
} }

6
settings.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "settings.h"
settings::settings()
{
}

11
settings.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef SETTINGS_H
#define SETTINGS_H
class settings
{
public:
settings();
};
#endif // SETTINGS_H