Rework triggers / usb /network

This commit is contained in:
hawkeyexp 2018-11-03 12:16:10 +01:00
parent 4e2ebcdd4a
commit e5c031774e
9 changed files with 1141 additions and 929 deletions

View File

@ -41,6 +41,7 @@
#include <taglib/fileref.h>
#include <taglib/tag.h>
#include <QFileSystemWatcher>
namespace Ui
{
@ -63,6 +64,8 @@ public:
explicit MainWindow(configuration::IConfiguration::Pointer configuration, QWidget *parent = nullptr);
~MainWindow() override;
QMediaPlayer* player;
QFileSystemWatcher* watcher;
QFileSystemWatcher* watcher_tmp;
signals:
void exit();
@ -137,6 +140,8 @@ private slots:
void on_StateChanged(QMediaPlayer::State state);
void scanFolders();
void scanFiles();
void tmpChanged();
void setTrigger();
private:
Ui::MainWindow* ui_;
@ -223,6 +228,8 @@ private:
int currentPlaylistIndex = 0;
bool background_set = false;
bool mediacontentchanged = true;
};
}

View File

@ -24,6 +24,7 @@
#include <QFileDialog>
class QCheckBox;
class QTimer;
namespace Ui
{
@ -62,6 +63,7 @@ private slots:
void syncNTPTime();
void on_pushButtonRescan_clicked();
void on_pushButtonAudioTest_clicked();
void updateNetworkInfo();
private slots:
void show_tab1();
@ -83,6 +85,9 @@ private:
Ui::SettingsWindow* ui_;
configuration::IConfiguration::Pointer configuration_;
QString hotspotssid;
QString wifissid;
};
}

View File

@ -54,7 +54,6 @@ bool RtAudioOutput::open()
RtAudio::StreamOptions streamOptions;
streamOptions.flags = RTAUDIO_MINIMIZE_LATENCY | RTAUDIO_SCHEDULE_REALTIME;
uint32_t bufferFrames = sampleRate_ == 16000 ? 1024 : 2048; //according to the observation of audio packets
//dac_->openStream(&parameters, nullptr, RTAUDIO_SINT16, sampleRate_, &bufferFrames, &RtAudioOutput::audioBufferReadHandler, static_cast<void*>(this), &streamOptions);
dac_->openStream(&parameters, nullptr, RTAUDIO_SINT16, sampleRate_, &bufferFrames, &RtAudioOutput::audioBufferReadHandler, static_cast<void*>(this), &streamOptions);
OPENAUTO_LOG(info) << "[RtAudioOutput] Sample Rate: " << sampleRate_;
return audioBuffer_.open(QIODevice::ReadWrite);

View File

@ -29,6 +29,7 @@
#include <QFont>
#include <QScreen>
#include <QRect>
#include <QFileSystemWatcher>
namespace f1x
{
@ -164,49 +165,21 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
connect(ui_->pushButtonMusic2, &QPushButton::clicked, this, &MainWindow::playerShow);
connect(ui_->pushButtonBack, &QPushButton::clicked, this, &MainWindow::playerHide);
connect(ui_->pushButtonPlayerBack, &QPushButton::clicked, this, &MainWindow::playerHide);
connect(ui_->pushButtonUSB, &QPushButton::clicked, this, &MainWindow::openUSBDialog);
connect(ui_->pushButtonRescan, &QPushButton::clicked, this, &MainWindow::scanFolders);
//connect(ui_->pushButtonUSB, &QPushButton::clicked, this, &MainWindow::openUSBDialog);
// by default hide bluetooth button on init
ui_->pushButtonBluetooth->hide();
// by default hide media player
ui_->mediaWidget->hide();
ui_->pushButtonUSB->hide();
ui_->SysinfoTopLeft->hide();
QTimer *timer=new QTimer(this);
connect(timer, SIGNAL(timeout()),this,SLOT(showTime()));
timer->start(1000);
// Build Version string for mainscreen
// Get git version string
//QFileInfo vFile("/etc/crankshaft.build");
//if (vFile.exists()) {
// QFile versionFile(QString("/etc/crankshaft.build"));
// versionFile.open(QIODevice::ReadOnly);
// QTextStream data_version(&versionFile);
// QString lineversion = data_version.readAll();
// versionFile.close();
// this->bversion=lineversion.simplified();
//} else {
// this->bversion="unknown";
//}
// Get date string
//QFileInfo dFile("/etc/crankshaft.build");
//if (dFile.exists()) {
// QFile dateFile(QString("/etc/crankshaft.date"));
// dateFile.open(QIODevice::ReadOnly);
// QTextStream data_date(&dateFile);
// QString linedate = data_date.readAll();
// dateFile.close();
// this->bdate=linedate.simplified();
//} else {
// this->bdate="- - -";
//}
//QString buildid = "Build: " + this->bversion + " (" + this->bdate + ")";
//ui_->BuildID->setText(buildid);
// enable connects while cam is enabled
if (this->cameraButtonForce) {
connect(ui_->pushButtonCameraShow, &QPushButton::clicked, this, &MainWindow::cameraShow);
@ -571,13 +544,17 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
ui_->labelFolderpath->hide();
ui_->labelAlbumpath->hide();
// link possible existing media
system(qPrintable("ln -s /media/CSSTORAGE/Music/* /media/MYMEDIA"));
system(qPrintable("/usr/local/bin/autoapp_helper cleansymlinks"));
MainWindow::scanFolders();
ui_->comboBoxAlbum->setCurrentText(QString::fromStdString(configuration->getMp3SubFolder()));
MainWindow::scanFiles();
watcher = new QFileSystemWatcher(this);
watcher->addPath("/media/USBDRIVES");
connect(watcher, &QFileSystemWatcher::directoryChanged, this, &MainWindow::setTrigger);
watcher_tmp = new QFileSystemWatcher(this);
watcher_tmp->addPath("/tmp");
connect(watcher_tmp, &QFileSystemWatcher::directoryChanged, this, &MainWindow::tmpChanged);
}
MainWindow::~MainWindow()
@ -977,6 +954,7 @@ void f1x::openauto::autoapp::ui::MainWindow::toggleGUI()
}
}
}
f1x::openauto::autoapp::ui::MainWindow::tmpChanged();
}
void f1x::openauto::autoapp::ui::MainWindow::createDebuglog()
@ -1006,266 +984,7 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
if ((time.second() % 2) == 0) {
time_text[3] = ' ';
time_text[8] = ' ';
// check if system is in display off mode (tap2wake)
QFileInfo blankFile("/tmp/blankscreen");
if (blankFile.exists()) {
if (ui_->centralWidget->isVisible() == true) {
ui_->centralWidget->hide();
}
} else {
if (ui_->centralWidget->isVisible() == false) {
ui_->centralWidget->show();
}
}
// check if custom command needs black background
QFileInfo blackFile("/tmp/blackscreen");
if (blackFile.exists()) {
if (ui_->centralWidget->isVisible() == true) {
ui_->centralWidget->hide();
this->setStyleSheet("QMainWindow {background-color: rgb(0,0,0);}");
this->background_set = false;
}
} else {
if (this->background_set == false) {
if (!this->nightModeEnabled) {
if (this->oldGUIStyle) {
if (this->wallpaperClassicDayFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->wallpaperDayFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
}
} else {
if (this->oldGUIStyle) {
if (this->wallpaperClassicNightFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->wallpaperNightFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
}
}
this->background_set = true;
}
}
// check if phone is conencted to usb
QFileInfo phoneConnectedFile("/tmp/android_device");
if (phoneConnectedFile.exists()) {
if (ui_->phoneConnected->isVisible() == false) {
ui_->phoneConnected->setText("USB connected");
ui_->phoneConnected->show();
}
} else {
if (ui_->phoneConnected->isVisible() == true) {
ui_->phoneConnected->hide();
}
}
// check if bluetooth available
QFileInfo bluetoothButtonFile("/tmp/button_bluetooth_visible");
this->bluetoothEnabled = bluetoothButtonFile.exists();
if (this->bluetoothEnabled) {
if (ui_->pushButtonBluetooth->isVisible() == false) {
ui_->pushButtonBluetooth->show();
}
} else {
if (ui_->pushButtonBluetooth->isVisible() == true) {
ui_->pushButtonBluetooth->hide();
}
}
// check if a device is connected via bluetooth
QFileInfo phoneBTConnectedFile("/tmp/btdevice");
if (phoneBTConnectedFile.exists()) {
if (ui_->btDevice->isVisible() == false) {
QFile phoneBTData(QString("/tmp/btdevice"));
phoneBTData.open(QIODevice::ReadOnly);
QTextStream data_date(&phoneBTData);
QString linedate = data_date.readAll();
phoneBTData.close();
ui_->btDevice->setText(linedate.simplified());
ui_->btDevice->show();
}
} else {
if (ui_->btDevice->isVisible() == true) {
ui_->btDevice->hide();
}
}
// check the need for system messages
QFileInfo configInProgressFile("/tmp/config_in_progress");
QFileInfo debugInProgressFile("/tmp/debug_in_progress");
QFileInfo enablePairingFile("/tmp/enable_pairing");
if (configInProgressFile.exists() || debugInProgressFile.exists() || enablePairingFile.exists()) {
if (ui_->systemConfigInProgress->isVisible() == false) {
if (configInProgressFile.exists()) {
ui_->systemConfigInProgress->setText("System config in progress - please wait ...");
ui_->pushButtonSettings->hide();
ui_->pushButtonSettings2->hide();
ui_->pushButtonLock->show();
ui_->pushButtonLock2->show();
ui_->systemConfigInProgress->show();
}
if (debugInProgressFile.exists()) {
ui_->systemConfigInProgress->setText("Creating debug.zip on /boot - please wait ...");
ui_->pushButtonSettings->hide();
ui_->pushButtonSettings2->hide();
ui_->pushButtonDebug->hide();
ui_->pushButtonDebug2->hide();
ui_->pushButtonLock->show();
ui_->pushButtonLock2->show();
ui_->systemConfigInProgress->show();
}
if (enablePairingFile.exists()) {
ui_->systemConfigInProgress->setText("Auto Bluetooth Pairing enabled for 120 seconds!");
ui_->pushButtonDebug->hide();
ui_->pushButtonDebug2->hide();
ui_->systemConfigInProgress->show();
}
}
} else {
if (ui_->systemConfigInProgress->isVisible() == true) {
ui_->systemConfigInProgress->hide();
ui_->pushButtonSettings->show();
ui_->pushButtonSettings2->show();
ui_->pushButtonLock->hide();
ui_->pushButtonLock2->hide();
if (this->systemDebugmode) {
ui_->pushButtonDebug->show();
ui_->pushButtonDebug2->show();
}
}
}
// update day/night state
QFileInfo nightModeFile("/tmp/night_mode_enabled");
this->nightModeEnabled = nightModeFile.exists();
if (this->nightModeEnabled) {
if (!this->DayNightModeState) {
this->DayNightModeState = true;
f1x::openauto::autoapp::ui::MainWindow::switchGuiToNight();
}
} else {
if (this->DayNightModeState) {
this->DayNightModeState = false;
f1x::openauto::autoapp::ui::MainWindow::switchGuiToDay();
}
}
// camera stuff
if (this->cameraButtonForce) {
// check if dashcam is recording
QFileInfo dashCamRecordingFile("/tmp/dashcam_is_recording");
this->dashCamRecording = dashCamRecordingFile.exists();
// show recording state if dashcam is visible
if (ui_->cameraWidget->isVisible() == true) {
if (this->dashCamRecording) {
if (ui_->pushButtonRecord->isVisible() == true) {
ui_->pushButtonRecordActive->show();
ui_->pushButtonRecord->hide();
}
} else {
if (ui_->pushButtonRecordActive->isVisible() == true) {
ui_->pushButtonRecord->show();
ui_->pushButtonRecordActive->hide();
}
}
}
// check if rearcam is eanbled
QFileInfo rearCamFile("/tmp/rearcam_enabled");
this->rearCamEnabled = rearCamFile.exists();
if (this->rearCamEnabled) {
if (!this->rearCamVisible) {
this->rearCamVisible = true;
f1x::openauto::autoapp::ui::MainWindow::MainWindow::showRearCam();
}
} else {
if (this->rearCamVisible) {
this->rearCamVisible = false;
f1x::openauto::autoapp::ui::MainWindow::MainWindow::hideRearCam();
}
}
}
// check if sutdown is external triggered and init clean app exit
QFileInfo externalExitFile("/tmp/external_exit");
if (externalExitFile.exists()) {
f1x::openauto::autoapp::ui::MainWindow::MainWindow::exit();
}
QFileInfo hotspotFile("/tmp/hotspot_active");
this->hotspotActive = hotspotFile.exists();
// hide wifi if not forced
if (!this->hotspotActive) {
if ((ui_->pushButtonWifi->isVisible() == true) || (ui_->pushButtonWifi2->isVisible() == true)){
ui_->pushButtonWifi->hide();
ui_->pushButtonWifi2->hide();
if (!this->cameraButtonForce) {
ui_->pushButtonDummyCamWifi->show();
}
}
} else {
if ((ui_->pushButtonWifi->isVisible() == false) || (ui_->pushButtonWifi2->isVisible() == false)) {
ui_->pushButtonWifi->show();
ui_->pushButtonWifi2->show();
ui_->pushButtonDummyCamWifi->hide();
}
}
}
// handle dummys in classic menu
int button_count = 0;
if (ui_->pushButtonCameraShow2->isVisible() == true) {
button_count = button_count + 1;
}
if (ui_->pushButtonToggleGUI2->isVisible() == true) {
button_count = button_count + 1;
}
if (ui_->pushButtonWifi2->isVisible() == true) {
button_count = button_count + 1;
}
if (ui_->pushButtonDebug2->isVisible() == true) {
button_count = button_count + 1;
}
if (button_count >= 3) {
ui_->pushButtonDummyClassic1->hide();
ui_->pushButtonDummyClassic2->hide();
}
if (button_count == 2) {
ui_->pushButtonDummyClassic1->hide();
ui_->pushButtonDummyClassic2->hide();
}
if (button_count == 1) {
ui_->pushButtonDummyClassic1->show();
ui_->pushButtonDummyClassic2->hide();
}
if (button_count == 0) {
ui_->pushButtonDummyClassic1->show();
ui_->pushButtonDummyClassic2->show();
}
ui_->Digital_clock->setText(time_text);
ui_->bigClock->setText(time_text);
}
@ -1289,7 +1008,7 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonList_clicked()
ui_->pushButtonList->hide();
ui_->pushButtonPlayerPlayList->show();
ui_->pushButtonBackToPlayer->show();
ui_->pushButtonUSB->show();
//ui_->pushButtonUSB->show();
}
void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerStop_clicked()
@ -1308,7 +1027,7 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerStop_clicked()
ui_->playerPositionTime->setText("00:00 / 00:00");
ui_->labelCurrentPlaying->setText("");
ui_->labelTrack->setText("");
ui_->pushButtonUSB->show();
//ui_->pushButtonUSB->show();
}
void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerPause_clicked()
@ -1434,71 +1153,100 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerPlayList_clicked
ui_->pushButtonPlayerPause->show();
int currentalbum = ui_->comboBoxAlbum->currentIndex();
ui_->labelCurrentAlbumIndex->setText(QString::number(currentalbum+1));
ui_->pushButtonUSB->hide();
//ui_->pushButtonUSB->hide();
}
void f1x::openauto::autoapp::ui::MainWindow::on_comboBoxAlbum_currentIndexChanged(const QString &arg1)
{
this->albumfolder = arg1;
f1x::openauto::autoapp::ui::MainWindow::scanFiles();
MainWindow::scanFiles();
}
void f1x::openauto::autoapp::ui::MainWindow::setTrigger()
{
this->mediacontentchanged = true;
ui_->SysinfoTopLeft->setText("Media changed - Scanning ...");
ui_->SysinfoTopLeft->show();
//QTimer *timerscan=new QTimer(this);
//connect(timerscan, SIGNAL(timeout()),this,SLOT(scanFolders()));
//timerscan->start(10000);
// Start delayed folderscan after usb event
QTimer::singleShot(10000, this, SLOT(scanFolders()));
}
void f1x::openauto::autoapp::ui::MainWindow::scanFolders()
{
int cleaner = ui_->comboBoxAlbum->count();
while (cleaner > -1) {
ui_->comboBoxAlbum->removeItem(cleaner);
cleaner--;
}
QDir directory(this->musicfolder);
QStringList folders = directory.entryList(QStringList() << "*", QDir::AllDirs, QDir::Name);
foreach (QString foldername, folders) {
if (foldername != "..") {
ui_->comboBoxAlbum->addItem(foldername);
ui_->labelAlbumCount->setText(QString::number(ui_->comboBoxAlbum->count()));
try {
if (this->mediacontentchanged == true) {
this->mediacontentchanged = false;
int cleaner = ui_->comboBoxAlbum->count();
while (cleaner > -1) {
ui_->comboBoxAlbum->removeItem(cleaner);
cleaner--;
}
QDir directory(this->musicfolder);
QStringList folders = directory.entryList(QStringList() << "*", QDir::AllDirs, QDir::Name);
foreach (QString foldername, folders) {
if (foldername != "..") {
ui_->comboBoxAlbum->addItem(foldername);
ui_->labelAlbumCount->setText(QString::number(ui_->comboBoxAlbum->count()));
}
}
this->currentPlaylistIndex = 0;
ui_->SysinfoTopLeft->hide();
//timerscan->stop();
}
}
this->currentPlaylistIndex = 0;
catch(...) {
ui_->SysinfoTopLeft->hide();
//timerscan->stop();
qDebug() << "Fail in Folderscan";
}
}
void f1x::openauto::autoapp::ui::MainWindow::scanFiles()
{
int cleaner = ui_->mp3List->count();
while (cleaner > -1) {
ui_->mp3List->takeItem(cleaner);
cleaner--;
}
this->playlist->clear();
QList<QMediaContent> content;
QDir directory(this->musicfolder + "/" + this->albumfolder);
QStringList mp3s = directory.entryList(QStringList() << "*.mp3" << "*.flac" << "*.aac" << "*.ogg" << "*.mp4" << "*.mp4a" << "*.wma",QDir::Files, QDir::Name);
foreach (QString filename, mp3s) {
// add to mediacontent
content.push_back(QMediaContent(QUrl::fromLocalFile(this->musicfolder + "/" + this->albumfolder + "/" + filename)));
// add items to gui
// read metadata using taglib
try {
TagLib::FileRef file((this->musicfolder + "/" + this->albumfolder + "/" + filename).toUtf8(),true);
TagLib::String artist_string = file.tag()->artist();
TagLib::String title_string = file.tag()->title();
TagLib::uint track_string = file.tag()->track();
QString artistid3 = QString::fromStdWString(artist_string.toCWString());
QString titleid3 = QString::fromStdWString(title_string.toCWString());
QString trackid3 = QString::number(track_string);
int tracklength = trackid3.length();
if (tracklength < 2) {
trackid3 = "0" + trackid3;
}
QString ID3Entry = trackid3 + ": " + artistid3 + " - " + titleid3;
ui_->mp3List->addItem(ID3Entry);
} catch (...) {
// old way only adding filename to list
ui_->mp3List->addItem(filename);
if (this->mediacontentchanged == false) {
int cleaner = ui_->mp3List->count();
while (cleaner > -1) {
ui_->mp3List->takeItem(cleaner);
cleaner--;
}
this->playlist->clear();
QList<QMediaContent> content;
QDir directory(this->musicfolder + "/" + this->albumfolder);
QStringList mp3s = directory.entryList(QStringList() << "*.mp3" << "*.flac" << "*.aac" << "*.ogg" << "*.mp4" << "*.mp4a" << "*.wma",QDir::Files, QDir::Name);
foreach (QString filename, mp3s) {
// add to mediacontent
content.push_back(QMediaContent(QUrl::fromLocalFile(this->musicfolder + "/" + this->albumfolder + "/" + filename)));
// add items to gui
// read metadata using taglib
try {
TagLib::FileRef file((this->musicfolder + "/" + this->albumfolder + "/" + filename).toUtf8(),true);
TagLib::String artist_string = file.tag()->artist();
TagLib::String title_string = file.tag()->title();
TagLib::uint track_string = file.tag()->track();
QString artistid3 = QString::fromStdWString(artist_string.toCWString());
QString titleid3 = QString::fromStdWString(title_string.toCWString());
QString trackid3 = QString::number(track_string);
int tracklength = trackid3.length();
if (tracklength < 2) {
trackid3 = "0" + trackid3;
}
QString ID3Entry = trackid3 + ": " + artistid3 + " - " + titleid3;
ui_->mp3List->addItem(ID3Entry);
} catch (...) {
// old way only adding filename to list
ui_->mp3List->addItem(filename);
}
}
// set playlist
this->playlist->addMedia(content);
}
// set playlist
this->playlist->addMedia(content);
}
void f1x::openauto::autoapp::ui::MainWindow::on_mp3List_currentRowChanged(int currentRow)
@ -1558,7 +1306,7 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonBackToPlayer_clicked()
ui_->pushButtonBackToPlayer->hide();
ui_->pushButtonPlayerPlayList->hide();
ui_->pushButtonList->show();
ui_->pushButtonUSB->hide();
//ui_->pushButtonUSB->hide();
}
void f1x::openauto::autoapp::ui::MainWindow::on_StateChanged(QMediaPlayer::State state)
@ -1569,3 +1317,265 @@ void f1x::openauto::autoapp::ui::MainWindow::on_StateChanged(QMediaPlayer::State
system("touch /tmp/media_playing");
}
}
void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
{
// check if system is in display off mode (tap2wake)
QFileInfo blankFile("/tmp/blankscreen");
if (blankFile.exists()) {
if (ui_->centralWidget->isVisible() == true) {
ui_->centralWidget->hide();
}
} else {
if (ui_->centralWidget->isVisible() == false) {
ui_->centralWidget->show();
}
}
// check if custom command needs black background
QFileInfo blackFile("/tmp/blackscreen");
if (blackFile.exists()) {
if (ui_->centralWidget->isVisible() == true) {
ui_->centralWidget->hide();
this->setStyleSheet("QMainWindow {background-color: rgb(0,0,0);}");
this->background_set = false;
}
} else {
if (this->background_set == false) {
if (!this->nightModeEnabled) {
if (this->oldGUIStyle) {
if (this->wallpaperClassicDayFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->wallpaperDayFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
}
} else {
if (this->oldGUIStyle) {
if (this->wallpaperClassicNightFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
} else {
if (this->wallpaperNightFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }");
} else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
}
}
}
this->background_set = true;
}
}
// check if phone is conencted to usb
QFileInfo phoneConnectedFile("/tmp/android_device");
if (phoneConnectedFile.exists()) {
if (ui_->phoneConnected->isVisible() == false) {
ui_->phoneConnected->setText("USB connected");
ui_->phoneConnected->show();
}
} else {
if (ui_->phoneConnected->isVisible() == true) {
ui_->phoneConnected->hide();
}
}
// check if bluetooth available
QFileInfo bluetoothButtonFile("/tmp/button_bluetooth_visible");
this->bluetoothEnabled = bluetoothButtonFile.exists();
if (this->bluetoothEnabled) {
if (ui_->pushButtonBluetooth->isVisible() == false) {
ui_->pushButtonBluetooth->show();
}
} else {
if (ui_->pushButtonBluetooth->isVisible() == true) {
ui_->pushButtonBluetooth->hide();
}
}
// check if a device is connected via bluetooth
QFileInfo phoneBTConnectedFile("/tmp/btdevice");
if (phoneBTConnectedFile.exists()) {
if (ui_->btDevice->isVisible() == false) {
QFile phoneBTData(QString("/tmp/btdevice"));
phoneBTData.open(QIODevice::ReadOnly);
QTextStream data_date(&phoneBTData);
QString linedate = data_date.readAll();
phoneBTData.close();
ui_->btDevice->setText(linedate.simplified());
ui_->btDevice->show();
}
} else {
if (ui_->btDevice->isVisible() == true) {
ui_->btDevice->hide();
}
}
// check the need for system messages
QFileInfo configInProgressFile("/tmp/config_in_progress");
QFileInfo debugInProgressFile("/tmp/debug_in_progress");
QFileInfo enablePairingFile("/tmp/enable_pairing");
if (configInProgressFile.exists() || debugInProgressFile.exists() || enablePairingFile.exists()) {
if (ui_->systemConfigInProgress->isVisible() == false) {
if (configInProgressFile.exists()) {
ui_->systemConfigInProgress->setText("System config in progress - please wait ...");
ui_->pushButtonSettings->hide();
ui_->pushButtonSettings2->hide();
ui_->pushButtonLock->show();
ui_->pushButtonLock2->show();
ui_->systemConfigInProgress->show();
}
if (debugInProgressFile.exists()) {
ui_->systemConfigInProgress->setText("Creating debug.zip on /boot - please wait ...");
ui_->pushButtonSettings->hide();
ui_->pushButtonSettings2->hide();
ui_->pushButtonDebug->hide();
ui_->pushButtonDebug2->hide();
ui_->pushButtonLock->show();
ui_->pushButtonLock2->show();
ui_->systemConfigInProgress->show();
}
if (enablePairingFile.exists()) {
ui_->systemConfigInProgress->setText("Auto Bluetooth Pairing enabled for 120 seconds!");
ui_->pushButtonDebug->hide();
ui_->pushButtonDebug2->hide();
ui_->systemConfigInProgress->show();
}
}
} else {
if (ui_->systemConfigInProgress->isVisible() == true) {
ui_->systemConfigInProgress->hide();
ui_->pushButtonSettings->show();
ui_->pushButtonSettings2->show();
ui_->pushButtonLock->hide();
ui_->pushButtonLock2->hide();
if (this->systemDebugmode) {
ui_->pushButtonDebug->show();
ui_->pushButtonDebug2->show();
}
}
}
// update day/night state
QFileInfo nightModeFile("/tmp/night_mode_enabled");
this->nightModeEnabled = nightModeFile.exists();
if (this->nightModeEnabled) {
if (!this->DayNightModeState) {
this->DayNightModeState = true;
f1x::openauto::autoapp::ui::MainWindow::switchGuiToNight();
}
} else {
if (this->DayNightModeState) {
this->DayNightModeState = false;
f1x::openauto::autoapp::ui::MainWindow::switchGuiToDay();
}
}
// camera stuff
if (this->cameraButtonForce) {
// check if dashcam is recording
QFileInfo dashCamRecordingFile("/tmp/dashcam_is_recording");
this->dashCamRecording = dashCamRecordingFile.exists();
// show recording state if dashcam is visible
if (ui_->cameraWidget->isVisible() == true) {
if (this->dashCamRecording) {
if (ui_->pushButtonRecord->isVisible() == true) {
ui_->pushButtonRecordActive->show();
ui_->pushButtonRecord->hide();
}
} else {
if (ui_->pushButtonRecordActive->isVisible() == true) {
ui_->pushButtonRecord->show();
ui_->pushButtonRecordActive->hide();
}
}
}
// check if rearcam is eanbled
QFileInfo rearCamFile("/tmp/rearcam_enabled");
this->rearCamEnabled = rearCamFile.exists();
if (this->rearCamEnabled) {
if (!this->rearCamVisible) {
this->rearCamVisible = true;
f1x::openauto::autoapp::ui::MainWindow::MainWindow::showRearCam();
}
} else {
if (this->rearCamVisible) {
this->rearCamVisible = false;
f1x::openauto::autoapp::ui::MainWindow::MainWindow::hideRearCam();
}
}
}
// check if sutdown is external triggered and init clean app exit
QFileInfo externalExitFile("/tmp/external_exit");
if (externalExitFile.exists()) {
f1x::openauto::autoapp::ui::MainWindow::MainWindow::exit();
}
QFileInfo hotspotFile("/tmp/hotspot_active");
this->hotspotActive = hotspotFile.exists();
// hide wifi if not forced
if (!this->hotspotActive) {
if ((ui_->pushButtonWifi->isVisible() == true) || (ui_->pushButtonWifi2->isVisible() == true)){
ui_->pushButtonWifi->hide();
ui_->pushButtonWifi2->hide();
if (!this->cameraButtonForce) {
ui_->pushButtonDummyCamWifi->show();
}
}
} else {
if ((ui_->pushButtonWifi->isVisible() == false) || (ui_->pushButtonWifi2->isVisible() == false)) {
ui_->pushButtonWifi->show();
ui_->pushButtonWifi2->show();
ui_->pushButtonDummyCamWifi->hide();
}
}
// handle dummys in classic menu
int button_count = 0;
if (ui_->pushButtonCameraShow2->isVisible() == true) {
button_count = button_count + 1;
}
if (ui_->pushButtonToggleGUI2->isVisible() == true) {
button_count = button_count + 1;
}
if (ui_->pushButtonWifi2->isVisible() == true) {
button_count = button_count + 1;
}
if (ui_->pushButtonDebug2->isVisible() == true) {
button_count = button_count + 1;
}
if (button_count >= 3) {
ui_->pushButtonDummyClassic1->hide();
ui_->pushButtonDummyClassic2->hide();
}
if (button_count == 2) {
ui_->pushButtonDummyClassic1->hide();
ui_->pushButtonDummyClassic2->hide();
}
if (button_count == 1) {
ui_->pushButtonDummyClassic1->show();
ui_->pushButtonDummyClassic2->hide();
}
if (button_count == 0) {
ui_->pushButtonDummyClassic1->show();
ui_->pushButtonDummyClassic2->show();
}
//qDebug() << "/tmp changed";
}

View File

@ -23,8 +23,11 @@
#include <QFileInfo>
#include <QTextStream>
#include <string>
#include <QTimer>
#include <QDateTime>
#include <QProcess>
#include <QNetworkInterface>
#include <QNetworkConfigurationManager>
namespace f1x
{
@ -57,12 +60,11 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
connect(ui_->horizontalSliderSystemVolume, &QSlider::valueChanged, this, &SettingsWindow::onUpdateSystemVolume);
connect(ui_->horizontalSliderSystemCapture, &QSlider::valueChanged, this, &SettingsWindow::onUpdateSystemCapture);
connect(ui_->pushButtonHotspotStart, &QPushButton::clicked, this, &SettingsWindow::onStartHotspot);
connect(ui_->pushButtonHotspotStart , &QPushButton::clicked, this, &SettingsWindow::close);
connect(ui_->pushButtonHotspotStop, &QPushButton::clicked, this, &SettingsWindow::onStopHotspot);
connect(ui_->pushButtonHotspotStop , &QPushButton::clicked, this, &SettingsWindow::close);
connect(ui_->pushButtonSetTime, &QPushButton::clicked, this, &SettingsWindow::setTime);
connect(ui_->pushButtonSetTime, &QPushButton::clicked, this, &SettingsWindow::close);
connect(ui_->pushButtonNTP , &QPushButton::clicked, this, &SettingsWindow::close);
//connect(ui_->pushButtonSetTime, &QPushButton::clicked, [&]() { &SettingsWindow::setTime; &SettingsWindow::close; });
connect(ui_->pushButtonNTP, &QPushButton::clicked, this, &SettingsWindow::close);
// menu
ui_->tab1->show();
@ -73,14 +75,18 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
ui_->tab6->hide();
ui_->tab7->hide();
ui_->tab8->hide();
ui_->horizontalGroupBox->hide();
ui_->groupBoxNetworking->hide();
ui_->labelBluetoothAdapterAddress->hide();
ui_->lineEditExternalBluetoothAdapterAddress->hide();
ui_->labelTestInProgress->hide();
connect(ui_->pushButtonTab1, &QPushButton::clicked, this, &SettingsWindow::show_tab1);
connect(ui_->pushButtonTab2, &QPushButton::clicked, this, &SettingsWindow::show_tab2);
connect(ui_->pushButtonTab3, &QPushButton::clicked, this, &SettingsWindow::show_tab3);
connect(ui_->pushButtonTab4, &QPushButton::clicked, this, &SettingsWindow::show_tab4);
connect(ui_->pushButtonTab5, &QPushButton::clicked, this, &SettingsWindow::show_tab5);
connect(ui_->pushButtonTab5, &QPushButton::clicked, this, &SettingsWindow::updateNetworkInfo);
connect(ui_->pushButtonTab6, &QPushButton::clicked, this, &SettingsWindow::show_tab6);
connect(ui_->pushButtonTab7, &QPushButton::clicked, this, &SettingsWindow::show_tab7);
connect(ui_->pushButtonTab8, &QPushButton::clicked, this, &SettingsWindow::show_tab8);
@ -90,8 +96,22 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
QString time_text_minute=time.toString("mm");
ui_->spinBoxHour->setValue((time_text_hour).toInt());
ui_->spinBoxMinute->setValue((time_text_minute).toInt());
SettingsWindow::on_pushButtonRescan_clicked();
ui_->labelTestInProgress->hide();
ui_->label_modeswitchprogress->hide();
QFileInfo hotspotFile("/tmp/hotspot_active");
if (hotspotFile.exists()) {
ui_->pushButtonHotspotStop->show();
ui_->pushButtonHotspotStart->hide();
ui_->lineEdit_wifimode->setText("Hotspot");
ui_->lineEditWifiSSID->setText(this->hotspotssid);
} else {
ui_->pushButtonHotspotStart->show();
ui_->pushButtonHotspotStop->hide();
ui_->lineEdit_wifimode->setText("Client");
ui_->lineEditWifiSSID->setText(this->wifissid);
}
}
SettingsWindow::~SettingsWindow()
@ -648,7 +668,8 @@ void SettingsWindow::loadSystemValues()
ui_->spinBoxGPIOShutdownDelay->setValue(getparams[29].toInt());
// Wifi Credentials
ui_->lineEditWifiClientSSID->setText(getparams[30]);
//ui_->lineEditWifiSSID->setText(getparams[30]);
this->wifissid = getparams[30];
// Wifi Hotspot Credentials
if (getparams[31] == "1") {
@ -657,7 +678,7 @@ void SettingsWindow::loadSystemValues()
ui_->checkBoxHotspot->setChecked(false);
}
ui_->lineEditWifiHotspotSSID->setText(getparams[32]);
this->hotspotssid = getparams[32];
// set cam
ui_->comboBoxCam->setCurrentText(getparams[33]);
@ -724,12 +745,26 @@ void SettingsWindow::onShowBindings()
void SettingsWindow::onStartHotspot()
{
ui_->label_modeswitchprogress->show();
ui_->pushButtonHotspotStart->hide();
ui_->pushButtonHotspotStop->hide();
ui_->lineEdit_wifimode->setText("");
ui_->lineEdit_wlan0->setText("");
ui_->lineEditWifiSSID->setText("");
system("sudo systemctl start hotspot &");
QTimer::singleShot(15000, this, SLOT(updateNetworkInfo()));
}
void SettingsWindow::onStopHotspot()
{
ui_->label_modeswitchprogress->show();
ui_->pushButtonHotspotStart->hide();
ui_->pushButtonHotspotStop->hide();
ui_->lineEdit_wifimode->setText("");
ui_->lineEdit_wlan0->setText("");
ui_->lineEditWifiSSID->setText("");
system("sudo systemctl stop hotspot &");
QTimer::singleShot(15000, this, SLOT(updateNetworkInfo()));
}
void SettingsWindow::show_tab1()
@ -860,3 +895,47 @@ void f1x::openauto::autoapp::ui::SettingsWindow::on_pushButtonAudioTest_clicked(
ui_->pushButtonAudioTest->show();
ui_->labelTestInProgress->hide();
}
void f1x::openauto::autoapp::ui::SettingsWindow::updateNetworkInfo()
{
QNetworkInterface eth0if = QNetworkInterface::interfaceFromName("eth0");
if (eth0if.flags().testFlag(QNetworkInterface::IsUp)) {
QList<QNetworkAddressEntry> entrieseth0 = eth0if.addressEntries();
if (!entrieseth0.isEmpty()) {
QNetworkAddressEntry eth0 = entrieseth0.first();
//qDebug() << "eth0: " << eth0.ip();
ui_->lineEdit_eth0->setText(eth0.ip().toString());
}
} else {
//qDebug() << "eth0: down";
ui_->lineEdit_eth0->setText("interface down");
}
QNetworkInterface wlan0if = QNetworkInterface::interfaceFromName("wlan0");
if (wlan0if.flags().testFlag(QNetworkInterface::IsUp)) {
QList<QNetworkAddressEntry> entrieswlan0 = wlan0if.addressEntries();
if (!entrieswlan0.isEmpty()) {
QNetworkAddressEntry wlan0 = entrieswlan0.first();
//qDebug() << "wlan0: " << wlan0.ip();
ui_->lineEdit_wlan0->setText(wlan0.ip().toString());
}
} else {
//qDebug() << "wlan0: down";
ui_->lineEdit_wlan0->setText("interface down");
}
QFileInfo hotspotFile("/tmp/hotspot_active");
if (hotspotFile.exists()) {
ui_->pushButtonHotspotStop->show();
ui_->pushButtonHotspotStart->hide();
ui_->label_modeswitchprogress->hide();
ui_->lineEdit_wifimode->setText("Hotspot");
ui_->lineEditWifiSSID->setText(this->hotspotssid);
} else {
ui_->pushButtonHotspotStart->show();
ui_->pushButtonHotspotStop->hide();
ui_->label_modeswitchprogress->hide();
ui_->lineEdit_wifimode->setText("Client");
ui_->lineEditWifiSSID->setText(this->wifissid);
}
}

View File

@ -5,6 +5,7 @@
#include <ui_usbdialog.h>
#include <libusb.h>
#include <blkid/blkid.h>
#include <exception>
namespace f1x
{
@ -23,6 +24,7 @@ USBDialog::USBDialog(QWidget *parent)
connect(ui_->pushButtonClose, &QPushButton::clicked, this, &USBDialog::close);
connect(ui_->pushButtonUpdate, &QPushButton::clicked, this, &USBDialog::scanDrives);
scanDrives();
ui_->listWidgetUSB->setCurrentRow(0);
}
USBDialog::~USBDialog()
@ -97,28 +99,45 @@ void f1x::openauto::autoapp::ui::USBDialog::scanDrives()
currentdevice++;
}
system("/usr/local/bin/autoapp_helper cleansymlinks &");
ui_->listWidgetUSB->setCurrentRow(0);
}
void f1x::openauto::autoapp::ui::USBDialog::on_pushButtonMount_clicked()
{
QString selected = ui_->listWidgetUSB->item(ui_->listWidgetUSB->currentRow())->text();
QString mountfulldevicepath = selected.split(" ")[0];
QString mountdevice = mountfulldevicepath.split("/")[2];
system(qPrintable("sudo umount -f " + mountfulldevicepath));
system(qPrintable("sudo fuser -km /media/USBDRIVES/" + mountdevice));
system(qPrintable("sudo mkdir -p /media/USBDRIVES/" + mountdevice));
system(qPrintable("sudo chmod 777 /media/USBDRIVES/" + mountdevice));
system(qPrintable("sudo mount " + mountfulldevicepath + " /media/USBDRIVES/" + mountdevice));
system(qPrintable("ln -s /media/USBDRIVES/" + mountdevice + "/Music/* /media/MYMEDIA"));
scanDrives();
if (ui_->listWidgetUSB->count() > 0 && selected.contains("/dev/")) {
QString mountfulldevicepath = selected.split(" ")[0];
QString mountdevice = mountfulldevicepath.split("/")[2];
system(qPrintable("sudo umount -f " + mountfulldevicepath + " >/dev/null"));
system(qPrintable("sudo fuser -km /media/USBDRIVES/" + mountdevice + " >/dev/null"));
system(qPrintable("sudo mkdir -p /media/USBDRIVES/" + mountdevice + " >/dev/null"));
system(qPrintable("sudo chmod 777 /media/USBDRIVES/" + mountdevice + " >/dev/null"));
system(qPrintable("sudo mount " + mountfulldevicepath + " /media/USBDRIVES/" + mountdevice + " >/dev/null"));
system(qPrintable("ln -s /media/USBDRIVES/" + mountdevice + "/Music/* /media/MYMEDIA >/dev/null"));
scanDrives();
} else {
QMessageBox errorMessage(QMessageBox::Critical, "Select error", "Nothing selected!", QMessageBox::Ok);
errorMessage.setWindowFlags(Qt::WindowStaysOnTopHint);
errorMessage.exec();
}
ui_->listWidgetUSB->setCurrentRow(0);
}
void f1x::openauto::autoapp::ui::USBDialog::on_pushButtonRemove_clicked()
{
QString selected = ui_->listWidgetUSB->item(ui_->listWidgetUSB->currentRow())->text();
QString mountfulldevicepath = selected.split(" ")[0];
QString mountdevice = mountfulldevicepath.split("/")[2];
system(qPrintable("sudo umount -f " + mountfulldevicepath));
system(qPrintable("sudo fuser -km /media/USBDRIVES/" + mountdevice));
scanDrives();
if (ui_->listWidgetUSB->count() > 0 && selected.contains("/dev/")) {
QString mountfulldevicepath = selected.split(" ")[0];
QString mountdevice = mountfulldevicepath.split("/")[2];
system(qPrintable("sudo umount -f " + mountfulldevicepath + " >/dev/null" + " && sudo rmdir /media/USBDRIVES/" + mountdevice + " >/dev/null"));
system(qPrintable("sudo fuser -km /media/USBDRIVES/" + mountdevice + " >/dev/null" + " && sudo rmdir /media/USBDRIVES/" + mountdevice + " >/dev/null"));
scanDrives();
} else {
QMessageBox errorMessage(QMessageBox::Critical, "Select error", "Nothing selected!", QMessageBox::Ok);
errorMessage.setWindowFlags(Qt::WindowStaysOnTopHint);
errorMessage.exec();
}
ui_->listWidgetUSB->setCurrentRow(0);
}

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1011</width>
<height>1295</height>
<width>862</width>
<height>1297</height>
</rect>
</property>
<property name="sizePolicy">
@ -98,7 +98,7 @@
<item>
<layout class="QHBoxLayout" name="Header">
<property name="spacing">
<number>6</number>
<number>0</number>
</property>
<item>
<widget class="QLabel" name="devlabel_right">
@ -183,13 +183,13 @@ color: rgb(255, 255, 255);</string>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>22</height>
<height>24</height>
</size>
</property>
<property name="styleSheet">
@ -212,9 +212,9 @@ color: rgb(255, 255, 255);</string>
<number>0</number>
</property>
<item>
<widget class="QLabel" name="BuildID">
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -222,128 +222,244 @@ color: rgb(255, 255, 255);</string>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>22</height>
<height>24</height>
</size>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(0, 0, 0, 0);
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="SysinfoTopLeft">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>22</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(0, 0, 0, 0);
color: rgb(78, 244, 37);</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>6</number>
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<widget class="QLabel" name="phoneConnected">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);
<property name="minimumSize">
<size>
<width>0</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>24</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="phoneConnected">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>USB Connected</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="btDevice">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);
</property>
<property name="text">
<string>USB Connected</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="btDevice">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);
color: rgb(0, 102, 255);</string>
</property>
<property name="text">
<string>BT-Device</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonBluetooth">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(32, 74, 135);
</property>
<property name="text">
<string>BT-Device</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButtonBluetooth">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>80</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>22</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(32, 74, 135);
color: rgb(239, 239, 239);
outline: none;</string>
</property>
<property name="text">
<string>BT-Pairing</string>
</property>
</widget>
</item>
</layout>
</property>
<property name="text">
<string>BT-Pairing</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="Digital_clock">
@ -2257,78 +2373,6 @@ QScrollBar {
<property name="frame">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>Neues Element</string>
</property>
</item>
<item>
<property name="text">
<string>Neues Element</string>
</property>
</item>
<item>
<property name="text">
<string>Neues Element</string>
</property>
</item>
<item>
<property name="text">
<string>Neues Element</string>
</property>
</item>
<item>
<property name="text">
<string>Neues Element</string>
</property>
</item>
<item>
<property name="text">
<string>Neues Element</string>
</property>
</item>
<item>
<property name="text">
<string>Neues Element</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonRescan">
<property name="minimumSize">
<size>
<width>100</width>
<height>45</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>45</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(117, 80, 123, 0.9);
color: rgb(0, 0, 0);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);
outline: none;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/reboot-hot.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
</layout>
@ -2641,6 +2685,19 @@ background-color: rgba(0, 0, 0, 0);</string>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButtonPlayerPrevAlbum">
<property name="sizePolicy">
@ -2651,13 +2708,13 @@ background-color: rgba(0, 0, 0, 0);</string>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<width>90</width>
<height>16777215</height>
</size>
</property>
@ -2680,6 +2737,19 @@ background-color: rgba(0, 0, 0, 0);</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButtonPlayerPrevBig">
<property name="sizePolicy">
@ -2690,13 +2760,13 @@ background-color: rgba(0, 0, 0, 0);</string>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<width>90</width>
<height>16777215</height>
</size>
</property>
@ -2719,6 +2789,19 @@ background-color: rgba(0, 0, 0, 0);</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
@ -2919,6 +3002,19 @@ outline: none;</string>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButtonPlayerNextBig">
<property name="sizePolicy">
@ -2929,13 +3025,13 @@ outline: none;</string>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<width>90</width>
<height>16777215</height>
</size>
</property>
@ -2958,6 +3054,19 @@ outline: none;</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButtonPlayerNextAlbum">
<property name="sizePolicy">
@ -2968,13 +3077,13 @@ outline: none;</string>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<width>90</width>
<height>16777215</height>
</size>
</property>
@ -2997,6 +3106,19 @@ outline: none;</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
@ -3556,6 +3678,12 @@ outline: none;</string>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(92, 231, 57);
color: rgb(0, 0, 0);</string>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>3271</height>
<width>963</width>
<height>3125</height>
</rect>
</property>
<property name="sizePolicy">
@ -2206,7 +2206,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
<number>2</number>
</property>
<property name="bottomMargin">
<number>9</number>
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="btsettings">
@ -2333,84 +2333,10 @@ outline: none;</string>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoxWifiClient">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Wifi client settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_35">
<property name="topMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<widget class="QWidget" name="wificlient" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QFormLayout" name="formLayout_34">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="labelWifiClientSSID">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Used SSID:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditWifiClientSSID">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="maximumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
<height>16777215</height>
</size>
</property>
</widget>
@ -2426,301 +2352,339 @@ outline: none;</string>
<property name="title">
<string>Networking</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QRadioButton" name="radioButton_3">
<property name="text">
<string>No wifi network</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>wifi client</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>wifi hotspot</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoxWifiHotspot">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Hotspot settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_36">
<layout class="QGridLayout" name="gridLayout">
<property name="topMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>9</number>
<number>2</number>
</property>
<item>
<widget class="QWidget" name="wifihotspot" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="0" column="0">
<layout class="QFormLayout" name="formLayout_10">
<property name="topMargin">
<number>2</number>
</property>
<layout class="QFormLayout" name="formLayout_28">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBoxHotspot">
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QWidget" name="formWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QFormLayout" name="formLayout_5">
<property name="topMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/ico_info.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelWifiHotspotNote">
<property name="font">
<font>
<pointsize>10</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>If enabled Hotspot will start on boot and Start/Stop buttons will work.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelWifiHotspotSSID">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>35</height>
</size>
</property>
<property name="text">
<string>Used SSID:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="pushButtonHotspotStart">
<property name="minimumSize">
<size>
<width>100</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(78, 154, 6);
<property name="bottomMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_ipeth0">
<property name="minimumSize">
<size>
<width>130</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>130</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>IP-Address (eth0)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_eth0">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="WifiButtonArea">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="pushButtonHotspotStart">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(78, 154, 6);
outline: none;</string>
</property>
<property name="text">
<string>Start</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelHotspotStart">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="text">
<string>Start hotspot mode now. This will exit client mode.</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QPushButton" name="pushButtonHotspotStop">
<property name="minimumSize">
<size>
<width>100</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(164, 0, 0);
</property>
<property name="text">
<string>Switch to Hotspot Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonHotspotStop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(164, 0, 0);
outline: none;</string>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="labelHotspotStop">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="text">
<string>Stop hotspot mode now. This will exit hotspot and reenable wifi client mode.</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="lineEditWifiHotspotSSID">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_20">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/ico_info.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_19">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>35</height>
</size>
</property>
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>The default password is 1234567890 - Change it in /boot/crankshaft/crankshaft_env.sh!</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</property>
<property name="text">
<string>Switch to Client Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_modeswitchprogress">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(32, 74, 135);</string>
</property>
<property name="text">
<string>Mode switch in progress ...</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QFormLayout" name="formLayout_9">
<property name="topMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_ipwlan0">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>IP-Address (wlan0)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_wlan0">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelWifiClientSSID">
<property name="minimumSize">
<size>
<width>140</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Used SSID:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditWifiSSID">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_wifimode">
<property name="minimumSize">
<size>
<width>140</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Wifi Mode</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_wifimode">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_23">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>140</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>140</width>
<height>36</height>
</size>
</property>
<property name="text">
<string>Enable Hotspot</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxHotspot">
<property name="text">
<string>Yes</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>

View File

@ -97,8 +97,9 @@ int main(int argc, char* argv[])
mainWindow.setWindowFlags(Qt::WindowStaysOnTopHint);
autoapp::ui::SettingsWindow settingsWindow(configuration);
settingsWindow.setFixedSize(width, height);
settingsWindow.setWindowFlags(Qt::WindowStaysOnTopHint);
//settingsWindow.showFullScreen();
settingsWindow.setFixedSize(width, height);
settingsWindow.adjustSize();
autoapp::configuration::RecentAddressesList recentAddressesList(7);