diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-01-12 19:02:25 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-01-12 19:02:25 +0000 |
| commit | 903b18a193ea4a647b0ac2eaf8698e5c6b3bff7a (patch) | |
| tree | 976de1e4031a232700d9c38fb24aec7288825f47 /src/qmmpui/generalhandler.h | |
| parent | 3cc0b2fa0f81e2ee09c3ae3d92d31c88ac5b9b6b (diff) | |
| download | qmmp-903b18a193ea4a647b0ac2eaf8698e5c6b3bff7a.tar.gz qmmp-903b18a193ea4a647b0ac2eaf8698e5c6b3bff7a.tar.bz2 qmmp-903b18a193ea4a647b0ac2eaf8698e5c6b3bff7a.zip | |
menu support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@741 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/generalhandler.h')
| -rw-r--r-- | src/qmmpui/generalhandler.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/qmmpui/generalhandler.h b/src/qmmpui/generalhandler.h index 689170fce..73386ac0a 100644 --- a/src/qmmpui/generalhandler.h +++ b/src/qmmpui/generalhandler.h @@ -22,6 +22,12 @@ #include <QObject> #include <QMap> +#include <QList> +#include <QPointer> + +class QAction; +class QMenu; +class QWidget; class General; class Control; @@ -31,6 +37,8 @@ class CommandLineManager; /** @author Ilya Kotov <forkotov02@hotmail.ru> */ + +//TODO add documentation class GeneralHandler : public QObject { Q_OBJECT @@ -39,10 +47,22 @@ public: ~GeneralHandler(); + enum MenuType + { + TOOLS_MENU = 0, + PLAYLIST_MENU + }; + void setEnabled(GeneralFactory* factory, bool enable); void showSettings(GeneralFactory* factory, QWidget* parentWidget); bool visibilityControl(); void executeCommand(const QString &opt_str); + //actions + void addAction(QAction *action, MenuType type = TOOLS_MENU); + void removeAction(QAction *action); + QList<QAction *> actions(MenuType type = TOOLS_MENU); + QMenu *createMenu(MenuType type, const QString &title = QString(), QWidget *parent = 0); + static GeneralHandler* instance(); signals: @@ -52,6 +72,10 @@ signals: private: QMap <GeneralFactory*, General*> m_generals; CommandLineManager *m_commandLineManager; + QList <QAction*> m_toolsActions; + QList <QAction*> m_playlistActions; + QPointer<QMenu> m_toolsMenu; + QPointer<QMenu> m_playlistMenu; static GeneralHandler* m_instance; }; |
