![]() |
SARibbon 2.5.2
SARibbon wiki
|
#include <SARibbonCategoryLayout.h>
类 | |
| class | PrivateData |
Public 成员函数 | |
| SARibbonCategoryLayout (SARibbonCategory *parent) | |
| Constructor for SARibbonCategoryLayout | |
| ~SARibbonCategoryLayout () | |
| Destructor for SARibbonCategoryLayout | |
| SARibbonCategory * | ribbonCategory () const |
| Get the parent SARibbonCategory | |
| virtual void | addItem (QLayoutItem *item) override |
| Add a layout item (overridden from QLayout) | |
| virtual QLayoutItem * | itemAt (int index) const override |
| Get the layout item at the specified index (overridden from QLayout) | |
| virtual QLayoutItem * | takeAt (int index) override |
| Take the layout item at the specified index (overridden from QLayout) | |
| SARibbonCategoryLayoutItem * | takePanelItem (int index) |
| Take the panel item at the specified index | |
| SARibbonCategoryLayoutItem * | takePanelItem (SARibbonPanel *panel) |
| Take the panel item for the specified panel | |
| bool | takePanel (SARibbonPanel *panel) |
| Remove a panel and its separator | |
| virtual int | count () const override |
| Get the number of layout items (overridden from QLayout) | |
| void | setGeometry (const QRect &rect) override |
| Set the geometry of the layout (overridden from QLayout) | |
| QSize | sizeHint () const override |
| Get the size hint of the layout (overridden from QLayout) | |
| QSize | minimumSize () const override |
| Get the minimum size of the layout (overridden from QLayout) | |
| Qt::Orientations | expandingDirections () const override |
| Get the expanding directions of the layout (overridden from QLayout) | |
| void | invalidate () override |
| Invalidate the layout (overridden from QLayout) | |
| void | addPanel (SARibbonPanel *panel) |
| Add a panel to the layout | |
| void | insertPanel (int index, SARibbonPanel *panel) |
| Insert a panel at the specified index | |
| QSize | categoryContentSize () const |
| Get the content size of the category | |
| void | updateGeometryArr () |
| Update geometry of the layout | |
| void | doLayout () |
| Execute layout adjustment | |
| QList< SARibbonPanel * > | panels () const |
| Get all panels in the layout | |
| SARibbonPanel * | panelByObjectName (const QString &objname) const |
| Find a panel by its object name | |
| SARibbonPanel * | panelByName (const QString &panelname) const |
| Find a panel by its name | |
| SARibbonPanel * | panelByIndex (int i) const |
| Find a panel by its index | |
| void | movePanel (int from, int to) |
| Move a panel from one position to another | |
| int | panelCount () const |
| Get the number of panels | |
| int | panelIndex (SARibbonPanel *p) const |
| Find the index of a panel | |
| QList< SARibbonPanel * > | panelList () const |
| Get all panels in the layout | |
| void | scroll (int px) |
| Execute scrolling | |
| void | scrollTo (int targetX) |
| Scroll to a specified position | |
| void | scrollByAnimate (int px) |
| Animate scrolling by a specified distance | |
| void | scrollToByAnimate (int targetX) |
| Animate scrolling to a specified position | |
| int | scrollPosition () const |
| Get the current scroll position | |
| void | setScrollPosition (int pos) |
| Set the scroll position | |
| bool | isAnimatingScroll () const |
| Check if scrolling animation is in progress | |
| bool | isScrolled () const |
| Check if the layout has been scrolled | |
| int | categoryTotalWidth () const |
| Get the total width of the content | |
| void | setCategoryAlignment (SARibbonAlignment al) |
| Set the alignment of the category | |
| SARibbonAlignment | categoryAlignment () const |
| Get the alignment of the category | |
| void | setAnimationDuration (int duration) |
| Set the duration of the animation | |
| int | animationDuration () const |
| Get the duration of the animation | |
属性 | |
| int | scrollPosition |
| int SARibbonCategoryLayout::animationDuration | ( | ) | const |
Get the duration of the animation
| SARibbonAlignment SARibbonCategoryLayout::categoryAlignment | ( | ) | const |
Get the alignment of the category
| QSize SARibbonCategoryLayout::categoryContentSize | ( | ) | const |
Get the content size of the category
| int SARibbonCategoryLayout::categoryTotalWidth | ( | ) | const |
Get the total width of the content
| void SARibbonCategoryLayout::doLayout | ( | ) |
Execute layout adjustment
这里不能用item->setGeometry(item->mWillSetGeometry);这样会得到一个很奇怪的显示效果 就是窗口的最左边不会移出去,而是把最右边压缩,
|
override |
Get the expanding directions of the layout (overridden from QLayout)
| void SARibbonCategoryLayout::insertPanel | ( | int | index, |
| SARibbonPanel * | panel | ||
| ) |
Insert a panel at the specified index
| bool SARibbonCategoryLayout::isAnimatingScroll | ( | ) | const |
Check if scrolling animation is in progress
| bool SARibbonCategoryLayout::isScrolled | ( | ) | const |
Check if the layout has been scrolled
|
overridevirtual |
Get the layout item at the specified index (overridden from QLayout)
| void SARibbonCategoryLayout::movePanel | ( | int | from, |
| int | to | ||
| ) |
Move a panel from one position to another
| SARibbonPanel * SARibbonCategoryLayout::panelByIndex | ( | int | i | ) | const |
Find a panel by its index
| SARibbonPanel * SARibbonCategoryLayout::panelByName | ( | const QString & | panelname | ) | const |
Find a panel by its name
| SARibbonPanel * SARibbonCategoryLayout::panelByObjectName | ( | const QString & | objname | ) | const |
Find a panel by its object name
| int SARibbonCategoryLayout::panelCount | ( | ) | const |
Get the number of panels
| int SARibbonCategoryLayout::panelIndex | ( | SARibbonPanel * | p | ) | const |
Find the index of a panel
| QList< SARibbonPanel * > SARibbonCategoryLayout::panelList | ( | ) | const |
Get all panels in the layout
| QList< SARibbonPanel * > SARibbonCategoryLayout::panels | ( | ) | const |
Get all panels in the layout
| void SARibbonCategoryLayout::scroll | ( | int | px | ) |
Execute scrolling
| void SARibbonCategoryLayout::scrollByAnimate | ( | int | px | ) |
Animate scrolling by a specified distance
| int SARibbonCategoryLayout::scrollPosition | ( | ) | const |
Get the current scroll position
| void SARibbonCategoryLayout::scrollTo | ( | int | targetX | ) |
Scroll to a specified position
| void SARibbonCategoryLayout::scrollToByAnimate | ( | int | targetX | ) |
Animate scrolling to a specified position
| void SARibbonCategoryLayout::setAnimationDuration | ( | int | duration | ) |
Set the duration of the animation
| void SARibbonCategoryLayout::setCategoryAlignment | ( | SARibbonAlignment | al | ) |
Set the alignment of the category
| void SARibbonCategoryLayout::setScrollPosition | ( | int | pos | ) |
Set the scroll position
|
overridevirtual |
Take the layout item at the specified index (overridden from QLayout)
| bool SARibbonCategoryLayout::takePanel | ( | SARibbonPanel * | panel | ) |
Remove a panel and its separator
| void SARibbonCategoryLayout::updateGeometryArr | ( | ) |
Update geometry of the layout