#include <pluginaction.h>

Signals | |
| void | triggered (QAction *, bool) |
| Connected to triggered(), calls plugin->callAction(). | |
Public Member Functions | |
| CAPluginAction (CAPlugin *plugin, QString name, QString lang, QString function, QList< QString > args, QString filename) | |
| CAPlugin * | plugin () |
| QString | name () |
| QString | lang () |
| QString | function () |
| QList< QString > | args () |
| QString | filename () |
| QString | onAction () |
| QString | exportFilter (QString lang) |
| QString | localExportFilter () |
| QString | importFilter (QString lang) |
| QString | localImportFilter () |
| QString | localeText (QString lang) |
| QString | localText () |
| bool | refresh () |
| void | setPlugin (CAPlugin *plugin) |
| void | setName (QString name) |
| void | setLang (QString lang) |
| void | setFunction (QString function) |
| void | addArgument (QString arg) |
| bool | removeArgument (QString arg) |
| void | setFilename (QString filename) |
| void | setOnAction (QString onAction) |
| void | setExportFilter (QString lang, QString value) |
| void | setExportFilters (QHash< QString, QString > f) |
| void | setImportFilter (QString lang, QString value) |
| void | setImportFilters (QHash< QString, QString > f) |
| void | setLocaleText (QString lang, QString value) |
| void | setTexts (QHash< QString, QString > t) |
| void | setRefresh (bool refresh) |
Private Slots | |
| void | triggeredSlot (bool) |
| Should the UI be rebuilt when calling the action. | |
Private Attributes | |
| CAPlugin * | _plugin |
| QString | _name |
| Pointer to the plugin which this action belongs to. | |
| QString | _lang |
| Action name. | |
| QString | _function |
| Scripting language. | |
| QList< QString > | _args |
| Function name. | |
| QString | _filename |
| Function arguments. | |
| QString | _onAction |
| Filename which has the function. | |
| QHash< QString, QString > | _exportFilter |
| Canorus internal action which this action reacts on. | |
| QHash< QString, QString > | _importFilter |
| Text written in export dialog's filter. | |
| QHash< QString, QString > | _text |
| Text written in import dialog's filter. | |
| bool | _refresh |
| Text written on a menu item or the toolbar button. | |
Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details.
Copyright (c) 2007, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details.
CAPluginAction class represents each <action> stanza found in Canorus Plugin descriptor XML file. Every action has its unique name, scripting language, function, its arguments and filename. Other attributes are Canorus internal action which it reacts on, export filter, menu/toolbar text.
Definition at line 15 of file pluginaction.h.
| CAPluginAction::CAPluginAction | ( | CAPlugin * | plugin, | |
| QString | name, | |||
| QString | lang, | |||
| QString | function, | |||
| QList< QString > | args, | |||
| QString | filename | |||
| ) |
Default constructor.
Definition at line 21 of file pluginaction.cpp.
References _args, _filename, _function, _lang, _name, _plugin, triggered(), and triggeredSlot().
| CAPlugin* CAPluginAction::plugin | ( | ) | [inline] |
| QString CAPluginAction::name | ( | ) | [inline] |
Definition at line 21 of file pluginaction.h.
References _name.
Referenced by localExportFilter(), localImportFilter(), and localText().

| QString CAPluginAction::lang | ( | ) | [inline] |
Definition at line 22 of file pluginaction.h.
References _lang.
Referenced by CAPlugin::callAction().

| QString CAPluginAction::function | ( | ) | [inline] |
Definition at line 23 of file pluginaction.h.
References _function.
Referenced by CAPlugin::callAction().

| QList<QString> CAPluginAction::args | ( | ) | [inline] |
Definition at line 24 of file pluginaction.h.
References _args.
Referenced by CAPlugin::callAction().

| QString CAPluginAction::filename | ( | ) | [inline] |
Definition at line 25 of file pluginaction.h.
References _filename.
Referenced by CAPlugin::callAction().

| QString CAPluginAction::onAction | ( | ) | [inline] |
Definition at line 26 of file pluginaction.h.
References _onAction.
Referenced by CAPlugin::addAction(), and CAPlugin::callAction().

| QString CAPluginAction::exportFilter | ( | QString | lang | ) | [inline] |
Definition at line 27 of file pluginaction.h.
References _exportFilter.
Referenced by localExportFilter(), and localImportFilter().

| QString CAPluginAction::localExportFilter | ( | ) | [inline] |
Definition at line 28 of file pluginaction.h.
References _exportFilter, exportFilter(), and name().

| QString CAPluginAction::importFilter | ( | QString | lang | ) | [inline] |
Definition at line 29 of file pluginaction.h.
References _importFilter.
Referenced by localImportFilter().

| QString CAPluginAction::localImportFilter | ( | ) | [inline] |
Definition at line 30 of file pluginaction.h.
References _importFilter, exportFilter(), importFilter(), and name().

| QString CAPluginAction::localeText | ( | QString | lang | ) | [inline] |
Definition at line 31 of file pluginaction.h.
References _text.
Referenced by localText().

| QString CAPluginAction::localText | ( | ) | [inline] |
Definition at line 32 of file pluginaction.h.
References _text, localeText(), and name().
Referenced by setLocaleText(), and setTexts().


| bool CAPluginAction::refresh | ( | ) | [inline] |
Definition at line 33 of file pluginaction.h.
References _refresh.
Referenced by CAPlugin::callAction().

| void CAPluginAction::setPlugin | ( | CAPlugin * | plugin | ) | [inline] |
| void CAPluginAction::setName | ( | QString | name | ) | [inline] |
| void CAPluginAction::setLang | ( | QString | lang | ) | [inline] |
| void CAPluginAction::setFunction | ( | QString | function | ) | [inline] |
| void CAPluginAction::addArgument | ( | QString | arg | ) | [inline] |
| bool CAPluginAction::removeArgument | ( | QString | arg | ) | [inline] |
| void CAPluginAction::setFilename | ( | QString | filename | ) | [inline] |
| void CAPluginAction::setOnAction | ( | QString | onAction | ) | [inline] |
Definition at line 42 of file pluginaction.h.
References _onAction.
Referenced by CAPluginManager::endElement().

| void CAPluginAction::setExportFilter | ( | QString | lang, | |
| QString | value | |||
| ) | [inline] |
| void CAPluginAction::setExportFilters | ( | QHash< QString, QString > | f | ) | [inline] |
Definition at line 44 of file pluginaction.h.
References _exportFilter.
Referenced by CAPluginManager::endElement().

| void CAPluginAction::setImportFilter | ( | QString | lang, | |
| QString | value | |||
| ) | [inline] |
| void CAPluginAction::setImportFilters | ( | QHash< QString, QString > | f | ) | [inline] |
Definition at line 46 of file pluginaction.h.
References _importFilter.
Referenced by CAPluginManager::endElement().

| void CAPluginAction::setLocaleText | ( | QString | lang, | |
| QString | value | |||
| ) | [inline] |
Definition at line 47 of file pluginaction.h.
References _text, and localText().

| void CAPluginAction::setTexts | ( | QHash< QString, QString > | t | ) | [inline] |
Definition at line 48 of file pluginaction.h.
References _text, and localText().
Referenced by CAPluginManager::endElement().


| void CAPluginAction::setRefresh | ( | bool | refresh | ) | [inline] |
Definition at line 49 of file pluginaction.h.
References _refresh.
Referenced by CAPluginManager::endElement().

| void CAPluginAction::triggeredSlot | ( | bool | on | ) | [private, slot] |
Should the UI be rebuilt when calling the action.
This method and the class itself exists mainly because you can't connect signal actionMyAction_triggered() and others than connecting them with slots. And to do that, you need a Q_OBJECT class with pre-set function slots. This function is a pretty elegant solution to connect plugin's reactions to internal Canorus GUI signals.
Definition at line 39 of file pluginaction.cpp.
References _plugin, and CAPlugin::callAction().
Referenced by CAPluginAction().
| void CAPluginAction::triggered | ( | QAction * | , | |
| bool | ||||
| ) | [signal] |
CAPlugin* CAPluginAction::_plugin [private] |
Definition at line 52 of file pluginaction.h.
Referenced by CAPluginAction(), plugin(), setPlugin(), and triggeredSlot().
QString CAPluginAction::_name [private] |
Pointer to the plugin which this action belongs to.
Definition at line 53 of file pluginaction.h.
Referenced by CAPluginAction(), name(), and setName().
QString CAPluginAction::_lang [private] |
Action name.
Definition at line 54 of file pluginaction.h.
Referenced by CAPluginAction(), lang(), and setLang().
QString CAPluginAction::_function [private] |
Scripting language.
Definition at line 55 of file pluginaction.h.
Referenced by CAPluginAction(), function(), and setFunction().
QList<QString> CAPluginAction::_args [private] |
Function name.
Definition at line 56 of file pluginaction.h.
Referenced by addArgument(), args(), CAPluginAction(), and removeArgument().
QString CAPluginAction::_filename [private] |
Function arguments.
Definition at line 57 of file pluginaction.h.
Referenced by CAPluginAction(), filename(), and setFilename().
QString CAPluginAction::_onAction [private] |
Filename which has the function.
Definition at line 58 of file pluginaction.h.
Referenced by onAction(), and setOnAction().
QHash<QString, QString> CAPluginAction::_exportFilter [private] |
Canorus internal action which this action reacts on.
Definition at line 59 of file pluginaction.h.
Referenced by exportFilter(), localExportFilter(), setExportFilter(), and setExportFilters().
QHash<QString, QString> CAPluginAction::_importFilter [private] |
Text written in export dialog's filter.
Definition at line 60 of file pluginaction.h.
Referenced by importFilter(), localImportFilter(), setImportFilter(), and setImportFilters().
QHash<QString, QString> CAPluginAction::_text [private] |
Text written in import dialog's filter.
Definition at line 61 of file pluginaction.h.
Referenced by localeText(), localText(), setLocaleText(), and setTexts().
bool CAPluginAction::_refresh [private] |
Text written on a menu item or the toolbar button.
Definition at line 62 of file pluginaction.h.
Referenced by refresh(), and setRefresh().
1.5.3