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()) );
void setText(const QString &text)
QString i18n(const char *text)
void setEnabled(bool enabled)
Set the enable state of this Action to enabled .
Definition: action.cpp:311
QString relativeFilePath(const QString &fileName) const
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
QDomNode appendChild(const QDomNode &newChild)
QString attribute(const QString &name, const QString &defValue) const
void started(Kross::Action *)
This signal is emitted before the script got executed.
QIcon icon() const
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
bool exists() const
Action(QObject *parent, const QString &name, const QDir &packagepath=QDir())
Constructor.
Definition: action.cpp:115
bool isNull() const
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
QDomElement toElement() const
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
QVariant property(const char *name) const
QString text() const
virtual Script * createScript(Action *Action)=0
Create and return a new interpreter dependent Script instance.
void setAttribute(const QString &name, const QString &value)
bool isEmpty() const
void setObjectName(const QString &name)
QString absoluteFilePath() const
bool isEmpty() const
const char * constData() const
Interface for managing Object collections.
Definition: childreninterface.h:38
QByteArray readAll()
QString path() const
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
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
QList< Key > keys() const
QString toLocalFile() const
QDomText createTextNode(const QString &value)
Interpreter * interpreter(const QString &interpretername) const
Return the Interpreter instance defined by the interpretername.
Definition: manager.cpp:271
bool exists() const
virtual void close()
bool isNull() const
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
QDomNode firstChild() const
QByteArray toLatin1() const
void setError(const QString &errormessage, const QString &tracemessage=QString(), long lineno=-1)
Set the error message.
Definition: errorinterface.h:69
QString absolutePath() const
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
int length() const
QString fromLatin1(const char *str, int size)
bool setProperty(const char *name, const QVariant &value)
QString tagName() const
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
QList< QByteArray > dynamicPropertyNames() const
QDomElement createElement(const QString &tagName)
The ActionCollection class manages collections of Action instances.
Definition: actioncollection.h:45
QString absolutePath() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
QString toString() const
bool isEnabled() const
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
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.