NOISSUE add context menus to pages with toolbars
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user