latest dev
This commit is contained in:
parent
0703904ca1
commit
3a7e7593ff
@ -37,10 +37,12 @@ private slots:
|
||||
void onConnectionFailed(const QString& message);
|
||||
void onConnectionSucceed(aasdk::tcp::ITCPEndpoint::SocketPointer socket, const std::string& ipAddress);
|
||||
void onRecentAddressClicked(const QModelIndex& index);
|
||||
void onUpdateButtonClicked();
|
||||
|
||||
private:
|
||||
void insertIpAddress(const std::string& ipAddress);
|
||||
void loadRecentList();
|
||||
void loadTempRecentList();
|
||||
void setControlsEnabledStatus(bool status);
|
||||
void connectHandler(const boost::system::error_code& ec, const std::string& ipAddress, aasdk::tcp::ITCPEndpoint::SocketPointer socket);
|
||||
|
||||
|
@ -174,8 +174,7 @@ private:
|
||||
bool c7ButtonForce = false;
|
||||
bool c8ButtonForce = false;
|
||||
|
||||
//int screen_width = 800;
|
||||
//int screen_height = 480;
|
||||
bool hotspotActive = false;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -56,6 +56,8 @@ private slots:
|
||||
void onUpdateSystemVolume(int value);
|
||||
void onUpdateSystemCapture(int value);
|
||||
void setTime();
|
||||
void onStartHotspot();
|
||||
void onStopHotspot();
|
||||
|
||||
private slots:
|
||||
void show_tab1();
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include <QMessageBox>
|
||||
#include <f1x/openauto/autoapp/UI/ConnectDialog.hpp>
|
||||
#include "ui_connectdialog.h"
|
||||
#include <QFileInfo>
|
||||
#include <QTextStream>
|
||||
|
||||
namespace f1x
|
||||
{
|
||||
@ -27,9 +29,14 @@ ConnectDialog::ConnectDialog(boost::asio::io_service& ioService, aasdk::tcp::ITC
|
||||
connect(ui_->listViewRecent, &QListView::clicked, this, &ConnectDialog::onRecentAddressClicked);
|
||||
connect(this, &ConnectDialog::connectionSucceed, this, &ConnectDialog::onConnectionSucceed);
|
||||
connect(this, &ConnectDialog::connectionFailed, this, &ConnectDialog::onConnectionFailed);
|
||||
connect(ui_->pushButtonUpdate, &QPushButton::clicked, this, &ConnectDialog::onUpdateButtonClicked);
|
||||
|
||||
ui_->listViewRecent->setModel(&recentAddressesModel_);
|
||||
this->loadRecentList();
|
||||
loadTempRecentList();
|
||||
|
||||
ui_->progressBarConnect->hide();
|
||||
ui_->lineEditIPAddress->setFocus();
|
||||
}
|
||||
|
||||
ConnectDialog::~ConnectDialog()
|
||||
@ -43,7 +50,7 @@ void ConnectDialog::onConnectButtonClicked()
|
||||
|
||||
const auto& ipAddress = ui_->lineEditIPAddress->text().toStdString();
|
||||
auto socket = std::make_shared<boost::asio::ip::tcp::socket>(ioService_);
|
||||
|
||||
ui_->progressBarConnect->show();
|
||||
try
|
||||
{
|
||||
tcpWrapper_.asyncConnect(*socket, ipAddress, 5277, std::bind(&ConnectDialog::connectHandler, this, std::placeholders::_1, ipAddress, socket));
|
||||
@ -52,6 +59,13 @@ void ConnectDialog::onConnectButtonClicked()
|
||||
{
|
||||
emit connectionFailed(QString(se.what()));
|
||||
}
|
||||
loadTempRecentList();
|
||||
}
|
||||
|
||||
void ConnectDialog::onUpdateButtonClicked()
|
||||
{
|
||||
system("/usr/local/bin/autoapp_helper updaterecent");
|
||||
loadTempRecentList();
|
||||
}
|
||||
|
||||
void ConnectDialog::connectHandler(const boost::system::error_code& ec, const std::string& ipAddress, aasdk::tcp::ITCPEndpoint::SocketPointer socket)
|
||||
@ -69,6 +83,7 @@ void ConnectDialog::connectHandler(const boost::system::error_code& ec, const st
|
||||
|
||||
void ConnectDialog::onConnectionSucceed(aasdk::tcp::ITCPEndpoint::SocketPointer, const std::string& ipAddress)
|
||||
{
|
||||
ui_->progressBarConnect->hide();
|
||||
this->insertIpAddress(ipAddress);
|
||||
this->setControlsEnabledStatus(true);
|
||||
}
|
||||
@ -77,6 +92,7 @@ void ConnectDialog::onConnectionFailed(const QString& message)
|
||||
{
|
||||
this->setControlsEnabledStatus(true);
|
||||
|
||||
ui_->progressBarConnect->hide();
|
||||
QMessageBox errorMessage(QMessageBox::Critical, "Connect error", message, QMessageBox::Ok);
|
||||
errorMessage.setWindowFlags(Qt::WindowStaysOnTopHint);
|
||||
errorMessage.exec();
|
||||
@ -113,6 +129,22 @@ void ConnectDialog::loadRecentList()
|
||||
recentAddressesModel_.setStringList(stringList);
|
||||
}
|
||||
|
||||
void ConnectDialog::loadTempRecentList()
|
||||
{
|
||||
QFileInfo recentFile("/tmp/temp_recent_list");
|
||||
if (recentFile.exists()) {
|
||||
QFile versionFile(QString("/tmp/temp_recent_list"));
|
||||
versionFile.open(QIODevice::ReadOnly);
|
||||
QTextStream data(&versionFile);
|
||||
while (!data.atEnd())
|
||||
{
|
||||
QString ip = data.readLine();
|
||||
ConnectDialog::insertIpAddress(ip.toStdString());
|
||||
}
|
||||
versionFile.close();
|
||||
}
|
||||
}
|
||||
|
||||
void ConnectDialog::insertIpAddress(const std::string& ipAddress)
|
||||
{
|
||||
recentAddressesList_.insertAddress(ipAddress);
|
||||
|
@ -167,6 +167,9 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
||||
connect(ui_->pushButtonWifi, &QPushButton::clicked, this, &MainWindow::openConnectDialog);
|
||||
connect(ui_->pushButtonWifi2, &QPushButton::clicked, this, &MainWindow::openConnectDialog);
|
||||
|
||||
// by default hide bluetooth button on init
|
||||
ui_->pushButtonBluetooth->hide();
|
||||
|
||||
QTimer *timer=new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()),this,SLOT(showTime()));
|
||||
timer->start();
|
||||
@ -213,24 +216,15 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
||||
connect(ui_->pushButtonRecord, &QPushButton::clicked, this, &MainWindow::cameraRecord);
|
||||
connect(ui_->pushButtonSave, &QPushButton::clicked, this, &MainWindow::cameraSave);
|
||||
ui_->pushButtonDummyCamWifi->hide();
|
||||
ui_->pushButtonDummyCamWifi2->hide();
|
||||
} else {
|
||||
ui_->pushButtonCameraShow->hide();
|
||||
ui_->pushButtonCameraShow2->hide();
|
||||
if (this->wifiButtonForce) {
|
||||
ui_->pushButtonDummyCamWifi2->hide();
|
||||
}
|
||||
}
|
||||
|
||||
// show debug button if enabled
|
||||
if (!this->systemDebugmode) {
|
||||
ui_->pushButtonDebug->hide();
|
||||
ui_->pushButtonDebug2->hide();
|
||||
if (this->cameraButtonForce && this->wifiButtonForce) {
|
||||
ui_->pushButtonDummyDebug->hide();
|
||||
}
|
||||
} else {
|
||||
ui_->pushButtonDummyDebug->hide();
|
||||
}
|
||||
|
||||
ui_->systemConfigInProgress->hide();
|
||||
@ -569,9 +563,6 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
||||
// init alpha values
|
||||
ui_->horizontalSliderAlpha->setValue(int(configuration->getAlphaTrans()));
|
||||
MainWindow::on_horizontalSliderAlpha_valueChanged(int(configuration->getAlphaTrans()));
|
||||
|
||||
// bt media controls
|
||||
ui_->btControlWidget->hide();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@ -1058,7 +1049,6 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
||||
ui_->pushButtonDebug2->hide();
|
||||
ui_->pushButtonLock->show();
|
||||
ui_->pushButtonLock2->show();
|
||||
ui_->pushButtonDummyDebug->show();
|
||||
ui_->systemConfigInProgress->show();
|
||||
}
|
||||
if (enablePairingFile.exists()) {
|
||||
@ -1078,7 +1068,6 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
||||
if (this->systemDebugmode) {
|
||||
ui_->pushButtonDebug->show();
|
||||
ui_->pushButtonDebug2->show();
|
||||
ui_->pushButtonDummyDebug->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1143,6 +1132,61 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
||||
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();
|
||||
ui_->pushButtonDummyClassic3->hide();
|
||||
}
|
||||
if (button_count == 2) {
|
||||
ui_->pushButtonDummyClassic1->show();
|
||||
ui_->pushButtonDummyClassic2->hide();
|
||||
ui_->pushButtonDummyClassic3->hide();
|
||||
}
|
||||
if (button_count == 1) {
|
||||
ui_->pushButtonDummyClassic1->show();
|
||||
ui_->pushButtonDummyClassic2->show();
|
||||
ui_->pushButtonDummyClassic3->hide();
|
||||
}
|
||||
if (button_count == 0) {
|
||||
ui_->pushButtonDummyClassic1->show();
|
||||
ui_->pushButtonDummyClassic2->show();
|
||||
ui_->pushButtonDummyClassic3->show();
|
||||
}
|
||||
}
|
||||
ui_->Digital_clock->setText(time_text);
|
||||
ui_->bigClock->setText(time_text);
|
||||
|
@ -55,6 +55,10 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
|
||||
connect(ui_->pushButtonShowBindings, &QPushButton::clicked, this, &SettingsWindow::onShowBindings);
|
||||
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);
|
||||
// menu
|
||||
ui_->tab1->show();
|
||||
@ -697,6 +701,16 @@ void SettingsWindow::onShowBindings()
|
||||
confirmationMessage.exec();
|
||||
}
|
||||
|
||||
void SettingsWindow::onStartHotspot()
|
||||
{
|
||||
system("sudo systemctl start hotspot &");
|
||||
}
|
||||
|
||||
void SettingsWindow::onStopHotspot()
|
||||
{
|
||||
system("sudo systemctl stop hotspot &");
|
||||
}
|
||||
|
||||
void SettingsWindow::show_tab1()
|
||||
{
|
||||
ui_->tab2->hide();
|
||||
|
@ -6,154 +6,302 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>301</width>
|
||||
<height>389</height>
|
||||
<width>500</width>
|
||||
<height>431</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>360</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Connect to device</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBoxIPAddress">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>281</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>IP Address</string>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEditIPAddress">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>261</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBoxRecent">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>80</y>
|
||||
<width>281</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Recent</string>
|
||||
</property>
|
||||
<widget class="QListView" name="listViewRecent">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>261</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="labelHeadUnitServerInfo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>260</y>
|
||||
<width>221</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-style:italic;">In order to use wireless mode you must enable head unit server in developer settings.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="labelCopyrightsInfoIcon">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>290</y>
|
||||
<width>21</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><img src=":/ico_info.png"/></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButtonCancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>340</y>
|
||||
<width>121</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButtonConnect">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>340</y>
|
||||
<width>121</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBarConnect">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>340</y>
|
||||
<width>121</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="labelConnecting">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>188</x>
|
||||
<y>350</y>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Connecting...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<zorder>groupBoxIPAddress</zorder>
|
||||
<zorder>groupBoxRecent</zorder>
|
||||
<zorder>labelHeadUnitServerInfo</zorder>
|
||||
<zorder>labelCopyrightsInfoIcon</zorder>
|
||||
<zorder>pushButtonCancel</zorder>
|
||||
<zorder>progressBarConnect</zorder>
|
||||
<zorder>labelConnecting</zorder>
|
||||
<zorder>pushButtonConnect</zorder>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(46, 52, 54);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxIPAddress">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>IP Address</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditIPAddress">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(85, 87, 83);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="dragEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxRecent">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Recent</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QListView" name="listViewRecent">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(85, 87, 83);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="batchSize">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="formWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelCopyrightsInfoIcon">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><img src=":/ico_info.png"/></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelHeadUnitServerInfo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-style:italic;">In order to use wireless mode you must enable head unit server in developer settings.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</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">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonUpdate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<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: rgba(186, 189, 182, 0.5);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonCancel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<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: rgba(186, 189, 182, 0.5);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonConnect">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
<stylestrategy>PreferDefault</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(186, 189, 182, 0.5);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBarConnect">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(186, 189, 182, 0.5);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>823</width>
|
||||
<height>840</height>
|
||||
<width>800</width>
|
||||
<height>865</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -1133,133 +1133,6 @@ color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="btControlWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButtonBTPlay">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<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(114, 159, 207, 0.01);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Play</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButtonBTPause">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<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(114, 159, 207, 0.01);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pause</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButtonBTPrev">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<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(114, 159, 207, 0.01);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prev</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButtonBTNext">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<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(114, 159, 207, 0.01);
|
||||
border-radius: 4px;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -1837,7 +1710,7 @@ border: 2px solid rgba(255,255,255,0.5);</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonDummyCamWifi2">
|
||||
<widget class="QPushButton" name="pushButtonDummyClassic1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1865,7 +1738,7 @@ border: 2px solid rgba(255,255,255,0.5);</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonDummyDebug">
|
||||
<widget class="QPushButton" name="pushButtonDummyClassic2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1892,6 +1765,28 @@ border: 2px solid rgba(255,255,255,0.5);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonDummyClassic3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>62</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(136, 138, 133, 0.5);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>2925</height>
|
||||
<height>2976</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -1896,7 +1896,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
|
||||
<string notr="true">background-color: rgb(164, 0, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove all paired devices</string>
|
||||
<string>Remove all paired devices now!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -2115,7 +2115,7 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxHotspot">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -2128,6 +2128,9 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
|
||||
</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">
|
||||
@ -2144,13 +2147,71 @@ QSlider::groove:horizontal { background: #6d6d6d; height: 32px;}</string>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>The Hotspot is only available in dev mode and overrides client mode! SSID is fixed.</string>
|
||||
<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="QPushButton" name="pushButtonHotspotStart">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(78, 154, 6);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="pushButtonHotspotStop">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(164, 0, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="labelHotspotStart">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start hotspot mode now. This will exit client mode.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="labelHotspotStop">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stop hotspot mode now. This will exit hotspot and reenable wifi client mode.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -2926,6 +2987,12 @@ subcontrol-position: center left;
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxDisableShutdown">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Disable</string>
|
||||
</property>
|
||||
@ -3053,6 +3120,12 @@ subcontrol-position: center left;
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxDisableScreenOff">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Disable</string>
|
||||
</property>
|
||||
@ -4659,9 +4732,15 @@ subcontrol-origin: margin;
|
||||
subcontrol-position: center left;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="showGroupSeparator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>23</number>
|
||||
</property>
|
||||
<property name="displayIntegerBase">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -106,6 +106,8 @@ int main(int argc, char* argv[])
|
||||
aasdk::tcp::TCPWrapper tcpWrapper;
|
||||
autoapp::ui::ConnectDialog connectDialog(ioService, tcpWrapper, recentAddressesList);
|
||||
connectDialog.setWindowFlags(Qt::WindowStaysOnTopHint);
|
||||
// center dialog
|
||||
connectDialog.move((width - 500)/2,(height-440)/2);
|
||||
|
||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::exit, []() { system("touch /tmp/shutdown"); std::exit(0); });
|
||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::reboot, []() { system("touch /tmp/reboot"); std::exit(0); });
|
||||
@ -203,7 +205,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
mainWindow.showFullScreen();
|
||||
mainWindow.setFixedSize(width, height);
|
||||
//mainWindow.adjustSize();
|
||||
mainWindow.adjustSize();
|
||||
|
||||
aasdk::usb::USBWrapper usbWrapper(usbContext);
|
||||
aasdk::usb::AccessoryModeQueryFactory queryFactory(usbWrapper, ioService);
|
||||
|
Loading…
x
Reference in New Issue
Block a user