Add sdoc / Add display wake lock while playing media
This commit is contained in:
parent
d1a30439c6
commit
28180b6efa
@ -134,6 +134,7 @@ private slots:
|
|||||||
void on_pushButtonBackToPlayer_clicked();
|
void on_pushButtonBackToPlayer_clicked();
|
||||||
void on_comboBoxAlbum_currentIndexChanged(const QString &arg1);
|
void on_comboBoxAlbum_currentIndexChanged(const QString &arg1);
|
||||||
void on_mp3List_currentRowChanged(int currentRow);
|
void on_mp3List_currentRowChanged(int currentRow);
|
||||||
|
void on_StateChanged(QMediaPlayer::State state);
|
||||||
void scanFolders();
|
void scanFolders();
|
||||||
void scanFiles();
|
void scanFiles();
|
||||||
|
|
||||||
|
@ -556,6 +556,7 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
|||||||
connect(player, &QMediaPlayer::positionChanged, this, &MainWindow::on_positionChanged);
|
connect(player, &QMediaPlayer::positionChanged, this, &MainWindow::on_positionChanged);
|
||||||
connect(player, &QMediaPlayer::durationChanged, this, &MainWindow::on_durationChanged);
|
connect(player, &QMediaPlayer::durationChanged, this, &MainWindow::on_durationChanged);
|
||||||
connect(player, &QMediaPlayer::metaDataAvailableChanged, this, &MainWindow::metaDataChanged);
|
connect(player, &QMediaPlayer::metaDataAvailableChanged, this, &MainWindow::metaDataChanged);
|
||||||
|
connect(player, &QMediaPlayer::stateChanged, this, &MainWindow::on_StateChanged);
|
||||||
|
|
||||||
ui_->pushButtonList->hide();
|
ui_->pushButtonList->hide();
|
||||||
ui_->pushButtonBackToPlayer->hide();
|
ui_->pushButtonBackToPlayer->hide();
|
||||||
@ -1556,3 +1557,12 @@ void f1x::openauto::autoapp::ui::MainWindow::on_pushButtonBackToPlayer_clicked()
|
|||||||
ui_->pushButtonList->show();
|
ui_->pushButtonList->show();
|
||||||
ui_->pushButtonUSB->hide();
|
ui_->pushButtonUSB->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void f1x::openauto::autoapp::ui::MainWindow::on_StateChanged(QMediaPlayer::State state)
|
||||||
|
{
|
||||||
|
if (state == QMediaPlayer::StoppedState || state == QMediaPlayer::PausedState) {
|
||||||
|
system("rm -f /tmp/media_playing");
|
||||||
|
} else {
|
||||||
|
system("touch /tmp/media_playing");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -74,6 +74,7 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
|
|||||||
ui_->tab7->hide();
|
ui_->tab7->hide();
|
||||||
ui_->tab8->hide();
|
ui_->tab8->hide();
|
||||||
ui_->horizontalGroupBox->hide();
|
ui_->horizontalGroupBox->hide();
|
||||||
|
ui_->groupBoxNetworking->hide();
|
||||||
|
|
||||||
QFileInfo devModeFile("/tmp/dev_mode_enabled");
|
QFileInfo devModeFile("/tmp/dev_mode_enabled");
|
||||||
QFileInfo DebugmodeFile("/tmp/usb_debug_mode");
|
QFileInfo DebugmodeFile("/tmp/usb_debug_mode");
|
||||||
@ -264,6 +265,8 @@ void SettingsWindow::onSave()
|
|||||||
params.append("0");
|
params.append("0");
|
||||||
}
|
}
|
||||||
params.append("#");
|
params.append("#");
|
||||||
|
params.append( std::string(ui_->comboBoxSDOC->currentText().split(" ")[0].toStdString()) );
|
||||||
|
params.append("#");
|
||||||
|
|
||||||
system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str());
|
system((std::string("/usr/local/bin/autoapp_helper setparams#") + std::string(params) + std::string(" &") ).c_str());
|
||||||
|
|
||||||
@ -693,6 +696,12 @@ void SettingsWindow::loadSystemValues()
|
|||||||
} else {
|
} else {
|
||||||
ui_->radioButtonUSBDetectDisabled->setChecked(true);
|
ui_->radioButtonUSBDetectDisabled->setChecked(true);
|
||||||
}
|
}
|
||||||
|
// set sdoc
|
||||||
|
if (getparams[40] == "enabled") {
|
||||||
|
ui_->comboBoxSDOC->setCurrentIndex(1);
|
||||||
|
} else {
|
||||||
|
ui_->comboBoxSDOC->setCurrentIndex(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::onShowBindings()
|
void SettingsWindow::onShowBindings()
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>3192</height>
|
<height>3243</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -2421,6 +2421,36 @@ outline: none;</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBoxNetworking">
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBoxWifiHotspot">
|
<widget class="QGroupBox" name="groupBoxWifiHotspot">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -3715,7 +3745,7 @@ subcontrol-position: center left;
|
|||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxGPIO">
|
<widget class="QCheckBox" name="checkBoxGPIO">
|
||||||
@ -4355,7 +4385,7 @@ subcontrol-position: center left;
|
|||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
@ -4874,7 +4904,10 @@ subcontrol-position: center left;
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true">QScrollBar {
|
||||||
|
width: 40px;
|
||||||
|
background-color: rgba(85, 87, 83, 0.7);
|
||||||
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -5562,6 +5595,12 @@ outline: none;</string>
|
|||||||
<string>Hardware Setup</string>
|
<string>Hardware Setup</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_37">
|
<layout class="QVBoxLayout" name="verticalLayout_37">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="hardware">
|
<layout class="QFormLayout" name="hardware">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
@ -6039,6 +6078,81 @@ QComboBox::item:selected {
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="labelHardwareSDOC">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>SDCard OC</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxSDOC">
|
||||||
|
<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>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QScrollBar {
|
||||||
|
width: 40px;
|
||||||
|
background-color: rgba(85, 87, 83, 0.7);
|
||||||
|
}
|
||||||
|
QComboBox::item {
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
QComboBox::item:selected {
|
||||||
|
background-color: rgb(78, 154, 6);
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
height: 32px;
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>disabled</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>enabled (This can cause demaged sdcard - use at your own risk!)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user