CircleProgress MoveAnimator widget ERROR
Hello everyone! Please, i need help, and i`ve tried everything i could but still cant solve the problem. The thing is that i need my CircleProgress to move using moveAnimator when the screen in entered. So ive added all the lines in the code but still got an error error: redeclaration of 'touchgfx::MoveAnimator<touchgfx::CircleProgress> temperature_screenView::circletemperature'
Thanks a lot and looking forward to get some help. Have a day
TEMPERATURE_SCREENVIEW.hpp
#ifndef TEMPERATURE_SCREEN_VIEW_HPP
#define TEMPERATURE_SCREEN_VIEW_HPP
#include <gui_generated/temperature_screen_screen/temperature_screenViewBase.hpp>
#include <gui/common/FrontendApplication.hpp>
#include <gui/temperature_screen_screen/temperature_screenPresenter.hpp>
#include <touchgfx/widgets/canvas/PainterRGB888Bitmap.hpp>
#include <touchgfx/containers/progress_indicators/CircleProgress.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/EasingEquations.hpp>
#include <touchgfx/mixins/MoveAnimator.hpp>
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
#include <touchgfx/widgets/AnimatedImage.hpp>
class temperature_screenView : public temperature_screenViewBase
{
public:
temperature_screenView();
virtual ~temperature_screenView() {}
virtual void setupScreen();
virtual void tearDownScreen();
virtual void afterTransition();
protected:
touchgfx::CircleProgress circletemperature;
touchgfx::PainterRGB888Bitmap circletemperaturePainter;
touchgfx::MoveAnimator< touchgfx::CircleProgress > circletemperature;
};
#endif // TEMPERATURE_SCREEN_VIEW_HPPTEMPERATURE_SCREENVIEW.cpp
#include <gui/temperature_screen_screen/temperature_screenView.hpp>
#include <touchgfx/Color.hpp>
#include "BitmapDatabase.hpp"
#include <texts/TextKeysAndLanguages.hpp>
#include <touchgfx/EasingEquations.hpp>
#include <touchgfx/mixins/MoveAnimator.hpp>
temperature_screenView::temperature_screenView()
{
circletemperature.setXY(47, 79);
circletemperature.setProgressIndicatorPosition(0, 0, 148, 116);
circletemperature.setRange(0, 100);
circletemperature.setCenter(74, 74);
circletemperature.setRadius(67);
circletemperature.setLineWidth(14);
circletemperature.setStartEndAngle(-121, 121);
circletemperature.setCapPrecision(10);
circletemperature.setBackground(Bitmap(BITMAP_TEMP_RINGBACK_ID));
circletemperaturePainter.setBitmap(Bitmap(BITMAP_TEMP_RINGCLR_ID));
circletemperature.setPainter(circletemperaturePainter);
circletemperature.setValue(36);
circletemperature.setAlpha(255);
add(circletemperature);
}
void temperature_screenView::setupScreen()
{
temperature_screenViewBase::setupScreen();
}
void temperature_screenView::afterTransition()
{
circletemperature.clearMoveAnimationEndedAction();
circletemperature.startMoveAnimation(47, 89, 36, EasingEquations::sineEaseOut, EasingEquations::sineEaseOut);
}
void temperature_screenView::tearDownScreen()
{
temperature_screenViewBase::tearDownScreen();
}
