Debian Codegraph @

doxygen/man/man3/kdk_KNotifier.3

raw
1 .TH "kdk::KNotifier" 3 "Fri Sep 8 2023" "Version version:2.3" "LIBKYSDK-DESKTOP" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 kdk::KNotifier \- 消息通知类,调用notify()发消息后会在屏幕右上角以弹窗形式展示消息内容和支持的操作 支持设置应用名称,应用图标,消息标题,消息主体内容,显示时长,添加action等
6
7 .SH SYNOPSIS
8 .br
9 .PP
10 .PP
11 \fR#include <knotifier\&.h>\fP
12 .PP
13 Inherits QObject\&.
14 .SS "Public Types"
15
16 .in +1c
17 .ti -1c
18 .RI "enum \fBShowTime\fP { \fBDefault\fP = -1, \fBAllTheTime\fP = 0 }"
19 .br
20 .in -1c
21 .SS "Public Member Functions"
22
23 .in +1c
24 .ti -1c
25 .RI "\fBKNotifier\fP (QObject *parent=nullptr)"
26 .br
27 .ti -1c
28 .RI "uint \fBnotify\fP ()"
29 .br
30 .RI "发送消息通知请求 "
31 .ti -1c
32 .RI "void \fBsetDefaultAction\fP (const QString &appName)"
33 .br
34 .RI "设置默认跳转应用,点击消息弹窗时进行跳转 "
35 .ti -1c
36 .RI "void \fBaddAction\fP (const QString &appName, const QString &text)"
37 .br
38 .RI "在消息弹窗中添加跳转按钮,最多可以添加三个 "
39 .ti -1c
40 .RI "void \fBsetShowTime\fP (int milliseconds)"
41 .br
42 .RI "设置消息弹窗的显示时长,Default为系统默认时长,AllTheTime为常驻消息 "
43 .ti -1c
44 .RI "void \fBsetAppName\fP (const QString &appName)"
45 .br
46 .RI "设置消息弹窗应用名称 "
47 .ti -1c
48 .RI "void \fBsetBodyText\fP (const QString &bodyText)"
49 .br
50 .RI "设置消息弹窗主内容 "
51 .ti -1c
52 .RI "void \fBsetSummary\fP (const QString &summary)"
53 .br
54 .RI "设置消息弹窗标题 "
55 .ti -1c
56 .RI "void \fBsetAppIcon\fP (const QString &iconName)"
57 .br
58 .RI "设置消息弹窗应用图标,仅支持系统图标 "
59 .ti -1c
60 .RI "void \fBsetReplaceId\fP (const uint id)"
61 .br
62 .RI "设置替换消息弹窗的id替换通知即更新通知内容,在通知还未消失时,更新通知弹窗的主题、正文、跳转动作和按钮。 "
63 .in -1c
64 .SS "Static Public Member Functions"
65
66 .in +1c
67 .ti -1c
68 .RI "static void \fBcloseNotification\fP (uint id)"
69 .br
70 .RI "主动关闭消息弹窗 "
71 .in -1c
72 .SH "Detailed Description"
73 .PP
74 消息通知类,调用notify()发消息后会在屏幕右上角以弹窗形式展示消息内容和支持的操作 支持设置应用名称,应用图标,消息标题,消息主体内容,显示时长,添加action等
75 .SH "Member Function Documentation"
76 .PP
77 .SS "void kdk::KNotifier::addAction (const QString & appName, const QString & text)"
78
79 .PP
80 在消息弹窗中添加跳转按钮,最多可以添加三个
81 .PP
82 \fBParameters\fP
83 .RS 4
84 \fI按钮显示文本\fP
85 .br
86 \fI跳转应用名称\fP
87 .RE
88 .PP
89
90 .SS "static void kdk::KNotifier::closeNotification (uint id)\fR [static]\fP"
91
92 .PP
93 主动关闭消息弹窗
94 .PP
95 \fBParameters\fP
96 .RS 4
97 \fIid\fP
98 .RE
99 .PP
100
101 .SS "uint kdk::KNotifier::notify ()"
102
103 .PP
104 发送消息通知请求
105 .PP
106 \fBReturns\fP
107 .RS 4
108 返回消息通知id
109 .RE
110 .PP
111
112 .SS "void kdk::KNotifier::setAppIcon (const QString & iconName)"
113
114 .PP
115 设置消息弹窗应用图标,仅支持系统图标
116 .PP
117 \fBParameters\fP
118 .RS 4
119 \fI图标名称\fP
120 .RE
121 .PP
122
123 .SS "void kdk::KNotifier::setAppName (const QString & appName)"
124
125 .PP
126 设置消息弹窗应用名称
127 .PP
128 \fBParameters\fP
129 .RS 4
130 \fI应用名称\fP
131 .RE
132 .PP
133
134 .SS "void kdk::KNotifier::setBodyText (const QString & bodyText)"
135
136 .PP
137 设置消息弹窗主内容
138 .PP
139 \fBParameters\fP
140 .RS 4
141 \fI主内容\fP
142 .RE
143 .PP
144
145 .SS "void kdk::KNotifier::setDefaultAction (const QString & appName)"
146
147 .PP
148 设置默认跳转应用,点击消息弹窗时进行跳转
149 .PP
150 \fBParameters\fP
151 .RS 4
152 \fI应用名称\fP
153 .RE
154 .PP
155
156 .SS "void kdk::KNotifier::setReplaceId (const uint id)"
157
158 .PP
159 设置替换消息弹窗的id替换通知即更新通知内容,在通知还未消失时,更新通知弹窗的主题、正文、跳转动作和按钮。
160 .PP
161 \fBParameters\fP
162 .RS 4
163 \fIid\fP
164 .RE
165 .PP
166
167 .SS "void kdk::KNotifier::setShowTime (int milliseconds)"
168
169 .PP
170 设置消息弹窗的显示时长,Default为系统默认时长,AllTheTime为常驻消息
171 .PP
172 \fBParameters\fP
173 .RS 4
174 \fI毫秒数\fP
175 .RE
176 .PP
177
178 .SS "void kdk::KNotifier::setSummary (const QString & summary)"
179
180 .PP
181 设置消息弹窗标题
182 .PP
183 \fBParameters\fP
184 .RS 4
185 \fI标题\fP
186 .RE
187 .PP
188
189
190 .SH "Author"
191 .PP
192 Generated automatically by Doxygen for LIBKYSDK-DESKTOP from the source code\&.