Qt 4.8
Classes | Public Functions | Public Variables | List of all members
QDeclarativePropertyChangesPrivate Class Reference
Inheritance diagram for QDeclarativePropertyChangesPrivate:
QDeclarativeStateOperationPrivate QObjectPrivate QObjectData

Classes

class  ExpressionChange
 

Public Functions

void decode ()
 
QDeclarativeProperty property (const QString &)
 
 QDeclarativePropertyChangesPrivate ()
 
- Public Functions inherited from QDeclarativeStateOperationPrivate
 QDeclarativeStateOperationPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

QByteArray data
 
bool decoded: 1
 
QList< ExpressionChangeexpressions
 
bool isExplicit: 1
 
QDeclarativeGuard< QObjectobject
 
QList< QPair< QString, QVariant > > properties
 
bool restore: 1
 
QList< QDeclarativeReplaceSignalHandler * > signalReplacements
 
- Public Variables inherited from QDeclarativeStateOperationPrivate
QDeclarativeStatem_state
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Detailed Description

Definition at line 215 of file qdeclarativepropertychanges.cpp.

Constructors and Destructors

◆ QDeclarativePropertyChangesPrivate()

QDeclarativePropertyChangesPrivate::QDeclarativePropertyChangesPrivate ( )
inline

Functions

◆ decode()

void QDeclarativePropertyChangesPrivate::decode ( )

Definition at line 322 of file qdeclarativepropertychanges.cpp.

323 {
325  if (decoded)
326  return;
327 
329 
330  int count;
331  ds >> count;
332  for (int ii = 0; ii < count; ++ii) {
333  QString name;
334  bool isScript;
335  QVariant data;
337  ds >> name;
338  ds >> isScript;
339  ds >> data;
340  if (isScript)
341  ds >> id;
342 
343  QDeclarativeProperty prop = property(name); //### better way to check for signal property?
345  QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
347  if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
348  expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
350  handler->property = prop;
351  handler->expression = expression;
353  } else if (isScript) {
354  QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
356  if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
357  expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
358  expressions << ExpressionChange(name, id, expression);
359  } else {
360  properties << qMakePair(name, data);
361  }
362  }
363 
364  decoded = true;
365  data.clear();
366 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
static QDeclarativeData * get(const QObject *object, bool create=false)
Type type() const
Returns the type of the property.
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
#define Q_Q(Class)
Definition: qglobal.h:2483
static Identifier Invalid
const char * name
QDeclarativeProperty property(const QString &)
Q_OUTOFLINE_TEMPLATE QPair< T1, T2 > qMakePair(const T1 &x, const T2 &y)
Definition: qpair.h:102
void setSourceLocation(const QString &fileName, int line)
Set the location of this expression to line of url.
The QDeclarativeProperty class abstracts accessing properties on objects created from QML...
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
The QDeclarativeExpression class evaluates JavaScript in a QML context.
QImageIOHandler * handler
QList< QPair< QString, QVariant > > properties
QList< QDeclarativeReplaceSignalHandler * > signalReplacements

◆ property()

QDeclarativeProperty QDeclarativePropertyChangesPrivate::property ( const QString property)

Definition at line 428 of file qdeclarativepropertychanges.cpp.

429 {
431  QDeclarativeProperty prop(object, property, qmlContext(q));
432  if (!prop.isValid()) {
433  qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property);
434  return QDeclarativeProperty();
435  } else if (!(prop.type() & QDeclarativeProperty::SignalProperty) && !prop.isWritable()) {
436  qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property);
437  return QDeclarativeProperty();
438  }
439  return prop;
440 }
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
#define Q_Q(Class)
Definition: qglobal.h:2483
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
Definition: qstring.cpp:7186
The QDeclarativeProperty class abstracts accessing properties on objects created from QML...
QDeclarativeInfo qmlInfo(const QObject *me)

Properties

◆ data

QByteArray QDeclarativePropertyChangesPrivate::data

◆ decoded

bool QDeclarativePropertyChangesPrivate::decoded

◆ expressions

QList<ExpressionChange> QDeclarativePropertyChangesPrivate::expressions

Definition at line 243 of file qdeclarativepropertychanges.cpp.

◆ isExplicit

bool QDeclarativePropertyChangesPrivate::isExplicit

Definition at line 227 of file qdeclarativepropertychanges.cpp.

◆ object

QDeclarativeGuard<QObject> QDeclarativePropertyChangesPrivate::object

Definition at line 222 of file qdeclarativepropertychanges.cpp.

◆ properties

QList<QPair<QString, QVariant> > QDeclarativePropertyChangesPrivate::properties

Definition at line 242 of file qdeclarativepropertychanges.cpp.

◆ restore

bool QDeclarativePropertyChangesPrivate::restore

Definition at line 226 of file qdeclarativepropertychanges.cpp.

◆ signalReplacements

QList<QDeclarativeReplaceSignalHandler*> QDeclarativePropertyChangesPrivate::signalReplacements

Definition at line 244 of file qdeclarativepropertychanges.cpp.


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