KJsEmbed
variant_binding.h
47 KJSEmbed::VariantBinding *imp = KJSEmbed::extractBindingImp<KJSEmbed::VariantBinding>(exec, self ); \
106 * Extract the actual value from the wrapper. This method wraps QVariant::value, so it will support
141 * Extracts a value based type from a VariantBinding object. This method calls @ref extractVariant so if
142 * the conversions fails then the default value will be returned. Care should be taken that this method
166 * Extracts a value from a KJS::List of KJS::JSValues. If the argument is out of range the default value
170 T extractVariant(KJS::ExecState *exec, const KJS::List &args, int idx, const T &defaultValue = T())
185 KJS::JSValue *createVariant(KJS::ExecState *exec, const KJS::UString &className, const T &value)
196 throwError(exec, KJS::TypeError, toUString(QString("Created failed to cast to %1 failed").arg(toQString(className))));
200 throwError(exec, KJS::TypeError, toUString(QString("Could not construct a %1").arg(toQString(className))));
212 QMap<QString, QVariant> KJSEMBED_EXPORT convertArrayToMap(KJS::ExecState *exec, KJS::JSValue *value);
215 * Convert a KJS::JSValue into a QList. If the list contains only strings, or objects that can be
217 * associative array or a javascript object the list will return empty. Unless there happens to be
225 QStringList KJSEMBED_EXPORT convertArrayToStringList(KJS::ExecState *exec, KJS::JSValue *value);
234 * If the type is supported by QVariant, but is not supported by KJSEmbed then it will just be wrapped.
bool isNull() const const
JSGlobalObject * globalObject() const
QVariant fromValue(const T &value)
T value() const const
int size() const
KJS::JSObject * construct(KJS::ExecState *exec, const KJS::List &args) override
Calls the callback that will in turn create a new instance of this object with the arguments passed i...
Definition: static_binding.cpp:77
bool canConvert(int targetTypeId) const const
void setValue(const QVariant &val)
Set the internal value of the QVariant.
Definition: variant_binding.cpp:72
Interpreter * dynamicInterpreter() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 10 2023 03:59:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 10 2023 03:59:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.