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

#include <qpropertyanimation_p.h>

Inheritance diagram for QPropertyAnimationPrivate:
QVariantAnimationPrivate QAbstractAnimationPrivate QObjectPrivate QObjectData

Public Functions

 QPropertyAnimationPrivate ()
 
void updateMetaProperty ()
 
void updateProperty (const QVariant &)
 
- Public Functions inherited from QVariantAnimationPrivate
void convertValues (int t)
 
 QVariantAnimationPrivate ()
 
void recalculateCurrentInterval (bool force=false)
 The goal of this function is to update the currentInterval member. More...
 
void setCurrentValueForProgress (const qreal progress)
 
void setDefaultStartEndValue (const QVariant &value)
 
void setValueAt (qreal, const QVariant &)
 
void updateInterpolator ()
 
QVariant valueAt (qreal step) const
 
- Public Functions inherited from QAbstractAnimationPrivate
 QAbstractAnimationPrivate ()
 
void setState (QAbstractAnimation::State state)
 
virtual ~QAbstractAnimationPrivate ()
 
- 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

int propertyIndex
 
QByteArray propertyName
 
int propertyType
 
QWeakPointer< QObjecttarget
 
QObjecttargetValue
 
- Public Variables inherited from QVariantAnimationPrivate
struct {
   QVariantAnimation::KeyValue   end
 
   QVariantAnimation::KeyValue   start
 
currentInterval
 
QVariant currentValue
 
QVariant defaultStartEndValue
 
int duration
 
QEasingCurve easing
 
QVariantAnimation::Interpolator interpolator
 
QVariantAnimation::KeyValues keyValues
 
- Public Variables inherited from QAbstractAnimationPrivate
int currentLoop
 
int currentTime
 
bool deleteWhenStopped
 
QAbstractAnimation::Direction direction
 
QAnimationGroupgroup
 
bool hasRegisteredTimer
 
bool isGroup
 
bool isPause
 
int loopCount
 
QAbstractAnimation::State state
 
int totalCurrentTime
 
- 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 QVariantAnimationPrivate
static QVariantAnimationPrivateget (QVariantAnimation *q)
 
static Q_CORE_EXPORT QVariantAnimation::Interpolator getInterpolator (int interpolationType)
 
- Static Public Functions inherited from QAbstractAnimationPrivate
static QAbstractAnimationPrivateget (QAbstractAnimation *q)
 
- 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 64 of file qpropertyanimation_p.h.

Constructors and Destructors

◆ QPropertyAnimationPrivate()

QPropertyAnimationPrivate::QPropertyAnimationPrivate ( )
inline

Functions

◆ updateMetaProperty()

void QPropertyAnimationPrivate::updateMetaProperty ( )

Definition at line 104 of file qpropertyanimation.cpp.

105 {
106  if (!target || propertyName.isEmpty()) {
108  propertyIndex = -1;
109  return;
110  }
111 
112  //propertyType will be set to a valid type only if there is a propertyName).userType();
113  ;->indexOfProperty(propertyName);
114 
117  if (propertyIndex == -1) {
118  //there is no !targetValue->dynamicPropertyNames().contains(propertyName))
119  ;);
121  qWarning("QPropertyAnimation: you're trying to animate the non-writable property %s of your QObject", propertyName.constData());
122  }
123 }
bool isWritable() const
Returns true if this property is writable; otherwise returns false.
Q_CORE_EXPORT void qWarning(const char *,...)
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421
QWeakPointer< QObject > target
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
QMetaProperty property(int index) const
Returns the meta-data for the property with the given index.

◆ updateProperty()

void QPropertyAnimationPrivate::updateProperty ( const QVariant newValue)

Definition at line 125 of file qpropertyanimation.cpp.

126 {
128  return;
129 
130  if (!target) {
131  q_func()->stop(); //the target was destroyed we need to stop the animation
132  return;
133  }
134 
135  if (newValue.userType() == propertyType) {
136  //no conversion is needed, we directly call the QMetaObject::metacall
137  //check QMetaProperty::write for an explanation of these
138  int status = -1;
139  int flags = 0;
140  void *argv[] = { const_cast<void *>(newValue.constData()), const_cast<QVariant *>(&newValue), &status, &flags };
142  } else {
144  }
145 }
static int metacall(QObject *, Call, int, void **)
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object&#39;s name property to value.
Definition: qobject.cpp:3755
static LibLoadStatus status
Definition: qlocale_icu.cpp:69
QAbstractAnimation::State state
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
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
QWeakPointer< QObject > target

Properties

◆ propertyIndex

int QPropertyAnimationPrivate::propertyIndex

Definition at line 79 of file qpropertyanimation_p.h.

Referenced by updateMetaProperty(), and updateProperty().

◆ propertyName

QByteArray QPropertyAnimationPrivate::propertyName

Definition at line 81 of file qpropertyanimation_p.h.

Referenced by updateMetaProperty(), and updateProperty().

◆ propertyType

int QPropertyAnimationPrivate::propertyType

Definition at line 78 of file qpropertyanimation_p.h.

Referenced by updateMetaProperty(), and updateProperty().

◆ target

QWeakPointer<QObject> QPropertyAnimationPrivate::target

Definition at line 73 of file qpropertyanimation_p.h.

Referenced by updateMetaProperty(), and updateProperty().

◆ targetValue

QObject* QPropertyAnimationPrivate::targetValue

Definition at line 75 of file qpropertyanimation_p.h.

Referenced by updateMetaProperty(), and updateProperty().


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