所有容器元素的基类;一个容器元素可以包含任意数目的 GMItem 对象
更多...
#include <gMItem.h>
继承自 GMCtrlItem .
被 GCtrlListBox , 以及 GCtrlRadioButtonGroup 继承.
|
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) |
| 判断对象是否已经被析构掉了。 更多...
|
|
所有容器元素的基类;一个容器元素可以包含任意数目的 GMItem 对象
GMContainerItem::GMContainerItem |
( |
GCtrlForm * |
form, |
|
|
GMItem * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
| |
构造一个能够包含任意数目 GMItem 的窗口界面元素
- 参数
-
form | 属于哪个窗体 |
parent | ... |
name | ... |
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*
|
protectedvirtualinherited |
virtual bool GMCtrlItem::fwKeyPressEvent |
( |
GKeyEvent * |
| ) |
|
|
protectedvirtualinherited |
virtual bool GMCtrlItem::fwMousePressEvent |
( |
GMouseEvent * |
| ) |
|
|
protectedvirtualinherited |
virtual bool GMCtrlItem::fwSwipeEvent |
( |
GSwipeEvent * |
| ) |
|
|
protectedvirtualinherited |
virtual bool GMCtrlItem::fwTapEvent |
( |
GTapEvent * |
| ) |
|
|
protectedvirtualinherited |
|
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 GMContainerItem::isContainerItem |
( |
| ) |
|
|
virtual |
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 GMItem::paintEvent |
( |
| ) |
|
|
protectedvirtualinherited |
被 GMScrollText, GMText, GMImage, GMPixmap, GCtrlListBox, GCtrlRadioButtonGroup, GCtrlLineEdit, GCtrlListBoxPixmap, GCtrlButton, GMProgressBar, GCtrlListBoxItem , 以及 GCtrlRadioButton 重载.
GRect GMItem::rect |
( |
| ) |
const |
|
inherited |
int GMItem::right |
( |
| ) |
const |
|
inherited |
void GMCtrlItem::setFocus |
( |
| ) |
|
|
inherited |
void GMCtrlItem::setFocusEnabled |
( |
bool |
b | ) |
|
|
inherited |
设置是否禁此元素的焦点;焦点被禁用后,此元素将不能获得焦点 ,不能处理各种输入事件。
- 参数
-
- 返回
- void
void GMContainerItem::setFocusToItem |
( |
GMCtrlItem * |
pItem | ) |
|
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 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
|
protectedvirtualinherited |
用户可以在子类中覆盖这个函数处理滑动事件。用户不可以覆盖任何以fw开头的函数
- 参数
-
- 返回
- bool
unsigned int GMCtrlItem::tabIndex |
( |
| ) |
|
|
inherited |
获取此界面元素的tab index;在使用键盘来操作界面时,需要用到tab index
- 返回
- unsigned int
virtual bool GMCtrlItem::tapEvent |
( |
GTapEvent * |
| ) |
|
|
protectedvirtualinherited |
用户可以在子类中覆盖这个函数处理点击事件。用户不可以覆盖任何以fw开头的函数
- 参数
-
- 返回
- bool
更新此界面元素所在的矩形区域;这个函数不会立刻进行重新绘制——而是发送一个绘制事件到事件循环中,后续,事件循环会分发、处理该绘制事件。这样能得到比调用 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 |
该类的文档由以下文件生成: