Skip to main content

MaskInspector

MaskInspector

Inspector widget for MaskData. More…

#include <MaskInspector.hpp>

Inherits from BaseInspector, QWidget, IDataInspector

Public Functions

Name
MaskInspector(std::shared_ptr< DataManager > data_manager, GroupManager * group_manager =[nullptr], QWidget * parent =[nullptr])
Construct the mask inspector.
~MaskInspector() override
virtual void setActiveKey(std::string const & key) override
Set the active data key to inspect.
virtual void removeCallbacks() override
Remove all callbacks from the currently active data.
virtual void updateView() override
Update the view to reflect current data state.
virtual DM_DataType getDataType() const override
Get the data type this inspector handles.
virtual QString getTypeName() const override
Get a human-readable name for this inspector type.
virtual bool supportsExport() const override
Check if this inspector supports export functionality.
void setDataView(MaskTableView * view)
Set the data view to use for filtering.

Additional inherited members

Public Signals inherited from BaseInspector

Name
void frameSelected(TimePosition position)
Emitted when user selects a frame to navigate to.

Public Functions inherited from BaseInspector

Name
BaseInspector(std::shared_ptr< DataManager > data_manager, GroupManager * group_manager =[nullptr], QWidget * parent =[nullptr])
Construct the base inspector.
~BaseInspector() override
virtual std::string getActiveKey() const override
Get the current active data key.
virtual bool supportsGroupFiltering() const override
Check if group filtering is supported.
void setGroupManager(GroupManager * group_manager)
Set the GroupManager for group-aware features.
GroupManager * groupManager() const
Get the current GroupManager.
void setCommandRecorder(commands::CommandRecorder * recorder)
Set the CommandRecorder for recording command executions.
void setState(std::shared_ptr< DataInspectorState > state)
Set the DataInspectorState for time position access.
std::shared_ptr< DataInspectorState > state() const
Get the DataInspectorState.

Protected Functions inherited from BaseInspector

Name
std::shared_ptr< DataManager > dataManager() const
Get the DataManager.
commands::CommandRecorder * commandRecorder() const
Get the CommandRecorder for recording command executions.
void removeCallbackFromData(std::string const & key, int & callback_id)
Helper to remove a callback from data.

Protected Attributes inherited from BaseInspector

Name
std::string _active_key
The currently active data key.
int _callback_id
Callback ID for data observer (-1 if not registered).

Public Functions inherited from IDataInspector

Name
virtual ~IDataInspector() =default
virtual std::string getActiveKey() const =0
Get the current active data key.
virtual bool supportsGroupFiltering() const
Check if this inspector supports group filtering.

Detailed Description

class MaskInspector;

Inspector widget for MaskData.

Provides mask data inspection and management functionality including image size management and export capabilities.

Public Functions Documentation

function MaskInspector

explicit MaskInspector(
    std::shared_ptr< DataManager > data_manager,
    GroupManager * group_manager =nullptr,
    QWidget * parent =nullptr
)

Construct the mask inspector.

Parameters:

  • data_manager Shared DataManager for data access
  • group_manager Optional GroupManager for group features
  • parent Parent widget

function ~MaskInspector

~MaskInspector() override

function setActiveKey

virtual void setActiveKey(
    std::string const & key
) override

Set the active data key to inspect.

Parameters:

Reimplements: IDataInspector::setActiveKey

This method should:

  1. Remove callbacks from any previously active data
  2. Store the new key
  3. Set up callbacks on the new data
  4. Update the view to show the new data

function removeCallbacks

virtual void removeCallbacks() override

Remove all callbacks from the currently active data.

Reimplements: IDataInspector::removeCallbacks

Called when the inspector is being destroyed or when switching to a different data key. Must clean up any registered observers.

function updateView

virtual void updateView() override

Update the view to reflect current data state.

Reimplements: IDataInspector::updateView

Called when the underlying data has changed. Should refresh all UI elements (tables, labels, etc.) to show current data.

function getDataType

inline virtual DM_DataType getDataType() const override

Get the data type this inspector handles.

Return: The DM_DataType enum value

Reimplements: IDataInspector::getDataType

function getTypeName

inline virtual QString getTypeName() const override

Get a human-readable name for this inspector type.

Return: Display name (e.g., “Point”, “Line”, “Mask”)

Reimplements: IDataInspector::getTypeName

function supportsExport

inline virtual bool supportsExport() const override

Check if this inspector supports export functionality.

Return: true if export is supported, false otherwise

Reimplements: IDataInspector::supportsExport

Default returns false. Override in inspectors that support data export.

function setDataView

void setDataView(
    MaskTableView * view
)

Set the data view to use for filtering.

Parameters:

This connects the inspector’s group filter to the view panel’s table. Should be called when both the inspector and view are created.


Updated on 2026-11-13 at 20:25:40 +0000