From a0586cd87d7bfdd7098fd90cf032ed0300c0a9db Mon Sep 17 00:00:00 2001 From: Christoph Schulthess Date: Tue, 2 May 2017 11:06:21 +0200 Subject: test --- src/client/toolbar/toolbar.cpp | 13 ++++++++++--- 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(); -- cgit v1.2.3-55-g7522