|
Qmmp
|
#include <uihelper.h>
Public Types | |
| enum | MenuType { TOOLS_MENU = 0, PLAYLIST_MENU } |
Public Slots | |
| void | toggleVisibility () |
| void | showMainWindow () |
| void | exit () |
Signals | |
| void | toggleVisibilityCalled () |
| void | showMainWindowCalled () |
Public Member Functions | |
| UiHelper (QObject *parent=0) | |
| ~UiHelper () | |
| bool | visibilityControl () |
| 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) |
| void | addFiles (QWidget *parent=qApp->activeWindow(), PlayListModel *model=PlayListManager::instance()->selectedPlayList()) |
| void | playFiles (QWidget *parent=qApp->activeWindow(), PlayListModel *model=PlayListManager::instance()->selectedPlayList()) |
| void | addDirectory (QWidget *parent=qApp->activeWindow(), PlayListModel *model=PlayListManager::instance()->selectedPlayList()) |
| void | addUrl (QWidget *parent=qApp->activeWindow(), PlayListModel *model=PlayListManager::instance()->selectedPlayList()) |
| void | loadPlayList (QWidget *parent=qApp->activeWindow(), PlayListModel *model=PlayListManager::instance()->selectedPlayList()) |
| void | savePlayList (QWidget *parent=qApp->activeWindow(), PlayListModel *model=PlayListManager::instance()->selectedPlayList()) |
| void | jumpToTrack (QWidget *parent=qApp->activeWindow(), PlayListModel *model=PlayListManager::instance()->selectedPlayList()) |
| void | about (QWidget *parent=0) |
Static Public Member Functions | |
| static UiHelper * | instance () |
The UiHelper class provides simple api to access general plugins and some gui features.
| enum MenuType |
| UiHelper | ( | QObject * | parent = 0 | ) |
Object constructor,
| parent | Parent object |
| ~UiHelper | ( | ) |
Destructor
| void about | ( | QWidget * | parent = 0 | ) |
Shows about dialog
| parent | Parent widget |
| QList<QAction *> actions | ( | MenuType | type = TOOLS_MENU | ) |
Returns a list of actions of the menu type type
| void addAction | ( | QAction * | action, |
| MenuType | type = TOOLS_MENU |
||
| ) |
Adds the newly created action to the menu with type type. Menu with type type should be created first.
| action | Pointer of action. |
| type | Menu type. |
| void addDirectory | ( | QWidget * | parent = qApp->activeWindow(), |
| PlayListModel * | model = PlayListManager::instance()->selectedPlayList() |
||
| ) |
Opens 'Add Directory' dialog
| parent | Parent widget |
| model | Destination playlist model |
| void addFiles | ( | QWidget * | parent = qApp->activeWindow(), |
| PlayListModel * | model = PlayListManager::instance()->selectedPlayList() |
||
| ) |
Opens 'Add Files' dialog
| parent | Parent widget |
| model | Destination playlist model |
| void addUrl | ( | QWidget * | parent = qApp->activeWindow(), |
| PlayListModel * | model = PlayListManager::instance()->selectedPlayList() |
||
| ) |
Opens 'Add URL' dialog
| parent | Parent widget |
| model | Destination playlist model |
| QMenu* createMenu | ( | MenuType | type, |
| const QString & | title = QString(), |
||
| QWidget * | parent = 0 |
||
| ) |
Creates menu with type type
| type | Menu type. |
| title | Menu title. |
| parent | Parent widget |
| void exit | ( | ) | [slot] |
Tells the player to exit.
| void jumpToTrack | ( | QWidget * | parent = qApp->activeWindow(), |
| PlayListModel * | model = PlayListManager::instance()->selectedPlayList() |
||
| ) |
Opens 'Jump To Track' dialog
| parent | Parent widget |
| model | Destination playlist model |
| void loadPlayList | ( | QWidget * | parent = qApp->activeWindow(), |
| PlayListModel * | model = PlayListManager::instance()->selectedPlayList() |
||
| ) |
Opens 'Load Playlist' dialog
| parent | Parent widget |
| model | Destination playlist model |
| void playFiles | ( | QWidget * | parent = qApp->activeWindow(), |
| PlayListModel * | model = PlayListManager::instance()->selectedPlayList() |
||
| ) |
Opens 'Play Files' dialog
| parent | Parent widget |
| model | Destination playlist model |
| void removeAction | ( | QAction * | action | ) |
Removes action action from created menus.
| void savePlayList | ( | QWidget * | parent = qApp->activeWindow(), |
| PlayListModel * | model = PlayListManager::instance()->selectedPlayList() |
||
| ) |
Opens 'Save Playlist' dialog
| parent | Parent widget |
| model | Destination playlist model |
| void showMainWindow | ( | ) | [slot] |
Shows the main window of the player.
| void showMainWindowCalled | ( | ) | [signal] |
Emitted when some general plugin requires to show main window. Use it to show player's window and to raise it to the top.
| void toggleVisibility | ( | ) | [slot] |
Toggles player window visibility.
| void toggleVisibilityCalled | ( | ) | [signal] |
Emitted when some general plugin requires to toggle visibility. Use it to show/hide player's window.
| bool visibilityControl | ( | ) |
Returns true if one of the general plugin can change visibility, otherwise returns false
1.7.6.1