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 --- gui/client/toolbar.ui | 12 ++++++------ src/client/toolbar/toolbar.cpp | 13 +++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/gui/client/toolbar.ui b/gui/client/toolbar.ui index 3fe56a4..aabd30a 100644 --- a/gui/client/toolbar.ui +++ b/gui/client/toolbar.ui @@ -6,7 +6,7 @@ 0 0 - 577 + 630 30 @@ -66,11 +66,11 @@ QCheckBox::indicator:checked:pressed { } - + 0 - + false @@ -273,10 +273,10 @@ p, li { white-space: pre-wrap; } - + - 144 + 84 24 @@ -287,7 +287,7 @@ p, li { white-space: pre-wrap; } - Request Debugging + Custom Script true 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