Display R2D progress

This commit is contained in:
2023-04-26 13:08:34 +02:00
parent 78048052ca
commit b2f5d48b73
19 changed files with 281 additions and 175 deletions

View File

@ -17,6 +17,7 @@
#include <touchgfx/containers/scrollers/ScrollWheel.hpp>
#include <gui/containers/DriverViewFieldSelection.hpp>
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
{
@ -84,8 +85,9 @@ protected:
DriverViewField field3;
touchgfx::ScrollWheel fieldTypeSelection;
touchgfx::DrawableListItems<DriverViewFieldSelection, 10> fieldTypeSelectionListItems;
touchgfx::BoxProgress prechargeProgress;
touchgfx::BoxProgress progressBar;
touchgfx::TextArea prechargeLabel;
touchgfx::TextAreaWithOneWildcard r2dLabel;
private:

View File

@ -113,15 +113,15 @@ DriverViewViewBase::DriverViewViewBase() :
fieldTypeSelection.setVisible(false);
add(fieldTypeSelection);
prechargeProgress.setXY(15, 280);
prechargeProgress.setProgressIndicatorPosition(0, 0, 480, 55);
prechargeProgress.setRange(0, 100);
prechargeProgress.setDirection(touchgfx::AbstractDirectionProgress::RIGHT);
prechargeProgress.setBackground(touchgfx::Bitmap(BITMAP_PRECHARGE_BG_ID));
prechargeProgress.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0));
prechargeProgress.setValue(0);
prechargeProgress.setVisible(false);
add(prechargeProgress);
progressBar.setXY(15, 280);
progressBar.setProgressIndicatorPosition(0, 0, 480, 55);
progressBar.setRange(0, 100);
progressBar.setDirection(touchgfx::AbstractDirectionProgress::RIGHT);
progressBar.setBackground(touchgfx::Bitmap(BITMAP_PRECHARGE_BG_ID));
progressBar.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0));
progressBar.setValue(0);
progressBar.setVisible(false);
add(progressBar);
prechargeLabel.setXY(105, 275);
prechargeLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
@ -129,6 +129,13 @@ DriverViewViewBase::DriverViewViewBase() :
prechargeLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_HMH2));
prechargeLabel.setVisible(false);
add(prechargeLabel);
r2dLabel.setPosition(139, 275, 202, 37);
r2dLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
r2dLabel.setLinespacing(0);
r2dLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_NGUK));
r2dLabel.setVisible(false);
add(r2dLabel);
}
DriverViewViewBase::~DriverViewViewBase()