summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-05-22 15:05:07 +0200
committerBjörn Hagemeister2014-05-22 15:05:07 +0200
commit899eeb4975efa9458fe32ffec162014cb8324c86 (patch)
treea17c723830d3109b0c88a1255b24eb5f1a3b0dee
parentRefactor ambigious projectionsSoure to BroadcastSource (diff)
downloadpvs2-899eeb4975efa9458fe32ffec162014cb8324c86.tar.gz
pvs2-899eeb4975efa9458fe32ffec162014cb8324c86.tar.xz
pvs2-899eeb4975efa9458fe32ffec162014cb8324c86.zip
Changed the blinking red dot in toolbar while beeing vnc server to blinking eye.
-rw-r--r--gui/client/toolbar.ui6
-rw-r--r--pvsclient.qrc1
-rw-r--r--src/client/toolbar/toolbar.cpp14
-rw-r--r--src/client/toolbar/toolbar.h2
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; }
</item>
<item>
<widget class="QLabel" name="icon_cam">
+ <property name="minimumSize">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
<property name="maximumSize">
<size>
<width>16</width>
diff --git a/pvsclient.qrc b/pvsclient.qrc
index 3432a62..3f3a607 100644
--- a/pvsclient.qrc
+++ b/pvsclient.qrc
@@ -6,6 +6,7 @@
<file alias="ok16.svg">icons/ok16.svg</file>
<file alias="cam32.svg">icons/cam32.svg</file>
+ <file alias="eye">icons/eye.svg</file>
<file alias="cam_on32.svg">icons/cam_on32.svg</file>
<file alias="cam_off32.svg">icons/cam_off32.svg</file>
<file alias="chat_msg16.svg">icons/chat_msg16.svg</file>
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);