Mercurial > repos > IBBoard.WarFoundry.GUI.QtSharp
diff qt-gui/MainWindowLayout.cs @ 33:be876c03054f
Re #245: Create unit tab implementation
* Add stub widget
* Record which unit tabs are open
* Remove two default tabs
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 07 Aug 2010 15:40:37 +0000 |
parents | 55d4f16c982b |
children |
line wrap: on
line diff
--- a/qt-gui/MainWindowLayout.cs Sat Aug 07 13:39:35 2010 +0000 +++ b/qt-gui/MainWindowLayout.cs Sat Aug 07 15:40:37 2010 +0000 @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'MainWindowLayout.ui' ** -** Created: Sat Jul 31 16:07:24 2010 +** Created: Sat Aug 7 16:39:03 2010 ** by: Qt User Interface Compiler for C# version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -28,8 +28,6 @@ public QSplitter splitter; public QTreeView armyTree; public QTabWidget unitTabs; - public QWidget tab; - public QWidget tab_2; public QMenuBar menubar; public QMenu menuFile; public QMenu menuExportArmyAs; @@ -89,13 +87,12 @@ splitter.AddWidget(armyTree); unitTabs = new QTabWidget(splitter); unitTabs.ObjectName = "unitTabs"; - unitTabs.MinimumSize = new QSize(500, 0); - tab = new QWidget(); - tab.ObjectName = "tab"; - unitTabs.AddTab(tab, QApplication.Translate("MainWindowLayout", "Tab 1", null, QApplication.Encoding.UnicodeUTF8)); - tab_2 = new QWidget(); - tab_2.ObjectName = "tab_2"; - unitTabs.AddTab(tab_2, QApplication.Translate("MainWindowLayout", "Tab 2", null, QApplication.Encoding.UnicodeUTF8)); + unitTabs.MinimumSize = new QSize(500, 200); + unitTabs.tabShape = QTabWidget.TabShape.Rounded; + unitTabs.ElideMode = Qt.TextElideMode.ElideMiddle; + unitTabs.DocumentMode = false; + unitTabs.TabsClosable = true; + unitTabs.Movable = true; splitter.AddWidget(unitTabs); gridLayout.AddWidget(splitter, 0, 0, 1, 1); @@ -142,7 +139,7 @@ RetranslateUi(MainWindowLayout); - unitTabs.CurrentIndex = 0; + unitTabs.CurrentIndex = -1; QMetaObject.ConnectSlotsByName(MainWindowLayout); @@ -162,8 +159,6 @@ actionAbout.Text = QApplication.Translate("MainWindowLayout", "&about", null, QApplication.Encoding.UnicodeUTF8); actionUndo.Text = QApplication.Translate("MainWindowLayout", "&undo", null, QApplication.Encoding.UnicodeUTF8); actionRedo.Text = QApplication.Translate("MainWindowLayout", "&redo", null, QApplication.Encoding.UnicodeUTF8); - unitTabs.SetTabText(unitTabs.IndexOf(tab), QApplication.Translate("MainWindowLayout", "Tab 1", null, QApplication.Encoding.UnicodeUTF8)); - unitTabs.SetTabText(unitTabs.IndexOf(tab_2), QApplication.Translate("MainWindowLayout", "Tab 2", null, QApplication.Encoding.UnicodeUTF8)); menuFile.Title = QApplication.Translate("MainWindowLayout", "&file", null, QApplication.Encoding.UnicodeUTF8); menuExportArmyAs.Title = QApplication.Translate("MainWindowLayout", "export army as", null, QApplication.Encoding.UnicodeUTF8); menuEdit.Title = QApplication.Translate("MainWindowLayout", "&edit", null, QApplication.Encoding.UnicodeUTF8);