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

Public Functions

 QEasingCurvePrivate ()
 
void setType_helper (QEasingCurve::Type)
 
 ~QEasingCurvePrivate ()
 

Public Variables

QEasingCurveFunctionconfig
 
QEasingCurve::EasingFunction func
 
QEasingCurve::Type type
 

Detailed Description

Definition at line 379 of file qeasingcurve.cpp.

Constructors and Destructors

◆ QEasingCurvePrivate()

QEasingCurvePrivate::QEasingCurvePrivate ( )
inline

Definition at line 382 of file qeasingcurve.cpp.

384  config(0),
385  func(&easeNone)
386  { }
QEasingCurve::EasingFunction func
QEasingCurveFunction * config
QEasingCurve::Type type

◆ ~QEasingCurvePrivate()

QEasingCurvePrivate::~QEasingCurvePrivate ( )
inline

Definition at line 387 of file qeasingcurve.cpp.

387 { delete config; }
QEasingCurveFunction * config

Functions

◆ setType_helper()

void QEasingCurvePrivate::setType_helper ( QEasingCurve::Type  newType)

Definition at line 776 of file qeasingcurve.cpp.

Referenced by QEasingCurve::setCustomType(), and QEasingCurve::setType().

777 {
778  qreal amp = -1.0;
779  qreal period = -1.0;
780  qreal overshoot = -1.0;
781 
782  if (config) {
783  amp = config->_a;
784  period = config->_p;
785  overshoot = config->_o;
786  delete config;
787  config = 0;
788  }
789 
790  if (isConfigFunction(newType) || (amp != -1.0) || (period != -1.0) || (overshoot != -1.0)) {
791  config = curveToFunctionObject(newType);
792  if (amp != -1.0)
793  config->_a = amp;
794  if (period != -1.0)
795  config->_p = period;
796  if (overshoot != -1.0)
797  config->_o = overshoot;
798  func = 0;
799  } else if (newType != QEasingCurve::Custom) {
800  func = curveToFunc(newType);
801  }
802  Q_ASSERT((func == 0) == (config != 0));
803  type = newType;
804 }
double qreal
Definition: qglobal.h:1193
static QEasingCurve::EasingFunction curveToFunc(QEasingCurve::Type curve)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QEasingCurve::EasingFunction func
QEasingCurveFunction * config
static QEasingCurveFunction * curveToFunctionObject(QEasingCurve::Type type)
static bool isConfigFunction(QEasingCurve::Type type)
QEasingCurve::Type type

Properties

◆ config

QEasingCurveFunction* QEasingCurvePrivate::config

◆ func

QEasingCurve::EasingFunction QEasingCurvePrivate::func

◆ type

QEasingCurve::Type QEasingCurvePrivate::type

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