From 2ed095eed5e323a8a8319cd930d69b590c048c97 Mon Sep 17 00:00:00 2001 From: hawkeyexp Date: Fri, 21 Dec 2018 17:37:20 +0100 Subject: [PATCH] Add settings for brightness control / Auto Play / Add CSSTORAGE info / Switchable cursor --- .../autoapp/Configuration/Configuration.hpp | 12 + .../autoapp/Configuration/IConfiguration.hpp | 6 + .../f1x/openauto/autoapp/UI/MainWindow.hpp | 4 + src/autoapp/Configuration/Configuration.cpp | 46 +- src/autoapp/UI/MainWindow.cpp | 52 +- src/autoapp/UI/SettingsWindow.cpp | 18 + src/autoapp/UI/settingswindow.ui | 871 +++++++++++------- src/autoapp/autoapp.cpp | 10 +- 8 files changed, 665 insertions(+), 354 deletions(-) diff --git a/include/f1x/openauto/autoapp/Configuration/Configuration.hpp b/include/f1x/openauto/autoapp/Configuration/Configuration.hpp index 9375a61..b4ca266 100644 --- a/include/f1x/openauto/autoapp/Configuration/Configuration.hpp +++ b/include/f1x/openauto/autoapp/Configuration/Configuration.hpp @@ -58,6 +58,10 @@ public: bool hideAlpha() const override; void showLux(bool value) override; bool showLux() const override; + void showCursor(bool value) override; + bool showCursor() const override; + void hideBrightnessControl(bool value) override; + bool hideBrightnessControl() const override; std::string getMp3MasterPath() const override; void setMp3MasterPath(const std::string& value) override; @@ -67,6 +71,8 @@ public: void setMp3Track(int32_t value) override; bool mp3AutoPlay() const override; void mp3AutoPlay(bool value) override; + bool showAutoPlay() const override; + void showAutoPlay(bool value) override; aasdk::proto::enums::VideoFPS::Enum getVideoFPS() const override; void setVideoFPS(aasdk::proto::enums::VideoFPS::Enum value) override; @@ -110,10 +116,13 @@ private: bool hideMenuToggle_; bool hideAlpha_; bool showLux_; + bool showCursor_; + bool hideBrightnessControl_; std::string mp3MasterPath_; std::string mp3SubFolder_; int32_t mp3Track_; bool mp3AutoPlay_; + bool showAutoPlay_; aasdk::proto::enums::VideoFPS::Enum videoFPS_; aasdk::proto::enums::VideoResolution::Enum videoResolution_; @@ -138,6 +147,8 @@ private: static const std::string cGeneralHideMenuToggleKey; static const std::string cGeneralHideAlphaKey; static const std::string cGeneralShowLuxKey; + static const std::string cGeneralShowCursorKey; + static const std::string cGeneralHideBrightnessControlKey; static const std::string cGeneralHandednessOfTrafficTypeKey; @@ -145,6 +156,7 @@ private: static const std::string cGeneralMp3SubFolderKey; static const std::string cGeneralMp3TrackKey; static const std::string cGeneralMp3AutoPlayKey; + static const std::string cGeneralShowAutoPlayKey; static const std::string cVideoFPSKey; static const std::string cVideoResolutionKey; diff --git a/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp b/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp index 8635dc0..51d5140 100644 --- a/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp +++ b/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp @@ -66,6 +66,10 @@ public: virtual bool hideAlpha() const = 0; virtual void showLux(bool value) = 0; virtual bool showLux() const = 0; + virtual void showCursor(bool value) = 0; + virtual bool showCursor() const = 0; + virtual void hideBrightnessControl(bool value) = 0; + virtual bool hideBrightnessControl() const = 0; virtual std::string getMp3MasterPath() const = 0; virtual void setMp3MasterPath(const std::string& value) = 0; @@ -75,6 +79,8 @@ public: virtual void setMp3Track(int32_t value) = 0; virtual bool mp3AutoPlay() const = 0; virtual void mp3AutoPlay(bool value) = 0; + virtual bool showAutoPlay() const = 0; + virtual void showAutoPlay(bool value) = 0; virtual aasdk::proto::enums::VideoFPS::Enum getVideoFPS() const = 0; virtual void setVideoFPS(aasdk::proto::enums::VideoFPS::Enum value) = 0; diff --git a/include/f1x/openauto/autoapp/UI/MainWindow.hpp b/include/f1x/openauto/autoapp/UI/MainWindow.hpp index 3f7686d..03bdcca 100644 --- a/include/f1x/openauto/autoapp/UI/MainWindow.hpp +++ b/include/f1x/openauto/autoapp/UI/MainWindow.hpp @@ -243,6 +243,10 @@ private: bool lightsensor = false; bool holidaybg = false; + + bool csmtupdate = false; + bool udevupdate = false; + bool openautoupdate = false; }; } diff --git a/src/autoapp/Configuration/Configuration.cpp b/src/autoapp/Configuration/Configuration.cpp index b3529b3..c193e4b 100644 --- a/src/autoapp/Configuration/Configuration.cpp +++ b/src/autoapp/Configuration/Configuration.cpp @@ -39,6 +39,8 @@ const std::string Configuration::cGeneralAlphaTransKey = "General.AlphaTrans"; const std::string Configuration::cGeneralHideMenuToggleKey = "General.HideMenuToggle"; const std::string Configuration::cGeneralHideAlphaKey = "General.HideAlpha"; const std::string Configuration::cGeneralShowLuxKey = "General.ShowLux"; +const std::string Configuration::cGeneralShowCursorKey = "General.ShowCursor"; +const std::string Configuration::cGeneralHideBrightnessControlKey = "General.HideBrightnessControl"; const std::string Configuration::cGeneralHandednessOfTrafficTypeKey = "General.HandednessOfTrafficType"; @@ -46,6 +48,7 @@ const std::string Configuration::cGeneralMp3MasterPathKey = "General.Mp3MasterPa const std::string Configuration::cGeneralMp3SubFolderKey = "General.Mp3SubFolder"; const std::string Configuration::cGeneralMp3TrackKey = "General.Mp3Track"; const std::string Configuration::cGeneralMp3AutoPlayKey = "General.Mp3AutoPlay"; +const std::string Configuration::cGeneralShowAutoPlayKey = "General.ShowAutoPlay"; const std::string Configuration::cVideoFPSKey = "Video.FPS"; const std::string Configuration::cVideoResolutionKey = "Video.Resolution"; @@ -101,17 +104,20 @@ void Configuration::load() hideMenuToggle_ = iniConfig.get(cGeneralHideMenuToggleKey, false); hideAlpha_ = iniConfig.get(cGeneralHideAlphaKey, false); showLux_ = iniConfig.get(cGeneralShowLuxKey, false); + showCursor_ = iniConfig.get(cGeneralShowCursorKey, false); + hideBrightnessControl_ = iniConfig.get(cGeneralHideBrightnessControlKey, false); mp3MasterPath_ = iniConfig.get(cGeneralMp3MasterPathKey, "/media/MYMEDIA"); mp3SubFolder_ = iniConfig.get(cGeneralMp3SubFolderKey, "/"); mp3Track_ = iniConfig.get(cGeneralMp3TrackKey, 0); mp3AutoPlay_ = iniConfig.get(cGeneralMp3AutoPlayKey, false); + showAutoPlay_ = iniConfig.get(cGeneralShowAutoPlayKey, false); videoFPS_ = static_cast(iniConfig.get(cVideoFPSKey, aasdk::proto::enums::VideoFPS::_30)); videoResolution_ = static_cast(iniConfig.get(cVideoResolutionKey, aasdk::proto::enums::VideoResolution::_480p)); - screenDPI_ = iniConfig.get(cVideoScreenDPIKey, 140); + screenDPI_ = iniConfig.get(cVideoScreenDPIKey, 100); omxLayerIndex_ = iniConfig.get(cVideoOMXLayerIndexKey, 1); videoMargins_ = QRect(0, 0, iniConfig.get(cVideoMarginWidth, 0), iniConfig.get(cVideoMarginHeight, 0)); @@ -146,13 +152,16 @@ void Configuration::reset() hideMenuToggle_ = false; hideAlpha_ = false; showLux_ = false; + showCursor_ = false; + hideBrightnessControl_ = false; mp3MasterPath_ = "/media/MYMEDIA"; mp3SubFolder_ = "/"; mp3Track_ = 0; mp3AutoPlay_ = false; + showAutoPlay_ = false; videoFPS_ = aasdk::proto::enums::VideoFPS::_30; videoResolution_ = aasdk::proto::enums::VideoResolution::_480p; - screenDPI_ = 140; + screenDPI_ = 100; omxLayerIndex_ = 1; videoMargins_ = QRect(0, 0, 0, 0); enableTouchscreen_ = true; @@ -176,10 +185,13 @@ void Configuration::save() iniConfig.put(cGeneralHideMenuToggleKey, hideMenuToggle_); iniConfig.put(cGeneralHideAlphaKey, hideAlpha_); iniConfig.put(cGeneralShowLuxKey, showLux_); + iniConfig.put(cGeneralShowCursorKey, showCursor_); + iniConfig.put(cGeneralHideBrightnessControlKey, hideBrightnessControl_); iniConfig.put(cGeneralMp3MasterPathKey, mp3MasterPath_); iniConfig.put(cGeneralMp3SubFolderKey, mp3SubFolder_); iniConfig.put(cGeneralMp3TrackKey, mp3Track_); iniConfig.put(cGeneralMp3AutoPlayKey, mp3AutoPlay_); + iniConfig.put(cGeneralShowAutoPlayKey, showAutoPlay_); iniConfig.put(cVideoFPSKey, static_cast(videoFPS_)); iniConfig.put(cVideoResolutionKey, static_cast(videoResolution_)); @@ -299,6 +311,26 @@ bool Configuration::showLux() const return showLux_; } +void Configuration::showCursor(bool value) +{ + showCursor_ = value; +} + +bool Configuration::showCursor() const +{ + return showCursor_; +} + +void Configuration::hideBrightnessControl(bool value) +{ + hideBrightnessControl_ = value; +} + +bool Configuration::hideBrightnessControl() const +{ + return hideBrightnessControl_; +} + std::string Configuration::getMp3MasterPath() const { return mp3MasterPath_; @@ -339,6 +371,16 @@ bool Configuration::mp3AutoPlay() const return mp3AutoPlay_; } +void Configuration::showAutoPlay(bool value) +{ + showAutoPlay_ = value; +} + +bool Configuration::showAutoPlay() const +{ + return showAutoPlay_; +} + aasdk::proto::enums::VideoFPS::Enum Configuration::getVideoFPS() const { return videoFPS_; diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp index 22596a9..189349b 100644 --- a/src/autoapp/UI/MainWindow.cpp +++ b/src/autoapp/UI/MainWindow.cpp @@ -353,8 +353,10 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi // run monitor for custom brightness command if enabled in crankshaft_env.sh if (brigthnessvalues[3] == "1") { - ui_->pushButtonBrightness->show(); - ui_->pushButtonBrightness2->show(); + if (!configuration->hideBrightnessControl()) { + ui_->pushButtonBrightness->show(); + ui_->pushButtonBrightness2->show(); + } this->customBrightnessControl = true; system("/usr/local/bin/autoapp_helper startcustombrightness &"); } @@ -479,7 +481,19 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi MainWindow::playerShow(); MainWindow::playerHide(); MainWindow::on_pushButtonPlayerPlayList_clicked(); - MainWindow::playerShow(); + if (configuration->showAutoPlay()) { + MainWindow::playerShow(); + } + } + + // update notify + this->csmtupdate = check_file_exist("/tmp/csmt_update_available"); + this->udevupdate = check_file_exist("/tmp/udev_update_available"); + this->openautoupdate = check_file_exist("/tmp/openauto_update_available"); + + if (this->csmtupdate || this->udevupdate || this->openautoupdate) { + ui_->SysinfoTopLeft->setText("Update available!"); + ui_->SysinfoTopLeft->show(); } watcher = new QFileSystemWatcher(this); @@ -489,6 +503,21 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi watcher_tmp = new QFileSystemWatcher(this); watcher_tmp->addPath("/tmp"); connect(watcher_tmp, &QFileSystemWatcher::directoryChanged, this, &MainWindow::tmpChanged); + + // Experimental test code + //QBluetoothLocalDevice localDevice; + //QString localDeviceName; + //QString localDeviceAddress; + //if (localDevice.isValid()) { + // localDeviceName = localDevice.name(); + // localDeviceAddress = localDevice.address().toString(); + // QList btdevices; + // btdevices = localDevice.connectedDevices(); + // QString btdevice = btdevices.first().toString(); + // QMessageBox btMessage(QMessageBox::Critical, "BT Device", btdevice, QMessageBox::Ok); + // btMessage.setWindowFlags(Qt::WindowStaysOnTopHint); + // btMessage.exec(); + //} } MainWindow::~MainWindow() @@ -1568,6 +1597,23 @@ void f1x::openauto::autoapp::ui::MainWindow::tmpChanged() ui_->pushButtonToggleGUI2->show(); } + // hide brightness button if eanbled in settings + if (configuration_->hideBrightnessControl()) { + if ((ui_->pushButtonBrightness->isVisible() == true) || (ui_->pushButtonBrightness->isVisible() == true) || (ui_->BrightnessSliderControl->isVisible() == true)) { + ui_->pushButtonBrightness->hide(); + ui_->pushButtonBrightness2->hide(); + ui_->BrightnessSliderControl->hide(); + ui_->VolumeSliderControl->show(); + } + } else { + if (!this->lightsensor) { + if ((ui_->pushButtonBrightness->isVisible() == false) || (ui_->pushButtonBrightness->isVisible() == false)) { + ui_->pushButtonBrightness->show(); + ui_->pushButtonBrightness2->show(); + } + } + } + // read value from tsl2561 if (std::ifstream("/tmp/tsl2561") && this->configuration_->showLux()) { QFile paramFile("/tmp/tsl2561"); diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp index 8805ff3..9b139f5 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/src/autoapp/UI/SettingsWindow.cpp @@ -28,6 +28,7 @@ #include #include #include +#include namespace f1x { @@ -145,7 +146,10 @@ void SettingsWindow::onSave() configuration_->setAlphaTrans(static_cast(ui_->horizontalSliderAlphaTrans->value())); configuration_->hideMenuToggle(ui_->checkBoxHideMenuToggle->isChecked()); configuration_->showLux(ui_->checkBoxShowLux->isChecked()); + configuration_->showCursor(ui_->checkBoxShowCursor->isChecked()); + configuration_->hideBrightnessControl(ui_->checkBoxHideBrightnessControl->isChecked()); configuration_->mp3AutoPlay(ui_->checkBoxAutoPlay->isChecked()); + configuration_->showAutoPlay(ui_->checkBoxShowPlayer->isChecked()); configuration_->setVideoFPS(ui_->radioButton30FPS->isChecked() ? aasdk::proto::enums::VideoFPS::_30 : aasdk::proto::enums::VideoFPS::_60); @@ -377,7 +381,10 @@ void SettingsWindow::load() ui_->checkBoxOldGUI->setChecked(configuration_->oldGUI()); ui_->checkBoxHideMenuToggle->setChecked(configuration_->hideMenuToggle()); ui_->checkBoxShowLux->setChecked(configuration_->showLux()); + ui_->checkBoxShowCursor->setChecked(configuration_->showCursor()); + ui_->checkBoxHideBrightnessControl->setChecked(configuration_->hideBrightnessControl()); ui_->checkBoxAutoPlay->setChecked(configuration_->mp3AutoPlay()); + ui_->checkBoxShowPlayer->setChecked(configuration_->showAutoPlay()); ui_->radioButton30FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_30); ui_->radioButton60FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_60); @@ -409,6 +416,17 @@ void SettingsWindow::load() ui_->radioButtonQtAudio->setChecked(audioOutputBackendType == configuration::AudioOutputBackendType::QT); ui_->checkBoxHardwareSave->setChecked(false); + QStorageInfo storage("/media/CSSTORAGE"); + storage.refresh(); + if (storage.isValid() && storage.isReady()) { + if (storage.isReadOnly()) { + ui_->labelStorage->setText("Storage is read only! (" + storage.device() + ") - This can be caused by demaged filesystem on CSSTORAGE. Try a reboot."); + } else { + ui_->labelStorage->setText("Device: " + storage.device() + " Label: " + storage.displayName() + " Total: " + QString::number(storage.bytesTotal()/1024/1024/1024) + "GB Free: " + QString::number(storage.bytesFree()/1024/1024/1024) + "GB (" + storage.fileSystemType() + ")"); + } + } else { + ui_->labelStorage->setText("Storage is not ready or missing!"); + } } void SettingsWindow::loadButtonCheckBoxes() diff --git a/src/autoapp/UI/settingswindow.ui b/src/autoapp/UI/settingswindow.ui index 943e2ad..968ae69 100644 --- a/src/autoapp/UI/settingswindow.ui +++ b/src/autoapp/UI/settingswindow.ui @@ -6,8 +6,8 @@ 0 0 - 963 - 3688 + 945 + 3526 @@ -281,14 +281,23 @@ outline: none; 6 + + 0 + - 2 + 0 + + + 0 2 + + 6 + @@ -305,7 +314,7 @@ outline: none; - 2 + 0 2 @@ -355,7 +364,7 @@ outline: none; - 2 + 0 2 @@ -415,6 +424,13 @@ outline: none; + + + + Hide brightness control on main window + + + @@ -433,10 +449,10 @@ outline: none; - 2 + 0 - 6 + 4 @@ -449,7 +465,7 @@ outline: none; 0 - 24 + 20 @@ -481,13 +497,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 40 - 24 + 20 16777215 - 24 + 20 @@ -514,10 +530,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 6 - 2 + 0 - 6 + 4 @@ -530,13 +546,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 40 - 24 + 20 16777215 - 24 + 20 @@ -555,7 +571,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 0 - 24 + 20 @@ -595,13 +611,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 9 - 2 + 0 9 - 6 + 4 @@ -614,13 +630,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 40 - 24 + 20 16777215 - 24 + 20 @@ -639,7 +655,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 0 - 24 + 20 @@ -674,54 +690,85 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} Media player defaults - + 2 2 - - - - - 0 - 24 - - - - - 16777215 - 24 - - - - auto play - - - - - + + 0 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 100 + 0 + + + + auto play + + + + + + + + 0 + 0 + + + + Auto playback last played song on startup if available + + + + + + + + + + + 0 + 0 + + - 0 - 24 - - - - - 16777215 - 24 + 240 + 0 - Auto playback last played song on startup if available + Show player window on auto play @@ -729,17 +776,17 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - - - - 0 - 0 - + + + Qt::Vertical - - + + + 20 + 4 + - + @@ -754,13 +801,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 9 + 0 - 2 + 0 - 9 + 0 2 @@ -979,10 +1026,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 4 + 0 - 4 + 0 @@ -998,6 +1045,12 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 32 + + + 16777215 + 32 + + false @@ -1021,7 +1074,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - + 0 0 @@ -1032,6 +1085,12 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 32 + + + 100 + 32 + + QSpinBox::up-button { width: 32px; height: 32px; subcontrol-origin: margin; @@ -1057,10 +1116,10 @@ subcontrol-position: center left; - 4 + 0 - 4 + 0 @@ -1076,6 +1135,12 @@ subcontrol-position: center left; 32 + + + 16777215 + 32 + + Margin height @@ -1087,7 +1152,7 @@ subcontrol-position: center left; - + 0 0 @@ -1098,6 +1163,12 @@ subcontrol-position: center left; 32 + + + 100 + 32 + + QSpinBox::up-button { width: 32px; height: 32px; subcontrol-origin: margin; @@ -1125,13 +1196,16 @@ subcontrol-position: center left; + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + - 4 + 0 - 4 + 0 - + @@ -1145,6 +1219,12 @@ subcontrol-position: center left; 32 + + + 16777215 + 32 + + Margin width @@ -1153,10 +1233,10 @@ subcontrol-position: center left; - + - + 0 0 @@ -1167,6 +1247,12 @@ subcontrol-position: center left; 32 + + + 100 + 32 + + QSpinBox::up-button { width: 32px; height: 32px; subcontrol-origin: margin; @@ -1190,12 +1276,18 @@ subcontrol-position: center left; - + 0 0 + + 0 + + + 0 + @@ -1262,7 +1354,7 @@ subcontrol-position: center left; 2 - 9 + 4 @@ -1275,7 +1367,13 @@ subcontrol-position: center left; 40 - 24 + 20 + + + + + 16777215 + 20 @@ -1294,7 +1392,7 @@ subcontrol-position: center left; 0 - 24 + 20 @@ -1341,13 +1439,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 9 + 0 - 2 + 0 - 9 + 0 2 @@ -1864,7 +1962,13 @@ color: rgb(255, 255, 255); 40 - 24 + 20 + + + + + 16777215 + 20 @@ -1877,7 +1981,7 @@ color: rgb(255, 255, 255); 0 - 24 + 20 @@ -1924,7 +2028,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 40 - 24 + 20 + + + + + 16777215 + 20 @@ -1937,7 +2047,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 0 - 24 + 20 @@ -1969,81 +2079,89 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + 0 + 0 + - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - 0 - - - 2 - - - 9 - - - 2 - - - - - - 0 - 0 - - - - - 30 - 30 - - - - - 30 - 30 - - - - <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html> - - - - - - - - 0 - 0 - - - - - 0 - 30 - - - - - 16777215 - 30 - - - - - true - - - - If audio device is changed pulseaudio daemon will restart - reconnect bluetooth is needed to work again! - - - - + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + 1 + + + 0 + + + 9 + + + 0 + + + + + + 0 + 0 + + + + + 30 + 30 + + + + + 30 + 30 + + + + <html><head/><body><p><img src=":/ico_warning.png"/></p></body></html> + + + + + + + + 0 + 0 + + + + + 0 + 30 + + + + + 16777215 + 30 + + + + + true + + + + If audio device is changed pulseaudio daemon will restart - reconnect bluetooth is needed to work again! + + + + + @@ -2058,13 +2176,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 9 + 0 - 2 + 0 - 9 + 0 2 @@ -2078,6 +2196,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} + + + + Show cursor (needs reboot!) + + + @@ -2085,10 +2210,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 2 + 0 - 9 + 0 9 @@ -2293,13 +2418,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 9 + 0 - 2 + 0 - 9 + 0 2 @@ -2319,6 +2444,12 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} Bluetooth Adapter + + 0 + + + 0 + @@ -2356,10 +2487,10 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} - 2 + 0 - 2 + 0 @@ -2507,10 +2638,10 @@ outline: none; - 2 + 0 - 2 + 0 @@ -2860,6 +2991,12 @@ outline: none; + + 0 + + + 0 + @@ -3409,10 +3546,10 @@ outline: none; 0 - 2 + 0 - 2 + 0 @@ -3485,13 +3622,13 @@ outline: none; - 9 + 0 - 2 + 0 - 9 + 0 2 @@ -3512,93 +3649,9 @@ outline: none; 2 - 9 + 2 - - - - - - - 0 - 0 - - - - - 120 - 20 - - - - CPU Temp: - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - - - - - - - - - - - - - - - - 0 - 0 - - - - - 120 - 20 - - - - Version: - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - - - - - - - - - - + @@ -3640,49 +3693,7 @@ outline: none; - - - - - - - 0 - 0 - - - - - 120 - 20 - - - - Build Date: - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - - - - - - - - - - + @@ -3724,6 +3735,166 @@ outline: none; + + + + + + + 0 + 0 + + + + + 120 + 20 + + + + Build Date: + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + - - - + + + + + + + + + + + + 0 + 0 + + + + + 120 + 20 + + + + CPU Temp: + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + - - - + + + + + + + + + + + + 0 + 0 + + + + + 120 + 20 + + + + Version: + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + - - - + + + + + + + + + + + + + 0 + 0 + + + + CSSTORAGE Information + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + + + @@ -3761,7 +3932,7 @@ outline: none; 2 - 9 + 2 @@ -3799,7 +3970,7 @@ outline: none; 2 - 9 + 2 @@ -3839,6 +4010,12 @@ outline: none; Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + 2 + + + 2 + @@ -4246,10 +4423,10 @@ subcontrol-position: center left; 0 - 2 + 0 - 2 + 0 @@ -4321,8 +4498,14 @@ subcontrol-position: center left; + + 0 + - 2 + 0 + + + 0 2 @@ -4340,10 +4523,10 @@ subcontrol-position: center left; - 2 + 0 - 2 + 0 @@ -4980,10 +5163,10 @@ subcontrol-position: center left; 10 - 2 + 0 - 2 + 0 @@ -5932,12 +6115,6 @@ subcontrol-position: center left; 0 - - - 0 - 60 - - Debugmode @@ -5979,12 +6156,6 @@ subcontrol-position: center left; 0 - - - 0 - 60 - - Custom Brightness Command @@ -6029,7 +6200,7 @@ subcontrol-position: center left; - + 0 0 @@ -6047,12 +6218,18 @@ subcontrol-position: center left; - + 0 0 + + 0 + + + 0 + @@ -6123,7 +6300,7 @@ subcontrol-position: center left; - 16777215 + 100 32 @@ -6216,7 +6393,7 @@ subcontrol-position: center left; - 16777215 + 100 32 @@ -6342,13 +6519,13 @@ subcontrol-position: center left; 0 - 2 + 0 9 - 2 + 0 @@ -6421,13 +6598,13 @@ subcontrol-position: center left; - 9 + 0 - 2 + 0 - 9 + 0 2 @@ -6472,13 +6649,13 @@ subcontrol-position: center left; 9 - 2 + 0 9 - 2 + 0 @@ -6703,13 +6880,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;} 9 - 2 + 0 9 - 2 + 0 @@ -7203,13 +7380,13 @@ or lower 0 - 2 + 0 9 - 2 + 0 @@ -7281,8 +7458,14 @@ or lower + + 0 + - 2 + 0 + + + 0 2 @@ -7315,10 +7498,10 @@ or lower - 2 + 0 - 2 + 0 diff --git a/src/autoapp/autoapp.cpp b/src/autoapp/autoapp.cpp index c10bad1..ba96302 100644 --- a/src/autoapp/autoapp.cpp +++ b/src/autoapp/autoapp.cpp @@ -130,11 +130,11 @@ int main(int argc, char* argv[]) QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openConnectDialog, &connectDialog, &autoapp::ui::ConnectDialog::exec); QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openWifiDialog, &wifiDialog, &autoapp::ui::WifiDialog::exec); - qApplication.setOverrideCursor(Qt::BlankCursor); - QObject::connect(&mainWindow, &autoapp::ui::MainWindow::toggleCursor, [&qApplication]() { - const auto cursor = qApplication.overrideCursor()->shape() == Qt::BlankCursor ? Qt::ArrowCursor : Qt::BlankCursor; - qApplication.setOverrideCursor(cursor); - }); + if (configuration->showCursor() == false) { + qApplication.setOverrideCursor(Qt::BlankCursor); + } else { + qApplication.setOverrideCursor(Qt::ArrowCursor); + } QObject::connect(&mainWindow, &autoapp::ui::MainWindow::cameraHide, [&qApplication]() { #ifdef RASPBERRYPI3