42 #include "private/qdeclarativevmemetaobject_p.h" 45 #include "private/qdeclarativerefcount_p.h" 47 #include "private/qdeclarativeexpression_p.h" 48 #include "private/qdeclarativecontext_p.h" 49 #include "private/qdeclarativebinding_p.h" 61 inline const void *
dataPtr()
const;
135 }
else if (
type == qMetaTypeId<QVariant>()) {
138 }
else if (
type == qMetaTypeId<QScriptValue>()) {
250 if (
type != qMetaTypeId<QScriptValue>())
268 if (
type != qMetaTypeId<QVariant>()) {
270 type = qMetaTypeId<QVariant>();
372 if (
type != qMetaTypeId<QScriptValue>()) {
374 type = qMetaTypeId<QScriptValue>();
386 metaData(meta),
data(0), methods(0), parent(0)
404 int list_type = qMetaTypeId<QDeclarativeListProperty<QObject> >();
409 if (t == list_type) {
428 int flags = *
reinterpret_cast<int*
>(a[3]);
433 int valueIndex = pair.
first;
438 if (valueIndex != -1) {
449 if (!ep)
delete valueType;
464 bool needActivate =
false;
479 *
reinterpret_cast<int *
>(a[0]) =
data[
id].asInt();
482 *
reinterpret_cast<bool *
>(a[0]) =
data[
id].asBool();
485 *
reinterpret_cast<double *
>(a[0]) =
data[
id].asDouble();
488 *
reinterpret_cast<QString *
>(a[0]) =
data[
id].asQString();
491 *
reinterpret_cast<QUrl *
>(a[0]) =
data[
id].asQUrl();
494 *
reinterpret_cast<QColor *
>(a[0]) =
data[
id].asQColor();
497 *
reinterpret_cast<QDate *
>(a[0]) =
data[
id].asQDate();
500 *
reinterpret_cast<QDateTime *
>(a[0]) =
data[
id].asQDateTime();
503 *
reinterpret_cast<QObject **
>(a[0]) =
data[
id].asQObject();
521 needActivate = *
reinterpret_cast<int *
>(a[0]) !=
data[
id].asInt();
525 needActivate = *
reinterpret_cast<bool *
>(a[0]) !=
data[
id].asBool();
529 needActivate = *
reinterpret_cast<double *
>(a[0]) !=
data[
id].asDouble();
533 needActivate = *
reinterpret_cast<QString *
>(a[0]) !=
data[
id].asQString();
537 needActivate = *
reinterpret_cast<QUrl *
>(a[0]) !=
data[
id].asQUrl();
541 needActivate = *
reinterpret_cast<QColor *
>(a[0]) !=
data[
id].asQColor();
545 needActivate = *
reinterpret_cast<QDate *
>(a[0]) !=
data[
id].asQDate();
549 needActivate = *
reinterpret_cast<QDateTime *
>(a[0]) !=
data[
id].asQDateTime();
550 data[id].
setValue(*reinterpret_cast<QDateTime *>(a[0]));
553 needActivate = *
reinterpret_cast<QObject **
>(a[0]) !=
data[
id].asQObject();
572 if (id < metaData->aliasCount) {
577 *
reinterpret_cast<void **
>(a[0]) = 0;
579 if (!
ctxt)
return -1;
591 *
reinterpret_cast<QObject **
>(a[0]) = target;
597 int flags = *
reinterpret_cast<int*
>(a[3]);
602 if (binding) binding->
destroy();
638 if (
id < plainSignals) {
673 return object->qt_metacall(c, _id, a);
681 if (!
methods[index].isValid()) {
702 if (
data[
id].dataType() == qMetaTypeId<QScriptValue>())
712 if (
data[
id].dataType() == qMetaTypeId<QScriptValue>())
728 bool needActivate =
false;
734 needActivate = (
data[id].
dataType() != qMetaTypeId<QVariant>() ||
757 return static_cast<List *
>(prop->
data)->count();
762 return static_cast<List *
>(prop->
data)->
at(index);
845 *valueTypeIndex = -1;
The QVariant class acts like a union for the most common Qt data types.
The QColor class provides colors based on RGB, HSV or CMYK values.
static QDeclarativeData * get(const QObject *object, bool create=false)
void setBit(int i)
Sets the bit at index position i to 1.
#define QT_END_NAMESPACE
This macro expands to.
QString toString(FormattingOptions options=None) const
Returns the human-displayable string representation of the URL.
QDeclarativeEngine * engine
static QDeclarativeValueType * valueType(int)
#define at(className, varName)
virtual void destroy(DestroyMode mode=DisconnectBinding)
Destroy the binding.
static bool connect(QObject *sender, int signal_index, const QObject *receiver, int method_index, int type=0, int *types=0)
Connect sender signal_index to receiver method_index with the specified type and types.
The QDate class provides date functions.
long ASN1_INTEGER_get ASN1_INTEGER * a
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags flags)=0
const QDateTime & asQDateTime()
virtual void write(const QVariant &value)=0
This method will be called when a new value is assigned to the property being intercepted.
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
bool testBit(int i) const
Returns true if the bit at index position i is 1; otherwise returns false.
The QObject class is the base class of all Qt objects.
bool hasBindingBit(int) const
static QDeclarativeEnginePrivate * get(QDeclarativeEngine *e)
const QVariant & asQVariant()
static QObjectPrivate * get(QObject *o)
const void * dataPtr() const
The QChar class provides a 16-bit Unicode character.
static QString fromRawData(const QChar *, int size)
Constructs a QString that uses the first size Unicode characters in the array unicode.
const T value(const Key &key) const
Returns the value associated with the key.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QScriptValue newQObject(QObject *, int type=QMetaType::QObjectStar)
QVariant scriptValueToVariant(const QScriptValue &, int hint=QVariant::Invalid)
void append(const T &t)
Inserts value at the end of the list.
The QTime class provides clock time functions.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QDeclarativeContextData * data
static QScriptValue evalInObjectScope(QDeclarativeContextData *, QObject *, const QString &, const QString &, int, QScriptValue *)
virtual void setValue(QVariant)=0
const QScriptValue & asQScriptValue()
const QColor & asQColor()
void resize(int size)
Resizes the bit array to size bits.
QScriptValue scriptValueFromVariant(const QVariant &)
void clear()
Removes all items from the list.
static QDeclarativeAbstractBinding * setBinding(QObject *, int coreIndex, int valueTypeIndex, QDeclarativeAbstractBinding *, WriteFlags flags=DontRemoveBinding)
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
~QDeclarativeVMEVariant()
QDeclarativeObjectScriptClass * objectClass
static QDeclarativeContextPrivate * get(QDeclarativeContext *context)
int userType() const
Returns the storage type of the value stored in the variant.
The QDateTime class provides date and time functions.
QDeclarativeValueTypeFactory valueTypes
QDeclarativeContext * asQDeclarativeContext()
Q_OUTOFLINE_TEMPLATE QPair< T1, T2 > qMakePair(const T1 &x, const T2 &y)
if(void) toggleToolbarShown
static const char * get(QDBusError::ErrorType code)
T qvariant_cast(const QVariant &)
The QDeclarativeContext class defines a context within a QML engine.
const QString & asQString()
The QScriptValue class acts as a container for the Qt Script data types.
The QDeclarativePropertyValueInterceptor class is inherited by property interceptors such as Behavior...
QScriptValue call(const QScriptValue &thisObject=QScriptValue(), const QScriptValueList &args=QScriptValueList())
Calls this QScriptValue as a function, using thisObject as the `this' object in the function call...
bool isEmpty() const
Returns true if this bit array has size 0; otherwise returns false.
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
virtual void read(QObject *, int)=0