Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove clock display #39

Merged
merged 2 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 132 additions & 32 deletions PizzaOvenUI/PizzaOvenUI.pro.user

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions PizzaOvenUI/Screen_Cooldown.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ Item {
}
}
else {
if (timeOfDayDisplayed) {
forceScreenTransition(Qt.resolvedUrl("Screen_TimeOfDay.qml"));
} else {
forceScreenTransition(Qt.resolvedUrl("Screen_Off.qml"));
}
forceScreenTransition(Qt.resolvedUrl("Screen_Off.qml"));
}
break;
}
Expand Down
12 changes: 2 additions & 10 deletions PizzaOvenUI/Screen_MainMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ Item {
if (powerSwitch == 0) {
screenExit();
stackView.clear();
if (timeOfDayDisplayed) {
stackView.push({item: Qt.resolvedUrl("Screen_TimeOfDay.qml"), immediate:immediateTransitions});
} else {
stackView.push({item: Qt.resolvedUrl("Screen_Off.qml"), immediate:immediateTransitions});
}
stackView.push({item: Qt.resolvedUrl("Screen_Off.qml"), immediate:immediateTransitions});
}
}

Expand Down Expand Up @@ -96,11 +92,7 @@ Item {
script: {
screenExit();
stackView.clear();
if (timeOfDayDisplayed) {
stackView.push({item: Qt.resolvedUrl("Screen_TimeOfDay.qml"), immediate:immediateTransitions});
} else {
stackView.push({item: Qt.resolvedUrl("Screen_Off.qml"), immediate:immediateTransitions});
}
stackView.push({item: Qt.resolvedUrl("Screen_Off.qml"), immediate:immediateTransitions});
}
}
}
Expand Down
1 change: 0 additions & 1 deletion PizzaOvenUI/Screen_Settings2.qml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ Item {
ListElement { name: "VOLUME"; screen: "Screen_SetVolume.qml" }
ListElement { name: "DISPLAY BRIGHTNESS"; screen: "Screen_SetBrightness.qml" }
ListElement { name: "ABOUT"; screen: "Screen_About.qml" }
ListElement { name: "TIME"; screen: "Screen_SettingsTime.qml" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

}

Tumbler {
Expand Down
13 changes: 2 additions & 11 deletions PizzaOvenUI/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ Window {
sounds.powerOff.play();
if (!callServiceFailure) {
console.log("The power switch is now off, transitioning to the off screen.");
if (timeOfDayDisplayed) {
forceScreenTransition(Qt.resolvedUrl("Screen_TimeOfDay.qml"));
} else {
forceScreenTransition(Qt.resolvedUrl("Screen_Off.qml"));
}
forceScreenTransition(Qt.resolvedUrl("Screen_Off.qml"));
}
}
}
Expand Down Expand Up @@ -152,7 +148,6 @@ Window {
property int screenOffsetX: appSettings.screenOffsetX
property int screenOffsetY: appSettings.screenOffsetY
property string timeOfDay: "12:00"
property bool timeOfDayDisplayed: appSettings.timeOfDayDisplayed
property int smallTextSize: 32
property int bigTextSize: 55
property int titleTextSize: 18 * screenScale
Expand Down Expand Up @@ -355,11 +350,7 @@ Window {
appSettings.backlightOff = false;
if (appSettings.settingsInitialized) {
if (callServiceFailure == false) {
if (timeOfDayDisplayed) {
Qt.resolvedUrl("Screen_TimeOfDay.qml");
} else {
Qt.resolvedUrl("Screen_Off.qml");
}
Qt.resolvedUrl("Screen_Off.qml");
} else {
Qt.resolvedUrl("Screen_CallService.qml");
}
Expand Down
17 changes: 0 additions & 17 deletions PizzaOvenUI/programSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const bool defaultRotatePizzaAlert = true;
const bool defaultFinalCheckAlert = true;
const bool defaultDoneAlert = true;
const bool defaultDemoMode = true;
const bool defaultTimeOfDayDisplayedState = true;

extern QObject *appParentObj;
bool backlightFileExists = false;
Expand Down Expand Up @@ -127,7 +126,6 @@ void ProgramSettings::loadSettingsFromJsonObject(const QJsonObject &settings)
m_doneAlertEnabled = (settings.contains("doneAlertEnabled")) ? settings["doneAlertEnabled"].toBool() : defaultDoneAlert;
m_demoModeState = (settings.contains("demoModeEnable")) ? settings["demoModeEnable"].toBool() : defaultDemoMode;
m_demoModeState = (settings.contains("demoModeEnable")) ? settings["demoModeEnable"].toBool() : defaultDemoMode;
m_timeOfDayDisplayedState = (settings.contains("timeOfDayDisplayed")) ? settings["timeOfDayDisplayed"].toBool() : defaultTimeOfDayDisplayedState;
}

void ProgramSettings::storeSettingsToJsonObject(QJsonObject &settings) const
Expand All @@ -143,7 +141,6 @@ void ProgramSettings::storeSettingsToJsonObject(QJsonObject &settings) const
settings["finalCheckAlertEnabled"] = m_finalCheckAlertEnabled;
settings["doneAlertEnabled"] = m_doneAlertEnabled;
settings["demoModeEnable"] = m_demoModeState;
settings["timeOfDayDisplayed"] = m_timeOfDayDisplayedState;
}

void ProgramSettings::initializeSettingsToDefaults(void)
Expand All @@ -161,7 +158,6 @@ void ProgramSettings::initializeSettingsToDefaults(void)
m_finalCheckAlertEnabled = defaultFinalCheckAlert;
m_doneAlertEnabled = defaultDoneAlert;
m_demoModeState = defaultDemoMode;
m_timeOfDayDisplayedState = defaultTimeOfDayDisplayedState;
}

/*************** TOD Offset ***************/
Expand All @@ -179,19 +175,6 @@ int ProgramSettings::todOffset()
return m_todOffset;
}

/*************** Time Of Day Displayed ***************/
void ProgramSettings::setTimeOfDayDisplayState(bool displayed)
{
m_timeOfDayDisplayedState = displayed;
emit timeOfDayDisplayedStateChanged();
saveSettings();
}

bool ProgramSettings::getTimeOfDayDisplayedState()
{
return m_timeOfDayDisplayedState;
}

/*************** Screen Offset X ***************/
void ProgramSettings::setScreenoffsetX(int OffsetX)
{
Expand Down
4 changes: 0 additions & 4 deletions PizzaOvenUI/programSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class ProgramSettings : public QObject
{
Q_OBJECT
Q_PROPERTY(int todOffset READ todOffset WRITE setTodOffset NOTIFY todOffsetChanged)
Q_PROPERTY(bool timeOfDayDisplayed READ getTimeOfDayDisplayedState WRITE setTimeOfDayDisplayState NOTIFY timeOfDayDisplayedStateChanged)
Q_PROPERTY(int screenOffsetX READ getScreenOffsetX WRITE setScreenoffsetX NOTIFY screenOffsetXChanged)
Q_PROPERTY(int screenOffsetY READ getScreenOffsetY WRITE setScreenoffsetY NOTIFY screenOffsetYChanged)
Q_PROPERTY(bool settingsInitialized READ areSettingsInitialized WRITE intializeSettings NOTIFY initializationChanged)
Expand All @@ -35,8 +34,6 @@ class ProgramSettings : public QObject

void setTodOffset(int newOffset);
int todOffset();
void setTimeOfDayDisplayState(bool displayed);
bool getTimeOfDayDisplayedState();
void setScreenoffsetX(int OffsetX);
void setScreenoffsetY(int OffsetY);
int getScreenOffsetX();
Expand Down Expand Up @@ -81,7 +78,6 @@ class ProgramSettings : public QObject
public slots:
private:
int m_todOffset;
bool m_timeOfDayDisplayedState;
int m_screenXOffset;
int m_screenYOffset;
bool m_settingsInitialized;
Expand Down