NDEVR
API Documentation
BuildWorkflowTable

A table widget that displays and manages child build actions within a workflow, allowing creation and ordering of build steps. More...

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

Public Member Functions

 BuildWorkflowTable (QTModelManager *manager, QWidget *parent=nullptr)
 Constructs the table with the given model manager.
 BuildWorkflowTable (QWidget *parent=nullptr)
 Constructs the table with no model manager.
virtual ~BuildWorkflowTable ()
 Destructor.
void clearCreateAction ()
 Clears the default creation action so no action type is pre-selected.
void setCreateAction (BuildAction action)
 Sets the default action type for newly created child actions.
virtual void setModelManager (QTModelManager *manager) override
 Sets the model manager and re-initializes the table.
void setModelParent (const DynamicPointer< QTDesignObject > &object)
 Sets the parent design object whose children populate this table.
Public Member Functions inherited from DesignPropertyTable
 DesignPropertyTable (QTModelManager *manager, QWidget *parent=nullptr)
 Constructs a DesignPropertyTable with a model manager.
 DesignPropertyTable (QWidget *parent=nullptr)
 Constructs a DesignPropertyTable without a model manager.
uint04 addColumn (const DesignParameter &parameter, bool is_editable=true)
 Adds a column displaying the given design parameter.
uint04 addColumn (const ModelTableColumnSpec &column)
 Adds a column from a fully specified ModelTableColumnSpec.
uint04 addColumn (const TranslatedString &custom_column_name, const DesignParameter &parameter, bool is_editable=true)
 Adds a column with a custom name displaying the given design parameter.
uint04 addColumn (const TranslatedString &name, const StringView &icon, const std::function< void(UUID)> &callback)
 Adds a button column with a custom icon and click callback.
uint04 addColumn (NDPO property, bool is_editable=true)
 Adds a column displaying the given NDPO property.
void addListItem (const UUID &id)
 Adds a single object to the table.
uint04 addMaterialDataColumn (const TranslatedString &custom_column_name=TranslatedString())
 Adds a column showing material data for each design object.
ButtonaddNewButton (std::function< void(Button *)> callback, const TranslatedString &new_title=_t("Add New"), const StringView &add_icon="plus")
 Adds an "Add New" button to the bottom button bar.
void addOpenButton (std::function< void(Button *)> callback, const TranslatedString &new_title=_t("Open"), const StringView &add_icon="open")
 Adds an "Open" button to the bottom button bar.
uint04 addParentPathColumn (const TranslatedString &custom_column_name=TranslatedString())
 Adds a column showing the parent path of each design object.
void addWidget (QWidget *widget)
 Adds a custom widget to the bottom button bar.
bool event (QEvent *event) override
 Handles events, including custom polish events for deferred setup.
void filterAndSetList (Buffer< UUID > ids)
 Applies the current search filter and sets the list of objects to display.
bool isEditable ()
 Returns whether the table is currently editable.
const std::function< void(Model, PopupInfo)> & selectedCallback () const
 Returns the current selection callback.
Buffer< UUIDselectedIDs () const
 Returns the UUIDs of the currently selected rows.
void setAddedFilter (const std::function< bool(const Model &)> &callback)
 Sets a custom filter callback applied when objects are added.
void setColumnEditable (uint04 column, bool editable)
 Sets whether a specific column is editable.
void setColumnVisible (uint04 column, bool visible)
 Shows or hides a specific column.
void setEditable (bool editable)
 Sets whether the entire table is editable.
void setList (const Buffer< UUID > &ids)
 Sets the list of objects to display in the table.
void setModels (const Buffer< Model > &models)
 Sets the table contents from a buffer of Models.
void setSelectedCallback (const std::function< void(Model, PopupInfo)> &callback)
 Sets the callback invoked when a row is selected.
void setSortCallback (const std::function< bool(const Model &a, const Model &b)> &callback)
 Sets a custom sort comparison callback for ordering rows.
void setTypeAddedFilter (const String &type)
 Sets a type-based filter so only objects of the given type appear when added.
void setup ()
 Performs initial setup of the table layout, search bar, and edit button.
void setupTable ()
 Sets up the table view, proxy model, and delegate.
void showSearch (bool show_search)
 Shows or hides the search bar.
void updateRow (uint04 row)
 Updates the data display for a specific row.
void viewSettingsSignal ()
 Emitted when the view settings should be shown or updated.

Protected Member Functions

void onAddNew (Button *button)
 Handles the add-new button click by creating a child action.
void setupTable ()
 Configures the table columns and data bindings.
Protected Member Functions inherited from DesignPropertyTable
void contextMenu (const QPoint &pos)
 Slot called to display a context menu at the given position.
void selected (QModelIndex index)
 Slot called when a table row is selected.

Protected Attributes

BuildAction m_action = BuildAction::e_invalid
 The default action type for new children.
Buttonm_add_button = nullptr
 The add-new-action button.
DynamicPointer< QTDesignObjectm_object_parent
 The parent object whose children are displayed.
Protected Attributes inherited from DesignPropertyTable
QHBoxLayout * m_bottom_button_layout
 The layout for buttons at the bottom of the table.
Buttonm_edit_button
 The button for toggling edit mode.
QTModelManagerm_manager
 The model manager providing design objects.
DesignObjectSearchWidgetm_search_text
 The search text input widget.
QWidget * m_search_widget
 The container widget for the search bar.
DesignSortFilterProxyModelm_sort_model
 The sort/filter proxy model.
DesignPropertyTableViewm_table_view
 The table view displaying design object properties.
DesignTableModelm_view_model
 The underlying table model.

Detailed Description

A table widget that displays and manages child build actions within a workflow, allowing creation and ordering of build steps.

Definition at line 9 of file BuildWorkflowTable.h.

Constructor & Destructor Documentation

◆ BuildWorkflowTable() [1/2]

BuildWorkflowTable::BuildWorkflowTable ( QWidget * parent = nullptr)
explicit

Constructs the table with no model manager.

Parameters
[in]parentOptional parent widget.

◆ BuildWorkflowTable() [2/2]

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

Constructs the table with the given model manager.

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

Member Function Documentation

◆ onAddNew()

void BuildWorkflowTable::onAddNew ( Button * button)
protected

Handles the add-new button click by creating a child action.

Parameters
[in]buttonThe button that triggered the add.

◆ setCreateAction()

void BuildWorkflowTable::setCreateAction ( BuildAction action)

Sets the default action type for newly created child actions.

Parameters
[in]actionThe default build action type.

◆ setModelManager()

virtual void BuildWorkflowTable::setModelManager ( QTModelManager * manager)
overridevirtual

Sets the model manager and re-initializes the table.

Parameters
[in]managerThe model manager to use.

Reimplemented from DesignPropertyTable.

◆ setModelParent()

void BuildWorkflowTable::setModelParent ( const DynamicPointer< QTDesignObject > & object)

Sets the parent design object whose children populate this table.

Parameters
[in]objectThe parent design object.

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