GeneralHandler Class Reference

The GeneralHandler class provides simple api to access general and command line plugins. More...

#include <generalhandler.h>

List of all members.

Public Types

enum  MenuType { TOOLS_MENU = 0, PLAYLIST_MENU }

Signals

void exitCalled ()
void toggleVisibilityCalled ()

Public Member Functions

 GeneralHandler (QObject *parent=0)
 ~GeneralHandler ()
void setEnabled (GeneralFactory *factory, bool enable)
void showSettings (GeneralFactory *factory, QWidget *parentWidget)
bool visibilityControl ()
void executeCommand (const QString &opt_str, const QStringList &args=QStringList())
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 Public Member Functions

static GeneralHandlerinstance ()


Detailed Description

The GeneralHandler class provides simple api to access general and command line plugins.

Author:
Ilya Kotov <forkotov02@hotmail.ru>

Member Enumeration Documentation

Enum of menu type

Enumerator:
TOOLS_MENU  tools menu
PLAYLIST_MENU  playlist context menu


Constructor & Destructor Documentation

GeneralHandler::GeneralHandler ( QObject *  parent = 0  ) 

Object constructor,

Parameters:
parent Parent object

GeneralHandler::~GeneralHandler (  ) 

Destructor


Member Function Documentation

QList<QAction *> GeneralHandler::actions ( MenuType  type = TOOLS_MENU  ) 

Returns a list of actions of the menu type type

void GeneralHandler::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.

Parameters:
action Pointer of action.
type Menu type.

QMenu* GeneralHandler::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

void GeneralHandler::executeCommand ( const QString &  opt_str,
const QStringList &  args = QStringList() 
)

Executes command by command line plugins

Parameters:
opt_str Command line option string
args Command arguments

void GeneralHandler::exitCalled (  )  [signal]

Emitted when some general plugin requires to exit. Use it to quit application.

static GeneralHandler* GeneralHandler::instance (  )  [static]

Returns a pointer to the object's instance.

void GeneralHandler::removeAction ( QAction *  action  ) 

Removes action action from created menus.

void GeneralHandler::setEnabled ( GeneralFactory factory,
bool  enable 
)

Sets whether the general plugin is enabled.

Parameters:
factory General plugin factory.
enable Plugin enable state (true - enable, false - disable)

void GeneralHandler::showSettings ( GeneralFactory factory,
QWidget *  parentWidget 
)

Shows configuration dialog and updates settings automatically.

Parameters:
factory General plugin factory.
parentWidget Parent widget.

void GeneralHandler::toggleVisibilityCalled (  )  [signal]

Emitted when some general plugin requires to toggle visibility. Use it to show/hide player's window.

bool GeneralHandler::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:

Generated on Sat Mar 27 19:43:00 2010 for Qmmp by  doxygen 1.5.9