Add AMS Error popup
This commit is contained in:
		@ -0,0 +1,36 @@
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
#ifndef ERRORPOPUPBASE_HPP
 | 
			
		||||
#define ERRORPOPUPBASE_HPP
 | 
			
		||||
 | 
			
		||||
#include <gui/common/FrontendApplication.hpp>
 | 
			
		||||
#include <touchgfx/containers/Container.hpp>
 | 
			
		||||
#include <touchgfx/widgets/BoxWithBorder.hpp>
 | 
			
		||||
#include <touchgfx/widgets/TextArea.hpp>
 | 
			
		||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
 | 
			
		||||
 | 
			
		||||
class ErrorPopupBase : public touchgfx::Container
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    ErrorPopupBase();
 | 
			
		||||
    virtual ~ErrorPopupBase();
 | 
			
		||||
    virtual void initialize();
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    FrontendApplication& application() {
 | 
			
		||||
        return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
     * Member Declarations
 | 
			
		||||
     */
 | 
			
		||||
    touchgfx::BoxWithBorder bg;
 | 
			
		||||
    touchgfx::TextArea title;
 | 
			
		||||
    touchgfx::TextAreaWithOneWildcard details;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ERRORPOPUPBASE_HPP
 | 
			
		||||
@ -18,6 +18,7 @@
 | 
			
		||||
#include <gui/containers/DriverViewFieldSelection.hpp>
 | 
			
		||||
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
 | 
			
		||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
 | 
			
		||||
#include <gui/containers/ErrorPopup.hpp>
 | 
			
		||||
 | 
			
		||||
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
 | 
			
		||||
{
 | 
			
		||||
@ -89,6 +90,7 @@ protected:
 | 
			
		||||
    touchgfx::TextArea prechargeLabel;
 | 
			
		||||
    touchgfx::TextArea r2dLabel;
 | 
			
		||||
    touchgfx::TextAreaWithOneWildcard r2dProgressLabel;
 | 
			
		||||
    ErrorPopup errorPopup;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,39 @@
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
 | 
			
		||||
/*********************************************************************************/
 | 
			
		||||
#include <gui_generated/containers/ErrorPopupBase.hpp>
 | 
			
		||||
#include <touchgfx/Color.hpp>
 | 
			
		||||
#include <texts/TextKeysAndLanguages.hpp>
 | 
			
		||||
 | 
			
		||||
ErrorPopupBase::ErrorPopupBase()
 | 
			
		||||
{
 | 
			
		||||
    setWidth(450);
 | 
			
		||||
    setHeight(150);
 | 
			
		||||
    bg.setPosition(0, 0, 450, 150);
 | 
			
		||||
    bg.setColor(touchgfx::Color::getColorFromRGB(197, 14, 31));
 | 
			
		||||
    bg.setBorderColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
 | 
			
		||||
    bg.setBorderSize(5);
 | 
			
		||||
    add(bg);
 | 
			
		||||
 | 
			
		||||
    title.setPosition(0, 0, 450, 49);
 | 
			
		||||
    title.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
 | 
			
		||||
    title.setLinespacing(0);
 | 
			
		||||
    title.setTypedText(touchgfx::TypedText(T___SINGLEUSE_1NKF));
 | 
			
		||||
    add(title);
 | 
			
		||||
 | 
			
		||||
    details.setPosition(15, 60, 420, 75);
 | 
			
		||||
    details.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
 | 
			
		||||
    details.setLinespacing(0);
 | 
			
		||||
    details.setTypedText(touchgfx::TypedText(T___SINGLEUSE_9L8R));
 | 
			
		||||
    add(details);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ErrorPopupBase::~ErrorPopupBase()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ErrorPopupBase::initialize()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -143,6 +143,10 @@ DriverViewViewBase::DriverViewViewBase() :
 | 
			
		||||
    r2dProgressLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_J5UH));
 | 
			
		||||
    r2dProgressLabel.setVisible(false);
 | 
			
		||||
    add(r2dProgressLabel);
 | 
			
		||||
 | 
			
		||||
    errorPopup.setXY(15, 122);
 | 
			
		||||
    errorPopup.setVisible(false);
 | 
			
		||||
    add(errorPopup);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
DriverViewViewBase::~DriverViewViewBase()
 | 
			
		||||
@ -164,6 +168,7 @@ void DriverViewViewBase::setupScreen()
 | 
			
		||||
    {
 | 
			
		||||
        fieldTypeSelectionListItems[i].initialize();
 | 
			
		||||
    }
 | 
			
		||||
    errorPopup.initialize();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void DriverViewViewBase::handleKeyEvent(uint8_t key)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user