Allow changing displayed fields in DriverView
This commit is contained in:
@ -17,12 +17,9 @@ public:
|
||||
|
||||
virtual void changeToStartScreen()
|
||||
{
|
||||
gotoMissionSelectScreenNoTransition();
|
||||
gotoDriverViewScreenNoTransition();
|
||||
}
|
||||
|
||||
// MissionSelect
|
||||
void gotoMissionSelectScreenNoTransition();
|
||||
|
||||
// AMI
|
||||
void gotoAMIScreenNoTransition();
|
||||
|
||||
@ -34,9 +31,6 @@ protected:
|
||||
FrontendHeap& frontendHeap;
|
||||
Model& model;
|
||||
|
||||
// MissionSelect
|
||||
void gotoMissionSelectScreenNoTransitionImpl();
|
||||
|
||||
// AMI
|
||||
void gotoAMIScreenNoTransitionImpl();
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
|
||||
virtual void gotoStartScreen(FrontendApplication& app)
|
||||
{
|
||||
app.gotoMissionSelectScreenNoTransition();
|
||||
app.gotoDriverViewScreenNoTransition();
|
||||
}
|
||||
protected:
|
||||
FrontendHeapBase(touchgfx::AbstractPartition& presenters, touchgfx::AbstractPartition& views, touchgfx::AbstractPartition& transitions, FrontendApplication& app)
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef DRIVERVIEWFIELDSELECTIONBASE_HPP
|
||||
#define DRIVERVIEWFIELDSELECTIONBASE_HPP
|
||||
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
#include <touchgfx/containers/Container.hpp>
|
||||
#include <touchgfx/widgets/Box.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
#include <touchgfx/widgets/canvas/Line.hpp>
|
||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||
|
||||
class DriverViewFieldSelectionBase : public touchgfx::Container
|
||||
{
|
||||
public:
|
||||
DriverViewFieldSelectionBase();
|
||||
virtual ~DriverViewFieldSelectionBase();
|
||||
virtual void initialize();
|
||||
|
||||
protected:
|
||||
FrontendApplication& application() {
|
||||
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||
}
|
||||
|
||||
/*
|
||||
* Member Declarations
|
||||
*/
|
||||
touchgfx::Box bg;
|
||||
touchgfx::TextArea name;
|
||||
touchgfx::Line line1;
|
||||
touchgfx::PainterRGB565 line1Painter;
|
||||
touchgfx::Line line2;
|
||||
touchgfx::PainterRGB565 line2Painter;
|
||||
touchgfx::Line line2_1;
|
||||
touchgfx::PainterRGB565 line2_1Painter;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // DRIVERVIEWFIELDSELECTIONBASE_HPP
|
||||
@ -15,6 +15,8 @@
|
||||
#include <touchgfx/containers/progress_indicators/LineProgress.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
#include <gui/containers/DriverViewField.hpp>
|
||||
#include <touchgfx/containers/scrollers/ScrollWheel.hpp>
|
||||
#include <gui/containers/DriverViewFieldSelection.hpp>
|
||||
|
||||
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
|
||||
{
|
||||
@ -23,6 +25,36 @@ public:
|
||||
virtual ~DriverViewViewBase();
|
||||
virtual void setupScreen();
|
||||
|
||||
virtual void fieldTypeSelectionUpdateItem(DriverViewFieldSelection& item, int16_t itemIndex)
|
||||
{
|
||||
// Override and implement this function in DriverView
|
||||
}
|
||||
virtual void handleKeyEvent(uint8_t key);
|
||||
|
||||
/*
|
||||
* Virtual Action Handlers
|
||||
*/
|
||||
virtual void selectPrevField()
|
||||
{
|
||||
// Override and implement this function in DriverView
|
||||
}
|
||||
virtual void selectNextField()
|
||||
{
|
||||
// Override and implement this function in DriverView
|
||||
}
|
||||
virtual void selectPrevFieldType()
|
||||
{
|
||||
// Override and implement this function in DriverView
|
||||
}
|
||||
virtual void selectNextFieldType()
|
||||
{
|
||||
// Override and implement this function in DriverView
|
||||
}
|
||||
virtual void confirmFieldType()
|
||||
{
|
||||
// Override and implement this function in DriverView
|
||||
}
|
||||
|
||||
protected:
|
||||
FrontendApplication& application() {
|
||||
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||
@ -51,6 +83,8 @@ protected:
|
||||
DriverViewField field1;
|
||||
DriverViewField field2;
|
||||
DriverViewField field3;
|
||||
touchgfx::ScrollWheel fieldTypeSelection;
|
||||
touchgfx::DrawableListItems<DriverViewFieldSelection, 11> fieldTypeSelectionListItems;
|
||||
|
||||
private:
|
||||
|
||||
@ -60,6 +94,16 @@ private:
|
||||
static const uint32_t CANVAS_BUFFER_SIZE = 7200;
|
||||
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
|
||||
|
||||
/*
|
||||
* Callback Declarations
|
||||
*/
|
||||
touchgfx::Callback<DriverViewViewBase, touchgfx::DrawableListItemsInterface*, int16_t, int16_t> updateItemCallback;
|
||||
|
||||
/*
|
||||
* Callback Handler Declarations
|
||||
*/
|
||||
void updateItemCallbackHandler(touchgfx::DrawableListItemsInterface* items, int16_t containerIndex, int16_t itemIndex);
|
||||
|
||||
};
|
||||
|
||||
#endif // DRIVERVIEWVIEWBASE_HPP
|
||||
|
||||
Reference in New Issue
Block a user