diff --git a/assets/bg-equilizer.png b/assets/bg-equilizer.png deleted file mode 100644 index 0546ad0..0000000 Binary files a/assets/bg-equilizer.png and /dev/null differ diff --git a/assets/resources.qrc b/assets/resources.qrc index 5a3a297..ba03ab5 100644 --- a/assets/resources.qrc +++ b/assets/resources.qrc @@ -37,7 +37,6 @@ player-hot.png coverlogo.png black.png - bg-equilizer.png Roboto-Regular.ttf diff --git a/include/f1x/openauto/autoapp/UI/MainWindow.hpp b/include/f1x/openauto/autoapp/UI/MainWindow.hpp index 1335f23..25e2373 100644 --- a/include/f1x/openauto/autoapp/UI/MainWindow.hpp +++ b/include/f1x/openauto/autoapp/UI/MainWindow.hpp @@ -207,6 +207,7 @@ private: bool wallpaperNightFileExists = false; bool wallpaperClassicDayFileExists = false; bool wallpaperClassicNightFileExists = false; + bool wallpaperEQFileExists = false; bool exitMenuVisible = false; diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp index df233e9..086c481 100644 --- a/src/autoapp/UI/MainWindow.cpp +++ b/src/autoapp/UI/MainWindow.cpp @@ -116,6 +116,9 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi QFileInfo wallpaperClassicNightFile("wallpaper-classic-night.png"); this->wallpaperNightFileExists = wallpaperNightFile.exists(); + QFileInfo wallpaperEQFile("wallpaper-eq.png"); + this->wallpaperEQFileExists = wallpaperEQFile.exists(); + if (wallpaperDayFile.isSymLink()) { QFileInfo linkTarget(wallpaperDayFile.symLinkTarget()); this->wallpaperDayFileExists = linkTarget.exists(); @@ -136,6 +139,11 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi this->wallpaperClassicNightFileExists = linkTarget.exists(); } + if (wallpaperEQFile.isSymLink()) { + QFileInfo linkTarget(wallpaperEQFile.symLinkTarget()); + this->wallpaperEQFileExists = linkTarget.exists(); + } + ui_->setupUi(this); connect(ui_->pushButtonSettings, &QPushButton::clicked, this, &MainWindow::openSettings); connect(ui_->pushButtonSettings2, &QPushButton::clicked, this, &MainWindow::openSettings); @@ -842,7 +850,12 @@ void f1x::openauto::autoapp::ui::MainWindow::cameraControlShow() void f1x::openauto::autoapp::ui::MainWindow::playerShow() { - this->setStyleSheet("QMainWindow { background: url(:/bg-equilizer.png); background-repeat: no-repeat; background-position: center; }"); + if (this->wallpaperEQFileExists) { + this->setStyleSheet("QMainWindow { background: url(wallpaper-eq.png); background-repeat: no-repeat; background-position: center; }"); + } else { + this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); + } + if (!this->oldGUIStyle) { ui_->menuWidget->hide(); } else { diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index 820d1c4..7e4fdc3 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -322,6 +322,12 @@ void SettingsWindow::onSave() params.append("#"); params.append( std::string(ui_->comboBoxNightmodeStep->currentText().toStdString()) ); params.append("#"); + if (ui_->checkBoxDisableDayNightRTC->isChecked()) { + params.append("0"); + } else { + params.append("1"); + } + params.append("#"); system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str()); @@ -899,6 +905,11 @@ void SettingsWindow::loadSystemValues() ui_->groupBoxSliderNight->show(); } ui_->comboBoxDayNight->setCurrentText(getparams[41]); + if (getparams[42] == "1") { + ui_->checkBoxDisableDayNightRTC->setChecked(false); + } else { + ui_->checkBoxDisableDayNightRTC->setChecked(true); + } } } diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui index eff9d6d..7304348 100644 --- a/src/autoapp/UI/settingswindow.ui +++ b/src/autoapp/UI/settingswindow.ui @@ -7,7 +7,7 @@ 0 0 963 - 3512 + 3536 @@ -3236,57 +3236,256 @@ outline: none; Auto Day / Night - + - 2 + 0 - 2 + 0 - + 0 0 - - - 4 - - - 4 - - - + + + - + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 120 + 32 + + + + + 120 + 32 + + + + + 10 + + + + Start Day + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 100 + 32 + + + + + 16777215 + 32 + + + + QSpinBox::up-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center right; +} +QSpinBox::down-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center left; +} + + + 23 + + + 8 + + + + + + + + + + + 0 + 0 + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 120 + 32 + + + + + 120 + 32 + + + + Start Night + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 100 + 32 + + + + + 16777215 + 32 + + + + QSpinBox::up-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center right; +} +QSpinBox::down-button { width: 32px; height: 32px; +subcontrol-origin: margin; +subcontrol-position: center left; +} + + + 23 + + + 18 + + + + + + + + + + + 0 + 0 + + + + <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> + + + + + + + 0 0 - 100 + 0 + 32 + + + + + 16777215 32 10 + true - Start Day - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Needs a RTC! - - + + 0 @@ -3295,138 +3494,24 @@ outline: none; - 100 + 80 32 - - QSpinBox::up-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center right; -} -QSpinBox::down-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center left; -} - - - 23 - - - 8 - - - - - - - - - - - 0 - 0 - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 4 - - - 4 - - - - - - 0 - 0 - - - + - 100 + 80 32 - Start Night - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 32 - - - - QSpinBox::up-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center right; -} -QSpinBox::down-button { width: 32px; height: 32px; -subcontrol-origin: margin; -subcontrol-position: center left; -} - - - 23 - - - 18 + Disable - - - - - 0 - 0 - - - - <html><head/><body><p><img src=":/ico_info.png"/></p></body></html> - - - - - - - - 0 - 0 - - - - - 10 - true - - - - Needs a configured RTC! - - - @@ -5595,16 +5680,16 @@ subcontrol-position: center left; - 0 + 9 - 0 + 2 - 0 + 9 - 0 + 2 @@ -5615,6 +5700,18 @@ subcontrol-position: center left; + + 0 + + + 0 + + + 0 + + + 0 + @@ -6100,12 +6197,15 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - + + + 9 + - 0 + 2 - 4 + 2 @@ -6349,6 +6449,61 @@ or lower + + + + + 0 + 0 + + + + + 9 + + + 2 + + + 9 + + + 2 + + + + + + 0 + 0 + + + + <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html> + + + + + + + + 0 + 0 + + + + + true + + + + Changes are applied if set and saved. + + + + + +