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

Public 成员函数

额外继承的成员函数

详细描述

在文件 QMenu.xcsm2 行定义.

构造及析构函数说明

◆ QMenu() [1/2]

QMenu ( long  handle)

在文件 QMenu.xcsm3 行定义.

3 {
4 super(handle);
5 }

◆ QMenu() [2/2]

QMenu ( )

在文件 QMenu.xcsm6 行定义.

6 {
7 }

成员函数说明

◆ addAction() [1/6]

QAction addAction ( String  icon,
String  text 
)

在文件 QMenu.xcsm45 行定义.

45 {
46 return (QAction)QtXnl.object_get_string2(nativehandle, Constant.ADDACT, icon, text);
47 }

◆ addAction() [2/6]

QAction addAction ( String  icon,
String  text,
@NotNilptr QObject  receiver,
String  member,
int  shortcutKey 
)

在文件 QMenu.xcsm61 行定义.

61 {
62 return (QAction)QtXnl.object_get_string2_handle_string_int(nativehandle, Constant.ADDACT, icon, text, receiver.nativehandle, member, shortcutKey);
63 }

◆ addAction() [3/6]

QAction addAction ( String  icon,
String  text,
@NotNilptr QObject  receiver,
String  member,
String  shortcutKey 
)

在文件 QMenu.xcsm57 行定义.

57 {
58 return (QAction)QtXnl.object_get_string2_handle_string2(nativehandle, Constant.ADDACT, icon, text, receiver.nativehandle, member, shortcutKey);
59 }

◆ addAction() [4/6]

QAction addAction ( String  text)

在文件 QMenu.xcsm24 行定义.

24 {
25 return (QAction)QtXnl.object_get_string(nativehandle,Constant.ADDACT, text);
26 }

◆ addAction() [5/6]

QAction addAction ( String  text,
@NotNilptr QObject  receiver,
String  member,
int  key 
)

在文件 QMenu.xcsm53 行定义.

53 {
54 return (QAction)QtXnl.object_get_string_handle_string_int(nativehandle, Constant.ADDACT, text, receiver.nativehandle, member, key);
55 }

◆ addAction() [6/6]

QAction addAction ( String  text,
@NotNilptr QObject  receiver,
String  member,
String  key 
)

在文件 QMenu.xcsm49 行定义.

49 {
50 return (QAction)QtXnl.object_get_string_handle_string2(nativehandle, Constant.ADDACT, text, receiver.nativehandle, member, key);
51 }

◆ addMenu() [1/2]

QAction addMenu ( QMenu  menu)

在文件 QMenu.xcsm28 行定义.

28 {
29 return (QAction)QtXnl.object_get_handle_string(nativehandle,Constant.QMENUADDMENU, menu.nativehandle, nilptr);
30 }

◆ addMenu() [2/2]

QMenu addMenu ( String  text)

在文件 QMenu.xcsm33 行定义.

33 {
34 return (QMenu)QtXnl.object_get_string(nativehandle,Constant.ADDMENU, text);
35 }

◆ addSeparator()

QAction addSeparator ( )

在文件 QMenu.xcsm65 行定义.

65 {
66 return (QAction) QtXnl.widget_get_object(nativehandle, Constant.MENUADDSEPAR);
67 }

◆ create() [1/2]

bool create ( )
override

重载 QWidget .

在文件 QMenu.xcsm8 行定义.

8 {
9 nativehandle = QtXnl.createQObject(QType.qtMenu, this, 0);
10 if (nativehandle == 0){
11 return false;
12 }
13 return true;
14 }
long nativehandle
Definition QNative.xcsm:91

◆ create() [2/2]

bool create ( @NotNilptr QWidget  parent)
override

重载 QWidget .

在文件 QMenu.xcsm16 行定义.

16 {
17 nativehandle = QtXnl.createQObject(QType.qtMenu, this, parent.nativehandle);
18 if (nativehandle == 0){
19 return false;
20 }
21 return true;
22 }

◆ exec()

void exec ( int  x,
int  y 
)

在文件 QMenu.xcsm76 行定义.

76 {
77 QtXnl.widget_set_v2int_value(nativehandle, Constant.QMENU_EXEC, x, y);
78 }

◆ getTitle()

String getTitle ( )

在文件 QMenu.xcsm72 行定义.

72 {
73 return (String)QtXnl.core_getString(nativehandle, Constant.QMENUGETTITLE);
74 }
字符串类

◆ insertMenu()

QAction insertMenu ( @NotNilptr QAction  before,
@NotNilptr QMenu  menu 
)

在文件 QMenu.xcsm41 行定义.

41 {
42 return (QAction) QtXnl.object_get_handle2(nativehandle, Constant.MENUINSMENU, before == nilptr ? 0l: before.nativehandle, menu.nativehandle);
43 }

◆ menuAction()

QAction menuAction ( )

在文件 QMenu.xcsm37 行定义.

37 {
38 return (QAction)QtXnl.widget_get_object(nativehandle,Constant.MENUACTION);
39 }

◆ setTitle()

void setTitle ( String  text)

在文件 QMenu.xcsm69 行定义.

69 {
70 QtXnl.widget_slot_string(nativehandle, Constant.QMENUSETTITLE, text);
71 }