From 6534027c5ce5579c4293aa346cadf0850aa02157 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 19 Oct 2016 23:56:34 +0200 Subject: Implement "Attention" feature (virtual hand-raising) --- src/server/connectionframe/connectionframe.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/server/connectionframe/connectionframe.cpp') diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp index a7427c6..4228441 100644 --- a/src/server/connectionframe/connectionframe.cpp +++ b/src/server/connectionframe/connectionframe.cpp @@ -28,13 +28,21 @@ static QString style_tutor( "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \ QGroupBox { background-color: #70C670; margin: 2px; border-radius: 4px}" ); +static QString style_attention( + "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \ + QGroupBox { background-color: #C88; margin: 2px; border-radius: 4px}" +); static QString style_selectedStudent( "QLabel{ background-color: #FFF; border-radius: 2px; color: black; } \ QGroupBox { background-color: #ccebff; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}" ); static QString style_selectedTutor( "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \ - QGroupBox { background-color: #99ff99; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}" + QGroupBox { background-color: #9f9; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}" +); +static QString style_selectedAttention( + "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \ + QGroupBox { background-color: #E99; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}" ); static QString style_exam ( "QLabel{ background-color: #919191; color: black; } \ @@ -45,7 +53,7 @@ static QString style_exam_selected ( QGroupBox { background-color: #cc743a; margin: 1px; border-radius: 4px}" ); static QString style_disconnected( - "QLabel{ background-color: #919191; color: black; } \ + "QLabel{ background-color: #919191; border-radius: 2px; color: black; } \ QGroupBox { background-color: #7F7F7F; margin: 1px; border-radius: 4px}" ); @@ -355,6 +363,10 @@ void ConnectionFrame::updateAppearance() this->setStyleSheet(style_selectedTutor); } else if (_isTutor) { this->setStyleSheet(style_tutor); + } else if (_isSelected && _client->wantsAttention()) { + this->setStyleSheet(style_selectedAttention); + } else if (_client->wantsAttention()) { + this->setStyleSheet(style_attention); } else if (_client->isExamMode()) { if (_isSelected) { this->setStyleSheet(style_exam_selected); -- cgit v1.2.3-55-g7522