Kross
Go to the documentation of this file.
20 #ifndef KROSS_ACTION_H
21 #define KROSS_ACTION_H
23 #include <QtCore/QVariant>
24 #include <QtCore/QObject>
25 #include <QtCore/QDir>
26 #include <QtCore/QUrl>
27 #include <QtGui/QAction>
28 #include <QtXml/QDomAttr>
29 #include <QtScript/QScriptable>
94 class KROSSCORE_EXPORT
Action
97 ,
public ChildrenInterface
98 ,
public ErrorInterface
113 Action(
QObject* parent,
const QString& name,
const QDir& packagepath = QDir());
139 void fromDomElement(
const QDomElement& element);
149 void fromDomElement(
const QDomElement& element,
const QStringList& searchPath);
156 QDomElement toDomElement()
const;
165 QDomElement toDomElement(
const QStringList& searchPath)
const;
190 bool isFinalized()
const;
203 Script* script()
const;
210 QString
name()
const;
221 QString description()
const;
226 void setDescription(
const QString& description);
231 QString iconName()
const;
236 void setIconName(
const QString& iconname);
241 bool isEnabled()
const;
246 void setEnabled(
bool enabled);
251 QString file()
const;
256 bool setFile(
const QString& scriptfile);
261 QByteArray code()
const;
266 void setCode(
const QByteArray& code);
272 QString interpreter()
const;
277 void setInterpreter(
const QString& interpretername);
283 QString currentPath()
const;
289 void addQObject(
QObject* obj,
const QString &name = QString());
294 QObject* qobject(
const QString &name)
const;
299 QStringList qobjectNames()
const;
306 QVariantMap options()
const;
313 QVariant option(
const QString& name,
const QVariant& defaultvalue = QVariant());
318 bool setOption(
const QString& name,
const QVariant& value);
323 QStringList functionNames();
331 QVariant callFunction(
const QString& name,
const QVariantList& args = QVariantList());
349 QVariant evaluate(
const QByteArray& code);
362 void dataChanged(
Action*);
386 void slotTriggered();
The Action class is an abstract container to deal with scripts like a single standalone script file.
const char * name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.