xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Public 成员函数 | 成员变量
QRect类 参考

Public 成员函数

成员变量

详细描述

在文件 QRect.xcsm4 行定义.

构造及析构函数说明

◆ QRect() [1/3]

QRect ( )

在文件 QRect.xcsm5 行定义.

5 {
6 }

◆ QRect() [2/3]

QRect ( @NotNilptr QRect  rc)

在文件 QRect.xcsm7 行定义.

7 {
8 left = rc.left;
9 top = rc.top;
10 right = rc.right;
11 bottom = rc.bottom;
12 }
int right
Definition QRect.xcsm:20
int bottom
Definition QRect.xcsm:20
int left
Definition QRect.xcsm:20
int top
Definition QRect.xcsm:20

◆ QRect() [3/3]

QRect ( int  l,
int  t,
int  r,
int  b 
)

在文件 QRect.xcsm13 行定义.

13 {
14 left = l;
15 top = t;
16 right = r;
17 bottom = b;
18 }

成员函数说明

◆ centerPoint()

QPoint centerPoint ( )

在文件 QRect.xcsm22 行定义.

22 {
23 return new QPoint((left + right) / 2, (top + bottom) / 2);
24 }

◆ contains()

bool contains ( int  x,
int  y 
)

在文件 QRect.xcsm41 行定义.

41 {
42 if (x > left && x < right){
43 return y > top && y < bottom;
44 }
45 return false;
46 }

◆ height()

int height ( )

在文件 QRect.xcsm30 行定义.

30 {
31 return bottom - top;
32 }

◆ offset() [1/2]

void offset ( @NotNilptr QPoint  pt)

在文件 QRect.xcsm48 行定义.

48 {
49 left += pt.x;
50 top += pt.y;
51 right += pt.x;
52 bottom += pt.y;
53 }

◆ offset() [2/2]

void offset ( int  x,
int  y 
)

在文件 QRect.xcsm34 行定义.

34 {
35 left += x;
36 top += y;
37 right += x;
38 bottom += y;
39 }

◆ width()

int width ( )

在文件 QRect.xcsm26 行定义.

26 {
27 return right - left;
28 }

结构体成员变量说明

◆ bottom

int bottom

在文件 QRect.xcsm20 行定义.

◆ left

int left

在文件 QRect.xcsm20 行定义.

◆ right

int right

在文件 QRect.xcsm20 行定义.

◆ top

int top

在文件 QRect.xcsm20 行定义.