ProfileInterface is now build with StackedWidgets

This commit is contained in:
Rafael 2016-03-28 10:57:38 +02:00
parent 3c6aadb35b
commit b280ce1423
2 changed files with 96 additions and 92 deletions

View file

@ -36,7 +36,6 @@ ProfileInterface::ProfileInterface(ProfileDatabase *profileDB, CrewDatabase *cre
ui(new Ui::ProfileInterface)
{
ui->setupUi(this);
ui->saProfile->setVisible(false);
ui->cmdCloseProfile->setEnabled(false);
loadingStr = ui->labProfileLoading->text();
profileFolder = "";
@ -115,8 +114,7 @@ void ProfileInterface::on_profileLoaded()
{
QSpacerItem *saSpacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
ui->saProfileContent->layout()->addItem(saSpacerItem);
ui->saProfile->setVisible(true);
ui->frmLoading->setVisible(false);
ui->swProfile->setCurrentWidget(ui->pageProfile);
ui->cmdCloseProfile->setEnabled(true);
}

View file

@ -27,25 +27,14 @@
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frmLoading">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="vlLoading">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<widget class="QStackedWidget" name="swProfile">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="pageLoading">
<layout class="QVBoxLayout" name="vlLoadingPage">
<item>
<spacer name="vsLoading2">
<spacer name="vsLoading1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -78,7 +67,7 @@
</widget>
</item>
<item>
<spacer name="vsLoading1">
<spacer name="vsLoading2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -92,7 +81,20 @@
</item>
</layout>
</widget>
</item>
<widget class="QWidget" name="pageProfile">
<layout class="QVBoxLayout" name="vlProfilePage">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="saProfile">
<property name="widgetResizable">
@ -104,7 +106,7 @@
<x>0</x>
<y>0</y>
<width>398</width>
<height>121</height>
<height>251</height>
</rect>
</property>
<layout class="QVBoxLayout" name="vlProfile">
@ -137,6 +139,10 @@
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="hlButtons">
<property name="spacing">