NDEVR
API Documentation
BuildRibbonGroup

A ribbon group that provides quick-access buttons for common build actions within the Developer module UI. More...

Inheritance diagram for BuildRibbonGroup:
[legend]
Collaboration diagram for BuildRibbonGroup:
[legend]

Public Member Functions

 BuildRibbonGroup (QTModelManager *manager, QWidget *parent=nullptr)
 Constructs the build ribbon group.
ButtonworkflowButton ()
 Returns the workflow button for triggering build workflows.
Public Member Functions inherited from RibbonGroup
 RibbonGroup (QWidget *parent=nullptr)
 Constructs a ribbon group widget.
RibbonSubGroupaddSubGroup (const TranslatedString &sub_group_name)
 Adds a new sub-group with the given name.
void addSubGroup (QWidget *sub_group)
 Adds an existing widget as a sub-group.
void adjustButtonsToFit (int primary, int secondary)
 Adjusts button sizes and states to fit within the given dimensions.
void cleanupEmpty ()
 Removes any empty sub-groups.
int currentPrimaryDimension () const
 Returns the current size along the primary layout axis (width or height).
int currentSecondaryDimension () const
 Returns the current size along the secondary layout axis.
bool hasSubGroup (const TranslatedString &sub_group) const
 Checks whether a sub-group with the given name exists.
bool isEmpty () const
 Returns whether this ribbon group has no sub-groups or all are empty.
int largeButtonWidth () const
 Returns the width of a large button in the current layout.
void layoutSubGroups ()
 Slot that performs the layout of all sub-groups within this ribbon group.
int marginThickness () const
 Returns the margin thickness around the ribbon group content.
uint04 maxNumOfColumns () const
 Returns the maximum number of columns across all sub-groups.
int mediumButtonWidth () const
 Returns the width of a medium button in the current layout.
QSize minimumSizeHint () const override
 Returns the minimum recommended size for this ribbon group.
Vector< 2, int > minSize () const
 Returns the minimum size as a 2D vector (primary, secondary).
RibbonSubGroupoperator[] (const TranslatedString &location)
 Returns the sub-group with the given name, creating it if it does not exist.
RibbonSubGroupremoveSubGroup (const String &sub_group)
 Removes the sub-group with the given string key.
void removeSubGroup (const TranslatedString &sub_group)
 Removes the sub-group with the given translated name.
void resetButtonStates ()
 Resets all button states in all sub-groups to their defaults.
void ribbonResizeEvent (int primary, int secondary)
 Notifies the group of a ribbon resize, triggering sub-group relayout.
void setFixedNumOfRows (uint01 fixed_num_of_rows)
 Sets a fixed number of rows for the layout.
void setNumberOfRows (uint04 number_of_rows)
 Sets the number of rows used for laying out buttons.
void setupSeparator (QFrame *seperator) const
 Configures a separator frame for visual separation between sub-groups.
void setVertical (bool is_vertical)
 Sets whether the ribbon group layout is vertical.
void updateLayout (QSize size)
 Updates the internal layout to fit the given size.

Protected Member Functions

void createAction (const BuildAction &action, Button *b)
 Creates a new build action definition and opens its editor.
ButtoncreateButton (BuildAction action)
 Creates a button representing the given build action.
void init ()
 Initializes the ribbon group layout and buttons.
void performAction (const BuildAction &action, Button *b)
 Executes the specified build action, showing results via the given button.

Protected Attributes

QTModelManagerm_manager
 The application model manager.

Additional Inherited Members

Public Attributes inherited from RibbonGroup
uint01 m_fixed_num_of_rows
 Fixed number of rows, or 0 for automatic.
bool m_is_vertical
 Whether the layout is vertical.
int m_last_width
 The last known width, used to detect resize changes.
QBoxLayout * m_layout
 The box layout managing sub-group arrangement.
RibbonLayoutMode m_layout_mode
 The current layout mode.
uint04 m_row_num
 Current number of layout rows.
Buffer< QFrame * > m_separators
 Visual separators between sub-groups.
Dictionary< String, RibbonSubGroup * > m_sub_group_lookup
 Sub-groups indexed by name.
Buffer< QWidget * > m_sub_groups
 Ordered list of sub-group widgets.

Detailed Description

A ribbon group that provides quick-access buttons for common build actions within the Developer module UI.

Definition at line 15 of file BuildRibbonGroup.h.

Constructor & Destructor Documentation

◆ BuildRibbonGroup()

BuildRibbonGroup::BuildRibbonGroup ( QTModelManager * manager,
QWidget * parent = nullptr )

Constructs the build ribbon group.

Parameters
[in]managerThe model manager for data access.
[in]parentOptional parent widget.

Member Function Documentation

◆ createAction()

void BuildRibbonGroup::createAction ( const BuildAction & action,
Button * b )
protected

Creates a new build action definition and opens its editor.

Parameters
[in]actionThe build action type to create.
[in]bThe button used as the popup anchor.

◆ createButton()

Button * BuildRibbonGroup::createButton ( BuildAction action)
protected

Creates a button representing the given build action.

Parameters
[in]actionThe build action to create a button for.
Returns
Pointer to the newly created button.

◆ performAction()

void BuildRibbonGroup::performAction ( const BuildAction & action,
Button * b )
protected

Executes the specified build action, showing results via the given button.

Parameters
[in]actionThe build action to perform.
[in]bThe button that triggered the action.

◆ workflowButton()

Button * BuildRibbonGroup::workflowButton ( )

Returns the workflow button for triggering build workflows.

Returns
Pointer to the workflow button.

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