29 using namespace KJSEmbed;
41 START_VARIANT_METHOD(calladjust,
QRect)
42 int arg0 = KJSEmbed::extractInt(exec, args, 0);
43 int arg1 = KJSEmbed::extractInt(exec, args, 1);
44 int arg2 = KJSEmbed::extractInt(exec, args, 2);
45 int arg3 = KJSEmbed::extractInt(exec, args, 3);
46 value.adjust(arg0, arg1, arg2, arg3);
49 START_VARIANT_METHOD(calladjusted,
QRect)
50 int arg0 = KJSEmbed::extractInt(exec, args, 0);
51 int arg1 = KJSEmbed::extractInt(exec, args, 1);
52 int arg2 = KJSEmbed::extractInt(exec, args, 2);
53 int arg3 = KJSEmbed::extractInt(exec, args, 3);
54 QRect cppValue = value.adjusted(arg0, arg1, arg2, arg3);
55 result = KJSEmbed::createVariant(exec,
"QRect", cppValue);
58 START_VARIANT_METHOD(callbottom,
QRect)
59 int cppValue = value.bottom();
60 result = KJS::jsNumber(cppValue);
63 START_VARIANT_METHOD(callbottomLeft,
QRect)
64 QPoint cppValue = value.bottomLeft();
65 result = KJSEmbed::createVariant(exec,
"QPoint", cppValue);
68 START_VARIANT_METHOD(callbottomRight,
QRect)
69 QPoint cppValue = value.bottomRight();
70 result = KJSEmbed::createVariant(exec,
"QPoint", cppValue);
73 START_VARIANT_METHOD(callcenter,
QRect)
74 QPoint cppValue = value.center();
75 result = KJSEmbed::createVariant(exec,
"QPoint", cppValue);
78 START_VARIANT_METHOD(callcontains,
QRect)
80 if (args.size() == 2 )
82 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
83 bool arg1 = KJSEmbed::extractBool(exec, args, 1);
84 bool cppValue = value.contains(arg0, arg1);
85 result = KJS::jsBoolean(cppValue);
88 else if (args.size() == 3)
90 int arg0 = KJSEmbed::extractInt(exec, args, 0);
91 int arg1 = KJSEmbed::extractInt(exec, args, 1);
92 bool arg2 = KJSEmbed::extractBool(exec, args, 2);
93 bool cppValue = value.contains(arg0, arg1, arg2);
94 result = KJS::jsBoolean(cppValue);
99 int arg0 = KJSEmbed::extractInt(exec, args, 0);
100 int arg1 = KJSEmbed::extractInt(exec, args, 1);
101 bool cppValue = value.contains(arg0, arg1);
102 result = KJS::jsBoolean(cppValue);
106 START_VARIANT_METHOD(callheight,
QRect)
107 int cppValue = value.height();
108 result = KJS::jsNumber(cppValue);
111 START_VARIANT_METHOD(callintersect,
QRect)
112 QRect arg0 = KJSEmbed::extractVariant<QRect>(exec, args, 0);
113 QRect cppValue = value.intersected(arg0);
114 result = KJSEmbed::createVariant(exec,
"QRect", cppValue);
117 START_VARIANT_METHOD(callintersects,
QRect)
118 QRect arg0 = KJSEmbed::extractVariant<QRect>(exec, args, 0);
119 bool cppValue = value.intersects(arg0);
120 result = KJS::jsBoolean(cppValue);
123 START_VARIANT_METHOD(callisEmpty,
QRect)
124 bool cppValue = value.isEmpty();
125 result = KJS::jsBoolean(cppValue);
128 START_VARIANT_METHOD(callisNull,
QRect)
129 bool cppValue = value.
isNull();
130 result = KJS::jsBoolean(cppValue);
133 START_VARIANT_METHOD(callisValid,
QRect)
134 bool cppValue = value.
isValid();
135 result = KJS::jsBoolean(cppValue);
138 START_VARIANT_METHOD(callleft,
QRect)
139 int cppValue = value.left();
140 result = KJS::jsNumber(cppValue);
143 START_VARIANT_METHOD(callmoveBottom,
QRect)
144 int arg0 = KJSEmbed::extractInt(exec, args, 0);
145 value.moveBottom(arg0);
148 START_VARIANT_METHOD(callmoveBottomLeft,
QRect)
149 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
150 value.moveBottomLeft(arg0);
153 START_VARIANT_METHOD(callmoveBottomRight,
QRect)
154 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
155 value.moveBottomRight(arg0);
158 START_VARIANT_METHOD(callmoveCenter,
QRect)
159 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
160 value.moveCenter(arg0);
163 START_VARIANT_METHOD(callmoveLeft,
QRect)
164 int arg0 = KJSEmbed::extractInt(exec, args, 0);
165 value.moveLeft(arg0);
168 START_VARIANT_METHOD(callmoveRight,
QRect)
169 int arg0 = KJSEmbed::extractInt(exec, args, 0);
170 value.moveRight(arg0);
173 START_VARIANT_METHOD(callmoveTo,
QRect)
174 if (args.size() == 1)
176 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
180 int arg0 = KJSEmbed::extractInt(exec, args, 0);
181 int arg1 = KJSEmbed::extractInt(exec, args, 1);
182 value.moveTo(arg0, arg1);
186 START_VARIANT_METHOD(callmoveTop,
QRect)
187 int arg0 = KJSEmbed::extractInt(exec, args, 0);
191 START_VARIANT_METHOD(callmoveTopLeft,
QRect)
192 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
193 value.moveTopLeft(arg0);
196 START_VARIANT_METHOD(callmoveTopRight,
QRect)
197 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
198 value.moveTopRight(arg0);
201 START_VARIANT_METHOD(callnormalized,
QRect)
202 QRect cppValue = value.normalized();
203 result = KJSEmbed::createVariant(exec,
"QRect", cppValue);
206 START_VARIANT_METHOD(callright,
QRect)
207 int cppValue = value.right();
208 result = KJS::jsNumber(cppValue);
211 START_VARIANT_METHOD(callsetBottom,
QRect)
212 int arg0 = KJSEmbed::extractInt(exec, args, 0);
213 value.setBottom(arg0);
216 START_VARIANT_METHOD(callsetBottomLeft,
QRect)
217 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
218 value.setBottomLeft(arg0);
221 START_VARIANT_METHOD(callsetBottomRight,
QRect)
222 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
223 value.setBottomRight(arg0);
226 START_VARIANT_METHOD(callsetCoords,
QRect)
227 int arg0 = KJSEmbed::extractInt(exec, args, 0);
228 int arg1 = KJSEmbed::extractInt(exec, args, 1);
229 int arg2 = KJSEmbed::extractInt(exec, args, 2);
230 int arg3 = KJSEmbed::extractInt(exec, args, 3);
231 value.setCoords(arg0, arg1, arg2, arg3);
234 START_VARIANT_METHOD(callsetHeight,
QRect)
235 int arg0 = KJSEmbed::extractInt(exec, args, 0);
236 value.setHeight(arg0);
239 START_VARIANT_METHOD(callsetLeft,
QRect)
240 int arg0 = KJSEmbed::extractInt(exec, args, 0);
244 START_VARIANT_METHOD(callsetRect,
QRect)
245 int arg0 = KJSEmbed::extractInt(exec, args, 0);
246 int arg1 = KJSEmbed::extractInt(exec, args, 1);
247 int arg2 = KJSEmbed::extractInt(exec, args, 2);
248 int arg3 = KJSEmbed::extractInt(exec, args, 3);
249 value.setRect(arg0, arg1, arg2, arg3);
252 START_VARIANT_METHOD(callsetRight,
QRect)
253 int arg0 = KJSEmbed::extractInt(exec, args, 0);
254 value.setRight(arg0);
257 START_VARIANT_METHOD(callsetSize,
QRect)
258 QSize arg0 = KJSEmbed::extractVariant<QSize>(exec, args, 0);
262 START_VARIANT_METHOD(callsetTop,
QRect)
263 int arg0 = KJSEmbed::extractInt(exec, args, 0);
267 START_VARIANT_METHOD(callsetTopLeft,
QRect)
268 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
269 value.setTopLeft(arg0);
272 START_VARIANT_METHOD(callsetTopRight,
QRect)
273 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
274 value.setTopRight(arg0);
277 START_VARIANT_METHOD(callsetWidth,
QRect)
278 int arg0 = KJSEmbed::extractInt(exec, args, 0);
279 value.setWidth(arg0);
282 START_VARIANT_METHOD(callsetX,
QRect)
283 int arg0 = KJSEmbed::extractInt(exec, args, 0);
287 START_VARIANT_METHOD(callsetY,
QRect)
288 int arg0 = KJSEmbed::extractInt(exec, args, 0);
292 START_VARIANT_METHOD(callsize,
QRect)
293 QSize cppValue = value.size();
294 result = KJSEmbed::createVariant(exec,
"QSize", cppValue);
297 START_VARIANT_METHOD(calltop,
QRect)
298 int cppValue = value.top();
299 result = KJS::jsNumber(cppValue);
302 START_VARIANT_METHOD(calltopLeft,
QRect)
303 QPoint cppValue = value.topLeft();
304 result = KJSEmbed::createVariant(exec,
"QPoint", cppValue);
307 START_VARIANT_METHOD(calltopRight,
QRect)
308 QPoint cppValue = value.topRight();
309 result = KJSEmbed::createVariant(exec,
"QPoint", cppValue);
312 START_VARIANT_METHOD(calltranslate,
QRect)
313 if (args.size() == 1)
315 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
316 value.translate(arg0);
319 int arg0 = KJSEmbed::extractInt(exec, args, 0);
320 int arg1 = KJSEmbed::extractInt(exec, args, 1);
321 value.translate(arg0, arg1);
325 START_VARIANT_METHOD(calltranslated,
QRect)
326 if (args.size() == 1)
328 QPoint arg0 = KJSEmbed::extractVariant<QPoint>(exec, args, 0);
329 QRect cppValue = value.translated(arg0);
330 result = KJSEmbed::createVariant(exec,
"QRect", cppValue);
333 int arg0 = KJSEmbed::extractInt(exec, args, 0);
334 int arg1 = KJSEmbed::extractInt(exec, args, 1);
335 QRect cppValue = value.translated(arg0, arg1);
336 result = KJSEmbed::createVariant(exec,
"QRect", cppValue);
340 START_VARIANT_METHOD(callunite,
QRect)
341 QRect arg0 = KJSEmbed::extractVariant<QRect>(exec, args, 0);
342 QRect cppValue = value.united(arg0);
343 result = KJSEmbed::createVariant(exec,
"QRect", cppValue);
346 START_VARIANT_METHOD(callwidth,
QRect)
347 int cppValue = value.width();
348 result = KJS::jsNumber(cppValue);
351 START_VARIANT_METHOD(callx,
QRect)
352 int cppValue = value.x();
353 result = KJS::jsNumber(cppValue);
356 START_VARIANT_METHOD(cally,
QRect)
357 int cppValue = value.y();
358 result = KJS::jsNumber(cppValue);
362 START_METHOD_LUT(Rect)
363 {
"adjust", 3, KJS::DontDelete | KJS::ReadOnly, &RectNS::calladjust},
364 {
"adjusted", 3, KJS::DontDelete | KJS::ReadOnly, &RectNS::calladjusted},
365 {
"bottom", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callbottom},
366 {
"bottomLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callbottomLeft},
367 {
"bottomRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callbottomRight},
368 {
"center", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callcenter},
369 {
"contains", 2, KJS::DontDelete | KJS::ReadOnly, &RectNS::callcontains},
370 {
"height", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callheight},
371 {
"intersect", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callintersect},
372 {
"intersects", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callintersects},
373 {
"isEmpty", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callisEmpty},
374 {
"isNull", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callisNull},
375 {
"isValid", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callisValid},
376 {
"left", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callleft},
377 {
"moveBottom", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveBottom},
378 {
"moveBottomLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveBottomLeft},
379 {
"moveBottomRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveBottomRight},
380 {
"moveCenter", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveCenter},
381 {
"moveLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveLeft},
382 {
"moveRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveRight},
383 {
"moveTo", 1, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveTo},
384 {
"moveTop", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveTop},
385 {
"moveTopLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveTopLeft},
386 {
"moveTopRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callmoveTopRight},
387 {
"normalized", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callnormalized},
388 {
"right", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callright},
389 {
"setBottom", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetBottom},
390 {
"setBottomLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetBottomLeft},
391 {
"setBottomRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetBottomRight},
392 {
"setCoords", 3, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetCoords},
393 {
"setHeight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetHeight},
394 {
"setLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetLeft},
395 {
"setRect", 3, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetRect},
396 {
"setRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetRight},
397 {
"setSize", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetSize},
398 {
"setTop", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetTop},
399 {
"setTopLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetTopLeft},
400 {
"setTopRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetTopRight},
401 {
"setWidth", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetWidth},
402 {
"setX", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetX},
403 {
"setY", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsetY},
404 {
"size", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callsize},
405 {
"top", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::calltop},
406 {
"topLeft", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::calltopLeft},
407 {
"topRight", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::calltopRight},
408 {
"translate", 1, KJS::DontDelete | KJS::ReadOnly, &RectNS::calltranslate},
409 {
"translated", 1, KJS::DontDelete | KJS::ReadOnly, &RectNS::calltranslated},
410 {
"unite", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callunite},
411 {
"width", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callwidth},
412 {
"x", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::callx},
413 {
"y", 0, KJS::DontDelete | KJS::ReadOnly, &RectNS::cally}
419 START_CTOR(Rect,
QRect, 0)
420 if (args.size() == 2)
426 }
else if (args.size() == 4)
429 QRect(KJSEmbed::extractInt(exec, args, 0),
430 KJSEmbed::extractInt(exec, args, 1),
431 KJSEmbed::extractInt(exec, args, 2),
432 KJSEmbed::extractInt(exec, args, 3)