mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-06 10:31:19 -08:00
24 lines
600 B
C++
24 lines
600 B
C++
#include "lib.h"
|
|
#include "eql_fun.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
static qreal easingFunction(qreal progress) {
|
|
// see "../move-blocks.lisp"
|
|
return eql_fun("eql-user::custom-easing-function", QVariant::Double,
|
|
Q_ARG(qreal, progress)).toDouble(); }
|
|
|
|
QEasingCurve* CPP::easingCurve() {
|
|
static QEasingCurve* curve = 0;
|
|
if(!curve) {
|
|
curve = new QEasingCurve(QEasingCurve::Custom);
|
|
curve->setCustomType(easingFunction); }
|
|
return curve; }
|
|
|
|
QObject* ini() {
|
|
static CPP* cpp = 0;
|
|
if(!cpp) {
|
|
cpp = new CPP; }
|
|
return cpp; }
|
|
|
|
QT_END_NAMESPACE
|