diff options
author | Christoph Schulthess | 2017-05-02 11:06:21 +0200 |
---|---|---|
committer | Christoph Schulthess | 2017-05-02 11:06:21 +0200 |
commit | a0586cd87d7bfdd7098fd90cf032ed0300c0a9db (patch) | |
tree | a66a3fe9611bad8ba5c0b4b385562995673c78ea | |
parent | test (diff) | |
download | pvs2-a0586cd87d7bfdd7098fd90cf032ed0300c0a9db.tar.gz pvs2-a0586cd87d7bfdd7098fd90cf032ed0300c0a9db.tar.xz pvs2-a0586cd87d7bfdd7098fd90cf032ed0300c0a9db.zip |
test
-rw-r--r-- | src/client/toolbar/toolbar.cpp | 13 | ||||
-rw-r--r-- | src/client/toolbar/toolbar.h | 1 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp index 41798dd..4374161 100644 --- a/src/client/toolbar/toolbar.cpp +++ b/src/client/toolbar/toolbar.cpp @@ -111,6 +111,7 @@ void Toolbar::init() connect(_ui->btnAttention, SIGNAL(toggled(bool)), this, SLOT(onBtnAttention())); connect(_ui->btnCustom, SIGNAL(toggled(bool)), this, SLOT(onBtnCustom())); connect(&this->runDbg, SIGNAL(finished(int)), this, SLOT(onDbgFinished())); + connect(&this->runDbg, SIGNAL(started()), this, SLOT(onDbgStarted())); /* Setup menu */ initMenu(); @@ -501,8 +502,6 @@ void Toolbar::onBtnCustom() const bool on = _ui->btnCustom->isChecked(); if (on) { this->runDbg.start("/bin/sh", QStringList() << "/opt/openslx/remotedebug/startdebug_noxterm.sh"); - _ui->btnCustom->setStyleSheet("background-color: red; color: white; font: bold"); - _ui->btnCustom->setText("Debug mode: ON"); } else { this->runDbg.terminate(); } @@ -512,11 +511,19 @@ void Toolbar::onBtnCustom() void Toolbar::onDbgFinished() { - _ui->btnCustom->setChecked(false); + if (_ui->btnCustom->isChecked()) { + _ui->btnCustom->setChecked(false); + } _ui->btnCustom->setStyleSheet("background-color: grey; color: black; font: bold"); _ui->btnCustom->setText("Debug mode: OFF"); } +void Toolbar::onDbgStarted() +{ + _ui->btnCustom->setStyleSheet("background-color: red; color: white; font: bold"); + _ui->btnCustom->setText("Debug mode: ON"); +} + void Toolbar::onBtnLockDesktop() { if (this->lockDesktopP.state() == QProcess::NotRunning) { diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h index fa27fc1..deee8ee 100644 --- a/src/client/toolbar/toolbar.h +++ b/src/client/toolbar/toolbar.h @@ -73,6 +73,7 @@ private slots: void onBtnAttention(); void onBtnCustom(); void onDbgFinished(); + void onDbgStarted(); void exit(); void cameraBlink(); void showBar(); |