Change screens if both left and right are pressed

This commit is contained in:
2023-04-11 21:53:36 +02:00
parent 78c3c38988
commit fe58a68b96
12 changed files with 59 additions and 36 deletions

View File

@ -27,7 +27,8 @@ public:
virtual ~DebugViewPresenter(){};
virtual void vehicleStateUpdated() override;
void vehicleStateUpdated() override;
void nextScreen() override;
private:
DebugViewPresenter();

View File

@ -30,6 +30,7 @@ public:
virtual ~DriverViewPresenter(){};
void vehicleStateUpdated() override;
void nextScreen() override;
void setFieldType(size_t i, DataFieldType type);

View File

@ -14,6 +14,7 @@ public:
void bind(Model *m) { model = m; }
virtual void vehicleStateUpdated(){};
virtual void nextScreen(){};
protected:
Model *model;

View File

@ -8,29 +8,32 @@ using namespace touchgfx;
class VehicleConfigView;
class VehicleConfigPresenter : public touchgfx::Presenter, public ModelListener
{
class VehicleConfigPresenter : public touchgfx::Presenter,
public ModelListener {
public:
VehicleConfigPresenter(VehicleConfigView& v);
VehicleConfigPresenter(VehicleConfigView &v);
/**
* The activate function is called automatically when this screen is "switched in"
* (ie. made active). Initialization logic can be placed here.
*/
virtual void activate();
/**
* The activate function is called automatically when this screen is "switched
* in" (ie. made active). Initialization logic can be placed here.
*/
virtual void activate();
/**
* The deactivate function is called automatically when this screen is "switched out"
* (ie. made inactive). Teardown functionality can be placed here.
*/
virtual void deactivate();
/**
* The deactivate function is called automatically when this screen is
* "switched out" (ie. made inactive). Teardown functionality can be placed
* here.
*/
virtual void deactivate();
virtual ~VehicleConfigPresenter() {};
virtual ~VehicleConfigPresenter(){};
void nextScreen() override;
private:
VehicleConfigPresenter();
VehicleConfigPresenter();
VehicleConfigView& view;
VehicleConfigView &view;
};
#endif // VEHICLECONFIGPRESENTER_HPP