xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数
QFont类 参考
类 QFont 继承关系图:
QCore

Public 成员函数

静态 Public 成员函数

额外继承的成员函数

详细描述

在文件 QFont.xcsm2 行定义.

构造及析构函数说明

◆ QFont() [1/4]

QFont ( String  fontName) throws IllegalArgumentException

在文件 QFont.xcsm3 行定义.

3 {
4 nativehandle = QtXnl.createNObject(QType.qtFont, 0);
5 if (nativehandle == 0){
6 throw new IllegalArgumentException("can not new QFont");
7 }
8 QtXnl.widget_slot_string(nativehandle, Constant.FONTSETFAMILY, fontName);
9 }
long nativehandle
Definition QNative.xcsm:91

◆ QFont() [2/4]

QFont ( String  fontName,
int  size,
bool  ptsize 
)

在文件 QFont.xcsm29 行定义.

29 {
30 nativehandle = QtXnl.createNObject(QType.qtFont, 0);
31 QtXnl.widget_slot_string(nativehandle, Constant.FONTSETFAMILY, fontName);
32 if (ptsize){
33 QtXnl.widget_set_vint_value(nativehandle, Constant.FONTPTSIZE, size);
34 }else{
35 QtXnl.widget_set_vint_value(nativehandle, Constant.FONTPXSIZE, size);
36 }
37 }

◆ QFont() [3/4]

QFont ( long  handle)

在文件 QFont.xcsm39 行定义.

39 {
40 nativehandle = handle;
41 }

◆ QFont() [4/4]

QFont ( )

在文件 QFont.xcsm43 行定义.

43 {
44 nativehandle = QtXnl.createNObject(QType.qtFont, 0);
45 }

成员函数说明

◆ ascent()

int ascent ( )

在文件 QFont.xcsm46 行定义.

46 {
47 return QtXnl.widget_get_int_value(nativehandle, Constant.FONTASCENT);
48 }

◆ descent()

int descent ( )

在文件 QFont.xcsm49 行定义.

49 {
50 return QtXnl.widget_get_int_value(nativehandle, Constant.FONTDESCENT);
51 }

◆ familyName()

String familyName ( )

在文件 QFont.xcsm92 行定义.

92 {
93 return (String)QtXnl.core_getString(nativehandle, Constant.GETFONTNAME);
94 }
字符串类

◆ finalize()

void finalize ( )

在文件 QFont.xcsm88 行定义.

88 {
89 QtXnl.widget_slot(nativehandle, Constant.FONTCTOR);
90 }

◆ getWeight()

int getWeight ( )

在文件 QFont.xcsm72 行定义.

72 {
73 return QtXnl.widget_get_int_value(nativehandle, Constant.FONTGETWEIGHT);
74 }

◆ isBold()

bool isBold ( )

在文件 QFont.xcsm64 行定义.

64 {
65 return QtXnl.widget_get_int_bool(nativehandle, Constant.FONTGETBOLD, 0);
66 }

◆ isItalic()

bool isItalic ( )

在文件 QFont.xcsm68 行定义.

68 {
69 return QtXnl.widget_get_int_bool(nativehandle, Constant.FONTGETITALIC, 0);
70 }

◆ loadFromFile()

static QFont loadFromFile ( String  file,
String  subName 
)
static

在文件 QFont.xcsm20 行定义.

20 {
21 long h = QtXnl.long_string2(0, Constant.LOADFONT, file, subName);
22 if (h != 0){
23 return new QFont(h);
24 }
25
26 return nilptr;
27 }
QFont(String fontName)
Definition QFont.xcsm:3

◆ loadFromString()

static QFont loadFromString ( String  string)
static

在文件 QFont.xcsm11 行定义.

11 {
12 long h = QtXnl.long_string2(0, Constant.LOADFONTDESCRIPTION, string, nilptr);
13 if (h != 0){
14 return new QFont(h);
15 }
16
17 return nilptr;
18 }

◆ measure()

QRect measure ( String  text)

在文件 QFont.xcsm105 行定义.

105 {
106 QRect qr = new QRect();
107 long v = QtXnl.long_longstring(nativehandle, Constant.MEASURETEXT, 0, text);
108 qr.left = qr.top = 0;
109 qr.right = (v >> 32) & 0xffffffff;
110 qr.bottom = v & 0xffffffff;
111 return qr;
112 }

◆ pixelSize()

int pixelSize ( )

在文件 QFont.xcsm100 行定义.

100 {
101 return QtXnl.widget_get_int_value(nativehandle, Constant.GETFONTPIXELSIZE);
102 }

◆ pointSize()

int pointSize ( )

在文件 QFont.xcsm96 行定义.

96 {
97 return QtXnl.widget_get_int_value(nativehandle, Constant.GETFONTPTSIZE);
98 }

◆ setBold()

void setBold ( bool  bb)

在文件 QFont.xcsm76 行定义.

76 {
77 QtXnl.widget_set_bool_value(nativehandle, Constant.FONTSETBOLD, bb);
78 }

◆ setFont()

void setFont ( String  fontName)

在文件 QFont.xcsm52 行定义.

52 {
53 QtXnl.widget_slot_string(nativehandle, Constant.FONTSETFAMILY, fontName);
54 }

◆ setItalic()

void setItalic ( bool  bi)

在文件 QFont.xcsm80 行定义.

80 {
81 QtXnl.widget_set_bool_value(nativehandle, Constant.FONTSETITALIC, bi);
82 }

◆ setPixelSize()

void setPixelSize ( int  pxSize)

在文件 QFont.xcsm84 行定义.

84 {
85 QtXnl.widget_set_vint_value(nativehandle, Constant.FONTPXSIZE, pxSize);
86 }

◆ setPointSize()

void setPointSize ( int  ptSize)

在文件 QFont.xcsm56 行定义.

56 {
57 QtXnl.widget_set_vint_value(nativehandle, Constant.FONTPTSIZE, ptSize);
58 }

◆ setWeight()

void setWeight ( int  weight)

在文件 QFont.xcsm60 行定义.

60 {
61 QtXnl.widget_set_vint_value(nativehandle, Constant.FONTSETWEIGHT, weight);
62 }