diff options
-rw-r--r-- | src/client/toolbar/toolbar.cpp | 17 |
1 files 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(); } |