Bringup pre5

This commit is contained in:
hawkeyexp 2019-06-10 11:38:47 +02:00
parent bfabfd1822
commit fd5ce7ac07
12 changed files with 582 additions and 180 deletions

BIN
assets/album-hot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 KiB

View File

@ -37,8 +37,7 @@
<file>player-hot.png</file> <file>player-hot.png</file>
<file>coverlogo.png</file> <file>coverlogo.png</file>
<file>black.png</file> <file>black.png</file>
<file>christmas.png</file> <file>album-hot.png</file>
<file>firework.png</file>
<file>Roboto-Regular.ttf</file> <file>Roboto-Regular.ttf</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -81,6 +81,8 @@ public:
void mp3AutoPlay(bool value) override; void mp3AutoPlay(bool value) override;
bool showAutoPlay() const override; bool showAutoPlay() const override;
void showAutoPlay(bool value) override; void showAutoPlay(bool value) override;
bool instantPlay() const override;
void instantPlay(bool value) override;
QString getCSValue(QString searchString) const override; QString getCSValue(QString searchString) const override;
QString readFileContent(QString fileName) const override; QString readFileContent(QString fileName) const override;
@ -139,6 +141,7 @@ private:
int32_t mp3Track_; int32_t mp3Track_;
bool mp3AutoPlay_; bool mp3AutoPlay_;
bool showAutoPlay_; bool showAutoPlay_;
bool instantPlay_;
aasdk::proto::enums::VideoFPS::Enum videoFPS_; aasdk::proto::enums::VideoFPS::Enum videoFPS_;
aasdk::proto::enums::VideoResolution::Enum videoResolution_; aasdk::proto::enums::VideoResolution::Enum videoResolution_;
@ -176,6 +179,7 @@ private:
static const std::string cGeneralMp3TrackKey; static const std::string cGeneralMp3TrackKey;
static const std::string cGeneralMp3AutoPlayKey; static const std::string cGeneralMp3AutoPlayKey;
static const std::string cGeneralShowAutoPlayKey; static const std::string cGeneralShowAutoPlayKey;
static const std::string cGeneralInstantPlayKey;
static const std::string cVideoFPSKey; static const std::string cVideoFPSKey;
static const std::string cVideoResolutionKey; static const std::string cVideoResolutionKey;

View File

@ -85,6 +85,8 @@ public:
virtual void mp3AutoPlay(bool value) = 0; virtual void mp3AutoPlay(bool value) = 0;
virtual bool showAutoPlay() const = 0; virtual bool showAutoPlay() const = 0;
virtual void showAutoPlay(bool value) = 0; virtual void showAutoPlay(bool value) = 0;
virtual bool instantPlay() const = 0;
virtual void instantPlay(bool value) = 0;
virtual QString getCSValue(QString searchString) const = 0; virtual QString getCSValue(QString searchString) const = 0;
virtual QString readFileContent(QString fileName) const = 0; virtual QString readFileContent(QString fileName) const = 0;

View File

@ -163,6 +163,11 @@ private slots:
void hostModeStateChanged(QBluetoothLocalDevice::HostMode); void hostModeStateChanged(QBluetoothLocalDevice::HostMode);
//void on_AlbumCoverListView_clicked(const QModelIndex &index);
void on_AlbumCoverListView_clicked(const QModelIndex &index);
void on_pushButtonAlbum_clicked();
private: private:
Ui::MainWindow* ui_; Ui::MainWindow* ui_;
configuration::IConfiguration::Pointer configuration_; configuration::IConfiguration::Pointer configuration_;

View File

@ -51,6 +51,7 @@ const std::string Configuration::cGeneralMp3SubFolderKey = "General.Mp3SubFolder
const std::string Configuration::cGeneralMp3TrackKey = "General.Mp3Track"; const std::string Configuration::cGeneralMp3TrackKey = "General.Mp3Track";
const std::string Configuration::cGeneralMp3AutoPlayKey = "General.Mp3AutoPlay"; const std::string Configuration::cGeneralMp3AutoPlayKey = "General.Mp3AutoPlay";
const std::string Configuration::cGeneralShowAutoPlayKey = "General.ShowAutoPlay"; const std::string Configuration::cGeneralShowAutoPlayKey = "General.ShowAutoPlay";
const std::string Configuration::cGeneralInstantPlayKey = "General.InstantPlay";
const std::string Configuration::cVideoFPSKey = "Video.FPS"; const std::string Configuration::cVideoFPSKey = "Video.FPS";
const std::string Configuration::cVideoResolutionKey = "Video.Resolution"; const std::string Configuration::cVideoResolutionKey = "Video.Resolution";
@ -116,6 +117,7 @@ void Configuration::load()
mp3Track_ = iniConfig.get<size_t>(cGeneralMp3TrackKey, 0); mp3Track_ = iniConfig.get<size_t>(cGeneralMp3TrackKey, 0);
mp3AutoPlay_ = iniConfig.get<bool>(cGeneralMp3AutoPlayKey, false); mp3AutoPlay_ = iniConfig.get<bool>(cGeneralMp3AutoPlayKey, false);
showAutoPlay_ = iniConfig.get<bool>(cGeneralShowAutoPlayKey, false); showAutoPlay_ = iniConfig.get<bool>(cGeneralShowAutoPlayKey, false);
instantPlay_ = iniConfig.get<bool>(cGeneralInstantPlayKey, false);
videoFPS_ = static_cast<aasdk::proto::enums::VideoFPS::Enum>(iniConfig.get<uint32_t>(cVideoFPSKey, videoFPS_ = static_cast<aasdk::proto::enums::VideoFPS::Enum>(iniConfig.get<uint32_t>(cVideoFPSKey,
aasdk::proto::enums::VideoFPS::_30)); aasdk::proto::enums::VideoFPS::_30));
@ -167,6 +169,7 @@ void Configuration::reset()
mp3Track_ = 0; mp3Track_ = 0;
mp3AutoPlay_ = false; mp3AutoPlay_ = false;
showAutoPlay_ = false; showAutoPlay_ = false;
instantPlay_ = false;
videoFPS_ = aasdk::proto::enums::VideoFPS::_30; videoFPS_ = aasdk::proto::enums::VideoFPS::_30;
videoResolution_ = aasdk::proto::enums::VideoResolution::_480p; videoResolution_ = aasdk::proto::enums::VideoResolution::_480p;
screenDPI_ = 140; screenDPI_ = 140;
@ -203,6 +206,7 @@ void Configuration::save()
iniConfig.put<int32_t>(cGeneralMp3TrackKey, mp3Track_); iniConfig.put<int32_t>(cGeneralMp3TrackKey, mp3Track_);
iniConfig.put<bool>(cGeneralMp3AutoPlayKey, mp3AutoPlay_); iniConfig.put<bool>(cGeneralMp3AutoPlayKey, mp3AutoPlay_);
iniConfig.put<bool>(cGeneralShowAutoPlayKey, showAutoPlay_); iniConfig.put<bool>(cGeneralShowAutoPlayKey, showAutoPlay_);
iniConfig.put<bool>(cGeneralInstantPlayKey, instantPlay_);
iniConfig.put<uint32_t>(cVideoFPSKey, static_cast<uint32_t>(videoFPS_)); iniConfig.put<uint32_t>(cVideoFPSKey, static_cast<uint32_t>(videoFPS_));
iniConfig.put<uint32_t>(cVideoResolutionKey, static_cast<uint32_t>(videoResolution_)); iniConfig.put<uint32_t>(cVideoResolutionKey, static_cast<uint32_t>(videoResolution_));
@ -413,6 +417,16 @@ bool Configuration::showAutoPlay() const
return showAutoPlay_; return showAutoPlay_;
} }
void Configuration::instantPlay(bool value)
{
instantPlay_ = value;
}
bool Configuration::instantPlay() const
{
return instantPlay_;
}
aasdk::proto::enums::VideoFPS::Enum Configuration::getVideoFPS() const aasdk::proto::enums::VideoFPS::Enum Configuration::getVideoFPS() const
{ {
return videoFPS_; return videoFPS_;

View File

@ -31,6 +31,7 @@
#include <QRect> #include <QRect>
#include <QVideoWidget> #include <QVideoWidget>
#include <QNetworkInterface> #include <QNetworkInterface>
#include <QStandardItemModel>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <cstdio> #include <cstdio>
@ -526,6 +527,8 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
ui_->labelFolderpath->hide(); ui_->labelFolderpath->hide();
ui_->labelAlbumpath->hide(); ui_->labelAlbumpath->hide();
ui_->comboBoxAlbum->hide();
ui_->pushButtonAlbum->hide();
MainWindow::scanFolders(); MainWindow::scanFolders();
ui_->comboBoxAlbum->setCurrentText(QString::fromStdString(configuration->getMp3SubFolder())); ui_->comboBoxAlbum->setCurrentText(QString::fromStdString(configuration->getMp3SubFolder()));
@ -910,8 +913,20 @@ void f1x::openauto::autoapp::ui::MainWindow::playerShow()
ui_->VolumeSliderControl->hide(); ui_->VolumeSliderControl->hide();
ui_->BrightnessSliderControl->hide(); ui_->BrightnessSliderControl->hide();
ui_->networkInfo->hide(); ui_->networkInfo->hide();
ui_->Info->hide();
ui_->horizontalSliderProgressPlayer->hide();
ui_->VolumeSliderControlPlayer->hide();
if (player->state() == QMediaPlayer::PlayingState) { if (player->state() == QMediaPlayer::PlayingState) {
on_pushButtonBackToPlayer_clicked(); on_pushButtonBackToPlayer_clicked();
ui_->Info->show();
ui_->horizontalSliderProgressPlayer->show();
ui_->VolumeSliderControlPlayer->show();
ui_->pushButtonPlayerPlayList->hide();
}
if (ui_->mp3List->isVisible() == true) {
ui_->pushButtonPlayerPlayList->show();
} else {
ui_->pushButtonPlayerPlayList->hide();
} }
} }
@ -994,11 +1009,11 @@ void f1x::openauto::autoapp::ui::MainWindow::toggleGUI()
void f1x::openauto::autoapp::ui::MainWindow::updateBG() void f1x::openauto::autoapp::ui::MainWindow::updateBG()
{ {
if (this->date_text == "12/24") { if (this->date_text == "12/24") {
this->setStyleSheet("QMainWindow { background: url(:/christmas.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/wallpaper-christmas.png); background-repeat: no-repeat; background-position: center; }");
this->holidaybg = true; this->holidaybg = true;
} }
else if (this->date_text == "12/31") { else if (this->date_text == "12/31") {
this->setStyleSheet("QMainWindow { background: url(:/firework.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/wallpaper-firework.png); background-repeat: no-repeat; background-position: center; }");
this->holidaybg = true; this->holidaybg = true;
} }
if (!this->nightModeEnabled) { if (!this->nightModeEnabled) {
@ -1006,20 +1021,20 @@ void f1x::openauto::autoapp::ui::MainWindow::updateBG()
if (this->wallpaperEQFileExists) { if (this->wallpaperEQFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-eq.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(wallpaper-eq.png); background-repeat: no-repeat; background-position: center; }");
} else { } else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: repeat; background-position: center; }");
} }
} else { } else {
if (this->oldGUIStyle) { if (this->oldGUIStyle) {
if (this->wallpaperClassicDayFileExists) { if (this->wallpaperClassicDayFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }");
} else { } else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: repeat; background-position: center; }");
} }
} else { } else {
if (this->wallpaperDayFileExists) { if (this->wallpaperDayFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }");
} else { } else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: repeat; background-position: center; }");
} }
} }
} }
@ -1028,20 +1043,20 @@ void f1x::openauto::autoapp::ui::MainWindow::updateBG()
if (this->wallpaperEQFileExists) { if (this->wallpaperEQFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-eq.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(wallpaper-eq.png); background-repeat: no-repeat; background-position: center; }");
} else { } else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: repeat; background-position: center; }");
} }
} else { } else {
if (this->oldGUIStyle) { if (this->oldGUIStyle) {
if (this->wallpaperClassicNightFileExists) { if (this->wallpaperClassicNightFileExists) {
this->setStyleSheet( "QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet( "QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }");
} else { } else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: repeat; background-position: center; }");
} }
} else { } else {
if (this->wallpaperNightFileExists) { if (this->wallpaperNightFileExists) {
this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png) stretch stretch; background-repeat: no-repeat; background-position: center; }");
} else { } else {
this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }"); this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: repeat; background-position: center; }");
} }
} }
} }
@ -1137,6 +1152,11 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonList_clicked()
ui_->PlayerPlayingWidget->hide(); ui_->PlayerPlayingWidget->hide();
ui_->pushButtonList->hide(); ui_->pushButtonList->hide();
ui_->pushButtonPlayerPlayList->show(); ui_->pushButtonPlayerPlayList->show();
ui_->Info->hide();
ui_->horizontalSliderProgressPlayer->hide();
ui_->mp3List->show();
ui_->AlbumCoverListView->hide();
if (playlist->currentIndex() == -1) { if (playlist->currentIndex() == -1) {
ui_->pushButtonPlayerStop->hide(); ui_->pushButtonPlayerStop->hide();
@ -1163,6 +1183,13 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerStop_clicked()
ui_->playerPositionTime->setText("00:00 / 00:00"); ui_->playerPositionTime->setText("00:00 / 00:00");
ui_->labelCurrentPlaying->setText(""); ui_->labelCurrentPlaying->setText("");
ui_->labelTrack->setText(""); ui_->labelTrack->setText("");
ui_->Info->hide();
ui_->horizontalSliderProgressPlayer->hide();
ui_->mp3List->show();
ui_->AlbumCoverListView->hide();
ui_->pushButtonAlbum->show();
ui_->VolumeSliderControlPlayer->hide();
} }
void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerPause_clicked() void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerPause_clicked()
@ -1298,14 +1325,23 @@ void f1x::openauto::autoapp::ui::MainWindow::metaDataChanged()
if (playlist->currentIndex() == -1) { if (playlist->currentIndex() == -1) {
// check for folder icon // check for folder icon
QString cover = this->musicfolder + "/" + this->albumfolder + "/folder.png"; QString coverpng = this->musicfolder + "/" + this->albumfolder + "/folder.png";
QString coverjpg = this->musicfolder + "/" + this->albumfolder + "/folder.jpg"; QString coverjpg = this->musicfolder + "/" + this->albumfolder + "/folder.jpg";
if (check_file_exist(cover.toStdString().c_str())) { QString coverpngcs = "/media/USBDRIVES/CSSTORAGE/COVERCACHE/" + this->albumfolder + ".png";
QPixmap img = cover; QString coverjpgcs = "/media/USBDRIVES/CSSTORAGE/COVERCACHE/" + this->albumfolder + ".jpg";
if (check_file_exist(coverpng.toStdString().c_str())) {
QPixmap img = coverpng;
ui_->pushButtonBack->setIcon(img.scaled(270,270,Qt::KeepAspectRatio)); ui_->pushButtonBack->setIcon(img.scaled(270,270,Qt::KeepAspectRatio));
} else if (check_file_exist(coverjpg.toStdString().c_str())) { } else if (check_file_exist(coverjpg.toStdString().c_str())) {
QPixmap img = coverjpg; QPixmap img = coverjpg;
ui_->pushButtonBack->setIcon(img.scaled(270,270,Qt::KeepAspectRatio)); ui_->pushButtonBack->setIcon(img.scaled(270,270,Qt::KeepAspectRatio));
} else if (check_file_exist(coverpngcs.toStdString().c_str())) {
QPixmap img = coverpngcs;
ui_->pushButtonBack->setIcon(img.scaled(270,270,Qt::KeepAspectRatio));
} else if (check_file_exist(coverjpgcs.toStdString().c_str())) {
QPixmap img = coverjpgcs;
ui_->pushButtonBack->setIcon(img.scaled(270,270,Qt::KeepAspectRatio));
} else { } else {
ui_->pushButtonBack->setIcon(QPixmap("://coverlogo.png")); ui_->pushButtonBack->setIcon(QPixmap("://coverlogo.png"));
} }
@ -1337,6 +1373,20 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerPlayList_clicked
ui_->pushButtonPlayerPause->show(); ui_->pushButtonPlayerPause->show();
int currentalbum = ui_->comboBoxAlbum->currentIndex(); int currentalbum = ui_->comboBoxAlbum->currentIndex();
ui_->labelCurrentAlbumIndex->setText(QString::number(currentalbum+1)); ui_->labelCurrentAlbumIndex->setText(QString::number(currentalbum+1));
ui_->Info->show();
ui_->horizontalSliderProgressPlayer->show();
ui_->pushButtonAlbum->hide();
ui_->mp3List->hide();
ui_->AlbumCoverListView->show();
}
void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonAlbum_clicked()
{
ui_->pushButtonList->hide();
ui_->pushButtonAlbum->hide();
ui_->mp3List->hide();
ui_->AlbumCoverListView->show();
ui_->pushButtonPlayerPlayList->hide();
} }
void f1x::openauto::autoapp::ui::MainWindow::on_comboBoxAlbum_currentIndexChanged(const QString &arg1) void f1x::openauto::autoapp::ui::MainWindow::on_comboBoxAlbum_currentIndexChanged(const QString &arg1)
@ -1349,6 +1399,12 @@ void f1x::openauto::autoapp::ui::MainWindow::on_comboBoxAlbum_currentIndexChange
ui_->pushButtonBackToPlayer->hide(); ui_->pushButtonBackToPlayer->hide();
ui_->labelCurrentPlaying->setText(""); ui_->labelCurrentPlaying->setText("");
ui_->playerPositionTime->setText(""); ui_->playerPositionTime->setText("");
if (this->playlist->mediaCount() < 2) {
ui_->pushButtonPlayerPlayList->hide();
} else {
ui_->pushButtonPlayerPlayList->show();
}
} }
void f1x::openauto::autoapp::ui::MainWindow::setTrigger() void f1x::openauto::autoapp::ui::MainWindow::setTrigger()
@ -1387,12 +1443,40 @@ void f1x::openauto::autoapp::ui::MainWindow::scanFolders()
} }
QDir directory(this->musicfolder); QDir directory(this->musicfolder);
QStringList folders = directory.entryList(QStringList() << "*", QDir::AllDirs, QDir::Name); QStringList folders = directory.entryList(QStringList() << "*", QDir::AllDirs, QDir::Name);
QStandardItemModel *model = new QStandardItemModel(this);
foreach (QString foldername, folders) { foreach (QString foldername, folders) {
if (foldername != "..") { if (foldername != ".." and foldername != ".") {
ui_->comboBoxAlbum->addItem(foldername); ui_->comboBoxAlbum->addItem(foldername);
ui_->labelAlbumCount->setText(QString::number(ui_->comboBoxAlbum->count())); ui_->labelAlbumCount->setText(QString::number(ui_->comboBoxAlbum->count()));
QString coverpng = this->musicfolder + "/" + foldername + "/folder.png";
QString coverjpg = this->musicfolder + "/" + foldername + "/folder.jpg";
QString coverpngcs = "/media/USBDRIVES/CSSTORAGE/COVERCACHE/" + foldername + ".png";
QString coverjpgcs = "/media/USBDRIVES/CSSTORAGE/COVERCACHE/" + foldername + ".jpg";
if (check_file_exist(coverpng.toStdString().c_str())) {
QPixmap img = coverpng;
QStandardItem *item = new QStandardItem(QIcon(img.scaled(270,270,Qt::KeepAspectRatio)),foldername);
model->setItem(ui_->comboBoxAlbum->count(),0,item);
} else if (check_file_exist(coverjpg.toStdString().c_str())) {
QPixmap img = coverjpg;
QStandardItem *item = new QStandardItem(QIcon(img.scaled(270,270,Qt::KeepAspectRatio)),foldername);
model->setItem(ui_->comboBoxAlbum->count(),0,item);
} else if (check_file_exist(coverpngcs.toStdString().c_str())) {
QPixmap img = coverpngcs;
QStandardItem *item = new QStandardItem(QIcon(img.scaled(270,270,Qt::KeepAspectRatio)),foldername);
model->setItem(ui_->comboBoxAlbum->count(),0,item);
} else if (check_file_exist(coverjpgcs.toStdString().c_str())) {
QPixmap img = coverjpgcs;
QStandardItem *item = new QStandardItem(QIcon(img.scaled(270,270,Qt::KeepAspectRatio)),foldername);
model->setItem(ui_->comboBoxAlbum->count(),0,item);
} else {
QStandardItem *item = new QStandardItem(QIcon(":/coverlogo.png"),foldername);
model->setItem(ui_->comboBoxAlbum->count(),0,item);
} }
} }
}
ui_->AlbumCoverListView->setModel(model);
this->currentPlaylistIndex = 0; this->currentPlaylistIndex = 0;
ui_->SysinfoTopLeft->hide(); ui_->SysinfoTopLeft->hide();
} }
@ -1400,6 +1484,7 @@ void f1x::openauto::autoapp::ui::MainWindow::scanFolders()
catch(...) { catch(...) {
ui_->SysinfoTopLeft->hide(); ui_->SysinfoTopLeft->hide();
} }
ui_->mp3List->hide();
} }
void f1x::openauto::autoapp::ui::MainWindow::scanFiles() void f1x::openauto::autoapp::ui::MainWindow::scanFiles()
@ -1454,6 +1539,10 @@ void f1x::openauto::autoapp::ui::MainWindow::on_mp3List_currentRowChanged(int cu
{ {
ui_->labelFolderpath->setText(QString::number(currentRow)); ui_->labelFolderpath->setText(QString::number(currentRow));
this->currentPlaylistIndex = currentRow; this->currentPlaylistIndex = currentRow;
if (configuration_->instantPlay()) {
MainWindow::on_pushButtonPlayerPlayList_clicked();
}
} }
void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerNextBig_clicked() void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerNextBig_clicked()
@ -1498,6 +1587,7 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerPrevAlbum_clicke
ui_->pushButtonList->show(); ui_->pushButtonList->show();
ui_->pushButtonPlayerPause->show(); ui_->pushButtonPlayerPause->show();
ui_->pushButtonPlayerStop->show(); ui_->pushButtonPlayerStop->show();
ui_->pushButtonPlayerPlayList->hide();
} }
} }
@ -1521,6 +1611,7 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonPlayerNextAlbum_clicke
ui_->pushButtonList->show(); ui_->pushButtonList->show();
ui_->pushButtonPlayerPause->show(); ui_->pushButtonPlayerPause->show();
ui_->pushButtonPlayerStop->show(); ui_->pushButtonPlayerStop->show();
ui_->pushButtonPlayerPlayList->hide();
} }
} }
@ -1533,6 +1624,8 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonBackToPlayer_clicked()
ui_->pushButtonList->show(); ui_->pushButtonList->show();
ui_->pushButtonPlayerPause->show(); ui_->pushButtonPlayerPause->show();
ui_->pushButtonPlayerStop->show(); ui_->pushButtonPlayerStop->show();
ui_->Info->show();
ui_->horizontalSliderProgressPlayer->show();
} }
void f1x::openauto::autoapp::ui::MainWindow::on_StateChanged(QMediaPlayer::State state) void f1x::openauto::autoapp::ui::MainWindow::on_StateChanged(QMediaPlayer::State state)
@ -1596,6 +1689,23 @@ void f1x::openauto::autoapp::ui::MainWindow::KeyPress(QString key)
} }
} }
void f1x::openauto::autoapp::ui::MainWindow::on_AlbumCoverListView_clicked(const QModelIndex &index)
{
QString foldertext = index.data(Qt::DisplayRole).toString();
ui_->labelAlbumpath->setText(foldertext);
ui_->comboBoxAlbum->setCurrentIndex(ui_->comboBoxAlbum->findText(foldertext));
ui_->mp3List->show();
ui_->AlbumCoverListView->hide();
ui_->pushButtonList->hide();
ui_->pushButtonAlbum->show();
ui_->pushButtonPlayerPlayList->show();
if (ui_->mp3selectWidget->isVisible() == false) {
MainWindow::on_pushButtonPlayerPlayList_clicked();
}
}
void f1x::openauto::autoapp::ui::MainWindow::tmpChanged() void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
{ {
try { try {
@ -2039,3 +2149,4 @@ void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
} }
updateNetworkInfo(); updateNetworkInfo();
} }

View File

@ -208,6 +208,7 @@ void SettingsWindow::onSave()
configuration_->showNetworkinfo(ui_->checkBoxNetworkinfo->isChecked()); configuration_->showNetworkinfo(ui_->checkBoxNetworkinfo->isChecked());
configuration_->mp3AutoPlay(ui_->checkBoxAutoPlay->isChecked()); configuration_->mp3AutoPlay(ui_->checkBoxAutoPlay->isChecked());
configuration_->showAutoPlay(ui_->checkBoxShowPlayer->isChecked()); configuration_->showAutoPlay(ui_->checkBoxShowPlayer->isChecked());
configuration_->instantPlay(ui_->checkBoxInstantPlay->isChecked());
configuration_->hideWarning(ui_->checkBoxDontShowAgain->isChecked()); configuration_->hideWarning(ui_->checkBoxDontShowAgain->isChecked());
configuration_->setVideoFPS(ui_->radioButton30FPS->isChecked() ? aasdk::proto::enums::VideoFPS::_30 : aasdk::proto::enums::VideoFPS::_60); configuration_->setVideoFPS(ui_->radioButton30FPS->isChecked() ? aasdk::proto::enums::VideoFPS::_30 : aasdk::proto::enums::VideoFPS::_60);
@ -498,6 +499,7 @@ void SettingsWindow::load()
ui_->checkBoxNetworkinfo->setChecked(configuration_->showNetworkinfo()); ui_->checkBoxNetworkinfo->setChecked(configuration_->showNetworkinfo());
ui_->checkBoxAutoPlay->setChecked(configuration_->mp3AutoPlay()); ui_->checkBoxAutoPlay->setChecked(configuration_->mp3AutoPlay());
ui_->checkBoxShowPlayer->setChecked(configuration_->showAutoPlay()); ui_->checkBoxShowPlayer->setChecked(configuration_->showAutoPlay());
ui_->checkBoxInstantPlay->setChecked(configuration_->instantPlay());
ui_->checkBoxDontShowAgain->setChecked(configuration_->hideWarning()); ui_->checkBoxDontShowAgain->setChecked(configuration_->hideWarning());
ui_->radioButton30FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_30); ui_->radioButton30FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_30);
@ -887,6 +889,7 @@ void SettingsWindow::loadSystemValues()
ui_->comboBoxTZ->setCurrentText(configuration_->readFileContent("/etc/timezone")); ui_->comboBoxTZ->setCurrentText(configuration_->readFileContent("/etc/timezone"));
} else { } else {
ui_->comboBoxHardwareRTC->setCurrentText("none"); ui_->comboBoxHardwareRTC->setCurrentText("none");
ui_->comboBoxTZ->setCurrentText(configuration_->readFileContent("/etc/timezone"));
} }
// set dac // set dac

View File

@ -970,6 +970,13 @@ outline: none;</string>
<height>24</height> <height>24</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">border: no-border;</string> <string notr="true">border: no-border;</string>
</property> </property>
@ -1008,6 +1015,7 @@ outline: none;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -1032,6 +1040,7 @@ border: no-border;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -1110,6 +1119,7 @@ border: no-border;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -1146,6 +1156,7 @@ border: no-border;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -1224,6 +1235,7 @@ border: no-border;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -1260,6 +1272,7 @@ border: no-border;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -1332,6 +1345,7 @@ border: no-border;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -1362,6 +1376,7 @@ border: no-border;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -4093,6 +4108,74 @@ border: 2px solid rgba(255,255,255,0.5);</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QListView" name="AlbumCoverListView">
<property name="font">
<font>
<pointsize>8</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">QScrollBar {
width: 60px;
background-color: rgba(85, 87, 83, 0.7);
}</string>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="autoScroll">
<bool>false</bool>
</property>
<property name="autoScrollMargin">
<number>0</number>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::IgnoreAction</enum>
</property>
<property name="iconSize">
<size>
<width>160</width>
<height>160</height>
</size>
</property>
<property name="movement">
<enum>QListView::Static</enum>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="layoutMode">
<enum>QListView::Batched</enum>
</property>
<property name="spacing">
<number>0</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="itemAlignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item> <item>
<widget class="QListWidget" name="mp3List"> <widget class="QListWidget" name="mp3List">
<property name="font"> <property name="font">
@ -4110,15 +4193,23 @@ border: 2px solid rgba(255,255,255,0.5);</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QScrollBar { <string notr="true">QScrollBar {
width: 40px; width: 60px;
background-color: rgba(85, 87, 83, 0.7); background-color: rgba(85, 87, 83, 0.7);
} }
QWidget { QWidget {
background-color: rgba(85, 87, 83, 0.7); background-color: rgba(85, 87, 83, 0.7);
color: rgb(255, 255, 255); color: rgb(255, 255, 255);
border: 2px solid rgba(255,255,255,0.5);
outline: none; outline: none;
}
QListView::item {
height: 50px;
}
QListView::item::selected {
background-color: rgb(32, 74, 135);
height: 50px;
}</string> }</string>
</property> </property>
<property name="frameShape"> <property name="frameShape">
@ -4133,8 +4224,23 @@ outline: none;
<property name="sizeAdjustPolicy"> <property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum> <enum>QAbstractScrollArea::AdjustToContents</enum>
</property> </property>
<property name="autoScroll">
<bool>false</bool>
</property>
<property name="autoScrollMargin"> <property name="autoScrollMargin">
<number>16</number> <number>0</number>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::IgnoreAction</enum>
</property> </property>
<property name="alternatingRowColors"> <property name="alternatingRowColors">
<bool>false</bool> <bool>false</bool>
@ -4142,6 +4248,15 @@ outline: none;
<property name="selectionMode"> <property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum> <enum>QAbstractItemView::SingleSelection</enum>
</property> </property>
<property name="iconSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="textElideMode">
<enum>Qt::ElideMiddle</enum>
</property>
<property name="movement"> <property name="movement">
<enum>QListView::Static</enum> <enum>QListView::Static</enum>
</property> </property>
@ -4154,15 +4269,49 @@ outline: none;
<property name="layoutMode"> <property name="layoutMode">
<enum>QListView::SinglePass</enum> <enum>QListView::SinglePass</enum>
</property> </property>
<property name="spacing">
<number>0</number>
</property>
<property name="gridSize"> <property name="gridSize">
<size> <size>
<width>0</width> <width>0</width>
<height>40</height> <height>60</height>
</size> </size>
</property> </property>
<property name="viewMode"> <property name="viewMode">
<enum>QListView::ListMode</enum> <enum>QListView::ListMode</enum>
</property> </property>
<property name="itemAlignment">
<set>Qt::AlignCenter</set>
</property>
<property name="currentRow">
<number>-1</number>
</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>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -5134,6 +5283,49 @@ outline: none;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="pushButtonAlbum">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(186, 189, 182, 0.7);
border-radius: 4px;
border: 2px solid rgba(255,255,255,0.5);
color: rgb(255, 255, 255);
outline: none;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/album-hot.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
<item> <item>
<widget class="QPushButton" name="pushButtonPlayerPlayList"> <widget class="QPushButton" name="pushButtonPlayerPlayList">
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>968</width> <width>800</width>
<height>3602</height> <height>3594</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -572,6 +572,27 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QWidget" name="horizontalWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_38">
<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> <item>
<widget class="QGroupBox" name="groupBoxSliderDay"> <widget class="QGroupBox" name="groupBoxSliderDay">
<property name="sizePolicy"> <property name="sizePolicy">
@ -587,9 +608,15 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>4</number> <number>4</number>
</property> </property>
@ -666,13 +693,13 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
</property> </property>
<layout class="QFormLayout" name="formLayout_17"> <layout class="QFormLayout" name="formLayout_17">
<property name="leftMargin"> <property name="leftMargin">
<number>9</number> <number>6</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>9</number> <number>6</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>4</number> <number>4</number>
@ -737,6 +764,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
</layout> </layout>
</widget> </widget>
</item> </item>
</layout>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBoxMediaPlayer"> <widget class="QGroupBox" name="groupBoxMediaPlayer">
<property name="sizePolicy"> <property name="sizePolicy">
@ -748,12 +778,15 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
<property name="title"> <property name="title">
<string>Media player defaults</string> <string>Media player defaults</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_13"> <layout class="QVBoxLayout" name="verticalLayout_14">
<property name="spacing">
<number>2</number>
</property>
<property name="topMargin"> <property name="topMargin">
<number>2</number> <number>2</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>2</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QWidget" name="formWidget_3" native="true"> <widget class="QWidget" name="formWidget_3" native="true">
@ -786,12 +819,12 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>120</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>auto play</string> <string>Auto play</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -808,28 +841,67 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0">
</widget> <widget class="QCheckBox" name="checkBoxInstantPlay">
</item>
<item>
<widget class="QCheckBox" name="checkBoxShowPlayer">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>240</width> <width>120</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>Show player window on auto play</string> <string>Instant play</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1">
<widget class="QLabel" name="label_InstantPlay">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Instant play track on select / Instant play full album on select</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBoxShowPlayer">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Show player</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_ShowPlayer">
<property name="text">
<string>Start openauto with player window</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>