Skip to content

Commit

Permalink
Added a flag for to show display screen at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
vladozar committed Feb 17, 2017
1 parent c72fbcb commit 39ec67b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generalsettingwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void GeneralSettingWidget::setSettings(GeneralSettings settings)
void GeneralSettingWidget::loadSettings()
{
ui->checkBoxDisplayOnTop->setChecked(mySettings.displayIsOnTop);
ui->checkBoxDisplayOnStartUp->setChecked(mySettings.displayOnStartUp);

// Load Themes
loadThemes();
Expand Down Expand Up @@ -120,6 +121,7 @@ void GeneralSettingWidget::loadThemes()
GeneralSettings GeneralSettingWidget::getSettings()
{
mySettings.displayIsOnTop = ui->checkBoxDisplayOnTop->isChecked();
mySettings.displayOnStartUp = ui->checkBoxDisplayOnStartUp->isChecked();

int tmx = ui->comboBoxTheme->currentIndex();
if(tmx != -1)
Expand Down
7 changes: 7 additions & 0 deletions generalsettingwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@
</property>
</spacer>
</item>
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="checkBoxDisplayOnStartUp">
<property name="text">
<string>Show Display Screen on SoftProjector Startup</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
6 changes: 6 additions & 0 deletions settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@ void Settings::loadSettings()
v = set.at(1).trimmed();
if(n == "displayIsOnTop")
general.displayIsOnTop = (v=="true");
else if(n == "displayOnStartUp")
general.displayOnStartUp = (v=="true");
else if(n == "currentThemeId")
general.currentThemeId = v.toInt();
else if (n == "displayScreen")
Expand Down Expand Up @@ -902,6 +904,10 @@ void Settings::saveSettings()
gset = "displayIsOnTop = true";
else
gset = "displayIsOnTop = false";
if(general.displayOnStartUp)
gset += "\ndisplayOnStartUp = true";
else
gset += "\ndisplayOnStartUp = false";
gset += "\ncurrentThemeId = " + QString::number(general.currentThemeId);
gset += "\ndisplayScreen = " + QString::number(general.displayScreen);
gset += "\ndisplayScreen2 = " + QString::number(general.displayScreen2);
Expand Down

0 comments on commit 39ec67b

Please sign in to comment.