45 lines
1018 B
C++
45 lines
1018 B
C++
#ifndef DRIVERVIEWPRESENTER_HPP
|
|
#define DRIVERVIEWPRESENTER_HPP
|
|
|
|
#include <gui/model/ModelListener.hpp>
|
|
#include <mvp/Presenter.hpp>
|
|
|
|
#include "gui/common/NamedField.hpp"
|
|
|
|
using namespace touchgfx;
|
|
|
|
class DriverViewView;
|
|
|
|
class DriverViewPresenter : public touchgfx::Presenter, public ModelListener {
|
|
public:
|
|
DriverViewPresenter(DriverViewView &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() override;
|
|
|
|
/**
|
|
* The deactivate function is called automatically when this screen is
|
|
* "switched out" (ie. made inactive). Teardown functionality can be placed
|
|
* here.
|
|
*/
|
|
virtual void deactivate() override;
|
|
|
|
virtual ~DriverViewPresenter(){};
|
|
|
|
void vehicleStateUpdated() override;
|
|
|
|
void setFieldType(size_t i, DataFieldType type);
|
|
|
|
private:
|
|
DriverViewPresenter();
|
|
|
|
DriverViewView &view;
|
|
|
|
DataFieldType fields[3];
|
|
};
|
|
|
|
#endif // DRIVERVIEWPRESENTER_HPP
|