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

#include <SARibbonCategory.h>

类 SARibbonCategory 继承关系图:

class  PrivateData
 SARibbonCategory::PrivateData
 

Public 类型

using FpPanelIterate = std::function< bool(SARibbonPanel *) >
 

信号

void categoryNameChanged (const QString &n)
 Emitted when category name changes
 
void actionTriggered (QAction *action)
 Emitted when an action is triggered
 

Public 成员函数

 SARibbonCategory (QWidget *p=nullptr)
 Constructor
 
 SARibbonCategory (const QString &name, QWidget *p=nullptr)
 Constructor with name
 
 ~SARibbonCategory ()
 Destructor
 
QString categoryName () const
 Get the category name
 
void setCategoryName (const QString &title)
 Set the category name
 
SARibbonPanel::PanelLayoutMode panelLayoutMode () const
 Get the panel layout mode
 
void setPanelLayoutMode (SARibbonPanel::PanelLayoutMode m)
 Set the panel layout mode
 
SARibbonPaneladdPanel (const QString &title)
 Add a panel with title
 
void addPanel (SARibbonPanel *panel)
 Add an existing panel
 
Q_INVOKABLE void addPanel (QWidget *panel)
 Add panel for Qt Designer
 
SARibbonPanelinsertPanel (const QString &title, int index)
 Create and insert a new panel at index position
 
void insertPanel (SARibbonPanel *panel, int index)
 Insert an existing panel at index position
 
SARibbonPanelpanelByName (const QString &title) const
 Find panel by name
 
SARibbonPanelpanelByObjectName (const QString &objname) const
 Find panel by ObjectName
 
SARibbonPanelpanelByIndex (int index) const
 Find panel by index, returns nullptr if out of range
 
int panelIndex (SARibbonPanel *p) const
 Get the index of a panel
 
void movePanel (int from, int to)
 Move a panel from one index to another
 
bool takePanel (SARibbonPanel *panel)
 Detach panel from SARibbonCategory management
 
bool removePanel (SARibbonPanel *panel)
 Remove panel and delete it
 
bool removePanel (int index)
 Remove panel by index
 
QList< SARibbonPanel * > panelList () const
 Get all panels
 
bool isContextCategory () const
 Check if this is a context category
 
int panelCount () const
 Get the number of panels
 
bool isCanCustomize () const
 Check if customization is allowed
 
void setCanCustomize (bool b)
 Set whether customization is allowed
 
int panelTitleHeight () const
 Get panel title bar height
 
void setPanelTitleHeight (int h)
 Set panel title bar height
 
bool isEnableShowPanelTitle () const
 Check if panel title bar is displayed
 
void setEnableShowPanelTitle (bool on)
 Set whether to display panel title
 
void setCategoryAlignment (SARibbonAlignment al)
 Set category alignment
 
SARibbonAlignment categoryAlignment () const
 Get category alignment
 
void setPanelSpacing (int n)
 Set panel spacing
 
int panelSpacing () const
 Get panel spacing
 
void setPanelLargeIconSize (const QSize &largeSize)
 Set panel large icon size
 
QSize panelLargeIconSize () const
 Get panel large icon size
 
void setPanelSmallIconSize (const QSize &smallSize)
 Set panel small icon size
 
QSize panelSmallIconSize () const
 Get panel small icon size
 
void setPanelToolButtonIconSize (const QSize &smallSize, const QSize &largeSize)
 Set panel tool button icon sizes
 
QPair< QSize, QSize > panelToolButtonIconSize () const
 Get panel tool button icon sizes
 
SARibbonBarribbonBar () const
 Get the parent ribbonbar, returns null if not managed
 
void updateItemGeometry ()
 Refresh category layout, call after changing ribbon mode
 
void setUseAnimatingScroll (bool useAnimating)
 Set whether to use animation when scrolling
 
bool isUseAnimatingScroll () const
 Check if animation is used when scrolling
 
void setWheelScrollStep (int step)
 Set wheel scroll step in pixels
 
int wheelScrollStep () const
 Get wheel scroll step
 
void setAnimationDuration (int duration)
 Set animation duration in milliseconds
 
int animationDuration () const
 Get animation duration in milliseconds
 
bool isEnableWordWrap () const
 Check if panel text word wrap is enabled
 
qreal buttonMaximumAspectRatio () const
 Get button maximum aspect ratio
 
bool iteratePanel (FpPanelIterate fp) const
 Iterate through all panels
 
QSize sizeHint () const Q_DECL_OVERRIDE
 

Protected 成员函数

virtual bool event (QEvent *e) override
 
void wheelEvent (QWheelEvent *event) override
 Handle wheel event
 
void changeEvent (QEvent *event) override
 Handle change event
 
void markIsContextCategory (bool isContextCategory=true)
 Mark this as a context category
 
SARibbonCategoryLayoutcategoryLayout () const
 Get the category layout
 
void setEnableWordWrap (bool on)
 Set whether panel button text word wrap is enabled
 
void setButtonMaximumAspectRatio (qreal fac=1.4)
 Set button maximum aspect ratio
 

属性

bool isCanCustomize
 
QString categoryName
 

友元

class SARibbonBar
 
class SARibbonContextCategory
 

详细描述

构造及析构函数说明

◆ SARibbonCategory()

SARibbonCategory::SARibbonCategory ( const QString &  name,
QWidget *  p = nullptr 
)
explicit

Constructor with name

成员函数说明

◆ addPanel() [1/3]

SARibbonPanel * SARibbonCategory::addPanel ( const QString &  title)

Add a panel with title

◆ addPanel() [2/3]

void SARibbonCategory::addPanel ( QWidget *  panel)

Add panel for Qt Designer

◆ addPanel() [3/3]

void SARibbonCategory::addPanel ( SARibbonPanel panel)

Add an existing panel

◆ animationDuration()

int SARibbonCategory::animationDuration ( ) const

Get animation duration in milliseconds

◆ buttonMaximumAspectRatio()

qreal SARibbonCategory::buttonMaximumAspectRatio ( ) const

Get button maximum aspect ratio

◆ categoryAlignment()

SARibbonAlignment SARibbonCategory::categoryAlignment ( ) const

Get category alignment

◆ categoryLayout()

SARibbonCategoryLayout * SARibbonCategory::categoryLayout ( ) const
protected

Get the category layout

◆ categoryName()

QString SARibbonCategory::categoryName ( ) const

Get the category name

◆ changeEvent()

void SARibbonCategory::changeEvent ( QEvent *  event)
overrideprotected

Handle change event

◆ event()

bool SARibbonCategory::event ( QEvent *  e)
overrideprotectedvirtual

◆ insertPanel() [1/2]

SARibbonPanel * SARibbonCategory::insertPanel ( const QString &  title,
int  index 
)

Create and insert a new panel at index position

◆ insertPanel() [2/2]

void SARibbonCategory::insertPanel ( SARibbonPanel panel,
int  index 
)

Insert an existing panel at index position

◆ isCanCustomize()

bool SARibbonCategory::isCanCustomize ( ) const

Check if customization is allowed

◆ isContextCategory()

bool SARibbonCategory::isContextCategory ( ) const

Check if this is a context category

◆ isEnableShowPanelTitle()

bool SARibbonCategory::isEnableShowPanelTitle ( ) const

Check if panel title bar is displayed

◆ isEnableWordWrap()

bool SARibbonCategory::isEnableWordWrap ( ) const

Check if panel text word wrap is enabled

◆ isUseAnimatingScroll()

bool SARibbonCategory::isUseAnimatingScroll ( ) const

Check if animation is used when scrolling

◆ iteratePanel()

bool SARibbonCategory::iteratePanel ( FpPanelIterate  fp) const

Iterate through all panels

◆ markIsContextCategory()

void SARibbonCategory::markIsContextCategory ( bool  isContextCategory = true)
protected

Mark this as a context category

◆ movePanel()

void SARibbonCategory::movePanel ( int  from,
int  to 
)

Move a panel from one index to another

◆ panelByIndex()

SARibbonPanel * SARibbonCategory::panelByIndex ( int  index) const

Find panel by index, returns nullptr if out of range

◆ panelByName()

SARibbonPanel * SARibbonCategory::panelByName ( const QString &  title) const

Find panel by name

◆ panelByObjectName()

SARibbonPanel * SARibbonCategory::panelByObjectName ( const QString &  objname) const

Find panel by ObjectName

◆ panelCount()

int SARibbonCategory::panelCount ( ) const

Get the number of panels

◆ panelIndex()

int SARibbonCategory::panelIndex ( SARibbonPanel p) const

Get the index of a panel

◆ panelLargeIconSize()

QSize SARibbonCategory::panelLargeIconSize ( ) const

Get panel large icon size

◆ panelLayoutMode()

SARibbonPanel::PanelLayoutMode SARibbonCategory::panelLayoutMode ( ) const

Get the panel layout mode

◆ panelList()

QList< SARibbonPanel * > SARibbonCategory::panelList ( ) const

Get all panels

◆ panelSmallIconSize()

QSize SARibbonCategory::panelSmallIconSize ( ) const

Get panel small icon size

◆ panelSpacing()

int SARibbonCategory::panelSpacing ( ) const

Get panel spacing

◆ panelTitleHeight()

int SARibbonCategory::panelTitleHeight ( ) const

Get panel title bar height

◆ panelToolButtonIconSize()

QPair< QSize, QSize > SARibbonCategory::panelToolButtonIconSize ( ) const

Get panel tool button icon sizes

◆ removePanel() [1/2]

bool SARibbonCategory::removePanel ( int  index)

Remove panel by index

◆ removePanel() [2/2]

bool SARibbonCategory::removePanel ( SARibbonPanel panel)

Remove panel and delete it

◆ ribbonBar()

SARibbonBar * SARibbonCategory::ribbonBar ( ) const

Get the parent ribbonbar, returns null if not managed

◆ setAnimationDuration()

void SARibbonCategory::setAnimationDuration ( int  duration)

Set animation duration in milliseconds

◆ setButtonMaximumAspectRatio()

void SARibbonCategory::setButtonMaximumAspectRatio ( qreal  fac = 1.4)
protected

Set button maximum aspect ratio

◆ setCanCustomize()

void SARibbonCategory::setCanCustomize ( bool  b)

Set whether customization is allowed

◆ setCategoryAlignment()

void SARibbonCategory::setCategoryAlignment ( SARibbonAlignment  al)

Set category alignment

◆ setCategoryName()

void SARibbonCategory::setCategoryName ( const QString &  title)

Set the category name

◆ setEnableShowPanelTitle()

void SARibbonCategory::setEnableShowPanelTitle ( bool  on)

Set whether to display panel title

◆ setEnableWordWrap()

void SARibbonCategory::setEnableWordWrap ( bool  on)
protected

Set whether panel button text word wrap is enabled

◆ setPanelLargeIconSize()

void SARibbonCategory::setPanelLargeIconSize ( const QSize &  largeSize)

Set panel large icon size

◆ setPanelLayoutMode()

void SARibbonCategory::setPanelLayoutMode ( SARibbonPanel::PanelLayoutMode  m)

Set the panel layout mode

◆ setPanelSmallIconSize()

void SARibbonCategory::setPanelSmallIconSize ( const QSize &  smallSize)

Set panel small icon size

◆ setPanelSpacing()

void SARibbonCategory::setPanelSpacing ( int  n)

Set panel spacing

◆ setPanelTitleHeight()

void SARibbonCategory::setPanelTitleHeight ( int  h)

Set panel title bar height

◆ setPanelToolButtonIconSize()

void SARibbonCategory::setPanelToolButtonIconSize ( const QSize &  smallSize,
const QSize &  largeSize 
)

Set panel tool button icon sizes

◆ setUseAnimatingScroll()

void SARibbonCategory::setUseAnimatingScroll ( bool  useAnimating)

Set whether to use animation when scrolling

◆ setWheelScrollStep()

void SARibbonCategory::setWheelScrollStep ( int  step)

Set wheel scroll step in pixels

◆ takePanel()

bool SARibbonCategory::takePanel ( SARibbonPanel panel)

Detach panel from SARibbonCategory management

◆ updateItemGeometry()

void SARibbonCategory::updateItemGeometry ( )

Refresh category layout, call after changing ribbon mode

◆ wheelEvent()

void SARibbonCategory::wheelEvent ( QWheelEvent *  event)
overrideprotected

Handle wheel event

◆ wheelScrollStep()

int SARibbonCategory::wheelScrollStep ( ) const

Get wheel scroll step


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