Qt 4.8
Classes | Public Types | Public Functions | Static Public Functions | Public Variables | List of all members
QDeclarativeStatePrivate Class Reference

#include <qdeclarativestate_p_p.h>

Inheritance diagram for QDeclarativeStatePrivate:
QObjectPrivate QObjectData

Classes

struct  OperationGuard
 

Public Types

typedef QList< QDeclarativeSimpleActionSimpleActionList
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 

Public Functions

void complete ()
 
QDeclarativeStateOperation::ActionList generateActionList (QDeclarativeStateGroup *) const
 
 QDeclarativeStatePrivate ()
 
- 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 void operations_append (QDeclarativeListProperty< QDeclarativeStateOperation > *prop, QDeclarativeStateOperation *op)
 
static QDeclarativeStateOperationoperations_at (QDeclarativeListProperty< QDeclarativeStateOperation > *prop, int index)
 
static void operations_clear (QDeclarativeListProperty< QDeclarativeStateOperation > *prop)
 
static int operations_count (QDeclarativeListProperty< QDeclarativeStateOperation > *prop)
 
- 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

QString extends
 
QDeclarativeStateGroupgroup
 
bool inState
 
QString name
 
bool named
 
QList< OperationGuardoperations
 
QList< QDeclarativePropertyreverting
 
SimpleActionList revertList
 
QDeclarativeTransitionManager transitionManager
 
QDeclarativeBindingwhen
 
- 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
 

Detailed Description

Definition at line 193 of file qdeclarativestate_p_p.h.

Typedefs

◆ SimpleActionList

Definition at line 201 of file qdeclarativestate_p_p.h.

Constructors and Destructors

◆ QDeclarativeStatePrivate()

QDeclarativeStatePrivate::QDeclarativeStatePrivate ( )
inline

Definition at line 198 of file qdeclarativestate_p_p.h.

Functions

◆ complete()

void QDeclarativeStatePrivate::complete ( )

Definition at line 331 of file qdeclarativestate.cpp.

332 {
334 
335  for (int ii = 0; ii < reverting.count(); ++ii) {
336  for (int jj = 0; jj < revertList.count(); ++jj) {
337  if (revertList.at(jj).property() == reverting.at(ii)) {
338  revertList.removeAt(jj);
339  break;
340  }
341  }
342  }
343  reverting.clear();
344 
345  emit q->completed();
346 }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
#define Q_Q(Class)
Definition: qglobal.h:2483
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
#define emit
Definition: qobjectdefs.h:76
void clear()
Removes all items from the list.
Definition: qlist.h:764
const QDeclarativeProperty & property() const
QList< QDeclarativeProperty > reverting
void removeAt(int i)
Removes the item at index position i.
Definition: qlist.h:480

◆ generateActionList()

QDeclarativeStateOperation::ActionList QDeclarativeStatePrivate::generateActionList ( QDeclarativeStateGroup group) const

Definition at line 351 of file qdeclarativestate.cpp.

352 {
354  if (inState)
355  return applyList;
356 
357  // Prevent "extends" recursion
358  inState = true;
359 
360  if (!extends.isEmpty()) {
361  QList<QDeclarativeState *> states = group->states();
362  for (int ii = 0; ii < states.count(); ++ii)
363  if (states.at(ii)->name() == extends) {
364  qmlExecuteDeferred(states.at(ii));
365  applyList = static_cast<QDeclarativeStatePrivate*>(states.at(ii)->d_func())->generateActionList(group);
366  }
367  }
368 
370  applyList << op->actions();
371 
372  inState = false;
373  return applyList;
374 }
QList< OperationGuard > operations
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
virtual ActionList actions()
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *)
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QDeclarativeStateOperation::ActionList generateActionList(QDeclarativeStateGroup *) const
QDeclarativeListProperty< QDeclarativeState > states

◆ operations_append()

static void QDeclarativeStatePrivate::operations_append ( QDeclarativeListProperty< QDeclarativeStateOperation > *  prop,
QDeclarativeStateOperation op 
)
inlinestatic

Definition at line 220 of file qdeclarativestate_p_p.h.

Referenced by QDeclarativeState::setExtends().

220  {
221  QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
222  op->setState(qobject_cast<QDeclarativeState*>(prop->object));
223  list->append(OperationGuard(op, list));
224  }
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
void setState(QDeclarativeState *state)
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ operations_at()

static QDeclarativeStateOperation* QDeclarativeStatePrivate::operations_at ( QDeclarativeListProperty< QDeclarativeStateOperation > *  prop,
int  index 
)
inlinestatic

Definition at line 236 of file qdeclarativestate_p_p.h.

Referenced by QDeclarativeState::setExtends().

236  {
237  QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
238  return list->at(index);
239  }
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
quint16 index
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ operations_clear()

static void QDeclarativeStatePrivate::operations_clear ( QDeclarativeListProperty< QDeclarativeStateOperation > *  prop)
inlinestatic

Definition at line 225 of file qdeclarativestate_p_p.h.

Referenced by QDeclarativeState::setExtends().

225  {
226  QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
227  QMutableListIterator<OperationGuard> listIterator(*list);
228  while(listIterator.hasNext())
229  listIterator.next()->setState(0);
230  list->clear();
231  }
void clear()
Removes all items from the list.
Definition: qlist.h:764
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ operations_count()

static int QDeclarativeStatePrivate::operations_count ( QDeclarativeListProperty< QDeclarativeStateOperation > *  prop)
inlinestatic

Definition at line 232 of file qdeclarativestate_p_p.h.

Referenced by QDeclarativeState::setExtends().

232  {
233  QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);
234  return list->count();
235  }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

Properties

◆ extends

QString QDeclarativeStatePrivate::extends

Definition at line 245 of file qdeclarativestate_p_p.h.

◆ group

QDeclarativeStateGroup* QDeclarativeStatePrivate::group

Definition at line 247 of file qdeclarativestate_p_p.h.

◆ inState

bool QDeclarativeStatePrivate::inState
mutable

Definition at line 246 of file qdeclarativestate_p_p.h.

◆ name

QString QDeclarativeStatePrivate::name

Definition at line 203 of file qdeclarativestate_p_p.h.

◆ named

bool QDeclarativeStatePrivate::named

Definition at line 205 of file qdeclarativestate_p_p.h.

◆ operations

QList<OperationGuard> QDeclarativeStatePrivate::operations

Definition at line 218 of file qdeclarativestate_p_p.h.

◆ reverting

QList<QDeclarativeProperty> QDeclarativeStatePrivate::reverting

Definition at line 244 of file qdeclarativestate_p_p.h.

◆ revertList

SimpleActionList QDeclarativeStatePrivate::revertList

Definition at line 243 of file qdeclarativestate_p_p.h.

Referenced by QDeclarativeState::apply().

◆ transitionManager

QDeclarativeTransitionManager QDeclarativeStatePrivate::transitionManager

Definition at line 241 of file qdeclarativestate_p_p.h.

◆ when

QDeclarativeBinding* QDeclarativeStatePrivate::when

Definition at line 204 of file qdeclarativestate_p_p.h.


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