按钮控件 更多...
#include <Button.h>
Public 成员函数 | |
| Button (const Rect &rect, Block *parent=nullptr) | |
| void | setText (const String &text) |
| 设置按钮的文本内容 | |
Public 成员函数 继承自 Click | |
| Click (const Rect &rect, Block *parent=nullptr) | |
| void | setTriggerButton (MouseButton button) |
| 设置触发点击的鼠标按钮 | |
| void | setTriggerState (ButtonState state) |
| 设置触发点击的鼠标按钮状态 | |
Public 成员函数 继承自 Block | |
| Block (const Rect &rect, Block *parent=nullptr) | |
| 构造函数 | |
| const Rect & | rect () const |
| Rect & | rect () |
| Block * | parent () |
| 获取父对象指针 | |
| std::vector< Block * > & | children () |
| 获取子对象指针集合 | |
| void | setParent (Block *parent) |
| 设置父对象 | |
| void | addChild (Block *child) |
| 添加子对象 | |
| void | removeChild (Block *child) |
| 移除子对象 | |
| void | stopForeach () |
| 终止此对象子树事件循环的遍历 | |
| void | resetForeach () |
| 重新启用此对象子树事件循环的遍历 | |
| bool | isForeach () const |
| 此对象子树是否处于事件循环可遍历状态 | |
| void | setZIndex (long long zindex) |
| 设置Z轴顺序 | |
| long long | zIndex () const |
| 获取Z轴顺序 | |
Public 成员函数 继承自 Object | |
| Object () noexcept | |
| 构造函数 | |
| virtual | ~Object () noexcept |
| 析构函数 | |
Public 成员函数 继承自 Hover | |
| Hover (const Rect &rect, Block *parent=nullptr) | |
Protected 成员函数 | |
| void | paintEvent (PaintEvent *event) override |
| 视图绘制事件处理函数 | |
| void | mousePressEvent (MousePressEvent *event) override |
| 鼠标按键按下事件处理函数 | |
| void | mouseReleaseEvent (MouseReleaseEvent *event) override |
| 鼠标按键释放事件处理函数 | |
| void | mouseMoveEvent (MouseMoveEvent *event) override |
| 鼠标移动事件处理函数 | |
Protected 成员函数 继承自 Click | |
| void | mousePressEvent (MousePressEvent *event) override |
| 鼠标按键按下事件处理函数 | |
| void | mouseReleaseEvent (MouseReleaseEvent *event) override |
| 鼠标按键释放事件处理函数 | |
| virtual void | mouseClickEvent (MouseKeyEvent *event) |
| virtual bool | isContains (const Point &point) const |
| 判断点是否在此区域内 | |
Protected 成员函数 继承自 Block | |
| virtual void | mouseWheelEvent (MouseWheelEvent *event) |
| 鼠标滚轮事件处理函数 | |
| virtual void | keyPressEvent (KeyPressEvent *event) |
| 键盘按下事件处理函数 | |
| virtual void | keyReleaseEvent (KeyReleaseEvent *event) |
| 键盘释放事件处理函数 | |
| virtual void | inputEvent (InputEvent *event) |
| 输入事件处理函数 | |
Protected 成员函数 继承自 Hover | |
| void | mouseMoveEvent (MouseMoveEvent *event) override |
| 鼠标移动事件处理函数 | |
| virtual bool | isContains (const Point &point) |
| 判断点是否在此区域内 | |
额外继承的成员函数 | |
Public 属性 继承自 Click | |
| Signal< void(const Point &pos) | clicked ) |
Public 属性 继承自 Hover | |
| Signal< void(const Point &pos) | entered ) |
| Signal< void(const Point &pos) | leaved ) |
Protected 属性 继承自 Click | |
| MouseButton | button_ |
| ButtonState | state_ |
按钮控件
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
| void Button::setText | ( | const String & | text | ) |
设置按钮的文本内容
| text | 按钮的文本内容 |