changeset 12:4a724378d66a

Re #247: Implement menu options in Qt# app * Hook up army close (can now create, save and close armies) Re #242: Create Qt# UI for WarFoundry * Fix initial window title
author IBBoard <dev@ibboard.co.uk>
date Fri, 05 Feb 2010 20:57:44 +0000
parents 72bcf6457227
children dbe784f0802c
files MainWindow.cs qt-gui/MainWindowLayout.cs qt-gui/MainWindowLayout.ui
diffstat 3 files changed, 12 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/MainWindow.cs	Fri Feb 05 20:37:30 2010 +0000
     1.2 +++ b/MainWindow.cs	Fri Feb 05 20:57:44 2010 +0000
     1.3 @@ -29,6 +29,7 @@
     1.4  			layout = new Ui_MainWindowLayout();
     1.5  			layout.SetupUi(this);
     1.6  			WindowIcon = new QIcon("icons/App.png");
     1.7 +			SetAppTitle();
     1.8  			saveArmyDialog = new QFileDialog(this);
     1.9  			saveArmyDialog.acceptMode = QFileDialog.AcceptMode.AcceptSave;
    1.10  			SetUpActionIcons();
    1.11 @@ -60,6 +61,7 @@
    1.12  			QObject.Connect(layout.actionRedo, SIGNAL("triggered()"), RedoAction);
    1.13  			QObject.Connect(layout.actionSaveArmyAs, SIGNAL("triggered()"), DoSaveCurrentArmyAs);
    1.14  			QObject.Connect(layout.actionSaveArmy, SIGNAL("triggered()"), DoSaveCurrentArmy);
    1.15 +			QObject.Connect(layout.actionCloseArmy, SIGNAL("triggered()"), CloseArmy);
    1.16  		}
    1.17  		
    1.18  		private void CreateNewArmy()
    1.19 @@ -361,5 +363,10 @@
    1.20  		{
    1.21  			//TODO enable category buttons
    1.22  		}
    1.23 +		
    1.24 +		private void CloseArmy()
    1.25 +		{
    1.26 +			CurrentArmy = null;
    1.27 +		}
    1.28  	}
    1.29  }
    1.30 \ No newline at end of file
     2.1 --- a/qt-gui/MainWindowLayout.cs	Fri Feb 05 20:37:30 2010 +0000
     2.2 +++ b/qt-gui/MainWindowLayout.cs	Fri Feb 05 20:57:44 2010 +0000
     2.3 @@ -1,8 +1,8 @@
     2.4  /********************************************************************************
     2.5  ** Form generated from reading ui file 'MainWindowLayout.ui'
     2.6  **
     2.7 -** Created: Sat Jan 23 19:54:08 2010
     2.8 -**      by: Qt User Interface Compiler for C# version 4.5.3
     2.9 +** Created: Fri Feb 5 20:56:11 2010
    2.10 +**      by: Qt User Interface Compiler for C# version 4.6.0
    2.11  **
    2.12  ** WARNING! All changes made in this file will be lost when recompiling ui file!
    2.13  ********************************************************************************/
    2.14 @@ -121,7 +121,6 @@
    2.15      toolBar.ObjectName = "toolBar";
    2.16      toolBar.ToolButtonStyle = Qt.ToolButtonStyle.ToolButtonIconOnly;
    2.17      MainWindowLayout.AddToolBar(Qt.ToolBarArea.TopToolBarArea, toolBar);
    2.18 -    MainWindowLayout.InsertToolBarBreak(toolBar);
    2.19  
    2.20      menubar.AddAction(menuFile.MenuAction());
    2.21      menubar.AddAction(menuEdit.MenuAction());
    2.22 @@ -152,7 +151,7 @@
    2.23  
    2.24      public void RetranslateUi(QMainWindow MainWindowLayout)
    2.25      {
    2.26 -    MainWindowLayout.WindowTitle = QApplication.Translate("MainWindowLayout", "MainWindow", null, QApplication.Encoding.UnicodeUTF8);
    2.27 +    MainWindowLayout.WindowTitle = QApplication.Translate("MainWindowLayout", "WarFoundry", null, QApplication.Encoding.UnicodeUTF8);
    2.28      actionCreateArmy.Text = QApplication.Translate("MainWindowLayout", "&create army", null, QApplication.Encoding.UnicodeUTF8);
    2.29      actionOpenArmy.Text = QApplication.Translate("MainWindowLayout", "&open army", null, QApplication.Encoding.UnicodeUTF8);
    2.30      actionSaveArmy.Text = QApplication.Translate("MainWindowLayout", "&save army", null, QApplication.Encoding.UnicodeUTF8);
     3.1 --- a/qt-gui/MainWindowLayout.ui	Fri Feb 05 20:37:30 2010 +0000
     3.2 +++ b/qt-gui/MainWindowLayout.ui	Fri Feb 05 20:57:44 2010 +0000
     3.3 @@ -11,7 +11,7 @@
     3.4     </rect>
     3.5    </property>
     3.6    <property name="windowTitle">
     3.7 -   <string>MainWindow</string>
     3.8 +   <string>WarFoundry</string>
     3.9    </property>
    3.10    <property name="windowIcon">
    3.11     <iconset>
    3.12 @@ -115,7 +115,7 @@
    3.13      <enum>TopToolBarArea</enum>
    3.14     </attribute>
    3.15     <attribute name="toolBarBreak">
    3.16 -    <bool>true</bool>
    3.17 +    <bool>false</bool>
    3.18     </attribute>
    3.19    </widget>
    3.20    <action name="actionCreateArmy">