summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-21 18:48:31 +0200
committerSimon Rettberg2016-10-21 18:48:31 +0200
commitcc3d9f5c379c70e4f16f60afc493d82db962db2b (patch)
treee40385171fb436c85963a1603fae2b591c8af949 /src
parentMerge branch 'master' of openslx.org:pvs2 (diff)
downloadpvs2-cc3d9f5c379c70e4f16f60afc493d82db962db2b.tar.gz
pvs2-cc3d9f5c379c70e4f16f60afc493d82db962db2b.tar.xz
pvs2-cc3d9f5c379c70e4f16f60afc493d82db962db2b.zip
[client] Add icon to attention button, hide button when disconnected
Diffstat (limited to 'src')
-rw-r--r--src/client/toolbar/toolbar.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 10f9d22..c1b5b7a 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -18,7 +18,6 @@
#include "toolbar.h"
#include "ui_toolbar.h"
-
/***************************************************************************//**
* @brief
*
@@ -128,7 +127,11 @@ void Toolbar::init()
_ui->btnLockDesktop->setVisible(false);
}
+ /* hide attention button while disconnected */
+ _ui->btnAttention->setVisible(false);
+
connect(_ui->btnAttention, SIGNAL(toggled(bool)), this, SLOT(onBtnAttention()));
+ _ui->btnAttention->setMaximumWidth(30);
/* Connect the signals from vnc server */
connect(VncServer::instance(), SIGNAL(started(int, QString&, QString&)), this, SLOT(onVncServerIsRunning(int)));
@@ -379,6 +382,7 @@ void Toolbar::onDisconnected()
this->_acnConnect->setEnabled(true);
this->_acnDisconnect->setEnabled(false);
+ _ui->btnAttention->setVisible(false);
onBtnAttention();
_hideTimer.start();
}
@@ -397,6 +401,8 @@ void Toolbar::onConnected(ServerConnection* connection)
_ui->btnAttention->setChecked(false);
_ui->lblStatus->setStyleSheet("color:green");
_ui->lblStatus->setText(tr("Online"));
+ /* connected, show button */
+ _ui->btnAttention->setVisible(true);
//
if (_connection != NULL) {
disconnect(_connection, SIGNAL(disconnected()), this, SLOT(onDisconnected()));
@@ -489,7 +495,6 @@ void Toolbar::onBtnAttention()
if (_connection != NULL) {
_connection->sendAttention(on);
}
- _ui->btnAttention->setStyleSheet(on ? "color:red" : "");
}
/** call script to switch to workspace of the manager */