Move R2D/precharge bar to custom container

This commit is contained in:
2024-06-11 22:17:21 +02:00
parent 5a66f9bc54
commit cb2f55be1b
19 changed files with 382 additions and 170 deletions

View File

@ -0,0 +1,37 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef PROGRESSBARBASE_HPP
#define PROGRESSBARBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
class ProgressBarBase : public touchgfx::Container
{
public:
ProgressBarBase();
virtual ~ProgressBarBase();
virtual void initialize();
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::TextAreaWithOneWildcard r2dProgressLabel;
touchgfx::TextArea r2dLabel;
touchgfx::TextArea prechargeLabel;
touchgfx::BoxProgress progressBar;
private:
};
#endif // PROGRESSBARBASE_HPP

View File

@ -20,7 +20,7 @@
#include <gui/containers/DriverViewField.hpp>
#include <touchgfx/containers/ListLayout.hpp>
#include <gui/containers/DriverViewStatusItem.hpp>
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
#include <gui/containers/ProgressBar.hpp>
#include <gui/containers/ErrorPopup.hpp>
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
@ -98,10 +98,7 @@ protected:
DriverViewStatusItem statusPDU;
DriverViewStatusItem statusINV;
DriverViewStatusItem statusLV;
touchgfx::BoxProgress progressBar;
touchgfx::TextArea prechargeLabel;
touchgfx::TextArea r2dLabel;
touchgfx::TextAreaWithOneWildcard r2dProgressLabel;
ProgressBar progressBar;
ErrorPopup errorPopup;
private:

View File

@ -19,6 +19,27 @@ public:
EnduranceViewBase();
virtual ~EnduranceViewBase();
virtual void setupScreen();
virtual void handleKeyEvent(uint8_t key);
/*
* Virtual Action Handlers
*/
virtual void decreasePowerLimit()
{
// Override and implement this function in Endurance
}
virtual void increasePowerLimit()
{
// Override and implement this function in Endurance
}
virtual void decreaseSpeedLimit()
{
// Override and implement this function in Endurance
}
virtual void increaseSpeedLimit()
{
// Override and implement this function in Endurance
}
protected:
FrontendApplication& application() {