aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/playerlistwidget.h
diff options
context:
space:
mode:
authorSalanto <62221668+Salanto@users.noreply.github.com>2025-05-08 21:21:37 +0200
committerGitHub <noreply@github.com>2025-05-08 14:21:37 -0500
commit4db979187386326df64b9359b8de5e90468f7fc3 (patch)
tree802d5654730a20bf4ebfb12d38b26b5f4caac192 /src/widgets/playerlistwidget.h
parentcde34538dc6045223c965958535218a38d22b2ee (diff)
Close punishment dialog when the user leaves (#1097)
* Close punishment dialog when the user leaves Prevents silly moments where the wrong person gets banned/kicked * Fix formatting --------- Co-authored-by: stonedDiscord <Tukz@gmx.de>
Diffstat (limited to 'src/widgets/playerlistwidget.h')
-rw-r--r--src/widgets/playerlistwidget.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/playerlistwidget.h b/src/widgets/playerlistwidget.h
index 7886e28a..6fa929db 100644
--- a/src/widgets/playerlistwidget.h
+++ b/src/widgets/playerlistwidget.h
@@ -5,11 +5,14 @@
#include <QList>
#include <QListWidget>
#include <QMap>
+#include <QPointer>
class AOApplication;
+class ModeratorDialog;
class PlayerListWidget : public QListWidget
{
+ Q_OBJECT
public:
explicit PlayerListWidget(AOApplication *ao_app, QWidget *parent = nullptr);
virtual ~PlayerListWidget();
@@ -24,6 +27,7 @@ private:
AOApplication *ao_app;
QMap<int, PlayerData> m_player_map;
QMap<int, QListWidgetItem *> m_item_map;
+ QPair<int, QPointer<ModeratorDialog>> active_moderator_menu;
bool m_is_authenticated = false;
void addPlayer(int playerId);
@@ -34,6 +38,9 @@ private:
void filterPlayerList();
+Q_SIGNALS:
+ void notify(const QString &messasge);
+
private Q_SLOTS:
void onCustomContextMenuRequested(const QPoint &pos);
};