summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorManuel Schneider2014-05-27 13:12:00 +0200
committerManuel Schneider2014-05-27 13:12:00 +0200
commit2d5669c4974feedbc2beaec90bf42c37c2dbd773 (patch)
treed2187ec41ef09ece91a8b6b5c3cd7aa589d43fbb /src
parentDrop _isBroadcastSource. The client must not know anything about the management. (diff)
downloadpvs2-2d5669c4974feedbc2beaec90bf42c37c2dbd773.tar.gz
pvs2-2d5669c4974feedbc2beaec90bf42c37c2dbd773.tar.xz
pvs2-2d5669c4974feedbc2beaec90bf42c37c2dbd773.zip
Add icon for locked screen. Add monochrome and stylized connectionframe icons.
Diffstat (limited to 'src')
-rw-r--r--src/server/connectionframe/connectionframe.cpp12
-rw-r--r--src/server/connectionframe/connectionframe.h2
-rw-r--r--src/server/net/client.cpp5
-rw-r--r--src/server/net/client.h2
4 files changed, 15 insertions, 6 deletions
diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp
index 444902e..b09139c 100644
--- a/src/server/connectionframe/connectionframe.cpp
+++ b/src/server/connectionframe/connectionframe.cpp
@@ -41,7 +41,7 @@ static QString style_disconnected(
QGroupBox { background-color: #7F7F7F; margin: 1px; border-radius: 4px}"
);
-static QIcon *term = NULL, *cam = NULL, *eye = NULL;
+static QIcon *term = NULL, *cam = NULL, *eye = NULL, *lock = NULL;
/**
* Initialize frame for connected client.
@@ -58,8 +58,9 @@ ConnectionFrame::ConnectionFrame(QWidget *parent, int width, int height) :
if (term == NULL)
{
term = new QIcon(":terminal");
- cam = new QIcon(":cam32");
- eye = new QIcon(":eye");
+ cam = new QIcon(":cf_cam");
+ eye = new QIcon(":cf_eye");
+ lock = new QIcon(":cf_lock");
}
//this->setAttribute(Qt::WA_OpaquePaintEvent);
@@ -82,12 +83,13 @@ ConnectionFrame::ConnectionFrame(QWidget *parent, int width, int height) :
_icoCam = addIcon(cam);
_icoEye = addIcon(eye);
+ _icoLock = addIcon(lock);
_iconLayout->addWidget(_icoCam);
_iconLayout->addWidget(_icoEye);
+ _iconLayout->addWidget(_icoLock);
_iconLayout->addStretch();
- //_layout->addWidget(_imgScreen);
_mainLayout->addLayout(_iconLayout);
_mainLayout->addStretch();
_mainLayout->addWidget(_lblUserName);
@@ -141,6 +143,7 @@ void ConnectionFrame::assignClient(Client* client)
connect( client, SIGNAL(thumbUpdated(Client*, const QPixmap&)), this, SLOT(onThumbUpdated(Client*, const QPixmap&)) );
connect( client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(updateAppearance()));
connect( client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(updateAppearance()));
+ connect( client, SIGNAL(stateChanged()), this, SLOT(updateAppearance()));
_client = client;
_computerId = client->ip();
_lblHostName->setText(client->ip());
@@ -329,6 +332,7 @@ void ConnectionFrame::updateAppearance()
}
_icoCam->setVisible(_client->isActiveVncServer());
_icoEye->setVisible(_client->isActiveVncClient());
+ _icoLock->setVisible(_client->isLocked());
// Normal client, no special stuff active
diff --git a/src/server/connectionframe/connectionframe.h b/src/server/connectionframe/connectionframe.h
index cfb7fa3..72f641d 100644
--- a/src/server/connectionframe/connectionframe.h
+++ b/src/server/connectionframe/connectionframe.h
@@ -21,7 +21,7 @@ private:
QLabel *_lblUserName;
QLabel *_lblHostName;
- QLabel *_icoCam, *_icoEye;
+ QLabel *_icoCam, *_icoEye, *_icoLock;
QList<QLabel*> _icons;
QPixmap _remoteScreen;
diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp
index 97d3ed3..abd739d 100644
--- a/src/server/net/client.cpp
+++ b/src/server/net/client.cpp
@@ -23,6 +23,7 @@ Client::Client(QSslSocket* socket) : _socket(socket)
_currentProjectionSource = 0;
_vncPort = 0;
_isTutor = false;
+ _locked = false;
_id = ++_clientIdCounter;
//_ip = _socket->peerAddress().toString();
@@ -183,6 +184,7 @@ void Client::handleMsg()
}
_vncPort = port;
emit vncServerStateChange(this);
+ emit stateChanged();
}
else if (id == _VNCCLIENT)
{
@@ -200,7 +202,7 @@ void Client::handleMsg()
_currentProjectionSource = 0;
emit vncClientStateChange(this);
}
-
+ emit stateChanged();
}
return;
}
@@ -319,6 +321,7 @@ void Client::lockScreen(bool lock)
msg.setField(_ENABLE, lock ? __TRUE : __FALSE);
sendMessage(msg);
}
+ emit stateChanged();
}
/******************************************************************************/
diff --git a/src/server/net/client.h b/src/server/net/client.h
index 61d1740..d5942e8 100644
--- a/src/server/net/client.h
+++ b/src/server/net/client.h
@@ -36,6 +36,7 @@ public:
inline const int currentProjectionSource() const { return _currentProjectionSource; }
inline const bool isActiveVncClient() const { return _currentProjectionSource > 0; }
inline const bool isActiveVncServer() const { return _vncPort > 0; }
+ inline const bool isLocked() const { return _locked; }
// Setters
inline void setTutor(bool enable){ _isTutor = enable; }
@@ -79,6 +80,7 @@ signals:
void thumbUpdated(Client* client, const QPixmap& thumb);
void vncServerStateChange(Client* client);
void vncClientStateChange(Client* client);
+ void stateChanged();
void disconnected();
private slots: