mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-07 19:10:27 -08:00
add module :quick (quick, quickwidgets, qml) plus an example; lots of small revisions;
This commit is contained in:
parent
4822a012c4
commit
dfccd7eb17
102 changed files with 11973 additions and 6852 deletions
24
examples/X-extras/move-blocks/cpp/lib.cpp
Normal file
24
examples/X-extras/move-blocks/cpp/lib.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue