xlang
v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
xlibrarys
Qt5
Qt5
qt5
widgets
QPrinter.xcsm
浏览该文件的文档.
1
//xlang Source, Name:QPrinter.xcsm
2
//Date: Sat Aug 13:36:30 2019
3
package
Qt{
4
@SuppressWarnings public class QPrinter : QPagedPaintDevice{
5
6
private bool need_delloc = true;
7
public
enum
PrinterMode { ScreenResolution, PrinterResolution, HighResolution };
8
public
enum
Orientation { Portrait, Landscape };
9
public
enum
PageOrder {
FirstPageFirst
,
10
LastPageFirst };
11
12
public
enum
ColorMode {
GrayScale
,
13
Color };
14
15
public
enum
PaperSource {
OnlyOne
,
16
Lower
,
17
Middle
,
18
Manual
,
19
Envelope
,
20
EnvelopeManual
,
21
Auto
,
22
Tractor
,
23
SmallFormat
,
24
LargeFormat
,
25
LargeCapacity
,
26
Cassette
,
27
FormSource
,
28
MaxPageSource
,
// Deprecated
29
CustomSource
30
};
31
32
public
enum
PrinterState {
Idle
,
33
Active
,
34
Aborted
,
35
Error };
36
37
public
enum
OutputFormat {
NativeFormat
, PdfFormat };
38
39
// Keep in sync with QAbstractPrintDialog::PrintRange
40
public
enum
PrintRange {
AllPages
, Selection, PageRange, CurrentPage };
41
42
public
enum
Unit {
43
Millimeter
,
44
Point
,
45
Inch
,
46
Pica
,
47
Didot
,
48
Cicero
,
49
DevicePixel
50
};
51
52
public
enum
DuplexMode {
53
DuplexNone = 0,
54
DuplexAuto
,
55
DuplexLongSide
,
56
DuplexShortSide
57
};
58
59
public
QPrinter
() throws
IllegalArgumentException
{
60
nativehandle = QtXnl.createQPObject(QType.qtPrinter,
this
, 0, PrinterMode.ScreenResolution, 0, 0, 0);
61
if
(nativehandle == 0) {
62
throw
new
IllegalArgumentException
(
"can't new Object"
);
63
}
64
}
65
66
public
QPrinter
(
long
handle){
67
need_delloc =
false
;
68
nativehandle = handle;
69
}
70
71
public
QPrinter
(PrinterMode mode)
throws
IllegalArgumentException
{
72
nativehandle = QtXnl.createQPObject(QType.qtPrinter,
this
, 0, mode, 0, 0, 0);
73
if
(nativehandle == 0) {
74
throw
new
IllegalArgumentException
(
"can't new Object"
);
75
}
76
}
77
78
protected
void
setNeedDelloc
(
bool
bd){
79
need_delloc = bd;
80
}
81
82
protected
bool
isNeedDelloc
(){
83
return
need_delloc;
84
}
85
86
public
int
devType
()
override
{
87
return
QtXnl.widget_get_int_value(nativehandle, Constant.PAINTERTYPE);
88
}
89
90
public
bool
newPage
() {
91
return
QtXnl.widget_get_int_value(nativehandle, Constant.PAINTERNEWPAGE) != 0;
92
}
93
94
public
void
setOutputFormat
(OutputFormat format){
95
QtXnl.widget_set_vint_value(nativehandle, Constant.PRINTERSETOUTFMT, format);
96
}
97
98
public
void
setPageSize
(PageSize pagesize){
99
QtXnl.widget_set_vint_value(nativehandle, Constant.PRINTERSETPAGESIZE, pagesize);
100
}
101
102
public
OutputFormat
outputFormat
() {
103
return
(OutputFormat)QtXnl.widget_get_int_value(nativehandle, Constant.PRINTERGETOUTFMT);
104
}
105
106
public
bool
setPageMargins
(
double
l,
double
t,
double
r,
double
b){
107
QtXnl.native_double4(l, t, r, b, nativehandle, Constant.PRINTER_SETPAGEMARGINS);
108
return
true
;
109
}
110
111
public
bool
setPageOrientation
(Orientation orientation){
112
return
QtXnl.widget_get_int_bool(nativehandle, Constant.PRINTER_SETPAGEORIENTATION, orientation);
113
}
114
115
public
void
finalize
(){
116
if
(need_delloc){
117
QtXnl.widget_slot(nativehandle, Constant.PRINTERDTOR);
118
}
119
}
120
};
121
};
IllegalArgumentException
参数异常
Definition
BuiltinObjects.x:501
Qt.QPrinter.devType
int devType() override
Definition
QPrinter.xcsm:86
Qt.QPrinter.finalize
void finalize()
Definition
QPrinter.xcsm:115
Qt.QPrinter.outputFormat
OutputFormat outputFormat()
Definition
QPrinter.xcsm:102
Qt.QPrinter.setPageSize
void setPageSize(PageSize pagesize)
Definition
QPrinter.xcsm:98
Qt.QPrinter.setOutputFormat
void setOutputFormat(OutputFormat format)
Definition
QPrinter.xcsm:94
Qt.QPrinter.newPage
bool newPage()
Definition
QPrinter.xcsm:90
Qt.QPrinter.isNeedDelloc
bool isNeedDelloc()
Definition
QPrinter.xcsm:82
Qt.QPrinter.setPageMargins
bool setPageMargins(double l, double t, double r, double b)
Definition
QPrinter.xcsm:106
Qt.QPrinter.setPageOrientation
bool setPageOrientation(Orientation orientation)
Definition
QPrinter.xcsm:111
Qt.QPrinter.setNeedDelloc
void setNeedDelloc(bool bd)
Definition
QPrinter.xcsm:78
Qt.QPrinter.QPrinter
QPrinter(long handle)
Definition
QPrinter.xcsm:66
Qt.QPrinter.QPrinter
QPrinter()
Definition
QPrinter.xcsm:59
Qt.QPrinter.QPrinter
QPrinter(PrinterMode mode)
Definition
QPrinter.xcsm:71
Qt.QPrinter.ColorMode.GrayScale
GrayScale
Definition
QPrinter.xcsm:12
Qt.QPrinter.DuplexMode.DuplexLongSide
DuplexLongSide
Definition
QPrinter.xcsm:55
Qt.QPrinter.DuplexMode.DuplexAuto
DuplexAuto
Definition
QPrinter.xcsm:54
Qt.QPrinter.OutputFormat.NativeFormat
NativeFormat
Definition
QPrinter.xcsm:37
Qt.QPrinter.PageOrder.FirstPageFirst
FirstPageFirst
Definition
QPrinter.xcsm:9
Qt.QPrinter.PaperSource.LargeFormat
LargeFormat
Definition
QPrinter.xcsm:24
Qt.QPrinter.PaperSource.Lower
Lower
Definition
QPrinter.xcsm:16
Qt.QPrinter.PaperSource.Tractor
Tractor
Definition
QPrinter.xcsm:22
Qt.QPrinter.PaperSource.SmallFormat
SmallFormat
Definition
QPrinter.xcsm:23
Qt.QPrinter.PaperSource.Cassette
Cassette
Definition
QPrinter.xcsm:26
Qt.QPrinter.PaperSource.LargeCapacity
LargeCapacity
Definition
QPrinter.xcsm:25
Qt.QPrinter.PaperSource.OnlyOne
OnlyOne
Definition
QPrinter.xcsm:15
Qt.QPrinter.PaperSource.Manual
Manual
Definition
QPrinter.xcsm:18
Qt.QPrinter.PaperSource.Middle
Middle
Definition
QPrinter.xcsm:17
Qt.QPrinter.PaperSource.Auto
Auto
Definition
QPrinter.xcsm:21
Qt.QPrinter.PaperSource.Envelope
Envelope
Definition
QPrinter.xcsm:19
Qt.QPrinter.PaperSource.FormSource
FormSource
Definition
QPrinter.xcsm:27
Qt.QPrinter.PaperSource.MaxPageSource
MaxPageSource
Definition
QPrinter.xcsm:28
Qt.QPrinter.PaperSource.EnvelopeManual
EnvelopeManual
Definition
QPrinter.xcsm:20
Qt.QPrinter.PrintRange.AllPages
AllPages
Definition
QPrinter.xcsm:40
Qt.QPrinter.PrinterState.Active
Active
Definition
QPrinter.xcsm:33
Qt.QPrinter.PrinterState.Aborted
Aborted
Definition
QPrinter.xcsm:34
Qt.QPrinter.PrinterState.Idle
Idle
Definition
QPrinter.xcsm:32
Qt.QPrinter.Unit.Pica
Pica
Definition
QPrinter.xcsm:46
Qt.QPrinter.Unit.Cicero
Cicero
Definition
QPrinter.xcsm:48
Qt.QPrinter.Unit.Point
Point
Definition
QPrinter.xcsm:44
Qt.QPrinter.Unit.Millimeter
Millimeter
Definition
QPrinter.xcsm:43
Qt.QPrinter.Unit.Didot
Didot
Definition
QPrinter.xcsm:47
Qt.QPrinter.Unit.Inch
Inch
Definition
QPrinter.xcsm:45
制作者
1.9.8