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()) );
static QString iconNameForUrl(const KUrl &url, mode_t mode=0)
The ActionCollection class manages collections of Action instances.
Definition: actioncollection.h:46
void removeAction(const QString &name)
Definition: actioncollection.cpp:193
bool setOption(const QString &name, const QVariant &value)
Set the Interpreter::Option value.
Definition: action.cpp:409
void setDescription(const QString &description)
Set the optional description for this Action.
Definition: action.cpp:286
QString name() const
void fromDomElement(const QDomElement &element)
Method to read settings from the QDomElement element that contains details about e....
Definition: action.cpp:153
void started(Kross::Action *)
This signal is emitted before the script got executed.
QVariant callFunction(const QString &name, const QVariantList &args=QVariantList())
Call a function in the script.
Definition: action.cpp:430
void setInterpreter(const QString &interpretername)
Set the name of the interpreter (javascript, python or ruby).
Definition: action.cpp:338
void setCode(const QByteArray &code)
Set the scriptcode code this Action should execute.
Definition: action.cpp:323
void finished(Kross::Action *)
This signal is emitted after the script got executed.
void addQObject(QObject *obj, const QString &name=QString())
Add a QObject instance to the action.
Definition: action.cpp:386
void setEnabled(bool enabled)
Set the enable state of this Action to enabled .
Definition: action.cpp:311
Action(QObject *parent, const QString &name, const QDir &packagepath=QDir())
Constructor.
Definition: action.cpp:115
bool isEnabled() const
Return true if this Action is enabled else false is returned.
Definition: action.cpp:306
void finalized(Kross::Action *)
This signal is emitted once a script finalized.
void dataChanged(Action *)
This signal is emitted when the data of the Action is changed.
bool setFile(const QString &scriptfile)
Set the script file that should be executed.
Definition: action.cpp:356
QVariant option(const QString &name, const QVariant &defaultvalue=QVariant())
Definition: action.cpp:401
void setIconName(const QString &iconname)
Set the name of the icon to iconname .
Definition: action.cpp:298
void finalize()
Finalize the Script instance and frees any cached or still running executions.
Definition: action.cpp:496
void updated()
This signal is emitted if the content of the Action was changed.
Interface for managing Object collections.
Definition: childreninterface.h:39
void addObject(QObject *object, const QString &name=QString(), Options options=NoOption)
Add a QObject to the list of children.
Definition: childreninterface.h:80
QObject * object(const QString &name) const
Definition: childreninterface.h:97
QHash< QString, QObject * > objects() const
Definition: childreninterface.h:104
const QString errorMessage() const
Definition: errorinterface.h:53
void setError(const QString &errormessage, const QString &tracemessage=QString(), long lineno=-1)
Set the error message.
Definition: errorinterface.h:69
The InterpreterInfo class provides abstract information about a Interpreter before the interpreter-ba...
Definition: core/interpreter.h:44
bool hasOption(const QString &name) const
Definition: core/interpreter.cpp:91
const QVariant optionValue(const QString &name, const QVariant &defaultvalue=QVariant()) const
Definition: core/interpreter.cpp:106
Interpreter * interpreter(const QString &interpretername) const
Return the Interpreter instance defined by the interpretername.
Definition: manager.cpp:271
const QString interpreternameForFile(const QString &file)
Return the name of the Interpreter that feels responsible for the defined file .
Definition: manager.cpp:255
InterpreterInfo * interpreterInfo(const QString &interpretername) const
Definition: manager.cpp:250
Base class for interpreter dependent functionality each script provides.
Definition: core/script.h:44
QString i18n(const char *text)
const char * name(StandardAction id)
Definition: action.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.