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