annotate d2/qt/core/QRect.d @ 311:8674fd5f34f4 lifetime

Added d1/d2 top directories
author maxter <spambox@d-coding.com>
date Wed, 23 Dec 2009 16:17:22 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
311
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
1 module qt.core.QRect;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
2
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
3 public import qt.QGlobal;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
4 public import qt.core.Qt;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
5 public import qt.core.QDataStream;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
6 public import qt.core.QSize;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
7 public import qt.core.QPoint;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
8
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
9
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
10 public struct QRect
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
11 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
12 public static QRect opCall() {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
13 QRect rt;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
14 rt.x1 = rt.y1 = 0;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
15 rt.x2 = rt.y2 = -1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
16 return rt;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
17 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
18
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
19 public this(int aleft, int atop, int awidth, int aheight)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
20 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
21 x1 = aleft;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
22 y1 = atop;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
23 x2 = (aleft + awidth - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
24 y2 = (atop + aheight - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
25 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
26
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
27 public this(QPoint atopLeft, QPoint abottomRight)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
28 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
29 x1 = atopLeft.x();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
30 y1 = atopLeft.y();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
31 x2 = abottomRight.x();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
32 y2 = abottomRight.y();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
33 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
34
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
35 public this(ref QPoint atopLeft, ref QSize asize)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
36 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
37 x1 = atopLeft.x();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
38 y1 = atopLeft.y();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
39 x2 = (x1+asize.width() - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
40 y2 = (y1+asize.height() - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
41 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
42
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
43 bool isNull() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
44 { return x2 == x1 - 1 && y2 == y1 - 1; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
45
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
46 bool isEmpty() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
47 { return x1 > x2 || y1 > y2; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
48
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
49 bool isValid() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
50 { return x1 <= x2 && y1 <= y2; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
51
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
52 int left() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
53 { return x1; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
54
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
55 int top() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
56 { return y1; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
57
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
58 int right() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
59 { return x2; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
60
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
61 int bottom() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
62 { return y2; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
63
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
64 int x() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
65 { return x1; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
66
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
67 int y() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
68 { return y1; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
69
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
70 void left(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
71 { x1 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
72
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
73 void top(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
74 { y1 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
75
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
76 void right(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
77 { x2 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
78
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
79 void bottom(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
80 { y2 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
81
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
82 void setLeft(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
83 { x1 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
84
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
85 void setTop(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
86 { y1 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
87
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
88 void setRight(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
89 { x2 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
90
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
91 void setBottom(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
92 { y2 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
93
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
94 void setTopLeft(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
95 { x1 = p.x(); y1 = p.y(); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
96
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
97 void setBottomRight(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
98 { x2 = p.x(); y2 = p.y(); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
99
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
100 void setTopRight(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
101 { x2 = p.x(); y1 = p.y(); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
102
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
103 void setBottomLeft(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
104 { x1 = p.x(); y2 = p.y(); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
105
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
106 void setX(int ax)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
107 { x1 = ax; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
108
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
109 void setY(int ay)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
110 { y1 = ay; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
111
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
112 QPoint topLeft() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
113 { return QPoint(x1, y1); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
114
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
115 QPoint bottomRight() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
116 { return QPoint(x2, y2); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
117
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
118 QPoint topRight() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
119 { return QPoint(x2, y1); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
120
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
121 QPoint bottomLeft() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
122 { return QPoint(x1, y2); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
123
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
124 QPoint center() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
125 { return QPoint((x1+x2)/2, (y1+y2)/2); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
126
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
127 int width() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
128 { return x2 - x1 + 1; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
129
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
130 int height() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
131 { return y2 - y1 + 1; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
132
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
133 QSize size() const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
134 { return QSize(width(), height()); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
135
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
136 void translate(int dx, int dy)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
137 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
138 x1 += dx;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
139 y1 += dy;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
140 x2 += dx;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
141 y2 += dy;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
142 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
143
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
144 void translate(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
145 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
146 x1 += p.x();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
147 y1 += p.y();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
148 x2 += p.x();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
149 y2 += p.y();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
150 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
151
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
152 QRect translated(int dx, int dy) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
153 { return QRect(QPoint(x1 + dx, y1 + dy), QPoint(x2 + dx, y2 + dy)); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
154
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
155 QRect translated(const QPoint p) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
156 { return QRect(QPoint(x1 + p.x(), y1 + p.y()), QPoint(x2 + p.x(), y2 + p.y())); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
157
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
158 void moveTo(int ax, int ay)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
159 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
160 x2 += ax - x1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
161 y2 += ay - y1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
162 x1 = ax;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
163 y1 = ay;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
164 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
165
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
166 void moveTo(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
167 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
168 x2 += p.x() - x1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
169 y2 += p.y() - y1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
170 x1 = p.x();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
171 y1 = p.y();
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
172 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
173
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
174 void moveLeft(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
175 { x2 += (pos - x1); x1 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
176
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
177 void moveTop(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
178 { y2 += (pos - y1); y1 = pos; }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
179
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
180 void moveRight(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
181 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
182 x1 += (pos - x2);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
183 x2 = pos;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
184 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
185
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
186 void moveBottom(int pos)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
187 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
188 y1 += (pos - y2);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
189 y2 = pos;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
190 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
191
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
192 void moveTopLeft(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
193 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
194 moveLeft(p.x());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
195 moveTop(p.y());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
196 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
197
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
198 void moveBottomRight(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
199 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
200 moveRight(p.x());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
201 moveBottom(p.y());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
202 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
203
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
204 void moveTopRight(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
205 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
206 moveRight(p.x());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
207 moveTop(p.y());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
208 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
209
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
210 void moveBottomLeft(const QPoint p)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
211 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
212 moveLeft(p.x());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
213 moveBottom(p.y());
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
214 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
215
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
216 void getRect(int *ax, int *ay, int *aw, int *ah) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
217 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
218 *ax = x1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
219 *ay = y1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
220 *aw = x2 - x1 + 1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
221 *ah = y2 - y1 + 1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
222 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
223
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
224 void setRect(int ax, int ay, int aw, int ah)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
225 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
226 x1 = ax;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
227 y1 = ay;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
228 x2 = (ax + aw - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
229 y2 = (ay + ah - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
230 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
231
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
232 void getCoords(int *xp1, int *yp1, int *xp2, int *yp2) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
233 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
234 *xp1 = x1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
235 *yp1 = y1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
236 *xp2 = x2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
237 *yp2 = y2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
238 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
239
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
240 void setCoords(int xp1, int yp1, int xp2, int yp2)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
241 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
242 x1 = xp1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
243 y1 = yp1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
244 x2 = xp2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
245 y2 = yp2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
246 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
247
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
248 QRect adjusted(int xp1, int yp1, int xp2, int yp2) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
249 { return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
250
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
251 void adjust(int dx1, int dy1, int dx2, int dy2)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
252 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
253 x1 += dx1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
254 y1 += dy1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
255 x2 += dx2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
256 y2 += dy2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
257 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
258
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
259 void setWidth(int w)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
260 { x2 = (x1 + w - 1); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
261
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
262 void setHeight(int h)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
263 { y2 = (y1 + h - 1); }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
264
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
265 void setSize(const QSize s)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
266 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
267 x2 = (s.width() + x1 - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
268 y2 = (s.height() + y1 - 1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
269 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
270
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
271 bool contains(int ax, int ay, bool aproper) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
272 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
273 return contains(QPoint(ax, ay), aproper);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
274 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
275
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
276 bool contains(int ax, int ay) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
277 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
278 return contains(QPoint(ax, ay), false);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
279 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
280
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
281 QRect opOrAssign(const QRect r)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
282 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
283 this = this | r;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
284 return this;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
285 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
286
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
287 QRect opAndAssign(const QRect r)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
288 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
289 this = this & r;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
290 return this;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
291 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
292
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
293 QRect intersected(const QRect other) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
294 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
295 return this & other;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
296 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
297
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
298 QRect united(const QRect r) const
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
299 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
300 return this | r;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
301 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
302
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
303 bool opEquals(const QRect r)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
304 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
305 return x1==r.x1 && x2==r.x2 && y1==r.y1 && y2==r.y2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
306 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
307
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
308 public final void writeTo(QDataStream arg__1) {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
309 qtd_QRect_writeTo_QDataStream(&this, arg__1 is null ? null : arg__1.__nativeId);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
310 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
311
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
312 public final void readFrom(QDataStream arg__1) {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
313 qtd_QRect_readFrom_QDataStream(&this, arg__1 is null ? null : arg__1.__nativeId);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
314 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
315
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
316 public final QRect opAnd(const QRect r) const {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
317 return qtd_QRect_operator_and_QRect(&this, &r);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
318 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
319
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
320 public final QRect opOr(const QRect r) const {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
321 return qtd_QRect_operator_or_QRect(&this, &r);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
322 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
323
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
324 public final bool contains(const QPoint p, bool proper = false) const {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
325 return qtd_QRect_contains_QPoint_bool(&this, &p, proper);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
326 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
327
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
328 public final bool contains(const QRect r, bool proper = false) const {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
329 return qtd_QRect_contains_QRect_bool(&this, &r, proper);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
330 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
331
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
332 public final bool intersects(const QRect r) const {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
333 return qtd_QRect_intersects_QRect(&this, &r);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
334 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
335
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
336 public final QRect normalized() const {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
337 return qtd_QRect_normalized(&this);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
338 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
339
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
340 private:
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
341 version(OSX)
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
342 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
343 int y1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
344 int x1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
345 int y2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
346 int x2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
347 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
348 else
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
349 {
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
350 int x1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
351 int y1;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
352 int x2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
353 int y2;
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
354 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
355 }
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
356
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
357
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
358 // C wrappers
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
359 private extern(C) bool qtd_QRect_contains_QPoint_bool(const void* __this_nativeId,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
360 const void* p0,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
361 bool proper1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
362 private extern(C) bool qtd_QRect_contains_QRect_bool(const void* __this_nativeId,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
363 const void* r0,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
364 bool proper1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
365 private extern(C) bool qtd_QRect_intersects_QRect(const void* __this_nativeId,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
366 const void* r0);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
367 private extern(C) QRect qtd_QRect_normalized(const void* __this_nativeId);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
368 private extern(C) void qtd_QRect_writeTo_QDataStream(void* __this_nativeId,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
369 void* arg__1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
370 private extern(C) void qtd_QRect_readFrom_QDataStream(void* __this_nativeId,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
371 void* arg__1);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
372 private extern(C) QRect qtd_QRect_operator_and_QRect(const void* __this_nativeId,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
373 const void* r0);
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
374 private extern(C) QRect qtd_QRect_operator_or_QRect(const void* __this_nativeId,
8674fd5f34f4 Added d1/d2 top directories
maxter <spambox@d-coding.com>
parents:
diff changeset
375 const void* r0);