Skip to main content

BaseInspector

BaseInspector

Base implementation for type-specific data inspectors. More…

#include <BaseInspector.hpp>

Inherits from QWidget, IDataInspector

Inherited by AnalogTimeSeriesInspector, DigitalEventSeriesInspector, DigitalIntervalSeriesInspector, ImageInspector, LineInspector, MaskInspector, PointInspector, TensorInspector, TimeFrameInspector

Public Signals

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

Public Functions

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

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

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

Additional inherited members

Public Functions inherited from IDataInspector

Name
virtual ~IDataInspector() =default
virtual void setActiveKey(std::string const & key) =0
Set the active data key to inspect.
virtual void removeCallbacks() =0
Remove all callbacks from the currently active data.
virtual void updateView() =0
Update the view to reflect current data state.
virtual DM_DataType getDataType() const =0
Get the data type this inspector handles.
virtual QString getTypeName() const =0
Get a human-readable name for this inspector type.
virtual bool supportsExport() const
Check if this inspector supports export functionality.

Detailed Description

class BaseInspector;

Base implementation for type-specific data inspectors.

Provides common infrastructure for all inspector widgets including DataManager access, GroupManager support, and frame selection signaling.

Public Signals Documentation

signal frameSelected

void frameSelected(
    TimePosition position
)

Emitted when user selects a frame to navigate to.

Parameters:

  • position Time position to navigate to

Connect this to the main application’s frame navigation to allow users to jump to specific frames from the inspector.

Public Functions Documentation

function BaseInspector

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

Construct the base inspector.

Parameters:

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

function ~BaseInspector

~BaseInspector() override

function getActiveKey

inline virtual std::string getActiveKey() const override

Get the current active data key.

Return: The currently inspected data key

Reimplements: IDataInspector::getActiveKey

function supportsGroupFiltering

inline virtual bool supportsGroupFiltering() const override

Check if group filtering is supported.

Return: true if GroupManager is available

Reimplements: IDataInspector::supportsGroupFiltering

Reimplemented by: ImageInspector::supportsGroupFiltering, TensorInspector::supportsGroupFiltering, TimeFrameInspector::supportsGroupFiltering

function setGroupManager

void setGroupManager(
    GroupManager * group_manager
)

Set the GroupManager for group-aware features.

Parameters:

function groupManager

inline GroupManager * groupManager() const

Get the current GroupManager.

Return: GroupManager pointer, or nullptr if not set

function setCommandRecorder

inline void setCommandRecorder(
    commands::CommandRecorder * recorder
)

Set the CommandRecorder for recording command executions.

Parameters:

  • recorder Non-owning pointer to the CommandRecorder (can be nullptr)

function setState

void setState(
    std::shared_ptr< DataInspectorState > state
)

Set the DataInspectorState for time position access.

Parameters:

  • state Shared state pointer (can be nullptr)

function state

inline std::shared_ptr< DataInspectorState > state() const

Get the DataInspectorState.

Return: Shared state pointer, or nullptr if not set

Protected Functions Documentation

function dataManager

inline std::shared_ptr< DataManager > dataManager() const

Get the DataManager.

Return: Shared pointer to DataManager

function commandRecorder

inline commands::CommandRecorder * commandRecorder() const

Get the CommandRecorder for recording command executions.

Return: Non-owning pointer to the CommandRecorder, or nullptr if not set

function removeCallbackFromData

void removeCallbackFromData(
    std::string const & key,
    int & callback_id
)

Helper to remove a callback from data.

Parameters:

  • key Data key
  • callback_id Callback ID to remove

Safe to call even if callback_id is -1 or data doesn’t exist.

Protected Attributes Documentation

variable _active_key

std::string _active_key;

The currently active data key.

variable _callback_id

int _callback_id {-1};

Callback ID for data observer (-1 if not registered).


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