Qt 4.8
Classes | Functions
qeasingcurve.h File Reference
#include <QtCore/qglobal.h>
#include <QtCore/qobjectdefs.h>

Go to the source code of this file.

Classes

class  QEasingCurve
 The QEasingCurve class provides easing curves for controlling animation. More...
 

Functions

Q_CORE_EXPORT QDebug operator<< (QDebug debug, const QEasingCurve &item)
 
Q_CORE_EXPORT QDataStreamoperator<< (QDataStream &, const QEasingCurve &)
 
Q_CORE_EXPORT QDataStreamoperator>> (QDataStream &, QEasingCurve &)
 

Function Documentation

◆ operator<<() [1/2]

Q_CORE_EXPORT QDebug operator<< ( QDebug  debug,
const QEasingCurve item 
)

Definition at line 870 of file qeasingcurve.cpp.

871 {
872  debug << "type:" << item.d_ptr->type
873  << "func:" << item.d_ptr->func;
874  if (item.d_ptr->config) {
875  debug << QString::fromAscii("period:%1").arg(item.d_ptr->config->_p, 0, 'f', 20)
876  << QString::fromAscii("amp:%1").arg(item.d_ptr->config->_a, 0, 'f', 20)
877  << QString::fromAscii("overshoot:%1").arg(item.d_ptr->config->_o, 0, 'f', 20);
878  }
879  return debug;
880 }
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
Definition: qstring.cpp:4276
QEasingCurve::EasingFunction func
QEasingCurvePrivate * d_ptr
Definition: qeasingcurve.h:102
QEasingCurveFunction * config
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
Definition: qstring.cpp:7186
QEasingCurve::Type type

◆ operator<<() [2/2]

Q_CORE_EXPORT QDataStream& operator<< ( QDataStream ,
const QEasingCurve  
)

Definition at line 897 of file qeasingcurve.cpp.

898 {
899  stream << quint8(easing.d_ptr->type);
900  stream << quint64(quintptr(easing.d_ptr->func));
901 
902  bool hasConfig = easing.d_ptr->config;
903  stream << hasConfig;
904  if (hasConfig) {
905  stream << easing.d_ptr->config->_p;
906  stream << easing.d_ptr->config->_a;
907  stream << easing.d_ptr->config->_o;
908  }
909  return stream;
910 }
QIntegerForSizeof< void * >::Unsigned quintptr
Definition: qglobal.h:986
unsigned char quint8
Definition: qglobal.h:934
static FILE * stream
unsigned __int64 quint64
Definition: qglobal.h:943

◆ operator>>()

Q_CORE_EXPORT QDataStream& operator>> ( QDataStream ,
QEasingCurve  
)
related

Definition at line 925 of file qeasingcurve.cpp.

926 {
928  quint8 int_type;
929  stream >> int_type;
930  type = static_cast<QEasingCurve::Type>(int_type);
931  easing.setType(type);
932 
933  quint64 ptr_func;
934  stream >> ptr_func;
935  easing.d_ptr->func = QEasingCurve::EasingFunction(quintptr(ptr_func));
936 
937  bool hasConfig;
938  stream >> hasConfig;
939  if (hasConfig) {
941  stream >> config->_p;
942  stream >> config->_a;
943  stream >> config->_o;
944  easing.d_ptr->config = config;
945  }
946  return stream;
947 }
int type
Definition: qmetatype.cpp:239
QIntegerForSizeof< void * >::Unsigned quintptr
Definition: qglobal.h:986
unsigned char quint8
Definition: qglobal.h:934
static FILE * stream
unsigned __int64 quint64
Definition: qglobal.h:943
static QEasingCurveFunction * curveToFunctionObject(QEasingCurve::Type type)
Type
The type of easing curve.
Definition: qeasingcurve.h:60
qreal(* EasingFunction)(qreal progress)
This is a typedef for a pointer to a function with the following signature:
Definition: qeasingcurve.h:96