diff examples/layouts/dynamiclayouts/dialog.d @ 282:256ab6cb8e85

Signals look-up andNew syntax for connect. The old one will not work from now on. This will allow for the signals overload. Although changes are done for both D1 and D2 versions, D1 won't work because of compiler bugs. I am tired of waiting for fixes.
author eldar
date Fri, 16 Oct 2009 02:43:59 +0000
parents 9fa74f0e3fb6
children 7a3c43424dca
line wrap: on
line diff
--- a/examples/layouts/dynamiclayouts/dialog.d	Sun Oct 11 05:23:41 2009 +0000
+++ b/examples/layouts/dynamiclayouts/dialog.d	Fri Oct 16 02:43:59 2009 +0000
@@ -145,10 +145,10 @@
 		rotableWidgets ~= a2;
 		rotableWidgets ~= a3;
 
-		a0.valueChanged.connect(&a1.setValue);
-		a1.valueChanged.connect(&a2.setValue);
-		a2.valueChanged.connect(&a3.setValue);
-		a3.valueChanged.connect(&a0.setValue);
+		connect!("valueChanged")(a0, &a1.setValue);
+		connect!("valueChanged")(a1, &a2.setValue);
+		connect!("valueChanged")(a2, &a3.setValue);
+		connect!("valueChanged")(a3, &a0.setValue);
 
 		/*
 		int n = rotableWidgets.length;
@@ -172,7 +172,7 @@
 		buttonsOrientationComboBox.addItem(tr("Horizontal"), new QVariant(cast(ulong) Qt.Horizontal));
 		buttonsOrientationComboBox.addItem(tr("Vertical"), new QVariant(cast(ulong) Qt.Vertical));
 
-		buttonsOrientationComboBox.currentIndexChanged.connect(&this.buttonsOrientationChanged);
+		connect!("currentIndexChanged")(buttonsOrientationComboBox, &this.buttonsOrientationChanged);
 
 		optionsLayout = new QGridLayout;
 		optionsLayout.addWidget(buttonsOrientationLabel, 0, 0);
@@ -189,9 +189,9 @@
 		helpButton = buttonBox.addButton(QDialogButtonBox.Help);
 		rotateWidgetsButton = buttonBox.addButton(tr("Rotate &Widgets"), QDialogButtonBox.ActionRole);
 
-		rotateWidgetsButton.clicked.connect(&this.rotateWidgets);
-		closeButton.clicked.connect(&this.close);
-		helpButton.clicked.connect(&this.help);
+		connect!("clicked")(rotateWidgetsButton, &this.rotateWidgets);
+		connect!("clicked")(closeButton, &this.close);
+		connect!("clicked")(helpButton, &this.help);
 	}
 
 	QGroupBox rotableGroupBox;