TpRadioButton 类
V0.2.1TpGUIWidgets
2025-11-04
介绍
单选按钮
继承关系
基础信息
| 头文件: | include <TpRadioButton.h> |
|---|---|
| Cmake: | None |
| 发布版本: | V0.2.1 |
| 继承类: | TpWidget |
| 派生类: |
信号
| 信号名称 | 参数 | 描述 |
|---|---|---|
| onClicked | bool |
Public 成员函数
| TpRadioButton(TpWidget *parent=nullptr) | ||
|---|---|---|
| TpRadioButton(const TpString &text, TpWidget *parent=nullptr) | ||
| ~TpRadioButton() | ||
| setAutoFit(bool enable=false) | 根据字体宽度和高度绘制,当设置时对齐将无效 | |
| setSpacing(uint32_t space=1) | 设置按钮与文本间距值 | |
| setRect(int32_t x, int32_t y, int32_t w, int32_t h) override | ||
| setText(const TpString &text) | 设置按钮文本 | |
| virtual TpFont * | font() | |
| virtual TpString | pluginType() override | 组件类名,子类实现,返回子类类名字符串,用于匹配CSS中对应样式 |
成员函数说明
TpRadioButton::TpRadioButton(TpWidget *parent=nullptr)
暂无注释...
TpRadioButton::TpRadioButton(const TpString &text, TpWidget *parent=nullptr)
暂无注释...
virtual TpRadioButton::~TpRadioButton()
暂无注释...
virtual void TpRadioButton::setAutoFit(bool enable=false)
根据字体宽度和高度绘制,当设置时对齐将无效...
根据字体宽度和高度绘制,当设置时对齐将无效
参数:enable: 是否自动调整
virtual void TpRadioButton::setSpacing(uint32_t space=1)
设置按钮与文本间距值...
设置按钮与文本间距值
参数:space: 间距
virtual void TpRadioButton::setRect(int32_t x, int32_t y, int32_t w, int32_t h) override
暂无注释...
virtual void TpRadioButton::setText(const TpString &text)
设置按钮文本...
设置按钮文本
参数:text:
virtual TpFont * TpRadioButton::font()
暂无注释...
virtual TpString TpRadioButton::pluginType() override
组件类名,子类实现,返回子类类名字符串,用于匹配CSS中对应...
组件类名,子类实现,返回子类类名字符串,用于匹配CSS中对应样式
返回值:类名字符串
