tpScrollPanel类
SingleGUI
2025-07-05
继承关系
基础信息
头文件: | include <tpScrollPanel.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | tpChildWidget |
派生类: |
Public 成员函数
tpScrollPanel(tpChildWidget *parent=nullptr) | ||
---|---|---|
~tpScrollPanel() | ||
horizontalScrollBarValue() | 获取水平方向滚动条的值 | |
setHorizontalScrollBarValue(const uint32_t &value) | 设置水平方向滚动条的值 | |
verticalScrollBarValue() | 获取垂直方向滚动条的值 | |
setVerticalScrollBarValue(const uint32_t &value) | 设置垂直方向滚动条的值 | |
horizontalPostion() | 水平滚动条距离偏移像素量 | |
setHorizontalPostion(const int32_t &value) | 设置水平偏移量 | |
verticalPostion() | 垂直滚动条距离偏移像素量 | |
setVerticalPostion(const int32_t &value) | 设置垂直偏移量 | |
scrollMode() | 获取当前滚动模式 | |
setScrollMode(const bool &isVertical=true) | 设置滚轮滚动模式,默认滚轮滚动滚纵向 | |
setHorizontalScrollBarVisible(const bool &visible) | 设置水平进度条显隐 | |
setVerticalScrollBarVisible(const bool &visible) | 设置垂直进度条显隐 | |
addObject(tpChildWidget *object) | 向滚动窗口添加组件,组件坐标、宽高需外部手动设置 | |
delObject(tpChildWidget *object) | ||
setWidget(tpChildWidget *widget) | 设置滚动区域的窗口,内部会调整窗口充满滚动区域 | |
tpChildWidget * | widget() | 获取设置的滚动窗口 |
tpVector< tpChildWidget * > | children() | 获取滚动窗体内所有添加的子组件 |
clearObject() | ||
recal(bool enableOffset=false) | ||
onPaintEvent(tpObjectPaintEvent *event) override | 绘制事件,禁止在该函数调用 paint和update函数 | |
eventFilter(tpObject *watched, tpEvent *event) override | 事件过滤器处理函数,对象事件会先进入事件过滤器对象的本函数 | |
onMouseKeyEvent(tpMouseKeyEvent *event) override | ||
onMouseMotionEvent(tpMouseMotionEvent *event) override | ||
onKeyboardEvent(tpKeyboardEvent *event) override | 设置鼠标事件监听函数 | |
onResizeEvent(tpObjectResizeEvent *event) override | ||
onLeaveEvent(tpObjectLeaveEvent *event) override |
成员函数说明
tpScrollPanel::tpScrollPanel(tpChildWidget *parent=nullptr)
暂无注释...
virtual
tpScrollPanel::~tpScrollPanel()
暂无注释...
uint32_t tpScrollPanel::horizontalScrollBarValue()
点击查看...
获取水平方向滚动条的值
返回值:
取值范围为[0,100]
void tpScrollPanel::setHorizontalScrollBarValue(const uint32_t &value)
点击查看...
设置水平方向滚动条的值
uint32_t tpScrollPanel::verticalScrollBarValue()
点击查看...
获取垂直方向滚动条的值
返回值:
取值范围为[0,100]
void tpScrollPanel::setVerticalScrollBarValue(const uint32_t &value)
点击查看...
设置垂直方向滚动条的值
int32_t tpScrollPanel::horizontalPostion()
点击查看...
水平滚动条距离偏移像素量
返回值:
偏移量值
void tpScrollPanel::setHorizontalPostion(const int32_t &value)
点击查看...
设置水平偏移量
int32_t tpScrollPanel::verticalPostion()
点击查看...
垂直滚动条距离偏移像素量
返回值:
偏移量值
void tpScrollPanel::setVerticalPostion(const int32_t &value)
点击查看...
设置垂直偏移量
bool tpScrollPanel::scrollMode()
点击查看...
获取当前滚动模式
返回值:
垂直滚动返回true,否则返回false
void tpScrollPanel::setScrollMode(const bool &isVertical=true)
点击查看...
设置滚轮滚动模式,默认滚轮滚动滚纵向
void tpScrollPanel::setHorizontalScrollBarVisible(const bool &visible)
点击查看...
设置水平进度条显隐
void tpScrollPanel::setVerticalScrollBarVisible(const bool &visible)
点击查看...
设置垂直进度条显隐
virtual
bool tpScrollPanel::addObject(tpChildWidget *object)
点击查看...
向滚动窗口添加组件,组件坐标、宽高需外部手动设置
返回值:
返回添加结果
virtual
bool tpScrollPanel::delObject(tpChildWidget *object)
暂无注释...
virtual
bool tpScrollPanel::setWidget(tpChildWidget *widget)
点击查看...
设置滚动区域的窗口,内部会调整窗口充满滚动区域
返回值:
添加结果
tpChildWidget * tpScrollPanel::widget()
点击查看...
获取设置的滚动窗口
返回值:
窗口指针,不存在则返回空
tpVector< tpChildWidget * > tpScrollPanel::children()
点击查看...
获取滚动窗体内所有添加的子组件
返回值:
子组件列表
bool tpScrollPanel::clearObject()
暂无注释...
virtual
bool tpScrollPanel::recal(bool enableOffset=false)
暂无注释...
virtual
bool tpScrollPanel::onPaintEvent(tpObjectPaintEvent *event) override
点击查看...
绘制事件,禁止在该函数调用 paint和update函数
返回值:
返回true继续执行子控件绘制
virtual
bool tpScrollPanel::eventFilter(tpObject *watched, tpEvent *event) override
点击查看...
事件过滤器处理函数,对象事件会先进入事件过滤器对象的本函数
返回值:
如果返回true则不再触发watched对象本身的事件回调,返回false则本函数执行完毕后会执行watched对象的事件回调
virtual
bool tpScrollPanel::onMouseKeyEvent(tpMouseKeyEvent *event) override
暂无注释...
virtual
bool tpScrollPanel::onMouseMotionEvent(tpMouseMotionEvent *event) override
暂无注释...
virtual
bool tpScrollPanel::onKeyboardEvent(tpKeyboardEvent *event) override
点击查看...
设置鼠标事件监听函数