Mercurial > projects > qtd
changeset 103:236401001115
fix for current qtd signals system
author | eldar |
---|---|
date | Fri, 29 May 2009 14:59:43 +0000 |
parents | 56a66a1e0120 |
children | 64b874c86f9b |
files | examples/layouts/dynamiclayouts/dialog.d |
diffstat | 1 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/layouts/dynamiclayouts/dialog.d Fri May 29 13:30:37 2009 +0000 +++ b/examples/layouts/dynamiclayouts/dialog.d Fri May 29 14:59:43 2009 +0000 @@ -84,7 +84,7 @@ mainLayout.setSizeConstraint(QLayout.SetNoConstraint); setMinimumSize(0, 0); - Qt_Orientation orientation = cast(Qt_Orientation) buttonsOrientationComboBox.itemData(index).toInt(); + Qt.Orientation orientation = cast(Qt.Orientation) buttonsOrientationComboBox.itemData(index).toInt(); if (orientation == buttonBox.orientation()) return; @@ -136,15 +136,26 @@ { rotableGroupBox = new QGroupBox(tr("Rotable Widgets")); - rotableWidgets ~= new QSpinBox; - rotableWidgets ~= new QSlider; - rotableWidgets ~= new QDial; - rotableWidgets ~= new QProgressBar; - + a0 = new QSpinBox; + a1 = new QSlider; + a2 = new QDial; + a3 = new QProgressBar; + + rotableWidgets ~= a0; + rotableWidgets ~= a1; + rotableWidgets ~= a2; + rotableWidgets ~= a3; + + a0.valueChanged.connect(&a1.setValue); + a1.valueChanged.connect(&a2.setValue); + a2.valueChanged.connect(&a3.setValue); + a3.valueChanged.connect(&a0.setValue); + + /* int n = rotableWidgets.length; for (int i = 0; i < n; ++i) { rotableWidgets[i].valueChanged.connect(&rotableWidgets[(i + 1) % n].setValue); - } + }*/ rotableLayout = new QGridLayout; rotableGroupBox.setLayout(rotableLayout); @@ -186,6 +197,12 @@ QGroupBox rotableGroupBox; QWidget[] rotableWidgets; + + // qtd + QSpinBox a0; + QSlider a1; + QDial a2; + QProgressBar a3; QGroupBox optionsGroupBox; QLabel buttonsOrientationLabel;