Kross
values_p.h
Go to the documentation of this file.
127 r = v.isArray() ? QRect(v.property(0).toInt32(),v.property(1).toInt32(),v.property(2).toInt32(),v.property(3).toInt32()) : QRect();
133 r = v.isArray() ? QRectF(v.property(0).toNumber(),v.property(1).toNumber(),v.property(2).toNumber(),v.property(3).toNumber()) : QRectF();
193 return context->throwError(QScriptContext::TypeError, QString("No such QWidget \"%1\"").arg(widgetname));
196 QScriptEngine::ValueOwnership owner = parent ? QScriptEngine::QtOwnership : QScriptEngine::ScriptOwnership;
203 if( QLayout *layout = dynamic_cast<QLayout*>( qscriptvalue_cast<QObject*>(c->thisObject()) ) ) {
208 gridLayout->addWidget(w, c->argument(1).toInt32(), c->argument(2).toInt32(), (Qt::Alignment)c->argument(3).toInt32());
214 gridLayout->addLayout(l, c->argument(1).toInt32(), c->argument(2).toInt32(), (Qt::Alignment)c->argument(3).toInt32());
QScriptValue createGridLayout(QScriptContext *context, QScriptEngine *engine)
Definition: values_p.h:238
QString i18n(const char *text)
QScriptValue includeFunction(QScriptContext *context, QScriptEngine *engine)
Definition: values_p.h:241
QScriptValue importExtension(const QString &extension)
QScriptValue createWidget(QScriptContext *context, QScriptEngine *engine)
Definition: values_p.h:186
void next()
int width() const
QScriptValue createVBoxLayout(QScriptContext *context, QScriptEngine *engine)
Definition: values_p.h:232
The EcmaObject implements QScriptClass and Kross::Object to provide custom behavior to QtScript objec...
Definition: values_p.h:54
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
QString name() const
qreal x() const
qreal y() const
QScriptValue newObject()
void fromByteArray(const QScriptValue &v, QByteArray &ba)
Definition: values_p.h:98
bool hasNext() const
bool isNull() const
int height() const
int x() const
int y() const
QVariant toVariant() const
void setNamedColor(const QString &name)
typedef Alignment
int argumentCount() const
void fromObjPtr(const QScriptValue &v, Kross::Object::Ptr &ptr)
Definition: values_p.h:182
QString toString(QFlags< QUrl::FormattingOption > options) const
QScriptValue value() const
QScriptValue call(const QScriptValue &thisObject, const QScriptValueList &args)
QString toString() const
void initializeCore(QScriptEngine *engine)
Initialize some core functionality like common used types we like to use within scripts.
Definition: values_p.h:251
int x() const
int y() const
QString name() const
QScriptEngine * engine() const
void setPrototype(const QScriptValue &prototype)
qreal x() const
qreal y() const
QScriptValue toScriptValue(const T &value)
void setUrl(const QString &url)
QScriptValue prototype() const
bool isEmpty() const
QScriptValue toObjPtr(QScriptEngine *e, const Kross::Object::Ptr &ptr)
Definition: values_p.h:178
QScriptValue addWidgetLayout(QScriptContext *c, QScriptEngine *engine)
Definition: values_p.h:202
QScriptValue callee() const
QScriptValue nullValue()
QScriptValue property(const QString &name, const ResolveFlags &mode) const
QScriptValue thisObject() const
virtual QVariant callMethod(const QString &name, const QVariantList &args=QVariantList())
Pass a call to the object and evaluated it.
Definition: values_p.h:63
bool isFunction() const
virtual QStringList methodNames()
Return a list of supported callable objects.
Definition: values_p.h:79
QScriptValue toByteArray(QScriptEngine *e, const QByteArray &ba)
Definition: values_p.h:95
void initializeGui(QScriptEngine *engine)
Initialize GUI functionality like widgets the QUiLoader provides and some layout-managers.
Definition: values_p.h:285
void addLayout(QLayout *layout, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
bool isNull() const
qint32 toInt32() const
QScriptValue newQObject(QObject *object, ValueOwnership ownership, const QObjectWrapOptions &options)
QScriptValue newVariant(const QVariant &value)
int width() const
qreal width() const
QStringList availableWidgets() const
bool isValid() const
int height() const
QScriptEngine * engine() const
QScriptValue createLayout(QScriptContext *context, QScriptEngine *engine, QLayout *layout)
Definition: values_p.h:221
The class Object does provide us scripting objects like class instances to the C++ world...
Definition: object.h:69
EcmaObject(QScriptEngine *engine, const QScriptValue &object=QScriptValue())
Definition: values_p.h:57
qreal height() const
QScriptValue argument(int index) const
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
qreal height() const
QScriptValue throwError(Error error, const QString &text)
QScriptValue newFunction(FunctionSignature fun, int length)
QScriptValue globalObject() const
bool isArray() const
qreal width() const
bool isValid() const
qsreal toNumber() const
QScriptValue createHBoxLayout(QScriptContext *context, QScriptEngine *engine)
Definition: values_p.h:235
void setProperty(const QString &name, const QScriptValue &value, const PropertyFlags &flags)
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.