CAPluginAction Class Reference

#include <pluginaction.h>

Inheritance diagram for CAPluginAction:

Inheritance graph
[legend]

List of all members.

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)
CAPluginplugin ()
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.


Detailed Description

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.

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.


Constructor & Destructor Documentation

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().


Member Function Documentation

CAPlugin* CAPluginAction::plugin (  )  [inline]

Definition at line 20 of file pluginaction.h.

References _plugin.

QString CAPluginAction::name (  )  [inline]

Definition at line 21 of file pluginaction.h.

References _name.

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

Here is the caller graph for this function:

QString CAPluginAction::lang (  )  [inline]

Definition at line 22 of file pluginaction.h.

References _lang.

Referenced by CAPlugin::callAction().

Here is the caller graph for this function:

QString CAPluginAction::function (  )  [inline]

Definition at line 23 of file pluginaction.h.

References _function.

Referenced by CAPlugin::callAction().

Here is the caller graph for this function:

QList<QString> CAPluginAction::args (  )  [inline]

Definition at line 24 of file pluginaction.h.

References _args.

Referenced by CAPlugin::callAction().

Here is the caller graph for this function:

QString CAPluginAction::filename (  )  [inline]

Definition at line 25 of file pluginaction.h.

References _filename.

Referenced by CAPlugin::callAction().

Here is the caller graph for this function:

QString CAPluginAction::onAction (  )  [inline]

Definition at line 26 of file pluginaction.h.

References _onAction.

Referenced by CAPlugin::addAction(), and CAPlugin::callAction().

Here is the caller graph for this function:

QString CAPluginAction::exportFilter ( QString  lang  )  [inline]

Definition at line 27 of file pluginaction.h.

References _exportFilter.

Referenced by localExportFilter(), and localImportFilter().

Here is the caller graph for this function:

QString CAPluginAction::localExportFilter (  )  [inline]

Definition at line 28 of file pluginaction.h.

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

Here is the call graph for this function:

QString CAPluginAction::importFilter ( QString  lang  )  [inline]

Definition at line 29 of file pluginaction.h.

References _importFilter.

Referenced by localImportFilter().

Here is the caller graph for this function:

QString CAPluginAction::localImportFilter (  )  [inline]

Definition at line 30 of file pluginaction.h.

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

Here is the call graph for this function:

QString CAPluginAction::localeText ( QString  lang  )  [inline]

Definition at line 31 of file pluginaction.h.

References _text.

Referenced by localText().

Here is the caller graph for this function:

QString CAPluginAction::localText (  )  [inline]

Definition at line 32 of file pluginaction.h.

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:

bool CAPluginAction::refresh (  )  [inline]

Definition at line 33 of file pluginaction.h.

References _refresh.

Referenced by CAPlugin::callAction().

Here is the caller graph for this function:

void CAPluginAction::setPlugin ( CAPlugin plugin  )  [inline]

Definition at line 35 of file pluginaction.h.

References _plugin.

void CAPluginAction::setName ( QString  name  )  [inline]

Definition at line 36 of file pluginaction.h.

References _name.

void CAPluginAction::setLang ( QString  lang  )  [inline]

Definition at line 37 of file pluginaction.h.

References _lang.

void CAPluginAction::setFunction ( QString  function  )  [inline]

Definition at line 38 of file pluginaction.h.

References _function.

void CAPluginAction::addArgument ( QString  arg  )  [inline]

Definition at line 39 of file pluginaction.h.

References _args.

bool CAPluginAction::removeArgument ( QString  arg  )  [inline]

Definition at line 40 of file pluginaction.h.

References _args.

void CAPluginAction::setFilename ( QString  filename  )  [inline]

Definition at line 41 of file pluginaction.h.

References _filename.

void CAPluginAction::setOnAction ( QString  onAction  )  [inline]

Definition at line 42 of file pluginaction.h.

References _onAction.

Referenced by CAPluginManager::endElement().

Here is the caller graph for this function:

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

Definition at line 43 of file pluginaction.h.

References _exportFilter.

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

Definition at line 44 of file pluginaction.h.

References _exportFilter.

Referenced by CAPluginManager::endElement().

Here is the caller graph for this function:

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

Definition at line 45 of file pluginaction.h.

References _importFilter.

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

Definition at line 46 of file pluginaction.h.

References _importFilter.

Referenced by CAPluginManager::endElement().

Here is the caller graph for this function:

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

Definition at line 47 of file pluginaction.h.

References _text, and localText().

Here is the call graph for this function:

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

Definition at line 48 of file pluginaction.h.

References _text, and localText().

Referenced by CAPluginManager::endElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAPluginAction::setRefresh ( bool  refresh  )  [inline]

Definition at line 49 of file pluginaction.h.

References _refresh.

Referenced by CAPluginManager::endElement().

Here is the caller graph for this function:

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]

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

Referenced by CAPluginAction().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Sat Feb 9 13:19:47 2008 for Canorus by  doxygen 1.5.3