#include <plugin.h>
|
| | CAPlugin () |
| |
| | CAPlugin (QString name, QString author, QString version, QString date, QString dirName, QString homeUrl, QString updateUrl) |
| |
| | ~CAPlugin () |
| |
| bool | action (QString onAction, CAMainWin *mainWin=0, CADocument *document=0, QEvent *evt=0, QPoint *coords=0) |
| |
| bool | callAction (CAPluginAction *action, CAMainWin *mainWin=0, CADocument *document=0, QEvent *evt=0, QPoint *coords=0, QString filename="") |
| |
| void | addAction (CAPluginAction *action) |
| |
| void | addMenu (QString name, QMenu *menu) |
| |
| void | setEnabled (bool enabled) |
| |
| bool | isEnabled () |
| |
| QString | name () |
| |
| QString | author () |
| |
| QString | version () |
| |
| QString | date () |
| |
| QString | dirName () |
| |
| QString | homeUrl () |
| |
| QString | updateUrl () |
| |
| QString | description (QString lang) |
| |
| QString | localDescription () |
| |
| QMenu * | menu (QString menuName) |
| |
| void | setName (QString name) |
| |
| void | setDescription (QString desc, QString lang=QString("")) |
| |
| void | setAuthor (QString author) |
| |
| void | setVersion (QString version) |
| |
| void | setDate (QString date) |
| |
| void | setDirName (QString dirName) |
| |
| void | setHomeUrl (QString homeUrl) |
| |
| void | setUpdateUrl (QString updateUrl) |
| |
| QList< QString > | actionList () |
| |
◆ CAPlugin() [1/2]
◆ CAPlugin() [2/2]
| CAPlugin::CAPlugin |
( |
QString |
name, |
|
|
QString |
author, |
|
|
QString |
version, |
|
|
QString |
date, |
|
|
QString |
dirName, |
|
|
QString |
homeUrl, |
|
|
QString |
updateUrl |
|
) |
| |
References _author, _date, _dirName, _enabled, _homeUrl, _name, _updateUrl, _version, author(), date(), dirName(), homeUrl(), name(), updateUrl(), and version().
◆ ~CAPlugin()
◆ action()
| bool CAPlugin::action |
( |
QString |
onAction, |
|
|
CAMainWin * |
mainWin = 0, |
|
|
CADocument * |
document = 0, |
|
|
QEvent * |
evt = 0, |
|
|
QPoint * |
coords = 0 |
|
) |
| |
This function is called when an event was triggered in a program and a plugin connected to this event is triggered. It calls all the plugin's actions having the given onAction.
- Parameters
-
| onAction | String describing action name. eg. onScoreClick, onDocumentClose |
| mainWin | Pointer to the current application main window. |
| document | Pointer to the current document. |
| evt | Pointer to the Mouse/Key/Wheel event, if it happened. |
| coords | Pointer to the coords in absolute world units, if a click on Score happened. |
- Returns
- True, if all the actions were successfully called, False otherwise.
References _actionMap, _enabled, actionList(), and callAction().
Referenced by addAction(), callAction(), CAPluginManager::disablePlugin(), and CAPluginManager::enablePlugin().
◆ actionList()
| QList< QString > CAPlugin::actionList |
( |
| ) |
|
|
inline |
◆ addAction()
Adds an action to the plugin, if the actionName&action aren't present yet.
- Parameters
-
| onAction | Name of the Canorus's action the plugin reacts on. |
| lang | Type of the action (ruby, python, library etc.). |
| fileName | File name of the script/library which is to be run on Canorus event. |
| function | Name of the function to be run. |
| args | List of arguments expected by the function. |
References _actionMap, and action().
Referenced by CAPluginManager::endElement().
◆ addMenu()
| void CAPlugin::addMenu |
( |
QString |
name, |
|
|
QMenu * |
menu |
|
) |
| |
|
inline |
◆ author()
| QString CAPlugin::author |
( |
| ) |
|
|
inline |
◆ callAction()
| bool CAPlugin::callAction |
( |
CAPluginAction * |
action, |
|
|
CAMainWin * |
mainWin = 0, |
|
|
CADocument * |
document = 0, |
|
|
QEvent * |
evt = 0, |
|
|
QPoint * |
coords = 0, |
|
|
QString |
filename = "" |
|
) |
| |
This function calls a specific action. This is used for export, import and custom actions which aren't called by Canorus automatically.
- Parameters
-
| action | Pointer to the action to be called. |
| mainWin | Pointer to the current application main window. |
| document | Pointer to the current document. |
| evt | Pointer to the Mouse/Key/Wheel event, if it happened. |
| coords | Pointer to the coords in absolute world units, if a click on Score happened. |
- Returns
- True, if the action succeeded, False otherwise.
References _dirName, _name, action(), CAMainWin::currentScoreView(), CAMainWin::currentSheet(), dirName(), CADrawableMusElement::DrawableNote, CAScoreView::musElementSelection(), CAMainWin::pyConsoleIface, CACanorus::rebuildUI(), and CAScoreView::selection().
Referenced by action(), and CAPluginAction::triggeredSlot().
◆ date()
| QString CAPlugin::date |
( |
| ) |
|
|
inline |
◆ description()
| QString CAPlugin::description |
( |
QString |
lang | ) |
|
|
inline |
◆ dirName()
| QString CAPlugin::dirName |
( |
| ) |
|
|
inline |
◆ homeUrl()
| QString CAPlugin::homeUrl |
( |
| ) |
|
|
inline |
◆ isEnabled()
| bool CAPlugin::isEnabled |
( |
| ) |
|
|
inline |
◆ localDescription()
| QString CAPlugin::localDescription |
( |
| ) |
|
|
inline |
◆ menu()
| QMenu * CAPlugin::menu |
( |
QString |
menuName | ) |
|
|
inline |
◆ name()
| QString CAPlugin::name |
( |
| ) |
|
|
inline |
◆ setAuthor()
| void CAPlugin::setAuthor |
( |
QString |
author | ) |
|
|
inline |
◆ setDate()
| void CAPlugin::setDate |
( |
QString |
date | ) |
|
|
inline |
◆ setDescription()
| void CAPlugin::setDescription |
( |
QString |
desc, |
|
|
QString |
lang = QString("") |
|
) |
| |
|
inline |
◆ setDirName()
| void CAPlugin::setDirName |
( |
QString |
dirName | ) |
|
|
inline |
◆ setEnabled()
| void CAPlugin::setEnabled |
( |
bool |
enabled | ) |
|
|
inline |
◆ setHomeUrl()
| void CAPlugin::setHomeUrl |
( |
QString |
homeUrl | ) |
|
|
inline |
◆ setName()
| void CAPlugin::setName |
( |
QString |
name | ) |
|
|
inline |
◆ setUpdateUrl()
| void CAPlugin::setUpdateUrl |
( |
QString |
updateUrl | ) |
|
|
inline |
◆ setVersion()
| void CAPlugin::setVersion |
( |
QString |
version | ) |
|
|
inline |
◆ updateUrl()
| QString CAPlugin::updateUrl |
( |
| ) |
|
|
inline |
◆ version()
| QString CAPlugin::version |
( |
| ) |
|
|
inline |
◆ _actionMap
◆ _author
| QString CAPlugin::_author |
|
private |
LOCALE description of the plugin, key means the language code, value is the translation. Empty string key is the key of universal non-translated description.
Referenced by author(), CAPlugin(), and setAuthor().
◆ _date
◆ _descMap
| QHash<QString, QString> CAPlugin::_descMap |
|
private |
◆ _dirName
| QString CAPlugin::_dirName |
|
private |
◆ _enabled
◆ _homeUrl
| QString CAPlugin::_homeUrl |
|
private |
ABSOLUTE Name of directory where the plugin is located - plugin only stores the relative one, Canorus changes it to absolute one.
Referenced by CAPlugin(), homeUrl(), and setHomeUrl().
◆ _menuMap
| QHash< QString, QMenu* > CAPlugin::_menuMap |
|
private |
◆ _name
◆ _updateUrl
| QString CAPlugin::_updateUrl |
|
private |
◆ _version
| QString CAPlugin::_version |
|
private |
The documentation for this class was generated from the following files:
- /home/iurt/rpmbuild/BUILD/canorus-0.7.3svn20190422/src/interface/plugin.h
- /home/iurt/rpmbuild/BUILD/canorus-0.7.3svn20190422/src/interface/plugin.cpp