diff options
author | Christoph Schulthess | 2017-04-12 12:46:06 +0200 |
---|---|---|
committer | Christoph Schulthess | 2017-04-12 12:46:06 +0200 |
commit | 5ff6e2763a654710c5fc794cc66836667ef6f5cf (patch) | |
tree | 7f2a87bd8472ac87aee61a388baac61179e69d6c /src/client | |
parent | Testing (diff) | |
download | pvs2-5ff6e2763a654710c5fc794cc66836667ef6f5cf.tar.gz pvs2-5ff6e2763a654710c5fc794cc66836667ef6f5cf.tar.xz pvs2-5ff6e2763a654710c5fc794cc66836667ef6f5cf.zip |
changed button func
Diffstat (limited to 'src/client')
-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(); } |