Include cleanup: displayapp + screens

This commit is contained in:
okaestne 2020-11-15 16:49:36 +01:00
parent 1516573df4
commit cadc0c25d4
No known key found for this signature in database
GPG Key ID: 06A81B143EA9588F
39 changed files with 174 additions and 201 deletions

View File

@ -1,25 +1,24 @@
#include <string>
#include "DisplayApp.h"
#include <FreeRTOS.h>
#include <task.h>
#include <libraries/log/nrf_log.h>
#include <nrf_font.h>
#include <queue.h>
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/datetime/DateTimeController.h"
#include <drivers/Cst816s.h>
#include "displayapp/screens/Notifications.h"
#include "displayapp/screens/Tile.h"
#include "displayapp/screens/Meter.h"
#include "displayapp/screens/Gauge.h"
#include "displayapp/screens/Brightness.h"
#include "displayapp/screens/SystemInfo.h"
#include "displayapp/screens/Music.h"
#include "components/ble/NotificationManager.h"
#include "displayapp/screens/FirmwareUpdate.h"
#include "displayapp/screens/ApplicationList.h"
#include "displayapp/screens/Brightness.h"
#include "displayapp/screens/Clock.h"
#include "displayapp/screens/FirmwareUpdate.h"
#include "displayapp/screens/FirmwareValidation.h"
#include "displayapp/screens/Gauge.h"
#include "displayapp/screens/InfiniPaint.h"
#include "displayapp/screens/Meter.h"
#include "displayapp/screens/Music.h"
#include "displayapp/screens/Notifications.h"
#include "displayapp/screens/SystemInfo.h"
#include "displayapp/screens/Tile.h"
#include "drivers/Cst816s.h"
#include "drivers/St7789.h"
#include "drivers/Watchdog.h"
#include "systemtask/SystemTask.h"
using namespace Pinetime::Applications;

View File

@ -1,28 +1,30 @@
#pragma once
#include <FreeRTOS.h>
#include <task.h>
#include <drivers/St7789.h>
#include <drivers/SpiMaster.h>
#include <bits/unique_ptr.h>
#include <queue.h>
#include "components/gfx/Gfx.h"
#include "components/battery/BatteryController.h"
#include "components/brightness/BrightnessController.h"
#include "components/ble/BleController.h"
#include "components/datetime/DateTimeController.h"
#include "components/ble/NotificationManager.h"
#include "components/firmwarevalidator/FirmwareValidator.h"
#include "drivers/Cst816s.h"
#include "LittleVgl.h"
#include <date/date.h>
#include "displayapp/screens/Clock.h"
#include "displayapp/screens/Modal.h"
#include <drivers/Watchdog.h>
#include "TouchEvents.h"
#include <queue.h>
#include <task.h>
#include <memory>
#include "Apps.h"
#include "LittleVgl.h"
#include "TouchEvents.h"
#include "components/brightness/BrightnessController.h"
#include "components/firmwarevalidator/FirmwareValidator.h"
#include "displayapp/screens/Modal.h"
namespace Pinetime {
namespace Drivers {
class St7789;
class Cst816S;
class WatchdogView;
}
namespace Controllers {
class Battery;
class Ble;
class DateTime;
class NotificationManager;
}
namespace System {
class SystemTask;
};

View File

@ -1,15 +1,11 @@
#include <FreeRTOS.h>
#include <projdefs.h>
#include <task.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <hal/nrf_rtc.h>
#include <libraries/log/nrf_log.h>
#include <libs/lvgl/src/lv_themes/lv_theme.h>
#include <libs/lvgl/src/lv_themes/lv_theme_night.h>
#include "LittleVgl.h"
#include <FreeRTOS.h>
#include <task.h>
//#include <projdefs.h>
#include "drivers/Cst816s.h"
#include "drivers/St7789.h"
using namespace Pinetime::Components;
extern "C" {

View File

@ -1,12 +1,13 @@
#pragma once
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_themes/lv_theme.h>
#include <libs/lvgl/src/lv_hal/lv_hal.h>
#include <drivers/St7789.h>
#include <drivers/Cst816s.h>
#include <lvgl/lvgl.h>
namespace Pinetime {
namespace Drivers {
class Cst816S;
class St7789;
}
namespace Components {
class LittleVgl {
public:

View File

@ -1,9 +1,10 @@
#include <libs/lvgl/lvgl.h>
#include <displayapp/DisplayApp.h>
#include <functional>
#include "ApplicationList.h"
#include "Tile.h"
#include <lvgl/lvgl.h>
#include <array>
#include "Symbols.h"
#include "Tile.h"
#include "displayapp/Apps.h"
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;

View File

@ -1,14 +1,9 @@
#pragma once
#include <functional>
#include <vector>
#include <memory>
#include "components/ble/NimbleController.h"
#include "Screen.h"
#include "Label.h"
#include "ScreenList.h"
#include "Gauge.h"
#include "Meter.h"
namespace Pinetime {
namespace Applications {

View File

@ -1,5 +1,6 @@
#include "BatteryIcon.h"
#include "Symbols.h"
using namespace Pinetime::Applications::Screens;
const char* BatteryIcon::GetBatteryIcon(float batteryPercent) {

View File

@ -1,7 +1,5 @@
#pragma once
#include <libs/lvgl/src/lv_draw/lv_img_decoder.h>
namespace Pinetime {
namespace Applications {
namespace Screens {

View File

@ -1,5 +1,5 @@
#include <libs/lvgl/lvgl.h>
#include "Brightness.h"
#include <lvgl/lvgl.h>
using namespace Pinetime::Applications::Screens;

View File

@ -1,8 +1,9 @@
#pragma once
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include "components/brightness/BrightnessController.h"
#include <lvgl/src/lv_core/lv_obj.h>
#include <cstdint>
#include "Screen.h"
#include "components/brightness/BrightnessController.h"
namespace Pinetime {
namespace Applications {

View File

@ -1,15 +1,16 @@
#include <cstdio>
#include <libs/date/includes/date/date.h>
#include "components/datetime/DateTimeController.h"
#include <libs/lvgl/lvgl.h>
#include "Clock.h"
#include "../DisplayApp.h"
#include <date/date.h>
#include <lvgl/lvgl.h>
#include <cstdio>
#include "BatteryIcon.h"
#include "BleIcon.h"
#include "Symbols.h"
#include "components/ble/NotificationManager.h"
#include "NotificationIcon.h"
#include "Symbols.h"
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/ble/NotificationManager.h"
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressed;

View File

@ -1,17 +1,19 @@
#pragma once
#include <cstdint>
#include <lvgl/src/lv_core/lv_obj.h>
#include <chrono>
#include <cstdint>
#include <memory>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include "components/ble/NotificationManager.h"
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/datetime/DateTimeController.h"
namespace Pinetime {
namespace Controllers {
class Battery;
class Ble;
class NotificationManager;
}
namespace Applications {
namespace Screens {
@ -34,7 +36,7 @@ namespace Pinetime {
T value;
bool isUpdated = true;
};
class Clock : public Screen{
class Clock : public Screen {
public:
Clock(DisplayApp* app,
Controllers::DateTime& dateTimeController,

View File

@ -1,6 +1,6 @@
#include <libs/lvgl/lvgl.h>
#include <libraries/log/nrf_log.h>
#include "DropDownDemo.h"
#include <lvgl/lvgl.h>
#include <libraries/log/nrf_log.h>
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;

View File

@ -2,15 +2,13 @@
#include <cstdint>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <lvgl/src/lv_core/lv_obj.h>
namespace Pinetime {
namespace Applications {
namespace Screens {
class DropDownDemo : public Screen{
class DropDownDemo : public Screen {
public:
DropDownDemo(DisplayApp* app);
~DropDownDemo() override;

View File

@ -1,5 +1,6 @@
#include <libs/lvgl/lvgl.h>
#include "FirmwareUpdate.h"
#include <lvgl/lvgl.h>
#include "components/ble/BleController.h"
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;

View File

@ -1,15 +1,12 @@
#pragma once
#include <cstdint>
#include <chrono>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include "components/ble/BleController.h"
#include <lvgl/src/lv_core/lv_obj.h>
namespace Pinetime {
namespace Controllers {
class Ble;
}
namespace Applications {
namespace Screens {

View File

@ -1,8 +1,8 @@
#include <libs/lvgl/lvgl.h>
#include "FirmwareValidation.h"
#include "../DisplayApp.h"
#include "../../Version.h"
#include <lvgl/lvgl.h>
#include "Version.h"
#include "components/firmwarevalidator/FirmwareValidator.h"
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressed;
@ -87,5 +87,3 @@ void FirmwareValidation::OnButtonEvent(lv_obj_t *object, lv_event_t event) {
}
}

View File

@ -1,10 +1,7 @@
#pragma once
#include <cstdint>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <lvgl/src/lv_core/lv_obj.h>
namespace Pinetime {
namespace Controllers {

View File

@ -1,4 +1,3 @@
#include <libs/lvgl/lvgl.h>
#include "Gauge.h"
#include "../DisplayApp.h"

View File

@ -2,9 +2,7 @@
#include <cstdint>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <lvgl/lvgl.h>
namespace Pinetime {
namespace Applications {

View File

@ -1,7 +1,6 @@
#include <libs/lvgl/lvgl.h>
#include <libraries/log/nrf_log.h>
#include "InfiniPaint.h"
#include "../DisplayApp.h"
#include "../LittleVgl.h"
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressed;

View File

@ -1,31 +1,30 @@
#pragma once
#include <lvgl/lvgl.h>
#include <cstdint>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <drivers/St7789.h>
#include "displayapp/LittleVgl.h"
namespace Pinetime {
namespace Components {
class LittleVgl;
}
namespace Applications {
namespace Screens {
class InfiniPaint : public Screen {
public:
InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl);
~InfiniPaint() override;
bool Refresh() override;
bool OnButtonPushed() override;
bool OnTouchEvent(TouchEvents event) override;
bool OnTouchEvent(uint16_t x, uint16_t y) override;
private:
Pinetime::Components::LittleVgl& lvgl;
static constexpr uint16_t width = 10;

View File

@ -1,4 +1,3 @@
#include <libs/lvgl/lvgl.h>
#include "Label.h"
using namespace Pinetime::Applications::Screens;

View File

@ -1,6 +1,5 @@
#pragma once
#include <vector>
#include "Screen.h"
#include <lvgl/lvgl.h>

View File

@ -1,5 +1,5 @@
#include <libs/lvgl/lvgl.h>
#include "Meter.h"
#include <lvgl/lvgl.h>
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;

View File

@ -1,11 +1,9 @@
#pragma once
#include <cstdint>
#include <chrono>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <lvgl/src/lv_core/lv_style.h>
#include <lvgl/src/lv_core/lv_obj.h>
namespace Pinetime {
namespace Applications {

View File

@ -1,5 +1,5 @@
#include <libs/lvgl/lvgl.h>
#include "Modal.h"
#include <lvgl/lvgl.h>
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;

View File

@ -1,11 +1,8 @@
#pragma once
#include <cstdint>
#include <chrono>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <lvgl/src/lv_core/lv_style.h>
#include <lvgl/src/lv_core/lv_obj.h>
namespace Pinetime {
namespace Applications {

View File

@ -15,9 +15,13 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <libs/lvgl/lvgl.h>
#include "Music.h"
#include <cstdint>
#include "../DisplayApp.h"
#include "components/ble/MusicService.h"
#include "displayapp/icons/music/disc.cpp"
#include "displayapp/icons/music/disc_f_1.cpp"
#include "displayapp/icons/music/disc_f_2.cpp"
using namespace Pinetime::Applications::Screens;

View File

@ -17,24 +17,16 @@
*/
#pragma once
#include <cstdint>
#include <chrono>
#include <FreeRTOS.h>
#include <lvgl/src/lv_core/lv_obj.h>
#include <string>
#include "components/gfx/Gfx.h"
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/ble/MusicService.h"
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include "../../Version.h"
#include "displayapp/icons/music/disc.cpp"
#include "displayapp/icons/music/disc_f_1.cpp"
#include "displayapp/icons/music/disc_f_2.cpp"
namespace Pinetime {
namespace Controllers {
class MusicService;
}
namespace Applications {
namespace Screens {
class Music : public Screen {

View File

@ -1,7 +1,5 @@
#include <libs/lvgl/lvgl.h>
#include <displayapp/DisplayApp.h>
#include <functional>
#include "Notifications.h"
#include <displayapp/DisplayApp.h>
using namespace Pinetime::Applications::Screens;

View File

@ -1,11 +1,10 @@
#pragma once
#include <functional>
#include <vector>
#include <lvgl/lvgl.h>
#include <cstdint>
#include <memory>
#include "Screen.h"
#include "ScreenList.h"
#include "components/ble/NotificationManager.h"
namespace Pinetime {
namespace Applications {

View File

@ -1,10 +1,10 @@
#pragma once
#include <vector>
#include <array>
#include <functional>
#include "components/ble/NimbleController.h"
#include <memory>
#include "Screen.h"
#include "Label.h"
#include "../DisplayApp.h"
namespace Pinetime {
namespace Applications {

View File

@ -1,9 +1,13 @@
#include <libs/lvgl/lvgl.h>
#include <displayapp/DisplayApp.h>
#include <functional>
#include "SystemInfo.h"
#include "../../Version.h"
#include "Tile.h"
#include <lvgl/lvgl.h>
#include "../DisplayApp.h"
#include "Label.h"
#include "Version.h"
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/brightness/BrightnessController.h"
#include "components/datetime/DateTimeController.h"
#include "drivers/Watchdog.h"
using namespace Pinetime::Applications::Screens;

View File

@ -1,17 +1,24 @@
#pragma once
#include <functional>
#include <vector>
#include "components/ble/NimbleController.h"
#include <memory>
#include "Screen.h"
#include "Label.h"
#include "ScreenList.h"
#include "Gauge.h"
#include "Meter.h"
namespace Pinetime {
namespace Controllers {
class DateTime;
class Battery;
class BrightnessController;
class Ble;
}
namespace Drivers {
class WatchdogView;
}
namespace Applications {
class DisplayApp;
namespace Screens {
class SystemInfo : public Screen {
public:

View File

@ -1,14 +1,11 @@
#include <cstdio>
#include <libs/date/includes/date/date.h>
#include "components/datetime/DateTimeController.h"
#include <Version.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <libs/lvgl/src/lv_font/lv_font.h>
#include <libs/lvgl/lvgl.h>
#include <libraries/log/nrf_log.h>
#include "Tab.h"
#include "displayapp/DisplayApp.h"
#include <Version.h>
#include <libraries/log/nrf_log.h>
#include <date/date.h>
#include <lvgl/lvgl.h>
#include "../DisplayApp.h"
#include "components/datetime/DateTimeController.h"
#include "components/gfx/Gfx.h"
using namespace Pinetime::Applications::Screens;
@ -19,7 +16,7 @@ extern lv_font_t jetbrains_mono_bold_20;
// screen->OnObjectEvent(obj, event);
//}
Tab::Tab(DisplayApp* app, Pinetime::Components::Gfx &gfx) : Screen(app, gfx) {
Tab::Tab(DisplayApp* app, Pinetime::Components::Gfx &gfx) : Screen(app), gfx(gfx) {
/*Create a Tab view object*/
lv_obj_t *tabview;
tabview = lv_tabview_create(lv_scr_act(), NULL);

View File

@ -1,22 +1,24 @@
#pragma once
#include <cstdint>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <lvgl/src/lv_core/lv_style.h>
#include <lvgl/src/lv_core/lv_obj.h>
namespace Pinetime {
namespace Components {
class Gfx;
}
namespace Applications {
namespace Screens {
class Tab : public Screen {
public:
explicit Tab(DisplayApp* app, Components::Gfx& gfx);
~Tab() override;
void Refresh(bool fullRefresh) override;
void Refresh(bool fullRefresh);
void OnObjectEvent(lv_obj_t* obj, lv_event_t event);
private:
protected:
Components::Gfx& gfx;
};
}
}

View File

@ -1,11 +1,5 @@
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <libs/lvgl/src/lv_font/lv_font.h>
#include <libs/lvgl/lvgl.h>
#include "Tile.h"
#include "displayapp/DisplayApp.h"
#include "Symbols.h"
#include "../../Version.h"
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;

View File

@ -1,11 +1,11 @@
#pragma once
#include <lvgl/lvgl.h>
#include <cstdint>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <memory>
#include "Modal.h"
#include <lvgl/src/lv_core/lv_style.h>
#include <displayapp/Apps.h>
#include "Screen.h"
#include "../Apps.h"
namespace Pinetime {
namespace Applications {