Qt 4.8
Public Functions | Public Variables | Protected Functions | Properties | List of all members
ModelNodeMetaObject Class Reference

#include <qdeclarativelistmodel_p_p.h>

Inheritance diagram for ModelNodeMetaObject:
QDeclarativeOpenMetaObject QAbstractDynamicMetaObject QMetaObject

Public Functions

 ModelNodeMetaObject (QScriptEngine *seng, ModelObject *object)
 
- Public Functions inherited from QDeclarativeOpenMetaObject
int count () const
 
bool hasValue (int) const
 
virtual QVariant initialValue (int)
 
QByteArray name (int) const
 
QObjectobject () const
 
QVariantoperator[] (const QByteArray &)
 
QVariantoperator[] (int)
 
 QDeclarativeOpenMetaObject (QObject *, bool=true)
 
 QDeclarativeOpenMetaObject (QObject *, QDeclarativeOpenMetaObjectType *, bool=true)
 
void setCached (bool)
 
void setValue (const QByteArray &, const QVariant &)
 
void setValue (int, const QVariant &)
 
QDeclarativeOpenMetaObjectTypetype () const
 
QVariant value (const QByteArray &) const
 
QVariant value (int) const
 
 ~QDeclarativeOpenMetaObject ()
 
- Public Functions inherited from QAbstractDynamicMetaObject
virtual ~QAbstractDynamicMetaObject ()
 
- Public Functions inherited from QMetaObject
QObjectcast (QObject *obj) const
 Returns obj if object obj inherits from this meta-object; otherwise returns 0. More...
 
const QObjectcast (const QObject *obj) const
 Returns obj if object obj inherits from this meta-object; otherwise returns 0. More...
 
QMetaClassInfo classInfo (int index) const
 Returns the meta-data for the item of class information with the given index. More...
 
int classInfoCount () const
 Returns the number of items of class information in this class. More...
 
int classInfoOffset () const
 Returns the class information offset for this class; i.e. More...
 
const char * className () const
 Returns the class name. More...
 
QMetaMethod constructor (int index) const
 Returns the meta-data for the constructor with the given index. More...
 
int constructorCount () const
 Returns the number of constructors in this class. More...
 
QMetaEnum enumerator (int index) const
 Returns the meta-data for the enumerator with the given index. More...
 
int enumeratorCount () const
 Returns the number of enumerators in this class. More...
 
int enumeratorOffset () const
 Returns the enumerator offset for this class; i.e. More...
 
int indexOfClassInfo (const char *name) const
 Finds class information item name and returns its index; otherwise returns -1. More...
 
int indexOfConstructor (const char *constructor) const
 Finds constructor and returns its index; otherwise returns -1. More...
 
int indexOfEnumerator (const char *name) const
 Finds enumerator name and returns its index; otherwise returns -1. More...
 
int indexOfMethod (const char *method) const
 Finds method and returns its index; otherwise returns -1. More...
 
int indexOfProperty (const char *name) const
 Finds property name and returns its index; otherwise returns -1. More...
 
int indexOfSignal (const char *signal) const
 Finds signal and returns its index; otherwise returns -1. More...
 
int indexOfSlot (const char *slot) const
 Finds slot and returns its index; otherwise returns -1. More...
 
QMetaMethod method (int index) const
 Returns the meta-data for the method with the given index. More...
 
int methodCount () const
 Returns the number of methods known to the meta-object system in this class, including the number of properties provided by each base class. More...
 
int methodOffset () const
 Returns the method offset for this class; i.e. More...
 
QObjectnewInstance (QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument()) const
 Constructs a new instance of this class. More...
 
QMetaProperty property (int index) const
 Returns the meta-data for the property with the given index. More...
 
int propertyCount () const
 Returns the number of properties in this class, including the number of properties provided by each base class. More...
 
int propertyOffset () const
 Returns the property offset for this class; i.e. More...
 
int static_metacall (Call, int, void **) const
 
const QMetaObjectsuperClass () const
 Returns the meta-object of the superclass, or 0 if there is no such object. More...
 
QString tr (const char *s, const char *c) const
 
QString tr (const char *s, const char *c, int n) const
 
QString trUtf8 (const char *s, const char *c) const
 
QString trUtf8 (const char *s, const char *c, int n) const
 
QMetaProperty userProperty () const
 Returns the property that has the USER flag set to true. More...
 

Public Variables

bool m_enabled
 
- Public Variables inherited from QMetaObject
struct {
   const uint *   data
 
   const void *   extradata
 
   const char *   stringdata
 
   const QMetaObject *   superdata
 
d
 

Protected Functions

void propertyWritten (int index)
 
- Protected Functions inherited from QDeclarativeOpenMetaObject
virtual int createProperty (const char *, const char *)
 
virtual int metaCall (QMetaObject::Call _c, int _id, void **_a)
 
QAbstractDynamicMetaObjectparent () const
 
virtual void propertyCreated (int, QMetaPropertyBuilder &)
 
virtual void propertyRead (int)
 
virtual void propertyWrite (int)
 

Properties

ModelObjectm_obj
 
QScriptEnginem_seng
 

Additional Inherited Members

- Public Types inherited from QMetaObject
enum  Call {
  InvokeMetaMethod, ReadProperty, WriteProperty, ResetProperty,
  QueryPropertyDesignable, QueryPropertyScriptable, QueryPropertyStored, QueryPropertyEditable,
  QueryPropertyUser, CreateInstance
}
 
- Static Public Functions inherited from QMetaObject
static void activate (QObject *sender, int signal_index, void **argv)
 
static void activate (QObject *sender, int from_signal_index, int to_signal_index, void **argv)
 
static void activate (QObject *sender, const QMetaObject *, int local_signal_index, void **argv)
 
static void activate (QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv)
 
static void addGuard (QObject **ptr)
 
static void changeGuard (QObject **ptr, QObject *o)
 
static bool checkConnectArgs (const char *signal, const char *method)
 Returns true if the signal and method arguments are compatible; otherwise returns false. More...
 
static bool connect (const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type=0, int *types=0)
 
static void connectSlotsByName (QObject *o)
 Searches recursively for all child objects of the given object, and connects matching signals from them to slots of object that follow the following form: More...
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, int method_index)
 
static bool disconnectOne (const QObject *sender, int signal_index, const QObject *receiver, int method_index)
 
static bool invokeMethod (QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 Invokes the member (a signal or a slot name) on the object obj. More...
 
static bool invokeMethod (QObject *obj, const char *member, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static bool invokeMethod (QObject *obj, const char *member, Qt::ConnectionType type, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static bool invokeMethod (QObject *obj, const char *member, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
 
static int metacall (QObject *, Call, int, void **)
 
static QByteArray normalizedSignature (const char *method)
 Normalizes the signature of the given method. More...
 
static QByteArray normalizedType (const char *type)
 Normalizes a type. More...
 
static void removeGuard (QObject **ptr)
 

Detailed Description

Definition at line 226 of file qdeclarativelistmodel_p_p.h.

Constructors and Destructors

◆ ModelNodeMetaObject()

ModelNodeMetaObject::ModelNodeMetaObject ( QScriptEngine seng,
ModelObject object 
)

Definition at line 1643 of file qdeclarativelistmodel.cpp.

1644  : QDeclarativeOpenMetaObject(object),
1645  m_enabled(false),
1646  m_seng(seng),
1647  m_obj(object)
1648 {
1649 }
QDeclarativeOpenMetaObject(QObject *, bool=true)

Functions

◆ propertyWritten()

void ModelNodeMetaObject::propertyWritten ( int  index)
protectedvirtual

Reimplemented from QDeclarativeOpenMetaObject.

Definition at line 1651 of file qdeclarativelistmodel.cpp.

1652 {
1653  if (!m_enabled)
1654  return;
1655 
1656  QString propName = QString::fromUtf8(name(index));
1658 
1659  QScriptValue sv = m_seng->newObject();
1660  sv.setProperty(propName, m_seng->newVariant(value));
1661  bool changed = m_obj->m_node->setObjectValue(sv, false);
1662  if (changed)
1663  m_obj->m_node->changedProperty(propName);
1664 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
bool setObjectValue(const QScriptValue &valuemap, bool writeToCache=true)
The QString class provides a Unicode character string.
Definition: qstring.h:83
void changedProperty(const QString &name) const
QVariant value(const QByteArray &) const
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
QScriptValue newObject()
Creates a QtScript object of class Object.
void setProperty(const QString &name, const QScriptValue &value, const PropertyFlags &flags=KeepExistingFlags)
Sets the value of this QScriptValue&#39;s property with the given name to the given value.
quint16 index
QVariant & operator[](const QByteArray &)
The QScriptValue class acts as a container for the Qt Script data types.
Definition: qscriptvalue.h:57
QScriptValue newVariant(const QVariant &value)
Creates a QtScript object holding the given variant value.

Properties

◆ m_enabled

bool ModelNodeMetaObject::m_enabled

◆ m_obj

ModelObject* ModelNodeMetaObject::m_obj
private

Definition at line 238 of file qdeclarativelistmodel_p_p.h.

Referenced by propertyWritten().

◆ m_seng

QScriptEngine* ModelNodeMetaObject::m_seng
private

Definition at line 237 of file qdeclarativelistmodel_p_p.h.

Referenced by propertyWritten().


The documentation for this class was generated from the following files: