列表视图中可以包含任意数目的列表项, GCtrlIconViewItem 类代表了图标在上、文字在下的所述列表项;
更多...
#include <gCtrlListBox.h>
继承自 GCtrlListBoxPixmap .
|
| GCtrlIconViewItem (const GImage &img, const GString &str, GCtrlForm *frm, GCtrlListBox *parent, const char *name="iconViewItem", const bool showTitle=false) |
| 构造一个图标在上、文字在下的列表项,并通过 showTitle 来控制是否显示文字标题;此列表项须要与列表视图 GCtrlListBox 配套使用。 更多...
|
|
virtual void | setGeometry (int x, int y, int w, int h) |
| 设置列表项所占用的矩形区域,位置及大小 更多...
|
|
GMScrollText * | getTxt () |
| 获取文字标题 更多...
|
|
GString | text () |
| 获取文字标题的内容 更多...
|
|
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 | 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) |
| 判断对象是否已经被析构掉了。 更多...
|
|
列表视图中可以包含任意数目的列表项, GCtrlIconViewItem 类代表了图标在上、文字在下的所述列表项;
GCtrlIconViewItem::GCtrlIconViewItem |
( |
const GImage & |
img, |
|
|
const GString & |
str, |
|
|
GCtrlForm * |
frm, |
|
|
GCtrlListBox * |
parent, |
|
|
const char * |
name = "iconViewItem" , |
|
|
const bool |
showTitle = false |
|
) |
| |
构造一个图标在上、文字在下的列表项,并通过 showTitle 来控制是否显示文字标题;此列表项须要与列表视图 GCtrlListBox 配套使用。
- 参数
-
img | 列表项的图片 |
str | 列表项的文字标题 |
frm | 属于哪个窗体 |
parent | 此列表项需要放置到哪个列表视图 |
name | ... |
showTitle | 是否显示文字标题 |
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 GCtrlListBoxItem::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 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 GCtrlListBoxPixmap::paintEvent |
( |
| ) |
|
|
protectedvirtualinherited |
GRect GMItem::rect |
( |
| ) |
const |
|
inherited |
int GMItem::right |
( |
| ) |
const |
|
inherited |
void GMCtrlItem::setFocus |
( |
| ) |
|
|
inherited |
void GMCtrlItem::setFocusEnabled |
( |
bool |
b | ) |
|
|
inherited |
设置是否禁此元素的焦点;焦点被禁用后,此元素将不能获得焦点 ,不能处理各种输入事件。
- 参数
-
- 返回
- void
virtual void GCtrlIconViewItem::setGeometry |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
virtual |
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 |
该类的文档由以下文件生成: