![]() |
SARibbon 2.5.2
SARibbon wiki
|
#include <SARibbonPanelLayout.h>
Public 成员函数 | |
| SARibbonPanelLayout (QWidget *p=nullptr) | |
| Constructor for SARibbonPanelLayout | |
| ~SARibbonPanelLayout () | |
| Destructor for SARibbonPanelLayout | |
| SARibbonPanel * | ribbonPanel () const |
| Gets the SARibbonPanel that owns this layout | |
| void | insertAction (int index, QAction *act, SARibbonPanelItem::RowProportion rp=SARibbonPanelItem::None) |
| Inserts an action at a specific index | |
| void | setOptionAction (QAction *action) |
| Sets the option action for the panel | |
| bool | isHaveOptionAction () const |
| Checks if an option action is set | |
| SARibbonPanelItem * | panelItem (QAction *action) const |
| Retrieves the SARibbonPanelItem associated with an action | |
| SARibbonPanelItem * | lastItem () const |
| Gets the last item added to the layout | |
| QWidget * | lastWidget () const |
| Gets the widget associated with the last item | |
| void | move (int from, int to) |
| Moves an item from one index to another | |
| bool | isDirty () const |
| Checks if layout needs to be reorganized | |
| void | updateGeomArray () |
| Updates size | |
| int | indexByAction (QAction *action) const |
| Finds the index of an action in the layout | |
| int | panelTitleHeight () const |
| Gets the height of the panel's title | |
| void | setPanelTitleHeight (int newTitleHeight) |
| Sets the height of the panel's title | |
| bool | isEnableShowPanelTitle () const |
| Checks if the panel's title is enabled for display | |
| void | setEnableShowPanelTitle (bool on) |
| Sets whether the panel's title is enabled for display | |
| int | largeButtonHeight () const |
| Gets the height of large buttons | |
| int | panelTitleSpace () const |
| Gets the spacing between the title and the buttons | |
| void | setPanelTitleSpace (int newTitleSpace) |
| Sets the spacing between the title and the buttons | |
| SARibbonPanelLabel * | panelTitleLabel () const |
| Gets the panel's title label | |
| void | setToolButtonIconSize (const QSize &smallSize, const QSize &largeSize) |
| Sets the default icon size for tool buttons | |
| QPair< QSize, QSize > | toolButtonIconSize () const |
| Gets the default icon size for tool buttons | |
| void | setLargeIconSize (const QSize &largeSize) |
| Large button icon size | |
| QSize | largeIconSize () const |
| Get large icon size | |
| void | setSmallIconSize (const QSize &largeSize) |
| Small button icon size | |
| QSize | smallIconSize () const |
| Get small icon size | |
| bool | isEnableWordWrap () const |
| Check if word wrap is enabled | |
| qreal | buttonMaximumAspectRatio () const |
| Maximum aspect ratio of buttons, this coefficient determines the maximum width of buttons | |
| void | addItem (QLayoutItem *item) Q_DECL_OVERRIDE |
| Adds an item to the layout (SARibbonPanelLayout not supported) | |
| QLayoutItem * | itemAt (int index) const Q_DECL_OVERRIDE |
| QLayout required override functions | |
| QLayoutItem * | takeAt (int index) Q_DECL_OVERRIDE |
| Removes and returns the item at the specified index | |
| int | count () const Q_DECL_OVERRIDE |
| Gets the number of items in the layout | |
| bool | isEmpty () const Q_DECL_OVERRIDE |
| Checks if the layout is empty | |
| void | invalidate () Q_DECL_OVERRIDE |
| Invalidates the layout, marking it as dirty | |
| Qt::Orientations | expandingDirections () const Q_DECL_OVERRIDE |
| Returns the directions in which the layout can expand | |
| void | setGeometry (const QRect &rect) Q_DECL_OVERRIDE |
| Set geometry | |
| QSize | minimumSize () const Q_DECL_OVERRIDE |
| Get minimum size | |
| QSize | sizeHint () const Q_DECL_OVERRIDE |
| Get size hint | |
Protected 成员函数 | |
| QSize | optionActionButtonSize () const |
| Gets the size of the option action button | |
| void | doLayout () |
| Layout action | |
| SARibbonPanelItem * | createItem (QAction *action, SARibbonPanelItem::RowProportion rp=SARibbonPanelItem::None) |
| void | updateGeomArray (const QRect &setrect) |
| Update geometry array | |
| void | recalcExpandGeomArray (const QRect &setrect) |
| Recalculate expansion bar code, this function must be called after updateGeomArray function | |
| void | setEnableWordWrap (bool on) |
| Set text wrap enabled | |
| void | setButtonMaximumAspectRatio (qreal fac=1.4) |
| Set maximum aspect ratio of buttons, this coefficient determines the maximum width of buttons | |
友元 | |
| class | SARibbonPanel |
|
explicit |
Constructor for SARibbonPanelLayout
| SARibbonPanelLayout::~SARibbonPanelLayout | ( | ) |
Destructor for SARibbonPanelLayout
| void SARibbonPanelLayout::addItem | ( | QLayoutItem * | item | ) |
Adds an item to the layout (SARibbonPanelLayout not supported)
| qreal SARibbonPanelLayout::buttonMaximumAspectRatio | ( | ) | const |
Maximum aspect ratio of buttons, this coefficient determines the maximum width of buttons
| int SARibbonPanelLayout::count | ( | ) | const |
Gets the number of items in the layout
|
protected |
Convert action to item, for pure Action, this function will create SARibbonToolButton rp is used to tell Layout what kind of window to generate, see SARibbonPanelItem::RowProportion for details
|
protected |
Layout action
| Qt::Orientations SARibbonPanelLayout::expandingDirections | ( | ) | const |
Returns the directions in which the layout can expand
| int SARibbonPanelLayout::indexByAction | ( | QAction * | action | ) | const |
Finds the index of an action in the layout
| void SARibbonPanelLayout::insertAction | ( | int | index, |
| QAction * | act, | ||
| SARibbonPanelItem::RowProportion | rp = SARibbonPanelItem::None |
||
| ) |
Inserts an action at a specific index
| void SARibbonPanelLayout::invalidate | ( | ) |
Invalidates the layout, marking it as dirty
| bool SARibbonPanelLayout::isDirty | ( | ) | const |
Checks if layout needs to be reorganized
| bool SARibbonPanelLayout::isEmpty | ( | ) | const |
Checks if the layout is empty
| bool SARibbonPanelLayout::isEnableShowPanelTitle | ( | ) | const |
Checks if the panel's title is enabled for display
Checks if the panel's title is enabled for display / 检查面板标题是否启用显示
| bool SARibbonPanelLayout::isEnableWordWrap | ( | ) | const |
Check if word wrap is enabled
| bool SARibbonPanelLayout::isHaveOptionAction | ( | ) | const |
Checks if an option action is set
| QLayoutItem * SARibbonPanelLayout::itemAt | ( | int | index | ) | const |
QLayout required override functions
| int SARibbonPanelLayout::largeButtonHeight | ( | ) | const |
Gets the height of large buttons
Gets the height of large buttons / 获取大按钮的高度
| QSize SARibbonPanelLayout::largeIconSize | ( | ) | const |
Get large icon size
| SARibbonPanelItem * SARibbonPanelLayout::lastItem | ( | ) | const |
Gets the last item added to the layout
| QWidget * SARibbonPanelLayout::lastWidget | ( | ) | const |
Gets the widget associated with the last item
| QSize SARibbonPanelLayout::minimumSize | ( | ) | const |
Get minimum size
| void SARibbonPanelLayout::move | ( | int | from, |
| int | to | ||
| ) |
Moves an item from one index to another
|
protected |
Gets the size of the option action button
| SARibbonPanelItem * SARibbonPanelLayout::panelItem | ( | QAction * | action | ) | const |
Retrieves the SARibbonPanelItem associated with an action
| int SARibbonPanelLayout::panelTitleHeight | ( | ) | const |
Gets the height of the panel's title
| SARibbonPanelLabel * SARibbonPanelLayout::panelTitleLabel | ( | ) | const |
Gets the panel's title label
| int SARibbonPanelLayout::panelTitleSpace | ( | ) | const |
Gets the spacing between the title and the buttons
|
protected |
Recalculate expansion bar code, this function must be called after updateGeomArray function
< 原来的列宽
< 列的最大宽度
< 扩展后列的宽度
| SARibbonPanel * SARibbonPanelLayout::ribbonPanel | ( | ) | const |
Gets the SARibbonPanel that owns this layout
|
protected |
Set maximum aspect ratio of buttons, this coefficient determines the maximum width of buttons
| void SARibbonPanelLayout::setEnableShowPanelTitle | ( | bool | on | ) |
Sets whether the panel's title is enabled for display
Sets whether the panel's title is enabled for display / 设置面板标题是否启用显示
| on | If true, the title is enabled / 如果为true,则启用标题 |
|
protected |
Set text wrap enabled
| void SARibbonPanelLayout::setLargeIconSize | ( | const QSize & | largeSize | ) |
Large button icon size
| void SARibbonPanelLayout::setOptionAction | ( | QAction * | action | ) |
Sets the option action for the panel
| void SARibbonPanelLayout::setPanelTitleHeight | ( | int | newTitleHeight | ) |
Sets the height of the panel's title
| void SARibbonPanelLayout::setPanelTitleSpace | ( | int | newTitleSpace | ) |
Sets the spacing between the title and the buttons
| void SARibbonPanelLayout::setSmallIconSize | ( | const QSize & | largeSize | ) |
Small button icon size
| void SARibbonPanelLayout::setToolButtonIconSize | ( | const QSize & | smallSize, |
| const QSize & | largeSize | ||
| ) |
Sets the default icon size for tool buttons
| QSize SARibbonPanelLayout::sizeHint | ( | ) | const |
Get size hint
| QSize SARibbonPanelLayout::smallIconSize | ( | ) | const |
Get small icon size
| QLayoutItem * SARibbonPanelLayout::takeAt | ( | int | index | ) |
Removes and returns the item at the specified index
| QPair< QSize, QSize > SARibbonPanelLayout::toolButtonIconSize | ( | ) | const |
Gets the default icon size for tool buttons
| void SARibbonPanelLayout::updateGeomArray | ( | ) |
Updates size
|
protected |
Update geometry array