mirror of
https://github.com/vicr123/the-libs.git
synced 2025-01-23 02:42:04 -05:00
31 lines
922 B
C++
31 lines
922 B
C++
#include "tvariantanimation.h"
|
|
|
|
tVariantAnimation::tVariantAnimation(QObject *parent) : QVariantAnimation(parent)
|
|
{
|
|
|
|
}
|
|
|
|
tVariantAnimation::~tVariantAnimation() {
|
|
|
|
}
|
|
|
|
void tVariantAnimation::start(QAbstractAnimation::DeletionPolicy policy) {
|
|
if (this->state() != Running) {
|
|
if ((!theLibsGlobal::instance()->allowSystemAnimations() || theLibsGlobal::instance()->powerStretchEnabled()) && !forceAnim) {
|
|
//emit valueChanged(this->endValue());
|
|
QMetaObject::invokeMethod(this, "valueChanged", Qt::QueuedConnection, Q_ARG(QVariant, this->endValue()));
|
|
QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
|
|
//emit finished();
|
|
} else {
|
|
QVariantAnimation::start(policy);
|
|
}
|
|
}
|
|
}
|
|
|
|
void tVariantAnimation::setForceAnimation(bool force) {
|
|
forceAnim = force;
|
|
}
|
|
|
|
bool tVariantAnimation::forceAnimation() {
|
|
return forceAnim;
|
|
}
|