From 77df580e0d46e7f64a3f1bd835f8d6faa5c4efa0 Mon Sep 17 00:00:00 2001 From: Christoph Schulthess Date: Mon, 6 Mar 2017 14:09:06 +0100 Subject: added btnCustom and function onBtnCustom --- src/client/toolbar/toolbar.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/client/toolbar/toolbar.cpp') diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp index 19c44cc..424e393 100644 --- a/src/client/toolbar/toolbar.cpp +++ b/src/client/toolbar/toolbar.cpp @@ -109,6 +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(toggled(bool)), this, SLOT(onBtnCustom())); /* Setup menu */ initMenu(); @@ -494,6 +495,18 @@ void Toolbar::onBtnManager() switchP.waitForFinished(); } +void Toolbar::onBtnCustom() +{ + QProcess runDbg; + const bool on = _ui->btnCustom->isChecked(); + if (on) { + runDbg.start("/bin/sh", QStringList() << "/etc/start_debug_TLS.sh"); + } else { + runDbg.start("/bin/sh", QStringList() << "/etc/stop_debug.sh"); + } + runDbg.waitForFinished(); +} + void Toolbar::onBtnLockDesktop() { if (this->lockDesktopP.state() == QProcess::NotRunning) { -- cgit v1.2.3-55-g7522