#include <uihelper.h>
Inherits QObject.
|
| 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 | registerMenu (MenuType type, QMenu *menu, QAction *before=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) |
|
The UiHelper class provides simple api to access general plugins and some gui features.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
◆ MenuType
Enum of menu type
Enumerator |
---|
TOOLS_MENU | tools menu
|
PLAYLIST_MENU | playlist context menu
|
ADD_MENU | "add"/"file" menu
|
◆ UiHelper()
Object constructor,
- Parameters
-
◆ ~UiHelper()
◆ about()
void about |
( |
QWidget * |
parent = 0 | ) |
|
Shows about dialog
- Parameters
-
◆ actions()
Returns a list of actions of the menu type type
◆ addAction()
Adds the newly created action to the menu with type type. Menu with type type should be created first.
- Parameters
-
action | Pointer of action. |
type | Menu type. |
◆ addDirectory()
Opens 'Add Directory' dialog
- Parameters
-
parent | Parent widget |
model | Destination playlist model |
◆ addFiles()
Opens 'Add Files' dialog
- Parameters
-
parent | Parent widget |
model | Destination playlist model |
◆ addUrl()
Opens 'Add URL' dialog
- Parameters
-
parent | Parent widget |
model | Destination playlist model |
◆ createMenu()
QMenu* createMenu |
( |
MenuType |
type, |
|
|
const QString & |
title = QString() , |
|
|
QWidget * |
parent = 0 |
|
) |
| |
Creates menu with type type
- Parameters
-
type | Menu type. |
title | Menu title. |
parent | Parent widget |
◆ exit
Tells the player to exit.
◆ instance()
Returns a pointer to the object's instance.
◆ jumpToTrack()
Opens 'Jump To Track' dialog
- Parameters
-
parent | Parent widget |
model | Destination playlist model |
◆ loadPlayList()
Opens 'Load Playlist' dialog
- Parameters
-
parent | Parent widget |
model | Destination playlist model |
◆ playFiles()
Opens 'Play Files' dialog
- Parameters
-
parent | Parent widget |
model | Destination playlist model |
◆ registerMenu()
void registerMenu |
( |
MenuType |
type, |
|
|
QMenu * |
menu, |
|
|
QAction * |
before = 0 |
|
) |
| |
Registers existing menu for access from general plugins.
- Parameters
-
type | Menu type. |
menu | Menu pointer. |
before | An action, after which the rest are added. |
◆ removeAction()
void removeAction |
( |
QAction * |
action | ) |
|
Removes action action from created menus.
◆ savePlayList()
Opens 'Save Playlist' dialog
- Parameters
-
parent | Parent widget |
model | Destination playlist model |
◆ showMainWindow
Shows the main window of the player.
◆ showMainWindowCalled
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.
◆ toggleVisibility
void toggleVisibility |
( |
| ) |
|
|
slot |
Toggles player window visibility.
◆ toggleVisibilityCalled
void toggleVisibilityCalled |
( |
| ) |
|
|
signal |
Emitted when some general plugin requires to toggle visibility. Use it to show/hide player's window.
◆ visibilityControl()
bool visibilityControl |
( |
| ) |
|
Returns true if one of the general plugin can change visibility, otherwise returns false
The documentation for this class was generated from the following file:
- /usr/src/RPM/BUILD/qmmp-0.12-svn/src/qmmpui/uihelper.h