Skip to content

Commit 071f09d

Browse files
committed
StopWatch: rename some methods
1 parent fd2e21b commit 071f09d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/displayapp/screens/StopWatch.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ StopWatch::StopWatch(DisplayApp* app, System::SystemTask& systemTask,
6767

6868
// Figure out what the current state of the stopwatch is and select the correct display
6969
if (stopWatchController.IsCleared()) {
70-
Reset();
70+
DisplayReset();
7171
} else {
7272
if (stopWatchController.GetLapCount() > 0) {
7373
updateLaps();
@@ -77,11 +77,11 @@ StopWatch::StopWatch(DisplayApp* app, System::SystemTask& systemTask,
7777
if (stopWatchController.IsRunning()) {
7878
lv_obj_set_state(btnStopLap, LV_STATE_DISABLED);
7979
lv_obj_set_state(txtStopLap, LV_STATE_DISABLED);
80-
Start();
80+
DisplayStart();
8181
} else if (stopWatchController.IsPaused()) {
8282
lv_obj_set_state(btnStopLap, LV_STATE_DEFAULT);
8383
lv_obj_set_state(txtStopLap, LV_STATE_DEFAULT);
84-
Pause();
84+
DisplayPause();
8585
}
8686
}
8787
}
@@ -92,7 +92,7 @@ StopWatch::~StopWatch() {
9292
lv_obj_clean(lv_scr_act());
9393
}
9494

95-
void StopWatch::Reset() { // TODO: rename?
95+
void StopWatch::DisplayReset() {
9696
lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
9797
lv_obj_set_style_local_text_color(msecTime, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
9898

@@ -104,7 +104,7 @@ void StopWatch::Reset() { // TODO: rename?
104104
lv_obj_set_state(txtStopLap, LV_STATE_DISABLED);
105105
}
106106

107-
void StopWatch::Start() { // TODO: rename?
107+
void StopWatch::DisplayStart() {
108108
lv_obj_set_state(btnStopLap, LV_STATE_DEFAULT);
109109
lv_obj_set_state(txtStopLap, LV_STATE_DEFAULT);
110110
lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::highlight);
@@ -114,7 +114,7 @@ void StopWatch::Start() { // TODO: rename?
114114
systemTask.PushMessage(Pinetime::System::Messages::DisableSleeping);
115115
}
116116

117-
void StopWatch::Pause() { // TODO: rename?
117+
void StopWatch::DisplayPause() {
118118
lv_obj_set_state(btnStopLap, LV_STATE_DEFAULT);
119119
lv_label_set_text_static(txtPlayPause, Symbols::play);
120120
lv_label_set_text_static(txtStopLap, Symbols::stop);
@@ -157,10 +157,10 @@ void StopWatch::playPauseBtnEventHandler(lv_event_t event) {
157157
}
158158
if (stopWatchController.IsCleared() || stopWatchController.IsPaused()) {
159159
stopWatchController.Start();
160-
Start();
160+
DisplayStart();
161161
} else if (stopWatchController.IsRunning()) {
162162
stopWatchController.Pause();
163-
Pause();
163+
DisplayPause();
164164
}
165165
}
166166

@@ -175,14 +175,14 @@ void StopWatch::stopLapBtnEventHandler(lv_event_t event) {
175175
updateLaps();
176176
} else if (stopWatchController.IsPaused()) {
177177
stopWatchController.Clear();
178-
Reset();
178+
DisplayReset();
179179
}
180180
}
181181

182182
bool StopWatch::OnButtonPushed() {
183183
if (stopWatchController.IsRunning()) {
184184
stopWatchController.Pause();
185-
Pause();
185+
DisplayPause();
186186
return true;
187187
}
188188
return false;

src/displayapp/screens/StopWatch.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ namespace Pinetime::Applications::Screens {
2525
void stopLapBtnEventHandler(lv_event_t event);
2626
bool OnButtonPushed() override;
2727

28-
void Reset();
29-
void Start();
30-
void Pause();
28+
void DisplayReset();
29+
void DisplayStart();
30+
void DisplayPause();
3131

3232
private:
3333
Pinetime::System::SystemTask& systemTask;

0 commit comments

Comments
 (0)