Mercurial > projects > qtd
comparison examples/tutorials/tutorial/t6/main.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 | a1b48a630f73 |
children | 7a3c43424dca |
comparison
equal
deleted
inserted
replaced
281:7f2e3ffa1c33 | 282:256ab6cb8e85 |
---|---|
56 lcd.setSegmentStyle(QLCDNumber.Filled); | 56 lcd.setSegmentStyle(QLCDNumber.Filled); |
57 | 57 |
58 auto slider = new QSlider(Qt.Horizontal); | 58 auto slider = new QSlider(Qt.Horizontal); |
59 slider.setRange(0, 99); | 59 slider.setRange(0, 99); |
60 slider.setValue(0); | 60 slider.setValue(0); |
61 slider.valueChanged.connect(cast(void delegate(int)) &lcd.display); | 61 connect!("valueChanged")(slider, cast(void delegate(int)) &lcd.display); |
62 | 62 |
63 auto layout = new QVBoxLayout; | 63 auto layout = new QVBoxLayout; |
64 layout.addWidget(lcd); | 64 layout.addWidget(lcd); |
65 layout.addWidget(slider); | 65 layout.addWidget(slider); |
66 setLayout(layout); | 66 setLayout(layout); |
74 { | 74 { |
75 super(parent); | 75 super(parent); |
76 | 76 |
77 auto quit = new QPushButton("Quit"); | 77 auto quit = new QPushButton("Quit"); |
78 quit.setFont(new QFont("Times", 18, QFont.Bold)); | 78 quit.setFont(new QFont("Times", 18, QFont.Bold)); |
79 quit.clicked.connect(&QApplication.quit); | 79 connect!("clicked")(quit, &QApplication.quit); |
80 | 80 |
81 auto grid = new QGridLayout; | 81 auto grid = new QGridLayout; |
82 for (int row = 0; row < 3; ++row) { | 82 for (int row = 0; row < 3; ++row) { |
83 for (int column = 0; column < 3; ++column) { | 83 for (int column = 0; column < 3; ++column) { |
84 auto lcdRange = new LCDRange; | 84 auto lcdRange = new LCDRange; |