annotate qt/d2/qt/core/QSize.d @ 295:463563fc9e17 signals

more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
author eldar
date Sun, 22 Nov 2009 11:01:19 +0000
parents 3dadfee97421
children b460cd08041f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
1 module qt.core.QSize;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
2
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
3 public import qt.QGlobal;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
4 public import qt.core.Qt;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
5
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
6
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
7 public struct QSize
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
8 {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
9 /* ctors, reserved for D2
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
10 public this()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
11 { wd = ht = -1; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
12
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
13 public this(int w, int h)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
14 { wd = w; ht = h; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
15 */
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
16
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
17 public static QSize opCall() {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
18 QSize sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
19 sz.wd = sz.ht = -1;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
20 return sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
21 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
22
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
23 public this(int w, int h) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
24 wd = w;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
25 ht = h;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
26 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
27
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
28 final bool isNull()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
29 { return wd==0 && ht==0; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
30
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
31 final bool isEmpty()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
32 { return wd<1 || ht<1; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
33
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
34 final bool isValid()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
35 { return wd>=0 && ht>=0; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
36
205
3dadfee97421 D2 fixes
eldar
parents: 188
diff changeset
37 final int width() const
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
38 { return wd; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
39
205
3dadfee97421 D2 fixes
eldar
parents: 188
diff changeset
40 final int height() const
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
41 { return ht; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
42
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
43 final void width(int w)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
44 { wd = w; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
45
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
46 final void height(int h)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
47 { ht = h; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
48
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
49 final void setWidth(int w) // for convenience
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
50 { wd = w; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
51
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
52 final void setHeight(int h) // for convenience
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
53 { ht = h; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
54
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
55 void transpose() {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
56 int tmp = wd;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
57 wd = ht;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
58 ht = tmp;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
59 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
60
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
61 void scale(int w, int h, Qt.AspectRatioMode mode) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
62 scale(QSize(w, h), mode);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
63 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
64
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
65 void scale(ref QSize s, Qt.AspectRatioMode mode) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
66 __qtd_QSize_scale_QSize_AspectRatioMode(&this, &s, mode);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
67 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
68
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
69 QSize expandedTo(ref QSize otherSize) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
70 return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
71 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
72
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
73 QSize boundedTo(ref QSize otherSize) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
74 return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
75 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
76 /*
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
77 public final void writeTo(QDataStream arg__1) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
78 __qtd_QSize_writeTo_QDataStream(&this, arg__1 is null ? null : arg__1.nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
79 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
80
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
81 public final void readFrom(QDataStream arg__1) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
82 __qtd_QSize_readFrom_QDataStream(&this, arg__1 is null ? null : arg__1.nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
83 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
84 */
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
85 QSize opAddAssign(ref QSize s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
86 { wd+=s.wd; ht+=s.ht; return this; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
87
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
88 QSize opSubAssign(ref QSize s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
89 { wd-=s.wd; ht-=s.ht; return this; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
90
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
91 QSize opMulAssign(qreal c)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
92 { wd = qRound(wd*c); ht = qRound(ht*c); return this; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
93
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
94 bool opEquals(ref QSize s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
95 { return wd == s.wd && ht == s.ht; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
96
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
97 QSize opAdd(ref QSize s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
98 { return QSize(this.wd+s.wd, this.ht+s.ht); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
99
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
100 QSize opSub(ref QSize s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
101 { return QSize(this.wd-s.wd, this.ht-s.ht); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
102
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
103 QSize opMul(qreal c)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
104 { return QSize(qRound(this.wd*c), qRound(this.ht*c)); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
105
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
106 QSize opDivAssign(qreal c) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
107 assert(!qFuzzyCompare(c + 1, 1.));
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
108 wd = qRound(wd/c); ht = qRound(ht/c);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
109 return this;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
110 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
111
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
112 QSize opDiv(qreal c) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
113 assert(!qFuzzyCompare(c + 1, 1.));
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
114 return QSize(qRound(this.wd/c), qRound(this.ht/c));
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
115 }
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
116
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
117 // service stuff
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
118 public alias void __isNativeValueType;
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
119
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
120 struct QTypeInfo
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
121 {
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
122 enum bool isComplex = true;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
123 enum bool isStatic = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
124 enum bool isLarge = true;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
125 enum bool isPointer = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
126 enum bool isDummy = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
127 }
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
128 private:
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
129 int wd;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
130 int ht;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
131 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
132
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
133
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
134 public struct QSizeF
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
135 {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
136 /* ctors, reserved for D2
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
137 this()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
138 { wd = ht = -1.; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
139
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
140 this(ref QSize sz)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
141 { wd = sz.width(); ht = sz.height(); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
142
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
143 this(qreal w, qreal h)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
144 { wd = w; ht = h; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
145 */
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
146 public static QSizeF opCall() {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
147 QSizeF sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
148 sz.wd = sz.ht = -1.;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
149 return sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
150 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
151
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
152 public static QSizeF opCall(ref QSizeF s) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
153 QSizeF sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
154 sz.wd = s.width(); sz.ht = s.height();
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
155 return sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
156 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
157
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
158 public static QSizeF opCall(qreal w, qreal h) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
159 QSizeF sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
160 sz.wd = w; sz.ht = h;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
161 return sz;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
162 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
163
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
164 bool isNull()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
165 { return qIsNull(wd) && qIsNull(ht); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
166
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
167 bool isEmpty()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
168 { return wd <= 0. || ht <= 0.; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
169
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
170 bool isValid()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
171 { return wd >= 0. && ht >= 0.; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
172
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
173 qreal width()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
174 { return wd; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
175
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
176 qreal height()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
177 { return ht; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
178
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
179 void width(qreal w)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
180 { wd = w; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
181
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
182 void height(qreal h)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
183 { ht = h; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
184
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
185 void setWidth(qreal w)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
186 { wd = w; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
187
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
188 void setHeight(qreal h)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
189 { ht = h; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
190
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
191 void scale(qreal w, qreal h, Qt.AspectRatioMode mode)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
192 { scale(QSizeF(w, h), mode); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
193
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
194 public final void scale(QSizeF s, Qt.AspectRatioMode mode)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
195 { __qtd_QSizeF_scale_QSizeF_AspectRatioMode(&this, &s, mode); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
196
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
197 void transpose() {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
198 qreal tmp = wd;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
199 wd = ht;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
200 ht = tmp;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
201 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
202
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
203 QSizeF expandedTo(ref QSizeF otherSize)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
204 { return QSizeF(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht)); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
205
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
206 QSizeF boundedTo(ref QSizeF otherSize)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
207 { return QSizeF(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht)); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
208
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
209 QSize toSize()
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
210 { return QSize(qRound(wd), qRound(ht)); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
211 /*
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
212 public final void writeTo(QDataStream arg__1) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
213 __qtd_QSizeF_writeTo_QDataStream(&this, arg__1 is null ? null : arg__1.nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
214 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
215
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
216 public final void readFrom(QDataStream arg__1) {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
217 __qtd_QSizeF_readFrom_QDataStream(&this, arg__1 is null ? null : arg__1.nativeId);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
218 */
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
219 QSizeF opAddAssign(ref QSizeF s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
220 { wd += s.wd; ht += s.ht; return this; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
221
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
222 QSizeF opSubAssign(ref QSizeF s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
223 { wd -= s.wd; ht -= s.ht; return this; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
224
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
225 QSizeF opMulAssign(qreal c)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
226 { wd *= c; ht *= c; return this; }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
227
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
228 bool opEquals(ref QSizeF s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
229 { return qFuzzyCompare(wd, s.wd) && qFuzzyCompare(ht, s.ht); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
230
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
231 QSizeF opAdd(ref QSizeF s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
232 { return QSizeF(this.wd+s.wd, this.ht+s.ht); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
233
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
234 QSizeF opSub(ref QSizeF s)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
235 { return QSizeF(this.wd-s.wd, this.ht-s.ht); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
236
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
237 QSizeF opMul(qreal c)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
238 { return QSizeF(this.wd*c, this.ht*c); }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
239
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
240 QSizeF opDivAssign(qreal c)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
241 {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
242 assert(!qFuzzyCompare(c + 1, 1.));
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
243 wd = wd/c; ht = ht/c;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
244 return this;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
245 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
246
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
247 QSizeF opDiv(qreal c)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
248 {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
249 assert(!qFuzzyCompare(c + 1, 1.));
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
250 return QSizeF(this.wd/c, this.ht/c);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
251 }
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
252
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
253 // service stuff
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
254 public alias void __isNativeValueType;
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
255
295
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
256 struct QTypeInfo
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
257 {
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
258 enum bool isComplex = true;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
259 enum bool isStatic = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
260 enum bool isLarge = true;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
261 enum bool isPointer = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
262 enum bool isDummy = false;
463563fc9e17 more of QList. const functions in C++ are now const in D too. Drop of the store result feature, which was incompatible with const functions and introduced too much of the bloat in the generator.
eldar
parents: 205
diff changeset
263 }
188
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
264 private:
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
265 qreal wd;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
266 qreal ht;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
267 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
268
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
269
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
270 extern (C) void qtd_append_array_QSize(QSize[]* arr, QSize arg)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
271 {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
272 *arr ~= arg;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
273 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
274
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
275 extern (C) void qtd_append_array_QSizeF(QSizeF[]* arr, QSizeF arg)
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
276 {
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
277 *arr ~= arg;
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
278 }
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
279
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
280 // C wrappers
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
281 // QSize
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
282 private extern(C) void __qtd_QSize_scale_QSize_AspectRatioMode(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
283 void* s0,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
284 int mode1);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
285 private extern(C) void __qtd_QSize_writeTo_QDataStream(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
286 void* arg__1);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
287 private extern(C) void __qtd_QSize_readFrom_QDataStream(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
288 void* arg__1);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
289
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
290 // QSizeF
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
291 private extern(C) void __qtd_QSizeF_writeTo_QDataStream(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
292 void* arg__1);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
293 private extern(C) void __qtd_QSizeF_readFrom_QDataStream(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
294 void* arg__1);
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
295 private extern(C) void __qtd_QSizeF_scale_QSizeF_AspectRatioMode(void* __this_nativeId,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
296 void* s0,
7dd099050621 initial commit for D2 support
eldar
parents:
diff changeset
297 int mode1);