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

#include <SARibbonCategoryLayout.h>

类 SARibbonCategoryLayout 继承关系图:

class  PrivateData
 

Public 成员函数

 SARibbonCategoryLayout (SARibbonCategory *parent)
 Constructor for SARibbonCategoryLayout
 
 ~SARibbonCategoryLayout ()
 Destructor for SARibbonCategoryLayout
 
SARibbonCategoryribbonCategory () 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)
 
SARibbonCategoryLayoutItemtakePanelItem (int index)
 Take the panel item at the specified index
 
SARibbonCategoryLayoutItemtakePanelItem (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
 
SARibbonPanelpanelByObjectName (const QString &objname) const
 Find a panel by its object name
 
SARibbonPanelpanelByName (const QString &panelname) const
 Find a panel by its name
 
SARibbonPanelpanelByIndex (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
 

详细描述

成员函数说明

◆ animationDuration()

int SARibbonCategoryLayout::animationDuration ( ) const

Get the duration of the animation

◆ categoryAlignment()

SARibbonAlignment SARibbonCategoryLayout::categoryAlignment ( ) const

Get the alignment of the category

◆ categoryContentSize()

QSize SARibbonCategoryLayout::categoryContentSize ( ) const

Get the content size of the category

◆ categoryTotalWidth()

int SARibbonCategoryLayout::categoryTotalWidth ( ) const

Get the total width of the content

◆ doLayout()

void SARibbonCategoryLayout::doLayout ( )

Execute layout adjustment

这里不能用item->setGeometry(item->mWillSetGeometry);这样会得到一个很奇怪的显示效果 就是窗口的最左边不会移出去,而是把最右边压缩,

◆ expandingDirections()

Qt::Orientations SARibbonCategoryLayout::expandingDirections ( ) const
override

Get the expanding directions of the layout (overridden from QLayout)

◆ insertPanel()

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

Insert a panel at the specified index

◆ isAnimatingScroll()

bool SARibbonCategoryLayout::isAnimatingScroll ( ) const

Check if scrolling animation is in progress

◆ isScrolled()

bool SARibbonCategoryLayout::isScrolled ( ) const

Check if the layout has been scrolled

◆ itemAt()

QLayoutItem * SARibbonCategoryLayout::itemAt ( int  index) const
overridevirtual

Get the layout item at the specified index (overridden from QLayout)

◆ movePanel()

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

Move a panel from one position to another

◆ panelByIndex()

SARibbonPanel * SARibbonCategoryLayout::panelByIndex ( int  i) const

Find a panel by its index

◆ panelByName()

SARibbonPanel * SARibbonCategoryLayout::panelByName ( const QString &  panelname) const

Find a panel by its name

◆ panelByObjectName()

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

Find a panel by its object name

◆ panelCount()

int SARibbonCategoryLayout::panelCount ( ) const

Get the number of panels

◆ panelIndex()

int SARibbonCategoryLayout::panelIndex ( SARibbonPanel p) const

Find the index of a panel

◆ panelList()

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

Get all panels in the layout

◆ panels()

QList< SARibbonPanel * > SARibbonCategoryLayout::panels ( ) const

Get all panels in the layout

◆ scroll()

void SARibbonCategoryLayout::scroll ( int  px)

Execute scrolling

◆ scrollByAnimate()

void SARibbonCategoryLayout::scrollByAnimate ( int  px)

Animate scrolling by a specified distance

◆ scrollPosition()

int SARibbonCategoryLayout::scrollPosition ( ) const

Get the current scroll position

◆ scrollTo()

void SARibbonCategoryLayout::scrollTo ( int  targetX)

Scroll to a specified position

◆ scrollToByAnimate()

void SARibbonCategoryLayout::scrollToByAnimate ( int  targetX)

Animate scrolling to a specified position

◆ setAnimationDuration()

void SARibbonCategoryLayout::setAnimationDuration ( int  duration)

Set the duration of the animation

◆ setCategoryAlignment()

void SARibbonCategoryLayout::setCategoryAlignment ( SARibbonAlignment  al)

Set the alignment of the category

◆ setScrollPosition()

void SARibbonCategoryLayout::setScrollPosition ( int  pos)

Set the scroll position

◆ takeAt()

QLayoutItem * SARibbonCategoryLayout::takeAt ( int  index)
overridevirtual

Take the layout item at the specified index (overridden from QLayout)

◆ takePanel()

bool SARibbonCategoryLayout::takePanel ( SARibbonPanel panel)

Remove a panel and its separator

◆ updateGeometryArr()

void SARibbonCategoryLayout::updateGeometryArr ( )

Update geometry of the layout


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