![]() |
SARibbon 2.5.2
SARibbon wiki
|
#include <SARibbonCategory.h>
类 | |
| 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 | |
| SARibbonPanel * | addPanel (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 | |
| SARibbonPanel * | insertPanel (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 | |
| SARibbonPanel * | panelByName (const QString &title) const |
| Find panel by name | |
| SARibbonPanel * | panelByObjectName (const QString &objname) const |
| Find panel by ObjectName | |
| SARibbonPanel * | panelByIndex (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 | |
| SARibbonBar * | ribbonBar () 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 | |
| SARibbonCategoryLayout * | categoryLayout () 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 |
|
explicit |
Constructor with name
| SARibbonPanel * SARibbonCategory::addPanel | ( | const QString & | title | ) |
Add a panel with title
| void SARibbonCategory::addPanel | ( | QWidget * | panel | ) |
Add panel for Qt Designer
| void SARibbonCategory::addPanel | ( | SARibbonPanel * | panel | ) |
Add an existing panel
| int SARibbonCategory::animationDuration | ( | ) | const |
Get animation duration in milliseconds
| qreal SARibbonCategory::buttonMaximumAspectRatio | ( | ) | const |
Get button maximum aspect ratio
| SARibbonAlignment SARibbonCategory::categoryAlignment | ( | ) | const |
Get category alignment
|
protected |
Get the category layout
| QString SARibbonCategory::categoryName | ( | ) | const |
Get the category name
|
overrideprotected |
Handle change event
|
overrideprotectedvirtual |
| SARibbonPanel * SARibbonCategory::insertPanel | ( | const QString & | title, |
| int | index | ||
| ) |
Create and insert a new panel at index position
| void SARibbonCategory::insertPanel | ( | SARibbonPanel * | panel, |
| int | index | ||
| ) |
Insert an existing panel at index position
| bool SARibbonCategory::isCanCustomize | ( | ) | const |
Check if customization is allowed
| bool SARibbonCategory::isContextCategory | ( | ) | const |
Check if this is a context category
| bool SARibbonCategory::isEnableShowPanelTitle | ( | ) | const |
Check if panel title bar is displayed
| bool SARibbonCategory::isEnableWordWrap | ( | ) | const |
Check if panel text word wrap is enabled
| bool SARibbonCategory::isUseAnimatingScroll | ( | ) | const |
Check if animation is used when scrolling
| bool SARibbonCategory::iteratePanel | ( | FpPanelIterate | fp | ) | const |
Iterate through all panels
|
protected |
Mark this as a context category
| void SARibbonCategory::movePanel | ( | int | from, |
| int | to | ||
| ) |
Move a panel from one index to another
| SARibbonPanel * SARibbonCategory::panelByIndex | ( | int | index | ) | const |
Find panel by index, returns nullptr if out of range
| SARibbonPanel * SARibbonCategory::panelByName | ( | const QString & | title | ) | const |
Find panel by name
| SARibbonPanel * SARibbonCategory::panelByObjectName | ( | const QString & | objname | ) | const |
Find panel by ObjectName
| int SARibbonCategory::panelCount | ( | ) | const |
Get the number of panels
| int SARibbonCategory::panelIndex | ( | SARibbonPanel * | p | ) | const |
Get the index of a panel
| QSize SARibbonCategory::panelLargeIconSize | ( | ) | const |
Get panel large icon size
| SARibbonPanel::PanelLayoutMode SARibbonCategory::panelLayoutMode | ( | ) | const |
Get the panel layout mode
| QList< SARibbonPanel * > SARibbonCategory::panelList | ( | ) | const |
Get all panels
| QSize SARibbonCategory::panelSmallIconSize | ( | ) | const |
Get panel small icon size
| int SARibbonCategory::panelSpacing | ( | ) | const |
Get panel spacing
| int SARibbonCategory::panelTitleHeight | ( | ) | const |
Get panel title bar height
| QPair< QSize, QSize > SARibbonCategory::panelToolButtonIconSize | ( | ) | const |
Get panel tool button icon sizes
| bool SARibbonCategory::removePanel | ( | int | index | ) |
Remove panel by index
| bool SARibbonCategory::removePanel | ( | SARibbonPanel * | panel | ) |
Remove panel and delete it
| SARibbonBar * SARibbonCategory::ribbonBar | ( | ) | const |
Get the parent ribbonbar, returns null if not managed
| void SARibbonCategory::setAnimationDuration | ( | int | duration | ) |
Set animation duration in milliseconds
|
protected |
Set button maximum aspect ratio
| void SARibbonCategory::setCanCustomize | ( | bool | b | ) |
Set whether customization is allowed
| void SARibbonCategory::setCategoryAlignment | ( | SARibbonAlignment | al | ) |
Set category alignment
| void SARibbonCategory::setCategoryName | ( | const QString & | title | ) |
Set the category name
| void SARibbonCategory::setEnableShowPanelTitle | ( | bool | on | ) |
Set whether to display panel title
|
protected |
Set whether panel button text word wrap is enabled
| void SARibbonCategory::setPanelLargeIconSize | ( | const QSize & | largeSize | ) |
Set panel large icon size
| void SARibbonCategory::setPanelLayoutMode | ( | SARibbonPanel::PanelLayoutMode | m | ) |
Set the panel layout mode
| void SARibbonCategory::setPanelSmallIconSize | ( | const QSize & | smallSize | ) |
Set panel small icon size
| void SARibbonCategory::setPanelSpacing | ( | int | n | ) |
Set panel spacing
| void SARibbonCategory::setPanelTitleHeight | ( | int | h | ) |
Set panel title bar height
| void SARibbonCategory::setPanelToolButtonIconSize | ( | const QSize & | smallSize, |
| const QSize & | largeSize | ||
| ) |
Set panel tool button icon sizes
| void SARibbonCategory::setUseAnimatingScroll | ( | bool | useAnimating | ) |
Set whether to use animation when scrolling
| void SARibbonCategory::setWheelScrollStep | ( | int | step | ) |
Set wheel scroll step in pixels
| bool SARibbonCategory::takePanel | ( | SARibbonPanel * | panel | ) |
Detach panel from SARibbonCategory management
| void SARibbonCategory::updateItemGeometry | ( | ) |
Refresh category layout, call after changing ribbon mode
|
overrideprotected |
Handle wheel event
| int SARibbonCategory::wheelScrollStep | ( | ) | const |
Get wheel scroll step