Skip to content

Commit

Permalink
feat: use QVector3DAnimator in src/app
Browse files Browse the repository at this point in the history
  • Loading branch information
kaixoo committed Jan 17, 2025
1 parent 9555b8e commit e419a85
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/app/GUI/BoxesList/boxsinglewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "RasterEffects/rastereffectcollection.h"
#include "Properties/boolproperty.h"
#include "Properties/boolpropertycontainer.h"
#include "Animators/qpointfanimator.h"
#include "Animators/qvector3danimator.h"
#include "Boxes/pathbox.h"
#include "canvas.h"
#include "BlendEffects/blendeffectcollection.h"
Expand Down Expand Up @@ -524,8 +524,8 @@ void BoxSingleWidget::setTargetAbstraction(SWT_Abstraction *abs) {
});
}
if(complexAnimator && !abs->contentVisible()) {
if(enve_cast<QPointFAnimator*>(prop)) {
updateValueSlidersForQPointFAnimator();
if(enve_cast<QVector3DAnimator*>(prop)) {
updateValueSlidersForQVector3DAnimator();
valueSliderVisible = mValueSlider->isVisible();
secondValueSliderVisible = mSecondValueSlider->isVisible();
} else {
Expand Down Expand Up @@ -947,10 +947,10 @@ void BoxSingleWidget::switchBoxLockedAction() {
update();
}

void BoxSingleWidget::updateValueSlidersForQPointFAnimator() {
void BoxSingleWidget::updateValueSlidersForQVector3DAnimator() {
if(!mTarget) return;
const auto target = mTarget->getTarget();
const auto asQPointFAnim = enve_cast<QPointFAnimator*>(target);
const auto asQPointFAnim = enve_cast<QVector3DAnimator*>(target);
if(!asQPointFAnim || mTarget->contentVisible()) return;
if(width() - mFillWidget->x() > 10*eSizesUI::widget) {
mValueSlider->setTarget(asQPointFAnim->getXAnimator());
Expand Down Expand Up @@ -989,5 +989,5 @@ void BoxSingleWidget::resizeEvent(QResizeEvent *) {
updateCompositionBoxVisible();
updatePathCompositionBoxVisible();
updateFillTypeBoxVisible();
updateValueSlidersForQPointFAnimator();
updateValueSlidersForQVector3DAnimator();
}
2 changes: 1 addition & 1 deletion src/app/GUI/BoxesList/boxsinglewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class BoxSingleWidget : public SingleWidget {
void updateFillTypeBoxVisible();

void clearAndHideValueAnimators();
void updateValueSlidersForQPointFAnimator();
void updateValueSlidersForQVector3DAnimator();
private:
ContainerBox *getPromoteTargetGroup();

Expand Down
6 changes: 3 additions & 3 deletions src/app/GUI/Expressions/expressionhighlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "expressionhighlighter.h"

#include "Animators/complexanimator.h"
#include "Animators/qpointfanimator.h"
#include "Animators/qvector3danimator.h"
#include "Animators/coloranimator.h"

#include "expressioneditor.h"
Expand All @@ -38,7 +38,7 @@ ExpressionHighlighter::ExpressionHighlighter(
QSyntaxHighlighter(parent),
mTarget(target),
mSearchCtxt(target->getParent()),
mEditor(editor) {
mEditor(editor) {
HighlightingRule rule;

mErrorFormat.setForeground(Qt::red);
Expand Down Expand Up @@ -153,7 +153,7 @@ void ExpressionHighlighter::highlightBlock(const QString &text) {
bool error = false;
const auto qra = enve_cast<QrealAnimator*>(obj);
const auto ca = enve_cast<ComplexAnimator*>(obj);
const auto pa = enve_cast<QPointFAnimator*>(obj);
const auto pa = enve_cast<QVector3DAnimator*>(obj);
const auto co = enve_cast<ColorAnimator*>(obj);

const bool validFinal = qra || pa || co;
Expand Down
2 changes: 1 addition & 1 deletion src/app/evfileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <fstream>
#include "Animators/qrealanimator.h"
#include "Animators/qpointfanimator.h"
#include "Animators/qvector3danimator.h"
#include "Animators/coloranimator.h"
#include "Animators/qstringanimator.h"
#include "Animators/transformanimator.h"
Expand Down

0 comments on commit e419a85

Please sign in to comment.