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