diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-09-26 18:42:42 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-09-26 18:42:42 +0000 |
| commit | a65bebd9b402963f429afb78b3e4d943cb9bb979 (patch) | |
| tree | 2b3d4ae04d91dff3ec05d0f1ca3881e5ce5815de /src/qmmpui/uihelper.h | |
| parent | 4bb84c0877c7d1d7b6661bf55edfe681ab8c22f9 (diff) | |
| download | qmmp-a65bebd9b402963f429afb78b3e4d943cb9bb979.tar.gz qmmp-a65bebd9b402963f429afb78b3e4d943cb9bb979.tar.bz2 qmmp-a65bebd9b402963f429afb78b3e4d943cb9bb979.zip | |
moved stream browser and removable volumes to the add menu
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8380 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/uihelper.h')
| -rw-r--r-- | src/qmmpui/uihelper.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/qmmpui/uihelper.h b/src/qmmpui/uihelper.h index 49636d0f7..46844e788 100644 --- a/src/qmmpui/uihelper.h +++ b/src/qmmpui/uihelper.h @@ -60,7 +60,8 @@ public: enum MenuType { TOOLS_MENU = 0, /*!< tools menu */ - PLAYLIST_MENU /*!< playlist context menu */ + PLAYLIST_MENU, /*!< playlist context menu */ + ADD_MENU }; /*! * Returns \b true if one of the general plugin can change visibility, otherwise returns \b false @@ -88,6 +89,8 @@ public: * @param parent Parent widget */ QMenu *createMenu(MenuType type, const QString &title = QString(), QWidget *parent = 0); + void registerMenu(MenuType type, QMenu *menu, QAction *before = 0); + /*! * Opens 'Add Files' dialog * @param parent Parent widget @@ -181,10 +184,13 @@ private slots: private: QMap <GeneralFactory*, General*> m_generals; - QList <QAction*> m_toolsActions; - QList <QAction*> m_playlistActions; - QPointer<QMenu> m_toolsMenu; - QPointer<QMenu> m_playlistMenu; + struct MenuData + { + QPointer<QMenu> menu; + QPointer<QAction> before; + QList<QAction*> actions; + }; + QMap<MenuType, MenuData> m_menus; QString m_lastDir; QPointer <JumpToTrackDialog> m_jumpDialog; PlayListModel *m_model; |
