minor chhanges, mostly cleanup
This commit is contained in:
parent
03ec489cfb
commit
f62a2f5b94
3 changed files with 34 additions and 22 deletions
|
@ -23,7 +23,7 @@ Rectangle {
|
|||
property int set_height: parent.font.pixelSize * 1.4
|
||||
implicitWidth: set_height * 1.84
|
||||
implicitHeight: set_height
|
||||
x: ready_del.width - width - ready_del.rightPadding
|
||||
x: parent.width - width - parent.rightPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: implicitHeight * 0.5
|
||||
color: parent.checked ? "#17a81a" : "transparent"
|
||||
|
|
|
@ -31,7 +31,7 @@ AppSettings::AppSettings(QObject* parent)
|
|||
this->setDefaultSetting("at_marks_en", "false");
|
||||
this->setDefaultSetting("at_marks_delay", 0);
|
||||
|
||||
this->setDefaultSetting("theme", "Default");
|
||||
this->setDefaultSetting("theme", "Light");
|
||||
|
||||
pGlobalAppSettings = this;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ BaseConn::BaseConn(QObject *parent) : QObject(parent)
|
|||
this, SLOT(gotError(QAbstractSocket::SocketError)));
|
||||
|
||||
this->nextConnectionId = 1;
|
||||
this->connections = QVariantList({});
|
||||
}
|
||||
|
||||
bool BaseConn::connectToHost() {
|
||||
|
@ -66,11 +67,11 @@ void BaseConn::closeConnection()
|
|||
socket->abort();
|
||||
}
|
||||
setState("disconnected");
|
||||
// for(int i = 0; i < this->waitingRequests.length(); i++){
|
||||
// this->waitingRequests[i].reply = "ERR_NOT_CONNECTED";
|
||||
// this->waitingRequests[i].loop->quit();
|
||||
// return;
|
||||
// }
|
||||
// for(int i = 0; i < this->waitingRequests.length(); i++){
|
||||
// this->waitingRequests[i].reply = "ERR_NOT_CONNECTED";
|
||||
// this->waitingRequests[i].loop->quit();
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
|
||||
void BaseConn::gotError(QAbstractSocket::SocketError err)
|
||||
|
@ -236,4 +237,15 @@ bool BaseConn::refreshConnections() {
|
|||
|
||||
QVariant BaseConn::getConnections() {
|
||||
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;
|
||||
}
|
||||
|
|
Reference in a new issue