summaryrefslogtreecommitdiffstats
path: root/src/server/connectionframe/connectionframe.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-04-25 14:00:40 +0200
committerManuel Schneider2014-04-25 14:00:40 +0200
commita0e2d6ad19b258f4cd41338fbaa200e5232971ac (patch)
treeedeb53129eb7265b612a3aba17be5d97a9d24273 /src/server/connectionframe/connectionframe.cpp
parentNow handling the _desiredProjectionSource correctly (diff)
downloadpvs2-a0e2d6ad19b258f4cd41338fbaa200e5232971ac.tar.gz
pvs2-a0e2d6ad19b258f4cd41338fbaa200e5232971ac.tar.xz
pvs2-a0e2d6ad19b258f4cd41338fbaa200e5232971ac.zip
More meaningful name
Diffstat (limited to 'src/server/connectionframe/connectionframe.cpp')
-rw-r--r--src/server/connectionframe/connectionframe.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp
index 276a2b6..f5739ee 100644
--- a/src/server/connectionframe/connectionframe.cpp
+++ b/src/server/connectionframe/connectionframe.cpp
@@ -71,7 +71,7 @@ ConnectionFrame::ConnectionFrame(QWidget *parent, int width, int height) :
_mainLayout->addWidget(_lblHostName);
this->setLayout(_mainLayout);
this->setSize(width, height);
- this->updateColor();
+ this->updateAppearance();
}
ConnectionFrame::~ConnectionFrame()
@@ -97,10 +97,14 @@ void ConnectionFrame::setSize(int width, int height)
void ConnectionFrame::assignClient(Client* client)
{
assert(_client == NULL);
- connect(client, SIGNAL(disconnected()), this, SLOT(onClientDisconnected()));
- connect(client, SIGNAL(thumbUpdated(Client*, const QPixmap&)), this, SLOT(onThumbUpdated(Client*, const QPixmap&)));
- connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)));
- connect(client, SIGNAL(vncClientStateChange(Client*, int)), this, SLOT(onVncClientStateChange(Client*, int)));
+ connect( client, SIGNAL(disconnected()),
+ this, SLOT(onClientDisconnected()) );
+ connect( client, SIGNAL(thumbUpdated(Client*, const QPixmap&)),
+ this, SLOT(onThumbUpdated(Client*, const QPixmap&)) );
+ connect( client, SIGNAL(vncServerStateChange(Client*)),
+ this, SLOT(onVncServerStateChange(Client*)) );
+ connect( client, SIGNAL(vncClientStateChange(Client*, int)),
+ this, SLOT(onVncClientStateChange(Client*, int)) );
_client = client;
_computerId = client->computerId();
_lblHostName->setText(client->ip());
@@ -109,7 +113,7 @@ void ConnectionFrame::assignClient(Client* client)
showDefaultThumb();
if (_timerId == 0)
_timerId = startTimer(1000 + qrand() % 150);
- this->updateColor();
+ this->updateAppearance();
_client->setTutor(_isTutor);
}
@@ -211,7 +215,7 @@ void ConnectionFrame::setSelection(bool selected)
if (_selected == selected)
return;
_selected = selected;
- this->updateColor();
+ this->updateAppearance();
}
void ConnectionFrame::setTutor(bool b)
@@ -219,10 +223,10 @@ void ConnectionFrame::setTutor(bool b)
if (_isTutor != b && _client != NULL)
_client->setTutor(b);
_isTutor = b;
- this->updateColor();
+ this->updateAppearance();
}
-void ConnectionFrame::updateColor()
+void ConnectionFrame::updateAppearance()
{
if (_client == NULL)
{
@@ -264,7 +268,7 @@ void ConnectionFrame::onClientDisconnected()
_client = NULL;
_lblUserName->setText(QString());
showDefaultThumb();
- this->updateColor();
+ this->updateAppearance();
}
void ConnectionFrame::onThumbUpdated(Client* client, const QPixmap& thumb)
@@ -277,10 +281,10 @@ void ConnectionFrame::onThumbUpdated(Client* client, const QPixmap& thumb)
void ConnectionFrame::onVncServerStateChange(Client* client)
{
- this->updateColor();
+ this->updateAppearance();
}
void ConnectionFrame::onVncClientStateChange(Client* client, int lastSource)
{
- this->updateColor();
+ this->updateAppearance();
}