SARibbon 2.2.3
SARibbon wiki
载入中...
搜索中...
未找到
SARibbonGalleryGroup类 参考

Gallery的组 更多...

#include <SARibbonGalleryGroup.h>

类 SARibbonGalleryGroup 继承关系图:

class  PrivateData
 The SARibbonGalleryGroupPrivate class 更多...
 

Public 类型

enum  GalleryGroupStyle { IconWithText , IconWithWordWrapText , IconOnly }
 GalleryGroup显示的样式 更多...
 
enum  DisplayRow { DisplayOneRow = 1 , DisplayTwoRow = 2 , DisplayThreeRow = 3 }
 定义Gallery在一个pannel下面显示的图标行数 更多...
 

信号

void groupTitleChanged (const QString &title)
 
void triggered (QAction *action)
 等同QActionGroup的triggered 所有加入SARibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过
 
void hovered (QAction *action)
 等同QActionGroup的triggered 所有加入SARibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过
 

Public 成员函数

 SARibbonGalleryGroup (QWidget *w=0)
 
void setRecalcGridSizeBlock (bool on=true)
 是否禁止计算
 
bool isRecalcGridSizeBlock () const
 
void recalcGridSize ()
 重新计算grid和icon的尺寸
 
void recalcGridSize (int galleryHeight)
 
void setGalleryGroupStyle (GalleryGroupStyle style)
 设置默认的预设样式
 
GalleryGroupStyle galleryGroupStyle () const
 
void addItem (const QString &text, const QIcon &icon)
 
void addItem (SARibbonGalleryItem *item)
 添加一个条目
 
void addActionItem (QAction *act)
 
void addActionItemList (const QList< QAction * > &acts)
 
void setupGroupModel ()
 构建一个model,这个model的父类是SARibbonGalleryGroup,如果要共享model,需要手动处理model的父类
 
SARibbonGalleryGroupModelgroupModel ()
 
void setGroupTitle (const QString &title)
 
QString groupTitle () const
 
void selectByIndex (int i)
 
void setDisplayRow (DisplayRow r)
 设置显示的行数
 
DisplayRow displayRow () const
 Gallery显示的行数
 
void setGridMinimumWidth (int w)
 设置grid最小的宽度,默认为0(不限制)
 
int gridMinimumWidth () const
 grid最小的宽度,默认为0(不限制)
 
void setGridMaximumWidth (int w)
 设置grid最大的宽度,默认为0(不限制)
 
int gridMaximumWidth () const
 grid最大的的宽度,默认为0(不限制)
 
QActionGroup * actionGroup () const
 获取SARibbonGalleryGroup管理的actiongroup
 

详细描述

Gallery的组

组负责显示管理Gallery Item

成员枚举类型说明

◆ DisplayRow

定义Gallery在一个pannel下面显示的图标行数

枚举值
DisplayOneRow 

显示1行,默认

◆ GalleryGroupStyle

GalleryGroup显示的样式

枚举值
IconWithText 

图标带文字

IconWithWordWrapText 

图标带文字,文字会换行显示,此模式只会对DisplayOneRow生效,如果不是DisplayOneRow,等同IconWithText

IconOnly 

只有图标

成员函数说明

◆ actionGroup()

QActionGroup * SARibbonGalleryGroup::actionGroup ( ) const

获取SARibbonGalleryGroup管理的actiongroup

返回

◆ addItem()

void SARibbonGalleryGroup::addItem ( SARibbonGalleryItem * item)

添加一个条目

参数
item条目的内存所有权归属SARibbonGalleryGroup管理

◆ displayRow()

SARibbonGalleryGroup::DisplayRow SARibbonGalleryGroup::displayRow ( ) const

Gallery显示的行数

返回

◆ gridMaximumWidth()

int SARibbonGalleryGroup::gridMaximumWidth ( ) const

grid最大的的宽度,默认为0(不限制)

参数
w

◆ gridMinimumWidth()

int SARibbonGalleryGroup::gridMinimumWidth ( ) const

grid最小的宽度,默认为0(不限制)

返回

◆ hovered

void SARibbonGalleryGroup::hovered ( QAction * action)
signal

等同QActionGroup的triggered 所有加入SARibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过

参见
getActionGroup 获取到对应的actiongroup
注解
此属性需要通过QAbstractItemView::entered(const QModelIndex &index)激活,因此要保证设置了setMouseTracking(true)
参数
action

◆ setDisplayRow()

void SARibbonGalleryGroup::setDisplayRow ( DisplayRow r)

设置显示的行数

参数
r

◆ setGalleryGroupStyle()

void SARibbonGalleryGroup::setGalleryGroupStyle ( SARibbonGalleryGroup::GalleryGroupStyle style)

设置默认的预设样式

参数
style

◆ setGridMaximumWidth()

void SARibbonGalleryGroup::setGridMaximumWidth ( int w)

设置grid最大的宽度,默认为0(不限制)

参数
w

◆ setGridMinimumWidth()

void SARibbonGalleryGroup::setGridMinimumWidth ( int w)

设置grid最小的宽度,默认为0(不限制)

参数
w

◆ setRecalcGridSizeBlock()

void SARibbonGalleryGroup::setRecalcGridSizeBlock ( bool on = true)

是否禁止计算

参数
on

◆ triggered

void SARibbonGalleryGroup::triggered ( QAction * action)
signal

等同QActionGroup的triggered 所有加入SARibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过

参见
getActionGroup 获取到对应的actiongroup
参数
action

该类的文档由以下文件生成: