1 // Copyright 2005-2019 The Mumble Developers. All rights reserved. 2 // Use of this source code is governed by a BSD-style license 3 // that can be found in the LICENSE file at the root of the 4 // Mumble source tree or at <https://www.mumble.info/LICENSE>. 5 6 #ifndef MUMBLE_MUMBLE_OVERLAYUSERGROUP_H_ 7 #define MUMBLE_MUMBLE_OVERLAYUSERGROUP_H_ 8 9 #include "Overlay.h" 10 11 class OverlayUser; 12 13 class OverlayUserGroup : public QObject, public OverlayGroup { 14 private: 15 Q_OBJECT 16 Q_DISABLE_COPY(OverlayUserGroup); 17 public: 18 enum { Type = UserType + 3 }; 19 protected: 20 OverlaySettings *os; 21 22 QMap<QObject *, OverlayUser *> qmUsers; 23 QList<OverlayUser *> qlExampleUsers; 24 25 QGraphicsEllipseItem *qgeiHandle; 26 27 void contextMenuEvent(QGraphicsSceneContextMenuEvent *e) Q_DECL_OVERRIDE; 28 void wheelEvent(QGraphicsSceneWheelEvent *e) Q_DECL_OVERRIDE; 29 bool sceneEventFilter(QGraphicsItem *, QEvent *e) Q_DECL_OVERRIDE; 30 protected slots: 31 void userDestroyed(QObject *); 32 void moveUsers(); 33 public: 34 bool bShowExamples; 35 36 OverlayUserGroup(OverlaySettings *); 37 ~OverlayUserGroup() Q_DECL_OVERRIDE; 38 39 int type() const Q_DECL_OVERRIDE; 40 public slots: 41 void reset(); 42 void updateUsers(); 43 void updateLayout(); 44 }; 45 46 #endif 47