ObjQt  Diff

Differences From Artifact [87d02fdba3]:

To Artifact [f374133c3b]:


18
19
20
21
22
23
24


25
26
27
28
29



30
31
32
33
34
35
36
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41







+
+





+
+
+







 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "QtWidget.h"
#import "QtAction.h"
#import "OFString+QString.h"
#import "OFDataArray+QByteArray.h"

#import "helpers.h"

#include <QIcon>
#include <QLocale>

using ObjQt::toOF;
using ObjQt::toQt;

@implementation QtWidget
+ (void)initialize
{
	if (self == [QtWidget class])
		[self inheritMethodsFromClass: [QtPaintDevice class]];
}
48
49
50
51
52
53
54
55

56
57
58
59
60

61
62
63
64
65

66
67
68
69
70

71
72
73
74
75

76
77
78
79
80

81
82
83
84
85

86
87
88
89
90

91
92
93
94
95

96
97
98
99
100

101
102
103
104
105

106
107
108
109
110

111
112
113
114
115

116
117
118
119
120

121
122
123
124
125

126
127
128
129
130

131
132
133
134
135

136
137
138
139
140

141
142
143
144
145

146
147
148
149
150

151
152
153
154
155

156
157
158
159
160

161
162
163
164
165

166
167
168
169
170

171
172
173
174
175

176
177
178
179
180

181
182
183
184
185

186
187
188
189
190

191
192
193
194
195

196
197
198
199
200

201
202
203
204
205

206
207
208
209
210

211
212
213
214
215

216
217
218
219
220

221
222
223
224
225

226
227
228
229
230

231
232
233
234
235

236
237
238
239
240

241
242
243
244
245

246
247
248
249
250

251
252
253
254
255

256
257
258
259
260

261
262
263
264
265

266
267
268
269
270

271
272
273
274
275

276
277
278
279
280

281
282
283
284
285

286
287
288
289
290

291
292
293
294
295

296
297
298
299
300

301
302
303
304
305

306
307
308
309
310

311
312
313
314
315

316
317
318
319
320

321
322
323
324
325

326
327
328
329
330

331
332
333
334
335

336
337
338
339
340

341
342
343
344
345

346
347
348
349
350

351
352
353
354
355

356
357
358
359
360

361
362
363
364
365

366
367
368
369
370

371
372
373
374
375

376
377
378
379
380

381
382
383
384
385

386
387
388
389
390

391
392
393
394
395

396
397
398
399
400

401
402
403
404
405

406
407
408
409
410

411
412
413
414
415

416
417
418
419
420

421
422
423
424
425

426
427
428
429
430

431
432
433
434
435

436
437
438
439
440

441
442
443
444
445

446
447
448
449
450

451
452
453
454
455

456
457
458
459
460

461
462
463
464
465

466
467
468
469
470

471
472
473
474
475

476
477
478
479
480

481
482
483
484
485

486
487
488
489
490

491
492
493
494
495

496
497
498
499
500

501
502
503
504
505

506
507
508
509
510

511
512
513
514
515

516
517
518
519
520

521
522
523
524
525

526
527
528
529
530

531
532
533
534
535

536
537
538
539
540

541
542
543
544
545

546
547
548
549
550

551
552
553
554
555

556
557
558
559
560

561
562
563
564
565
566

567
568
569
570
571
572
573
574
575
576
577
578

579
580
581
582
583

584
585
586
587
588
589
590
591

592
593

594
595
596
597
598

599
600
601
602
603

604
605
606
607
608

609
610
611
612
613
614

615
616
617
618
619

620
621
622
623
624

625
626
627
628
629

630
631
632
633
634

635
636
637

638
639

640
641
642
643
644

645
646
647
648
649
650

651
652
653
654
655
656

657
658
659
660
661

662
663
664
665
666

667
668
669
670
671

672
673
674
675
676

677
678
679
680
681

682
683
684
685
686
687

688
689
690
691
692

693
694
695
696
697

698
699
700
701
702

703
704
705
706
707

708
709
710
711
712
713

714
715
716
717
718

719
720
721
722
723

724
725
726
727
728
729

730
731
732
733
734
735

736
737
738
739
740

741
742
743
744
745

746
747
748
749
750
751

752
753
754
755
756
757
758
759
760

761
762

763
764
765
766
767

768
769
770
771
772

773
774
775
776
777

778
779
780
781
782

783
784
785
786
787

788




































































































































































































































































































































789
53
54
55
56
57
58
59

60
61
62
63
64

65
66
67
68
69

70
71
72
73
74

75
76
77
78
79

80
81
82
83
84

85
86
87
88
89

90
91
92
93
94

95
96
97
98
99

100
101
102
103
104

105
106
107
108
109

110
111
112
113
114

115
116
117
118
119

120
121
122
123
124

125
126
127
128
129

130
131
132
133
134

135
136
137
138
139

140
141
142
143
144

145
146
147
148
149

150
151
152
153
154

155
156
157
158
159

160
161
162
163
164

165
166
167
168
169

170
171
172
173
174

175
176
177
178
179

180
181
182
183
184

185
186
187
188
189

190
191
192
193
194

195
196
197
198
199

200
201
202
203
204

205
206
207
208
209

210
211
212
213
214

215
216
217
218
219

220
221
222
223
224

225
226
227
228
229

230
231
232
233
234

235
236
237
238
239

240
241
242
243
244

245
246
247
248
249

250
251
252
253
254

255
256
257
258
259

260
261
262
263
264

265
266
267
268
269

270
271
272
273
274

275
276
277
278
279

280
281
282
283
284

285
286
287
288
289

290
291
292
293
294

295
296
297
298
299

300
301
302
303
304

305
306
307
308
309

310
311
312
313
314

315
316
317
318
319

320
321
322
323
324

325
326
327
328
329

330
331
332
333
334

335
336
337
338
339

340
341
342
343
344

345
346
347
348
349

350
351
352
353
354

355
356
357
358
359

360
361
362
363
364

365
366
367
368
369

370
371
372
373
374

375
376
377
378
379

380
381
382
383
384

385
386
387
388
389

390
391
392
393
394

395
396
397
398
399

400
401
402
403
404

405
406
407
408
409

410
411
412
413
414

415
416
417
418
419

420
421
422
423
424

425
426
427
428
429

430
431
432
433
434

435
436
437
438
439

440
441
442
443
444

445
446
447
448
449

450
451
452
453
454

455
456
457
458
459

460
461
462
463
464

465
466
467
468
469

470
471
472
473
474

475
476
477
478
479

480
481
482
483
484

485
486
487
488
489

490
491
492
493
494

495
496
497
498
499

500
501
502
503
504

505
506
507
508
509

510
511
512
513
514

515
516
517
518
519

520
521
522
523
524

525
526
527
528
529

530
531
532
533
534

535
536
537
538
539

540
541
542
543
544

545
546
547
548
549

550
551
552
553
554

555
556
557
558
559

560
561
562
563
564

565
566
567
568
569
570

571

572
573
574
575
576
577
578
579
580
581

582
583
584
585
586

587
588
589
590
591
592
593
594

595
596

597
598
599
600
601

602
603
604
605
606

607
608
609
610
611

612
613
614
615
616


617
618
619
620
621

622
623
624
625
626

627
628
629
630
631

632
633
634
635
636

637
638
639

640
641

642
643
644
645
646

647
648
649
650
651


652
653
654
655
656


657
658
659
660
661

662
663
664
665
666

667
668
669
670
671

672
673
674
675
676

677
678
679
680
681

682
683
684
685
686
687

688
689
690
691
692

693
694
695
696
697

698
699
700
701
702

703
704
705
706
707

708
709
710
711
712
713

714
715
716
717
718

719
720
721
722
723

724
725
726
727
728
729

730
731
732
733
734
735

736
737
738
739
740

741
742
743
744
745

746
747
748
749
750
751

752
753
754
755
756
757
758
759
760

761
762

763
764
765
766
767

768
769
770
771
772

773
774
775
776
777

778
779
780
781
782

783
784
785
786
787

788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114







-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+




-
+





-
+
-










-
+




-
+







-
+

-
+




-
+




-
+




-
+




-
-
+




-
+




-
+




-
+




-
+


-
+

-
+




-
+




-
-
+




-
-
+




-
+




-
+




-
+




-
+




-
+





-
+




-
+




-
+




-
+




-
+





-
+




-
+




-
+





-
+





-
+




-
+




-
+





-
+








-
+

-
+




-
+




-
+




-
+




-
+




-
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

- (QWidget*)qWidget
{
	return qobject_cast<QWidget*>(_qObject);
}

- (bool)acceptDrops
{
	return [self qWidget]->acceptDrops();
	return toQt(self)->acceptDrops();
}

- (void)setAcceptDrops: (bool)acceptDrops
{
	[self qWidget]->setAcceptDrops(acceptDrops);
	toQt(self)->setAcceptDrops(acceptDrops);
}

- (OFString*)accessibleDescription
{
	return toOF([self qWidget]->accessibleDescription());
	return toOF(toQt(self)->accessibleDescription());
}

- (void)setAccessibleDescription: (OFString*)accessibleDescription
{
	[self qWidget]->setAccessibleDescription(toQt(accessibleDescription));
	toQt(self)->setAccessibleDescription(toQt(accessibleDescription));
}

- (OFString*)accessibleName
{
	return toOF([self qWidget]->accessibleName());
	return toOF(toQt(self)->accessibleName());
}

- (void)setAccessibleName: (OFString*)accessibleName
{
	[self qWidget]->setAccessibleName(toQt(accessibleName));
	toQt(self)->setAccessibleName(toQt(accessibleName));
}

- (bool)autoFillBackground
{
	return [self qWidget]->autoFillBackground();
	return toQt(self)->autoFillBackground();
}

- (void)setAutoFillBackground: (bool)autoFillBackground
{
	[self qWidget]->setAutoFillBackground(autoFillBackground);
	toQt(self)->setAutoFillBackground(autoFillBackground);
}

- (of_dimension_t)baseSize
{
	return toOF([self qWidget]->baseSize());
	return toOF(toQt(self)->baseSize());
}

- (void)setBaseSize: (of_dimension_t)baseSize
{
	[self qWidget]->setBaseSize(toQt(baseSize));
	toQt(self)->setBaseSize(toQt(baseSize));
}

- (of_rectangle_t)childrenRect
{
	return toOF([self qWidget]->childrenRect());
	return toOF(toQt(self)->childrenRect());
}

- (QRegion)childrenRegion
{
	return [self qWidget]->childrenRegion();
	return toQt(self)->childrenRegion();
}

- (Qt::ContextMenuPolicy)contextMenuPolicy
{
	return [self qWidget]->contextMenuPolicy();
	return toQt(self)->contextMenuPolicy();
}

- (void)setContextMenuPolicy: (Qt::ContextMenuPolicy)contextMenuPolicy
{
	[self qWidget]->setContextMenuPolicy(contextMenuPolicy);
	toQt(self)->setContextMenuPolicy(contextMenuPolicy);
}

- (QCursor)cursor
{
	return [self qWidget]->cursor();
	return toQt(self)->cursor();
}

- (void)setCursor: (QCursor)cursor
{
	[self qWidget]->setCursor(cursor);
	toQt(self)->setCursor(cursor);
}

- (void)unsetCursor
{
	[self qWidget]->unsetCursor();
	toQt(self)->unsetCursor();
}

- (bool)isEnabled
{
	return [self qWidget]->isEnabled();
	return toQt(self)->isEnabled();
}

- (void)setEnabled: (bool)enabled
{
	[self qWidget]->setEnabled(enabled);
	toQt(self)->setEnabled(enabled);
}

- (bool)hasFocus
{
	return [self qWidget]->hasFocus();
	return toQt(self)->hasFocus();
}

- (Qt::FocusPolicy)focusPolicy
{
	return [self qWidget]->focusPolicy();
	return toQt(self)->focusPolicy();
}

- (void)setFocusPolicy: (Qt::FocusPolicy)focusPolicy
{
	[self qWidget]->setFocusPolicy(focusPolicy);
	toQt(self)->setFocusPolicy(focusPolicy);
}

- (const QFont&)font
{
	return [self qWidget]->font();
	return toQt(self)->font();
}

- (void)setFont: (const QFont&)font
{
	[self qWidget]->setFont(font);
	toQt(self)->setFont(font);
}

- (of_rectangle_t)frameGeometry
{
	return toOF([self qWidget]->frameGeometry());
	return toOF(toQt(self)->frameGeometry());
}

- (of_dimension_t)frameSize
{
	return toOF([self qWidget]->frameSize());
	return toOF(toQt(self)->frameSize());
}

- (bool)isFullScreen
{
	return [self qWidget]->isFullScreen();
	return toQt(self)->isFullScreen();
}

- (of_rectangle_t)geometry
{
	return toOF([self qWidget]->geometry());
	return toOF(toQt(self)->geometry());
}

- (void)setGeometry: (of_rectangle_t)geometry
{
	[self qWidget]->setGeometry(toQt(geometry));
	toQt(self)->setGeometry(toQt(geometry));
}

- (int)height
{
	return [self qWidget]->height();
	return toQt(self)->height();
}

- (Qt::InputMethodHints)inputMethodHints
{
	return [self qWidget]->inputMethodHints();
	return toQt(self)->inputMethodHints();
}

- (void)setInputMethodHints: (Qt::InputMethodHints)inputMethodHints
{
	[self qWidget]->setInputMethodHints(inputMethodHints);
	toQt(self)->setInputMethodHints(inputMethodHints);
}

- (bool)isActiveWindow
{
	return [self qWidget]->isActiveWindow();
	return toQt(self)->isActiveWindow();
}

- (Qt::LayoutDirection)layoutDirection
{
	return [self qWidget]->layoutDirection();
	return toQt(self)->layoutDirection();
}

- (void)setLayoutDirection: (Qt::LayoutDirection)layoutDirection
{
	[self qWidget]->setLayoutDirection(layoutDirection);
	toQt(self)->setLayoutDirection(layoutDirection);
}

- (void)unsetLayoutDirection
{
	[self qWidget]->unsetLayoutDirection();
	toQt(self)->unsetLayoutDirection();
}

- (QLocale)locale
{
	return [self qWidget]->locale();
	return toQt(self)->locale();
}

- (void)setLocale: (QLocale)locale
{
	[self qWidget]->setLocale(locale);
	toQt(self)->setLocale(locale);
}

- (void)unsetLocale
{
	[self qWidget]->unsetLocale();
	toQt(self)->unsetLocale();
}

- (bool)isMaximized
{
	return [self qWidget]->isMaximized();
	return toQt(self)->isMaximized();
}

- (int)maximumHeight
{
	return [self qWidget]->maximumHeight();
	return toQt(self)->maximumHeight();
}

- (void)setMaximumHeight: (int)maximumHeight
{
	[self qWidget]->setMaximumHeight(maximumHeight);
	toQt(self)->setMaximumHeight(maximumHeight);
}

- (of_dimension_t)maximumSize
{
	return toOF([self qWidget]->maximumSize());
	return toOF(toQt(self)->maximumSize());
}

- (void)setMaximumSize: (of_dimension_t)maximumSize
{
	[self qWidget]->setMaximumSize(toQt(maximumSize));
	toQt(self)->setMaximumSize(toQt(maximumSize));
}

- (int)maximumWidth
{
	return [self qWidget]->maximumWidth();
	return toQt(self)->maximumWidth();
}

- (void)setMaximumWidth: (int)maximumWidth
{
	[self qWidget]->setMaximumWidth(maximumWidth);
	toQt(self)->setMaximumWidth(maximumWidth);
}

- (bool)isMinimized
{
	return [self qWidget]->isMinimized();
	return toQt(self)->isMinimized();
}

- (int)minimumHeight
{
	return [self qWidget]->minimumHeight();
	return toQt(self)->minimumHeight();
}

- (void)setMinimumHeight: (int)minimumHeight
{
	[self qWidget]->setMinimumHeight(minimumHeight);
	toQt(self)->setMinimumHeight(minimumHeight);
}

- (of_dimension_t)minimumSize
{
	return toOF([self qWidget]->minimumSize());
	return toOF(toQt(self)->minimumSize());
}

- (void)setMinimumSize: (of_dimension_t)minimumSize
{
	[self qWidget]->setMinimumSize(toQt(minimumSize));
	toQt(self)->setMinimumSize(toQt(minimumSize));
}

- (of_dimension_t)minimumSizeHint
{
	return toOF([self qWidget]->minimumSizeHint());
	return toOF(toQt(self)->minimumSizeHint());
}

- (int)minimumWidth
{
	return [self qWidget]->minimumWidth();
	return toQt(self)->minimumWidth();
}

- (void)setMinimumWidth: (int)minimumWidth
{
	[self qWidget]->setMinimumWidth(minimumWidth);
	toQt(self)->setMinimumWidth(minimumWidth);
}

- (bool)isModal
{
	return [self qWidget]->isModal();
	return toQt(self)->isModal();
}

- (bool)hasMouseTracking
{
	return [self qWidget]->hasMouseTracking();
	return toQt(self)->hasMouseTracking();
}

- (void)setMouseTracking: (bool)mouseTracking
{
	[self qWidget]->setMouseTracking(mouseTracking);
	toQt(self)->setMouseTracking(mouseTracking);
}

- (of_rectangle_t)normalGeometry
{
	return toOF([self qWidget]->normalGeometry());
	return toOF(toQt(self)->normalGeometry());
}

- (const QPalette&)palette
{
	return [self qWidget]->palette();
	return toQt(self)->palette();
}

- (void)setPalette: (const QPalette&)palette
{
	[self qWidget]->setPalette(palette);
	toQt(self)->setPalette(palette);
}

- (of_point_t)pos
{
	return toOF([self qWidget]->pos());
	return toOF(toQt(self)->pos());
}

- (void)moveToPosition: (of_point_t)pos
{
	[self qWidget]->move(toQt(pos));
	toQt(self)->move(toQt(pos));
}

- (of_rectangle_t)rect
{
	return toOF([self qWidget]->rect());
	return toOF(toQt(self)->rect());
}

- (of_dimension_t)size
{
	return toOF([self qWidget]->size());
	return toOF(toQt(self)->size());
}

- (void)resizeTo: (of_dimension_t)size
{
	[self qWidget]->resize(toQt(size));
	toQt(self)->resize(toQt(size));
}

- (of_dimension_t)sizeHint
{
	return toOF([self qWidget]->sizeHint());
	return toOF(toQt(self)->sizeHint());
}

- (of_dimension_t)sizeIncrement
{
	return toOF([self qWidget]->sizeIncrement());
	return toOF(toQt(self)->sizeIncrement());
}

- (void)setSizeIncrement: (of_dimension_t)sizeIncrement
{
	[self qWidget]->setSizeIncrement(toQt(sizeIncrement));
	toQt(self)->setSizeIncrement(toQt(sizeIncrement));
}

- (QSizePolicy)sizePolicy
{
	return [self qWidget]->sizePolicy();
	return toQt(self)->sizePolicy();
}

- (void)setSizePolicy: (QSizePolicy)sizePolicy
{
	[self qWidget]->setSizePolicy(sizePolicy);
	toQt(self)->setSizePolicy(sizePolicy);
}

- (OFString*)statusTip
{
	return toOF([self qWidget]->statusTip());
	return toOF(toQt(self)->statusTip());
}

- (void)setStatusTip: (OFString*)statusTip
{
	[self qWidget]->setStatusTip(toQt(statusTip));
	toQt(self)->setStatusTip(toQt(statusTip));
}

- (OFString*)styleSheet
{
	return toOF([self qWidget]->styleSheet());
	return toOF(toQt(self)->styleSheet());
}

- (void)setStyleSheet: (OFString*)styleSheet
{
	[self qWidget]->setStyleSheet(toQt(styleSheet));
	toQt(self)->setStyleSheet(toQt(styleSheet));
}

- (OFString*)toolTip
{
	return toOF([self qWidget]->toolTip());
	return toOF(toQt(self)->toolTip());
}

- (void)setToolTip: (OFString*)toolTip
{
	[self qWidget]->setToolTip(toQt(toolTip));
	toQt(self)->setToolTip(toQt(toolTip));
}

- (int)toolTipDuration
{
	return [self qWidget]->toolTipDuration();
	return toQt(self)->toolTipDuration();
}

- (void)setToolTipDuration: (int)toolTipDuration
{
	[self qWidget]->setToolTipDuration(toolTipDuration);
	toQt(self)->setToolTipDuration(toolTipDuration);
}

- (bool)updatesEnabled
{
	return [self qWidget]->updatesEnabled();
	return toQt(self)->updatesEnabled();
}

- (void)setUpdatesEnabled: (bool)updatesEnabled
{
	[self qWidget]->setUpdatesEnabled(updatesEnabled);
	toQt(self)->setUpdatesEnabled(updatesEnabled);
}

- (bool)isVisible
{
	return [self qWidget]->isVisible();
	return toQt(self)->isVisible();
}

- (void)setVisible: (bool)visible
{
	[self qWidget]->setVisible(visible);
	toQt(self)->setVisible(visible);
}

- (OFString*)whatsThis
{
	return toOF([self qWidget]->whatsThis());
	return toOF(toQt(self)->whatsThis());
}

- (void)setWhatsThis: (OFString*)whatsThis
{
	[self qWidget]->setWhatsThis(toQt(whatsThis));
	toQt(self)->setWhatsThis(toQt(whatsThis));
}

- (int)width
{
	return [self qWidget]->width();
	return toQt(self)->width();
}

- (OFString*)windowFilePath
{
	return toOF([self qWidget]->windowFilePath());
	return toOF(toQt(self)->windowFilePath());
}

- (void)setWindowFilePath: (OFString*)windowFilePath
{
	[self qWidget]->setWindowFilePath(toQt(windowFilePath));
	toQt(self)->setWindowFilePath(toQt(windowFilePath));
}

- (Qt::WindowFlags)windowFlags
{
	return [self qWidget]->windowFlags();
	return toQt(self)->windowFlags();
}

- (void)setWindowFlags: (Qt::WindowFlags)windowFlags
{
	[self qWidget]->setWindowFlags(windowFlags);
	toQt(self)->setWindowFlags(windowFlags);
}

- (QIcon)windowIcon
{
	return [self qWidget]->windowIcon();
	return toQt(self)->windowIcon();
}

- (void)setWindowIcon: (QIcon)windowIcon
{
	[self qWidget]->setWindowIcon(windowIcon);
	toQt(self)->setWindowIcon(windowIcon);
}

- (Qt::WindowModality)windowModality
{
	return [self qWidget]->windowModality();
	return toQt(self)->windowModality();
}

- (void)setWindowModality: (Qt::WindowModality)windowModality
{
	[self qWidget]->setWindowModality(windowModality);
	toQt(self)->setWindowModality(windowModality);
}

- (bool)isWindowModified
{
	return [self qWidget]->isWindowModified();
	return toQt(self)->isWindowModified();
}

- (void)setWindowModified: (bool)windowModified
{
	[self qWidget]->setWindowModified(windowModified);
	toQt(self)->setWindowModified(windowModified);
}

- (double)windowOpacity
{
	return [self qWidget]->windowOpacity();
	return toQt(self)->windowOpacity();
}

- (void)setWindowOpacity: (double)windowOpacity
{
	[self qWidget]->setWindowOpacity(windowOpacity);
	toQt(self)->setWindowOpacity(windowOpacity);
}

- (OFString*)windowTitle
{
	return toOF([self qWidget]->windowTitle());
	return toOF(toQt(self)->windowTitle());
}

- (void)setWindowTitle: (OFString*)windowTitle
{
	[self qWidget]->setWindowTitle(toQt(windowTitle));
	toQt(self)->setWindowTitle(toQt(windowTitle));
}

- (int)x
{
	return [self qWidget]->x();
	return toQt(self)->x();
}

- (int)y
{
	return [self qWidget]->y();
	return toQt(self)->y();
}

- (OFArray OF_GENERIC(QtAction*)*)actions
{
	const QList<QAction*> &actions = [self qWidget]->actions();
	const QList<QAction*> &actions = toQt(self)->actions();
	OFMutableArray *ret =
	    [OFMutableArray arrayWithCapacity: actions.count()];
	void *pool = objc_autoreleasePoolPush();

	for (QAction *action: actions)
		[ret addObject:
		[ret addObject: toOF(action)];
		    [[[QtAction alloc] initWithQAction: action] autorelease]];

	[ret makeImmutable];

	objc_autoreleasePoolPop(pool);

	return ret;
}

- (void)activateWindow
{
	[self qWidget]->activateWindow();
	toQt(self)->activateWindow();
}

- (void)addAction: (QtAction*)action
{
	[self qWidget]->addAction([action qAction]);
	toQt(self)->addAction(toQt(action));
}

- (void)addActions: (OFArray OF_GENERIC(QtAction*)*)actions
{
	QList<QAction*> list;

	for (QtAction *action in actions)
		list.append([action qAction]);
		list.append(toQt(action));

	[self qWidget]->addActions(list);
	toQt(self)->addActions(list);
}

- (void)adjustSize
{
	[self qWidget]->adjustSize();
	toQt(self)->adjustSize();
}

- (QPalette::ColorRole)backgroundRole
{
	return [self qWidget]->backgroundRole();
	return toQt(self)->backgroundRole();
}

- (QBackingStore*)backingStore
{
	return [self qWidget]->backingStore();
	return toQt(self)->backingStore();
}

- (QtWidget*)childAt: (of_point_t)point
{
	return [[[QtWidget alloc] initWithQWidget:
	    [self qWidget]->childAt(toQt(point))] autorelease];
	return toOF(toQt(self)->childAt(toQt(point)));
}

- (void)clearFocus
{
	return [self qWidget]->clearFocus();
	return toQt(self)->clearFocus();
}

- (void)clearMask
{
	[self qWidget]->clearMask();
	toQt(self)->clearMask();
}

- (QMargins)contentsMargins
{
	return [self qWidget]->contentsMargins();
	return toQt(self)->contentsMargins();
}

- (of_rectangle_t)contentsRect
{
	return toOF([self qWidget]->contentsRect());
	return toOF(toQt(self)->contentsRect());
}

- (WId)effectiveWinId
- (WId)effectiveWinID
{
	return [self qWidget]->effectiveWinId();
	return toQt(self)->effectiveWinId();
}

- (void)ensurePolished
{
	[self qWidget]->ensurePolished();
	toQt(self)->ensurePolished();
}

- (QtWidget*)focusProxy
{
	return [[[QtWidget alloc] initWithQWidget:
	    [self qWidget]->focusProxy()] autorelease];
	return toOF(toQt(self)->focusProxy());
}

- (QtWidget*)focusWidget
{
	return [[[QtWidget alloc] initWithQWidget:
	    [self qWidget]->focusWidget()] autorelease];
	return toOF(toQt(self)->focusWidget());
}

- (QFontInfo)fontInfo
{
	return [self qWidget]->fontInfo();
	return toQt(self)->fontInfo();
}

- (QFontMetrics)fontMetrics
{
	return [self qWidget]->fontMetrics();
	return toQt(self)->fontMetrics();
}

- (QPalette::ColorRole)foregroundRole
{
	return [self qWidget]->foregroundRole();
	return toQt(self)->foregroundRole();
}

- (QPixmap)grabRectangle: (of_rectangle_t)rectangle
{
	return [self qWidget]->grab(toQt(rectangle));
	return toQt(self)->grab(toQt(rectangle));
}

- (void)grabGesture: (Qt::GestureType)gesture
{
	[self qWidget]->grabGesture(gesture);
	toQt(self)->grabGesture(gesture);
}

- (void)grabGesture: (Qt::GestureType)gesture
	      flags: (Qt::GestureFlags)flags
{
	[self qWidget]->grabGesture(gesture, flags);
	toQt(self)->grabGesture(gesture, flags);
}

- (void)grabKeyboard
{
	[self qWidget]->grabKeyboard();
	toQt(self)->grabKeyboard();
}

- (void)grabMouse
{
	[self qWidget]->grabMouse();
	toQt(self)->grabMouse();
}

- (void)grabMouseWithCursor: (const QCursor&)cursor
{
	[self qWidget]->grabMouse(cursor);
	toQt(self)->grabMouse(cursor);
}

- (int)grabShortcutWithKey: (const QKeySequence&)key
{
	return [self qWidget]->grabShortcut(key);
	return toQt(self)->grabShortcut(key);
}

- (int)grabShortcutWithKey: (const QKeySequence&)key
		   context: (Qt::ShortcutContext)context
{
	return [self qWidget]->grabShortcut(key, context);
	return toQt(self)->grabShortcut(key, context);
}

- (QGraphicsEffect*)graphicsEffect
{
	return [self qWidget]->graphicsEffect();
	return toQt(self)->graphicsEffect();
}

- (QGraphicsProxyWidget*)graphicsProxyWidget
{
	return [self qWidget]->graphicsProxyWidget();
	return toQt(self)->graphicsProxyWidget();
}

#ifdef QT_KEYPAD_NAVIGATION
- (bool)hasEditFocus
{
	return [self qWidget]->hasEditFocus();
	return toQt(self)->hasEditFocus();
}
#endif

- (bool)hasHeightForWidth
{
	return [self qWidget]->hasHeightForWidth();
	return toQt(self)->hasHeightForWidth();
}

- (int)heightForWidth: (int)w
{
	return [self qWidget]->heightForWidth(w);
	return toQt(self)->heightForWidth(w);
}

- (QVariant)queryInputMethod: (Qt::InputMethodQuery)query
{
	return [self qWidget]->inputMethodQuery(query);
	return toQt(self)->inputMethodQuery(query);
}

- (void)insertAction: (QtAction*)action
	      before: (QtAction*)before
{
	[self qWidget]->insertAction([before qAction], [action qAction]);
	toQt(self)->insertAction(toQt(before), toQt(action));
}

- (void)insertActions: (OFArray OF_GENERIC(QtAction*)*)actions
	       before: (QtAction*)before
{
	QList<QAction*> list;

	for (QtAction *action in actions)
		list.append([action qAction]);
		list.append(toQt(action));

	[self qWidget]->insertActions([before qAction], list);
	toQt(self)->insertActions(toQt(before), list);
}

- (bool)isAncestorOf: (QtWidget*)child
{
	return [self qWidget]->isAncestorOf([child qWidget]);
	return toQt(self)->isAncestorOf(toQt(child));
}

- (bool)isEnabledTo: (QtWidget*)ancestor
{
	return [self qWidget]->isEnabledTo([ancestor qWidget]);
	return toQt(self)->isEnabledTo(toQt(ancestor));
}

- (bool)isHidden
{
	return [self qWidget]->isHidden();
	return toQt(self)->isHidden();
}

- (bool)isVisibleTo: (QtWidget*)ancestor
{
	return [self qWidget]->isVisibleTo([ancestor qWidget]);
	return toQt(self)->isVisibleTo(toQt(ancestor));
}

- (bool)isWindow
{
	return [self qWidget]->isWindow();
	return toQt(self)->isWindow();
}

- (of_point_t)mapPosition: (of_point_t)pos
		     from: (QtWidget*)parent
{
	return toOF(toQt(self)->mapFrom(toQt(parent), toQt(pos)));
}

- (of_point_t)mapPositionFromGlobal: (of_point_t)pos
{
	return toOF(toQt(self)->mapFromGlobal(toQt(pos)));
}

- (of_point_t)mapPositionFromParent: (of_point_t)pos
{
	return toOF(toQt(self)->mapFromParent(toQt(pos)));
}

- (of_point_t)mapPosition: (of_point_t)pos
		       to: (QtWidget*)parent
{
	return toOF(toQt(self)->mapTo(toQt(parent), toQt(pos)));
}

- (of_point_t)mapPositionToGlobal: (of_point_t)pos
{
	return toOF(toQt(self)->mapToGlobal(toQt(pos)));
}

- (of_point_t)mapPositionToParent: (of_point_t)pos
{
	return toOF(toQt(self)->mapToParent(toQt(pos)));
}

- (QRegion)mask
{
	return toQt(self)->mask();
}

- (QtWidget*)nativeParentWidget
{
	return toOF(toQt(self)->nativeParentWidget());
}

- (QtWidget*)nextInFocusChain
{
	return toOF(toQt(self)->nextInFocusChain());
}

- (void)overrideWindowFlags: (Qt::WindowFlags)flags
{
	toQt(self)->overrideWindowFlags(flags);
}

- (QtWidget*)parentWidget
{
	return toOF(toQt(self)->parentWidget());
}

- (QtWidget*)previousInFocusChain
{
	return toOF(toQt(self)->previousInFocusChain());
}

- (void)releaseKeyboard
{
	toQt(self)->releaseKeyboard();
}

- (void)releaseMouse
{
	toQt(self)->releaseMouse();
}

- (void)releaseShortcut: (int)ID
{
	toQt(self)->releaseShortcut(ID);
}

- (void)removeAction: (QtAction*)action
{
	toQt(self)->removeAction(toQt(action));
}

- (void)renderIntoPaintDevice: (QtObject <QtPaintDevice>*)target
		 targetOffset: (of_point_t)targetOffset
		 sourceRegion: (QRegion)sourceRegion
{
	toQt(self)->render([target qPaintDevice], toQt(targetOffset),
	    sourceRegion);
}

- (void)renderIntoPaintDevice: (QtObject <QtPaintDevice>*)target
		 targetOffset: (of_point_t)targetOffset
		 sourceRegion: (QRegion)sourceRegion
			flags: (QWidget::RenderFlags)renderFlags
{
	toQt(self)->render([target qPaintDevice], toQt(targetOffset),
	    sourceRegion, renderFlags);
}

- (void)renderIntoPainter: (QPainter*)target
	     targetOffset: (of_point_t)targetOffset
	     sourceRegion: (QRegion)sourceRegion
{
	toQt(self)->render(target, toQt(targetOffset), sourceRegion);
}

- (void)renderIntoPainter: (QPainter*)target
	     targetOffset: (of_point_t)targetOffset
	     sourceRegion: (QRegion)sourceRegion
		    flags: (QWidget::RenderFlags)renderFlags
{
	toQt(self)->render(target, toQt(targetOffset), sourceRegion,
	    renderFlags);
}

- (void)repaintInRectangle: (of_rectangle_t)rect
{
	toQt(self)->repaint(toQt(rect));
}

- (void)repaintInRegion: (const QRegion&)region
{
	toQt(self)->repaint(region);
}

- (bool)restoreGeometry: (OFDataArray*)geometry
{
	return toQt(self)->restoreGeometry(toQt(geometry));
}

- (OFDataArray*)saveGeometry
{
	return toOF(toQt(self)->saveGeometry());
}

- (void)scrollRight: (int)dx
	       down: (int)dy
{
	toQt(self)->scroll(dx, dy);
}

- (void)scrollRight: (int)dx
	       down: (int)dy
	inRectangle: (of_rectangle_t)rect
{
	toQt(self)->scroll(dx, dy, toQt(rect));
}

- (void)setAttribute: (Qt::WidgetAttribute)attribute
		  to: (bool)on
{
	toQt(self)->setAttribute(attribute, on);
}

#ifdef QT_KEYPAD_NAVIGATION
- (void)setEditFocus: (bool)enable
{
	toQt(self)->setEditFocus(enable);
}
#endif

- (void)setFixedHeight: (int)height
{
	toQt(self)->setFixedHeight(height);
}

- (void)setFixedSize: (of_dimension_t)size
{
	toQt(self)->setFixedSize(toQt(size));
}

- (void)setFixedWidth: (int)width
{
	toQt(self)->setFixedWidth(width);
}

- (void)setFocus: (Qt::FocusReason)reason
{
	toQt(self)->setFocus(reason);
}

- (void)setFocusProxy: (QtWidget*)widget
{
	toQt(self)->setFocusProxy(toQt(widget));
}

- (void)setForegroundRole: (QPalette::ColorRole)role
{
	toQt(self)->setForegroundRole(role);
}

- (void)setGraphicsEffect: (QGraphicsEffect*)effect
{
	toQt(self)->setGraphicsEffect(effect);
}

- (void)setLayout: (QLayout*)layout
{
	toQt(self)->setLayout(layout);
}

- (void)setMaskFromBitmap: (const QBitmap&)bitmap
{
	toQt(self)->setMask(bitmap);
}

- (void)setMask: (const QRegion&)region
{
	toQt(self)->setMask(region);
}

- (void)setParent: (QtWidget*)parent
{
	toQt(self)->setParent(toQt(parent));
}

- (void)setParent: (QtWidget*)parent
	    flags: (Qt::WindowFlags)flags
{
	toQt(self)->setParent(toQt(parent), flags);
}

- (void)setAutoRepeat: (bool)enable
	  forShortcut: (int)ID
{
	toQt(self)->setShortcutAutoRepeat(ID, enable);
}

- (void)setEnabled: (bool)enable
       forShortcut: (int)ID
{
	toQt(self)->setShortcutEnabled(ID, enable);
}

- (void)setStyle: (QStyle*)style
{
	toQt(self)->setStyle(style);
}

- (void)setWindowRole: (OFString*)role
{
	toQt(self)->setWindowRole(toQt(role));
}

- (void)setWindowState: (Qt::WindowStates)windowState
{
	toQt(self)->setWindowState(windowState);
}

- (void)stackUnder: (QtWidget*)widget
{
	toQt(self)->stackUnder(toQt(widget));
}

- (QStyle*)style
{
	return toQt(self)->style();
}

- (bool)testAttribute: (Qt::WidgetAttribute)attribute
{
	return toQt(self)->testAttribute(attribute);
}

- (bool)isUnderMouse
{
	return toQt(self)->underMouse();
}

- (void)ungrabGesture: (Qt::GestureType)gesture
{
	toQt(self)->ungrabGesture(gesture);
}

- (void)updateInRectangle: (of_rectangle_t)rect
{
	toQt(self)->update(toQt(rect));
}

- (void)updateInRegion: (const QRegion&)region
{
	toQt(self)->update(region);
}

- (void)updateGeometry
{
	toQt(self)->updateGeometry();
}

- (QRegion)visibleRegion
{
	return toQt(self)->visibleRegion();
}

- (WId)winID
{
	return toQt(self)->winId();
}

- (QtWidget*)window
{
	return toOF(toQt(self)->window());
}

- (QWindow*)windowHandle
{
	return toQt(self)->windowHandle();
}

- (OFString*)windowRole
{
	return toOF(toQt(self)->windowRole());
}

- (Qt::WindowStates)windowState
{
	return toQt(self)->windowState();
}

- (Qt::WindowType)windowType
{
	return toQt(self)->windowType();
}
@end