diff options
author | Björn Hagemeister | 2014-05-06 15:42:33 +0200 |
---|---|---|
committer | Björn Hagemeister | 2014-05-06 15:42:33 +0200 |
commit | 8e774982be169f33fe4f4c687885d96f1c4e5ab4 (patch) | |
tree | f4d8042b531ef15024cd9e56a9569f3939950e96 /src/client/toolbar/toolbar.cpp | |
parent | New Feature: Showing client toolbar while vnc server is running. (diff) | |
parent | Merge branch 'master' of git.openslx.org:pvs2 (diff) | |
download | pvs2-8e774982be169f33fe4f4c687885d96f1c4e5ab4.tar.gz pvs2-8e774982be169f33fe4f4c687885d96f1c4e5ab4.tar.xz pvs2-8e774982be169f33fe4f4c687885d96f1c4e5ab4.zip |
Merge branch 'master' of git.openslx.org:pvs2
Conflicts:
src/client/connectwindow/connectwindow.h
Diffstat (limited to 'src/client/toolbar/toolbar.cpp')
-rw-r--r-- | src/client/toolbar/toolbar.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp index 8e80fe3..f45d63a 100644 --- a/src/client/toolbar/toolbar.cpp +++ b/src/client/toolbar/toolbar.cpp @@ -5,20 +5,26 @@ * Author: sr */ -#include "toolbar.h" #include "../../shared/settings.h" #include "../net/serverconnection.h" #include "../vnc/vncwindow.h" #include "../vnc/vncserver.h" +#include "toolbar.h" +#include "ui_toolbar.h" + Toolbar::Toolbar(QWidget *parent) : - QWidget(parent), _location(POSITION_TOP_CENTER), _hideTimer(0), _connection(NULL) + QWidget(parent), _ui(new Ui::Toolbar), _location(POSITION_TOP_CENTER), + _hideTimer(0), _connection(NULL) { - setupUi(this); + // Initialize the GUI + _ui->setupUi(this); + setWindowFlags(Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint); setAttribute(Qt::WA_AlwaysShowToolTips); setAttribute(Qt::WA_QuitOnClose); setVisible(true); + // VNC Window _vnc = new VncWindow(NULL); // Connect window @@ -45,7 +51,7 @@ void Toolbar::setupMenu() _menu->addSeparator(); _menu->addAction(_acnQuit); - cmdMenu->setMenu(_menu); + _ui->cmdMenu->setMenu(_menu); connect(_acnQuit, SIGNAL(triggered()), this, SLOT(onQuit())); connect(_acnDisconnect, SIGNAL(triggered()), _connectWindow, SLOT(show())); @@ -56,6 +62,7 @@ Toolbar::~Toolbar() VncServer::instance()->stop(); _vnc->deleteLater(); _connectWindow->deleteLater(); + delete _ui; } //###########\\/\/ @@ -177,14 +184,14 @@ void Toolbar::onDisconnected() if (_connection != NULL) _connection->blockSignals(true); _connection = NULL; - lblStatus->setStyleSheet("color:red"); - lblStatus->setText(tr("Offline")); + _ui->lblStatus->setStyleSheet("color:red"); + _ui->lblStatus->setText(tr("Offline")); } void Toolbar::onConnected(ServerConnection* connection) { - lblStatus->setStyleSheet("color:green"); - lblStatus->setText(tr("Online")); + _ui->lblStatus->setStyleSheet("color:green"); + _ui->lblStatus->setText(tr("Online")); // if (_connection != NULL) { |