kjsembed
Namespaces | |
JSEventUtils | |
Classes | |
class | BrushBinding |
class | BuiltinsFactory |
class | ColorBinding |
struct | Constructor |
class | DomAttrBinding |
class | DomDocumentBinding |
class | DomDocumentTypeBinding |
class | DomElementBinding |
class | DomNamedNodeMapBinding |
class | DomNodeBinding |
class | DomNodeListBinding |
class | DomTextBinding |
class | Engine |
struct | Enumerator |
class | EventProxy |
class | FileDialog |
class | FileIOBinding |
class | FontBinding |
class | ImageBinding |
class | IoFactory |
class | JSEventMapper |
struct | Method |
class | ObjectBinding |
class | ObjectFactory |
class | PenBinding |
class | PixmapBinding |
class | PointBinding |
class | ProxyBinding |
class | QBrushBinding |
class | QBrushData |
class | QObjectBinding |
class | RectBinding |
class | SizeBinding |
class | SlotBinding |
class | SlotProxy |
class | StaticBinding |
class | StaticConstructor |
class | UrlBinding |
class | ValueBinding |
class | ValueFactory |
class | VariantBinding |
class | VariantFactory |
Typedefs | |
typedef KJS::JSObject *(* | callBind )(KJS::ExecState *, PointerBase &) |
typedef KJS::JSObject *(* | callConstructor )(KJS::ExecState *, const KJS::List &) |
typedef KJS::JSValue *(* | callMethod )(KJS::ExecState *, KJS::JSObject *, const KJS::List &) |
Functions | |
KJSEMBED_EXPORT QTextStream * | conerr () |
KJSEMBED_EXPORT QTextStream * | conin () |
KJSEMBED_EXPORT QTextStream * | conout () |
QList< QVariant > KJSEMBED_EXPORT | convertArrayToList (KJS::ExecState *exec, KJS::JSValue *value) |
QMap< QString, QVariant > KJSEMBED_EXPORT | convertArrayToMap (KJS::ExecState *exec, KJS::JSValue *value) |
QStringList KJSEMBED_EXPORT | convertArrayToStringList (KJS::ExecState *exec, KJS::JSValue *value) |
KJSEMBED_EXPORT KJS::JSValue * | convertToValue (KJS::ExecState *exec, const QVariant &value) |
QVariant KJSEMBED_EXPORT | convertToVariant (KJS::ExecState *exec, KJS::JSValue *value) |
KJS::JSValue * | createBool (KJS::ExecState *exec, bool value) |
KJS::JSValue * | createDouble (KJS::ExecState *exec, double value) |
KJS::JSValue * | createFloat (KJS::ExecState *exec, float value) |
KJS::JSValue * | createInt (KJS::ExecState *exec, int value) |
template<typename T > | |
KJS::JSValue * | createObject (KJS::ExecState *exec, const KJS::UString &className, const T *value, KJSEmbed::ObjectBinding::Ownership owner=KJSEmbed::ObjectBinding::JSOwned) |
KJS::JSValue * | createQByteArray (KJS::ExecState *exec, const QByteArray &value) |
KJS::JSValue * | createQDate (KJS::ExecState *exec, const QDate &value) |
KJS::JSValue * | createQDateTime (KJS::ExecState *exec, const QDateTime &value) |
KJSEMBED_EXPORT KJS::JSObject * | createQObject (KJS::ExecState *exec, QObject *value, KJSEmbed::ObjectBinding::Ownership owner=KJSEmbed::ObjectBinding::JSOwned) |
KJS::JSValue * | createQString (KJS::ExecState *exec, const QString &value) |
KJS::JSValue * | createQStringList (KJS::ExecState *exec, const QStringList &value) |
KJS::JSValue * | createQTime (KJS::ExecState *exec, const QTime &value) |
template<typename T > | |
KJS::JSValue * | createValue (KJS::ExecState *exec, const KJS::UString &className, const T &value) |
template<typename T > | |
KJS::JSValue * | createVariant (KJS::ExecState *exec, const KJS::UString &className, const T &value) |
template<typename T > | |
T * | extractBindingImp (KJS::ExecState *exec, KJS::JSValue *val) |
template<typename T > | |
T * | extractBindingImp (KJS::JSObject *obj) |
bool KJSEMBED_EXPORT | extractBool (KJS::ExecState *exec, const KJS::List &args, int idx, bool defaultValue=false) |
bool | extractBool (KJS::ExecState *exec, KJS::JSValue *value, bool defaultValue=false) |
double KJSEMBED_EXPORT | extractDouble (KJS::ExecState *exec, const KJS::List &args, int idx, double defaultValue=0) |
double KJSEMBED_EXPORT | extractDouble (KJS::ExecState *exec, KJS::JSValue *value, double defaultValue=0) |
float KJSEMBED_EXPORT | extractFloat (KJS::ExecState *exec, const KJS::List &args, int idx, float defaultValue=0) |
float KJSEMBED_EXPORT | extractFloat (KJS::ExecState *exec, KJS::JSValue *value, float defaultValue=0) |
int KJSEMBED_EXPORT | extractInt (KJS::ExecState *exec, const KJS::List &args, int idx, int defaultValue=0) |
int KJSEMBED_EXPORT | extractInt (KJS::ExecState *exec, KJS::JSValue *value, int defaultValue=0) |
template<typename T > | |
T KJSEMBED_EXPORT | extractInteger (KJS::ExecState *exec, KJS::JSValue *value, T defaultValue) |
template<typename T > | |
T KJSEMBED_EXPORT | extractInteger (KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue=T(0)) |
template<> | |
qint32 KJSEMBED_EXPORT | extractInteger< qint32 > (KJS::ExecState *exec, KJS::JSValue *value, qint32 defaultValue) |
template<> | |
quint16 KJSEMBED_EXPORT | extractInteger< quint16 > (KJS::ExecState *exec, KJS::JSValue *value, quint16 defaultValue) |
template<> | |
quint32 KJSEMBED_EXPORT | extractInteger< quint32 > (KJS::ExecState *exec, KJS::JSValue *value, quint32 defaultValue) |
template<typename T > | |
T KJSEMBED_EXPORT | extractNumber (KJS::ExecState *exec, KJS::JSValue *value, T defaultValue=T(0)) |
template<typename T > | |
T KJSEMBED_EXPORT | extractNumber (KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue=T(0)) |
template<typename T > | |
T * | extractObject (KJS::ExecState *exec, KJS::JSValue *arg, T *defaultValue) |
template<typename T > | |
T * | extractObject (KJS::ExecState *exec, const KJS::List &args, int idx, T *defaultValue=0L) |
template<typename T > | |
T | extractParameter (KJS::ExecState *exec, KJS::JSValue *arg, const T &defaultValue) |
QByteArray KJSEMBED_EXPORT | extractQByteArray (KJS::ExecState *exec, const KJS::List &args, int idx, const QByteArray &defaultValue=QByteArray()) |
QByteArray KJSEMBED_EXPORT | extractQByteArray (KJS::ExecState *exec, KJS::JSValue *value, const QByteArray &defaultValue=QByteArray()) |
QDate KJSEMBED_EXPORT | extractQDate (KJS::ExecState *exec, const KJS::List &args, int idx, const QDate &defaultValue=QDate()) |
QDate KJSEMBED_EXPORT | extractQDate (KJS::ExecState *exec, KJS::JSValue *value, const QDate &defaultValue=QDate()) |
QDateTime KJSEMBED_EXPORT | extractQDateTime (KJS::ExecState *exec, const KJS::List &args, int idx, const QDateTime &defaultValue=QDateTime()) |
QDateTime KJSEMBED_EXPORT | extractQDateTime (KJS::ExecState *exec, KJS::JSValue *value, const QDateTime &defaultValue=QDateTime()) |
QString KJSEMBED_EXPORT | extractQString (KJS::ExecState *exec, const KJS::List &args, int idx, const QString defaultValue=QString()) |
QString KJSEMBED_EXPORT | extractQString (KJS::ExecState *exec, KJS::JSValue *value, const QString defaultValue=QString()) |
QStringList KJSEMBED_EXPORT | extractQStringList (KJS::ExecState *exec, const KJS::List &args, int idx, const QStringList &defaultValue=QStringList()) |
QStringList KJSEMBED_EXPORT | extractQStringList (KJS::ExecState *exec, KJS::JSValue *value, const QStringList &defaultValue=QStringList()) |
QTime KJSEMBED_EXPORT | extractQTime (KJS::ExecState *exec, const KJS::List &args, int idx, const QTime &defaultValue=QTime()) |
QTime KJSEMBED_EXPORT | extractQTime (KJS::ExecState *exec, KJS::JSValue *value, const QTime &defaultValue=QTime()) |
template<typename T > | |
T KJSEMBED_EXPORT | extractString (KJS::ExecState *exec, KJS::JSValue *value, T defaultValue=T()) |
template<typename T > | |
T KJSEMBED_EXPORT | extractString (KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue=T()) |
template<typename T > | |
T | extractValue (KJS::ExecState *exec, KJS::JSValue *arg, const T &defaultValue) |
template<typename T > | |
T | extractValue (KJS::ExecState *exec, const KJS::List &args, int idx, const T &defaultValue=T()) |
QVariant KJSEMBED_EXPORT | extractVariant (KJS::ExecState *exec, KJS::JSValue *value) |
template<typename T > | |
T | extractVariant (KJS::ExecState *exec, KJS::JSValue *arg, const T &defaultValue) |
template<typename T > | |
T | extractVariant (KJS::ExecState *exec, const KJS::List &args, int idx, const T &defaultValue=T()) |
bool | isBasic (KJS::JSValue *value) |
bool | isObject (KJS::JSObject *object) |
bool | isVariant (KJS::JSObject *object) |
void | setup (KJS::ExecState *exec, KJS::JSObject *parent) |
QString | toQString (const KJS::UString &u) |
QString | toQString (const KJS::Identifier &i) |
KJS::UString | toUString (const QString &qs) |
QUiLoader * | uiLoader () |
Variables | |
static EventType | events [] |
static QHash< QString, const Constructor * > | g_ctorHash |
static QUiLoader * | gUiLoader = 0L |
Typedef Documentation
typedef KJS::JSObject*(* KJSEmbed::callBind)(KJS::ExecState *, PointerBase &) |
Bind signature.
- Parameters
-
exec the execution context ptr A PointerBase that points to a Pointer object that contains a pointer to the object to provide a javascript binding for.
Definition at line 335 of file binding_support.h.
typedef KJS::JSObject*(* KJSEmbed::callConstructor)(KJS::ExecState *, const KJS::List &) |
Constructor signature.
- Parameters
-
exec the execution context args A KJS::List of KJS::JSValue objects that represents the arguments that where passed in from the javascript function signature.
Definition at line 343 of file binding_support.h.
typedef KJS::JSValue*(* KJSEmbed::callMethod)(KJS::ExecState *, KJS::JSObject *, const KJS::List &) |
Method callback signature.
- Parameters
-
exec The execution state. object The current object that the method is working on (equivelent of "this") args A KJS::List of KJS::JSValue objects that represents the arguments that where passed in from the javascript function signature.
Definition at line 289 of file binding_support.h.
Function Documentation
QTextStream * KJSEmbed::conerr | ( | ) |
Definition at line 143 of file kjseglobal.cpp.
QTextStream * KJSEmbed::conin | ( | ) |
Definition at line 118 of file kjseglobal.cpp.
QTextStream * KJSEmbed::conout | ( | ) |
Definition at line 130 of file kjseglobal.cpp.
QList< QVariant > KJSEmbed::convertArrayToList | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value | ||
) |
Convert a KJS::JSValue into a QList.
If the list contains only strings, or objects that can be converted to strings you can call to convertArrayToStringList. If you call this on an associative array or a javascript object the list will return empty. Unless there happens to be a property with a numeric index present, then all bets are off.
Definition at line 169 of file variant_binding.cpp.
QMap< QString, QVariant > KJSEmbed::convertArrayToMap | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value | ||
) |
Convert a KJS::JSValue that contains an associative array into a QMap.
If you call this on a normal Javascript object you will get each property as the key and its data as the value. A normal array will give you a QMap with each key being the index.
Definition at line 153 of file variant_binding.cpp.
QStringList KJSEmbed::convertArrayToStringList | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value | ||
) |
Convert a KJS::JSValue inot a QStringList.
- See also
- convertArrayToList.
Definition at line 199 of file variant_binding.cpp.
KJS::JSValue * KJSEmbed::convertToValue | ( | KJS::ExecState * | exec, |
const QVariant & | value | ||
) |
Convert a QVariant to a KJS::JSValue.
If the type is a known type the bindings will be added. If the type is supported by QVariant, but is not supported by KJSEmbed then it will just be wrapped. This wrapped value can be used just like normal value bindings, save for the lack of methods available to the object.
Definition at line 298 of file variant_binding.cpp.
QVariant KJSEmbed::convertToVariant | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value | ||
) |
Convert a KJS::JSValue into a QVariant object.
Definition at line 253 of file variant_binding.cpp.
KJS::JSValue * KJSEmbed::createBool | ( | KJS::ExecState * | exec, |
bool | value | ||
) |
Create a new KJS::JSValue with the value of the bool.
Definition at line 167 of file binding_support.cpp.
KJS::JSValue * KJSEmbed::createDouble | ( | KJS::ExecState * | exec, |
double | value | ||
) |
Create a new KJS::JSValue with the value of the double.
Definition at line 117 of file binding_support.cpp.
KJS::JSValue * KJSEmbed::createFloat | ( | KJS::ExecState * | exec, |
float | value | ||
) |
Create a new KJS::JSValue with the value of the float.
Definition at line 142 of file binding_support.cpp.
KJS::JSValue * KJSEmbed::createInt | ( | KJS::ExecState * | exec, |
int | value | ||
) |
Create a new KJS::JSValue with the value of the integer.
Definition at line 94 of file binding_support.cpp.
KJS::JSValue* KJSEmbed::createObject | ( | KJS::ExecState * | exec, |
const KJS::UString & | className, | ||
const T * | value, | ||
KJSEmbed::ObjectBinding::Ownership | owner = KJSEmbed::ObjectBinding::JSOwned |
||
) |
Can create any known KJSEmbed::ObjectBinding object and set the value.
On failure a KJS::jsNull will be returned and the exception set.
Definition at line 200 of file object_binding.h.
KJS::JSValue * KJSEmbed::createQByteArray | ( | KJS::ExecState * | exec, |
const QByteArray & | value | ||
) |
Create a new KJS::JSValue with the value of the QString.
Definition at line 66 of file binding_support.cpp.
KJS::JSValue * KJSEmbed::createQDate | ( | KJS::ExecState * | exec, |
const QDate & | value | ||
) |
Create a new KJS::JSValue with the value of the QDate.
Definition at line 205 of file binding_support.cpp.
KJS::JSValue * KJSEmbed::createQDateTime | ( | KJS::ExecState * | exec, |
const QDateTime & | value | ||
) |
Create a new KJS::JSValue with the value of the QDateTime.
Definition at line 186 of file binding_support.cpp.
KJS::JSObject * KJSEmbed::createQObject | ( | KJS::ExecState * | exec, |
QObject * | value, | ||
KJSEmbed::ObjectBinding::Ownership | owner = KJSEmbed::ObjectBinding::JSOwned |
||
) |
Returns a binding object for the specified QObject.
This method walks up the meta objects in order to find the most specific binding it can. There should always be some kind of binding possible even if it is just the QObject binding.
- Parameters
-
exec Represents the current state of script execution. value The QObject or from it inherited instance we should return a binding object for. owner Defines who's the owner of the QObject. This could be; - CPPOwned what means, that the QObject's lifetime is handled within C++ code. So, we just provide access to it and don't take any future actions.
- QObjOwned means that the QObject got deleted if the parent QObject is destroyed. If the QObject has no parent QObject, it behaves like JSOwned.
- JSOwned means, that the returned KJS::JSObject takes care of deleting the QObject. This means, that the QObject got deleted as soon as the KJS::JSObject got destroyed what happens if the KJS::JSObject is not needed / in use any longer.
- Returns
- the binding object instance that wraps the QObject instance or a JSObject with a prototype of jsNull (that is, the ECMAScript "null" value, not a null object pointer) if we failed to provide any binding for it.
Definition at line 735 of file qobject_binding.cpp.
KJS::JSValue * KJSEmbed::createQString | ( | KJS::ExecState * | exec, |
const QString & | value | ||
) |
Create a new KJS::JSValue with the value of the QString.
Definition at line 88 of file binding_support.cpp.
KJS::JSValue * KJSEmbed::createQStringList | ( | KJS::ExecState * | exec, |
const QStringList & | value | ||
) |
Create a new KJS::JSValue with the value of the QStringList.
Definition at line 243 of file binding_support.cpp.
KJS::JSValue * KJSEmbed::createQTime | ( | KJS::ExecState * | exec, |
const QTime & | value | ||
) |
Create a new KJS::JSValue with the value of the QTime.
Definition at line 224 of file binding_support.cpp.
KJS::JSValue* KJSEmbed::createValue | ( | KJS::ExecState * | exec, |
const KJS::UString & | className, | ||
const T & | value | ||
) |
Definition at line 195 of file value_binding.h.
KJS::JSValue* KJSEmbed::createVariant | ( | KJS::ExecState * | exec, |
const KJS::UString & | className, | ||
const T & | value | ||
) |
Can create any known KJSEmbed::VariantBinding object and set the value.
On failure a KJS::jsNull will be returned and the exception set. Only values that are supported by QVariant will work.
Definition at line 185 of file variant_binding.h.
T* KJSEmbed::extractBindingImp | ( | KJS::ExecState * | exec, |
KJS::JSValue * | val | ||
) |
This will extract a binding implementation from a KJS::JSValue.
Definition at line 268 of file binding_support.h.
T* KJSEmbed::extractBindingImp | ( | KJS::JSObject * | obj | ) |
This is just a helper function similar to the one above, only it takes a KJS::JSObject.
Definition at line 277 of file binding_support.h.
bool KJSEmbed::extractBool | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
bool | defaultValue = false |
||
) |
Extracts a bool from an argument list.
If the argument is not present, or is not convertable to a bool the defaultValue is returned.
Definition at line 149 of file binding_support.cpp.
bool KJSEmbed::extractBool | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
bool | defaultValue = false |
||
) |
Extract a bool from a value.
If the value cannot convert to a bool the defaultValue is returned.
Definition at line 159 of file binding_support.cpp.
double KJSEmbed::extractDouble | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
double | defaultValue = 0 |
||
) |
Extracts a double from an argument list.
If the argument is not present, or is not convertable to a double the defaultValue is returned.
Definition at line 100 of file binding_support.cpp.
double KJSEmbed::extractDouble | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
double | defaultValue = 0 |
||
) |
Extract a double from a value.
If the value cannot convert to a double the defaultValue is returned.
Definition at line 109 of file binding_support.cpp.
float KJSEmbed::extractFloat | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
float | defaultValue = 0 |
||
) |
Extracts a float from an argument list.
If the argument is not present, or is not convertable to a float the defaultValue is returned.
Definition at line 124 of file binding_support.cpp.
float KJSEmbed::extractFloat | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
float | defaultValue = 0 |
||
) |
Extract a float from a value.
If the value cannot convert to a float the defaultValue is returned.
Definition at line 134 of file binding_support.cpp.
int KJSEmbed::extractInt | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
int | defaultValue = 0 |
||
) |
Extracts an integer from an argument list.
If the argument is not present, or is not convertable to an integer the defaultValue is returned.
Definition at line 72 of file binding_support.cpp.
int KJSEmbed::extractInt | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
int | defaultValue = 0 |
||
) |
Extract an integer from a value.
If the value cannot convert to an integer the defaultValue is returned.
Definition at line 81 of file binding_support.cpp.
|
inline |
Extract an integer from a value.
If the value cannot convert to an integer or is not present defaultValue is returned
Definition at line 465 of file binding_support.h.
|
inline |
Extracts an integer from an arguments list.
If the argument is not present, or is not convertable to a number the defaultValue is returned.
Definition at line 513 of file binding_support.h.
|
inline |
Definition at line 480 of file binding_support.h.
|
inline |
Definition at line 500 of file binding_support.h.
|
inline |
Definition at line 490 of file binding_support.h.
|
inline |
Extract a number from a value.
If the value cannot convert to an integer or is not present defaultValue is returned
Definition at line 438 of file binding_support.h.
|
inline |
Extracts a number from an arguments list.
If the argument is not present, or is not convertable to a number the defaultValue is returned.
Definition at line 451 of file binding_support.h.
T* KJSEmbed::extractObject | ( | KJS::ExecState * | exec, |
KJS::JSValue * | arg, | ||
T * | defaultValue | ||
) |
Extracts a pointer based type from an ObjectBinding object.
Care should be taken that this method is not used with KJSEmbed::ObjectBinding objects because the cast will fail.
Definition at line 158 of file object_binding.h.
T* KJSEmbed::extractObject | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
T * | defaultValue = 0L |
||
) |
Extracts a pointer from a KJS::List of KJS::JSValues.
If the argument is out of range the default value is returned.
Definition at line 185 of file object_binding.h.
T KJSEmbed::extractParameter | ( | KJS::ExecState * | exec, |
KJS::JSValue * | arg, | ||
const T & | defaultValue | ||
) |
Definition at line 234 of file object_binding.h.
QByteArray KJSEmbed::extractQByteArray | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const QByteArray & | defaultValue = QByteArray() |
||
) |
Extracts a QByteArray from an argument list.
If the argument is not present, or is not convertable to a string the defaultValue is returned.
Definition at line 50 of file binding_support.cpp.
QByteArray KJSEmbed::extractQByteArray | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
const QByteArray & | defaultValue = QByteArray() |
||
) |
Extract a QString from a value.
If the value cannot convert to a string the defaultValue is returned.
Definition at line 59 of file binding_support.cpp.
QDate KJSEmbed::extractQDate | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const QDate & | defaultValue = QDate() |
||
) |
Extracts a QDate from an argument list.
If the argument is not present, or is not convertable to a QDate the defaultValue is returned.
Definition at line 193 of file binding_support.cpp.
QDate KJSEmbed::extractQDate | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
const QDate & | defaultValue = QDate() |
||
) |
Extract a QDate from a value.
If the value cannot convert to a QDate the defaultValue is returned.
Definition at line 199 of file binding_support.cpp.
QDateTime KJSEmbed::extractQDateTime | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const QDateTime & | defaultValue = QDateTime() |
||
) |
Extracts a QDateTime from an argument list.
If the argument is not present, or is not convertable to a QDateTime the defaultValue is returned.
Definition at line 174 of file binding_support.cpp.
QDateTime KJSEmbed::extractQDateTime | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
const QDateTime & | defaultValue = QDateTime() |
||
) |
Extract a bool from a value.
If the value cannot convert to a QDateTime the defaultValue is returned.
Definition at line 180 of file binding_support.cpp.
QString KJSEmbed::extractQString | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const QString | defaultValue = QString() |
||
) |
Extracts a QString from an argument list.
If the argument is not present, or is not convertable to a string the defaultValue is returned.
Definition at line 34 of file binding_support.cpp.
QString KJSEmbed::extractQString | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
const QString | defaultValue = QString() |
||
) |
Extract a QString from a value.
If the value cannot convert to a string the defaultValue is returned.
Definition at line 43 of file binding_support.cpp.
QStringList KJSEmbed::extractQStringList | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const QStringList & | defaultValue = QStringList() |
||
) |
Extracts a QStringList from an argument list.
If the argument is not present, or is not convertable to a QStringList the defaultValue is returned.
Definition at line 231 of file binding_support.cpp.
QStringList KJSEmbed::extractQStringList | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
const QStringList & | defaultValue = QStringList() |
||
) |
Extract a QStringList from a value.
If the value cannot convert to a QStringList the defaultValue is returned.
Definition at line 237 of file binding_support.cpp.
QTime KJSEmbed::extractQTime | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const QTime & | defaultValue = QTime() |
||
) |
Extracts a QTime from an argument list.
If the argument is not present, or is not convertable to a QTime the defaultValue is returned.
Definition at line 212 of file binding_support.cpp.
QTime KJSEmbed::extractQTime | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value, | ||
const QTime & | defaultValue = QTime() |
||
) |
Extract a QTime from a value.
If the value cannot convert to a QTime the defaultValue is returned.
Definition at line 218 of file binding_support.cpp.
|
inline |
Definition at line 416 of file binding_support.h.
|
inline |
Definition at line 425 of file binding_support.h.
T KJSEmbed::extractValue | ( | KJS::ExecState * | exec, |
KJS::JSValue * | arg, | ||
const T & | defaultValue | ||
) |
Extracts a pointer based type from an ObjectBinding object.
Care should be taken that this method is not used with KJSEmbed::ObjectBinding objects because the cast will fail.
Definition at line 167 of file value_binding.h.
T KJSEmbed::extractValue | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const T & | defaultValue = T() |
||
) |
Extracts a pointer from a KJS::List of KJS::Values.
If the argument is out of range the default value is returned.
Definition at line 184 of file value_binding.h.
QVariant KJSEmbed::extractVariant | ( | KJS::ExecState * | exec, |
KJS::JSValue * | value | ||
) |
Extracts a QVariant from a KJS::JSValue if the conversion fails a QVariant::Null is returned.
Definition at line 407 of file variant_binding.cpp.
T KJSEmbed::extractVariant | ( | KJS::ExecState * | exec, |
KJS::JSValue * | arg, | ||
const T & | defaultValue | ||
) |
Extracts a value based type from a VariantBinding object.
This method calls extractVariant so if the conversions fails then the default value will be returned. Care should be taken that this method is not used with KJSEmbed::ObjectBinding objects because the cast will fail.
Definition at line 142 of file variant_binding.h.
T KJSEmbed::extractVariant | ( | KJS::ExecState * | exec, |
const KJS::List & | args, | ||
int | idx, | ||
const T & | defaultValue = T() |
||
) |
Extracts a value from a KJS::List of KJS::JSValues.
If the argument is out of range the default value is returned.
Definition at line 169 of file variant_binding.h.
void KJSEmbed::setup | ( | KJS::ExecState * | exec, |
KJS::JSObject * | parent | ||
) |
Definition at line 114 of file kjsembed.cpp.
|
inline |
Definition at line 58 of file kjseglobal.h.
|
inline |
Definition at line 62 of file kjseglobal.h.
|
inline |
Definition at line 66 of file kjseglobal.h.
QUiLoader * KJSEmbed::uiLoader | ( | ) |
Definition at line 41 of file qwidget_binding.cpp.
Variable Documentation
|
static |
Definition at line 145 of file jseventmapper.cpp.
|
static |
Definition at line 28 of file static_binding.cpp.
|
static |
Definition at line 39 of file qwidget_binding.cpp.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.