From 87eaae3e4e2f6d542956df870609b798b9fa9d26 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 19 Jul 2018 17:20:30 +0200 Subject: [server] Offer deleting temp. clients on session name change If the user changes the session name, we now ask whether to disconnect and delete all clients that just connected via session name and don't belong to the currently loaded room layout. --- src/server/connectionframe/connectionframe.cpp | 6 ++---- src/server/connectionframe/connectionframe.h | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/connectionframe') diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp index 85d2e32..fb2c96a 100644 --- a/src/server/connectionframe/connectionframe.cpp +++ b/src/server/connectionframe/connectionframe.cpp @@ -68,9 +68,9 @@ bool ConnectionFrame::paintDisabled = false; * @param width * @param height */ -ConnectionFrame::ConnectionFrame(MainWindow* main, QWidget *parent) : +ConnectionFrame::ConnectionFrame(MainWindow* main, QWidget *parent, bool fromRoomplan) : QGroupBox(parent), _client(NULL), _timerId(0), _timerCounter(0), _isSelected(false), _isTutor(false), - _mainWindow(main) + _isFromRoomplan(fromRoomplan), _mainWindow(main) { //defines the ui-stuff @@ -82,8 +82,6 @@ ConnectionFrame::ConnectionFrame(MainWindow* main, QWidget *parent) : lock = new QIcon(":cf_lock"); } - //this->setAttribute(Qt::WA_OpaquePaintEvent); - _mainLayout = new QBoxLayout(QBoxLayout::TopToBottom, this); _mainLayout->setSpacing(1); _mainLayout->setMargin(3); diff --git a/src/server/connectionframe/connectionframe.h b/src/server/connectionframe/connectionframe.h index 72f57f3..4558406 100644 --- a/src/server/connectionframe/connectionframe.h +++ b/src/server/connectionframe/connectionframe.h @@ -38,6 +38,7 @@ private: int _timerId, _timerCounter; bool _isSelected; bool _isTutor; + bool _isFromRoomplan; static const int _startDragDistance = 40; @@ -50,7 +51,7 @@ public: static bool paintDisabled; - ConnectionFrame(MainWindow* main, QWidget* parent); + ConnectionFrame(MainWindow* main, QWidget* parent, bool fromRoomplan = false); virtual ~ConnectionFrame(); const inline QPoint getGridPosition() const { return _gridPosition; } @@ -68,6 +69,7 @@ public: Client* client() const { return _client; } inline bool isTutor() { return _isTutor; } + inline bool isFromRoomplan() { return _isFromRoomplan; } void setTutor(bool b); protected: -- cgit v1.2.3-55-g7522