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

View file

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