SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::ui::RibbonGroup Class Reference

#include <ribbongroup.h>

Inheritance diagram for openswmmvis::ui::RibbonGroup:
Collaboration diagram for openswmmvis::ui::RibbonGroup:

Public Member Functions

 RibbonGroup (const QString &caption, QWidget *parent=nullptr)
 
QString caption () const
 
QToolButton * addAction (QAction *action, const QString &shortLabel=QString())
 
RibbonSplitButtonaddFamily (const QString &familyId, const QList< QAction * > &members)
 
void addWidget (QWidget *widget, int stretch=0)
 
QToolButton * buttonForAction (const QAction *action) const
 
void setMode (RibbonMode mode)
 
RibbonMode mode () const
 
int widthForMode (RibbonMode m) const
 
RibbonGroupWidths groupWidths () const
 
void refreshWidth ()
 
bool isCollapsible () const
 
QList< QAction * > groupActions () const
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 

Protected Member Functions

void changeEvent (QEvent *event) override
 

Constructor & Destructor Documentation

◆ RibbonGroup()

openswmmvis::ui::RibbonGroup::RibbonGroup ( const QString &  caption,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ addAction()

QToolButton * openswmmvis::ui::RibbonGroup::addAction ( QAction *  action,
const QString &  shortLabel = QString() 
)

Add one action button. shortLabel overrides the button-face text (stored as the action's iconText — Qt's native short-label channel, so menus keep the full text) when the menu text is too long for a ribbon face.

◆ addFamily()

RibbonSplitButton * openswmmvis::ui::RibbonGroup::addFamily ( const QString &  familyId,
const QList< QAction * > &  members 
)

Add a last-used split button for a family of related actions (persisted per familyId — see RibbonSplitButton).

◆ addWidget()

void openswmmvis::ui::RibbonGroup::addWidget ( QWidget *  widget,
int  stretch = 0 
)

Adopt a member widget (combo, slider…). Marks the group non-collapsible.

◆ buttonForAction()

QToolButton * openswmmvis::ui::RibbonGroup::buttonForAction ( const QAction *  action) const

The button hosting action (plain button or split-button face/ member) — for attaching menus, e.g. the Plot-Profile dropdown.

◆ caption()

QString openswmmvis::ui::RibbonGroup::caption ( ) const
inline
Here is the caller graph for this function:

◆ changeEvent()

void openswmmvis::ui::RibbonGroup::changeEvent ( QEvent *  event)
overrideprotected

◆ groupActions()

QList< QAction * > openswmmvis::ui::RibbonGroup::groupActions ( ) const
inline

Actions surfaced in the collapsed popup (creation order).

◆ groupWidths()

RibbonGroupWidths openswmmvis::ui::RibbonGroup::groupWidths ( ) const

All three widths + collapsibility, ready for the solver.

Here is the call graph for this function:

◆ isCollapsible()

bool openswmmvis::ui::RibbonGroup::isCollapsible ( ) const
inline

◆ minimumSizeHint()

QSize openswmmvis::ui::RibbonGroup::minimumSizeHint ( ) const
override
Here is the call graph for this function:

◆ mode()

RibbonMode openswmmvis::ui::RibbonGroup::mode ( ) const
inline
Here is the caller graph for this function:

◆ refreshWidth()

void openswmmvis::ui::RibbonGroup::refreshWidth ( )
inline

Drop the cached widths and announce the new hint — call after a hosted widget's contents change size contextually (e.g. the mesh editing clusters showing/hiding with the selection).

◆ setMode()

void openswmmvis::ui::RibbonGroup::setMode ( RibbonMode  mode)
Here is the call graph for this function:

◆ sizeHint()

QSize openswmmvis::ui::RibbonGroup::sizeHint ( ) const
override

Authoritative hints from the direct child measurement (widthForMode) instead of the nested-layout totals: the cache chain between the buttons and this widget breaks when a host toolbar hides the group (hidden widgets can't push updateGeometry), which would leave the host judging the group by a stale mode's width forever.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ widthForMode()

int openswmmvis::ui::RibbonGroup::widthForMode ( RibbonMode  m) const

Measured row width under m (cached until the group's contents or font change; widget-hosting groups report one width for every mode).

Here is the caller graph for this function:

The documentation for this class was generated from the following files: