---
name: "MessageAlertModule"
section: "3"
platform: "linux"
package: "libkysdk-applications"
version: "3.0.1.2-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/MessageAlertModule"
---

# MessageAlertModule(3)

MessageAlertModule

## NAME

MessageAlertModule - MessageAlertModule

## SYNOPSIS

### Classes

class **kdk::KBadge**\
 消息提醒气泡  class **kdk::KBallonTip**\
 消息提示框，支持五种样式  class **kdk::KSecurityLevelBar**\
 密码安全等级提示条，支持三个安全等级

### Enumerations

enum **kdk::TipType** { **Nothing**, **Normal**, **Info**, **Warning**, **Error**, **Variable** }\
 支持五种样式  enum **kdk::SecurityLevel** { **Low**, **Medium**, **High** }\
 分为三个安全等级

### Functions

**kdk::KBadge::KBadge** (QWidget \*parent)\
 int **kdk::KBadge::value** ()\
 返回值  void **kdk::KBadge::setValue** (int **value**)\
 设置值，最大显示数值为999，大于999显示'...'  void **kdk::KBadge::setValueVisiable** (bool flag)\
 设置值是否可见  bool **kdk::KBadge::isValueVisiable** () const\
 获取值是否可见  QColor **kdk::KBadge::color** ()\
 获取背景色  void **kdk::KBadge::setColor** (const QColor &**color**)\
 设置背景色  int **kdk::KBadge::fontSize** ()\
 获取字体大小  void **kdk::KBadge::setFontSize** (int size)\
 设置字体大小  void **kdk::KBadge::paintEvent** (QPaintEvent \*event)\
 void **kdk::KBadge::resizeEvent** (QResizeEvent \*event)\
 **kdk::KBallonTip::KBallonTip** (QWidget \*parent=nullptr)\
 **kdk::KBallonTip::KBallonTip** (const QString &content, const **TipType** &type, QWidget \*parent=nullptr)\
 void **kdk::KBallonTip::showInfo** ()\
 显示时间完毕后消失  void **kdk::KBallonTip::setTipType** (const **TipType** &type)\
 设置类型  **TipType** **kdk::KBallonTip::tipType** ()\
 返回类型  void **kdk::KBallonTip::setText** (const QString &**text**)\
 设置文本内容  QString **kdk::KBallonTip::text** ()\
 text  void **kdk::KBallonTip::setContentsMargins** (int left, int top, int right, int bottom)\
 设置内容边距  void **kdk::KBallonTip::setContentsMargins** (const QMargins &margins)\
 设置内容边距  void **kdk::KBallonTip::setTipTime** (int my\_time)\
 设置持续时间  QHBoxLayout \* **kdk::KBallonTip::hBoxLayout** ()\
 获取kballontip的水平布局  void **kdk::KBallonTip::setVariableIcon** (QIcon icon)\
 设置可变类型的icon  QPixmap **kdk::KBallonTip::variableIcon** ()\
 获取可变类型的icon  void **kdk::KBallonTip::paintEvent** (QPaintEvent \*event) override\
 **kdk::KSecurityLevelBar::KSecurityLevelBar** (QWidget \*parent=nullptr)\
 void **kdk::KSecurityLevelBar::setSecurityLevel** (**SecurityLevel** level)\
 设置安全等级  **SecurityLevel** **kdk::KSecurityLevelBar::securityLevel** ()\
 获取安全等级  void **kdk::KSecurityLevelBar::paintEvent** (QPaintEvent \*event)\

## Detailed Description

## Enumeration Type Documentation

### enum kdk::SecurityLevel

分为三个安全等级

**Since**

1\.0.0

### enum kdk::TipType

支持五种样式

**Since**

1\.0.0

## Function Documentation

### QColor kdk::KBadge::color ()

获取背景色

**Returns**

### int kdk::KBadge::fontSize ()

获取字体大小

**Returns**

### QHBoxLayout \* kdk::KBallonTip::hBoxLayout ()

获取kballontip的水平布局

**Returns**

**Since**

2\.4.1.0

### SecurityLevel kdk::KSecurityLevelBar::securityLevel ()

获取安全等级

**Returns**

### void kdk::KBadge::setColor (const QColor & color)

设置背景色

**Parameters**

*color*

### void kdk::KBallonTip::setContentsMargins (const QMargins & margins)

设置内容边距

**Parameters**

*margins*

### void kdk::KBallonTip::setContentsMargins (int left, int top, int right, int bottom)

设置内容边距

**Parameters**

*left* \
 *top* \
 *right* \
 *bottom*

### void kdk::KBadge::setFontSize (int size)

设置字体大小

**Parameters**

*size*

### void kdk::KSecurityLevelBar::setSecurityLevel (SecurityLevel level)

设置安全等级

**Parameters**

*level*

### void kdk::KBallonTip::setText (const QString & text)

设置文本内容

**Parameters**

*text*

### void kdk::KBallonTip::setTipTime (int my\_time)

设置持续时间

**Since**

1\.2.0

### void kdk::KBallonTip::setTipType (const TipType & type)

设置类型

**Parameters**

*type*

### void kdk::KBadge::setValue (int value)

设置值，最大显示数值为999，大于999显示'...'

**Parameters**

*value*

### void kdk::KBadge::setValueVisiable (bool flag)

设置值是否可见

**Parameters**

*flag*

### void kdk::KBallonTip::setVariableIcon (QIcon icon)

设置可变类型的icon

**Parameters**

*icon*

**Since**

2\.5.2.0

### void kdk::KBallonTip::showInfo ()

显示时间完毕后消失

**Since**

1\.2.0

### QString kdk::KBallonTip::text ()

text

**Returns**

### TipType kdk::KBallonTip::tipType ()

返回类型

**Returns**

### int kdk::KBadge::value ()

返回值

**Returns**

### QPixmap kdk::KBallonTip::variableIcon ()

获取可变类型的icon

**Returns**

**Since**

2\.5.2.0

## Author

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code.
