Mercurial > projects > qtd
comparison examples/layouts/dynamiclayouts/dialog.d @ 103:236401001115
fix for current qtd signals system
author | eldar |
---|---|
date | Fri, 29 May 2009 14:59:43 +0000 |
parents | 4f909ae70e76 |
children | 9fa74f0e3fb6 |
comparison
equal
deleted
inserted
replaced
102:56a66a1e0120 | 103:236401001115 |
---|---|
82 void buttonsOrientationChanged(int index) | 82 void buttonsOrientationChanged(int index) |
83 { | 83 { |
84 mainLayout.setSizeConstraint(QLayout.SetNoConstraint); | 84 mainLayout.setSizeConstraint(QLayout.SetNoConstraint); |
85 setMinimumSize(0, 0); | 85 setMinimumSize(0, 0); |
86 | 86 |
87 Qt_Orientation orientation = cast(Qt_Orientation) buttonsOrientationComboBox.itemData(index).toInt(); | 87 Qt.Orientation orientation = cast(Qt.Orientation) buttonsOrientationComboBox.itemData(index).toInt(); |
88 | 88 |
89 if (orientation == buttonBox.orientation()) | 89 if (orientation == buttonBox.orientation()) |
90 return; | 90 return; |
91 | 91 |
92 mainLayout.removeWidget(buttonBox); | 92 mainLayout.removeWidget(buttonBox); |
134 | 134 |
135 void createRotableGroupBox() | 135 void createRotableGroupBox() |
136 { | 136 { |
137 rotableGroupBox = new QGroupBox(tr("Rotable Widgets")); | 137 rotableGroupBox = new QGroupBox(tr("Rotable Widgets")); |
138 | 138 |
139 rotableWidgets ~= new QSpinBox; | 139 a0 = new QSpinBox; |
140 rotableWidgets ~= new QSlider; | 140 a1 = new QSlider; |
141 rotableWidgets ~= new QDial; | 141 a2 = new QDial; |
142 rotableWidgets ~= new QProgressBar; | 142 a3 = new QProgressBar; |
143 | 143 |
144 rotableWidgets ~= a0; | |
145 rotableWidgets ~= a1; | |
146 rotableWidgets ~= a2; | |
147 rotableWidgets ~= a3; | |
148 | |
149 a0.valueChanged.connect(&a1.setValue); | |
150 a1.valueChanged.connect(&a2.setValue); | |
151 a2.valueChanged.connect(&a3.setValue); | |
152 a3.valueChanged.connect(&a0.setValue); | |
153 | |
154 /* | |
144 int n = rotableWidgets.length; | 155 int n = rotableWidgets.length; |
145 for (int i = 0; i < n; ++i) { | 156 for (int i = 0; i < n; ++i) { |
146 rotableWidgets[i].valueChanged.connect(&rotableWidgets[(i + 1) % n].setValue); | 157 rotableWidgets[i].valueChanged.connect(&rotableWidgets[(i + 1) % n].setValue); |
147 } | 158 }*/ |
148 | 159 |
149 rotableLayout = new QGridLayout; | 160 rotableLayout = new QGridLayout; |
150 rotableGroupBox.setLayout(rotableLayout); | 161 rotableGroupBox.setLayout(rotableLayout); |
151 | 162 |
152 rotateWidgets(); | 163 rotateWidgets(); |
184 helpButton.clicked.connect(&this.help); | 195 helpButton.clicked.connect(&this.help); |
185 } | 196 } |
186 | 197 |
187 QGroupBox rotableGroupBox; | 198 QGroupBox rotableGroupBox; |
188 QWidget[] rotableWidgets; | 199 QWidget[] rotableWidgets; |
200 | |
201 // qtd | |
202 QSpinBox a0; | |
203 QSlider a1; | |
204 QDial a2; | |
205 QProgressBar a3; | |
189 | 206 |
190 QGroupBox optionsGroupBox; | 207 QGroupBox optionsGroupBox; |
191 QLabel buttonsOrientationLabel; | 208 QLabel buttonsOrientationLabel; |
192 QComboBox buttonsOrientationComboBox; | 209 QComboBox buttonsOrientationComboBox; |
193 | 210 |