From f16989bea94163ade99c2c24fc88d53aaff30a8d Mon Sep 17 00:00:00 2001 From: leo78913 Date: Tue, 10 Jan 2023 12:02:02 -0300 Subject: feat(WideBar): custom context menu actions Signed-off-by: leo78913 --- launcher/ui/widgets/WideBar.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'launcher/ui/widgets/WideBar.h') diff --git a/launcher/ui/widgets/WideBar.h b/launcher/ui/widgets/WideBar.h index 59bda514..c47f3a59 100644 --- a/launcher/ui/widgets/WideBar.h +++ b/launcher/ui/widgets/WideBar.h @@ -30,6 +30,8 @@ class WideBar : public QToolBar { QMenu* createContextMenu(QWidget* parent = nullptr, const QString& title = QString()); void showVisibilityMenu(const QPoint&); + void addContextMenuAction(QAction* action); + // Ideally we would use a QBitArray for this, but it doesn't support string conversion, // so using it in settings is very messy. @@ -52,6 +54,8 @@ class WideBar : public QToolBar { private: QList m_entries; + QList m_context_menu_actions; + bool m_use_default_action = false; // Menu to toggle visibility from buttons in the bar -- cgit