aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/uihelper.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-04-18 09:34:27 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-04-18 09:34:27 +0000
commit67d105bf5e0d6e05f9f606b27df2145727c9c4e6 (patch)
tree0a7b5d09c88d3f2e38bfdaa78ce6ccba1d6c8753 /src/qmmpui/uihelper.h
parent0140e8d79c40c90a49b6be41ce6466eb23cc126e (diff)
downloadqmmp-67d105bf5e0d6e05f9f606b27df2145727c9c4e6.tar.gz
qmmp-67d105bf5e0d6e05f9f606b27df2145727c9c4e6.tar.bz2
qmmp-67d105bf5e0d6e05f9f606b27df2145727c9c4e6.zip
auto-hide empty service menus
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8783 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/uihelper.h')
-rw-r--r--src/qmmpui/uihelper.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qmmpui/uihelper.h b/src/qmmpui/uihelper.h
index ff8521271..2367b62f4 100644
--- a/src/qmmpui/uihelper.h
+++ b/src/qmmpui/uihelper.h
@@ -88,14 +88,14 @@ public:
* @param title Menu title.
* @param parent Parent widget
*/
- QMenu *createMenu(MenuType type, const QString &title = QString(), QWidget *parent = nullptr);
+ QMenu *createMenu(MenuType type, const QString &title = QString(), bool autoHide = true, QWidget *parent = nullptr);
/*!
* Registers existing menu for access from general plugins.
* @param type Menu type.
* @param menu Menu pointer.
* @param before An action, after which the rest are added.
*/
- void registerMenu(MenuType type, QMenu *menu, QAction *before = nullptr);
+ void registerMenu(MenuType type, QMenu *menu, bool autoHide = false, QAction *before = nullptr);
/*!
* Opens 'Add Files' dialog
* @param parent Parent widget
@@ -194,11 +194,12 @@ private:
QPointer<QMenu> menu;
QPointer<QAction> before;
QList<QAction*> actions;
+ bool autoHide = false;
};
QMap<MenuType, MenuData> m_menus;
QString m_lastDir;
QPointer <JumpToTrackDialog> m_jumpDialog;
- PlayListModel *m_model;
+ PlayListModel *m_model = nullptr;
static UiHelper* m_instance;
};