ImFusion C++ SDK 4.4.0
ImFusion::TrackingInstrumentTable Class Reference

#include <ImFusion/Stream/TrackingInstrumentTable.h>

Table widget for displaying and managing TrackingInstruments from a TrackingStream. More...

Inheritance diagram for ImFusion::TrackingInstrumentTable:

Detailed Description

Table widget for displaying and managing TrackingInstruments from a TrackingStream.

This widget provides a comprehensive interface for viewing and interacting with tracking instruments, with configurable capabilities including:

  • Renaming instruments (if supported by the stream)
  • Activating/deactivating instruments
  • Setting the main instrument (if supported by the stream)
  • Selecting instruments

The table automatically updates when the tracking stream's instrument list changes or when new tracking data arrives. All updates from the tracking stream are invoked on the GUI thread.

Example usage:

auto* table = new TrackingInstrumentTable(trackingStream, config, parent);
table->signalSelectedInstrumentChanged.connect([](const std::string& id) {
// Handle instrument selection
});
Utility class to store a type-safe combination of enum-based bit fields.
Definition Flags.h:34
TrackingInstrumentTable(TrackingStream &stream, Flags< InstrumentTableConfiguration > config, QWidget *parent=nullptr)
Constructs the table for the given stream with specified configuration flags.
@ SelectInstrument
Enables to select a TrackingInstrument (emits signal upon selection).
Definition TrackingInstrumentTable.h:29
@ SetMainInstrument
Enables to specify the main TrackingInstrument (must be supported by the TrackingStream).
Definition TrackingInstrumentTable.h:28
@ RenameInstrument
Enables to rename the TrackingInstruments (must be supported by the TrackingStream).
Definition TrackingInstrumentTable.h:26
Note
This is a Qt widget and must be used on the GUI thread.

Public Member Functions

 TrackingInstrumentTable (TrackingStream &stream, Flags< InstrumentTableConfiguration > config, QWidget *parent=nullptr)
 Constructs the table for the given stream with specified configuration flags.
bool selectInstrument (const std::string &trackerId)
 Selects an instrument by its unique ID.
std::string selectedInstrument () const
 Returns the unique ID of the currently selected instrument.
Public Member Functions inherited from ImFusion::SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.

Public Attributes

Signal< const std::string & > signalSelectedInstrumentChanged
 Emits the instrument ID when the selected instrument changes.

Protected Member Functions

void resizeEvent (QResizeEvent *event) override
 Calls updateColumnWidths to resize the columns correctly after table resizing.
Protected Member Functions inherited from ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.

Constructor & Destructor Documentation

◆ TrackingInstrumentTable()

ImFusion::TrackingInstrumentTable::TrackingInstrumentTable ( TrackingStream & stream,
Flags< InstrumentTableConfiguration > config,
QWidget * parent = nullptr )

Constructs the table for the given stream with specified configuration flags.

Configuration flags are automatically disabled with warning if not supported by the stream.

Member Function Documentation

◆ selectInstrument()

bool ImFusion::TrackingInstrumentTable::selectInstrument ( const std::string & trackerId)

Selects an instrument by its unique ID.

Requires InstrumentTableConfiguration::SelectInstrument flag. Returns true if successfully selected, false if not found or selection disabled.

◆ selectedInstrument()

std::string ImFusion::TrackingInstrumentTable::selectedInstrument ( ) const

Returns the unique ID of the currently selected instrument.

Returns empty string if none selected or InstrumentTableConfiguration::SelectInstrument not enabled.

Member Data Documentation

◆ signalSelectedInstrumentChanged

Signal<const std::string&> ImFusion::TrackingInstrumentTable::signalSelectedInstrumentChanged

Emits the instrument ID when the selected instrument changes.

Only emitted if InstrumentTableConfiguration::SelectInstrument enabled.


The documentation for this class was generated from the following file:
  • ImFusion/Stream/TrackingInstrumentTable.h
Search Tab / S to search, Esc to close