remove tab nos needed for mvp

This commit is contained in:
Ronan Le Tiec 2020-04-11 11:17:53 +02:00
parent 80226b7188
commit fbbc3ba479
3 changed files with 34 additions and 7 deletions

View file

@ -36,6 +36,9 @@ PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
InitMenuBar(); InitMenuBar();
InitPropertyTabs();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -75,6 +78,17 @@ void PuzzleMainWindow::InitMenuBar()
} }
//---------------------------------------------------------------------------------------------------------------------
void PuzzleMainWindow::InitPropertyTabs()
{
// for the MVP we don't want the tiles and current layer tabs.
// we remove them. As soon as we need them, delete / update this code
ui->tabWidgetProperties->removeTab(3); // remove layers
ui->tabWidgetProperties->removeTab(2); // remove tiles
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void PuzzleMainWindow::New() void PuzzleMainWindow::New()
{ {

View file

@ -50,6 +50,7 @@ private:
Ui::PuzzleMainWindow *ui; Ui::PuzzleMainWindow *ui;
void InitMenuBar(); void InitMenuBar();
void InitPropertyTabs();
private slots: private slots:
void New(); void New();

View file

@ -45,7 +45,7 @@
<enum>QTabWidget::Rounded</enum> <enum>QTabWidget::Rounded</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -61,6 +61,9 @@
<attribute name="title"> <attribute name="title">
<string/> <string/>
</attribute> </attribute>
<attribute name="toolTip">
<string>Current piece properties</string>
</attribute>
</widget> </widget>
<widget class="QWidget" name="tabLayoutProperty"> <widget class="QWidget" name="tabLayoutProperty">
<attribute name="icon"> <attribute name="icon">
@ -70,6 +73,9 @@
<attribute name="title"> <attribute name="title">
<string/> <string/>
</attribute> </attribute>
<attribute name="toolTip">
<string>Layout properties</string>
</attribute>
</widget> </widget>
<widget class="QWidget" name="tabTilesProperty"> <widget class="QWidget" name="tabTilesProperty">
<attribute name="icon"> <attribute name="icon">
@ -79,6 +85,9 @@
<attribute name="title"> <attribute name="title">
<string/> <string/>
</attribute> </attribute>
<attribute name="toolTip">
<string>Tiles properties</string>
</attribute>
</widget> </widget>
<widget class="QWidget" name="tabLayersProperty"> <widget class="QWidget" name="tabLayersProperty">
<attribute name="icon"> <attribute name="icon">
@ -88,6 +97,9 @@
<attribute name="title"> <attribute name="title">
<string/> <string/>
</attribute> </attribute>
<attribute name="toolTip">
<string>Layers properties</string>
</attribute>
</widget> </widget>
</widget> </widget>
</item> </item>
@ -171,7 +183,7 @@
</widget> </widget>
<action name="actionOpen"> <action name="actionOpen">
<property name="text"> <property name="text">
<string>Open</string> <string>&amp;Open</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+O</string> <string>Ctrl+O</string>
@ -179,7 +191,7 @@
</action> </action>
<action name="actionSave"> <action name="actionSave">
<property name="text"> <property name="text">
<string>Save</string> <string>&amp;Save</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+S</string> <string>Ctrl+S</string>
@ -187,7 +199,7 @@
</action> </action>
<action name="actionSaveAs"> <action name="actionSaveAs">
<property name="text"> <property name="text">
<string>Save As</string> <string>Save &amp;As</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+Shift+S</string> <string>Ctrl+Shift+S</string>
@ -195,12 +207,12 @@
</action> </action>
<action name="actionCloseLayout"> <action name="actionCloseLayout">
<property name="text"> <property name="text">
<string>Close Layout</string> <string>&amp;Close Layout</string>
</property> </property>
</action> </action>
<action name="actionImportRawLayout"> <action name="actionImportRawLayout">
<property name="text"> <property name="text">
<string>Import Raw Layout Data</string> <string>&amp;Import Raw Layout Data</string>
</property> </property>
</action> </action>
<action name="actionExit"> <action name="actionExit">
@ -220,7 +232,7 @@
</action> </action>
<action name="actionNew"> <action name="actionNew">
<property name="text"> <property name="text">
<string>New</string> <string>&amp;New</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+N</string> <string>Ctrl+N</string>