minor chhanges, mostly cleanup

This commit is contained in:
Dorian Zedler 2019-03-27 22:26:59 +01:00
parent 03ec489cfb
commit f62a2f5b94
3 changed files with 34 additions and 22 deletions

View file

@ -23,7 +23,7 @@ Rectangle {
property int set_height: parent.font.pixelSize * 1.4 property int set_height: parent.font.pixelSize * 1.4
implicitWidth: set_height * 1.84 implicitWidth: set_height * 1.84
implicitHeight: set_height implicitHeight: set_height
x: ready_del.width - width - ready_del.rightPadding x: parent.width - width - parent.rightPadding
y: parent.height / 2 - height / 2 y: parent.height / 2 - height / 2
radius: implicitHeight * 0.5 radius: implicitHeight * 0.5
color: parent.checked ? "#17a81a" : "transparent" color: parent.checked ? "#17a81a" : "transparent"

View file

@ -31,7 +31,7 @@ AppSettings::AppSettings(QObject* parent)
this->setDefaultSetting("at_marks_en", "false"); this->setDefaultSetting("at_marks_en", "false");
this->setDefaultSetting("at_marks_delay", 0); this->setDefaultSetting("at_marks_delay", 0);
this->setDefaultSetting("theme", "Default"); this->setDefaultSetting("theme", "Light");
pGlobalAppSettings = this; pGlobalAppSettings = this;
} }

View file

@ -12,6 +12,7 @@ BaseConn::BaseConn(QObject *parent) : QObject(parent)
this, SLOT(gotError(QAbstractSocket::SocketError))); this, SLOT(gotError(QAbstractSocket::SocketError)));
this->nextConnectionId = 1; this->nextConnectionId = 1;
this->connections = QVariantList({});
} }
bool BaseConn::connectToHost() { bool BaseConn::connectToHost() {
@ -236,4 +237,15 @@ bool BaseConn::refreshConnections() {
QVariant BaseConn::getConnections() { QVariant BaseConn::getConnections() {
return(connections); return(connections);
/*
"id": "id of the extention (int)",
"type": "type of the extention (can be: 'STARTPAD', 'TOPPAP')",
"name": "name of the extention",
"ip": "ip-adress of he extention (string)",
"state": "state of the extention (can be: 'disconnected', 'connecting', 'connected')"
*/
//QVariantMap conn = {{"id",0}, {"type","STARTPAD"}, {"name", "startpad1"}, {"ip", "192.168.4.11"}, {"state", "connected"}};
//QVariantMap conn1 = {{"id",0}, {"type","TOPPAD"}, {"name", "buzzer1"}, {"ip", "192.168.4.10"}, {"state", "connected"}};
//QVariantList conns = {conn, conn1};
//return conns;
} }