From 899eeb4975efa9458fe32ffec162014cb8324c86 Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Thu, 22 May 2014 15:05:07 +0200 Subject: Changed the blinking red dot in toolbar while beeing vnc server to blinking eye. --- gui/client/toolbar.ui | 6 ++++++ pvsclient.qrc | 1 + src/client/toolbar/toolbar.cpp | 14 +++++++------- src/client/toolbar/toolbar.h | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/gui/client/toolbar.ui b/gui/client/toolbar.ui index 3e39e16..d2bf09a 100644 --- a/gui/client/toolbar.ui +++ b/gui/client/toolbar.ui @@ -153,6 +153,12 @@ p, li { white-space: pre-wrap; } + + + 16 + 16 + + 16 diff --git a/pvsclient.qrc b/pvsclient.qrc index 3432a62..3f3a607 100644 --- a/pvsclient.qrc +++ b/pvsclient.qrc @@ -6,6 +6,7 @@ icons/ok16.svg icons/cam32.svg + icons/eye.svg icons/cam_on32.svg icons/cam_off32.svg icons/chat_msg16.svg diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp index 6d9e9a5..7731eca 100644 --- a/src/client/toolbar/toolbar.cpp +++ b/src/client/toolbar/toolbar.cpp @@ -24,7 +24,7 @@ */ Toolbar::Toolbar(QWidget *parent) : QWidget(parent), _ui(new Ui::Toolbar), _hideTimer(this), _connection(NULL), - _blinkTimer(this),_cam32(":cam32.svg"), _camOff32(":cam_off32.svg") + _blinkTimer(this),_cam32(":cam32.svg"), _beWatchedEye(":eye") { /* Initialize the GUI */ _ui->setupUi(this); @@ -130,16 +130,16 @@ void Toolbar::enterEvent(QEvent* e) */ void Toolbar::cameraBlink() { - static bool showRedDot = false; - if (!showRedDot) + static bool showEye = false; + if (!showEye) { - _ui->icon_cam->setPixmap(_camOff32); - showRedDot = true; + _ui->icon_cam->setPixmap(_beWatchedEye); + showEye = true; } else { - _ui->icon_cam->setPixmap(_cam32); - showRedDot = false; + _ui->icon_cam->setPixmap(QPixmap()); // set empty pixmap for blinking effect + showEye = false; } } diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h index de09b87..f01e4ef 100644 --- a/src/client/toolbar/toolbar.h +++ b/src/client/toolbar/toolbar.h @@ -43,7 +43,7 @@ private: QTimer _blinkTimer; ServerConnection *_connection; VncWindow *_vnc; - const QPixmap _cam32, _camOff32; + const QPixmap _cam32, _beWatchedEye; void leaveEvent(QEvent* e); void enterEvent(QEvent* e); -- cgit v1.2.3-55-g7522