Add status boxes
This commit is contained in:
		@ -0,0 +1,34 @@
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
#ifndef DRIVERVIEWSTATUSITEMBASE_HPP
 | 
			
		||||
#define DRIVERVIEWSTATUSITEMBASE_HPP
 | 
			
		||||
 | 
			
		||||
#include <gui/common/FrontendApplication.hpp>
 | 
			
		||||
#include <touchgfx/containers/Container.hpp>
 | 
			
		||||
#include <touchgfx/widgets/BoxWithBorder.hpp>
 | 
			
		||||
#include <touchgfx/widgets/TextArea.hpp>
 | 
			
		||||
 | 
			
		||||
class DriverViewStatusItemBase : public touchgfx::Container
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    DriverViewStatusItemBase();
 | 
			
		||||
    virtual ~DriverViewStatusItemBase();
 | 
			
		||||
    virtual void initialize();
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    FrontendApplication& application() {
 | 
			
		||||
        return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
     * Member Declarations
 | 
			
		||||
     */
 | 
			
		||||
    touchgfx::BoxWithBorder bg;
 | 
			
		||||
    touchgfx::TextArea text;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // DRIVERVIEWSTATUSITEMBASE_HPP
 | 
			
		||||
@ -11,15 +11,17 @@
 | 
			
		||||
#include <touchgfx/containers/progress_indicators/LineProgress.hpp>
 | 
			
		||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
 | 
			
		||||
#include <touchgfx/widgets/TextArea.hpp>
 | 
			
		||||
#include <gui/containers/ErrorPopup.hpp>
 | 
			
		||||
#include <touchgfx/containers/Container.hpp>
 | 
			
		||||
#include <gui/containers/Temperature.hpp>
 | 
			
		||||
#include <touchgfx/widgets/canvas/Line.hpp>
 | 
			
		||||
#include <touchgfx/containers/scrollers/ScrollWheel.hpp>
 | 
			
		||||
#include <gui/containers/DriverViewFieldSelection.hpp>
 | 
			
		||||
#include <gui/containers/DriverViewField.hpp>
 | 
			
		||||
#include <touchgfx/containers/ListLayout.hpp>
 | 
			
		||||
#include <gui/containers/DriverViewStatusItem.hpp>
 | 
			
		||||
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
 | 
			
		||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
 | 
			
		||||
#include <gui/containers/ErrorPopup.hpp>
 | 
			
		||||
 | 
			
		||||
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
 | 
			
		||||
{
 | 
			
		||||
@ -73,7 +75,6 @@ protected:
 | 
			
		||||
    touchgfx::PainterRGB565 lvSoCPainter;
 | 
			
		||||
    touchgfx::TextArea tsSoCLabel;
 | 
			
		||||
    touchgfx::TextArea lvSoCLabel;
 | 
			
		||||
    ErrorPopup errorPopup;
 | 
			
		||||
    touchgfx::Container drivetrainTemps;
 | 
			
		||||
    touchgfx::TextArea motorTempLabel;
 | 
			
		||||
    Temperature motorTempL;
 | 
			
		||||
@ -102,10 +103,18 @@ protected:
 | 
			
		||||
    DriverViewField field2;
 | 
			
		||||
    DriverViewField field1;
 | 
			
		||||
    touchgfx::Container statusBar;
 | 
			
		||||
    touchgfx::ListLayout statusItems;
 | 
			
		||||
    DriverViewStatusItem statusTS_R2D;
 | 
			
		||||
    DriverViewStatusItem statusAMS;
 | 
			
		||||
    DriverViewStatusItem statusSDC;
 | 
			
		||||
    DriverViewStatusItem statusSCS;
 | 
			
		||||
    DriverViewStatusItem statusPDU;
 | 
			
		||||
    DriverViewStatusItem statusINV;
 | 
			
		||||
    touchgfx::BoxProgress progressBar;
 | 
			
		||||
    touchgfx::TextArea prechargeLabel;
 | 
			
		||||
    touchgfx::TextArea r2dLabel;
 | 
			
		||||
    touchgfx::TextAreaWithOneWildcard r2dProgressLabel;
 | 
			
		||||
    ErrorPopup errorPopup;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,33 @@
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
#include <gui_generated/containers/DriverViewStatusItemBase.hpp>
 | 
			
		||||
#include <touchgfx/Color.hpp>
 | 
			
		||||
#include <texts/TextKeysAndLanguages.hpp>
 | 
			
		||||
 | 
			
		||||
DriverViewStatusItemBase::DriverViewStatusItemBase()
 | 
			
		||||
{
 | 
			
		||||
    setWidth(75);
 | 
			
		||||
    setHeight(33);
 | 
			
		||||
    bg.setPosition(0, 0, 75, 33);
 | 
			
		||||
    bg.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
 | 
			
		||||
    bg.setBorderColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
 | 
			
		||||
    bg.setBorderSize(1);
 | 
			
		||||
    add(bg);
 | 
			
		||||
 | 
			
		||||
    text.setPosition(0, 4, 75, 25);
 | 
			
		||||
    text.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
 | 
			
		||||
    text.setLinespacing(0);
 | 
			
		||||
    text.setTypedText(touchgfx::TypedText(T___SINGLEUSE_F9I5));
 | 
			
		||||
    add(text);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
DriverViewStatusItemBase::~DriverViewStatusItemBase()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void DriverViewStatusItemBase::initialize()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -54,10 +54,6 @@ DriverViewViewBase::DriverViewViewBase() :
 | 
			
		||||
    lvSoCLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_4OBM));
 | 
			
		||||
    add(lvSoCLabel);
 | 
			
		||||
 | 
			
		||||
    errorPopup.setXY(15, 155);
 | 
			
		||||
    errorPopup.setVisible(false);
 | 
			
		||||
    add(errorPopup);
 | 
			
		||||
 | 
			
		||||
    drivetrainTemps.setPosition(315, 130, 150, 175);
 | 
			
		||||
    motorTempLabel.setPosition(0, 90, 150, 25);
 | 
			
		||||
    motorTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
 | 
			
		||||
@ -169,6 +165,27 @@ DriverViewViewBase::DriverViewViewBase() :
 | 
			
		||||
    add(dataFields);
 | 
			
		||||
 | 
			
		||||
    statusBar.setPosition(15, 15, 450, 33);
 | 
			
		||||
    statusItems.setXY(0, 0);
 | 
			
		||||
    statusItems.setDirection(touchgfx::EAST);
 | 
			
		||||
    statusTS_R2D.setXY(0, 0);
 | 
			
		||||
    statusItems.add(statusTS_R2D);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    statusItems.add(statusAMS);
 | 
			
		||||
 | 
			
		||||
    statusSDC.setXY(150, 0);
 | 
			
		||||
    statusItems.add(statusSDC);
 | 
			
		||||
 | 
			
		||||
    statusSCS.setXY(225, 0);
 | 
			
		||||
    statusItems.add(statusSCS);
 | 
			
		||||
 | 
			
		||||
    statusItems.add(statusPDU);
 | 
			
		||||
 | 
			
		||||
    statusINV.setXY(375, 0);
 | 
			
		||||
    statusItems.add(statusINV);
 | 
			
		||||
 | 
			
		||||
    statusBar.add(statusItems);
 | 
			
		||||
 | 
			
		||||
    progressBar.setXY(0, 0);
 | 
			
		||||
    progressBar.setProgressIndicatorPosition(0, 0, 480, 55);
 | 
			
		||||
    progressBar.setRange(0, 100);
 | 
			
		||||
@ -201,6 +218,10 @@ DriverViewViewBase::DriverViewViewBase() :
 | 
			
		||||
    statusBar.add(r2dProgressLabel);
 | 
			
		||||
 | 
			
		||||
    add(statusBar);
 | 
			
		||||
 | 
			
		||||
    errorPopup.setXY(15, 155);
 | 
			
		||||
    errorPopup.setVisible(false);
 | 
			
		||||
    add(errorPopup);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
DriverViewViewBase::~DriverViewViewBase()
 | 
			
		||||
@ -210,7 +231,6 @@ DriverViewViewBase::~DriverViewViewBase()
 | 
			
		||||
 | 
			
		||||
void DriverViewViewBase::setupScreen()
 | 
			
		||||
{
 | 
			
		||||
    errorPopup.initialize();
 | 
			
		||||
    motorTempL.initialize();
 | 
			
		||||
    motorTempR.initialize();
 | 
			
		||||
    invTempR.initialize();
 | 
			
		||||
@ -227,6 +247,13 @@ void DriverViewViewBase::setupScreen()
 | 
			
		||||
    field3.initialize();
 | 
			
		||||
    field2.initialize();
 | 
			
		||||
    field1.initialize();
 | 
			
		||||
    statusTS_R2D.initialize();
 | 
			
		||||
    statusAMS.initialize();
 | 
			
		||||
    statusSDC.initialize();
 | 
			
		||||
    statusSCS.initialize();
 | 
			
		||||
    statusPDU.initialize();
 | 
			
		||||
    statusINV.initialize();
 | 
			
		||||
    errorPopup.initialize();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void DriverViewViewBase::handleKeyEvent(uint8_t key)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user