comparison 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
comparison
equal deleted inserted replaced
5:1bd8febee385 6:bbf40d66dfe4
1 /******************************************************************************** 1 /********************************************************************************
2 ** Form generated from reading ui file 'CreateNewArmyLayout.ui' 2 ** Form generated from reading ui file 'CreateNewArmyLayout.ui'
3 ** 3 **
4 ** Created: Sat Jan 23 20:40:44 2010 4 ** Created: Wed Jan 27 20:53:01 2010
5 ** by: Qt User Interface Compiler for C# version 4.5.3 5 ** by: Qt User Interface Compiler for C# version 4.5.3
6 ** 6 **
7 ** WARNING! All changes made in this file will be lost when recompiling ui file! 7 ** WARNING! All changes made in this file will be lost when recompiling ui file!
8 ********************************************************************************/ 8 ********************************************************************************/
9 9
15 public QGridLayout gridLayout; 15 public QGridLayout gridLayout;
16 public QDialogButtonBox buttonBox; 16 public QDialogButtonBox buttonBox;
17 public QComboBox gameSystems; 17 public QComboBox gameSystems;
18 public QLabel lblGameSystem; 18 public QLabel lblGameSystem;
19 public QLabel lblRace; 19 public QLabel lblRace;
20 public QListView raceList;
21 public QLabel lblArmyName; 20 public QLabel lblArmyName;
22 public QLabel lblArmySize; 21 public QLabel lblArmySize;
23 public QSpinBox armySize; 22 public QSpinBox armySize;
24 public QLineEdit armyName; 23 public QLineEdit armyName;
24 public QListWidget raceList;
25 25
26 public void SetupUi(QDialog CreateNewArmyLayout) 26 public void SetupUi(QDialog CreateNewArmyLayout)
27 { 27 {
28 if (CreateNewArmyLayout.ObjectName == "") 28 if (CreateNewArmyLayout.ObjectName == "")
29 CreateNewArmyLayout.ObjectName = "CreateNewArmyLayout"; 29 CreateNewArmyLayout.ObjectName = "CreateNewArmyLayout";
54 lblRace.ObjectName = "lblRace"; 54 lblRace.ObjectName = "lblRace";
55 lblRace.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing"); 55 lblRace.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing");
56 56
57 gridLayout.AddWidget(lblRace, 1, 0, 1, 1); 57 gridLayout.AddWidget(lblRace, 1, 0, 1, 1);
58 58
59 raceList = new QListView(CreateNewArmyLayout);
60 raceList.ObjectName = "raceList";
61
62 gridLayout.AddWidget(raceList, 1, 2, 1, 1);
63
64 lblArmyName = new QLabel(CreateNewArmyLayout); 59 lblArmyName = new QLabel(CreateNewArmyLayout);
65 lblArmyName.ObjectName = "lblArmyName"; 60 lblArmyName.ObjectName = "lblArmyName";
66 lblArmyName.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignVCenter"); 61 lblArmyName.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignRight") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTrailing") | Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignVCenter");
67 62
68 gridLayout.AddWidget(lblArmyName, 2, 0, 1, 1); 63 gridLayout.AddWidget(lblArmyName, 2, 0, 1, 1);
81 armyName = new QLineEdit(CreateNewArmyLayout); 76 armyName = new QLineEdit(CreateNewArmyLayout);
82 armyName.ObjectName = "armyName"; 77 armyName.ObjectName = "armyName";
83 78
84 gridLayout.AddWidget(armyName, 2, 2, 1, 1); 79 gridLayout.AddWidget(armyName, 2, 2, 1, 1);
85 80
81 raceList = new QListWidget(CreateNewArmyLayout);
82 raceList.ObjectName = "raceList";
83
84 gridLayout.AddWidget(raceList, 1, 2, 1, 1);
85
86 86
87 RetranslateUi(CreateNewArmyLayout); 87 RetranslateUi(CreateNewArmyLayout);
88 QObject.Connect(buttonBox, Qt.SIGNAL("accepted()"), CreateNewArmyLayout, Qt.SLOT("accept()")); 88 QObject.Connect(buttonBox, Qt.SIGNAL("accepted()"), CreateNewArmyLayout, Qt.SLOT("accept()"));
89 QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), CreateNewArmyLayout, Qt.SLOT("reject()")); 89 QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), CreateNewArmyLayout, Qt.SLOT("reject()"));
90 90
94 public void RetranslateUi(QDialog CreateNewArmyLayout) 94 public void RetranslateUi(QDialog CreateNewArmyLayout)
95 { 95 {
96 CreateNewArmyLayout.WindowTitle = QApplication.Translate("CreateNewArmyLayout", "Dialog", null, QApplication.Encoding.UnicodeUTF8); 96 CreateNewArmyLayout.WindowTitle = QApplication.Translate("CreateNewArmyLayout", "Dialog", null, QApplication.Encoding.UnicodeUTF8);
97 lblGameSystem.Text = QApplication.Translate("CreateNewArmyLayout", "game system:", null, QApplication.Encoding.UnicodeUTF8); 97 lblGameSystem.Text = QApplication.Translate("CreateNewArmyLayout", "game system:", null, QApplication.Encoding.UnicodeUTF8);
98 lblRace.Text = QApplication.Translate("CreateNewArmyLayout", "race:", null, QApplication.Encoding.UnicodeUTF8); 98 lblRace.Text = QApplication.Translate("CreateNewArmyLayout", "race:", null, QApplication.Encoding.UnicodeUTF8);
99 lblArmyName.Text = QApplication.Translate("CreateNewArmyLayout", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 99 lblArmyName.Text = QApplication.Translate("CreateNewArmyLayout", "army name:", null, QApplication.Encoding.UnicodeUTF8);
100 lblArmySize.Text = QApplication.Translate("CreateNewArmyLayout", "TextLabel", null, QApplication.Encoding.UnicodeUTF8); 100 lblArmySize.Text = QApplication.Translate("CreateNewArmyLayout", "army size:", null, QApplication.Encoding.UnicodeUTF8);
101 } // RetranslateUi 101 } // RetranslateUi
102 102
103 } 103 }
104 104
105 namespace Ui { 105 namespace Ui {