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

Public 成员函数

静态 Public 成员函数

Private 属性

额外继承的成员函数

详细描述

在文件 QSystemTrayIcon.x5 行定义.

构造及析构函数说明

◆ QSystemTrayIcon()

QSystemTrayIcon ( )

在文件 QSystemTrayIcon.x9 行定义.

9 {//构造
10
11 }

成员函数说明

◆ activated()

void activated ( int  reason)

在文件 QSystemTrayIcon.x89 行定义.

89 {
90 if (_listener != nilptr){
91 _listener.activated(this, (ActivationReason)reason);
92 }
93 }
onSystemTrayListener _listener

◆ contextMenu()

QMenu contextMenu ( )

在文件 QSystemTrayIcon.x58 行定义.

58 {
59 return (QMenu)QtXnl.widget_get_object(nativehandle, Constant.QSTI_GETCONTEXTMENU);
60 }

◆ create() [1/2]

bool create ( )

在文件 QSystemTrayIcon.x13 行定义.

13 {
14 nativehandle = QtXnl.createQObject(QType.qtSystemTrayIcon, this, 0);
15 if (nativehandle == 0){
16 return false;
17 }
18 return true;
19 }
long nativehandle
Definition QNative.xcsm:91

◆ create() [2/2]

bool create ( @NotNilptr QWidget  parent)

在文件 QSystemTrayIcon.x21 行定义.

21 {
22 nativehandle = QtXnl.createQObject(QType.qtSystemTrayIcon, this, parent.nativehandle);
23 if (nativehandle == 0){
24 return false;
25 }
26 return true;
27 }

◆ getOnSystemTrayListener()

onSystemTrayListener getOnSystemTrayListener ( )

在文件 QSystemTrayIcon.x30 行定义.

30 {
31 return _listener;
32 }

◆ hide()

void hide ( )

在文件 QSystemTrayIcon.x71 行定义.

71{ setVisible(false); }
void setVisible(bool visible)

◆ icon()

QIcon icon ( )

在文件 QSystemTrayIcon.x50 行定义.

50 {
51 return new QIcon(QtXnl.long_get(nativehandle, Constant.QSTI_GETICON));
52 }

◆ isSystemTrayAvailable()

static bool isSystemTrayAvailable ( )
static

在文件 QSystemTrayIcon.x73 行定义.

73 {
74 return QtXnl.widget_get_bool_value(0, Constant.QSTI_ISSYSTEMTRAYAVAILABLE);
75 }

◆ isVisible()

bool isVisible ( )

在文件 QSystemTrayIcon.x38 行定义.

38 {
39 return QtXnl.widget_get_bool_value(nativehandle, Constant.QSTI_VISIBLE);
40 }

◆ messageClicked()

void messageClicked ( )

在文件 QSystemTrayIcon.x95 行定义.

95 {
96 if (_listener != nilptr){
97 _listener.messageClicked(this);
98 }
99 }

◆ setContextMenu()

void setContextMenu ( QMenu  menu)

在文件 QSystemTrayIcon.x54 行定义.

54 {
55 QtXnl.widget_set_native_value(nativehandle, Constant.QSTI_SETCONTEXTMENU, menu.nativehandle);
56 }

◆ setIcon()

void setIcon ( QIcon  icon)

在文件 QSystemTrayIcon.x46 行定义.

46 {
47 QtXnl.widget_set_native_value(nativehandle, Constant.QSTI_SETICON, icon.nativehandle);
48 }

◆ setOnSystemTrayListener()

void setOnSystemTrayListener ( onSystemTrayListener  l)

在文件 QSystemTrayIcon.x34 行定义.

34 {
35 _listener = l;
36 }

◆ setToolTip()

void setToolTip ( String  tip)

在文件 QSystemTrayIcon.x66 行定义.

66 {
67 QtXnl.widget_slot_string(nativehandle, Constant.QSTI_SETTOOLTIP, tip);
68 }

◆ setVisible()

void setVisible ( bool  visible)

在文件 QSystemTrayIcon.x42 行定义.

42 {
43 QtXnl.widget_set_bool_value(nativehandle, Constant.QSTI_SETVISIBLE, visible);
44 }

◆ show()

void show ( )

在文件 QSystemTrayIcon.x70 行定义.

70{ setVisible(true); }

◆ showMessage() [1/2]

void showMessage ( String  title,
String  msg,
MessageIcon  icon,
int  msecs 
)

在文件 QSystemTrayIcon.x85 行定义.

85 {
86 QtXnl.long_string2_int2(nativehandle, Constant.QSTI_SHOWMESSAGE,title, msg, icon.value(), msecs);
87 }

◆ showMessage() [2/2]

void showMessage ( String  title,
String  msg,
QIcon  icon,
int  msecs 
)

在文件 QSystemTrayIcon.x81 行定义.

81 {
82 QtXnl.object_get_string_handle_string_int(nativehandle, Constant.QSTI_SHOWMESSAGE, title, icon != nilptr ? icon.nativehandle : 0l, msg, msecs);
83 }

◆ supportsMessages()

static bool supportsMessages ( )
static

在文件 QSystemTrayIcon.x77 行定义.

77 {
78 return QtXnl.widget_get_bool_value(0, Constant.QSTI_SUPPORTSMESSAGES);
79 }

◆ toolTip()

String toolTip ( )

在文件 QSystemTrayIcon.x62 行定义.

62 {
63 return (String)QtXnl.core_getString(nativehandle, Constant.QSTI_TOOLTIP);
64 }
字符串类

结构体成员变量说明

◆ _listener

onSystemTrayListener _listener = nilptr
private

在文件 QSystemTrayIcon.x7 行定义.