John Quigley a7f8b59bfb
Combine Date and Time Settings (#1465)
Replace separate SettingSetDate and SettingSetTime with a combined screenlist.
Add DotIndicators. Similar to PageIndicator, but for use when separating screens instead of pages of a list.

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2023-01-14 21:50:21 +02:00

40 lines
1.3 KiB
C++

#pragma once
#include <cstdint>
#include <lvgl/lvgl.h>
#include "components/datetime/DateTimeController.h"
#include "components/settings/Settings.h"
#include "displayapp/widgets/Counter.h"
#include "displayapp/screens/Screen.h"
#include "displayapp/widgets/DotIndicator.h"
#include "displayapp/screens/settings/SettingSetDateTime.h"
namespace Pinetime {
namespace Applications {
namespace Screens {
class SettingSetTime : public Screen {
public:
SettingSetTime(DisplayApp* app,
Pinetime::Controllers::DateTime& dateTimeController,
Pinetime::Controllers::Settings& settingsController,
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime);
~SettingSetTime() override;
void SetTime();
void UpdateScreen();
private:
Controllers::DateTime& dateTimeController;
Controllers::Settings& settingsController;
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime;
lv_obj_t* lblampm;
lv_obj_t* btnSetTime;
lv_obj_t* lblSetTime;
Widgets::Counter hourCounter = Widgets::Counter(0, 23, jetbrains_mono_42);
Widgets::Counter minuteCounter = Widgets::Counter(0, 59, jetbrains_mono_42);
};
}
}
}