Mercurial > projects > qtd
comparison examples/layouts/basiclayouts/dialog.d @ 350:31520b2c0b3c
Removed dependency on parent trait and stringof
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Thu, 20 May 2010 15:49:08 +0300 |
parents | 7a3c43424dca |
children |
comparison
equal
deleted
inserted
replaced
349:925386e0e780 | 350:31520b2c0b3c |
---|---|
54 import qt.gui.QGridLayout; | 54 import qt.gui.QGridLayout; |
55 import qt.gui.QFormLayout; | 55 import qt.gui.QFormLayout; |
56 import qt.gui.QComboBox; | 56 import qt.gui.QComboBox; |
57 import qt.gui.QSpinBox; | 57 import qt.gui.QSpinBox; |
58 | 58 |
59 version(Tango) | 59 import std.string : format; |
60 import tango.text.convert.Format: format = Format; | |
61 else | |
62 import std.string; | |
63 | 60 |
64 import std.stdio; | 61 import std.stdio; |
65 | 62 |
66 class Dialog : public QDialog | 63 class Dialog : public QDialog |
67 { | 64 { |
155 layout.addRow(new QLabel(tr("Line 2, long text:")), new QComboBox); | 152 layout.addRow(new QLabel(tr("Line 2, long text:")), new QComboBox); |
156 layout.addRow(new QLabel(tr("Line 3:")), new QSpinBox); | 153 layout.addRow(new QLabel(tr("Line 3:")), new QSpinBox); |
157 formGroupBox.setLayout(layout); | 154 formGroupBox.setLayout(layout); |
158 } | 155 } |
159 | 156 |
160 mixin Q_OBJECT; | |
161 | |
162 enum { NumGridRows = 3, NumButtons = 4 }; | 157 enum { NumGridRows = 3, NumButtons = 4 }; |
163 | 158 |
164 QMenuBar menuBar; | 159 QMenuBar menuBar; |
165 QGroupBox horizontalGroupBox; | 160 QGroupBox horizontalGroupBox; |
166 QGroupBox gridGroupBox; | 161 QGroupBox gridGroupBox; |
172 QPushButton[NumButtons] buttons; | 167 QPushButton[NumButtons] buttons; |
173 QDialogButtonBox buttonBox; | 168 QDialogButtonBox buttonBox; |
174 | 169 |
175 QMenu fileMenu; | 170 QMenu fileMenu; |
176 QAction exitAction; | 171 QAction exitAction; |
172 | |
173 mixin Q_OBJECT; | |
177 } | 174 } |