Kross
action.cpp
Go to the documentation of this file.
110 krossdebug( QString("Action::Action(QObject*,QString,QDir) Ctor name='%1'").arg(th->objectName()) );
203 krossdebug(QString("Action::readDomElement: Setting property name=%1 value=%2").arg(n).arg(e.text()));
238 //fileName=QDir(searchPath.first()).relativeFilePath(fileName); //prefer absname if it is short?
378 return file().isEmpty()?QString():QFileInfo(file()).absolutePath();//obey Qt docs and don't cheat
416 } else krosswarning( QString("Kross::Action::setOption(%1, %2): No such option").arg(name).arg(value.toString()) );
417 } else krosswarning( QString("Kross::Action::setOption(%1, %2): No such interpreterinfo").arg(name).arg(value.toString()) );
531 krossdebug( QString("Action::slotTriggered() after exec, errorMessage=%2").arg(errorMessage()) );
QString i18n(const char *text)
void setEnabled(bool enabled)
Set the enable state of this Action to enabled .
Definition: action.cpp:311
void addObject(QObject *object, const QString &name=QString(), Options options=NoOption)
Add a QObject to the list of children.
Definition: childreninterface.h:80
QVariant option(const QString &name, const QVariant &defaultvalue=QVariant())
Definition: action.cpp:401
Base class for interpreter dependent functionality each script provides.
Definition: core/script.h:43
void started(Kross::Action *)
This signal is emitted before the script got executed.
void updated()
This signal is emitted if the content of the Action was changed.
QVariant callFunction(const QString &name, const QVariantList &args=QVariantList())
Call a function in the script.
Definition: action.cpp:430
InterpreterInfo * interpreterInfo(const QString &interpretername) const
Definition: manager.cpp:250
Action(QObject *parent, const QString &name, const QDir &packagepath=QDir())
Constructor.
Definition: action.cpp:115
The InterpreterInfo class provides abstract information about a Interpreter before the interpreter-ba...
Definition: core/interpreter.h:43
bool hasOption(const QString &name) const
Definition: core/interpreter.cpp:91
const QString errorMessage() const
Definition: errorinterface.h:53
void setDescription(const QString &description)
Set the optional description for this Action.
Definition: action.cpp:286
void dataChanged(Action *)
This signal is emitted when the data of the Action is changed.
QHash< QString, QObject * > objects() const
Definition: childreninterface.h:104
virtual Script * createScript(Action *Action)=0
Create and return a new interpreter dependent Script instance.
Interface for managing Object collections.
Definition: childreninterface.h:38
const QString interpreternameForFile(const QString &file)
Return the name of the Interpreter that feels responsible for the defined file .
Definition: manager.cpp:255
const QVariant optionValue(const QString &name, const QVariant &defaultvalue=QVariant()) const
Definition: core/interpreter.cpp:106
void finalized(Kross::Action *)
This signal is emitted once a script finalized.
void fromDomElement(const QDomElement &element)
Method to read settings from the QDomElement element that contains details about e.g.
Definition: action.cpp:153
Interpreter * interpreter(const QString &interpretername) const
Return the Interpreter instance defined by the interpretername.
Definition: manager.cpp:271
QObject * object(const QString &name) const
Definition: childreninterface.h:97
void finished(Kross::Action *)
This signal is emitted after the script got executed.
bool setFile(const QString &scriptfile)
Set the script file that should be executed.
Definition: action.cpp:356
void setError(const QString &errormessage, const QString &tracemessage=QString(), long lineno=-1)
Set the error message.
Definition: errorinterface.h:69
void finalize()
Finalize the Script instance and frees any cached or still running executions.
Definition: action.cpp:496
void setInterpreter(const QString &interpretername)
Set the name of the interpreter (javascript, python or ruby).
Definition: action.cpp:338
bool isEnabled() const
Return true if this Action is enabled else false is returned.
Definition: action.cpp:306
void setCode(const QByteArray &code)
Set the scriptcode code this Action should execute.
Definition: action.cpp:323
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
The ActionCollection class manages collections of Action instances.
Definition: actioncollection.h:45
void addQObject(QObject *obj, const QString &name=QString())
Add a QObject instance to the action.
Definition: action.cpp:386
bool setOption(const QString &name, const QVariant &value)
Set the Interpreter::Option value.
Definition: action.cpp:409
Definition: action.cpp:104
void setIconName(const QString &iconname)
Set the name of the icon to iconname .
Definition: action.cpp:298
void removeAction(const QString &name)
Definition: actioncollection.cpp:193
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.