SARibbon 2.5.2
SARibbon wiki
载入中...
搜索中...
未找到
SARibbonGallery类 参考

#include <SARibbonGallery.h>

类 SARibbonGallery 继承关系图:

class  PrivateData
 The SARibbonGalleryPrivate class
 

Public 槽

virtual void pageUp ()
 Scroll up one page in the current gallery group
 
virtual void pageDown ()
 Scroll down one page in the current gallery group
 
virtual void showMoreDetail ()
 Show the popup viewport with all gallery groups
 

信号

void triggered (QAction *action)
 
void hovered (QAction *action)
 

Public 成员函数

 SARibbonGallery (QWidget *parent=nullptr)
 Constructor for SARibbonGallery
 
virtual ~SARibbonGallery ()
 Destructor for SARibbonGallery
 
SARibbonGalleryGroupaddGalleryGroup ()
 Get a blank SARibbonGalleryGroup
 
void addGalleryGroup (SARibbonGalleryGroup *group)
 Add an existing SARibbonGalleryGroup to the gallery
 
SARibbonGalleryGroupaddCategoryActions (const QString &title, QList< QAction * > actions)
 Quickly add a set of actions as a gallery group
 
void setCurrentViewGroup (SARibbonGalleryGroup *group)
 Set the currently displayed gallery group
 
SARibbonGalleryGroupcurrentViewGroup () const
 Get the currently displayed gallery group
 
SARibbonGalleryViewportgetPopupViewPort () const
 Get the popup viewport widget
 

静态 Public 成员函数

static void setGalleryButtonMaximumWidth (int w)
 Set the maximum width for gallery control buttons (default 15)
 

Protected 槽

void onItemClicked (const QModelIndex &index)
 Slot called when an item in a gallery group is clicked
 
virtual void onTriggered (QAction *action)
 Slot called when an action is triggered from the gallery
 

Protected 成员函数

void resizeEvent (QResizeEvent *event) override
 Handle resize events for the gallery
 

详细描述

构造及析构函数说明

◆ SARibbonGallery()

SARibbonGallery::SARibbonGallery ( QWidget *  parent = nullptr)
explicit

Constructor for SARibbonGallery

◆ ~SARibbonGallery()

SARibbonGallery::~SARibbonGallery ( )
virtual

Destructor for SARibbonGallery

成员函数说明

◆ addCategoryActions()

SARibbonGalleryGroup * SARibbonGallery::addCategoryActions ( const QString &  title,
QList< QAction * >  actions 
)

Quickly add a set of actions as a gallery group

添加一组actions

参数
titleactions组的名字
actions
返回
返回SARibbonGalleryGroup,用户可以通过修改SARibbonGalleryGroup属性控制其显示方法

◆ addGalleryGroup() [1/2]

SARibbonGalleryGroup * SARibbonGallery::addGalleryGroup ( )

Get a blank SARibbonGalleryGroup

◆ addGalleryGroup() [2/2]

void SARibbonGallery::addGalleryGroup ( SARibbonGalleryGroup group)

Add an existing SARibbonGalleryGroup to the gallery

添加一组SARibbonGalleryGroup

参数
group

◆ currentViewGroup()

SARibbonGalleryGroup * SARibbonGallery::currentViewGroup ( ) const

Get the currently displayed gallery group

◆ getPopupViewPort()

SARibbonGalleryViewport * SARibbonGallery::getPopupViewPort ( ) const

Get the popup viewport widget

获取弹出窗口

返回

◆ hovered

void SARibbonGallery::hovered ( QAction *  action)
signal

◆ onItemClicked

void SARibbonGallery::onItemClicked ( const QModelIndex &  index)
protectedslot

Slot called when an item in a gallery group is clicked

◆ onTriggered

void SARibbonGallery::onTriggered ( QAction *  action)
protectedvirtualslot

Slot called when an action is triggered from the gallery

◆ pageDown

void SARibbonGallery::pageDown ( )
virtualslot

Scroll down one page in the current gallery group

上翻页

◆ pageUp

void SARibbonGallery::pageUp ( )
virtualslot

Scroll up one page in the current gallery group

下翻页

◆ resizeEvent()

void SARibbonGallery::resizeEvent ( QResizeEvent *  event)
overrideprotected

Handle resize events for the gallery

◆ setCurrentViewGroup()

void SARibbonGallery::setCurrentViewGroup ( SARibbonGalleryGroup group)

Set the currently displayed gallery group

◆ setGalleryButtonMaximumWidth()

void SARibbonGallery::setGalleryButtonMaximumWidth ( int  w)
static

Set the maximum width for gallery control buttons (default 15)

设置最右边三个控制按钮的最大宽度(默认15)

参数
w

◆ showMoreDetail

void SARibbonGallery::showMoreDetail ( )
virtualslot

Show the popup viewport with all gallery groups

显示更多触发,默认弹出内部管理的SARibbonGalleryViewport,用户可重载此函数实现自定义的弹出

◆ triggered

void SARibbonGallery::triggered ( QAction *  action)
signal

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