diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-07-25 01:02:30 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-07-25 01:02:30 +0200 |
commit | 7dfe73df0c26733d68abc576c3eefab1a69e2149 (patch) | |
tree | 0e490b13ad475f0d551f8087851f83869589eb09 /application/widgets/WideBar.h | |
parent | c3e61536a3ba7b0dca1171df36e9aeb09b6e2a0d (diff) | |
download | MultiMC-7dfe73df0c26733d68abc576c3eefab1a69e2149.tar MultiMC-7dfe73df0c26733d68abc576c3eefab1a69e2149.tar.gz MultiMC-7dfe73df0c26733d68abc576c3eefab1a69e2149.tar.lz MultiMC-7dfe73df0c26733d68abc576c3eefab1a69e2149.tar.xz MultiMC-7dfe73df0c26733d68abc576c3eefab1a69e2149.zip |
NOISSUE add context menus to pages with toolbars
Diffstat (limited to 'application/widgets/WideBar.h')
-rw-r--r-- | application/widgets/WideBar.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/application/widgets/WideBar.h b/application/widgets/WideBar.h index e5a1a737..d1b8cbe7 100644 --- a/application/widgets/WideBar.h +++ b/application/widgets/WideBar.h @@ -4,6 +4,8 @@ #include <QAction> #include <QMap> +class QMenu; + class WideBar : public QToolBar { Q_OBJECT @@ -11,10 +13,14 @@ class WideBar : public QToolBar public: explicit WideBar(const QString &title, QWidget * parent = nullptr); explicit WideBar(QWidget * parent = nullptr); + virtual ~WideBar(); void addAction(QAction *action); + void addSeparator(); void insertSpacer(QAction *action); + QMenu *createContextMenu(QWidget *parent = nullptr, const QString & title = QString()); private: - QMap<QAction *, QAction *> m_actionMap; + struct BarEntry; + QList<BarEntry *> m_entries; }; |