add stacked widget
This commit is contained in:
parent
da5c247339
commit
25c3c5171c
@ -124,6 +124,8 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
||||
connect(ui_->pushButtonAndroidAuto2, &QPushButton::clicked, this, &MainWindow::TriggerAppStart);
|
||||
connect(ui_->pushButtonAndroidAuto2, &QPushButton::clicked, this, &MainWindow::setRetryUSBConnect);
|
||||
|
||||
|
||||
|
||||
ui_->radioView->hide();
|
||||
|
||||
ui_->clockOnlyWidget->hide();
|
||||
@ -440,20 +442,17 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
||||
// clock viibility by settings
|
||||
if (!configuration->showClock()) {
|
||||
ui_->Digital_clock->hide();
|
||||
ui_->bigClock->hide();
|
||||
this->NoClock = true;
|
||||
} else {
|
||||
this->NoClock = false;
|
||||
if (this->UseBigClock) {
|
||||
//ui_->oldmenuDummy->hide();
|
||||
ui_->bigClock->show();
|
||||
if (oldGUIStyle) {
|
||||
ui_->Digital_clock->hide();
|
||||
}
|
||||
} else {
|
||||
//ui_->oldmenuDummy->show();
|
||||
ui_->Digital_clock->show();
|
||||
ui_->bigClock->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -902,10 +901,8 @@ void f1x::openauto::autoapp::ui::MainWindow::toggleGUI()
|
||||
if (!this->NoClock) {
|
||||
if (UseBigClock) {
|
||||
ui_->Digital_clock->hide();
|
||||
ui_->bigClock->show();
|
||||
} else {
|
||||
ui_->Digital_clock->show();
|
||||
ui_->bigClock->hide();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -995,8 +992,6 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
||||
this->date_text=date.toString("MM/dd");
|
||||
|
||||
ui_->Digital_clock->setText(time_text);
|
||||
ui_->bigClock->setText(time_text);
|
||||
ui_->bigClock2->setText(time_text);
|
||||
|
||||
if (!this->holidaybg) {
|
||||
if (this->date_text == "12/24") {
|
||||
@ -1023,7 +1018,7 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
||||
ui_->btDevice->show();
|
||||
}
|
||||
if (std::ifstream("/tmp/btnowplaying")) {
|
||||
ui_->btNowPlaying->show();
|
||||
ui_->stackedWidget->setCurrentIndex(0);
|
||||
using namespace std;
|
||||
ifstream inFile;
|
||||
string line;
|
||||
@ -1038,7 +1033,7 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
||||
}
|
||||
}
|
||||
else {
|
||||
ui_->btNowPlaying->hide();
|
||||
ui_->stackedWidget->setCurrentIndex(1);
|
||||
ui_->btSongName->setText("");
|
||||
ui_->btArtistName->setText("");
|
||||
ui_->btAlbumName->setText("");
|
||||
@ -1952,20 +1947,17 @@ void f1x::openauto::autoapp::ui::MainWindow::tmpChanged()
|
||||
if (!this->configuration_->showClock()) {
|
||||
ui_->Digital_clock->hide();
|
||||
//ui_->oldmenuDummy->show();
|
||||
ui_->bigClock->hide();
|
||||
this->NoClock = true;
|
||||
} else {
|
||||
this->NoClock = false;
|
||||
if (this->UseBigClock && ui_->oldmenuWidget->isVisible() == true) {
|
||||
//ui_->oldmenuDummy->hide();
|
||||
ui_->bigClock->show();
|
||||
if (oldGUIStyle) {
|
||||
ui_->Digital_clock->hide();
|
||||
}
|
||||
} else {
|
||||
//ui_->oldmenuDummy->show();
|
||||
ui_->Digital_clock->show();
|
||||
ui_->bigClock->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2892,11 +2892,66 @@ outline: none;</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<widget class="QWidget" name="verticalWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>500</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||
<item alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="btNowPlayingRadioDisplay">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>24</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ABCD,EFGH</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="btNowPlaying" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
@ -2905,14 +2960,14 @@ outline: none;</string>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>800</width>
|
||||
<height>400</height>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>800</width>
|
||||
<height>400</height>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
@ -2953,7 +3008,7 @@ outline: none;</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="verticalWidget" native="true">
|
||||
<widget class="QWidget" name="verticalWidget_3" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
@ -3069,7 +3124,7 @@ outline: none;</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="horizontalWidget" native="true">
|
||||
<widget class="QWidget" name="horizontalWidget_3" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -3136,7 +3191,7 @@ outline: none;</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="horizontalWidget_2" native="true">
|
||||
<widget class="QWidget" name="horizontalWidget_4" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -3207,9 +3262,17 @@ outline: none;</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignLeft">
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<widget class="QWidget" name="radioView" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>450</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -3219,13 +3282,13 @@ outline: none;</string>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>210</height>
|
||||
<height>450</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
<height>450</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
@ -3282,7 +3345,7 @@ outline: none;</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="radioDisplay">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@ -3306,7 +3369,7 @@ outline: none;</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<widget class="QLabel" name="radioPreset">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
@ -3327,10 +3390,10 @@ outline: none;</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="radioSecondLine">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -3355,43 +3418,7 @@ outline: none;</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="QLabel" name="bigClock">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>32</pointsize>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>12:00</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user