Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeOpenMetaObjectPrivate Class Reference

Public Functions

QVariantgetData (int idx)
 
bool hasData (int idx) const
 
 QDeclarativeOpenMetaObjectPrivate (QDeclarativeOpenMetaObject *_q)
 
void writeData (int idx, const QVariant &value)
 

Public Variables

bool autoCreate
 
bool cacheProperties
 
QList< QPair< QVariant, bool > > data
 
QObjectobject
 
QAbstractDynamicMetaObjectparent
 
QDeclarativeOpenMetaObjectq
 
QDeclarativeOpenMetaObjectTypetype
 

Detailed Description

Definition at line 138 of file qdeclarativeopenmetaobject.cpp.

Constructors and Destructors

◆ QDeclarativeOpenMetaObjectPrivate()

QDeclarativeOpenMetaObjectPrivate::QDeclarativeOpenMetaObjectPrivate ( QDeclarativeOpenMetaObject _q)
inline

Functions

◆ getData()

QVariant& QDeclarativeOpenMetaObjectPrivate::getData ( int  idx)
inline

Definition at line 144 of file qdeclarativeopenmetaobject.cpp.

Referenced by QDeclarativeOpenMetaObject::metaCall(), QDeclarativeOpenMetaObject::operator[](), QDeclarativeOpenMetaObject::setValue(), and QDeclarativeOpenMetaObject::value().

144  {
145  while (data.count() <= idx)
146  data << QPair<QVariant, bool>(QVariant(), false);
147  QPair<QVariant, bool> &prop = data[idx];
148  if (!prop.second) {
149  prop.first = q->initialValue(idx);
150  prop.second = true;
151  }
152  return prop.first;
153  }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
T1 first
Definition: qpair.h:65
T2 second
Definition: qpair.h:66
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QList< QPair< QVariant, bool > > data

◆ hasData()

bool QDeclarativeOpenMetaObjectPrivate::hasData ( int  idx) const
inline

Definition at line 163 of file qdeclarativeopenmetaobject.cpp.

Referenced by QDeclarativeOpenMetaObject::hasValue().

163  {
164  if (idx >= data.count())
165  return false;
166  return data[idx].second;
167  }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QList< QPair< QVariant, bool > > data

◆ writeData()

void QDeclarativeOpenMetaObjectPrivate::writeData ( int  idx,
const QVariant value 
)
inline

Definition at line 155 of file qdeclarativeopenmetaobject.cpp.

Referenced by QDeclarativeOpenMetaObject::metaCall(), and QDeclarativeOpenMetaObject::setValue().

155  {
156  while (data.count() <= idx)
157  data << QPair<QVariant, bool>(QVariant(), false);
158  QPair<QVariant, bool> &prop = data[idx];
159  prop.first = value;
160  prop.second = true;
161  }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
T1 first
Definition: qpair.h:65
T2 second
Definition: qpair.h:66
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QList< QPair< QVariant, bool > > data

Properties

◆ autoCreate

bool QDeclarativeOpenMetaObjectPrivate::autoCreate

◆ cacheProperties

bool QDeclarativeOpenMetaObjectPrivate::cacheProperties

◆ data

QList<QPair<QVariant, bool> > QDeclarativeOpenMetaObjectPrivate::data

◆ object

QObject* QDeclarativeOpenMetaObjectPrivate::object

◆ parent

QAbstractDynamicMetaObject* QDeclarativeOpenMetaObjectPrivate::parent

◆ q

QDeclarativeOpenMetaObject* QDeclarativeOpenMetaObjectPrivate::q

Definition at line 170 of file qdeclarativeopenmetaobject.cpp.

◆ type

QDeclarativeOpenMetaObjectType* QDeclarativeOpenMetaObjectPrivate::type

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