rename UIAbstract to UIBase and extend basic UI from it
This commit is contained in:
parent
40052d31b7
commit
64a868a907
5 changed files with 19 additions and 14 deletions
|
@ -9,7 +9,7 @@ std::shared_ptr<OmoteUI> OmoteUI::mInstance = nullptr;
|
|||
// #if defined(IS_SIMULATOR) && (IS_SIMULATOR == true)
|
||||
// #endif
|
||||
|
||||
OmoteUI::OmoteUI(std::shared_ptr<HardwareAbstract> aHardware) : mHardware(aHardware){}
|
||||
OmoteUI::OmoteUI(std::shared_ptr<HardwareAbstract> aHardware) : UIBase(aHardware){}
|
||||
|
||||
// Set the page indicator scroll position relative to the tabview scroll
|
||||
// position
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// 2023 Matthew Colvin
|
||||
#pragma once
|
||||
|
||||
#include "HardwareAbstract.hpp"
|
||||
#include "UIBase.hpp"
|
||||
#include "Images.hpp"
|
||||
#include "lvgl.h"
|
||||
#include <algorithm>
|
||||
|
@ -13,7 +13,7 @@
|
|||
|
||||
/// @brief Singleton to allow UI code to live separately from the Initialization
|
||||
/// of resources.
|
||||
class OmoteUI {
|
||||
class OmoteUI : public UIBase {
|
||||
public:
|
||||
OmoteUI(std::shared_ptr<HardwareAbstract> aHardware);
|
||||
|
||||
|
@ -74,7 +74,6 @@ public:
|
|||
|
||||
private:
|
||||
static std::shared_ptr<OmoteUI> mInstance;
|
||||
std::shared_ptr<HardwareAbstract> mHardware;
|
||||
|
||||
std::unique_ptr<poller> batteryPoller;
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
// OMOTE UI
|
||||
// 2023 Matthew Colvin
|
||||
|
||||
#pragma once
|
||||
|
||||
class UIAbstract{
|
||||
|
||||
UIAbstract();
|
||||
|
||||
};
|
16
Platformio/OmoteUI/UIs/UIBase.hpp
Normal file
16
Platformio/OmoteUI/UIs/UIBase.hpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
// OMOTE UI
|
||||
// 2023 Matthew Colvin
|
||||
|
||||
#pragma once
|
||||
#include "HardwareAbstract.hpp"
|
||||
#include <memory>
|
||||
|
||||
class UIBase{
|
||||
public:
|
||||
UIBase(std::shared_ptr<HardwareAbstract> aHardware):
|
||||
mHardware(aHardware){}
|
||||
|
||||
protected:
|
||||
std::shared_ptr<HardwareAbstract> mHardware;
|
||||
|
||||
};
|
Loading…
Add table
Reference in a new issue