Format header files

In my PR updating clang-format, I forgot to also format the headers.
This commit is contained in:
Finlay Davidson
2023-01-07 21:23:15 +01:00
committed by JF
parent 09db67e003
commit 96165a8541
55 changed files with 144 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ namespace Pinetime {
class CheckboxList : public Screen {
public:
static constexpr size_t MaxItems = 4;
struct Item {
const char* name;
bool enabled;

View File

@@ -8,6 +8,7 @@ namespace Pinetime {
namespace Controllers {
class Ble;
}
namespace Applications {
namespace Screens {

View File

@@ -11,6 +11,7 @@ namespace Pinetime {
namespace Controllers {
class HeartRateController;
}
namespace Applications {
namespace Screens {

View File

@@ -10,6 +10,7 @@ namespace Pinetime {
namespace Components {
class LittleVgl;
}
namespace Applications {
namespace Screens {

View File

@@ -13,6 +13,7 @@ namespace Pinetime {
namespace Controllers {
class AlertNotificationService;
}
namespace Applications {
namespace Screens {
@@ -45,9 +46,11 @@ namespace Pinetime {
Pinetime::Controllers::AlertNotificationService& alertNotificationService,
Pinetime::Controllers::MotorController& motorController);
~NotificationItem();
bool IsRunning() const {
return running;
}
void OnCallButtonEvent(lv_obj_t*, lv_event_t event);
private:

View File

@@ -8,6 +8,7 @@ namespace Pinetime {
namespace Components {
class LittleVgl;
}
namespace Applications {
namespace Screens {

View File

@@ -7,13 +7,16 @@
namespace Pinetime {
namespace Applications {
class DisplayApp;
namespace Screens {
template <class T> class DirtyValue {
public:
DirtyValue() = default; // Use NSDMI
explicit DirtyValue(T const& v) : value {v} {
} // Use MIL and const-lvalue-ref
bool IsUpdated() {
if (this->isUpdated) {
this->isUpdated = false;
@@ -21,10 +24,12 @@ namespace Pinetime {
}
return false;
}
T const& Get() {
this->isUpdated = false;
return value;
} // never expose a non-const lvalue-ref
DirtyValue& operator=(const T& other) {
if (this->value != other) {
this->value = other;
@@ -46,6 +51,7 @@ namespace Pinetime {
public:
explicit Screen(DisplayApp* app) : app {app} {
}
virtual ~Screen() = default;
static void RefreshTaskCallback(lv_task_t* task);
@@ -64,6 +70,7 @@ namespace Pinetime {
virtual bool OnTouchEvent(TouchEvents event) {
return false;
}
virtual bool OnTouchEvent(uint16_t x, uint16_t y) {
return false;
}

View File

@@ -11,6 +11,7 @@ namespace Pinetime {
namespace Screens {
enum class ScreenListModes { UpDown, RightLeft, LongPress };
template <size_t N> class ScreenList : public Screen {
public:
ScreenList(DisplayApp* app,

View File

@@ -9,6 +9,7 @@ namespace Pinetime {
bool merged = false;
unsigned int value = 0;
};
namespace Screens {
class Twos : public Screen {
public:

View File

@@ -18,6 +18,7 @@ namespace Pinetime {
class Ble;
class NotificationManager;
}
namespace Applications {
namespace Screens {

View File

@@ -118,6 +118,7 @@ namespace Pinetime {
static constexpr int nLines = 9;
static constexpr int nColors = 7; // must match number of colors in InfineatColors
struct InfineatColors {
int orange[nLines] = {0xfd872b, 0xdb3316, 0x6f1000, 0xfd7a0a, 0xffffff, 0xffffff, 0xffffff, 0xe85102, 0xea1c00};
int blue[nLines] = {0xe7f8ff, 0x2232d0, 0x182a8b, 0xe7f8ff, 0xffffff, 0xffffff, 0xffffff, 0x5991ff, 0x1636ff};

View File

@@ -23,6 +23,7 @@ namespace Pinetime {
Controllers::Settings::ChimesOption chimesOption;
const char* name;
};
static constexpr std::array<Option, 3> options = {{{Controllers::Settings::ChimesOption::None, "Off"},
{Controllers::Settings::ChimesOption::Hours, "Every hour"},
{Controllers::Settings::ChimesOption::HalfHours, "Every 30 mins"}}};

View File

@@ -6,6 +6,7 @@
#include "displayapp/screens/Screen.h"
#include <components/motion/MotionController.h>
#include "systemtask/SystemTask.h"
namespace Pinetime {
namespace Applications {

View File

@@ -24,6 +24,7 @@ namespace Pinetime {
Controllers::Settings::ClockType clockType;
const char* name;
};
static constexpr std::array<Option, 2> options = {{
{Controllers::Settings::ClockType::H12, "12-hour"},
{Controllers::Settings::ClockType::H24, "24-hour"},

View File

@@ -23,6 +23,7 @@ namespace Pinetime {
Controllers::Settings::WakeUpMode wakeUpMode;
const char* name;
};
Controllers::Settings& settingsController;
static constexpr std::array<Option, 4> options = {{
{Controllers::Settings::WakeUpMode::SingleTap, "Single Tap"},