进度条 GMProgressBar 没有主动把自己加入 GCtrlForm 。 GMProgressBar 主要用于拼装自定义的UI控件。
如果你并不需要拼装自定义的UI控件,请直接使用 GCtrlProgressBar 。
更多...
#include <gCtrlProgressBar.h>
继承自 GMCtrlItem .
被 GCtrlProgressBar 继承.
|
| GMProgressBar (GCtrlForm *form, GMItem *parent=0, const char *name=0) |
| 构造一个进度条;totalSteps等于100 更多...
|
|
| GMProgressBar (int totalSteps, GCtrlForm *form, GMItem *parent=0, const char *name=0) |
| 使用开发者指定的totalSteps去构造一个进度条 更多...
|
|
virtual | ~GMProgressBar () |
|
int | totalSteps () const |
| 返回进度的总共有多少步数 更多...
|
|
int | progress () const |
| 返回当前的进度值 更多...
|
|
int | stepLength () const |
| 返回进度条的步长 更多...
|
|
virtual void | paintEvent () |
|
void | setProgressColor (GColor &c) |
| 设置进度的颜色 更多...
|
|
void | setProgressBgColor (GColor &c) |
| 设置进度条背景的颜色 更多...
|
|
void | setProgressBgImage (const GImage &p) |
| 使用图片作为进度条背景 更多...
|
|
void | setProgressImage (const GImage &p) |
| 使用图片来显示进度条的进度 更多...
|
|
void | setProgressCursorImage (const GImage &p) |
| 使用图片作为进度游标 更多...
|
|
void | setProgressBgHeight (const int h) |
| 设置进度、和进度背景的高度 更多...
|
|
virtual bool | isCtrlItem () |
| 是否可以接收输入事件 更多...
|
|
bool | isFocusEnabled () |
| 获取焦点是否被禁用;焦点被禁用后,此元素将不能获得焦点 ,不能处理各种输入事件。 更多...
|
|
void | setFocusEnabled (bool b) |
| 设置是否禁此元素的焦点;焦点被禁用后,此元素将不能获得焦点 ,不能处理各种输入事件。 更多...
|
|
void | setFocus () |
| 设置此元素到有焦点状态 更多...
|
|
bool | hasFocus () |
| 返回此元素是否具有焦点 更多...
|
|
void | setTabIndex (unsigned int index) |
| 设置此界面元素的tab index;在使用键盘来操作界面时,需要用到tab index 更多...
|
|
unsigned int | tabIndex () |
| 获取此界面元素的tab index;在使用键盘来操作界面时,需要用到tab index 更多...
|
|
virtual void | hide () |
| 隐藏此界面元素。相当于:
更多...
|
|
bool | fwKeyPress (GKeyEvent *e) |
|
bool | fwMousePress (GMouseEvent *e) |
|
bool | fwTap (GTapEvent *e) |
|
bool | fwSwipe (GSwipeEvent *e) |
|
bool | fwGestureScroll (GGestureScrollEvent *e) |
|
void | setX (int x) |
| 设置此界面元素的x坐标 更多...
|
|
void | setY (int y) |
| 设置此界面元素的y坐标 更多...
|
|
void | setZ (int z) |
| 设置此界面元素的z坐标 更多...
|
|
void | setWidth (int w) |
| 设置此界面元素的宽度 更多...
|
|
void | setHeight (int h) |
| 设置此界面元素的高度 更多...
|
|
int | x () const |
| 获取此界面元素的x坐标 更多...
|
|
int | y () const |
| 获取此界面元素的y坐标 更多...
|
|
int | z () const |
| 获取此界面元素的z坐标 更多...
|
|
int | width () const |
| 获取此界面元素的宽度 更多...
|
|
int | height () const |
| 获取此界面元素的高度 更多...
|
|
int | right () const |
| 获取右边界的坐标 更多...
|
|
int | bottom () const |
| 获取下边界的坐标 更多...
|
|
GRect | rect () const |
| 获取此界面元素所占用的矩形区域 更多...
|
|
void | setPosition (int x, int y) |
| 设置此界面元素的位置 更多...
|
|
void | setSize (int w, int h) |
| 设置此界面元素的大小 更多...
|
|
void | setSize (const GSize &s) |
| 设置此界面元素的大小 更多...
|
|
void | setGeometry (int x, int y, int w, int h) |
| 设置此界面元素所占用的矩形区域,位置及大小 更多...
|
|
void | moveBy (int x, int y) |
| 移动此界面元素;将此界面元素沿X轴移动 x 像素,沿Y轴移动 y 像素 更多...
|
|
void | setPaletteBackgroundColor (const GColor &c) |
| 设置此界面元素的背景颜色 更多...
|
|
void | loadBackgroundPixmap (const uint16_t imgID) |
| 加载一个图片作为此界面元素的背景 更多...
|
|
bool | isVisible () |
| 返回此界面元素当前是否可见;show() 之后可见, hide() 之后不可见 更多...
|
|
void | setVisible (bool b) |
| 设置此界面元素是否可见;(用户改变此界面元素的可见属性之后,需要调用 update() 或 repaint() ) 更多...
|
|
virtual void | show () |
| 显示此界面元素。相当于:
更多...
|
|
virtual bool | isContainerItem () |
|
GCtrlForm * | form () |
| 获取此界面元素所在的窗体 更多...
|
|
void | update () |
| 更新此界面元素所在的矩形区域;这个函数不会立刻进行重新绘制——而是发送一个绘制事件到事件循环中,后续,事件循环会分发、处理该绘制事件。这样能得到比调用 repaint() 更快的速度和更少的闪烁。 更多...
|
|
virtual void | draw () |
|
QCtrlDefaultAppStyle * | getDefaultAppStyle () |
|
virtual bool | isComplex () |
|
const char * | name () const |
| 获取对象名称 更多...
|
|
GObject * | parent () const |
| 获取对象的parent 更多...
|
|
virtual bool | event (GEvent *) |
| 开发者可以在子类中覆盖此函数,处理自己需要的事件 更多...
|
|
|
template<class Receiver , typename... Args> |
static int | connect (GObject *sender, GSignal< void(Args...)> &signal, Receiver *receiver, void(Receiver::*SlotFunc)(Args...)) |
| 将信号和槽建立连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。 更多...
|
|
template<class Receiver , typename... Args> |
static int | disconnect (GObject *sender, GSignal< void(Args...)> &signal, Receiver *receiver, void(Receiver::*SlotFunc)(Args...)) |
| 将信号和槽断开连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。 更多...
|
|
static bool | isObjectExist (GObject *obj) |
| 判断对象是否已经被析构掉了。 更多...
|
|
进度条 GMProgressBar 没有主动把自己加入 GCtrlForm 。 GMProgressBar 主要用于拼装自定义的UI控件。
如果你并不需要拼装自定义的UI控件,请直接使用 GCtrlProgressBar 。
GMProgressBar::GMProgressBar |
( |
GCtrlForm * |
form, |
|
|
GMItem * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
| |
构造一个进度条;totalSteps等于100
- 参数
-
form | ... |
parent | ... |
name | ... |
GMProgressBar::GMProgressBar |
( |
int |
totalSteps, |
|
|
GCtrlForm * |
form, |
|
|
GMItem * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
| |
使用开发者指定的totalSteps去构造一个进度条
- 参数
-
totalSteps | 进度条总共多少步 |
form | ... |
parent | ... |
name | ... |
virtual GMProgressBar::~GMProgressBar |
( |
| ) |
|
|
virtual |
int GMItem::bottom |
( |
| ) |
const |
|
inherited |
template<class Receiver , typename... Args>
int GObject::connect |
( |
GObject * |
sender, |
|
|
GSignal< void(Args...)> & |
signal, |
|
|
Receiver * |
receiver, |
|
|
void(Receiver::*)(Args...) |
SlotFunc |
|
) |
| |
|
staticinherited |
将信号和槽建立连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。
- 参数
-
sender | 指向发射者的指针 |
signal | 指向信号的引用。 |
receiver | 指向接收者的指针 |
SlotFunc | 指向槽函数的指针 |
- 返回
- 0代表成功;非0代表失败
template<class Receiver , typename... Args>
int GObject::disconnect |
( |
GObject * |
sender, |
|
|
GSignal< void(Args...)> & |
signal, |
|
|
Receiver * |
receiver, |
|
|
void(Receiver::*)(Args...) |
SlotFunc |
|
) |
| |
|
staticinherited |
将信号和槽断开连接。
Receiver代表接收者的类型 Args是槽函数/信号的参数列表。
- 参数
-
sender | 指向发射者的指针 |
signal | 指向信号的引用。 |
receiver | 指向接收者的指针 |
SlotFunc | 指向槽函数的指针 |
- 返回
- 0代表成功;非0代表失败
virtual void GMItem::draw |
( |
| ) |
|
|
virtualinherited |
virtual bool GObject::event |
( |
GEvent * |
| ) |
|
|
virtualinherited |
获取此界面元素所在的窗体
- 返回
- GCtrlForm*
virtual bool GMCtrlItem::fwKeyPressEvent |
( |
GKeyEvent * |
| ) |
|
|
protectedvirtualinherited |
virtual bool GMProgressBar::fwMousePressEvent |
( |
GMouseEvent * |
e | ) |
|
|
protectedvirtual |
virtual bool GMCtrlItem::fwSwipeEvent |
( |
GSwipeEvent * |
| ) |
|
|
protectedvirtualinherited |
virtual bool GMProgressBar::fwTapEvent |
( |
GTapEvent * |
| ) |
|
|
protectedvirtual |
|
protectedvirtualinherited |
用户可以在子类中覆盖这个函数处理滑动手势。用户不可以覆盖任何以fw开头的函数
- 参数
-
- 返回
- bool
QCtrlDefaultAppStyle* GMItem::getDefaultAppStyle |
( |
| ) |
|
|
inherited |
bool GMCtrlItem::hasFocus |
( |
| ) |
|
|
inherited |
int GMItem::height |
( |
| ) |
const |
|
inherited |
virtual void GMCtrlItem::hide |
( |
| ) |
|
|
virtualinherited |
virtual bool GMItem::isComplex |
( |
| ) |
|
|
virtualinherited |
virtual bool GMItem::isContainerItem |
( |
| ) |
|
|
virtualinherited |
virtual bool GMCtrlItem::isCtrlItem |
( |
| ) |
|
|
virtualinherited |
bool GMCtrlItem::isFocusEnabled |
( |
| ) |
|
|
inherited |
获取焦点是否被禁用;焦点被禁用后,此元素将不能获得焦点 ,不能处理各种输入事件。
- 返回
- bool
static bool GObject::isObjectExist |
( |
GObject * |
obj | ) |
|
|
staticinherited |
判断对象是否已经被析构掉了。
- 参数
-
- 返回
- bool true表示对象健在,false表示对象已经被析构掉了
bool GMItem::isVisible |
( |
| ) |
|
|
inherited |
返回此界面元素当前是否可见;show() 之后可见, hide() 之后不可见
- 返回
- bool
virtual bool GMCtrlItem::keyPressEvent |
( |
GKeyEvent * |
| ) |
|
|
protectedvirtualinherited |
用户可以在子类中覆盖这个函数处理按键。用户不可以覆盖任何以fw开头的函数
- 参数
-
- 返回
- bool
void GMItem::loadBackgroundPixmap |
( |
const uint16_t |
imgID | ) |
|
|
inherited |
加载一个图片作为此界面元素的背景
- 参数
-
- 返回
- void
virtual bool GMCtrlItem::mousePressEvent |
( |
GMouseEvent * |
| ) |
|
|
protectedvirtualinherited |
用户可以在子类中覆盖这个函数处理鼠标事件。用户不可以覆盖任何以fw开头的函数
- 参数
-
- 返回
- bool
void GMItem::moveBy |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inherited |
移动此界面元素;将此界面元素沿X轴移动 x 像素,沿Y轴移动 y 像素
- 参数
-
- 返回
- void
const char* GObject::name |
( |
| ) |
const |
|
inherited |
virtual void GMProgressBar::paintEvent |
( |
| ) |
|
|
virtual |
int GMProgressBar::progress |
( |
| ) |
const |
GRect GMItem::rect |
( |
| ) |
const |
|
inherited |
int GMItem::right |
( |
| ) |
const |
|
inherited |
void GMCtrlItem::setFocus |
( |
| ) |
|
|
inherited |
void GMCtrlItem::setFocusEnabled |
( |
bool |
b | ) |
|
|
inherited |
设置是否禁此元素的焦点;焦点被禁用后,此元素将不能获得焦点 ,不能处理各种输入事件。
- 参数
-
- 返回
- void
void GMItem::setGeometry |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
inherited |
设置此界面元素所占用的矩形区域,位置及大小
- 参数
-
- 返回
- void
void GMItem::setHeight |
( |
int |
h | ) |
|
|
inherited |
void GMItem::setPaletteBackgroundColor |
( |
const GColor & |
c | ) |
|
|
inherited |
void GMItem::setPosition |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inherited |
void GMProgressBar::setProgressBgColor |
( |
GColor & |
c | ) |
|
void GMProgressBar::setProgressBgHeight |
( |
const int |
h | ) |
|
void GMProgressBar::setProgressBgImage |
( |
const GImage & |
p | ) |
|
void GMProgressBar::setProgressColor |
( |
GColor & |
c | ) |
|
void GMProgressBar::setProgressCursorImage |
( |
const GImage & |
p | ) |
|
void GMProgressBar::setProgressImage |
( |
const GImage & |
p | ) |
|
void GMItem::setSize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inherited |
void GMItem::setSize |
( |
const GSize & |
s | ) |
|
|
inherited |
void GMCtrlItem::setTabIndex |
( |
unsigned int |
index | ) |
|
|
inherited |
设置此界面元素的tab index;在使用键盘来操作界面时,需要用到tab index
- 参数
-
- 返回
- void
void GMItem::setVisible |
( |
bool |
b | ) |
|
|
inherited |
设置此界面元素是否可见;(用户改变此界面元素的可见属性之后,需要调用 update() 或 repaint() )
- 参数
-
- 返回
- void
void GMItem::setWidth |
( |
int |
w | ) |
|
|
inherited |
void GMItem::setX |
( |
int |
x | ) |
|
|
inherited |
void GMItem::setY |
( |
int |
y | ) |
|
|
inherited |
void GMItem::setZ |
( |
int |
z | ) |
|
|
inherited |
virtual void GMItem::show |
( |
| ) |
|
|
virtualinherited |
显示此界面元素。相当于:
setVisible (true);
update();
- 返回
- void
void GMProgressBar::slotSetProgress |
( |
int |
progress | ) |
|
|
slot |
void GMProgressBar::slotSetStepLength |
( |
int |
nStepLen | ) |
|
|
slot |
void GMProgressBar::slotSetTotalSteps |
( |
int |
totalSteps | ) |
|
|
slot |
int GMProgressBar::stepLength |
( |
| ) |
const |
|
protectedvirtualinherited |
用户可以在子类中覆盖这个函数处理滑动事件。用户不可以覆盖任何以fw开头的函数
- 参数
-
- 返回
- bool
unsigned int GMCtrlItem::tabIndex |
( |
| ) |
|
|
inherited |
获取此界面元素的tab index;在使用键盘来操作界面时,需要用到tab index
- 返回
- unsigned int
virtual bool GMCtrlItem::tapEvent |
( |
GTapEvent * |
| ) |
|
|
protectedvirtualinherited |
用户可以在子类中覆盖这个函数处理点击事件。用户不可以覆盖任何以fw开头的函数
- 参数
-
- 返回
- bool
int GMProgressBar::totalSteps |
( |
| ) |
const |
更新此界面元素所在的矩形区域;这个函数不会立刻进行重新绘制——而是发送一个绘制事件到事件循环中,后续,事件循环会分发、处理该绘制事件。这样能得到比调用 repaint() 更快的速度和更少的闪烁。
- 返回
- void
int GMItem::width |
( |
| ) |
const |
|
inherited |
GSignal<void(void)> GMCtrlItem::getFocus |
|
inherited |
GSignal<void(void)> GMCtrlItem::loseFocus |
|
inherited |
GSignal<void(void)> GObject::sigDestroyed |
|
inherited |
GSignal<void(int)> GMProgressBar::sigProgressChanged |
当进度条的进度发生了变化时,该信号被立即发射。参数是当前的进度。
该类的文档由以下文件生成: