put old UI in UI::Basic namespace
This commit is contained in:
parent
f5ba2e9b84
commit
91d7c9fffc
7 changed files with 24 additions and 4 deletions
|
@ -3,6 +3,8 @@
|
|||
#include "omoteconfig.h"
|
||||
#include <functional>
|
||||
|
||||
using namespace UI::Basic;
|
||||
|
||||
std::shared_ptr<OmoteUI> OmoteUI::mInstance = nullptr;
|
||||
|
||||
// This can be used to flag out specific code for SIM only
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <string>
|
||||
#include "poller.hpp"
|
||||
|
||||
namespace UI::Basic{
|
||||
/// @brief Singleton to allow UI code to live separately from the Initialization
|
||||
/// of resources.
|
||||
class OmoteUI : public UIBase {
|
||||
|
@ -235,3 +236,5 @@ void create_keyboard();
|
|||
*/
|
||||
void display_settings(lv_obj_t* parent);
|
||||
};
|
||||
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
#include "OmoteUI.hpp"
|
||||
|
||||
using namespace UI::Basic;
|
||||
|
||||
|
||||
void OmoteUI::display_settings(lv_obj_t* parent)
|
||||
{
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define WIFI_SUBPAGE_SIZE 3
|
||||
static char* ssid;
|
||||
|
||||
using namespace UI::Basic;
|
||||
|
||||
lv_obj_t* OmoteUI::create_wifi_selection_page(lv_obj_t* menu)
|
||||
{
|
||||
/* Create sub page for wifi*/
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#include "UIBase.hpp"
|
||||
|
||||
using namespace UI;
|
||||
|
||||
UIBase::UIBase(std::shared_ptr<HardwareAbstract> aHardware):mHardware(aHardware){
|
||||
|
||||
}
|
|
@ -5,12 +5,15 @@
|
|||
#include "HardwareAbstract.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace UI{
|
||||
|
||||
class UIBase{
|
||||
public:
|
||||
UIBase(std::shared_ptr<HardwareAbstract> aHardware):
|
||||
mHardware(aHardware){}
|
||||
UIBase(std::shared_ptr<HardwareAbstract> aHardware);
|
||||
|
||||
protected:
|
||||
std::shared_ptr<HardwareAbstract> mHardware;
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -7,7 +7,7 @@ int main(){
|
|||
auto hwSim = std::make_shared<HardwareSimulator>();
|
||||
hwSim->init();
|
||||
|
||||
auto ui = OmoteUI::getInstance(hwSim);
|
||||
auto ui = UI::Basic::OmoteUI::getInstance(hwSim);
|
||||
ui->layout_UI();
|
||||
|
||||
while (true){
|
||||
|
|
Loading…
Add table
Reference in a new issue