71
|
1 /****************************************************************************
|
|
2 **
|
|
3 ** Copyright (C) 1992-2008 Nokia. All rights reserved.
|
|
4 **
|
|
5 ** This file is part of Qt Jambi.
|
|
6 **
|
|
7 ** * Commercial Usage
|
|
8 * Licensees holding valid Qt Commercial licenses may use this file in
|
|
9 * accordance with the Qt Commercial License Agreement provided with the
|
|
10 * Software or, alternatively, in accordance with the terms contained in
|
|
11 * a written agreement between you and Nokia.
|
|
12 *
|
|
13 *
|
|
14 * GNU General Public License Usage
|
|
15 * Alternatively, this file may be used under the terms of the GNU
|
|
16 * General Public License versions 2.0 or 3.0 as published by the Free
|
|
17 * Software Foundation and appearing in the file LICENSE.GPL included in
|
|
18 * the packaging of this file. Please review the following information
|
|
19 * to ensure GNU General Public Licensing requirements will be met:
|
|
20 * http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
|
21 * http://www.gnu.org/copyleft/gpl.html. In addition, as a special
|
|
22 * exception, Nokia gives you certain additional rights. These rights
|
|
23 * are described in the Nokia Qt GPL Exception version 1.2, included in
|
|
24 * the file GPL_EXCEPTION.txt in this package.
|
|
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 public final QTreeWidgetItemIterator opAddAssign(int i) {
|
|
227 return operator_add_assign(i);
|
|
228 }
|
|
229
|
|
230 public final QTreeWidgetItemIterator opSubAssign(int i) {
|
|
231 return operator_subtract_assign(i);
|
|
232 }
|
|
233
|
|
234 public final QTreeWidgetItemIterator next() {
|
|
235 return operator_increment();
|
|
236 }
|
|
237
|
|
238 public final QTreeWidgetItemIterator previous() {
|
|
239 return operator_decrement();
|
|
240 }
|
|
241
|
|
242 public final QTreeWidgetItem current() {
|
|
243 return operator_multiply();
|
|
244 }
|
|
245 }// class
|
|
246
|
|
247 class QTextCursor___ extends QTextCursor {
|
|
248 /* public final QTableArea selectedTableCells() {
|
|
249 QNativePointer firstRow = new QNativePointer(QNativePointer.Type.Int);
|
|
250 QNativePointer numRows = new QNativePointer(QNativePointer.Type.Int);
|
|
251 QNativePointer firstColumn = new QNativePointer(QNativePointer.Type.Int);
|
|
252 QNativePointer numColumns = new QNativePointer(QNativePointer.Type.Int);
|
|
253
|
|
254 selectedTableCells(firstRow, numRows, firstColumn, numColumns);
|
|
255
|
|
256 return new QTableArea(firstRow.intValue(), firstColumn.intValue(), numRows.intValue(), numColumns.intValue());
|
|
257 }*/
|
|
258 }// class
|
|
259
|
|
260 class QComboBox___ extends QComboBox {
|
|
261
|
|
262 }// class
|
|
263
|
|
264 class QMatrix___ extends QMatrix {
|
|
265 /**
|
|
266 * Returns an inverted copy of this matrix.
|
|
267 *
|
|
268 * @return The inverse of the matrix.
|
|
269 * @throws IllegalArgumentException
|
|
270 * If this matrix is not invertible.
|
|
271 */
|
|
272 /* public final QMatrix inverted() {
|
|
273 QNativePointer ok = new QNativePointer(QNativePointer.Type.Boolean);
|
|
274 QMatrix returned = inverted(ok);
|
|
275 if (!ok.booleanValue())
|
|
276 throw new IllegalArgumentException("Matrix is not invertible");
|
|
277 return returned;
|
|
278 }
|
|
279
|
|
280 @QtBlockedSlot
|
|
281 public final QMatrix multiply(QMatrix other) {
|
|
282 operator_multiply_assign(other);
|
|
283 return this;
|
|
284 }
|
|
285
|
|
286 @QtBlockedSlot
|
|
287 public final QMatrix multiplied(QMatrix other) {
|
|
288 return operator_multiply(other);
|
|
289 }
|
|
290 */
|
|
291 }// class
|
|
292
|
|
293 class QImage___ extends QImage {
|
|
294 private import qt.qtd.Str;
|
|
295
|
190
|
296 public this(string[] xpm) {
|
71
|
297 this(toStringzArray(xpm));
|
|
298 }
|
|
299 /*
|
|
300 public final byte[] copyOfBytes() {
|
|
301 QNativePointer bits = bits();
|
|
302 byte bytes[] = new byte[numBytes()];
|
|
303 for (int i = 0; i < bytes.length; ++i)
|
|
304 bytes[i] = bits.byteAt(i);
|
|
305 return bytes;
|
|
306 }
|
|
307 */
|
|
308 public this(ubyte[] data, int width, int height, Format format) {
|
|
309 this(data.ptr, width, height, format);
|
|
310 }
|
|
311
|
|
312 public this(string fileName, string format = null) {
|
|
313 this(fileName, format == null ? null : toStringz(format));
|
|
314 }
|
|
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
|
190
|
482 public this(string[] xpm) {
|
71
|
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 {
|
|
591
|
149
|
592 private static UrlHandler[string] __rcUrlHandlers;
|
|
593 public static void setUrlHandler(string scheme, void delegate(QUrl) dg) {
|
|
594 UrlHandler receiver = dg !is null ? new UrlHandler(dg) : null;
|
71
|
595
|
149
|
596 if (receiver is null)
|
71
|
597 __rcUrlHandlers.remove(scheme);
|
|
598 else
|
149
|
599 __rcUrlHandlers[scheme] = receiver;
|
|
600
|
|
601 setUrlHandler(scheme, receiver, "handleUrl");
|
71
|
602 }
|
|
603 }// class
|
|
604
|
|
605 class QWizardPage___ extends QWizardPage {
|
|
606
|
|
607 protected final void registerField(string name, QWidget widget, string property = null) {
|
|
608 registerField(name, widget, property is null ? null : toStringz(property), null);
|
|
609 }
|
|
610
|
|
611 /**
|
|
612 * Creates a field called <code>name</code> associated with the given
|
|
613 * property of the given widget. From then on, that property becomes
|
|
614 * accessible using <code>field()</code> and <code>setField()</code>.
|
|
615 * Fields are global to the entire wizard and make it easy for any single
|
|
616 * page to access information stored by another page, without having to put
|
|
617 * all the logic in <code>QWizard</code> or having the pages know
|
|
618 * explicitly about each other. If name ends with an asterisk (*), the field
|
|
619 * is a mandatory field. When a page has mandatory fields, the Next and/or
|
|
620 * Finish buttons are enabled only when all mandatory fields are filled.
|
|
621 * This requires a <code>changedSignal</code> to be specified, to tell
|
|
622 * QWizard to recheck the value stored by the mandatory field.
|
|
623 *
|
|
624 * QWizard knows the most common Qt widgets. For these (or their
|
|
625 * subclasses), you don't need to specify a <code>property</code> or a
|
|
626 * <code>changedSignal</code>. The table below lists these widgets:
|
|
627 *
|
|
628 * <code>QAbstractButton</code> (for which the relevant property is the
|
|
629 * <code>checked</code> property), <code>QAbstractSlider</code> (the
|
|
630 * <code>value</code> property), <code>QComboBox</code> (<code>currentIndex</code>
|
|
631 * property), <code>QDateTimeEdit</code>(<code>dateTime</code>
|
|
632 * property), <code>QLineEdit</code>(<code>text</code> property),
|
|
633 * <code>QListWidget</code>(<code>currentRow</code> property), or
|
|
634 * <code>QSpinBox</code>(<code>value</code> property).
|
|
635 *
|
|
636 * @param name
|
|
637 * The name which will be used to access the field. Names ending
|
|
638 * with an asterisk signify mandatory fields.
|
|
639 * @param widget
|
|
640 * The widget whose property will be accessed using this field.
|
|
641 * @param property
|
|
642 * The name of the property associated with the field.
|
|
643 * @param changedSignal
|
|
644 * The name of a signal which is emitted when the associated
|
|
645 * property's value changes.
|
|
646 *
|
|
647 * @see qt.gui.QWizardPage#field
|
|
648 * @see qt.gui.QWizardPage#setField
|
|
649 */
|
|
650 /* protected final void registerField(String name, QWidget widget, String property, String changedSignal) {
|
|
651 String signalSignature = qt.internal.MetaObjectTools.cppSignalSignature(widget, changedSignal);
|
|
652 if (signalSignature.length() == 0)
|
|
653 throw new QNoSuchSignalException("Signal '" + changedSignal
|
|
654 + "' does not exist or has argument types that cannot be converted to Qt Jambi or java.lang types.");
|
|
655 registerField(name, widget, qt.QNativePointer.createCharPointer(property), qt.QNativePointer
|
|
656 .createCharPointer(qt.internal.QtJambiInternal.SignalPrefix + signalSignature));
|
|
657 }
|
|
658 */
|
|
659 }// class
|
|
660
|
|
661 class QFontDialog___ extends QFontDialog {
|
|
662
|
|
663 public static final class Result {
|
|
664 public Result(QFont font, boolean ok) {
|
|
665 this.font = font;
|
|
666 this.ok = ok;
|
|
667 }
|
|
668
|
|
669 public QFont font;
|
|
670 public boolean ok;
|
|
671 }
|
|
672
|
|
673 }// class
|
|
674
|
|
675 class QMenu___ extends QMenu {
|
|
676 /*
|
|
677 protected final void initStyleOption(qt.gui.QStyleOptionMenuItem option, QAction action) {
|
|
678 initStyleOption(option.nativePointer(), action);
|
|
679 }
|
|
680 */
|
|
681 alias QWidget.addAction addAction;
|
|
682 }// class
|
|
683
|
|
684 class QMenuBar___ extends QMenuBar {
|
|
685 alias QWidget.addAction addAction;
|
|
686
|
|
687 }// class
|
|
688
|
|
689 class QToolBar___ extends QToolBar {
|
|
690 /*
|
|
691 protected final void initStyleOption(qt.gui.QStyleOptionMenuItem option, QAction action) {
|
|
692 initStyleOption(option.nativePointer(), action);
|
|
693 }
|
|
694 */
|
|
695 alias QWidget.addAction addAction;
|
|
696 }// class
|
|
697
|
|
698 class QPixmapCache___ extends QPixmapCache {
|
|
699
|
|
700 public static boolean find(String key, QPixmap pm) {
|
|
701 return find(key, pm.nativePointer());
|
|
702 }
|
|
703
|
|
704 }// class
|
|
705
|
|
706 class QShortcut___ extends QShortcut {
|
|
707
|
|
708 public this(QKeySequence key, QWidget parent, Qt.ShortcutContext context = Qt.WindowShortcut) {
|
|
709 this(key, parent, null, null, context);
|
|
710 }
|
|
711
|
|
712 }// class
|
|
713
|
|
714 class QValidator___ extends QValidator {
|
|
715
|
|
716 public static class QValidationData {
|
|
717 public QValidationData(String input, int pos) {
|
|
718 string = input;
|
|
719 position = pos;
|
|
720 }
|
|
721
|
|
722 public String string;
|
|
723 public int position;
|
|
724 }
|
|
725
|
|
726 }// class
|
|
727
|
|
728 class QAbstractButton___ extends QAbstractButton {
|
|
729
|
|
730 /**
|
|
731 * Sets the shortcut to the key sequence for the given key string. For
|
|
732 * example "Ctrl+O" gives CTRL+'O'. The strings "Ctrl", "Shift", "Alt" and
|
|
733 * "Meta" are recognized, as well as their translated equivalents in the
|
|
734 * "QShortcut" context (using QObject::tr()). Up to four key codes may be
|
|
735 * entered by separating them with commas, e.g. "Alt+X,Ctrl+S,Q".
|
|
736 *
|
|
737 * @param key
|
|
738 * The description of the key sequence. Typically used with tr()
|
|
739 * so key sequences can be locale aware.
|
|
740 */
|
|
741 public final void setShortcut(string key) {
|
|
742 setShortcut(new QKeySequence(key));
|
|
743 }
|
|
744
|
|
745 /**
|
|
746 * Sets the shortcut to the key sequence for the given key. The result will
|
|
747 * depend on the currently running platform. The key sequence will be based
|
|
748 * on the first element in the list of key bindings for the key.
|
|
749 *
|
|
750 * @param key
|
|
751 * The key for which to select a key sequence
|
|
752 */
|
|
753 public final void setShortcut(QKeySequence.StandardKey key) {
|
|
754 setShortcut(new QKeySequence(key));
|
|
755 }
|
|
756
|
|
757 }// class
|
|
758
|
|
759 class QStyle___ extends QStyle {
|
|
760 /*
|
|
761 @QtBlockedSlot
|
|
762 public final int combinedLayoutSpacing(QSizePolicy.ControlTypes controls1, QSizePolicy.ControlTypes controls2,
|
|
763 qt.core.Qt.Orientation orientation, QStyleOption option, QWidget widget) {
|
|
764 return combinedLayoutSpacing(controls1, controls2, orientation, option == null ? null : option.nativePointer(), widget);
|
|
765 }
|
|
766
|
|
767 @QtBlockedSlot
|
|
768 public final int combinedLayoutSpacing(QSizePolicy.ControlTypes controls1, QSizePolicy.ControlTypes controls2,
|
|
769 qt.core.Qt.Orientation orientation, QStyleOption option) {
|
|
770 return combinedLayoutSpacing(controls1, controls2, orientation, option, null);
|
|
771 }
|
|
772
|
|
773 @QtBlockedSlot
|
|
774 public final int combinedLayoutSpacing(QSizePolicy.ControlTypes controls1, QSizePolicy.ControlTypes controls2,
|
|
775 qt.core.Qt.Orientation orientation) {
|
|
776 return combinedLayoutSpacing(controls1, controls2, orientation, null);
|
|
777 }
|
|
778
|
|
779 @QtBlockedSlot
|
|
780 public final int layoutSpacing(QSizePolicy.ControlType control1, QSizePolicy.ControlType control2, qt.core.Qt.Orientation orientation,
|
|
781 QStyleOption option, QWidget widget) {
|
|
782 return layoutSpacing(control1, control2, orientation, option == null ? null : option.nativePointer(), widget);
|
|
783 }
|
|
784
|
|
785 @QtBlockedSlot
|
|
786 public final int layoutSpacing(QSizePolicy.ControlType control1, QSizePolicy.ControlType control2, qt.core.Qt.Orientation orientation,
|
|
787 QStyleOption option) {
|
|
788 return layoutSpacing(control1, control2, orientation, option, null);
|
|
789 }
|
|
790
|
|
791 @QtBlockedSlot
|
|
792 public final int layoutSpacing(QSizePolicy.ControlType control1, QSizePolicy.ControlType control2, qt.core.Qt.Orientation orientation) {
|
|
793 return layoutSpacing(control1, control2, orientation, null);
|
|
794 }
|
|
795 */
|
|
796 }// class
|
|
797
|
|
798 class QLayout___ extends QLayout {
|
|
799 /*
|
|
800 @QtBlockedSlot
|
|
801 public final QContentsMargins getContentsMargins() {
|
|
802 QNativePointer left = new QNativePointer(QNativePointer.Type.Int);
|
|
803 QNativePointer top = new QNativePointer(QNativePointer.Type.Int);
|
|
804 QNativePointer right = new QNativePointer(QNativePointer.Type.Int);
|
|
805 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Int);
|
|
806
|
|
807 getContentsMargins(left, top, right, bottom);
|
|
808 return new QContentsMargins(left.intValue(), top.intValue(), right.intValue(), bottom.intValue());
|
|
809 }
|
|
810
|
|
811 @QtBlockedSlot
|
|
812 public final void setContentsMargins(QContentsMargins margins) {
|
|
813 setContentsMargins(margins.left, margins.top, margins.right, margins.bottom);
|
|
814 }
|
|
815 */
|
|
816 }// class
|
|
817
|
|
818 class QGridLayout___ extends QGridLayout {
|
|
819 /*
|
|
820 public final QTableArea getItemPosition(int index) {
|
|
821 QNativePointer row = new QNativePointer(QNativePointer.Type.Int);
|
|
822 QNativePointer column = new QNativePointer(QNativePointer.Type.Int);
|
|
823 QNativePointer rowSpan = new QNativePointer(QNativePointer.Type.Int);
|
|
824 QNativePointer columnSpan = new QNativePointer(QNativePointer.Type.Int);
|
|
825
|
|
826 getItemPosition(index, row, column, rowSpan, columnSpan);
|
|
827
|
|
828 return new QTableArea(row.intValue(), column.intValue(), rowSpan.intValue(), columnSpan.intValue());
|
|
829 }
|
|
830 */
|
|
831 }// class
|
|
832
|
|
833 class QWidget___ extends QWidget {
|
|
834 /*
|
|
835 private native static void __qt_QMessageBox_setWindowTitle(long native_id, String windowTitle);
|
|
836
|
|
837 private native static void __qt_QMessageBox_setWindowModality(long native_id, int modality);
|
|
838
|
|
839 @QtBlockedSlot
|
|
840 public final QContentsMargins getContentsMargins() {
|
|
841 QNativePointer left = new QNativePointer(QNativePointer.Type.Int);
|
|
842 QNativePointer top = new QNativePointer(QNativePointer.Type.Int);
|
|
843 QNativePointer right = new QNativePointer(QNativePointer.Type.Int);
|
|
844 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Int);
|
|
845
|
|
846 getContentsMargins(left, top, right, bottom);
|
|
847 return new QContentsMargins(left.intValue(), top.intValue(), right.intValue(), bottom.intValue());
|
|
848 }
|
|
849
|
|
850 @QtBlockedSlot
|
|
851 public final void setContentsMargins(QContentsMargins margins) {
|
|
852 setContentsMargins(margins.left, margins.top, margins.right, margins.bottom);
|
|
853 }
|
|
854 */
|
|
855 }// class
|
|
856
|
|
857 class QFileDialog___ extends QFileDialog {
|
|
858
|
|
859 public static string getOpenFileName(QWidget _parent, string caption = null, string dir = null, string filter = null) {
|
|
860 string res;
|
|
861 string _selectedFilter = "";
|
|
862 qtd_QFileDialog_getOpenFileName_QWidget_string_string_string_nativepointerstring_Options(&res, _parent is null ? null : _parent.nativeId, caption, dir, filter, _selectedFilter, 0);
|
|
863 return res;
|
|
864 }
|
|
865
|
|
866 public static string getSaveFileName(QWidget _parent, string caption = null, string dir = null, string filter = null) {
|
|
867 string res;
|
|
868 string _selectedFilter = "";
|
|
869 qtd_QFileDialog_getSaveFileName_QWidget_string_string_string_nativepointerstring_Options(&res, _parent is null ? null : _parent.nativeId, caption, dir, filter, _selectedFilter, 0);
|
|
870 return res;
|
|
871 }
|
|
872
|
|
873 public static class Filter {
|
|
874 public this(string filter) {
|
|
875 this.filter = filter;
|
|
876 }
|
|
877
|
|
878 public string filter;
|
|
879 public string selectedFilter = "";
|
|
880 }
|
|
881
|
|
882 }// class
|
|
883
|
|
884 class QTabBar___ extends QTabBar {
|
|
885
|
|
886 public final void initStyleOption(QStyleOptionTab option, int tabIndex) {
|
|
887 initStyleOption(option.nativePointer(), tabIndex);
|
|
888 }
|
|
889
|
|
890 }// class
|
|
891
|
|
892 class QClipboard___ extends QClipboard {
|
|
893 /*
|
|
894 public static class Text {
|
|
895 public String text;
|
|
896 public String subtype;
|
|
897 }
|
|
898
|
|
899 public final Text text(String subtype, Mode mode) {
|
|
900 QNativePointer np = new QNativePointer(QNativePointer.Type.String);
|
|
901 np.setStringValue(subtype != null ? subtype : "");
|
|
902
|
|
903 Text returned = new Text();
|
|
904 returned.text = text(np, mode);
|
|
905 returned.subtype = np.stringValue();
|
|
906 return returned;
|
|
907 }
|
|
908
|
|
909 public final Text text(String subtype) {
|
|
910 return text(subtype, Mode.Clipboard);
|
|
911 }
|
|
912 */
|
|
913 }// class
|
|
914
|
|
915 class QAbstractScrollArea___ extends QAbstractScrollArea {
|
|
916 /*
|
|
917 public QPaintEngine paintEngine() {
|
|
918 throw new RuntimeException("Cannot open a painter directly on a QAbstractScrollArea, open QPainter on its viewport instead...");
|
|
919 }
|
|
920 */
|
|
921 }// class
|
|
922
|
|
923 class QTextDocument___ extends QTextDocument {
|
|
924
|
|
925 public final void redo(QTextCursor cursor) {
|
|
926 redo(cursor.nativePointer());
|
|
927 }
|
|
928
|
|
929 public final void undo(QTextCursor cursor) {
|
|
930 undo(cursor.nativePointer());
|
|
931 }
|
|
932
|
|
933 }// class
|
|
934
|
|
935 class QSplitter___ extends QSplitter {
|
|
936
|
|
937 public struct Range {
|
|
938 public static Range opCall(int min, int max) {
|
|
939 Range rng;
|
|
940 rng.minimum = min;
|
|
941 rng.maximum = max;
|
|
942 return rng;
|
|
943 }
|
|
944
|
|
945 public int minimum;
|
|
946 public int maximum;
|
|
947 }
|
|
948
|
|
949 public final Range getRange(int index) {
|
|
950 int* min;
|
|
951 int* max;
|
|
952
|
|
953 getRange(index, min, max);
|
|
954
|
|
955 return Range(*min, *max);
|
|
956 }
|
|
957
|
|
958 }// class
|
|
959
|
|
960 class QAction___ extends QAction {
|
|
961
|
|
962 public final void setShortcut(string key) {
|
|
963 setShortcut(new QKeySequence(key));
|
|
964 }
|
|
965 /*
|
|
966 private QActionGroup __rcActionGroup = null;
|
|
967 */
|
|
968 /**
|
|
969 * Sets the shortcut to the key sequence for the given key string. For
|
|
970 * example "Ctrl+O" gives CTRL+'O'. The strings "Ctrl", "Shift", "Alt" and
|
|
971 * "Meta" are recognized, as well as their translated equivalents in the
|
|
972 * "QShortcut" context (using QObject::tr()). Up to four key codes may be
|
|
973 * entered by separating them with commas, e.g. "Alt+X,Ctrl+S,Q".
|
|
974 *
|
|
975 * @param key
|
|
976 * The description of the key sequence. Typically used with tr()
|
|
977 * so key sequences can be locale aware.
|
|
978 */
|
|
979 /* public final void setShortcut(String key) {
|
|
980 setShortcut(new QKeySequence(key));
|
|
981 }
|
|
982 */
|
|
983 /**
|
|
984 * Sets the shortcut to the key sequence for the given key. The result will
|
|
985 * depend on the currently running platform. The key sequence will be based
|
|
986 * on the first element in the list of key bindings for the key.
|
|
987 *
|
|
988 * @param key
|
|
989 * The key for which to select a key sequence
|
|
990 */
|
|
991 /* public final void setShortcut(QKeySequence.StandardKey key) {
|
|
992 setShortcut(new QKeySequence(key));
|
|
993 }
|
|
994
|
|
995 public final void setIcon(QPixmap pm) {
|
|
996 setIcon(new QIcon(pm));
|
|
997 }
|
|
998 */
|
|
999 }// class
|
|
1000
|
|
1001 class QPainter___ extends QPainter {
|
|
1002
|
|
1003 public final void setBrush(QColor color) {
|
|
1004 setBrush(new QBrush(color));
|
|
1005 }
|
|
1006
|
|
1007 public final void setBrush(QGradient gradient) {
|
|
1008 setBrush(new QBrush(gradient));
|
|
1009 }
|
|
1010
|
|
1011 public final void setBrush(QPixmap pm) {
|
|
1012 setBrush(new QBrush(pm));
|
|
1013 }
|
|
1014
|
192
|
1015 public final void drawConvexPolygon(in QPoint[] points) {
|
71
|
1016 qtd_QPainter_drawConvexPolygon_nativepointerQPoint_int(nativeId, points.ptr, points.length);
|
|
1017 }
|
|
1018
|
192
|
1019 public final void drawConvexPolygon(in QPointF[] points) {
|
71
|
1020 qtd_QPainter_drawConvexPolygon_nativepointerQPointF_int(nativeId, points.ptr, points.length);
|
|
1021 }
|
|
1022
|
192
|
1023 public final void drawLines(in QLine[] lines) {
|
71
|
1024 qtd_QPainter_drawLines_nativepointerQLine_int(nativeId, lines.ptr, lines.length);
|
|
1025 }
|
|
1026
|
192
|
1027 public final void drawLines(in QLineF[] lines) {
|
71
|
1028 qtd_QPainter_drawLines_nativepointerQLineF_int(nativeId, lines.ptr, lines.length);
|
|
1029 }
|
|
1030
|
192
|
1031 public final void drawPolygon(in QPoint[] points, Qt_FillRule fillRule = Qt_FillRule.OddEvenFill) {
|
71
|
1032 qtd_QPainter_drawPolygon_nativepointerQPoint_int_FillRule(nativeId, points.ptr, points.length, fillRule);
|
|
1033 }
|
|
1034
|
192
|
1035 public final void drawPolygon(in QPointF[] points, Qt_FillRule fillRule = Qt_FillRule.OddEvenFill) {
|
71
|
1036 qtd_QPainter_drawPolygon_nativepointerQPointF_int_FillRule(nativeId, points.ptr, points.length, fillRule);
|
|
1037 }
|
|
1038
|
192
|
1039 public final void drawPolyline(in QPoint[] points) {
|
71
|
1040 qtd_QPainter_drawPolyline_nativepointerQPoint_int(nativeId, points.ptr, points.length);
|
|
1041 }
|
|
1042
|
192
|
1043 public final void drawPolyline(in QPointF[] points) {
|
71
|
1044 qtd_QPainter_drawPolyline_nativepointerQPointF_int(nativeId, points.ptr, points.length);
|
|
1045 }
|
|
1046
|
192
|
1047 public final void drawPoints(in QPoint[] points) {
|
71
|
1048 qtd_QPainter_drawPoints_nativepointerQPoint_int(nativeId, points.ptr, points.length);
|
|
1049 }
|
|
1050
|
192
|
1051 public final void drawPoints(in QPointF[] points) {
|
71
|
1052 qtd_QPainter_drawPoints_nativepointerQPointF_int(nativeId, points.ptr, points.length);
|
|
1053 }
|
|
1054
|
192
|
1055 public final void drawRects(in QRect[] rects) {
|
71
|
1056 qtd_QPainter_drawRects_nativepointerQRect_int(nativeId, rects.ptr, rects.length);
|
|
1057 }
|
|
1058
|
192
|
1059 public final void drawRects(in QRectF[] rects) {
|
71
|
1060 qtd_QPainter_drawRects_nativepointerQRectF_int(nativeId, rects.ptr, rects.length);
|
|
1061 }
|
|
1062 /*
|
|
1063 public static QPaintDeviceInterface redirected(QPaintDeviceInterface device, qt.core.QPoint offset) {
|
|
1064 return redirected(device, offset == null ? null : offset.nativePointer());
|
|
1065 }
|
|
1066
|
|
1067 public QPainter(QWidget widget) {
|
|
1068 this();
|
|
1069 begin(widget);
|
|
1070 }
|
|
1071
|
|
1072 public boolean begin(QWidget widget) { // can't be final because of QStylePainter
|
|
1073 return qt.QtJambiGuiInternal.beginPaint(widget, this);
|
|
1074 }
|
|
1075
|
|
1076 private static java.util.Stack<QPaintDeviceInterface> __rcRedirections = new java.util.Stack<QPaintDeviceInterface>();
|
|
1077 */
|
|
1078 }// class
|
|
1079
|
|
1080 class QApplication___ extends QApplication {
|
|
1081
|
188
|
1082 this(string[] args)
|
71
|
1083 {
|
|
1084 // if (m_instance != null)
|
|
1085 // throw new RuntimeException("QCoreApplication can only be initialized once");
|
|
1086
|
|
1087 argc = args.length;
|
|
1088 argv = toStringzArray(args);
|
|
1089 this(&argc, argv);
|
|
1090
|
|
1091 // m_instance.aboutToQuit.connect(m_instance, "disposeOfMyself()");
|
|
1092 }
|
|
1093
|
|
1094 private int argc;
|
|
1095 private char **argv;
|
|
1096
|
|
1097 /* public static QApplication instance() {
|
|
1098 if (type() != Type.Tty)
|
|
1099 return (QApplication) qt.core.QCoreApplication.instance();
|
|
1100 return null;
|
|
1101 }
|
|
1102
|
|
1103 public QApplication(String args[]) {
|
|
1104 this(argc(args), argv(args));
|
154
|
1105 }*/
|
|
1106
|
|
1107 public static void setFont(QFont font, string className = null) {
|
|
1108 setFont_private(font, className !is null ? toStringz(className) : null);
|
71
|
1109 }
|
|
1110
|
154
|
1111 public static void setPalette(QPalette palette, string className = null) {
|
|
1112 setPalette_private(palette, className !is null ? toStringz(className) : null);
|
71
|
1113 }
|
154
|
1114 /*
|
71
|
1115 public static QCursor overrideCursor() {
|
|
1116 QNativePointer np = overrideCursor_private();
|
|
1117 return np == null ? null : QCursor.fromNativePointer(np);
|
|
1118 }
|
|
1119 */
|
|
1120 }// class
|
|
1121
|
|
1122 class QFormLayout___ extends QFormLayout {
|
|
1123
|
|
1124 /**
|
|
1125 * Retrieves the row and role (column) of the item at the specified index.
|
|
1126 * If index is out of bounds, -1 is returned in place of the row.
|
|
1127 *
|
|
1128 * @param index The index of the item for which to retrieve the position.
|
|
1129 * @return A pair of an int (row of item) and an ItemRole (role of the item.)
|
|
1130 **/
|
|
1131 /* @QtBlockedSlot
|
|
1132 public final qt.QPair<Integer, ItemRole> getItemPosition(int index) {
|
|
1133 qt.QNativePointer row = new qt.QNativePointer(qt.QNativePointer.Type.Int);
|
|
1134 qt.QNativePointer role = new qt.QNativePointer(qt.QNativePointer.Type.Int);
|
|
1135
|
|
1136 getItemPosition(index, row, role);
|
|
1137
|
|
1138 return new qt.QPair<Integer, ItemRole>(row.intValue(), ItemRole.resolve(role.intValue()));
|
|
1139 }
|
|
1140 */
|
|
1141 /**
|
|
1142 * Retrieves the row and role (column) of the specified child layout.
|
|
1143 * If the layout is not in the form layout, -1 is returned in place of the row.
|
|
1144 *
|
|
1145 * @param layout The layout for which to retrieve the position.
|
|
1146 * @return A pair of an int (row of item) and an ItemRole (role of the item.)
|
|
1147 */
|
|
1148 /* @QtBlockedSlot
|
|
1149 public final qt.QPair<Integer, ItemRole> getLayoutPosition(QLayout layout) {
|
|
1150 qt.QNativePointer row = new qt.QNativePointer(qt.QNativePointer.Type.Int);
|
|
1151 qt.QNativePointer role = new qt.QNativePointer(qt.QNativePointer.Type.Int);
|
|
1152
|
|
1153 getLayoutPosition(layout, row, role);
|
|
1154
|
|
1155 return new qt.QPair<Integer, ItemRole>(row.intValue(), ItemRole.resolve(role.intValue()));
|
|
1156 }
|
|
1157 */
|
|
1158 /**
|
|
1159 * Retrieves the row and role (column) of the specified widget in the layout.
|
|
1160 * If the widget is not in the form layout, -1 is returned in place of the row.
|
|
1161 *
|
|
1162 * @param widget The widget for which to retrieve the position.
|
|
1163 * @return A pair of an int (row of item) and an ItemRole (role of the item.)
|
|
1164 */
|
|
1165 /* @QtBlockedSlot
|
|
1166 public final qt.QPair<Integer, ItemRole> getWidgetPosition(QWidget widget) {
|
|
1167 qt.QNativePointer row = new qt.QNativePointer(qt.QNativePointer.Type.Int);
|
|
1168 qt.QNativePointer role = new qt.QNativePointer(qt.QNativePointer.Type.Int);
|
|
1169
|
|
1170 getWidgetPosition(widget, row, role);
|
|
1171
|
|
1172 return new qt.QPair<Integer, ItemRole>(row.intValue(), ItemRole.resolve(role.intValue()));
|
|
1173 }
|
|
1174 */
|
|
1175 /**
|
|
1176 * Sets the item in the given row for the given role to item, extending the layout with empty rows if necessary.
|
|
1177 * If the cell is already occupied, the item is not inserted and a IllegalArgumentException is thrown.
|
|
1178 */
|
|
1179 /* @QtBlockedSlot
|
|
1180 public final void setItem(int row, ItemRole role, QLayoutItem item) {
|
|
1181 if (itemAt(row, role) == null)
|
|
1182 setItem_private(row, role, item);
|
|
1183 else
|
|
1184 throw new IllegalArgumentException("Cell in form layout is already occupied");
|
|
1185 }
|
|
1186 */
|
|
1187 }// class
|
|
1188
|
|
1189 class Subclass_of_QGraphicsLayoutItem___ extends QGraphicsLayoutItem {
|
|
1190 /*
|
|
1191 @QtBlockedSlot
|
|
1192 public final QMarginsF getContentsMargins() {
|
|
1193 QNativePointer left = new QNativePointer(QNativePointer.Type.Double);
|
|
1194 QNativePointer top = new QNativePointer(QNativePointer.Type.Double);
|
|
1195 QNativePointer right = new QNativePointer(QNativePointer.Type.Double);
|
|
1196 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Double);
|
|
1197
|
|
1198 getContentsMargins(left, top, right, bottom);
|
|
1199 return new QMarginsF(left.doubleValue(), top.doubleValue(), right.doubleValue(), bottom.doubleValue());
|
|
1200 }*/
|
|
1201 }// class
|
|
1202
|
|
1203 class QGraphicsWidget___ extends QGraphicsWidget {
|
|
1204
|
|
1205 /*
|
|
1206 * Gets the widget's window frame margins.
|
|
1207 *
|
|
1208 * @returns An object containing the margins in left, right, top and bottom coordinates.
|
|
1209
|
|
1210 @QtBlockedSlot
|
|
1211 public final QMarginsF getWindowFrameMargins() {
|
|
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 getWindowFrameMargins(left, top, right, bottom);
|
|
1218 return new QMarginsF(left.doubleValue(), top.doubleValue(), right.doubleValue(), bottom.doubleValue());
|
|
1219 }
|
|
1220 */
|
|
1221
|
|
1222 }// class
|
|
1223
|
|
1224 class QPrinter___ extends QPrinter {
|
|
1225
|
|
1226 /**
|
|
1227 * Returns the page margins for this printer.
|
|
1228 * The unit of the returned margins are specified with the unit parameter.
|
|
1229 * This function was introduced in Qt 4.4.
|
|
1230 *
|
|
1231 * @param unit Specifies the unit of the returned margins.
|
|
1232 * @return The page margins for this printer.
|
|
1233 */
|
|
1234 /* public final QMarginsF getPageMargins(QPrinter.Unit unit) {
|
|
1235 QNativePointer left = new QNativePointer(QNativePointer.Type.Double);
|
|
1236 QNativePointer top = new QNativePointer(QNativePointer.Type.Double);
|
|
1237 QNativePointer right = new QNativePointer(QNativePointer.Type.Double);
|
|
1238 QNativePointer bottom = new QNativePointer(QNativePointer.Type.Double);
|
|
1239
|
|
1240 getPageMargins(left, top, right, bottom, unit);
|
|
1241 return new QMarginsF(left.doubleValue(), top.doubleValue(), right.doubleValue(), bottom.doubleValue());
|
|
1242 }*/
|
|
1243
|
|
1244 }// class
|
|
1245
|
|
1246 class QListWidget___ extends QListWidget {
|
|
1247
|
|
1248 /**
|
|
1249 * Inserts items with the text labels at the end of the list widget.
|
|
1250 *
|
|
1251 * @param labels The collection of labels for the new items.
|
|
1252 */
|
|
1253 public final void addItems(string[] labels) {
|
|
1254 foreach (label; labels)
|
|
1255 addItem(label);
|
|
1256 }
|
|
1257
|
|
1258 /**
|
|
1259 * This is an overloaded member function, provided for convenience.
|
|
1260 * Inserts an item with the text label in the list widget at the position given by row.
|
|
1261 *
|
|
1262 * @param row The position in which to insert the new item.
|
|
1263 * @param label The text of the new item.
|
|
1264 */
|
|
1265 public final void insertItem(int row, string label) {
|
|
1266 insertItem(row, new QListWidgetItem(label, this));
|
|
1267 }
|
|
1268
|
|
1269 /**
|
|
1270 * Inserts items from the list of labels into the list, starting at the given row.
|
|
1271 *
|
|
1272 * @param row The position in which to insert the new items.
|
|
1273 * @param labels The collection of labels for the new items.
|
|
1274 */
|
|
1275 public final void insertItems(int row, string[] labels) {
|
|
1276 foreach (label; labels)
|
|
1277 insertItem(row++, label);
|
|
1278 }
|
|
1279 }// class
|
|
1280
|
|
1281
|
|
1282 class QGraphicsScene___ extends QGraphicsScene {
|
|
1283 /**
|
|
1284 * Equivalent to addEllipse(rect, null, null)
|
|
1285 */
|
|
1286 /*public final QGraphicsEllipseItem addEllipse(qt.core.QRectF rect)
|
|
1287 {
|
|
1288 return addEllipse(rect, null);
|
|
1289 }*/
|
|
1290
|
|
1291 /**
|
|
1292 * Equivalent to addEllipse(rect, pen, null)
|
|
1293 */
|
|
1294 /* public final QGraphicsEllipseItem addEllipse(qt.core.QRectF rect, QPen pen)
|
|
1295 {
|
|
1296 return addEllipse(rect, pen, null);
|
|
1297 }*/
|
|
1298
|
|
1299
|
|
1300 /**
|
|
1301 * Creates and adds an ellipse item to the scene, and returns the item
|
|
1302 * reference. The geometry of the ellipse is defined by rect, and its pen
|
|
1303 * and brush are initialized to pen and brush.
|
|
1304 *
|
|
1305 * Note that the item's geometry is provided in item coordinates, and its
|
|
1306 * position is initialized to (0, 0).
|
|
1307 *
|
|
1308 * If the item is visible (i.e., QGraphicsItem::isVisible() returns true),
|
|
1309 * QGraphicsScene will emit changed() once control goes back to the event
|
|
1310 * loop.
|
|
1311 *
|
|
1312 * @param rect The bounding rectangle of the ellipse.
|
|
1313 * @param pen The pen for the resulting QGraphicsEllipseItem.
|
|
1314 * @param brush The brush for the resulting QGraphicsEllipseItem.
|
|
1315 * @return The resulting item.
|
|
1316 */
|
|
1317 /* public final QGraphicsEllipseItem addEllipse(qt.core.QRectF rect, QPen pen, QBrush brush)
|
|
1318 {
|
|
1319 return addEllipse(rect.x(), rect.y(), rect.width(), rect.height(), pen, brush);
|
|
1320 }*/
|
|
1321
|
|
1322 /**
|
|
1323 * Equivalent to addEllipse(x, y, w, h, null, null)
|
|
1324 */
|
|
1325 /* public final QGraphicsEllipseItem addEllipse(double x, double y, double w, double h) {
|
|
1326 return addEllipse(x, y, w, h, null);
|
|
1327 }*/
|
|
1328
|
|
1329 /**
|
|
1330 * Equivalent to addEllipse(x, y, w, h, pen, null)
|
|
1331 */
|
|
1332 /* public final QGraphicsEllipseItem addEllipse(double x, double y, double w, double h, QPen pen)
|
|
1333 {
|
|
1334 return addEllipse(x, y, w, h, pen, null);
|
|
1335 }*/
|
|
1336
|
|
1337 /**
|
|
1338 * Creates and adds an ellipse item to the scene, and returns the item
|
|
1339 * reference. The geometry of the ellipse is defined by x, y, w, h, and its pen
|
|
1340 * and brush are initialized to pen and brush.
|
|
1341 *
|
|
1342 * Note that the item's geometry is provided in item coordinates, and its
|
|
1343 * position is initialized to (0, 0).
|
|
1344 *
|
|
1345 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1346 * QGraphicsScene will emit changed once control goes back to the event
|
|
1347 * loop.
|
|
1348 *
|
|
1349 * @param x The left horizontal coordinate of the ellipse's bounding rectangle.
|
|
1350 * @param y The top vertical coordinate of the ellipse's bounding rectangle.
|
|
1351 * @param w The width of the ellipse's bounding rectangle.
|
|
1352 * @param h The height of the ellipse's bounding rectangle.
|
|
1353 * @param pen The pen for the resulting QGraphicsEllipseItem.
|
|
1354 * @param brush The brush for the resulting QGraphicsEllipseItem.
|
|
1355 * @return The resulting item.
|
|
1356 */
|
|
1357 /* public final QGraphicsEllipseItem addEllipse(double x, double y, double w, double h, QPen pen, QBrush brush)
|
|
1358 {
|
|
1359 QGraphicsEllipseItem item = new QGraphicsEllipseItem(x, y, w, h);
|
|
1360 item.setPen(pen);
|
|
1361 item.setBrush(brush);
|
|
1362
|
|
1363 addItem(item);
|
|
1364
|
|
1365 return item;
|
|
1366 }*/
|
|
1367
|
|
1368 /**
|
|
1369 * Equivalent to addLine(line, null)
|
|
1370 */
|
|
1371 /* public final QGraphicsLineItem addLine(QLineF line) {
|
|
1372 return addLine(line, null);
|
|
1373 }*/
|
|
1374
|
|
1375 /**
|
|
1376 * Creates and adds a line item to the scene, and returns the item
|
|
1377 * reference. The geometry of the line is defined by line, and its pen
|
|
1378 * is initialized to pen.
|
|
1379 *
|
|
1380 * Note that the item's geometry is provided in item coordinates, and its
|
|
1381 * position is initialized to (0, 0).
|
|
1382 *
|
|
1383 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1384 * QGraphicsScene will emit changed once control goes back to the event
|
|
1385 * loop.
|
|
1386 *
|
|
1387 * @param line The definition of the line.
|
|
1388 * @param pen The pen with which to draw the line.
|
|
1389 * @return The resulting item.
|
|
1390 */
|
|
1391 /* public final QGraphicsLineItem addLine(QLineF line, QPen pen)
|
|
1392 {
|
|
1393 return addLine(line.x1(), line.y1(), line.x2(), line.y2(), pen);
|
|
1394 }*/
|
|
1395
|
|
1396 /**
|
|
1397 * Equivalent to addLine(x1, y1, x2, y2, null)
|
|
1398 */
|
|
1399 /* public final QGraphicsLineItem addLine(double x1, double y1, double x2, double y2) {
|
|
1400 return addLine(x1, y1, x2, y2, null);
|
|
1401 }*/
|
|
1402
|
|
1403 /**
|
|
1404 * Creates and adds a line item to the scene, and returns the item
|
|
1405 * reference. The geometry of the line is defined by x1, y1, x2, y2, and its pen
|
|
1406 * is initialized to pen.
|
|
1407 *
|
|
1408 * Note that the item's geometry is provided in item coordinates, and its
|
|
1409 * position is initialized to (0, 0).
|
|
1410 *
|
|
1411 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1412 * QGraphicsScene will emit changed once control goes back to the event
|
|
1413 * loop.
|
|
1414 *
|
|
1415 * @param x1 The first horizontal coordinate of the line.
|
|
1416 * @param y1 The first vertical coordinate of the line.
|
|
1417 * @param x2 The second horizontal coordinate of the line.
|
|
1418 * @param y2 The second vertical coordinate of the line.
|
|
1419 * @param pen The pen with which to draw the line.
|
|
1420 * @return The resulting item.
|
|
1421 */
|
|
1422 /* public final QGraphicsLineItem addLine(double x1, double y1, double x2, double y2, QPen pen)
|
|
1423 {
|
|
1424 QGraphicsLineItem item = new QGraphicsLineItem(x1, y1, x2, y2);
|
|
1425 item.setPen(pen);
|
|
1426
|
|
1427 addItem(item);
|
|
1428
|
|
1429 return item;
|
|
1430 }*/
|
|
1431
|
|
1432
|
|
1433 /**
|
|
1434 * Equivalent to addPath(path, null, null)
|
|
1435 */
|
|
1436 /*public final QGraphicsPathItem addPath(QPainterPath path) {
|
|
1437 return addPath(path, null);
|
|
1438 }*/
|
|
1439
|
|
1440 /**
|
|
1441 * Equivalent to addPath(path, pen, null)
|
|
1442 */
|
|
1443 /*public final QGraphicsPathItem addPath(QPainterPath path, QPen pen)
|
|
1444 {
|
|
1445 return addPath(path, pen, null);
|
|
1446 }*/
|
|
1447 /**
|
|
1448 * Creates and adds a path item to the scene, and returns the item
|
|
1449 * reference. The geometry of the path is defined by path, and its pen and
|
|
1450 * brush are initialized to pen and brush.
|
|
1451 *
|
|
1452 * Note that the item's geometry is provided in item coordinates, and its
|
|
1453 * position is initialized to (0, 0).
|
|
1454 *
|
|
1455 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1456 * QGraphicsScene will emit changed once control goes back to the event
|
|
1457 * loop.
|
|
1458 *
|
|
1459 * @param path The definition of the path.
|
|
1460 * @param pen The pen for drawing the path.
|
|
1461 * @param brush The brush for drawing the path.
|
|
1462 * @return The resulting item.
|
|
1463 */
|
|
1464 /* public final QGraphicsPathItem addPath(QPainterPath path, QPen pen, QBrush brush)
|
|
1465 {
|
|
1466 QGraphicsPathItem item = new QGraphicsPathItem(path);
|
|
1467 item.setPen(pen);
|
|
1468 item.setBrush(brush);
|
|
1469
|
|
1470 addItem(item);
|
|
1471
|
|
1472 return item;
|
|
1473 }*/
|
|
1474
|
|
1475 /**
|
|
1476 * Creates and adds a pixmap item to the scene, and returns the item
|
|
1477 * reference. The pixmap is defined by pixmap.
|
|
1478 *
|
|
1479 * Note that the item's geometry is provided in item coordinates, and its
|
|
1480 * position is initialized to (0, 0).
|
|
1481 *
|
|
1482 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1483 * QGraphicsScene will emit changed once control goes back to the event
|
|
1484 * loop.
|
|
1485 *
|
|
1486 * @param pixmap The pixmap for which to create a graphics item.
|
|
1487 * @return The resulting item.
|
|
1488 */
|
|
1489 /* public final QGraphicsPixmapItem addPixmap(QPixmap pixmap)
|
|
1490 {
|
|
1491 QGraphicsPixmapItem item = new QGraphicsPixmapItem(pixmap);
|
|
1492
|
|
1493 addItem(item);
|
|
1494
|
|
1495 return item;
|
|
1496 }*/
|
|
1497
|
|
1498 /**
|
|
1499 * Equivalent to addPolygon(polygon, null, null)
|
|
1500 */
|
|
1501 /* public final QGraphicsPolygonItem addPolygon(QPolygonF polygon) {
|
|
1502 return addPolygon(polygon, null);
|
|
1503 }*/
|
|
1504
|
|
1505 /**
|
|
1506 * Equivalent to addPolygon(polygon, pen, null)
|
|
1507 */
|
|
1508 /* public final QGraphicsPolygonItem addPolygon(QPolygonF polygon, QPen pen) {
|
|
1509 return addPolygon(polygon, pen, null);
|
|
1510 }*/
|
|
1511
|
|
1512 /**
|
|
1513 * Creates and adds a polygon item to the scene, and returns the item
|
|
1514 * reference. The polygon is defined by polygon, and its pen and
|
|
1515 * brush are initialized to pen and brush.
|
|
1516 *
|
|
1517 * Note that the item's geometry is provided in item coordinates, and its
|
|
1518 * position is initialized to (0, 0).
|
|
1519 *
|
|
1520 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1521 * QGraphicsScene will emit changed once control goes back to the event
|
|
1522 * loop.
|
|
1523 *
|
|
1524 * @param polygon The definition of the polygon.
|
|
1525 * @param pen The pen with which to draw the polygon.
|
|
1526 * @param brush The brush with which to draw the polygon.
|
|
1527 * @return The resulting item.
|
|
1528 */
|
|
1529 /* public final QGraphicsPolygonItem addPolygon(QPolygonF polygon, QPen pen, QBrush brush)
|
|
1530 {
|
|
1531 QGraphicsPolygonItem item = new QGraphicsPolygonItem(polygon);
|
|
1532 item.setPen(pen);
|
|
1533 item.setBrush(brush);
|
|
1534
|
|
1535 addItem(item);
|
|
1536
|
|
1537 return item;
|
|
1538 }*/
|
|
1539
|
|
1540 /**
|
|
1541 * Equivalent to addRect(rect, null, null)
|
|
1542 */
|
|
1543 /* public final QGraphicsRectItem addRect(qt.core.QRectF rect) {
|
|
1544 return addRect(rect, null);
|
|
1545 }*/
|
|
1546
|
|
1547 /**
|
|
1548 * Equivalent to addRect(rect, pen, null)
|
|
1549 */
|
|
1550 /* public final QGraphicsRectItem addRect(qt.core.QRectF rect, QPen pen)
|
|
1551 {
|
|
1552 return addRect(rect, pen, null);
|
|
1553 }*/
|
|
1554
|
|
1555 /**
|
|
1556 * Creates and adds a rectangle item to the scene, and returns the item
|
|
1557 * reference. The geometry of the rectangle is defined by rect, and its pen
|
|
1558 * and brush are initialized to pen and brush.
|
|
1559 *
|
|
1560 * Note that the item's geometry is provided in item coordinates, and its
|
|
1561 * position is initialized to (0, 0). For example, if a QRect(50, 50, 100,
|
|
1562 * 100) is added, its top-left corner will be at (50, 50) relative to the
|
|
1563 * origin in the item's coordinate system.
|
|
1564 *
|
|
1565 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1566 * QGraphicsScene will emit changed once control goes back to the event
|
|
1567 * loop.
|
|
1568 *
|
|
1569 * @param rect The definition of the rectangle.
|
|
1570 * @param pen The pen with which to draw the rectangle.
|
|
1571 * @param brush The brush with which to draw the rectangle.
|
|
1572 * @return The resulting item.
|
|
1573 */
|
|
1574 /* public final QGraphicsRectItem addRect(qt.core.QRectF rect, QPen pen, QBrush brush)
|
|
1575 {
|
|
1576 return addRect(rect.x(), rect.y(), rect.width(), rect.height(), pen, brush);
|
|
1577 }*/
|
|
1578
|
|
1579 /**
|
|
1580 * Equivalent to addRect(x, y, w, h, null, null)
|
|
1581 */
|
|
1582 /* public final QGraphicsRectItem addRect(double x, double y, double w, double h) {
|
|
1583 return addRect(x, y, w, h, null);
|
|
1584 }*/
|
|
1585
|
|
1586 /**
|
|
1587 * Equivalent to addRect(x, y, w, h, pen, null)
|
|
1588 */
|
|
1589 /* public final QGraphicsRectItem addRect(double x, double y, double w, double h, QPen pen) {
|
|
1590 return addRect(x, y, w, h, pen, null);
|
|
1591 }*/
|
|
1592
|
|
1593 /**
|
|
1594 * Creates and adds a rectangle item to the scene, and returns the item
|
|
1595 * reference. The geometry of the rectangle is defined by x, y, w, h, and its pen
|
|
1596 * and brush are initialized to pen and brush.
|
|
1597 *
|
|
1598 * Note that the item's geometry is provided in item coordinates, and its
|
|
1599 * position is initialized to (0, 0).
|
|
1600 *
|
|
1601 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1602 * QGraphicsScene will emit changed once control goes back to the event
|
|
1603 * loop.
|
|
1604 *
|
|
1605 * @param x The left horizontal coordinate of the rectangle.
|
|
1606 * @param y The top vertical coordinate of the rectangle.
|
|
1607 * @param w The width of the rectangle.
|
|
1608 * @param h The height of the rectangle.
|
|
1609 * @param pen The pen with which to draw the rectangle.
|
|
1610 * @param brush The brush with which to draw the rectangle.
|
|
1611 * @return The resulting item.
|
|
1612 */
|
|
1613 /* public final QGraphicsRectItem addRect(double x, double y, double w, double h, QPen pen, QBrush brush)
|
|
1614 {
|
|
1615 QGraphicsRectItem item = new QGraphicsRectItem(x, y, w, h);
|
|
1616 item.setPen(pen);
|
|
1617 item.setBrush(brush);
|
|
1618
|
|
1619 addItem(item);
|
|
1620
|
|
1621 return item;
|
|
1622 }*/
|
|
1623
|
|
1624 /**
|
|
1625 * Equivalent to addSimpleText(text, null)
|
|
1626 */
|
|
1627 /*public final QGraphicsSimpleTextItem addSimpleText(String text) {
|
|
1628 return addSimpleText(text, null);
|
|
1629 }*/
|
|
1630
|
|
1631 /**
|
|
1632 * Creates and adds a QGraphicsSimpleTextItem to the scene, and returns the
|
|
1633 * item reference. The text string is initialized to text, and its font is
|
|
1634 * initialized to font.
|
|
1635 *
|
|
1636 * The item's position is initialized to (0, 0).
|
|
1637 *
|
|
1638 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1639 * QGraphicsScene will emit changed once control goes back to the event
|
|
1640 * loop.
|
|
1641 *
|
|
1642 * @param text The text to add to the scene.
|
|
1643 * @param font The font to use for displaying the text.
|
|
1644 * @return The resulting item.
|
|
1645 */
|
|
1646 /* public final QGraphicsSimpleTextItem addSimpleText(String text, QFont font)
|
|
1647 {
|
|
1648 QGraphicsSimpleTextItem item = new QGraphicsSimpleTextItem(text);
|
|
1649 item.setFont(font);
|
|
1650
|
|
1651 addItem(item);
|
|
1652
|
|
1653 return item;
|
|
1654 }*/
|
|
1655
|
|
1656 /**
|
|
1657 * Equivalent to addText(text, null)
|
|
1658 */
|
|
1659 /* public final QGraphicsTextItem addText(String text) {
|
|
1660 return addText(text, null);
|
|
1661 }*/
|
|
1662
|
|
1663 /**
|
|
1664 * Creates and adds a text item to the scene, and returns the item
|
|
1665 * reference. The text string is initialized to text, and its font
|
|
1666 * is initialized to font.
|
|
1667 *
|
|
1668 * The item's position is initialized to (0, 0).
|
|
1669 *
|
|
1670 * If the item is visible (i.e., QGraphicsItem.isVisible() returns true),
|
|
1671 * QGraphicsScene will emit changed once control goes back to the event
|
|
1672 * loop.
|
|
1673 *
|
|
1674 * @param text The text to add to the scene.
|
|
1675 * @param font The font to use for displaying the text.
|
|
1676 * @return The resulting item.
|
|
1677 */
|
|
1678 /* public final QGraphicsTextItem addText(String text, QFont font)
|
|
1679 {
|
|
1680 QGraphicsTextItem item = new QGraphicsTextItem(text);
|
|
1681 item.setFont(font);
|
|
1682
|
|
1683 addItem(item);
|
|
1684
|
|
1685 return item;
|
|
1686 }*/
|
|
1687
|
|
1688 }// class
|
|
1689
|
|
1690 class QInputDialog___ extends QInputDialog {
|
|
1691 public static double getDouble(QWidget _parent, string title, string label, double value = 0, double minValue = -2147483647, double maxValue = 2147483647, int decimals = 1, ref bool ok = false, int flags = 0) {
|
|
1692 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);
|
|
1693 }
|
137
|
1694
|
|
1695 static if (QT_VERSION >= QT_VERSION_CHECK(4, 5, 0))
|
|
1696 {
|
|
1697 public static int getInt(QWidget _parent, string title, string label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, int step = 1, ref bool ok = false, int flags = 0) {
|
|
1698 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);
|
|
1699 }
|
71
|
1700 }
|
|
1701
|
|
1702 public static string getItem(QWidget _parent, string title, string label, string[] items, int current = 0, bool editable = true, ref bool ok = false, int flags = 0) {
|
|
1703 string res;
|
|
1704 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);
|
|
1705 return res;
|
|
1706 }
|
|
1707
|
|
1708 public static string getText(QWidget _parent, string title, string label, QLineEdit_EchoMode echo = QLineEdit_EchoMode.Normal, string text = null, ref bool ok = false, int flags = 0) {
|
|
1709 string res;
|
|
1710 qtd_QInputDialog_getText_private_QWidget_string_string_EchoMode_string_nativepointerbool_WindowFlags(&res, _parent is null ? null : _parent.nativeId, title, label, echo, text, &ok, flags);
|
|
1711 return res;
|
|
1712 }
|
|
1713 }// class
|