QtCanpool 3.3.0
载入中...
搜索中...
未找到
QxRibbon::RibbonGalleryGroup类 参考

Gallery 的组 更多...

#include <qxribbon/ribbongallerygroup.h>

类 QxRibbon::RibbonGalleryGroup 继承关系图:

Public 类型

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

Public 成员函数

 RibbonGalleryGroup (QWidget *w=Q_NULLPTR)
 
virtual ~RibbonGalleryGroup ()
 
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 (QAction *act)
 
void addItems (const QList< QAction * > &acts)
 
void setGroupTitle (const QString &title)
 
QString groupTitle () const
 
void selectByIndex (int i)
 
void setDisplayRow (DisplayRow r)
 
DisplayRow displayRow () const
 
void setGridMinimumWidth (int w)
 设置grid最小的宽度,默认为0(不限制)
 
int gridMinimumWidth () const
 grid最小的宽度,默认为0(不限制)
 
void setGridMaximumWidth (int w)
 设置grid最大的宽度,默认为0(不限制)
 
int gridMaximumWidth () const
 grid最大的的宽度,默认为0(不限制)
 
QSize sizeHint () const override
 
QActionGroup * actionGroup () const
 获取RibbonGalleryGroup管理的actiongroup
 
void onItemClicked (const QModelIndex &index)
 
void onItemEntered (const QModelIndex &index)
 
void groupTitleChanged (const QString &title)
 
void triggered (QAction *action)
 等同QActionGroup的triggered 所有加入RibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过
 
void hovered (QAction *action)
 等同QActionGroup的hovered 所有加入RibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过
 

详细描述

Gallery 的组

组负责显示管理 Gallery Item

在文件 ribbongallerygroup.h 第 21 行定义.

成员枚举类型说明

◆ DisplayRow

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

枚举值
DisplayOneRow 

显示1行,默认

DisplayTwoRow 
DisplayThreeRow 

在文件 ribbongallerygroup.h 第 37 行定义.

◆ GalleryGroupStyle

GalleryGroup显示的样式

枚举值
IconWithText 

图标带文字

IconWithWordWrapText 

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

IconOnly 

只有图标

在文件 ribbongallerygroup.h 第 28 行定义.

构造及析构函数说明

◆ RibbonGalleryGroup()

QxRibbon::RibbonGalleryGroup::RibbonGalleryGroup ( QWidget *  w = Q_NULLPTR)
explicit

在文件 ribbongallerygroup.cpp 第 410 行定义.

◆ ~RibbonGalleryGroup()

QxRibbon::RibbonGalleryGroup::~RibbonGalleryGroup ( )
virtual

在文件 ribbongallerygroup.cpp 第 428 行定义.

成员函数说明

◆ actionGroup()

QActionGroup * QxRibbon::RibbonGalleryGroup::actionGroup ( ) const

获取RibbonGalleryGroup管理的actiongroup

返回

在文件 ribbongallerygroup.cpp 第 667 行定义.

◆ addItem() [1/2]

void QxRibbon::RibbonGalleryGroup::addItem ( const QString &  text,
const QIcon &  icon 
)

在文件 ribbongallerygroup.cpp 第 540 行定义.

◆ addItem() [2/2]

void QxRibbon::RibbonGalleryGroup::addItem ( QAction *  act)

在文件 ribbongallerygroup.cpp 第 550 行定义.

◆ addItems()

void QxRibbon::RibbonGalleryGroup::addItems ( const QList< QAction * > &  acts)

在文件 ribbongallerygroup.cpp 第 561 行定义.

◆ displayRow()

RibbonGalleryGroup::DisplayRow QxRibbon::RibbonGalleryGroup::displayRow ( ) const

在文件 ribbongallerygroup.cpp 第 610 行定义.

◆ galleryGroupStyle()

RibbonGalleryGroup::GalleryGroupStyle QxRibbon::RibbonGalleryGroup::galleryGroupStyle ( ) const

在文件 ribbongallerygroup.cpp 第 534 行定义.

◆ gridMaximumWidth()

int QxRibbon::RibbonGalleryGroup::gridMaximumWidth ( ) const

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

在文件 ribbongallerygroup.cpp 第 649 行定义.

◆ gridMinimumWidth()

int QxRibbon::RibbonGalleryGroup::gridMinimumWidth ( ) const

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

返回

在文件 ribbongallerygroup.cpp 第 630 行定义.

◆ groupTitle()

QString QxRibbon::RibbonGalleryGroup::groupTitle ( ) const

在文件 ribbongallerygroup.cpp 第 583 行定义.

◆ groupTitleChanged()

void QxRibbon::RibbonGalleryGroup::groupTitleChanged ( const QString &  title)

◆ hovered()

void QxRibbon::RibbonGalleryGroup::hovered ( QAction *  action)

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

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

◆ isRecalcGridSizeBlock()

bool QxRibbon::RibbonGalleryGroup::isRecalcGridSizeBlock ( ) const

在文件 ribbongallerygroup.cpp 第 443 行定义.

◆ onItemClicked()

void QxRibbon::RibbonGalleryGroup::onItemClicked ( const QModelIndex &  index)

在文件 ribbongallerygroup.cpp 第 673 行定义.

◆ onItemEntered()

void QxRibbon::RibbonGalleryGroup::onItemEntered ( const QModelIndex &  index)

在文件 ribbongallerygroup.cpp 第 679 行定义.

◆ recalcGridSize() [1/2]

void QxRibbon::RibbonGalleryGroup::recalcGridSize ( )

重新计算grid和icon的尺寸

在文件 ribbongallerygroup.cpp 第 452 行定义.

◆ recalcGridSize() [2/2]

void QxRibbon::RibbonGalleryGroup::recalcGridSize ( int  galleryHeight)

在文件 ribbongallerygroup.cpp 第 457 行定义.

◆ selectByIndex()

void QxRibbon::RibbonGalleryGroup::selectByIndex ( int  i)

在文件 ribbongallerygroup.cpp 第 589 行定义.

◆ setDisplayRow()

void QxRibbon::RibbonGalleryGroup::setDisplayRow ( DisplayRow  r)

在文件 ribbongallerygroup.cpp 第 603 行定义.

◆ setGalleryGroupStyle()

void QxRibbon::RibbonGalleryGroup::setGalleryGroupStyle ( RibbonGalleryGroup::GalleryGroupStyle  style)

设置默认的预设样式

参数
style

在文件 ribbongallerygroup.cpp 第 522 行定义.

◆ setGridMaximumWidth()

void QxRibbon::RibbonGalleryGroup::setGridMaximumWidth ( int  w)

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

参数
w

在文件 ribbongallerygroup.cpp 第 640 行定义.

◆ setGridMinimumWidth()

void QxRibbon::RibbonGalleryGroup::setGridMinimumWidth ( int  w)

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

参数
w

在文件 ribbongallerygroup.cpp 第 620 行定义.

◆ setGroupTitle()

void QxRibbon::RibbonGalleryGroup::setGroupTitle ( const QString &  title)

在文件 ribbongallerygroup.cpp 第 576 行定义.

◆ setRecalcGridSizeBlock()

void QxRibbon::RibbonGalleryGroup::setRecalcGridSizeBlock ( bool  on = true)

是否禁止计算

参数
on

在文件 ribbongallerygroup.cpp 第 437 行定义.

◆ sizeHint()

QSize QxRibbon::RibbonGalleryGroup::sizeHint ( ) const
override

在文件 ribbongallerygroup.cpp 第 655 行定义.

◆ triggered()

void QxRibbon::RibbonGalleryGroup::triggered ( QAction *  action)

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

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

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