From 5ff6e2763a654710c5fc794cc66836667ef6f5cf Mon Sep 17 00:00:00 2001 From: Christoph Schulthess Date: Wed, 12 Apr 2017 12:46:06 +0200 Subject: changed button func --- src/client/toolbar/toolbar.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp index 896bde9..358fc8c 100644 --- a/src/client/toolbar/toolbar.cpp +++ b/src/client/toolbar/toolbar.cpp @@ -109,7 +109,7 @@ void Toolbar::init() connect(clientApp->connectWindow(), SIGNAL(connected(ServerConnection*)), this, SLOT(onConnected(ServerConnection*))); connect(_ui->btnManager, SIGNAL(toggled(bool)), this, SLOT(onBtnManager())); connect(_ui->btnAttention, SIGNAL(toggled(bool)), this, SLOT(onBtnAttention())); - connect(_ui->btnCustom, SIGNAL(clicked()), this, SLOT(onBtnCustom())); + connect(_ui->btnCustom, SIGNAL(toggled(bool)), this, SLOT(onBtnCustom())); /* Setup menu */ initMenu(); @@ -497,8 +497,19 @@ void Toolbar::onBtnManager() void Toolbar::onBtnCustom() { - //const bool on = _ui->btnCustom->isChecked(); - this->runDbg.start("xterm", QStringList() << "-hold" << "-e" << "/opt/openslx/remotedebug/startdebug.sh"); + const bool on = _ui->btnCustom->isChecked(); + if (on) { + _ui->btnCustom->setStyleSheet("background-color: red; color: white"); + _ui->btnCustom->setText("Debug mode: ON"); + //change style + //run startdebug.sh + } else { + _ui->btnCustom->setStyleSheet("background-color: grey; color: black"); + _ui->btnCustom->setText("Debug mode: OFF"); + //change style back + //kill startdebug.sh + } + //this->runDbg.start("xterm", QStringList() << "-hold" << "-e" << "/opt/openslx/remotedebug/startdebug.sh"); qDebug() << this->runDbg.state(); } -- cgit v1.2.3-55-g7522