Mercurial > projects > qtd
comparison examples/widgets/analogclock/AnalogClock.d @ 4:0a29ce1ae854
CMake build script.
Small fixes in examples.
author | SokoL_SD |
---|---|
date | Wed, 13 May 2009 19:01:55 +0000 |
parents | e78566595089 |
children | 834feae7809b |
comparison
equal
deleted
inserted
replaced
3:323efbe5c2f7 | 4:0a29ce1ae854 |
---|---|
62 resize(200, 200); | 62 resize(200, 200); |
63 } | 63 } |
64 | 64 |
65 void paintEvent(QPaintEvent event) | 65 void paintEvent(QPaintEvent event) |
66 { | 66 { |
67 static const QPoint[3] hourHand = [ | 67 /* static const QPoint hourHand[3] = { |
68 QPoint(7, 8), | 68 QPoint(7, 8), |
69 QPoint(-7, 8), | 69 QPoint(-7, 8), |
70 QPoint(0, -40) | 70 QPoint(0, -40) |
71 ]; | 71 }; |
72 static const QPoint[3] minuteHand = [ | 72 static const QPoint minuteHand[3] = { |
73 QPoint(7, 8), | 73 QPoint(7, 8), |
74 QPoint(-7, 8), | 74 QPoint(-7, 8), |
75 QPoint(0, -70) | 75 QPoint(0, -70) |
76 ]; | 76 }; |
77 */ | |
78 scope hourHand = new QPolygon; | |
79 hourHand.append(QPoint(7, 8)); | |
80 hourHand.append(QPoint(-7, 8)); | |
81 hourHand.append(QPoint(0, -40)); | |
82 | |
83 scope minuteHand = new QPolygon; | |
84 minuteHand.append(QPoint(7, 8)); | |
85 minuteHand.append(QPoint(-7, 8)); | |
86 minuteHand.append(QPoint(0, -70)); | |
77 | 87 |
78 scope hourColor = new QColor(127, 0, 127); | 88 scope hourColor = new QColor(127, 0, 127); |
79 scope minuteColor = new QColor(0, 127, 127, 191); | 89 scope minuteColor = new QColor(0, 127, 127, 191); |
80 | 90 |
81 int side = qMin(width(), height()); | 91 int side = qMin(width(), height()); |