diff options
Diffstat (limited to 'src/server/connectionframe')
| -rw-r--r-- | src/server/connectionframe/connectionframe.cpp | 9 | ||||
| -rw-r--r-- | src/server/connectionframe/connectionframe.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp index 1544c76..6bfce81 100644 --- a/src/server/connectionframe/connectionframe.cpp +++ b/src/server/connectionframe/connectionframe.cpp @@ -110,6 +110,7 @@ void ConnectionFrame::assignClient(Client* client) if (_timerId == 0) _timerId = startTimer(1000 + qrand() % 150); this->updateColor(); + _client->setTutor(_isTutor); } void ConnectionFrame::showDefaultThumb() @@ -213,6 +214,14 @@ void ConnectionFrame::setSelection(bool selected) this->updateColor(); } +void ConnectionFrame::setTutor(bool b) +{ + if (_isTutor != b && _client != NULL) + _client->setTutor(b); + _isTutor = b; + this->updateColor(); +} + void ConnectionFrame::updateColor() { if (_client == NULL) diff --git a/src/server/connectionframe/connectionframe.h b/src/server/connectionframe/connectionframe.h index 2b78056..ccb32a8 100644 --- a/src/server/connectionframe/connectionframe.h +++ b/src/server/connectionframe/connectionframe.h @@ -50,7 +50,7 @@ public: Client* client() const { return _client; } inline const bool isTutor() const { return _isTutor; } - inline void setTutor(bool b) { _isTutor = b; } + void setTutor(bool b); protected: void mouseDoubleClickEvent(QMouseEvent* event); |
