summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schulthess2017-04-12 12:46:06 +0200
committerChristoph Schulthess2017-04-12 12:46:06 +0200
commit5ff6e2763a654710c5fc794cc66836667ef6f5cf (patch)
tree7f2a87bd8472ac87aee61a388baac61179e69d6c
parentTesting (diff)
downloadpvs2-5ff6e2763a654710c5fc794cc66836667ef6f5cf.tar.gz
pvs2-5ff6e2763a654710c5fc794cc66836667ef6f5cf.tar.xz
pvs2-5ff6e2763a654710c5fc794cc66836667ef6f5cf.zip
changed button func
-rw-r--r--src/client/toolbar/toolbar.cpp17
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();
}