#include <SARibbonCustomizeWidget.h>
|
| | SARibbonCustomizeWidget (SARibbonMainWindow *ribbonWindow, QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags()) |
| | Constructor using SARibbonMainWindow
|
| |
|
| SARibbonCustomizeWidget (SARibbonBar *ribbonbar, QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags()) |
| | Constructor using SARibbonBar directly
|
| |
| void | setupActionsManager (SARibbonActionsManager *mgr) |
| | Set the action manager
|
| |
| bool | isApplied () const |
| | Check if there is content to store, corresponding to save action
|
| |
| bool | isCached () const |
| | Check if there are modified contents, corresponding to apply action
|
| |
| const QStandardItemModel * | model () const |
| | Get the model
|
| |
| void | updateModel () |
| | Update model based on current radiobutton selection
|
| |
| void | updateModel (RibbonTreeShowType type) |
| | Update model with specified type
|
| |
| bool | applys () |
| | Apply all settings
|
| |
| bool | toXml (QXmlStreamWriter *xml) const |
| | Convert to XML
|
| |
| bool | toXml (const QString &xmlpath) const |
| | Convert to XML file
|
| |
| void | fromXml (QXmlStreamReader *xml) |
| | Load from XML, for file-based settings, it is recommended to call this function before the dialog is displayed
|
| |
| void | fromXml (const QString &xmlpath) |
| | Load from XML file
|
| |
| void | makeActionsApplied () |
| | Cache applied actions, these actions will not be cleared by clear(), used for local storage
|
| |
| void | clearApplied () |
| | Clear applied actions, need to clear applied actions after cancel operation
|
| |
| void | clearCache () |
| | Clear cached actions, after executing applys function, if you want to continue calling, you should clear, otherwise it will cause exceptions
|
| |
| void | clear () |
| | Clear all actions, excluding locally read data
|
| |
|
| void | simplify () |
| | Simplify QList<SARibbonCustomizeData>, merge some actions
|
| |
| SARibbonPanelItem::RowProportion | selectedRowProportion () const |
| | Get the row proportion selected in the current interface
|
| |
| QAction * | selectedAction () const |
| | Get the action selected in listview
|
| |
| QAction * | itemToAction (QStandardItem *item) const |
| | Convert item to action
|
| |
| QStandardItem * | selectedItem () const |
| | Get the selected item in ribbon tree
|
| |
| int | selectedRibbonLevel () const |
| | Get the level of selected ribbon tree item
|
| |
| int | itemLevel (QStandardItem *item) const |
| | Get the level based on selected item
|
| |
| void | setSelectItem (QStandardItem *item, bool ensureVisible=true) |
| | Set an item to be selected
|
| |
| bool | isItemCanCustomize (QStandardItem *item) const |
| | Check if item can be customized
|
| |
|
bool | isSelectedItemCanCustomize () const |
| |
| bool | isCustomizeItem (QStandardItem *item) const |
| | Check if item is a customize item
|
| |
|
bool | isSelectedItemIsCustomize () const |
| |
|
void | removeItem (QStandardItem *item) |
| | Remove an item
|
| |
◆ ItemRole
| 枚举值 |
|---|
| LevelRole | Level: 0=category, 1=panel, 2=item
|
| PointerRole | Pointer storage, cast based on LevelRole
|
| CanCustomizeRole | Whether this item can be customized (bool)
|
| CustomizeRole | Whether this is a custom item (bool), mainly for self-added tabs and panels
|
| CustomizeObjNameRole | Temporary custom content object name (QString)
|
◆ RibbonTreeShowType
| 枚举值 |
|---|
| ShowAllCategory | Show all categories including context categories
|
| ShowMainCategory | Show main categories only, excluding context categories
|
◆ SARibbonCustomizeWidget()
| SARibbonCustomizeWidget::SARibbonCustomizeWidget |
( |
SARibbonMainWindow * |
ribbonWindow, |
|
|
QWidget * |
parent = nullptr, |
|
|
Qt::WindowFlags |
f = Qt::WindowFlags() |
|
) |
| |
|
explicit |
◆ applys()
| bool SARibbonCustomizeWidget::applys |
( |
| ) |
|
◆ clear()
| void SARibbonCustomizeWidget::clear |
( |
| ) |
|
Clear all actions, excluding locally read data
◆ clearApplied()
| void SARibbonCustomizeWidget::clearApplied |
( |
| ) |
|
Clear applied actions, need to clear applied actions after cancel operation
◆ clearCache()
| void SARibbonCustomizeWidget::clearCache |
( |
| ) |
|
Clear cached actions, after executing applys function, if you want to continue calling, you should clear, otherwise it will cause exceptions
◆ fromXml() [1/3]
| void SARibbonCustomizeWidget::fromXml |
( |
const QString & |
xmlpath | ) |
|
◆ fromXml() [2/3]
| void SARibbonCustomizeWidget::fromXml |
( |
QXmlStreamReader * |
xml | ) |
|
Load from XML, for file-based settings, it is recommended to call this function before the dialog is displayed
◆ fromXml() [3/3]
◆ isApplied()
| bool SARibbonCustomizeWidget::isApplied |
( |
| ) |
const |
Check if there is content to store, corresponding to save action
◆ isCached()
| bool SARibbonCustomizeWidget::isCached |
( |
| ) |
const |
Check if there are modified contents, corresponding to apply action
◆ isCustomizeItem()
| bool SARibbonCustomizeWidget::isCustomizeItem |
( |
QStandardItem * |
item | ) |
const |
|
protected |
Check if item is a customize item
◆ isItemCanCustomize()
| bool SARibbonCustomizeWidget::isItemCanCustomize |
( |
QStandardItem * |
item | ) |
const |
|
protected |
Check if item can be customized
◆ itemLevel()
| int SARibbonCustomizeWidget::itemLevel |
( |
QStandardItem * |
item | ) |
const |
|
protected |
Get the level based on selected item
◆ itemToAction()
| QAction * SARibbonCustomizeWidget::itemToAction |
( |
QStandardItem * |
item | ) |
const |
|
protected |
◆ makeActionsApplied()
| void SARibbonCustomizeWidget::makeActionsApplied |
( |
| ) |
|
Cache applied actions, these actions will not be cleared by clear(), used for local storage
◆ model()
| const QStandardItemModel * SARibbonCustomizeWidget::model |
( |
| ) |
const |
◆ selectedAction()
| QAction * SARibbonCustomizeWidget::selectedAction |
( |
| ) |
const |
|
protected |
Get the action selected in listview
◆ selectedItem()
| QStandardItem * SARibbonCustomizeWidget::selectedItem |
( |
| ) |
const |
|
protected |
Get the selected item in ribbon tree
◆ selectedRibbonLevel()
| int SARibbonCustomizeWidget::selectedRibbonLevel |
( |
| ) |
const |
|
protected |
Get the level of selected ribbon tree item
◆ selectedRowProportion()
Get the row proportion selected in the current interface
◆ setSelectItem()
| void SARibbonCustomizeWidget::setSelectItem |
( |
QStandardItem * |
item, |
|
|
bool |
ensureVisible = true |
|
) |
| |
|
protected |
Set an item to be selected
◆ setupActionsManager()
◆ simplify()
| void SARibbonCustomizeWidget::simplify |
( |
| ) |
|
|
protected |
Simplify QList<SARibbonCustomizeData>, merge some actions
◆ toXml() [1/2]
| bool SARibbonCustomizeWidget::toXml |
( |
const QString & |
xmlpath | ) |
const |
◆ toXml() [2/2]
| bool SARibbonCustomizeWidget::toXml |
( |
QXmlStreamWriter * |
xml | ) |
const |
◆ updateModel() [1/2]
| void SARibbonCustomizeWidget::updateModel |
( |
| ) |
|
Update model based on current radiobutton selection
◆ updateModel() [2/2]
Update model with specified type
该类的文档由以下文件生成:
- /home/runner/work/SARibbon/SARibbon/src/SARibbonBar/SARibbonCustomizeWidget.h
- /home/runner/work/SARibbon/SARibbon/src/SARibbonBar/SARibbonCustomizeWidget.cpp