Mercurial > repos > IBBoard.WarFoundry.GUI.QtSharp
view qt-gui/CreateNewArmyLayout.cs @ 8:8a8735679d55
Re #243: Create "New Army" dialog in Qt# app
* Disable "OK" button on army creation form
* Add event hooks and methods to enable OK Button when all values are completed
* Set properties on spinbox
Still need to work out how to stop dialog showing up in task bar.
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 30 Jan 2010 20:57:36 +0000 |
parents | bbf40d66dfe4 |
children | 7eaa8a1715e2 |
line wrap: on
line source
/******************************************************************************** ** Form generated from reading ui file 'CreateNewArmyLayout.ui' ** ** Created: Sat Jan 30 20:56:06 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"; CreateNewArmyLayout.WindowModality = Qt.WindowModality.WindowModal; 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"; armySize.Frame = true; armySize.buttonSymbols = QAbstractSpinBox.ButtonSymbols.UpDownArrows; armySize.Maximum = 100000; armySize.SingleStep = 10; armySize.Value = 2000; 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