SARibbon 2.5.1
SARibbon wiki
载入中...
搜索中...
未找到
SARibbonContextCategory类 参考

管理上下文标签的类 更多...

#include <SARibbonContextCategory.h>

类 SARibbonContextCategory 继承关系图:

class  PrivateData
 The SARibbonContextCategoryPrivate class
 

Public 槽

void hide ()
 hide contextCategory/隐藏上下文标签
 
void show ()
 show contextCategory/显示上下文标签
 

信号

void categoryPageAdded (SARibbonCategory *category)
 标签加入上下文
 
void categoryPageRemoved (SARibbonCategory *category)
 标签从上下文移除
 
void contextTitleChanged (const QString &title)
 上下文的标题发生改变
 
void categoryTitleChanged (SARibbonCategory *category, const QString &title)
 上下文标签维护的标签页名字发生了改变
 

Public 成员函数

 SARibbonContextCategory (QWidget *parent=nullptr)
 
SARibbonCategoryaddCategoryPage (const QString &title)
 添加标签
 
void addCategoryPage (SARibbonCategory *category)
 添加标签
 
int categoryCount () const
 
void setId (const QVariant &id)
 
QVariant id () const
 
void setContextColor (const QColor color)
 
QColor contextColor () const
 
QString contextTitle () const
 获取上下文标签的标题
 
void setContextTitle (const QString &contextTitle)
 设置上下文标签的标题,标题仅在office模式下显示 SARibbonBar::RibbonStyle
 
SARibbonCategorycategoryPage (int index)
 获取对应的tab页
 
QList< SARibbonCategory * > categoryList () const
 获取所有的SARibbonCategory*
 
bool takeCategory (SARibbonCategory *category)
 移除这个category,这时SARibbonContextCategory不再管理这个category
 
bool isHaveCategory (SARibbonCategory *category) const
 判断上下文是否维护了此SARibbonCategory
 

Protected 成员函数

QWidget * parentWidget () const
 
virtual bool eventFilter (QObject *watched, QEvent *e) override
 

详细描述

管理上下文标签的类

成员函数说明

◆ addCategoryPage() [1/2]

SARibbonCategory * SARibbonContextCategory::addCategoryPage ( const QString &  title)

添加标签

参数
title标签名字

◆ addCategoryPage() [2/2]

void SARibbonContextCategory::addCategoryPage ( SARibbonCategory category)

添加标签

参数
page

◆ categoryList()

QList< SARibbonCategory * > SARibbonContextCategory::categoryList ( ) const

获取所有的SARibbonCategory*

返回

◆ categoryPage()

SARibbonCategory * SARibbonContextCategory::categoryPage ( int  index)

获取对应的tab页

参数
index
返回

◆ categoryPageAdded

void SARibbonContextCategory::categoryPageAdded ( SARibbonCategory category)
signal

标签加入上下文

参数
category

◆ categoryPageRemoved

void SARibbonContextCategory::categoryPageRemoved ( SARibbonCategory category)
signal

标签从上下文移除

参数
category

◆ categoryTitleChanged

void SARibbonContextCategory::categoryTitleChanged ( SARibbonCategory category,
const QString &  title 
)
signal

上下文标签维护的标签页名字发生了改变

参数
category发生改变的上下文标签页
title新名字

◆ contextTitle()

QString SARibbonContextCategory::contextTitle ( ) const

获取上下文标签的标题

返回

◆ contextTitleChanged

void SARibbonContextCategory::contextTitleChanged ( const QString &  title)
signal

上下文的标题发生改变

参数
title

◆ hide

void SARibbonContextCategory::hide ( )
slot

hide contextCategory/隐藏上下文标签

此方法等同于:

ribbon->hideContextCategory(this);

◆ isHaveCategory()

bool SARibbonContextCategory::isHaveCategory ( SARibbonCategory category) const

判断上下文是否维护了此SARibbonCategory

参数
category
返回

◆ setContextTitle()

void SARibbonContextCategory::setContextTitle ( const QString &  contextTitle)

设置上下文标签的标题,标题仅在office模式下显示 SARibbonBar::RibbonStyle

参数
contextTitle
注解
此函数会触发信号
参见
contextTitleChanged

◆ show

void SARibbonContextCategory::show ( )
slot

show contextCategory/显示上下文标签

此方法等同于:

ribbon->showContextCategory(this);

◆ takeCategory()

bool SARibbonContextCategory::takeCategory ( SARibbonCategory category)

移除这个category,这时SARibbonContextCategory不再管理这个category

参数
category
返回
成功移除返回true

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