Canorus  0.0
Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
CAPluginAction Class Reference

#include <pluginaction.h>

Inheritance diagram for CAPluginAction:
Inheritance graph
[legend]

Signals

void triggered (QAction *, bool)
 Connected to triggered(), calls plugin->callAction() More...
 

Public Member Functions

 CAPluginAction (CAPlugin *plugin, QString name, QString lang, QString function, QList< QString > args, QString filename)
 
CAPluginplugin ()
 
QString name ()
 
QString lang ()
 
QString function ()
 
const 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. More...
 

Private Attributes

CAPlugin_plugin
 
QString _name
 Pointer to the plugin which this action belongs to. More...
 
QString _lang
 Action name. More...
 
QString _function
 Scripting language. More...
 
QList< QString > _args
 Function name. More...
 
QString _filename
 Function arguments. More...
 
QString _onAction
 Filename which has the function. More...
 
QHash< QString, QString > _exportFilter
 Canorus internal action which this action reacts on. More...
 
QHash< QString, QString > _importFilter
 Text written in export dialog's filter. More...
 
QHash< QString, QString > _text
 Text written in import dialog's filter. More...
 
bool _refresh
 Text written on a menu item or the toolbar button. More...
 

Detailed Description

Copyright (c) 2007-2009, 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.

Copyright (c) 2007-2009, 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.

Constructor & Destructor Documentation

◆ CAPluginAction()

CAPluginAction::CAPluginAction ( CAPlugin plugin,
QString  name,
QString  lang,
QString  function,
QList< QString >  args,
QString  filename 
)

Default constructor.

References _args, _filename, _function, _lang, _name, _plugin, args(), filename(), lang(), name(), plugin(), triggered(), and triggeredSlot().

Here is the call graph for this function:

Member Function Documentation

◆ addArgument()

void CAPluginAction::addArgument ( QString  arg)
inline

References _args.

◆ args()

const QList<QString>& CAPluginAction::args ( )
inline

References _args.

Referenced by CAPluginAction().

Here is the caller graph for this function:

◆ exportFilter()

QString CAPluginAction::exportFilter ( QString  lang)
inline

References _exportFilter, and lang().

Referenced by localExportFilter(), and localImportFilter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filename()

QString CAPluginAction::filename ( )
inline

References _filename.

Referenced by CAPluginAction(), and setFilename().

Here is the caller graph for this function:

◆ function()

QString CAPluginAction::function ( )
inline

References _function.

◆ importFilter()

QString CAPluginAction::importFilter ( QString  lang)
inline

References _importFilter, and lang().

Referenced by localImportFilter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lang()

QString CAPluginAction::lang ( )
inline

References _lang.

Referenced by CAPluginAction(), exportFilter(), importFilter(), localeText(), setExportFilter(), setImportFilter(), setLang(), and setLocaleText().

Here is the caller graph for this function:

◆ localeText()

QString CAPluginAction::localeText ( QString  lang)
inline

References _text, and lang().

Referenced by localText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ localExportFilter()

QString CAPluginAction::localExportFilter ( )
inline

References _exportFilter, exportFilter(), and name().

Here is the call graph for this function:

◆ localImportFilter()

QString CAPluginAction::localImportFilter ( )
inline

References _importFilter, exportFilter(), importFilter(), and name().

Here is the call graph for this function:

◆ localText()

QString CAPluginAction::localText ( )
inline

References _text, localeText(), and name().

Referenced by setLocaleText(), and setTexts().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

QString CAPluginAction::name ( )
inline

References _name.

Referenced by CAPluginAction(), localExportFilter(), localImportFilter(), localText(), and setName().

Here is the caller graph for this function:

◆ onAction()

QString CAPluginAction::onAction ( )
inline

References _onAction.

Referenced by setOnAction().

Here is the caller graph for this function:

◆ plugin()

CAPlugin* CAPluginAction::plugin ( )
inline

References _plugin.

Referenced by CAPluginAction(), and setPlugin().

Here is the caller graph for this function:

◆ refresh()

bool CAPluginAction::refresh ( )
inline

References _refresh.

Referenced by setRefresh().

Here is the caller graph for this function:

◆ removeArgument()

bool CAPluginAction::removeArgument ( QString  arg)
inline

References _args.

◆ setExportFilter()

void CAPluginAction::setExportFilter ( QString  lang,
QString  value 
)
inline

References _exportFilter, and lang().

Here is the call graph for this function:

◆ setExportFilters()

void CAPluginAction::setExportFilters ( QHash< QString, QString >  f)
inline

References _exportFilter.

◆ setFilename()

void CAPluginAction::setFilename ( QString  filename)
inline

References _filename, and filename().

Here is the call graph for this function:

◆ setFunction()

void CAPluginAction::setFunction ( QString  function)
inline

References _function.

◆ setImportFilter()

void CAPluginAction::setImportFilter ( QString  lang,
QString  value 
)
inline

References _importFilter, and lang().

Here is the call graph for this function:

◆ setImportFilters()

void CAPluginAction::setImportFilters ( QHash< QString, QString >  f)
inline

References _importFilter.

◆ setLang()

void CAPluginAction::setLang ( QString  lang)
inline

References _lang, and lang().

Here is the call graph for this function:

◆ setLocaleText()

void CAPluginAction::setLocaleText ( QString  lang,
QString  value 
)
inline

References _text, lang(), and localText().

Here is the call graph for this function:

◆ setName()

void CAPluginAction::setName ( QString  name)
inline

References _name, and name().

Here is the call graph for this function:

◆ setOnAction()

void CAPluginAction::setOnAction ( QString  onAction)
inline

References _onAction, and onAction().

Here is the call graph for this function:

◆ setPlugin()

void CAPluginAction::setPlugin ( CAPlugin plugin)
inline

References _plugin, and plugin().

Here is the call graph for this function:

◆ setRefresh()

void CAPluginAction::setRefresh ( bool  refresh)
inline

References _refresh, and refresh().

Here is the call graph for this function:

◆ setTexts()

void CAPluginAction::setTexts ( QHash< QString, QString >  t)
inline

References _text, and localText().

Here is the call graph for this function:

◆ triggered

void CAPluginAction::triggered ( QAction ,
bool   
)
signal

Connected to triggered(), calls plugin->callAction()

Referenced by CAPluginAction().

Here is the caller graph for this function:

◆ triggeredSlot

void CAPluginAction::triggeredSlot ( bool  on)
privateslot

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.

References _plugin, and CAPlugin::callAction().

Referenced by CAPluginAction().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _args

QList<QString> CAPluginAction::_args
private

Function name.

Referenced by addArgument(), args(), CAPluginAction(), and removeArgument().

◆ _exportFilter

QHash<QString, QString> CAPluginAction::_exportFilter
private

Canorus internal action which this action reacts on.

Referenced by exportFilter(), localExportFilter(), setExportFilter(), and setExportFilters().

◆ _filename

QString CAPluginAction::_filename
private

Function arguments.

Referenced by CAPluginAction(), filename(), and setFilename().

◆ _function

QString CAPluginAction::_function
private

Scripting language.

Referenced by CAPluginAction(), function(), and setFunction().

◆ _importFilter

QHash<QString, QString> CAPluginAction::_importFilter
private

Text written in export dialog's filter.

Referenced by importFilter(), localImportFilter(), setImportFilter(), and setImportFilters().

◆ _lang

QString CAPluginAction::_lang
private

Action name.

Referenced by CAPluginAction(), lang(), and setLang().

◆ _name

QString CAPluginAction::_name
private

Pointer to the plugin which this action belongs to.

Referenced by CAPluginAction(), name(), and setName().

◆ _onAction

QString CAPluginAction::_onAction
private

Filename which has the function.

Referenced by onAction(), and setOnAction().

◆ _plugin

CAPlugin* CAPluginAction::_plugin
private

◆ _refresh

bool CAPluginAction::_refresh
private

Text written on a menu item or the toolbar button.

Referenced by refresh(), and setRefresh().

◆ _text

QHash<QString, QString> CAPluginAction::_text
private

Text written in import dialog's filter.

Referenced by localeText(), localText(), setLocaleText(), and setTexts().


The documentation for this class was generated from the following files: