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,25 +27,14 @@
<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>
</property>
<layout class="QVBoxLayout" name="vlLoading">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="pageLoading">
<layout class="QVBoxLayout" name="vlLoadingPage">
<item> <item>
<spacer name="vsLoading2"> <spacer name="vsLoading1">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -78,7 +67,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="vsLoading1"> <spacer name="vsLoading2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -92,7 +81,20 @@
</item> </item>
</layout> </layout>
</widget> </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> <item>
<widget class="QScrollArea" name="saProfile"> <widget class="QScrollArea" name="saProfile">
<property name="widgetResizable"> <property name="widgetResizable">
@ -104,7 +106,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>398</width> <width>398</width>
<height>121</height> <height>251</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="vlProfile"> <layout class="QVBoxLayout" name="vlProfile">
@ -137,6 +139,10 @@
</widget> </widget>
</widget> </widget>
</item> </item>
</layout>
</widget>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="hlButtons"> <layout class="QHBoxLayout" name="hlButtons">
<property name="spacing"> <property name="spacing">