comparison d2/qt/core/QPoint.d @ 373:1f189d0ceab4

merge
author Max Samukha <maxter@spambox.com>
date Thu, 08 Jul 2010 17:20:02 +0300
parents a032df77b6ab 12f60887ed15
children
comparison
equal deleted inserted replaced
372:a032df77b6ab 373:1f189d0ceab4
137 public this(QPoint p) { 137 public this(QPoint p) {
138 xp = p.x(); 138 xp = p.x();
139 yp = p.y(); 139 yp = p.y();
140 } 140 }
141 141
142 bool isNull() //const 142 bool isNull() const
143 { 143 {
144 return qIsNull(xp) && qIsNull(yp); 144 return qIsNull(xp) && qIsNull(yp);
145 } 145 }
146 146
147 qreal x() //const 147 qreal x() const
148 { 148 {
149 return xp; 149 return xp;
150 } 150 }
151 151
152 qreal y() //const 152 qreal y() const
153 { 153 {
154 return yp; 154 return yp;
155 } 155 }
156 156
157 void x(qreal xpos) 157 void x(qreal xpos)
162 void y(qreal ypos) 162 void y(qreal ypos)
163 { 163 {
164 yp = ypos; 164 yp = ypos;
165 } 165 }
166 /* 166 /*
167 inline qreal &QPointF::rx() 167 ref qreal rx()
168 { 168 {
169 return xp; 169 return xp;
170 } 170 }
171 171
172 inline qreal &QPointF::ry() 172 ref qreal ry()
173 { 173 {
174 return yp; 174 return yp;
175 } 175 }
176 */ 176 */
177 177
206 QPointF opDiv(qreal c) 206 QPointF opDiv(qreal c)
207 { 207 {
208 return QPointF(xp/c, yp/c); 208 return QPointF(xp/c, yp/c);
209 } 209 }
210 210
211 QPoint toPoint() //const 211 QPoint toPoint() const
212 { 212 {
213 return QPoint(qRound(xp), qRound(yp)); 213 return QPoint(qRound(xp), qRound(yp));
214 } 214 }
215 215
216 public final void writeTo(QDataStream arg__1) { 216 public final void writeTo(QDataStream arg__1) {