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,87 +27,62 @@
<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">
<widget class="QStackedWidget" name="swProfile">
<property name="currentIndex">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="vlLoading">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="vsLoading2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labProfileLoading">
<property name="text">
<string>Loading file %1 of %2 files</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="pbPictureLoading">
<property name="value">
<number>0</number>
</property>
<property name="textVisible">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="vsLoading1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QScrollArea" name="saProfile">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="saProfileContent">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>398</width>
<height>121</height>
</rect>
</property>
<layout class="QVBoxLayout" name="vlProfile">
<widget class="QWidget" name="pageLoading">
<layout class="QVBoxLayout" name="vlLoadingPage">
<item>
<spacer name="vsLoading1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labProfileLoading">
<property name="text">
<string>Loading file %1 of %2 files</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="pbPictureLoading">
<property name="value">
<number>0</number>
</property>
<property name="textVisible">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="vsLoading2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageProfile">
<layout class="QVBoxLayout" name="vlProfilePage">
<property name="leftMargin">
<number>0</number>
</property>
@ -121,17 +96,48 @@
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="vlContent">
<property name="spacing">
<number>0</number>
<widget class="QScrollArea" name="saProfile">
<property name="widgetResizable">
<bool>true</bool>
</property>
<item>
<layout class="QVBoxLayout" name="vlSavegame"/>
</item>
<item>
<layout class="QVBoxLayout" name="vlSnapmatic"/>
</item>
</layout>
<widget class="QWidget" name="saProfileContent">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>398</width>
<height>251</height>
</rect>
</property>
<layout class="QVBoxLayout" name="vlProfile">
<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>
<layout class="QVBoxLayout" name="vlContent">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="vlSavegame"/>
</item>
<item>
<layout class="QVBoxLayout" name="vlSnapmatic"/>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>