Mercurial > repos > IBBoard.WarFoundry.GUI.QtSharp
view qt-gui/CreateNewArmyLayout.cs @ 6:bbf40d66dfe4
Re #242: Create Qt# UI for WarFoundry
* Fix warnings about Connect strings not being signals
Re #243: Create new Qt# "Create Army" dialog
* Change from List View to List Widget (views need models, which only handle QVariants and not arbitrary objects)
* Populate Game System list
* Populate races list on game system selection changed
* Set text on some labels
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 27 Jan 2010 20:58:56 +0000 |
parents | ac1bf60edf63 |
children | 8a8735679d55 |
line wrap: on
line source
/******************************************************************************** ** Form generated from reading ui file 'CreateNewArmyLayout.ui' ** ** Created: Wed Jan 27 20:53:01 2010 ** by: Qt User Interface Compiler for C# version 4.5.3 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ using Qyoto; public class Ui_CreateNewArmyLayout { public QGridLayout gridLayout; public QDialogButtonBox buttonBox; public QComboBox gameSystems; public QLabel lblGameSystem; public QLabel lblRace; public QLabel lblArmyName; public QLabel lblArmySize; public QSpinBox armySize; public QLineEdit armyName; public QListWidget raceList; public void SetupUi(QDialog CreateNewArmyLayout) { if (CreateNewArmyLayout.ObjectName == "") CreateNewArmyLayout.ObjectName = "CreateNewArmyLayout"; QSize Size = new QSize(400, 300); Size = Size.ExpandedTo(CreateNewArmyLayout.MinimumSizeHint()); CreateNewArmyLayout.Size = Size; gridLayout = new QGridLayout(CreateNewArmyLayout); gridLayout.ObjectName = "gridLayout"; buttonBox = new QDialogButtonBox(CreateNewArmyLayout); buttonBox.ObjectName = "buttonBox"; buttonBox.Orientation = Qt.Orientation.Horizontal; buttonBox.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"); gridLayout.AddWidget(buttonBox, 4, 2, 1, 1); gameSystems = new QComboBox(CreateNewArmyLayout); gameSystems.ObjectName = "gameSystems"; gridLayout.AddWidget(gameSystems, 0, 2, 1, 1); lblGameSystem = new QLabel(CreateNewArmyLayout); lblGameSystem.ObjectName = "lblGameSystem"; lblGameSystem.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignVCenter"); gridLayout.AddWidget(lblGameSystem, 0, 0, 1, 1); lblRace = new QLabel(CreateNewArmyLayout); lblRace.ObjectName = "lblRace"; lblRace.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing"); gridLayout.AddWidget(lblRace, 1, 0, 1, 1); lblArmyName = new QLabel(CreateNewArmyLayout); lblArmyName.ObjectName = "lblArmyName"; lblArmyName.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignVCenter"); gridLayout.AddWidget(lblArmyName, 2, 0, 1, 1); lblArmySize = new QLabel(CreateNewArmyLayout); lblArmySize.ObjectName = "lblArmySize"; lblArmySize.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignVCenter"); gridLayout.AddWidget(lblArmySize, 3, 0, 1, 1); armySize = new QSpinBox(CreateNewArmyLayout); armySize.ObjectName = "armySize"; gridLayout.AddWidget(armySize, 3, 2, 1, 1); armyName = new QLineEdit(CreateNewArmyLayout); armyName.ObjectName = "armyName"; gridLayout.AddWidget(armyName, 2, 2, 1, 1); raceList = new QListWidget(CreateNewArmyLayout); raceList.ObjectName = "raceList"; gridLayout.AddWidget(raceList, 1, 2, 1, 1); RetranslateUi(CreateNewArmyLayout); QObject.Connect(buttonBox, Qt.SIGNAL("accepted()"), CreateNewArmyLayout, Qt.SLOT("accept()")); QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), CreateNewArmyLayout, Qt.SLOT("reject()")); QMetaObject.ConnectSlotsByName(CreateNewArmyLayout); } // SetupUi public void RetranslateUi(QDialog CreateNewArmyLayout) { CreateNewArmyLayout.WindowTitle = QApplication.Translate("CreateNewArmyLayout", "Dialog", null, QApplication.Encoding.UnicodeUTF8); lblGameSystem.Text = QApplication.Translate("CreateNewArmyLayout", "game system:", null, QApplication.Encoding.UnicodeUTF8); lblRace.Text = QApplication.Translate("CreateNewArmyLayout", "race:", null, QApplication.Encoding.UnicodeUTF8); lblArmyName.Text = QApplication.Translate("CreateNewArmyLayout", "army name:", null, QApplication.Encoding.UnicodeUTF8); lblArmySize.Text = QApplication.Translate("CreateNewArmyLayout", "army size:", null, QApplication.Encoding.UnicodeUTF8); } // RetranslateUi } namespace Ui { public class CreateNewArmyLayout : Ui_CreateNewArmyLayout {} } // namespace Ui