Mercurial > projects > qtd
annotate generator/typesystem_gui-java.java @ 409:4a943393a167
Added wrapper for QImage::save.
It has been private back from QtJambi because the format argument is a plain char pointer instead of a QString, but unlike QPixmap, wrappers were missing.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sun, 20 Mar 2011 20:39:44 +0100 |
parents | e67ce7c21758 |
children |
rev | line source |
---|---|
71 | 1 /**************************************************************************** |
2 ** | |
3 ** Copyright (C) 1992-2008 Nokia. All rights reserved. | |
4 ** | |
5 ** This file is part of Qt Jambi. | |
6 ** | |
7 ** * Commercial Usage | |
8 * Licensees holding valid Qt Commercial licenses may use this file in | |
9 * accordance with the Qt Commercial License Agreement provided with the | |
10 * Software or, alternatively, in accordance with the terms contained in | |
11 * a written agreement between you and Nokia. | |
12 * | |
13 * | |
14 * GNU General Public License Usage | |
15 * Alternatively, this file may be used under the terms of the GNU | |
16 * General Public License versions 2.0 or 3.0 as published by the Free | |
17 * Software Foundation and appearing in the file LICENSE.GPL included in | |
18 * the packaging of this file. Please review the following information | |
19 * to ensure GNU General Public Licensing requirements will be met: | |
20 * http://www.fsf.org/licensing/licenses/info/GPLv2.html and | |
21 * http://www.gnu.org/copyleft/gpl.html. In addition, as a special | |
22 * exception, Nokia gives you certain additional rights. These rights | |
23 * are described in the Nokia Qt GPL Exception version 1.2, included in | |
24 * the file GPL_EXCEPTION.txt in this package. | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
25 * |
71 | 26 * Qt for Windows(R) Licensees |
27 * As a special exception, Nokia, as the sole copyright holder for Qt | |
28 * Designer, grants users of the Qt/Eclipse Integration plug-in the | |
29 * right for the Qt/Eclipse Integration to link to functionality | |
30 * provided by Qt Designer and its related libraries. | |
31 * | |
32 * | |
33 * If you are unsure which license is appropriate for your use, please | |
34 * contact the sales department at qt-sales@nokia.com. | |
35 | |
36 ** | |
37 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | |
38 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
39 ** | |
40 ****************************************************************************/ | |
41 | |
42 package generator; | |
43 | |
44 import qt.QNativePointer; | |
45 import qt.QtBlockedSlot; | |
46 import qt.core.QPoint; | |
47 import qt.core.QPointF; | |
48 import qt.gui.*; | |
49 | |
50 class QIconEngineV2___ extends QIconEngineV2 { | |
51 public QIconEngineV2 clone() { | |
52 return null; | |
53 } | |
54 }// class | |
55 | |
56 class QTransform___ extends QTransform { | |
57 | |
58 public final QTransform multiply(double d) { | |
59 operator_multiply_assign(d); | |
60 return this; | |
61 } | |
62 | |
63 public final QTransform multiply(QTransform matrix) { | |
64 operator_multiply_assign(matrix); | |
65 return this; | |
66 } | |
67 | |
68 public final QTransform add(double d) { | |
69 operator_add_assign(d); | |
70 return this; | |
71 } | |
72 | |
73 public final QTransform divide(double d) { | |
74 operator_divide_assign(d); | |
75 return this; | |
76 } | |
77 | |
78 public final QTransform subtract(double d) { | |
79 operator_subtract_assign(d); | |
80 return this; | |
81 } | |
82 | |
83 /** | |
84 * Returns an inverted copy of this transformation. | |
85 * | |
86 * @return The inverse of the transformation. | |
87 * @throws IllegalArgumentException | |
88 * If this transformation is not invertible. | |
89 */ | |
90 /* public final QTransform inverted() { | |
91 QNativePointer ok = new QNativePointer(QNativePointer.Type.Boolean); | |
92 QTransform returned = inverted(ok); | |
93 if (!ok.booleanValue()) | |
94 throw new IllegalArgumentException("Transformation is not invertible"); | |
95 return returned; | |
96 } | |
97 */ | |
98 /** | |
99 * Creates a transformation mapping one arbitrary quad into another. | |
100 * | |
101 * @return The transformation. | |
102 * @throws IllegalArgumentException | |
103 * If this transformation is not possible. | |
104 */ | |
105 /* public static final QTransform quadToQuad(QPolygonF from, QPolygonF to) { | |
106 QTransform res = new QTransform(); | |
107 QNativePointer resPointer = res.nativePointer(); | |
108 if (quadToQuadPrivate(from, to, resPointer)) { | |
109 return res; | |
110 } else | |
111 throw new IllegalArgumentException("Transformation is not possible"); | |
112 } | |
113 */ | |
114 /** | |
115 * Creates a transformation that maps a quad to a unit square. | |
116 * | |
117 * @return The transformation. | |
118 * @throws IllegalArgumentException If this transformation is not possible. | |
119 */ | |
120 /* public static final QTransform quadToSquare(QPolygonF quad) { | |
121 QTransform res = new QTransform(); | |
122 QNativePointer resPointer = res.nativePointer(); | |
123 if (quadToSquarePrivate(quad, resPointer)) { | |
124 return res; | |
125 } else | |
126 throw new IllegalArgumentException("Transformation is not possible"); | |
127 } | |
128 */ | |
129 /** | |
130 * Creates a transformation that maps a unit square to a the given quad. | |
131 * | |
132 * @return The transformation. | |
133 * @throws IllegalArgumentException | |
134 * If this transformation is not possible. | |
135 */ | |
136 /* public static final QTransform squareToQuad(QPolygonF quad) { | |
137 QTransform res = new QTransform(); | |
138 QNativePointer resPointer = res.nativePointer(); | |
139 if (squareToQuadPrivate(quad, resPointer)) { | |
140 return res; | |
141 } else | |
142 throw new IllegalArgumentException("Transformation is not possible"); | |
143 } | |
144 */ | |
145 }// class | |
146 | |
147 class QBitmap___ extends QBitmap { | |
148 /* | |
149 public QBitmap(String fileName, String format) { | |
150 this(fileName, format == null ? null : qt.QNativePointer.createCharPointer(format)); | |
151 } | |
152 | |
153 public QBitmap(String fileName) { | |
154 this(fileName, (String) null); | |
155 } | |
156 | |
157 public static QBitmap fromData(qt.core.QSize size, byte bits[], QImage.Format monoFormat) { | |
158 return fromData(size, qt.internal.QtJambiInternal.byteArrayToNativePointer(bits), monoFormat); | |
159 } | |
160 | |
161 public static QBitmap fromData(qt.core.QSize size, byte bits[]) { | |
162 return fromData(size, bits, QImage.Format.Format_MonoLSB); | |
163 } | |
164 */ | |
165 }// class | |
166 | |
167 class QPolygon___ extends QPolygon { | |
168 /* | |
169 private native void add_private(long nid, int x, int y); | |
170 | |
171 @QtBlockedSlot | |
172 public final QPolygon add(int x, int y) { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
173 add_private(qtdNativeId(), x, y); |
71 | 174 return this; |
175 } | |
176 | |
177 @QtBlockedSlot | |
178 public final QPolygon add(QPoint pt) { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
179 add_private(qtdNativeId(), pt.x(), pt.y()); |
71 | 180 return this; |
181 } | |
182 | |
183 @QtBlockedSlot | |
184 public final QPolygon add(QPolygon p) { | |
185 int size = p.size(); | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
186 long nid = qtdNativeId(); |
71 | 187 for (int i = 0; i < size; ++i) { |
188 QPoint pt = p.at(i); | |
189 add_private(nid, pt.x(), pt.y()); | |
190 } | |
191 return this; | |
192 } | |
193 */ | |
194 }// class | |
195 | |
196 class QPolygonF___ extends QPolygonF { | |
197 /* | |
198 private native void add_private(long nid, double x, double y); | |
199 | |
200 @QtBlockedSlot | |
201 public final QPolygonF add(double x, double y) { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
202 add_private(qtdNativeId(), x, y); |
71 | 203 return this; |
204 } | |
205 | |
206 @QtBlockedSlot | |
207 public final QPolygonF add(QPointF pt) { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
208 add_private(qtdNativeId(), pt.x(), pt.y()); |
71 | 209 return this; |
210 } | |
211 | |
212 @QtBlockedSlot | |
213 public final QPolygonF add(QPolygonF p) { | |
214 int size = p.size(); | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
215 long nid = qtdNativeId(); |
71 | 216 for (int i = 0; i < size; ++i) { |
217 QPointF pt = p.at(i); | |
218 add_private(nid, pt.x(), pt.y()); | |
219 } | |
220 return this; | |
221 } | |
222 */ | |
223 }// class | |
224 | |
225 class QTreeWidgetItemIterator___ extends QTreeWidgetItemIterator { | |
226 public final QTreeWidgetItemIterator opAddAssign(int i) { | |
227 return operator_add_assign(i); | |
228 } | |
229 | |
230 public final QTreeWidgetItemIterator opSubAssign(int i) { | |
231 return operator_subtract_assign(i); | |
232 } | |
233 | |
234 public final QTreeWidgetItemIterator next() { | |
235 return operator_increment(); | |
236 } | |
237 | |
238 public final QTreeWidgetItemIterator previous() { | |
239 return operator_decrement(); | |
240 } | |
241 | |
242 public final QTreeWidgetItem current() { | |
243 return operator_multiply(); | |
244 } | |
245 }// class | |
246 | |
247 class QTextCursor___ extends QTextCursor { | |
248 /* public final QTableArea selectedTableCells() { | |
249 QNativePointer firstRow = new QNativePointer(QNativePointer.Type.Int); | |
250 QNativePointer numRows = new QNativePointer(QNativePointer.Type.Int); | |
251 QNativePointer firstColumn = new QNativePointer(QNativePointer.Type.Int); | |
252 QNativePointer numColumns = new QNativePointer(QNativePointer.Type.Int); | |
253 | |
254 selectedTableCells(firstRow, numRows, firstColumn, numColumns); | |
255 | |
256 return new QTableArea(firstRow.intValue(), firstColumn.intValue(), numRows.intValue(), numColumns.intValue()); | |
257 }*/ | |
258 }// class | |
259 | |
260 class QComboBox___ extends QComboBox { | |
261 | |
262 }// class | |
263 | |
264 class QMatrix___ extends QMatrix { | |
265 /** | |
266 * Returns an inverted copy of this matrix. | |
267 * | |
268 * @return The inverse of the matrix. | |
269 * @throws IllegalArgumentException | |
270 * If this matrix is not invertible. | |
271 */ | |
272 /* public final QMatrix inverted() { | |
273 QNativePointer ok = new QNativePointer(QNativePointer.Type.Boolean); | |
274 QMatrix returned = inverted(ok); | |
275 if (!ok.booleanValue()) | |
276 throw new IllegalArgumentException("Matrix is not invertible"); | |
277 return returned; | |
278 } | |
279 | |
280 @QtBlockedSlot | |
281 public final QMatrix multiply(QMatrix other) { | |
282 operator_multiply_assign(other); | |
283 return this; | |
284 } | |
285 | |
286 @QtBlockedSlot | |
287 public final QMatrix multiplied(QMatrix other) { | |
288 return operator_multiply(other); | |
289 } | |
290 */ | |
291 }// class | |
292 | |
293 class QImage___ extends QImage { | |
356 | 294 private import qtd.String; |
71 | 295 |
190 | 296 public this(string[] xpm) { |
71 | 297 this(toStringzArray(xpm)); |
298 } | |
299 /* | |
300 public final byte[] copyOfBytes() { | |
301 QNativePointer bits = bits(); | |
302 byte bytes[] = new byte[numBytes()]; | |
303 for (int i = 0; i < bytes.length; ++i) | |
304 bytes[i] = bits.byteAt(i); | |
305 return bytes; | |
306 } | |
307 */ | |
308 public this(ubyte[] data, int width, int height, Format format) { | |
309 this(data.ptr, width, height, format); | |
310 } | |
311 | |
312 public this(string fileName, string format = null) { | |
313 this(fileName, format == null ? null : toStringz(format)); | |
314 } | |
409
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
315 |
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
316 public final bool save(string fileName, string format, int quality = -1) { |
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
317 return private_save(fileName, toStringz(format), quality); |
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
318 } |
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
319 |
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
320 public final bool save(QIODevice dev, string format, int quality = -1) { |
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
321 return private_save(dev, toStringz(format), quality); |
4a943393a167
Added wrapper for QImage::save.
David Nadlinger <code@klickverbot.at>
parents:
402
diff
changeset
|
322 } |
71 | 323 }// class |
324 | |
325 class QPen___ extends QPen { | |
326 /* | |
327 public QPen(QColor color, double width, qt.core.Qt.PenStyle s, qt.core.Qt.PenCapStyle c, qt.core.Qt.PenJoinStyle j) { | |
328 this(new QBrush(color), width, s, c, j); | |
329 } | |
330 | |
331 public QPen(QColor color, double width, qt.core.Qt.PenStyle s, qt.core.Qt.PenCapStyle c) { | |
332 this(new QBrush(color), width, s, c); | |
333 } | |
334 | |
335 public QPen(QColor color, double width, qt.core.Qt.PenStyle s) { | |
336 this(new QBrush(color), width, s); | |
337 } | |
338 | |
339 public QPen(QColor color, double width) { | |
340 this(new QBrush(color), width); | |
341 } | |
342 | |
343 public static final QPen NoPen = new QPen(qt.core.Qt.PenStyle.NoPen); | |
344 */ | |
345 }// class | |
346 | |
347 class QColor___ extends QColor { | |
348 static this() { | |
349 White = new QColor(Qt.GlobalColor.white); | |
350 Black = new QColor(Qt.GlobalColor.black); | |
351 Red = new QColor(Qt.GlobalColor.red); | |
352 DarkRed = new QColor(Qt.GlobalColor.darkRed); | |
353 Green = new QColor(Qt.GlobalColor.green); | |
354 DarkGreen = new QColor(Qt.GlobalColor.darkGreen); | |
355 Blue = new QColor(Qt.GlobalColor.blue); | |
356 DarkBlue = new QColor(Qt.GlobalColor.darkBlue); | |
357 Cyan = new QColor(Qt.GlobalColor.cyan); | |
358 DarkCyan = new QColor(Qt.GlobalColor.darkCyan); | |
359 Magenta = new QColor(Qt.GlobalColor.magenta); | |
360 DarkMagenta = new QColor(Qt.GlobalColor.darkMagenta); | |
361 Yellow = new QColor(Qt.GlobalColor.yellow); | |
362 DarkYellow = new QColor(Qt.GlobalColor.darkYellow); | |
363 Gray = new QColor(Qt.GlobalColor.gray); | |
364 DarkGray = new QColor(Qt.GlobalColor.darkGray); | |
365 LightGray = new QColor(Qt.GlobalColor.lightGray); | |
366 Transparent = new QColor(Qt.GlobalColor.transparent); | |
367 Color0 = new QColor(Qt.GlobalColor.color0); | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
368 Color1 = new QColor(Qt.GlobalColor.color1); |
71 | 369 } |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
370 |
71 | 371 public static const QColor White; |
372 public static const QColor Black; | |
373 public static const QColor Red; | |
374 public static const QColor DarkRed; | |
375 public static const QColor Green; | |
376 public static const QColor DarkGreen; | |
377 public static const QColor Blue; | |
378 public static const QColor DarkBlue; | |
379 public static const QColor Cyan; | |
380 public static const QColor DarkCyan; | |
381 public static const QColor Magenta; | |
382 public static const QColor DarkMagenta; | |
383 public static const QColor Yellow; | |
384 public static const QColor DarkYellow; | |
385 public static const QColor Gray; | |
386 public static const QColor DarkGray; | |
387 public static const QColor LightGray; | |
388 public static const QColor Transparent; | |
389 public static const QColor Color0; | |
390 public static const QColor Color1; | |
391 | |
392 }// class | |
393 | |
394 class QTextLine___ extends QTextLine { | |
395 | |
396 public final void draw(QPainter painter, QPointF position) { | |
397 draw(painter, position, null); | |
398 } | |
399 | |
400 }// class | |
401 | |
402 class QKeySequence___ extends QKeySequence { | |
403 /* | |
404 @QtBlockedSlot | |
405 public final int toInt() { | |
406 return operator_cast_int(); | |
407 } | |
408 | |
409 @QtBlockedSlot | |
410 public final int at(int i) { | |
411 return operator_subscript(i); | |
412 } | |
413 */ | |
414 }// class | |
415 | |
416 class QPicture___ extends QPicture { | |
417 /* | |
418 public final boolean load(QIODevice dev) { | |
419 return load(dev, (QNativePointer) null); | |
420 } | |
421 | |
422 public final boolean load(String fileName) { | |
423 return load(fileName, (qt.QNativePointer) null); | |
424 } | |
425 | |
426 public final boolean save(QIODevice dev) { | |
427 return save(dev, (qt.QNativePointer) null); | |
428 } | |
429 | |
430 public final boolean save(String fileName) { | |
431 return save(fileName, (qt.QNativePointer) null); | |
432 } | |
433 | |
434 public final byte[] data() { | |
435 QNativePointer npData = data_private(); | |
436 if (npData == null) | |
437 return null; | |
438 byte returned[] = new byte[size()]; | |
439 for (int i = 0; i < returned.length; ++i) | |
440 returned[i] = npData.byteAt(i); | |
441 return returned; | |
442 } | |
443 */ | |
444 }// class | |
445 | |
446 class QRegion___ extends QRegion { | |
447 /* | |
448 public void setRects(qt.core.QRect[] rects) { | |
449 setRects(qt.core.QRect.nativePointerArray(rects), rects.length); | |
450 } | |
451 */ | |
452 }// class | |
453 | |
454 class QPolygon___ extends QPolygon { | |
455 | |
456 }// class | |
457 | |
458 class QPolygonF___ extends QPolygonF { | |
459 | |
460 }// class | |
461 | |
462 class QTextFrame_iterator___ extends QTextFrame_iterator { | |
463 | |
464 public final void opPostInc() { | |
465 operator_increment(); | |
466 } | |
467 | |
468 public final void opPostDec() { | |
469 operator_decrement(); | |
470 } | |
471 | |
472 }// class | |
473 | |
474 class QTextBlock_iterator___ extends QTextBlock_iterator { | |
475 | |
476 public final void opPostInc() { | |
477 operator_increment(); | |
478 } | |
479 | |
480 public final void opPostDec() { | |
481 operator_decrement(); | |
482 } | |
483 | |
484 }// class | |
485 | |
486 class QPixmap___ extends QPixmap { | |
487 | |
356 | 488 private import qtd.String; |
71 | 489 |
190 | 490 public this(string[] xpm) { |
71 | 491 this(toStringzArray(xpm)); |
492 } | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
493 |
71 | 494 public this(string fileName, string format = null, int flags = Qt.ImageConversionFlag.AutoColor) { |
495 this(fileName, toStringz(format), flags); | |
496 } | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
497 |
71 | 498 /* |
499 public this(string fileName, string format = null, Qt.ImageConversionFlags flags = Qt.ImageConversionFlag.AutoColor) { | |
500 this(fileName, toStringz(format), flags); | |
501 } | |
502 */ | |
503 | |
504 public final bool load(string fileName, string format, int flags = Qt.ImageConversionFlag.AutoColor) { | |
505 return load(fileName, toStringz(format), flags); | |
506 } | |
507 /* | |
508 public final bool load(string fileName, string format = null, Qt.ImageConversionFlags flags = Qt.ImageConversionFlag.AutoColor) { | |
509 return load(fileName, toStringz(format), flags); | |
510 } | |
511 */ | |
512 /* | |
513 public final bool loadFromData(ubyte[] data, string format, int flags = Qt.ImageConversionFlag.AutoColor) { | |
514 return loadFromData(data.ptr, data.length, toStringz(format), flags); | |
515 } | |
516 | |
517 public final bool loadFromData(ubyte[] data, string format = null, Qt.ImageConversionFlags flags = Qt.ImageConversionFlag.AutoColor) { | |
518 return loadFromData(qdata.ptr, data.length, toStringz(format), flags); | |
519 } | |
520 */ | |
521 | |
522 public final bool loadFromData(QByteArray data, string format, int flags = Qt.ImageConversionFlag.AutoColor) { | |
523 return loadFromData(data, toStringz(format), flags); | |
524 } | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
525 |
71 | 526 /* public final bool loadFromData(QByteArray data, string format = null, Qt.ImageConversionFlags flags = Qt.ImageConversionFlag.AutoColor) { |
527 return loadFromData(data, toStringz(format), flags); | |
528 } | |
529 */ | |
530 | |
531 public final bool save(string fileName, string format, int quality = -1) { | |
532 return private_save(fileName, toStringz(format), quality); | |
533 } | |
534 | |
535 public final bool save(QIODevice dev, string format, int quality = -1) { | |
536 return private_save(dev, toStringz(format), quality); | |
537 } | |
538 }// class | |
539 | |
540 class QItemSelection___ extends QItemSelection { | |
541 | |
542 public static void split(QItemSelectionRange range, QItemSelectionRange other, QItemSelection result) { | |
543 qt.QNativePointer np = result.nativePointer(); | |
544 split(range, other, np); | |
545 } | |
546 | |
547 }// class | |
548 | |
549 class QPainterPath_Element___ extends QPainterPath_Element { | |
550 /* | |
551 @QtBlockedSlot | |
552 public final qt.core.QPointF toPoint() { | |
553 return operator_cast_QPointF(); | |
554 } | |
555 */ | |
556 }// class | |
557 | |
558 class QBrush___ extends QBrush { | |
559 /* | |
560 public static final QBrush NoBrush = new QBrush(qt.core.Qt.BrushStyle.NoBrush); | |
561 */ | |
562 }// class | |
563 | |
564 class QAbstractItemView___ extends QAbstractItemView { | |
565 | |
566 private QAbstractItemDelegate[int] __rcDelegatesForColumns; | |
567 private QAbstractItemDelegate[int] __rcDelegatesForRows; | |
568 | |
569 }// class | |
570 | |
571 class QAccessibleTableInterface___ extends QAccessibleTableInterface { | |
572 | |
573 public static class CellAtIndex extends QTableArea { | |
574 public CellAtIndex(int row, int column, int rowSpan, int columnSpan, boolean isSelected) { | |
575 super(row, column, rowSpan, columnSpan); | |
576 this.isSelected = isSelected; | |
577 } | |
578 | |
579 public boolean isSelected; | |
580 } | |
581 | |
582 }// class | |
583 | |
584 class QAccessibleInterface___ extends QAccessibleInterface { | |
585 | |
586 public static class Target { | |
587 public Target(int childIndex, QAccessibleInterface target) { | |
588 this.childIndex = childIndex; | |
589 this.target = target; | |
590 } | |
591 | |
592 public QAccessibleInterface target; | |
593 public int childIndex; | |
594 } | |
595 | |
596 }// class | |
597 | |
598 class QDesktopServices___ extends QDesktopServices { | |
225 | 599 /* |
149 | 600 private static UrlHandler[string] __rcUrlHandlers; |
601 public static void setUrlHandler(string scheme, void delegate(QUrl) dg) { | |
602 UrlHandler receiver = dg !is null ? new UrlHandler(dg) : null; | |
71 | 603 |
149 | 604 if (receiver is null) |
71 | 605 __rcUrlHandlers.remove(scheme); |
606 else | |
149 | 607 __rcUrlHandlers[scheme] = receiver; |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
608 |
149 | 609 setUrlHandler(scheme, receiver, "handleUrl"); |
225 | 610 }*/ |
71 | 611 }// class |
612 | |
613 class QWizardPage___ extends QWizardPage { | |
614 | |
615 protected final void registerField(string name, QWidget widget, string property = null) { | |
616 registerField(name, widget, property is null ? null : toStringz(property), null); | |
617 } | |
618 | |
619 /** | |
620 * Creates a field called <code>name</code> associated with the given | |
621 * property of the given widget. From then on, that property becomes | |
622 * accessible using <code>field()</code> and <code>setField()</code>. | |
623 * Fields are global to the entire wizard and make it easy for any single | |
624 * page to access information stored by another page, without having to put | |
625 * all the logic in <code>QWizard</code> or having the pages know | |
626 * explicitly about each other. If name ends with an asterisk (*), the field | |
627 * is a mandatory field. When a page has mandatory fields, the Next and/or | |
628 * Finish buttons are enabled only when all mandatory fields are filled. | |
629 * This requires a <code>changedSignal</code> to be specified, to tell | |
630 * QWizard to recheck the value stored by the mandatory field. | |
631 * | |
632 * QWizard knows the most common Qt widgets. For these (or their | |
633 * subclasses), you don't need to specify a <code>property</code> or a | |
634 * <code>changedSignal</code>. The table below lists these widgets: | |
635 * | |
636 * <code>QAbstractButton</code> (for which the relevant property is the | |
637 * <code>checked</code> property), <code>QAbstractSlider</code> (the | |
638 * <code>value</code> property), <code>QComboBox</code> (<code>currentIndex</code> | |
639 * property), <code>QDateTimeEdit</code>(<code>dateTime</code> | |
640 * property), <code>QLineEdit</code>(<code>text</code> property), | |
641 * <code>QListWidget</code>(<code>currentRow</code> property), or | |
642 * <code>QSpinBox</code>(<code>value</code> property). | |
643 * | |
644 * @param name | |
645 * The name which will be used to access the field. Names ending | |
646 * with an asterisk signify mandatory fields. | |
647 * @param widget | |
648 * The widget whose property will be accessed using this field. | |
649 * @param property | |
650 * The name of the property associated with the field. | |
651 * @param changedSignal | |
652 * The name of a signal which is emitted when the associated | |
653 * property's value changes. | |
654 * | |
655 * @see qt.gui.QWizardPage#field | |
656 * @see qt.gui.QWizardPage#setField | |
657 */ | |
658 /* protected final void registerField(String name, QWidget widget, String property, String changedSignal) { | |
659 String signalSignature = qt.internal.MetaObjectTools.cppSignalSignature(widget, changedSignal); | |
660 if (signalSignature.length() == 0) | |
661 throw new QNoSuchSignalException("Signal '" + changedSignal | |
662 + "' does not exist or has argument types that cannot be converted to Qt Jambi or java.lang types."); | |
663 registerField(name, widget, qt.QNativePointer.createCharPointer(property), qt.QNativePointer | |
664 .createCharPointer(qt.internal.QtJambiInternal.SignalPrefix + signalSignature)); | |
665 } | |
666 */ | |
667 }// class | |
668 | |
669 class QFontDialog___ extends QFontDialog { | |
670 | |
671 public static final class Result { | |
672 public Result(QFont font, boolean ok) { | |
673 this.font = font; | |
674 this.ok = ok; | |
675 } | |
676 | |
677 public QFont font; | |
678 public boolean ok; | |
679 } | |
680 | |
681 }// class | |
682 | |
683 class QMenu___ extends QMenu { | |
684 /* | |
685 protected final void initStyleOption(qt.gui.QStyleOptionMenuItem option, QAction action) { | |
686 initStyleOption(option.nativePointer(), action); | |
687 } | |
688 */ | |
689 alias QWidget.addAction addAction; | |
690 }// class | |
691 | |
692 class QMenuBar___ extends QMenuBar { | |
693 alias QWidget.addAction addAction; | |
694 | |
695 }// class | |
696 | |
697 class QToolBar___ extends QToolBar { | |
698 /* | |
699 protected final void initStyleOption(qt.gui.QStyleOptionMenuItem option, QAction action) { | |
700 initStyleOption(option.nativePointer(), action); | |
701 } | |
702 */ | |
703 alias QWidget.addAction addAction; | |
704 }// class | |
705 | |
706 class QPixmapCache___ extends QPixmapCache { | |
707 | |
708 public static boolean find(String key, QPixmap pm) { | |
709 return find(key, pm.nativePointer()); | |
710 } | |
711 | |
712 }// class | |
713 | |
714 class QShortcut___ extends QShortcut { | |
715 | |
716 public this(QKeySequence key, QWidget parent, Qt.ShortcutContext context = Qt.WindowShortcut) { | |
717 this(key, parent, null, null, context); | |
718 } | |
719 | |
720 }// class | |
721 | |
722 class QValidator___ extends QValidator { | |
723 | |
724 public static class QValidationData { | |
725 public QValidationData(String input, int pos) { | |
726 string = input; | |
727 position = pos; | |
728 } | |
729 | |
730 public String string; | |
731 public int position; | |
732 } | |
733 | |
734 }// class | |
735 | |
736 class QAbstractButton___ extends QAbstractButton { | |
737 | |
738 /** | |
739 * Sets the shortcut to the key sequence for the given key string. For | |
740 * example "Ctrl+O" gives CTRL+'O'. The strings "Ctrl", "Shift", "Alt" and | |
741 * "Meta" are recognized, as well as their translated equivalents in the | |
742 * "QShortcut" context (using QObject::tr()). Up to four key codes may be | |
743 * entered by separating them with commas, e.g. "Alt+X,Ctrl+S,Q". | |
744 * | |
745 * @param key | |
746 * The description of the key sequence. Typically used with tr() | |
747 * so key sequences can be locale aware. | |
748 */ | |
749 public final void setShortcut(string key) { | |
750 setShortcut(new QKeySequence(key)); | |
751 } | |
752 | |
753 /** | |
754 * Sets the shortcut to the key sequence for the given key. The result will | |
755 * depend on the currently running platform. The key sequence will be based | |
756 * on the first element in the list of key bindings for the key. | |
757 * | |
758 * @param key | |
759 * The key for which to select a key sequence | |
760 */ | |
761 public final void setShortcut(QKeySequence.StandardKey key) { | |
762 setShortcut(new QKeySequence(key)); | |
763 } | |
764 | |
765 }// class | |
766 | |
767 class QStyle___ extends QStyle { | |
768 /* | |
769 @QtBlockedSlot | |
770 public final int combinedLayoutSpacing(QSizePolicy.ControlTypes controls1, QSizePolicy.ControlTypes controls2, | |
771 qt.core.Qt.Orientation orientation, QStyleOption option, QWidget widget) { | |
772 return combinedLayoutSpacing(controls1, controls2, orientation, option == null ? null : option.nativePointer(), widget); | |
773 } | |
774 | |
775 @QtBlockedSlot | |
776 public final int combinedLayoutSpacing(QSizePolicy.ControlTypes controls1, QSizePolicy.ControlTypes controls2, | |
777 qt.core.Qt.Orientation orientation, QStyleOption option) { | |
778 return combinedLayoutSpacing(controls1, controls2, orientation, option, null); | |
779 } | |
780 | |
781 @QtBlockedSlot | |
782 public final int combinedLayoutSpacing(QSizePolicy.ControlTypes controls1, QSizePolicy.ControlTypes controls2, | |
783 qt.core.Qt.Orientation orientation) { | |
784 return combinedLayoutSpacing(controls1, controls2, orientation, null); | |
785 } | |
786 | |
787 @QtBlockedSlot | |
788 public final int layoutSpacing(QSizePolicy.ControlType control1, QSizePolicy.ControlType control2, qt.core.Qt.Orientation orientation, | |
789 QStyleOption option, QWidget widget) { | |
790 return layoutSpacing(control1, control2, orientation, option == null ? null : option.nativePointer(), widget); | |
791 } | |
792 | |
793 @QtBlockedSlot | |
794 public final int layoutSpacing(QSizePolicy.ControlType control1, QSizePolicy.ControlType control2, qt.core.Qt.Orientation orientation, | |
795 QStyleOption option) { | |
796 return layoutSpacing(control1, control2, orientation, option, null); | |
797 } | |
798 | |
799 @QtBlockedSlot | |
800 public final int layoutSpacing(QSizePolicy.ControlType control1, QSizePolicy.ControlType control2, qt.core.Qt.Orientation orientation) { | |
801 return layoutSpacing(control1, control2, orientation, null); | |
802 } | |
803 */ | |
804 }// class | |
805 | |
806 class QLayout___ extends QLayout { | |
807 /* | |
808 @QtBlockedSlot | |
809 public final QContentsMargins getContentsMargins() { | |
810 QNativePointer left = new QNativePointer(QNativePointer.Type.Int); | |
811 QNativePointer top = new QNativePointer(QNativePointer.Type.Int); | |
812 QNativePointer right = new QNativePointer(QNativePointer.Type.Int); | |
813 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Int); | |
814 | |
815 getContentsMargins(left, top, right, bottom); | |
816 return new QContentsMargins(left.intValue(), top.intValue(), right.intValue(), bottom.intValue()); | |
817 } | |
818 | |
819 @QtBlockedSlot | |
820 public final void setContentsMargins(QContentsMargins margins) { | |
821 setContentsMargins(margins.left, margins.top, margins.right, margins.bottom); | |
822 } | |
823 */ | |
824 }// class | |
825 | |
826 class QGridLayout___ extends QGridLayout { | |
827 /* | |
828 public final QTableArea getItemPosition(int index) { | |
829 QNativePointer row = new QNativePointer(QNativePointer.Type.Int); | |
830 QNativePointer column = new QNativePointer(QNativePointer.Type.Int); | |
831 QNativePointer rowSpan = new QNativePointer(QNativePointer.Type.Int); | |
832 QNativePointer columnSpan = new QNativePointer(QNativePointer.Type.Int); | |
833 | |
834 getItemPosition(index, row, column, rowSpan, columnSpan); | |
835 | |
836 return new QTableArea(row.intValue(), column.intValue(), rowSpan.intValue(), columnSpan.intValue()); | |
837 } | |
838 */ | |
839 }// class | |
840 | |
841 class QWidget___ extends QWidget { | |
842 /* | |
843 private native static void __qt_QMessageBox_setWindowTitle(long native_id, String windowTitle); | |
844 | |
845 private native static void __qt_QMessageBox_setWindowModality(long native_id, int modality); | |
846 | |
847 @QtBlockedSlot | |
848 public final QContentsMargins getContentsMargins() { | |
849 QNativePointer left = new QNativePointer(QNativePointer.Type.Int); | |
850 QNativePointer top = new QNativePointer(QNativePointer.Type.Int); | |
851 QNativePointer right = new QNativePointer(QNativePointer.Type.Int); | |
852 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Int); | |
853 | |
854 getContentsMargins(left, top, right, bottom); | |
855 return new QContentsMargins(left.intValue(), top.intValue(), right.intValue(), bottom.intValue()); | |
856 } | |
857 | |
858 @QtBlockedSlot | |
859 public final void setContentsMargins(QContentsMargins margins) { | |
860 setContentsMargins(margins.left, margins.top, margins.right, margins.bottom); | |
861 } | |
862 */ | |
863 }// class | |
864 | |
865 class QFileDialog___ extends QFileDialog { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
866 |
71 | 867 public static string getOpenFileName(QWidget _parent, string caption = null, string dir = null, string filter = null) { |
868 string res; | |
869 string _selectedFilter = ""; | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
870 qtd_QFileDialog_getOpenFileName_QWidget_string_string_string_nativepointerstring_Options(&res, _parent is null ? null : _parent.qtdNativeId, caption, dir, filter, _selectedFilter, 0); |
71 | 871 return res; |
872 } | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
873 |
71 | 874 public static string getSaveFileName(QWidget _parent, string caption = null, string dir = null, string filter = null) { |
875 string res; | |
876 string _selectedFilter = ""; | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
877 qtd_QFileDialog_getSaveFileName_QWidget_string_string_string_nativepointerstring_Options(&res, _parent is null ? null : _parent.qtdNativeId, caption, dir, filter, _selectedFilter, 0); |
71 | 878 return res; |
879 } | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
880 |
71 | 881 public static class Filter { |
882 public this(string filter) { | |
883 this.filter = filter; | |
884 } | |
885 | |
886 public string filter; | |
887 public string selectedFilter = ""; | |
888 } | |
889 | |
890 }// class | |
891 | |
892 class QTabBar___ extends QTabBar { | |
893 | |
894 public final void initStyleOption(QStyleOptionTab option, int tabIndex) { | |
895 initStyleOption(option.nativePointer(), tabIndex); | |
896 } | |
897 | |
898 }// class | |
899 | |
900 class QClipboard___ extends QClipboard { | |
901 /* | |
902 public static class Text { | |
903 public String text; | |
904 public String subtype; | |
905 } | |
906 | |
907 public final Text text(String subtype, Mode mode) { | |
908 QNativePointer np = new QNativePointer(QNativePointer.Type.String); | |
909 np.setStringValue(subtype != null ? subtype : ""); | |
910 | |
911 Text returned = new Text(); | |
912 returned.text = text(np, mode); | |
913 returned.subtype = np.stringValue(); | |
914 return returned; | |
915 } | |
916 | |
917 public final Text text(String subtype) { | |
918 return text(subtype, Mode.Clipboard); | |
919 } | |
920 */ | |
921 }// class | |
922 | |
923 class QAbstractScrollArea___ extends QAbstractScrollArea { | |
924 /* | |
925 public QPaintEngine paintEngine() { | |
926 throw new RuntimeException("Cannot open a painter directly on a QAbstractScrollArea, open QPainter on its viewport instead..."); | |
927 } | |
928 */ | |
929 }// class | |
930 | |
931 class QTextDocument___ extends QTextDocument { | |
932 | |
933 public final void redo(QTextCursor cursor) { | |
934 redo(cursor.nativePointer()); | |
935 } | |
936 | |
937 public final void undo(QTextCursor cursor) { | |
938 undo(cursor.nativePointer()); | |
939 } | |
940 | |
941 }// class | |
942 | |
943 class QSplitter___ extends QSplitter { | |
944 | |
945 public struct Range { | |
346 | 946 public static Range opCall(int min, int max) { |
71 | 947 Range rng; |
346 | 948 rng.minimum = min; |
71 | 949 rng.maximum = max; |
346 | 950 return rng; |
71 | 951 } |
952 | |
953 public int minimum; | |
954 public int maximum; | |
955 } | |
956 | |
957 public final Range getRange(int index) { | |
346 | 958 Range range; |
959 getRange(index, &range.minimum, &range.maximum); | |
960 return range; | |
71 | 961 } |
962 | |
963 }// class | |
964 | |
965 class QAction___ extends QAction { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
966 |
71 | 967 public final void setShortcut(string key) { |
968 setShortcut(new QKeySequence(key)); | |
969 } | |
970 /* | |
971 private QActionGroup __rcActionGroup = null; | |
972 */ | |
973 /** | |
974 * Sets the shortcut to the key sequence for the given key string. For | |
975 * example "Ctrl+O" gives CTRL+'O'. The strings "Ctrl", "Shift", "Alt" and | |
976 * "Meta" are recognized, as well as their translated equivalents in the | |
977 * "QShortcut" context (using QObject::tr()). Up to four key codes may be | |
978 * entered by separating them with commas, e.g. "Alt+X,Ctrl+S,Q". | |
979 * | |
980 * @param key | |
981 * The description of the key sequence. Typically used with tr() | |
982 * so key sequences can be locale aware. | |
983 */ | |
984 /* public final void setShortcut(String key) { | |
985 setShortcut(new QKeySequence(key)); | |
986 } | |
987 */ | |
988 /** | |
989 * Sets the shortcut to the key sequence for the given key. The result will | |
990 * depend on the currently running platform. The key sequence will be based | |
991 * on the first element in the list of key bindings for the key. | |
992 * | |
993 * @param key | |
994 * The key for which to select a key sequence | |
995 */ | |
996 /* public final void setShortcut(QKeySequence.StandardKey key) { | |
997 setShortcut(new QKeySequence(key)); | |
998 } | |
999 | |
1000 public final void setIcon(QPixmap pm) { | |
1001 setIcon(new QIcon(pm)); | |
1002 } | |
1003 */ | |
1004 }// class | |
1005 | |
1006 class QPainter___ extends QPainter { | |
1007 | |
1008 public final void setBrush(QColor color) { | |
1009 setBrush(new QBrush(color)); | |
1010 } | |
1011 | |
1012 public final void setBrush(QGradient gradient) { | |
1013 setBrush(new QBrush(gradient)); | |
1014 } | |
1015 | |
1016 public final void setBrush(QPixmap pm) { | |
1017 setBrush(new QBrush(pm)); | |
1018 } | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1019 |
192 | 1020 public final void drawConvexPolygon(in QPoint[] points) { |
402 | 1021 qtd_QPainter_drawConvexPolygon_nativepointerQPoint_int(qtdNativeId, points.ptr, cast(int)points.length); |
71 | 1022 } |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1023 |
192 | 1024 public final void drawConvexPolygon(in QPointF[] points) { |
402 | 1025 qtd_QPainter_drawConvexPolygon_nativepointerQPointF_int(qtdNativeId, points.ptr, cast(int)points.length); |
71 | 1026 } |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1027 |
192 | 1028 public final void drawLines(in QLine[] lines) { |
402 | 1029 qtd_QPainter_drawLines_nativepointerQLine_int(qtdNativeId, lines.ptr, cast(int)lines.length); |
71 | 1030 } |
1031 | |
192 | 1032 public final void drawLines(in QLineF[] lines) { |
402 | 1033 qtd_QPainter_drawLines_nativepointerQLineF_int(qtdNativeId, lines.ptr, cast(int)lines.length); |
71 | 1034 } |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1035 |
337 | 1036 public final void drawPolygon(in QPoint[] points, Qt.FillRule fillRule = Qt.FillRule.OddEvenFill) { |
402 | 1037 qtd_QPainter_drawPolygon_nativepointerQPoint_int_FillRule(qtdNativeId, points.ptr, cast(int)points.length, fillRule); |
71 | 1038 } |
1039 | |
337 | 1040 public final void drawPolygon(in QPointF[] points, Qt.FillRule fillRule = Qt.FillRule.OddEvenFill) { |
402 | 1041 qtd_QPainter_drawPolygon_nativepointerQPointF_int_FillRule(qtdNativeId, points.ptr, cast(int)points.length, fillRule); |
71 | 1042 } |
1043 | |
192 | 1044 public final void drawPolyline(in QPoint[] points) { |
402 | 1045 qtd_QPainter_drawPolyline_nativepointerQPoint_int(qtdNativeId, points.ptr, cast(int)points.length); |
71 | 1046 } |
1047 | |
192 | 1048 public final void drawPolyline(in QPointF[] points) { |
402 | 1049 qtd_QPainter_drawPolyline_nativepointerQPointF_int(qtdNativeId, points.ptr, cast(int)points.length); |
71 | 1050 } |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1051 |
192 | 1052 public final void drawPoints(in QPoint[] points) { |
402 | 1053 qtd_QPainter_drawPoints_nativepointerQPoint_int(qtdNativeId, points.ptr, cast(int)points.length); |
71 | 1054 } |
1055 | |
192 | 1056 public final void drawPoints(in QPointF[] points) { |
402 | 1057 qtd_QPainter_drawPoints_nativepointerQPointF_int(qtdNativeId, points.ptr, cast(int)points.length); |
71 | 1058 } |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1059 |
192 | 1060 public final void drawRects(in QRect[] rects) { |
402 | 1061 qtd_QPainter_drawRects_nativepointerQRect_int(qtdNativeId, rects.ptr, cast(int)rects.length); |
71 | 1062 } |
1063 | |
192 | 1064 public final void drawRects(in QRectF[] rects) { |
402 | 1065 qtd_QPainter_drawRects_nativepointerQRectF_int(qtdNativeId, rects.ptr, cast(int)rects.length); |
71 | 1066 } |
1067 /* | |
1068 public static QPaintDeviceInterface redirected(QPaintDeviceInterface device, qt.core.QPoint offset) { | |
1069 return redirected(device, offset == null ? null : offset.nativePointer()); | |
1070 } | |
1071 | |
1072 public QPainter(QWidget widget) { | |
1073 this(); | |
1074 begin(widget); | |
1075 } | |
1076 | |
1077 public boolean begin(QWidget widget) { // can't be final because of QStylePainter | |
1078 return qt.QtJambiGuiInternal.beginPaint(widget, this); | |
1079 } | |
1080 | |
1081 private static java.util.Stack<QPaintDeviceInterface> __rcRedirections = new java.util.Stack<QPaintDeviceInterface>(); | |
1082 */ | |
1083 }// class | |
1084 | |
1085 class QApplication___ extends QApplication { | |
1086 | |
188 | 1087 this(string[] args) |
71 | 1088 { |
1089 // if (m_instance != null) | |
1090 // throw new RuntimeException("QCoreApplication can only be initialized once"); | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1091 |
402 | 1092 argc = cast(int)args.length; |
71 | 1093 argv = toStringzArray(args); |
1094 this(&argc, argv); | |
1095 | |
1096 // m_instance.aboutToQuit.connect(m_instance, "disposeOfMyself()"); | |
1097 } | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1098 |
71 | 1099 private int argc; |
1100 private char **argv; | |
1101 | |
1102 /* public static QApplication instance() { | |
1103 if (type() != Type.Tty) | |
1104 return (QApplication) qt.core.QCoreApplication.instance(); | |
1105 return null; | |
1106 } | |
1107 | |
1108 public QApplication(String args[]) { | |
1109 this(argc(args), argv(args)); | |
154 | 1110 }*/ |
1111 | |
1112 public static void setFont(QFont font, string className = null) { | |
1113 setFont_private(font, className !is null ? toStringz(className) : null); | |
71 | 1114 } |
1115 | |
154 | 1116 public static void setPalette(QPalette palette, string className = null) { |
1117 setPalette_private(palette, className !is null ? toStringz(className) : null); | |
71 | 1118 } |
154 | 1119 /* |
71 | 1120 public static QCursor overrideCursor() { |
1121 QNativePointer np = overrideCursor_private(); | |
1122 return np == null ? null : QCursor.fromNativePointer(np); | |
1123 } | |
1124 */ | |
1125 }// class | |
1126 | |
1127 class QFormLayout___ extends QFormLayout { | |
1128 | |
1129 /** | |
1130 * Retrieves the row and role (column) of the item at the specified index. | |
1131 * If index is out of bounds, -1 is returned in place of the row. | |
1132 * | |
1133 * @param index The index of the item for which to retrieve the position. | |
1134 * @return A pair of an int (row of item) and an ItemRole (role of the item.) | |
1135 **/ | |
1136 /* @QtBlockedSlot | |
1137 public final qt.QPair<Integer, ItemRole> getItemPosition(int index) { | |
1138 qt.QNativePointer row = new qt.QNativePointer(qt.QNativePointer.Type.Int); | |
1139 qt.QNativePointer role = new qt.QNativePointer(qt.QNativePointer.Type.Int); | |
1140 | |
1141 getItemPosition(index, row, role); | |
1142 | |
1143 return new qt.QPair<Integer, ItemRole>(row.intValue(), ItemRole.resolve(role.intValue())); | |
1144 } | |
1145 */ | |
1146 /** | |
1147 * Retrieves the row and role (column) of the specified child layout. | |
1148 * If the layout is not in the form layout, -1 is returned in place of the row. | |
1149 * | |
1150 * @param layout The layout for which to retrieve the position. | |
1151 * @return A pair of an int (row of item) and an ItemRole (role of the item.) | |
1152 */ | |
1153 /* @QtBlockedSlot | |
1154 public final qt.QPair<Integer, ItemRole> getLayoutPosition(QLayout layout) { | |
1155 qt.QNativePointer row = new qt.QNativePointer(qt.QNativePointer.Type.Int); | |
1156 qt.QNativePointer role = new qt.QNativePointer(qt.QNativePointer.Type.Int); | |
1157 | |
1158 getLayoutPosition(layout, row, role); | |
1159 | |
1160 return new qt.QPair<Integer, ItemRole>(row.intValue(), ItemRole.resolve(role.intValue())); | |
1161 } | |
1162 */ | |
1163 /** | |
1164 * Retrieves the row and role (column) of the specified widget in the layout. | |
1165 * If the widget is not in the form layout, -1 is returned in place of the row. | |
1166 * | |
1167 * @param widget The widget for which to retrieve the position. | |
1168 * @return A pair of an int (row of item) and an ItemRole (role of the item.) | |
1169 */ | |
1170 /* @QtBlockedSlot | |
1171 public final qt.QPair<Integer, ItemRole> getWidgetPosition(QWidget widget) { | |
1172 qt.QNativePointer row = new qt.QNativePointer(qt.QNativePointer.Type.Int); | |
1173 qt.QNativePointer role = new qt.QNativePointer(qt.QNativePointer.Type.Int); | |
1174 | |
1175 getWidgetPosition(widget, row, role); | |
1176 | |
1177 return new qt.QPair<Integer, ItemRole>(row.intValue(), ItemRole.resolve(role.intValue())); | |
1178 } | |
1179 */ | |
1180 /** | |
1181 * Sets the item in the given row for the given role to item, extending the layout with empty rows if necessary. | |
1182 * If the cell is already occupied, the item is not inserted and a IllegalArgumentException is thrown. | |
1183 */ | |
1184 /* @QtBlockedSlot | |
1185 public final void setItem(int row, ItemRole role, QLayoutItem item) { | |
1186 if (itemAt(row, role) == null) | |
1187 setItem_private(row, role, item); | |
1188 else | |
1189 throw new IllegalArgumentException("Cell in form layout is already occupied"); | |
1190 } | |
1191 */ | |
1192 }// class | |
1193 | |
1194 class Subclass_of_QGraphicsLayoutItem___ extends QGraphicsLayoutItem { | |
1195 /* | |
1196 @QtBlockedSlot | |
1197 public final QMarginsF getContentsMargins() { | |
1198 QNativePointer left = new QNativePointer(QNativePointer.Type.Double); | |
1199 QNativePointer top = new QNativePointer(QNativePointer.Type.Double); | |
1200 QNativePointer right = new QNativePointer(QNativePointer.Type.Double); | |
1201 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Double); | |
1202 | |
1203 getContentsMargins(left, top, right, bottom); | |
1204 return new QMarginsF(left.doubleValue(), top.doubleValue(), right.doubleValue(), bottom.doubleValue()); | |
1205 }*/ | |
1206 }// class | |
1207 | |
1208 class QGraphicsWidget___ extends QGraphicsWidget { | |
1209 | |
1210 /* | |
1211 * Gets the widget's window frame margins. | |
1212 * | |
1213 * @returns An object containing the margins in left, right, top and bottom coordinates. | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1214 |
71 | 1215 @QtBlockedSlot |
1216 public final QMarginsF getWindowFrameMargins() { | |
1217 QNativePointer left = new QNativePointer(QNativePointer.Type.Double); | |
1218 QNativePointer top = new QNativePointer(QNativePointer.Type.Double); | |
1219 QNativePointer right = new QNativePointer(QNativePointer.Type.Double); | |
1220 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Double); | |
1221 | |
1222 getWindowFrameMargins(left, top, right, bottom); | |
1223 return new QMarginsF(left.doubleValue(), top.doubleValue(), right.doubleValue(), bottom.doubleValue()); | |
1224 } | |
1225 */ | |
1226 | |
1227 }// class | |
1228 | |
1229 class QPrinter___ extends QPrinter { | |
1230 | |
1231 /** | |
1232 * Returns the page margins for this printer. | |
1233 * The unit of the returned margins are specified with the unit parameter. | |
1234 * This function was introduced in Qt 4.4. | |
1235 * | |
1236 * @param unit Specifies the unit of the returned margins. | |
1237 * @return The page margins for this printer. | |
1238 */ | |
1239 /* public final QMarginsF getPageMargins(QPrinter.Unit unit) { | |
1240 QNativePointer left = new QNativePointer(QNativePointer.Type.Double); | |
1241 QNativePointer top = new QNativePointer(QNativePointer.Type.Double); | |
1242 QNativePointer right = new QNativePointer(QNativePointer.Type.Double); | |
1243 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Double); | |
1244 | |
1245 getPageMargins(left, top, right, bottom, unit); | |
1246 return new QMarginsF(left.doubleValue(), top.doubleValue(), right.doubleValue(), bottom.doubleValue()); | |
1247 }*/ | |
1248 | |
1249 }// class | |
1250 | |
1251 class QListWidget___ extends QListWidget { | |
1252 | |
1253 /** | |
1254 * Inserts items with the text labels at the end of the list widget. | |
1255 * | |
1256 * @param labels The collection of labels for the new items. | |
1257 */ | |
1258 public final void addItems(string[] labels) { | |
1259 foreach (label; labels) | |
1260 addItem(label); | |
1261 } | |
1262 | |
1263 /** | |
1264 * This is an overloaded member function, provided for convenience. | |
1265 * Inserts an item with the text label in the list widget at the position given by row. | |
1266 * | |
1267 * @param row The position in which to insert the new item. | |
1268 * @param label The text of the new item. | |
1269 */ | |
1270 public final void insertItem(int row, string label) { | |
1271 insertItem(row, new QListWidgetItem(label, this)); | |
1272 } | |
1273 | |
1274 /** | |
1275 * Inserts items from the list of labels into the list, starting at the given row. | |
1276 * | |
1277 * @param row The position in which to insert the new items. | |
1278 * @param labels The collection of labels for the new items. | |
1279 */ | |
1280 public final void insertItems(int row, string[] labels) { | |
1281 foreach (label; labels) | |
1282 insertItem(row++, label); | |
1283 } | |
1284 }// class | |
1285 | |
1286 | |
1287 class QGraphicsScene___ extends QGraphicsScene { | |
1288 /** | |
1289 * Equivalent to addEllipse(rect, null, null) | |
1290 */ | |
1291 /*public final QGraphicsEllipseItem addEllipse(qt.core.QRectF rect) | |
1292 { | |
1293 return addEllipse(rect, null); | |
1294 }*/ | |
1295 | |
1296 /** | |
1297 * Equivalent to addEllipse(rect, pen, null) | |
1298 */ | |
1299 /* public final QGraphicsEllipseItem addEllipse(qt.core.QRectF rect, QPen pen) | |
1300 { | |
1301 return addEllipse(rect, pen, null); | |
1302 }*/ | |
1303 | |
1304 | |
1305 /** | |
1306 * Creates and adds an ellipse item to the scene, and returns the item | |
1307 * reference. The geometry of the ellipse is defined by rect, and its pen | |
1308 * and brush are initialized to pen and brush. | |
1309 * | |
1310 * Note that the item's geometry is provided in item coordinates, and its | |
1311 * position is initialized to (0, 0). | |
1312 * | |
1313 * If the item is visible (i.e., QGraphicsItem::isVisible() returns true), | |
1314 * QGraphicsScene will emit changed() once control goes back to the event | |
1315 * loop. | |
1316 * | |
1317 * @param rect The bounding rectangle of the ellipse. | |
1318 * @param pen The pen for the resulting QGraphicsEllipseItem. | |
1319 * @param brush The brush for the resulting QGraphicsEllipseItem. | |
1320 * @return The resulting item. | |
1321 */ | |
1322 /* public final QGraphicsEllipseItem addEllipse(qt.core.QRectF rect, QPen pen, QBrush brush) | |
1323 { | |
1324 return addEllipse(rect.x(), rect.y(), rect.width(), rect.height(), pen, brush); | |
1325 }*/ | |
1326 | |
1327 /** | |
1328 * Equivalent to addEllipse(x, y, w, h, null, null) | |
1329 */ | |
1330 /* public final QGraphicsEllipseItem addEllipse(double x, double y, double w, double h) { | |
1331 return addEllipse(x, y, w, h, null); | |
1332 }*/ | |
1333 | |
1334 /** | |
1335 * Equivalent to addEllipse(x, y, w, h, pen, null) | |
1336 */ | |
1337 /* public final QGraphicsEllipseItem addEllipse(double x, double y, double w, double h, QPen pen) | |
1338 { | |
1339 return addEllipse(x, y, w, h, pen, null); | |
1340 }*/ | |
1341 | |
1342 /** | |
1343 * Creates and adds an ellipse item to the scene, and returns the item | |
1344 * reference. The geometry of the ellipse is defined by x, y, w, h, and its pen | |
1345 * and brush are initialized to pen and brush. | |
1346 * | |
1347 * Note that the item's geometry is provided in item coordinates, and its | |
1348 * position is initialized to (0, 0). | |
1349 * | |
1350 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1351 * QGraphicsScene will emit changed once control goes back to the event | |
1352 * loop. | |
1353 * | |
1354 * @param x The left horizontal coordinate of the ellipse's bounding rectangle. | |
1355 * @param y The top vertical coordinate of the ellipse's bounding rectangle. | |
1356 * @param w The width of the ellipse's bounding rectangle. | |
1357 * @param h The height of the ellipse's bounding rectangle. | |
1358 * @param pen The pen for the resulting QGraphicsEllipseItem. | |
1359 * @param brush The brush for the resulting QGraphicsEllipseItem. | |
1360 * @return The resulting item. | |
1361 */ | |
1362 /* public final QGraphicsEllipseItem addEllipse(double x, double y, double w, double h, QPen pen, QBrush brush) | |
1363 { | |
1364 QGraphicsEllipseItem item = new QGraphicsEllipseItem(x, y, w, h); | |
1365 item.setPen(pen); | |
1366 item.setBrush(brush); | |
1367 | |
1368 addItem(item); | |
1369 | |
1370 return item; | |
1371 }*/ | |
1372 | |
1373 /** | |
1374 * Equivalent to addLine(line, null) | |
1375 */ | |
1376 /* public final QGraphicsLineItem addLine(QLineF line) { | |
1377 return addLine(line, null); | |
1378 }*/ | |
1379 | |
1380 /** | |
1381 * Creates and adds a line item to the scene, and returns the item | |
1382 * reference. The geometry of the line is defined by line, and its pen | |
1383 * is initialized to pen. | |
1384 * | |
1385 * Note that the item's geometry is provided in item coordinates, and its | |
1386 * position is initialized to (0, 0). | |
1387 * | |
1388 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1389 * QGraphicsScene will emit changed once control goes back to the event | |
1390 * loop. | |
1391 * | |
1392 * @param line The definition of the line. | |
1393 * @param pen The pen with which to draw the line. | |
1394 * @return The resulting item. | |
1395 */ | |
1396 /* public final QGraphicsLineItem addLine(QLineF line, QPen pen) | |
1397 { | |
1398 return addLine(line.x1(), line.y1(), line.x2(), line.y2(), pen); | |
1399 }*/ | |
1400 | |
1401 /** | |
1402 * Equivalent to addLine(x1, y1, x2, y2, null) | |
1403 */ | |
1404 /* public final QGraphicsLineItem addLine(double x1, double y1, double x2, double y2) { | |
1405 return addLine(x1, y1, x2, y2, null); | |
1406 }*/ | |
1407 | |
1408 /** | |
1409 * Creates and adds a line item to the scene, and returns the item | |
1410 * reference. The geometry of the line is defined by x1, y1, x2, y2, and its pen | |
1411 * is initialized to pen. | |
1412 * | |
1413 * Note that the item's geometry is provided in item coordinates, and its | |
1414 * position is initialized to (0, 0). | |
1415 * | |
1416 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1417 * QGraphicsScene will emit changed once control goes back to the event | |
1418 * loop. | |
1419 * | |
1420 * @param x1 The first horizontal coordinate of the line. | |
1421 * @param y1 The first vertical coordinate of the line. | |
1422 * @param x2 The second horizontal coordinate of the line. | |
1423 * @param y2 The second vertical coordinate of the line. | |
1424 * @param pen The pen with which to draw the line. | |
1425 * @return The resulting item. | |
1426 */ | |
1427 /* public final QGraphicsLineItem addLine(double x1, double y1, double x2, double y2, QPen pen) | |
1428 { | |
1429 QGraphicsLineItem item = new QGraphicsLineItem(x1, y1, x2, y2); | |
1430 item.setPen(pen); | |
1431 | |
1432 addItem(item); | |
1433 | |
1434 return item; | |
1435 }*/ | |
1436 | |
1437 | |
1438 /** | |
1439 * Equivalent to addPath(path, null, null) | |
1440 */ | |
1441 /*public final QGraphicsPathItem addPath(QPainterPath path) { | |
1442 return addPath(path, null); | |
1443 }*/ | |
1444 | |
1445 /** | |
1446 * Equivalent to addPath(path, pen, null) | |
1447 */ | |
1448 /*public final QGraphicsPathItem addPath(QPainterPath path, QPen pen) | |
1449 { | |
1450 return addPath(path, pen, null); | |
1451 }*/ | |
1452 /** | |
1453 * Creates and adds a path item to the scene, and returns the item | |
1454 * reference. The geometry of the path is defined by path, and its pen and | |
1455 * brush are initialized to pen and brush. | |
1456 * | |
1457 * Note that the item's geometry is provided in item coordinates, and its | |
1458 * position is initialized to (0, 0). | |
1459 * | |
1460 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1461 * QGraphicsScene will emit changed once control goes back to the event | |
1462 * loop. | |
1463 * | |
1464 * @param path The definition of the path. | |
1465 * @param pen The pen for drawing the path. | |
1466 * @param brush The brush for drawing the path. | |
1467 * @return The resulting item. | |
1468 */ | |
1469 /* public final QGraphicsPathItem addPath(QPainterPath path, QPen pen, QBrush brush) | |
1470 { | |
1471 QGraphicsPathItem item = new QGraphicsPathItem(path); | |
1472 item.setPen(pen); | |
1473 item.setBrush(brush); | |
1474 | |
1475 addItem(item); | |
1476 | |
1477 return item; | |
1478 }*/ | |
1479 | |
1480 /** | |
1481 * Creates and adds a pixmap item to the scene, and returns the item | |
1482 * reference. The pixmap is defined by pixmap. | |
1483 * | |
1484 * Note that the item's geometry is provided in item coordinates, and its | |
1485 * position is initialized to (0, 0). | |
1486 * | |
1487 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1488 * QGraphicsScene will emit changed once control goes back to the event | |
1489 * loop. | |
1490 * | |
1491 * @param pixmap The pixmap for which to create a graphics item. | |
1492 * @return The resulting item. | |
1493 */ | |
1494 /* public final QGraphicsPixmapItem addPixmap(QPixmap pixmap) | |
1495 { | |
1496 QGraphicsPixmapItem item = new QGraphicsPixmapItem(pixmap); | |
1497 | |
1498 addItem(item); | |
1499 | |
1500 return item; | |
1501 }*/ | |
1502 | |
1503 /** | |
1504 * Equivalent to addPolygon(polygon, null, null) | |
1505 */ | |
1506 /* public final QGraphicsPolygonItem addPolygon(QPolygonF polygon) { | |
1507 return addPolygon(polygon, null); | |
1508 }*/ | |
1509 | |
1510 /** | |
1511 * Equivalent to addPolygon(polygon, pen, null) | |
1512 */ | |
1513 /* public final QGraphicsPolygonItem addPolygon(QPolygonF polygon, QPen pen) { | |
1514 return addPolygon(polygon, pen, null); | |
1515 }*/ | |
1516 | |
1517 /** | |
1518 * Creates and adds a polygon item to the scene, and returns the item | |
1519 * reference. The polygon is defined by polygon, and its pen and | |
1520 * brush are initialized to pen and brush. | |
1521 * | |
1522 * Note that the item's geometry is provided in item coordinates, and its | |
1523 * position is initialized to (0, 0). | |
1524 * | |
1525 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1526 * QGraphicsScene will emit changed once control goes back to the event | |
1527 * loop. | |
1528 * | |
1529 * @param polygon The definition of the polygon. | |
1530 * @param pen The pen with which to draw the polygon. | |
1531 * @param brush The brush with which to draw the polygon. | |
1532 * @return The resulting item. | |
1533 */ | |
1534 /* public final QGraphicsPolygonItem addPolygon(QPolygonF polygon, QPen pen, QBrush brush) | |
1535 { | |
1536 QGraphicsPolygonItem item = new QGraphicsPolygonItem(polygon); | |
1537 item.setPen(pen); | |
1538 item.setBrush(brush); | |
1539 | |
1540 addItem(item); | |
1541 | |
1542 return item; | |
1543 }*/ | |
1544 | |
1545 /** | |
1546 * Equivalent to addRect(rect, null, null) | |
1547 */ | |
1548 /* public final QGraphicsRectItem addRect(qt.core.QRectF rect) { | |
1549 return addRect(rect, null); | |
1550 }*/ | |
1551 | |
1552 /** | |
1553 * Equivalent to addRect(rect, pen, null) | |
1554 */ | |
1555 /* public final QGraphicsRectItem addRect(qt.core.QRectF rect, QPen pen) | |
1556 { | |
1557 return addRect(rect, pen, null); | |
1558 }*/ | |
1559 | |
1560 /** | |
1561 * Creates and adds a rectangle item to the scene, and returns the item | |
1562 * reference. The geometry of the rectangle is defined by rect, and its pen | |
1563 * and brush are initialized to pen and brush. | |
1564 * | |
1565 * Note that the item's geometry is provided in item coordinates, and its | |
1566 * position is initialized to (0, 0). For example, if a QRect(50, 50, 100, | |
1567 * 100) is added, its top-left corner will be at (50, 50) relative to the | |
1568 * origin in the item's coordinate system. | |
1569 * | |
1570 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1571 * QGraphicsScene will emit changed once control goes back to the event | |
1572 * loop. | |
1573 * | |
1574 * @param rect The definition of the rectangle. | |
1575 * @param pen The pen with which to draw the rectangle. | |
1576 * @param brush The brush with which to draw the rectangle. | |
1577 * @return The resulting item. | |
1578 */ | |
1579 /* public final QGraphicsRectItem addRect(qt.core.QRectF rect, QPen pen, QBrush brush) | |
1580 { | |
1581 return addRect(rect.x(), rect.y(), rect.width(), rect.height(), pen, brush); | |
1582 }*/ | |
1583 | |
1584 /** | |
1585 * Equivalent to addRect(x, y, w, h, null, null) | |
1586 */ | |
1587 /* public final QGraphicsRectItem addRect(double x, double y, double w, double h) { | |
1588 return addRect(x, y, w, h, null); | |
1589 }*/ | |
1590 | |
1591 /** | |
1592 * Equivalent to addRect(x, y, w, h, pen, null) | |
1593 */ | |
1594 /* public final QGraphicsRectItem addRect(double x, double y, double w, double h, QPen pen) { | |
1595 return addRect(x, y, w, h, pen, null); | |
1596 }*/ | |
1597 | |
1598 /** | |
1599 * Creates and adds a rectangle item to the scene, and returns the item | |
1600 * reference. The geometry of the rectangle is defined by x, y, w, h, and its pen | |
1601 * and brush are initialized to pen and brush. | |
1602 * | |
1603 * Note that the item's geometry is provided in item coordinates, and its | |
1604 * position is initialized to (0, 0). | |
1605 * | |
1606 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1607 * QGraphicsScene will emit changed once control goes back to the event | |
1608 * loop. | |
1609 * | |
1610 * @param x The left horizontal coordinate of the rectangle. | |
1611 * @param y The top vertical coordinate of the rectangle. | |
1612 * @param w The width of the rectangle. | |
1613 * @param h The height of the rectangle. | |
1614 * @param pen The pen with which to draw the rectangle. | |
1615 * @param brush The brush with which to draw the rectangle. | |
1616 * @return The resulting item. | |
1617 */ | |
1618 /* public final QGraphicsRectItem addRect(double x, double y, double w, double h, QPen pen, QBrush brush) | |
1619 { | |
1620 QGraphicsRectItem item = new QGraphicsRectItem(x, y, w, h); | |
1621 item.setPen(pen); | |
1622 item.setBrush(brush); | |
1623 | |
1624 addItem(item); | |
1625 | |
1626 return item; | |
1627 }*/ | |
1628 | |
1629 /** | |
1630 * Equivalent to addSimpleText(text, null) | |
1631 */ | |
1632 /*public final QGraphicsSimpleTextItem addSimpleText(String text) { | |
1633 return addSimpleText(text, null); | |
1634 }*/ | |
1635 | |
1636 /** | |
1637 * Creates and adds a QGraphicsSimpleTextItem to the scene, and returns the | |
1638 * item reference. The text string is initialized to text, and its font is | |
1639 * initialized to font. | |
1640 * | |
1641 * The item's position is initialized to (0, 0). | |
1642 * | |
1643 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1644 * QGraphicsScene will emit changed once control goes back to the event | |
1645 * loop. | |
1646 * | |
1647 * @param text The text to add to the scene. | |
1648 * @param font The font to use for displaying the text. | |
1649 * @return The resulting item. | |
1650 */ | |
1651 /* public final QGraphicsSimpleTextItem addSimpleText(String text, QFont font) | |
1652 { | |
1653 QGraphicsSimpleTextItem item = new QGraphicsSimpleTextItem(text); | |
1654 item.setFont(font); | |
1655 | |
1656 addItem(item); | |
1657 | |
1658 return item; | |
1659 }*/ | |
1660 | |
1661 /** | |
1662 * Equivalent to addText(text, null) | |
1663 */ | |
1664 /* public final QGraphicsTextItem addText(String text) { | |
1665 return addText(text, null); | |
1666 }*/ | |
1667 | |
1668 /** | |
1669 * Creates and adds a text item to the scene, and returns the item | |
1670 * reference. The text string is initialized to text, and its font | |
1671 * is initialized to font. | |
1672 * | |
1673 * The item's position is initialized to (0, 0). | |
1674 * | |
1675 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true), | |
1676 * QGraphicsScene will emit changed once control goes back to the event | |
1677 * loop. | |
1678 * | |
1679 * @param text The text to add to the scene. | |
1680 * @param font The font to use for displaying the text. | |
1681 * @return The resulting item. | |
1682 */ | |
1683 /* public final QGraphicsTextItem addText(String text, QFont font) | |
1684 { | |
1685 QGraphicsTextItem item = new QGraphicsTextItem(text); | |
1686 item.setFont(font); | |
1687 | |
1688 addItem(item); | |
1689 | |
1690 return item; | |
1691 }*/ | |
1692 | |
1693 }// class | |
1694 | |
1695 class QInputDialog___ extends QInputDialog { | |
1696 public static double getDouble(QWidget _parent, string title, string label, double value = 0, double minValue = -2147483647, double maxValue = 2147483647, int decimals = 1, ref bool ok = false, int flags = 0) { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1697 return qtd_QInputDialog_getDouble_private_QWidget_string_string_double_double_double_int_nativepointerbool_WindowFlags(_parent is null ? null : _parent.qtdNativeId, title, label, value, minValue, maxValue, decimals, &ok, flags); |
71 | 1698 } |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1699 |
137 | 1700 static if (QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)) |
1701 { | |
298
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
1702 public static int getInt(QWidget _parent, string title, string label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, int step = 1, ref bool ok = false, int flags = 0) { |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1703 return qtd_QInputDialog_getInt_private_QWidget_string_string_int_int_int_int_nativepointerbool_WindowFlags(_parent is null ? null : _parent.qtdNativeId, title, label, value, minValue, maxValue, step, &ok, flags); |
298
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
1704 } |
71 | 1705 } |
1706 | |
298
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
1707 public static string getItem(QWidget _parent, string title, string label, QList!(string) items, int current = 0, bool editable = true, ref bool ok = false, int flags = 0) { |
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
1708 return getItem_private(_parent, title, label, items, current, editable, &ok, flags); |
71 | 1709 } |
1710 | |
337 | 1711 public static string getText(QWidget _parent, string title, string label, QLineEdit.EchoMode echo = QLineEdit.EchoMode.Normal, string text = null, ref bool ok = false, int flags = 0) { |
71 | 1712 string res; |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1713 qtd_QInputDialog_getText_private_QWidget_string_string_EchoMode_string_nativepointerbool_WindowFlags(&res, _parent is null ? null : _parent.qtdNativeId, title, label, echo, text, &ok, flags); |
71 | 1714 return res; |
1715 } | |
1716 }// class | |
210 | 1717 |
1718 class QFont___ extends QFont { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1719 version(D_Version2) |
210 | 1720 { |
1721 void opAssign(in QFont arg__1) { | |
372
a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents:
356
diff
changeset
|
1722 this.qtdNativeId = qtd_QFont_QFont_QFont(arg__1 is null ? null : (cast(QFont)arg__1).qtdNativeId); |
210 | 1723 } |
1724 } | |
1725 }// class" |