Add screen for configuring vehicle parameters
This commit is contained in:
@ -32,6 +32,9 @@ public:
|
||||
// DebugView
|
||||
void gotoDebugViewScreenNoTransition();
|
||||
|
||||
// VehicleConfig
|
||||
void gotoVehicleConfigScreenNoTransition();
|
||||
|
||||
protected:
|
||||
touchgfx::Callback<FrontendApplicationBase> transitionCallback;
|
||||
FrontendHeap& frontendHeap;
|
||||
@ -48,6 +51,9 @@ protected:
|
||||
|
||||
// DebugView
|
||||
void gotoDebugViewScreenNoTransitionImpl();
|
||||
|
||||
// VehicleConfig
|
||||
void gotoVehicleConfigScreenNoTransitionImpl();
|
||||
};
|
||||
|
||||
#endif // FRONTENDAPPLICATIONBASE_HPP
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
#include <gui/driverview_screen/DriverViewPresenter.hpp>
|
||||
#include <gui/debugview_screen/DebugViewView.hpp>
|
||||
#include <gui/debugview_screen/DebugViewPresenter.hpp>
|
||||
#include <gui/vehicleconfig_screen/VehicleConfigView.hpp>
|
||||
#include <gui/vehicleconfig_screen/VehicleConfigPresenter.hpp>
|
||||
|
||||
|
||||
/**
|
||||
@ -46,7 +48,8 @@ public:
|
||||
touchgfx::meta::TypeList< AMIView,
|
||||
touchgfx::meta::TypeList< DriverViewView,
|
||||
touchgfx::meta::TypeList< DebugViewView,
|
||||
touchgfx::meta::Nil > > >
|
||||
touchgfx::meta::TypeList< VehicleConfigView,
|
||||
touchgfx::meta::Nil > > > >
|
||||
> GeneratedViewTypes;
|
||||
|
||||
/**
|
||||
@ -62,7 +65,8 @@ public:
|
||||
touchgfx::meta::TypeList< AMIPresenter,
|
||||
touchgfx::meta::TypeList< DriverViewPresenter,
|
||||
touchgfx::meta::TypeList< DebugViewPresenter,
|
||||
touchgfx::meta::Nil > > >
|
||||
touchgfx::meta::TypeList< VehicleConfigPresenter,
|
||||
touchgfx::meta::Nil > > > >
|
||||
> GeneratedPresenterTypes;
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef CONFIGITEMBASE_HPP
|
||||
#define CONFIGITEMBASE_HPP
|
||||
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
#include <touchgfx/containers/Container.hpp>
|
||||
#include <touchgfx/widgets/Box.hpp>
|
||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
|
||||
#include <touchgfx/widgets/canvas/Line.hpp>
|
||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||
|
||||
class ConfigItemBase : public touchgfx::Container
|
||||
{
|
||||
public:
|
||||
ConfigItemBase();
|
||||
virtual ~ConfigItemBase();
|
||||
virtual void initialize();
|
||||
|
||||
protected:
|
||||
FrontendApplication& application() {
|
||||
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||
}
|
||||
|
||||
/*
|
||||
* Member Declarations
|
||||
*/
|
||||
touchgfx::Box bg;
|
||||
touchgfx::TextAreaWithOneWildcard title;
|
||||
touchgfx::Line line1;
|
||||
touchgfx::PainterRGB565 line1Painter;
|
||||
touchgfx::TextAreaWithOneWildcard value;
|
||||
touchgfx::Line line2;
|
||||
touchgfx::PainterRGB565 line2Painter;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // CONFIGITEMBASE_HPP
|
||||
@ -0,0 +1,89 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef VEHICLECONFIGVIEWBASE_HPP
|
||||
#define VEHICLECONFIGVIEWBASE_HPP
|
||||
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
#include <mvp/View.hpp>
|
||||
#include <gui/vehicleconfig_screen/VehicleConfigPresenter.hpp>
|
||||
#include <touchgfx/widgets/Box.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
#include <touchgfx/containers/scrollers/ScrollWheel.hpp>
|
||||
#include <gui/containers/ConfigItem.hpp>
|
||||
#include <touchgfx/widgets/canvas/Line.hpp>
|
||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||
|
||||
class VehicleConfigViewBase : public touchgfx::View<VehicleConfigPresenter>
|
||||
{
|
||||
public:
|
||||
VehicleConfigViewBase();
|
||||
virtual ~VehicleConfigViewBase();
|
||||
virtual void setupScreen();
|
||||
|
||||
virtual void paramsUpdateItem(ConfigItem& item, int16_t itemIndex)
|
||||
{
|
||||
// Override and implement this function in VehicleConfig
|
||||
}
|
||||
virtual void handleKeyEvent(uint8_t key);
|
||||
|
||||
/*
|
||||
* Virtual Action Handlers
|
||||
*/
|
||||
virtual void selectPrevParam()
|
||||
{
|
||||
// Override and implement this function in VehicleConfig
|
||||
}
|
||||
virtual void selectNextParam()
|
||||
{
|
||||
// Override and implement this function in VehicleConfig
|
||||
}
|
||||
virtual void decParam()
|
||||
{
|
||||
// Override and implement this function in VehicleConfig
|
||||
}
|
||||
virtual void incParam()
|
||||
{
|
||||
// Override and implement this function in VehicleConfig
|
||||
}
|
||||
virtual void confirmParam()
|
||||
{
|
||||
// Override and implement this function in VehicleConfig
|
||||
}
|
||||
|
||||
protected:
|
||||
FrontendApplication& application() {
|
||||
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||
}
|
||||
|
||||
/*
|
||||
* Member Declarations
|
||||
*/
|
||||
touchgfx::Box __background;
|
||||
touchgfx::TextArea title;
|
||||
touchgfx::ScrollWheel params;
|
||||
touchgfx::DrawableListItems<ConfigItem, 6> paramsListItems;
|
||||
touchgfx::Line line1;
|
||||
touchgfx::PainterRGB565 line1Painter;
|
||||
|
||||
private:
|
||||
|
||||
/*
|
||||
* Canvas Buffer Size
|
||||
*/
|
||||
static const uint32_t CANVAS_BUFFER_SIZE = 7200;
|
||||
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
|
||||
|
||||
/*
|
||||
* Callback Declarations
|
||||
*/
|
||||
touchgfx::Callback<VehicleConfigViewBase, touchgfx::DrawableListItemsInterface*, int16_t, int16_t> updateItemCallback;
|
||||
|
||||
/*
|
||||
* Callback Handler Declarations
|
||||
*/
|
||||
void updateItemCallbackHandler(touchgfx::DrawableListItemsInterface* items, int16_t containerIndex, int16_t itemIndex);
|
||||
|
||||
};
|
||||
|
||||
#endif // VEHICLECONFIGVIEWBASE_HPP
|
||||
Reference in New Issue
Block a user