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

#include <SARibbonPanelLayout.h>

类 SARibbonPanelLayout 继承关系图:

Public 成员函数

 SARibbonPanelLayout (QWidget *p=nullptr)
 Constructor for SARibbonPanelLayout
 
 ~SARibbonPanelLayout ()
 Destructor for SARibbonPanelLayout
 
SARibbonPanelribbonPanel () 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
 
SARibbonPanelItempanelItem (QAction *action) const
 Retrieves the SARibbonPanelItem associated with an action
 
SARibbonPanelItemlastItem () 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
 
SARibbonPanelLabelpanelTitleLabel () 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
 
SARibbonPanelItemcreateItem (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
 

详细描述

构造及析构函数说明

◆ SARibbonPanelLayout()

SARibbonPanelLayout::SARibbonPanelLayout ( QWidget *  p = nullptr)
explicit

Constructor for SARibbonPanelLayout

◆ ~SARibbonPanelLayout()

SARibbonPanelLayout::~SARibbonPanelLayout ( )

Destructor for SARibbonPanelLayout

成员函数说明

◆ addItem()

void SARibbonPanelLayout::addItem ( QLayoutItem *  item)

Adds an item to the layout (SARibbonPanelLayout not supported)

◆ buttonMaximumAspectRatio()

qreal SARibbonPanelLayout::buttonMaximumAspectRatio ( ) const

Maximum aspect ratio of buttons, this coefficient determines the maximum width of buttons

◆ count()

int SARibbonPanelLayout::count ( ) const

Gets the number of items in the layout

◆ createItem()

SARibbonPanelItem * SARibbonPanelLayout::createItem ( QAction *  action,
SARibbonPanelItem::RowProportion  rp = SARibbonPanelItem::None 
)
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

◆ doLayout()

void SARibbonPanelLayout::doLayout ( )
protected

Layout action

◆ expandingDirections()

Qt::Orientations SARibbonPanelLayout::expandingDirections ( ) const

Returns the directions in which the layout can expand

◆ indexByAction()

int SARibbonPanelLayout::indexByAction ( QAction *  action) const

Finds the index of an action in the layout

◆ insertAction()

void SARibbonPanelLayout::insertAction ( int  index,
QAction *  act,
SARibbonPanelItem::RowProportion  rp = SARibbonPanelItem::None 
)

Inserts an action at a specific index

◆ invalidate()

void SARibbonPanelLayout::invalidate ( )

Invalidates the layout, marking it as dirty

◆ isDirty()

bool SARibbonPanelLayout::isDirty ( ) const

Checks if layout needs to be reorganized

◆ isEmpty()

bool SARibbonPanelLayout::isEmpty ( ) const

Checks if the layout is empty

◆ isEnableShowPanelTitle()

bool SARibbonPanelLayout::isEnableShowPanelTitle ( ) const

Checks if the panel's title is enabled for display

Checks if the panel's title is enabled for display / 检查面板标题是否启用显示

返回
true if the title is enabled; otherwise false / 如果标题启用则返回true;否则返回false
参见
setEnableShowPanelTitle

◆ isEnableWordWrap()

bool SARibbonPanelLayout::isEnableWordWrap ( ) const

Check if word wrap is enabled

◆ isHaveOptionAction()

bool SARibbonPanelLayout::isHaveOptionAction ( ) const

Checks if an option action is set

◆ itemAt()

QLayoutItem * SARibbonPanelLayout::itemAt ( int  index) const

QLayout required override functions

◆ largeButtonHeight()

int SARibbonPanelLayout::largeButtonHeight ( ) const

Gets the height of large buttons

Gets the height of large buttons / 获取大按钮的高度

返回
The large button height / 大按钮高度

◆ largeIconSize()

QSize SARibbonPanelLayout::largeIconSize ( ) const

Get large icon size

◆ lastItem()

SARibbonPanelItem * SARibbonPanelLayout::lastItem ( ) const

Gets the last item added to the layout

◆ lastWidget()

QWidget * SARibbonPanelLayout::lastWidget ( ) const

Gets the widget associated with the last item

◆ minimumSize()

QSize SARibbonPanelLayout::minimumSize ( ) const

Get minimum size

◆ move()

void SARibbonPanelLayout::move ( int  from,
int  to 
)

Moves an item from one index to another

◆ optionActionButtonSize()

QSize SARibbonPanelLayout::optionActionButtonSize ( ) const
protected

Gets the size of the option action button

◆ panelItem()

SARibbonPanelItem * SARibbonPanelLayout::panelItem ( QAction *  action) const

Retrieves the SARibbonPanelItem associated with an action

◆ panelTitleHeight()

int SARibbonPanelLayout::panelTitleHeight ( ) const

Gets the height of the panel's title

◆ panelTitleLabel()

SARibbonPanelLabel * SARibbonPanelLayout::panelTitleLabel ( ) const

Gets the panel's title label

◆ panelTitleSpace()

int SARibbonPanelLayout::panelTitleSpace ( ) const

Gets the spacing between the title and the buttons

◆ recalcExpandGeomArray()

void SARibbonPanelLayout::recalcExpandGeomArray ( const QRect &  setrect)
protected

Recalculate expansion bar code, this function must be called after updateGeomArray function

< 原来的列宽

< 列的最大宽度

< 扩展后列的宽度

◆ ribbonPanel()

SARibbonPanel * SARibbonPanelLayout::ribbonPanel ( ) const

Gets the SARibbonPanel that owns this layout

◆ setButtonMaximumAspectRatio()

void SARibbonPanelLayout::setButtonMaximumAspectRatio ( qreal  fac = 1.4)
protected

Set maximum aspect ratio of buttons, this coefficient determines the maximum width of buttons

◆ setEnableShowPanelTitle()

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 / 设置面板标题是否启用显示

参数
onIf true, the title is enabled / 如果为true,则启用标题
参见
isEnableShowPanelTitle

◆ setEnableWordWrap()

void SARibbonPanelLayout::setEnableWordWrap ( bool  on)
protected

Set text wrap enabled

◆ setLargeIconSize()

void SARibbonPanelLayout::setLargeIconSize ( const QSize &  largeSize)

Large button icon size

◆ setOptionAction()

void SARibbonPanelLayout::setOptionAction ( QAction *  action)

Sets the option action for the panel

◆ setPanelTitleHeight()

void SARibbonPanelLayout::setPanelTitleHeight ( int  newTitleHeight)

Sets the height of the panel's title

◆ setPanelTitleSpace()

void SARibbonPanelLayout::setPanelTitleSpace ( int  newTitleSpace)

Sets the spacing between the title and the buttons

◆ setSmallIconSize()

void SARibbonPanelLayout::setSmallIconSize ( const QSize &  largeSize)

Small button icon size

◆ setToolButtonIconSize()

void SARibbonPanelLayout::setToolButtonIconSize ( const QSize &  smallSize,
const QSize &  largeSize 
)

Sets the default icon size for tool buttons

◆ sizeHint()

QSize SARibbonPanelLayout::sizeHint ( ) const

Get size hint

◆ smallIconSize()

QSize SARibbonPanelLayout::smallIconSize ( ) const

Get small icon size

◆ takeAt()

QLayoutItem * SARibbonPanelLayout::takeAt ( int  index)

Removes and returns the item at the specified index

◆ toolButtonIconSize()

QPair< QSize, QSize > SARibbonPanelLayout::toolButtonIconSize ( ) const

Gets the default icon size for tool buttons

◆ updateGeomArray() [1/2]

void SARibbonPanelLayout::updateGeomArray ( )

Updates size

◆ updateGeomArray() [2/2]

void SARibbonPanelLayout::updateGeomArray ( const QRect &  setrect)
protected

Update geometry array


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