/
qpagelayout.go
984 lines (800 loc) · 31.7 KB
/
qpagelayout.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
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
package qtgui
// /usr/include/qt/QtGui/qpagelayout.h
// #include <qpagelayout.h>
// #include <QtGui>
// header block end
// main block begin
// main block end
// use block begin
// use block end
// ext block begin
/*
#include <stdlib.h>
// extern C begin: 33
*/
// import "C"
import "unsafe"
import "reflect"
import "fmt"
import "log"
import "github.com/kitech/qt.go/qtrt"
import "github.com/kitech/qt.go/qtcore"
// ext block end
// body block begin
/*
*/
type QPageLayout struct {
*qtrt.CObject
}
type QPageLayout_ITF interface {
QPageLayout_PTR() *QPageLayout
}
func (ptr *QPageLayout) QPageLayout_PTR() *QPageLayout { return ptr }
func (this *QPageLayout) GetCthis() unsafe.Pointer {
if this == nil {
return nil
} else {
return this.Cthis
}
}
func (this *QPageLayout) SetCthis(cthis unsafe.Pointer) {
if this.CObject == nil {
this.CObject = &qtrt.CObject{cthis}
} else {
this.CObject.Cthis = cthis
}
}
func NewQPageLayoutFromPointer(cthis unsafe.Pointer) *QPageLayout {
return &QPageLayout{&qtrt.CObject{cthis}}
}
func (*QPageLayout) NewFromPointer(cthis unsafe.Pointer) *QPageLayout {
return NewQPageLayoutFromPointer(cthis)
}
// /usr/include/qt/QtGui/qpagelayout.h:80
// index:0
// Public Visibility=Default Availability=Available
// [-2] void QPageLayout()
/*
Creates an invalid QPageLayout.
*/
func (*QPageLayout) NewForInherit() *QPageLayout {
return NewQPageLayout()
}
func NewQPageLayout() *QPageLayout {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayoutC2Ev", qtrt.FFI_TYPE_POINTER)
qtrt.ErrPrint(err, rv)
gothis := NewQPageLayoutFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQPageLayout)
return gothis
}
// /usr/include/qt/QtGui/qpagelayout.h:81
// index:1
// Public Visibility=Default Availability=Available
// [-2] void QPageLayout(const QPageSize &, QPageLayout::Orientation, const QMarginsF &, QPageLayout::Unit, const QMarginsF &)
/*
Creates an invalid QPageLayout.
*/
func (*QPageLayout) NewForInherit1(pageSize QPageSize_ITF, orientation int, margins qtcore.QMarginsF_ITF, units int, minMargins qtcore.QMarginsF_ITF) *QPageLayout {
return NewQPageLayout1(pageSize, orientation, margins, units, minMargins)
}
func NewQPageLayout1(pageSize QPageSize_ITF, orientation int, margins qtcore.QMarginsF_ITF, units int, minMargins qtcore.QMarginsF_ITF) *QPageLayout {
var convArg0 unsafe.Pointer
if pageSize != nil && pageSize.QPageSize_PTR() != nil {
convArg0 = pageSize.QPageSize_PTR().GetCthis()
}
var convArg2 unsafe.Pointer
if margins != nil && margins.QMarginsF_PTR() != nil {
convArg2 = margins.QMarginsF_PTR().GetCthis()
}
var convArg4 unsafe.Pointer
if minMargins != nil && minMargins.QMarginsF_PTR() != nil {
convArg4 = minMargins.QMarginsF_PTR().GetCthis()
}
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayoutC2ERK9QPageSizeNS_11OrientationERK9QMarginsFNS_4UnitES6_", qtrt.FFI_TYPE_POINTER, convArg0, orientation, convArg2, units, convArg4)
qtrt.ErrPrint(err, rv)
gothis := NewQPageLayoutFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQPageLayout)
return gothis
}
// /usr/include/qt/QtGui/qpagelayout.h:81
// index:1
// Public Visibility=Default Availability=Available
// [-2] void QPageLayout(const QPageSize &, QPageLayout::Orientation, const QMarginsF &, QPageLayout::Unit, const QMarginsF &)
/*
Creates an invalid QPageLayout.
*/
func (*QPageLayout) NewForInherit1p(pageSize QPageSize_ITF, orientation int, margins qtcore.QMarginsF_ITF) *QPageLayout {
return NewQPageLayout1p(pageSize, orientation, margins)
}
func NewQPageLayout1p(pageSize QPageSize_ITF, orientation int, margins qtcore.QMarginsF_ITF) *QPageLayout {
var convArg0 unsafe.Pointer
if pageSize != nil && pageSize.QPageSize_PTR() != nil {
convArg0 = pageSize.QPageSize_PTR().GetCthis()
}
var convArg2 unsafe.Pointer
if margins != nil && margins.QMarginsF_PTR() != nil {
convArg2 = margins.QMarginsF_PTR().GetCthis()
}
// arg: 3, QPageLayout::Unit=Enum, QPageLayout::Unit=Enum, , Invalid
units := 0
// arg: 4, const QMarginsF &=LValueReference, QMarginsF=Record, , Invalid
var convArg4 unsafe.Pointer
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayoutC2ERK9QPageSizeNS_11OrientationERK9QMarginsFNS_4UnitES6_", qtrt.FFI_TYPE_POINTER, convArg0, orientation, convArg2, units, convArg4)
qtrt.ErrPrint(err, rv)
gothis := NewQPageLayoutFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQPageLayout)
return gothis
}
// /usr/include/qt/QtGui/qpagelayout.h:81
// index:1
// Public Visibility=Default Availability=Available
// [-2] void QPageLayout(const QPageSize &, QPageLayout::Orientation, const QMarginsF &, QPageLayout::Unit, const QMarginsF &)
/*
Creates an invalid QPageLayout.
*/
func (*QPageLayout) NewForInherit1p1(pageSize QPageSize_ITF, orientation int, margins qtcore.QMarginsF_ITF, units int) *QPageLayout {
return NewQPageLayout1p1(pageSize, orientation, margins, units)
}
func NewQPageLayout1p1(pageSize QPageSize_ITF, orientation int, margins qtcore.QMarginsF_ITF, units int) *QPageLayout {
var convArg0 unsafe.Pointer
if pageSize != nil && pageSize.QPageSize_PTR() != nil {
convArg0 = pageSize.QPageSize_PTR().GetCthis()
}
var convArg2 unsafe.Pointer
if margins != nil && margins.QMarginsF_PTR() != nil {
convArg2 = margins.QMarginsF_PTR().GetCthis()
}
// arg: 4, const QMarginsF &=LValueReference, QMarginsF=Record, , Invalid
var convArg4 unsafe.Pointer
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayoutC2ERK9QPageSizeNS_11OrientationERK9QMarginsFNS_4UnitES6_", qtrt.FFI_TYPE_POINTER, convArg0, orientation, convArg2, units, convArg4)
qtrt.ErrPrint(err, rv)
gothis := NewQPageLayoutFromPointer(unsafe.Pointer(uintptr(rv)))
qtrt.SetFinalizer(gothis, DeleteQPageLayout)
return gothis
}
// /usr/include/qt/QtGui/qpagelayout.h:86
// index:0
// Public inline Visibility=Default Availability=Available
// [8] QPageLayout & operator=(QPageLayout &&)
/*
*/
func (this *QPageLayout) Operator_equal(other unsafe.Pointer /*333*/) *QPageLayout {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayoutaSEOS_", qtrt.FFI_TYPE_POINTER, this.GetCthis(), other)
qtrt.ErrPrint(err, rv)
rv2 := /*==*/ NewQPageLayoutFromPointer(unsafe.Pointer(uintptr(rv))) // 4441
qtrt.SetFinalizer(rv2 /*==*/, DeleteQPageLayout)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:88
// index:1
// Public Visibility=Default Availability=Available
// [8] QPageLayout & operator=(const QPageLayout &)
/*
*/
func (this *QPageLayout) Operator_equal1(other QPageLayout_ITF) *QPageLayout {
var convArg0 unsafe.Pointer
if other != nil && other.QPageLayout_PTR() != nil {
convArg0 = other.QPageLayout_PTR().GetCthis()
}
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayoutaSERKS_", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
rv2 := /*==*/ NewQPageLayoutFromPointer(unsafe.Pointer(uintptr(rv))) // 4441
qtrt.SetFinalizer(rv2 /*==*/, DeleteQPageLayout)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:89
// index:0
// Public Visibility=Default Availability=Available
// [-2] void ~QPageLayout()
/*
*/
func DeleteQPageLayout(this *QPageLayout) {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayoutD2Ev", qtrt.FFI_TYPE_VOID, this.GetCthis())
qtrt.Cmemset(this.GetCthis(), 9, 8)
qtrt.ErrPrint(err, rv)
this.SetCthis(nil)
}
// /usr/include/qt/QtGui/qpagelayout.h:91
// index:0
// Public inline Visibility=Default Availability=Available
// [-2] void swap(QPageLayout &)
/*
Swaps this page layout with other. This function is very fast and never fails.
*/
func (this *QPageLayout) Swap(other QPageLayout_ITF) {
var convArg0 unsafe.Pointer
if other != nil && other.QPageLayout_PTR() != nil {
convArg0 = other.QPageLayout_PTR().GetCthis()
}
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout4swapERS_", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:94
// index:0
// Public Visibility=Default Availability=Available
// [1] bool isEquivalentTo(const QPageLayout &) const
/*
Returns true if this page layout is equivalent to the other page layout, i.e. if the page has the same size, margins and orientation.
*/
func (this *QPageLayout) IsEquivalentTo(other QPageLayout_ITF) bool {
var convArg0 unsafe.Pointer
if other != nil && other.QPageLayout_PTR() != nil {
convArg0 = other.QPageLayout_PTR().GetCthis()
}
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout14isEquivalentToERKS_", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
return rv != 0
}
// /usr/include/qt/QtGui/qpagelayout.h:96
// index:0
// Public Visibility=Default Availability=Available
// [1] bool isValid() const
/*
Returns true if this page layout is valid.
*/
func (this *QPageLayout) IsValid() bool {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout7isValidEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
return rv != 0
}
// /usr/include/qt/QtGui/qpagelayout.h:98
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setMode(QPageLayout::Mode)
/*
Sets a page layout mode to mode.
See also mode().
*/
func (this *QPageLayout) SetMode(mode int) {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout7setModeENS_4ModeE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), mode)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:99
// index:0
// Public Visibility=Default Availability=Available
// [4] QPageLayout::Mode mode() const
/*
Returns the page layout mode.
See also setMode().
*/
func (this *QPageLayout) Mode() int {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout4modeEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
return int(rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:101
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setPageSize(const QPageSize &, const QMarginsF &)
/*
Sets the page size of the page layout to pageSize.
Optionally define the minimum allowed margins minMargins, e.g. the minimum margins able to be printed by a physical print device, otherwise the minimum margins will default to 0.
If StandardMode is set then the existing margins will be clamped to the new minimum margins and the maximum margins allowed by the page size. If FullPageMode is set then the existing margins will be unchanged.
See also pageSize().
*/
func (this *QPageLayout) SetPageSize(pageSize QPageSize_ITF, minMargins qtcore.QMarginsF_ITF) {
var convArg0 unsafe.Pointer
if pageSize != nil && pageSize.QPageSize_PTR() != nil {
convArg0 = pageSize.QPageSize_PTR().GetCthis()
}
var convArg1 unsafe.Pointer
if minMargins != nil && minMargins.QMarginsF_PTR() != nil {
convArg1 = minMargins.QMarginsF_PTR().GetCthis()
}
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout11setPageSizeERK9QPageSizeRK9QMarginsF", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0, convArg1)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:101
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setPageSize(const QPageSize &, const QMarginsF &)
/*
Sets the page size of the page layout to pageSize.
Optionally define the minimum allowed margins minMargins, e.g. the minimum margins able to be printed by a physical print device, otherwise the minimum margins will default to 0.
If StandardMode is set then the existing margins will be clamped to the new minimum margins and the maximum margins allowed by the page size. If FullPageMode is set then the existing margins will be unchanged.
See also pageSize().
*/
func (this *QPageLayout) SetPageSizep(pageSize QPageSize_ITF) {
var convArg0 unsafe.Pointer
if pageSize != nil && pageSize.QPageSize_PTR() != nil {
convArg0 = pageSize.QPageSize_PTR().GetCthis()
}
// arg: 1, const QMarginsF &=LValueReference, QMarginsF=Record, , Invalid
var convArg1 unsafe.Pointer
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout11setPageSizeERK9QPageSizeRK9QMarginsF", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0, convArg1)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:103
// index:0
// Public Visibility=Default Availability=Available
// [8] QPageSize pageSize() const
/*
Returns the page size of the page layout.
Note that the QPageSize is always defined in a Portrait orientation. To obtain a size that takes the set orientation into account you must use fullRect().
See also setPageSize().
*/
func (this *QPageLayout) PageSize() *QPageSize /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout8pageSizeEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := /*==*/ NewQPageSizeFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2 /*==*/, DeleteQPageSize)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:105
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setOrientation(QPageLayout::Orientation)
/*
Sets the page orientation of the page layout to orientation.
Changing the orientation does not affect the current margins or the minimum margins.
See also orientation().
*/
func (this *QPageLayout) SetOrientation(orientation int) {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout14setOrientationENS_11OrientationE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), orientation)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:106
// index:0
// Public Visibility=Default Availability=Available
// [4] QPageLayout::Orientation orientation() const
/*
Returns the page orientation of the page layout.
See also setOrientation().
*/
func (this *QPageLayout) Orientation() int {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout11orientationEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
return int(rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:108
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setUnits(QPageLayout::Unit)
/*
Sets the units used to define the page layout.
See also units().
*/
func (this *QPageLayout) SetUnits(units int) {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout8setUnitsENS_4UnitE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), units)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:109
// index:0
// Public Visibility=Default Availability=Available
// [4] QPageLayout::Unit units() const
/*
Returns the units the page layout is currently defined in.
See also setUnits().
*/
func (this *QPageLayout) Units() int {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout5unitsEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
return int(rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:111
// index:0
// Public Visibility=Default Availability=Available
// [1] bool setMargins(const QMarginsF &)
/*
Sets the page margins of the page layout to margins Returns true if the margins were successfully set.
The units used are those currently defined for the layout. To use different units then call setUnits() first.
If in the default StandardMode then all the new margins must fall between the minimum margins set and the maximum margins allowed by the page size, otherwise the margins will not be set.
If in FullPageMode then any margin values will be accepted.
See also margins() and units().
*/
func (this *QPageLayout) SetMargins(margins qtcore.QMarginsF_ITF) bool {
var convArg0 unsafe.Pointer
if margins != nil && margins.QMarginsF_PTR() != nil {
convArg0 = margins.QMarginsF_PTR().GetCthis()
}
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout10setMarginsERK9QMarginsF", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
return rv != 0
}
// /usr/include/qt/QtGui/qpagelayout.h:112
// index:0
// Public Visibility=Default Availability=Available
// [1] bool setLeftMargin(qreal)
/*
Sets the left page margin of the page layout to leftMargin. Returns true if the margin was successfully set.
The units used are those currently defined for the layout. To use different units call setUnits() first.
If in the default StandardMode then the new margin must fall between the minimum margin set and the maximum margin allowed by the page size, otherwise the margin will not be set.
If in FullPageMode then any margin values will be accepted.
See also setMargins() and margins().
*/
func (this *QPageLayout) SetLeftMargin(leftMargin float64) bool {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout13setLeftMarginEd", qtrt.FFI_TYPE_POINTER, this.GetCthis(), leftMargin)
qtrt.ErrPrint(err, rv)
return rv != 0
}
// /usr/include/qt/QtGui/qpagelayout.h:113
// index:0
// Public Visibility=Default Availability=Available
// [1] bool setRightMargin(qreal)
/*
Sets the right page margin of the page layout to rightMargin. Returns true if the margin was successfully set.
The units used are those currently defined for the layout. To use different units call setUnits() first.
If in the default StandardMode then the new margin must fall between the minimum margin set and the maximum margin allowed by the page size, otherwise the margin will not be set.
If in FullPageMode then any margin values will be accepted.
See also setMargins() and margins().
*/
func (this *QPageLayout) SetRightMargin(rightMargin float64) bool {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout14setRightMarginEd", qtrt.FFI_TYPE_POINTER, this.GetCthis(), rightMargin)
qtrt.ErrPrint(err, rv)
return rv != 0
}
// /usr/include/qt/QtGui/qpagelayout.h:114
// index:0
// Public Visibility=Default Availability=Available
// [1] bool setTopMargin(qreal)
/*
Sets the top page margin of the page layout to topMargin. Returns true if the margin was successfully set.
The units used are those currently defined for the layout. To use different units call setUnits() first.
If in the default StandardMode then the new margin must fall between the minimum margin set and the maximum margin allowed by the page size, otherwise the margin will not be set.
If in FullPageMode then any margin values will be accepted.
See also setMargins() and margins().
*/
func (this *QPageLayout) SetTopMargin(topMargin float64) bool {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout12setTopMarginEd", qtrt.FFI_TYPE_POINTER, this.GetCthis(), topMargin)
qtrt.ErrPrint(err, rv)
return rv != 0
}
// /usr/include/qt/QtGui/qpagelayout.h:115
// index:0
// Public Visibility=Default Availability=Available
// [1] bool setBottomMargin(qreal)
/*
Sets the bottom page margin of the page layout to bottomMargin. Returns true if the margin was successfully set.
The units used are those currently defined for the layout. To use different units call setUnits() first.
If in the default StandardMode then the new margin must fall between the minimum margin set and the maximum margin allowed by the page size, otherwise the margin will not be set.
If in FullPageMode then any margin values will be accepted.
See also setMargins() and margins().
*/
func (this *QPageLayout) SetBottomMargin(bottomMargin float64) bool {
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout15setBottomMarginEd", qtrt.FFI_TYPE_POINTER, this.GetCthis(), bottomMargin)
qtrt.ErrPrint(err, rv)
return rv != 0
}
// /usr/include/qt/QtGui/qpagelayout.h:117
// index:0
// Public Visibility=Default Availability=Available
// [32] QMarginsF margins() const
/*
Returns the margins of the page layout using the currently set units.
See also setMargins() and units().
*/
func (this *QPageLayout) Margins() *qtcore.QMarginsF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout7marginsEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQMarginsFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQMarginsF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:118
// index:1
// Public Visibility=Default Availability=Available
// [32] QMarginsF margins(QPageLayout::Unit) const
/*
Returns the margins of the page layout using the currently set units.
See also setMargins() and units().
*/
func (this *QPageLayout) Margins1(units int) *qtcore.QMarginsF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout7marginsENS_4UnitE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), units)
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQMarginsFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQMarginsF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:119
// index:0
// Public Visibility=Default Availability=Available
// [16] QMargins marginsPoints() const
/*
Returns the margins of the page layout in Postscript Points (1/72 of an inch).
See also setMargins() and margins().
*/
func (this *QPageLayout) MarginsPoints() *qtcore.QMargins /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout13marginsPointsEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQMarginsFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQMargins)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:120
// index:0
// Public Visibility=Default Availability=Available
// [16] QMargins marginsPixels(int) const
/*
Returns the margins of the page layout in device pixels for the given resolution.
See also setMargins().
*/
func (this *QPageLayout) MarginsPixels(resolution int) *qtcore.QMargins /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout13marginsPixelsEi", qtrt.FFI_TYPE_POINTER, this.GetCthis(), resolution)
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQMarginsFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQMargins)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:122
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setMinimumMargins(const QMarginsF &)
/*
Sets the minimum page margins of the page layout to minMargins.
It is not recommended to override the default values set for a page size as this may be the minimum printable area for a physical print device.
If the StandardMode mode is set then the existing margins will be clamped to the new minMargins and the maximum allowed by the page size. If the FullPageMode is set then the existing margins will be unchanged.
See also minimumMargins() and setMargins().
*/
func (this *QPageLayout) SetMinimumMargins(minMargins qtcore.QMarginsF_ITF) {
var convArg0 unsafe.Pointer
if minMargins != nil && minMargins.QMarginsF_PTR() != nil {
convArg0 = minMargins.QMarginsF_PTR().GetCthis()
}
rv, err := qtrt.InvokeQtFunc6("_ZN11QPageLayout17setMinimumMarginsERK9QMarginsF", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qpagelayout.h:123
// index:0
// Public Visibility=Default Availability=Available
// [32] QMarginsF minimumMargins() const
/*
Returns the minimum margins of the page layout.
See also setMinimumMargins() and maximumMargins().
*/
func (this *QPageLayout) MinimumMargins() *qtcore.QMarginsF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout14minimumMarginsEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQMarginsFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQMarginsF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:124
// index:0
// Public Visibility=Default Availability=Available
// [32] QMarginsF maximumMargins() const
/*
Returns the maximum margins that would be applied if the page layout was in StandardMode.
The maximum margins allowed are calculated as the full size of the page minus the minimum margins set. For example, if the page width is 100 points and the minimum right margin is 10 points, then the maximum left margin will be 90 points.
See also setMinimumMargins() and minimumMargins().
*/
func (this *QPageLayout) MaximumMargins() *qtcore.QMarginsF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout14maximumMarginsEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQMarginsFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQMarginsF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:126
// index:0
// Public Visibility=Default Availability=Available
// [32] QRectF fullRect() const
/*
Returns the full page rectangle in the current layout units.
The page rectangle takes into account the page size and page orientation, but not the page margins.
See also paintRect() and units().
*/
func (this *QPageLayout) FullRect() *qtcore.QRectF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout8fullRectEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:127
// index:1
// Public Visibility=Default Availability=Available
// [32] QRectF fullRect(QPageLayout::Unit) const
/*
Returns the full page rectangle in the current layout units.
The page rectangle takes into account the page size and page orientation, but not the page margins.
See also paintRect() and units().
*/
func (this *QPageLayout) FullRect1(units int) *qtcore.QRectF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout8fullRectENS_4UnitE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), units)
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:128
// index:0
// Public Visibility=Default Availability=Available
// [16] QRect fullRectPoints() const
/*
Returns the full page rectangle in Postscript Points (1/72 of an inch).
The page rectangle takes into account the page size and page orientation, but not the page margins.
See also paintRect().
*/
func (this *QPageLayout) FullRectPoints() *qtcore.QRect /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout14fullRectPointsEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRect)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:129
// index:0
// Public Visibility=Default Availability=Available
// [16] QRect fullRectPixels(int) const
/*
Returns the full page rectangle in device pixels for the given resolution.
The page rectangle takes into account the page size and page orientation, but not the page margins.
See also paintRect().
*/
func (this *QPageLayout) FullRectPixels(resolution int) *qtcore.QRect /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout14fullRectPixelsEi", qtrt.FFI_TYPE_POINTER, this.GetCthis(), resolution)
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRect)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:131
// index:0
// Public Visibility=Default Availability=Available
// [32] QRectF paintRect() const
/*
Returns the page rectangle in the current layout units.
The paintable rectangle takes into account the page size, orientation and margins.
If the FullPageMode mode is set then the fullRect() is returned and the margins must be manually managed.
*/
func (this *QPageLayout) PaintRect() *qtcore.QRectF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout9paintRectEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:132
// index:1
// Public Visibility=Default Availability=Available
// [32] QRectF paintRect(QPageLayout::Unit) const
/*
Returns the page rectangle in the current layout units.
The paintable rectangle takes into account the page size, orientation and margins.
If the FullPageMode mode is set then the fullRect() is returned and the margins must be manually managed.
*/
func (this *QPageLayout) PaintRect1(units int) *qtcore.QRectF /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout9paintRectENS_4UnitE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), units)
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:133
// index:0
// Public Visibility=Default Availability=Available
// [16] QRect paintRectPoints() const
/*
Returns the paintable rectangle in rounded Postscript Points (1/72 of an inch).
The paintable rectangle takes into account the page size, orientation and margins.
If the FullPageMode mode is set then the fullRect() is returned and the margins must be manually managed.
*/
func (this *QPageLayout) PaintRectPoints() *qtcore.QRect /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout15paintRectPointsEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRect)
return rv2
}
// /usr/include/qt/QtGui/qpagelayout.h:134
// index:0
// Public Visibility=Default Availability=Available
// [16] QRect paintRectPixels(int) const
/*
Returns the paintable rectangle in rounded device pixels for the given resolution.
The paintable rectangle takes into account the page size, orientation and margins.
If the FullPageMode mode is set then the fullRect() is returned and the margins must be manually managed.
*/
func (this *QPageLayout) PaintRectPixels(resolution int) *qtcore.QRect /*123*/ {
rv, err := qtrt.InvokeQtFunc6("_ZNK11QPageLayout15paintRectPixelsEi", qtrt.FFI_TYPE_POINTER, this.GetCthis(), resolution)
qtrt.ErrPrint(err, rv)
rv2 := qtcore.NewQRectFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRect)
return rv2
}
/*
This enum type is used to specify the measurement unit for page layout and margins.
*/
type QPageLayout__Unit = int
//
const QPageLayout__Millimeter QPageLayout__Unit = 0
//
const QPageLayout__Point QPageLayout__Unit = 1
//
const QPageLayout__Inch QPageLayout__Unit = 2
//
const QPageLayout__Pica QPageLayout__Unit = 3
//
const QPageLayout__Didot QPageLayout__Unit = 4
//
const QPageLayout__Cicero QPageLayout__Unit = 5
func (this *QPageLayout) UnitItemName(val int) string {
switch val {
case QPageLayout__Millimeter: // 0
return "Millimeter"
case QPageLayout__Point: // 1
return "Point"
case QPageLayout__Inch: // 2
return "Inch"
case QPageLayout__Pica: // 3
return "Pica"
case QPageLayout__Didot: // 4
return "Didot"
case QPageLayout__Cicero: // 5
return "Cicero"
default:
return fmt.Sprintf("%d", val)
}
}
func QPageLayout_UnitItemName(val int) string {
var nilthis *QPageLayout
return nilthis.UnitItemName(val)
}
/*
This enum type defines the page orientation
Note that some standard page sizes are defined with a width larger than their height, hence the orientation is defined relative to the standard page size and not using the relative page dimensions.
*/
type QPageLayout__Orientation = int
// The page size is used in its default orientation
const QPageLayout__Portrait QPageLayout__Orientation = 0
//
const QPageLayout__Landscape QPageLayout__Orientation = 1
func (this *QPageLayout) OrientationItemName(val int) string {
switch val {
case QPageLayout__Portrait: // 0
return "Portrait"
case QPageLayout__Landscape: // 1
return "Landscape"
default:
return fmt.Sprintf("%d", val)
}
}
func QPageLayout_OrientationItemName(val int) string {
var nilthis *QPageLayout
return nilthis.OrientationItemName(val)
}
/*
Defines the page layout mode
*/
type QPageLayout__Mode = int
// Paint Rect includes margins, margins must fall between the minimum and maximum.
const QPageLayout__StandardMode QPageLayout__Mode = 0
// Paint Rect excludes margins, margins can be any value and must be managed manually.
const QPageLayout__FullPageMode QPageLayout__Mode = 1
func (this *QPageLayout) ModeItemName(val int) string {
switch val {
case QPageLayout__StandardMode: // 0
return "StandardMode"
case QPageLayout__FullPageMode: // 1
return "FullPageMode"
default:
return fmt.Sprintf("%d", val)
}
}
func QPageLayout_ModeItemName(val int) string {
var nilthis *QPageLayout
return nilthis.ModeItemName(val)
}
// body block end
// keep block begin
func init_unused_10907() {
if false {
reflect.TypeOf(123)
}
if false {
reflect.TypeOf(unsafe.Sizeof(0))
}
if false {
fmt.Println(123)
}
if false {
log.Println(123)
}
if false {
qtrt.KeepMe()
}
if false {
qtcore.KeepMe()
}
}
// keep block end