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

#include <qdeclarativecontext_p.h>

Inheritance diagram for QDeclarativeContextPrivate:
QObjectPrivate QObjectData

Public Functions

 QDeclarativeContextPrivate ()
 
- 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
 

Static Public Functions

static QObjectcontext_at (QDeclarativeListProperty< QObject > *, int)
 
static int context_count (QDeclarativeListProperty< QObject > *)
 
static QDeclarativeContextPrivateget (QDeclarativeContext *context)
 
static QDeclarativeContextget (QDeclarativeContextPrivate *context)
 
- 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)
 

Public Variables

QDeclarativeContextDatadata
 
QList< QPointer< QObject > > instances
 
int notifyIndex
 
QList< QVariantpropertyValues
 
- 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 **)
 

Detailed Description

Definition at line 83 of file qdeclarativecontext_p.h.

Constructors and Destructors

◆ QDeclarativeContextPrivate()

QDeclarativeContextPrivate::QDeclarativeContextPrivate ( )

Definition at line 61 of file qdeclarativecontext.cpp.

62 : data(0), notifyIndex(-1)
63 {
64 }
QDeclarativeContextData * data

Functions

◆ context_at()

QObject * QDeclarativeContextPrivate::context_at ( QDeclarativeListProperty< QObject > *  prop,
int  index 
)
static

Definition at line 489 of file qdeclarativecontext.cpp.

Referenced by QDeclarativeContextScriptClass::property().

490 {
491  QDeclarativeContext *context = static_cast<QDeclarativeContext*>(prop->object);
493  int contextProperty = (int)(quintptr)prop->data;
494 
495  if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId<QList<QObject*> >()) {
496  return 0;
497  } else {
498  return ((const QList<QObject*> *)d->propertyValues.at(contextProperty).constData())->at(index);
499  }
500 }
double d
Definition: qnumeric_p.h:62
QIntegerForSizeof< void * >::Unsigned quintptr
Definition: qglobal.h:986
#define at(className, varName)
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
static QDeclarativeContextPrivate * get(QDeclarativeContext *context)
int userType() const
Returns the storage type of the value stored in the variant.
Definition: qvariant.cpp:1913
const void * constData() const
Definition: qvariant.cpp:3065
The QDeclarativeContext class defines a context within a QML engine.
quint16 index
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ context_count()

int QDeclarativeContextPrivate::context_count ( QDeclarativeListProperty< QObject > *  prop)
static

Definition at line 476 of file qdeclarativecontext.cpp.

Referenced by QDeclarativeContextScriptClass::property().

477 {
478  QDeclarativeContext *context = static_cast<QDeclarativeContext*>(prop->object);
480  int contextProperty = (int)(quintptr)prop->data;
481 
482  if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId<QList<QObject*> >()) {
483  return 0;
484  } else {
485  return ((const QList<QObject> *)d->propertyValues.at(contextProperty).constData())->count();
486  }
487 }
double d
Definition: qnumeric_p.h:62
QIntegerForSizeof< void * >::Unsigned quintptr
Definition: qglobal.h:986
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
static QDeclarativeContextPrivate * get(QDeclarativeContext *context)
int userType() const
Returns the storage type of the value stored in the variant.
Definition: qvariant.cpp:1913
const void * constData() const
Definition: qvariant.cpp:3065
The QDeclarativeContext class defines a context within a QML engine.
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ get() [1/2]

static QDeclarativeContextPrivate* QDeclarativeContextPrivate::get ( QDeclarativeContext context)
inlinestatic

◆ get() [2/2]

static QDeclarativeContext* QDeclarativeContextPrivate::get ( QDeclarativeContextPrivate context)
inlinestatic

Definition at line 97 of file qdeclarativecontext_p.h.

97  {
98  return static_cast<QDeclarativeContext *>(context->q_func());
99  }
The QDeclarativeContext class defines a context within a QML engine.

Properties

◆ data

QDeclarativeContextData* QDeclarativeContextPrivate::data

◆ instances

QList<QPointer<QObject> > QDeclarativeContextPrivate::instances

◆ notifyIndex

int QDeclarativeContextPrivate::notifyIndex

◆ propertyValues

QList<QVariant> QDeclarativeContextPrivate::propertyValues

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