summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schulthess2017-03-06 14:09:06 +0100
committerChristoph Schulthess2017-03-06 14:09:06 +0100
commit77df580e0d46e7f64a3f1bd835f8d6faa5c4efa0 (patch)
tree774d393a0e70ce8c9ffac5e0d8dc85107a3cce1c
parentinitial commit pvs2 remote-debugging button (diff)
downloadpvs2-77df580e0d46e7f64a3f1bd835f8d6faa5c4efa0.tar.gz
pvs2-77df580e0d46e7f64a3f1bd835f8d6faa5c4efa0.tar.xz
pvs2-77df580e0d46e7f64a3f1bd835f8d6faa5c4efa0.zip
added btnCustom and function onBtnCustom
-rw-r--r--gui/client/toolbar.ui12
-rw-r--r--src/client/toolbar/toolbar.cpp13
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 @@
<rect>
<x>0</x>
<y>0</y>
- <width>577</width>
+ <width>630</width>
<height>30</height>
</rect>
</property>
@@ -66,11 +66,11 @@ QCheckBox::indicator:checked:pressed {
}
</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
- <item>
+ <item row="0" column="0">
<widget class="QFrame" name="frame">
<property name="autoFillBackground">
<bool>false</bool>
@@ -273,10 +273,10 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
- <widget class="QPushButton" name="remoteDebugging">
+ <widget class="QPushButton" name="btnCustom">
<property name="minimumSize">
<size>
- <width>144</width>
+ <width>84</width>
<height>24</height>
</size>
</property>
@@ -287,7 +287,7 @@ p, li { white-space: pre-wrap; }
</size>
</property>
<property name="text">
- <string>Request Debugging</string>
+ <string>Custom Script</string>
</property>
<property name="checkable">
<bool>true</bool>
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) {