![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Stream/StreamGUIHelpers.h>
Helper class to set a list of TrackingInstruments to a QComboBox for instrument selection. More...
Inheritance diagram for TrackingInstrumentComboBox:Helper class to set a list of TrackingInstruments to a QComboBox for instrument selection.
The class internally stores the TrackerID of the instrument and supports different display options.
Public Types | |
| enum | FormattingOptions { ID = 1 << 0 , ModelNumber = 1 << 1 , Name = 1 << 2 , All = 0xFF } |
Public Member Functions | |
| TrackingInstrumentComboBox (QWidget *parent=nullptr, bool supportsPreInitializationSelection=true) | |
| void | initFromTrackingStream (TrackingStream *trackingStream, Flags< FormattingOptions > idFormatting=FormattingOptions::All, bool supportsNoSelection=false) |
| Convenience initialization method for the instruments of a tracking stream. | |
| void | initFromInstruments (const std::vector< TrackerID > &trackingInstrumentIDs, Flags< FormattingOptions > idFormatting=FormattingOptions::All, bool supportsNoSelection=false) |
| Initialization method for the combo box for the selection of a tracking instrument. | |
| bool | selectInstrument (const std::string &trackerId) |
Selects the instrument by id if trackerId is found, otherwise selection is not changed. | |
| std::string | selectedInstrument () const |
| Returns the id of the currently selected tracking instrument. | |
| void | setSeparator (const std::string &separator) |
Sets the separator for the the fields and replaces the default |. | |
Public Member Functions inherited from SignalReceiver | |
| SignalReceiver ()=default | |
| Default constructor. | |
| SignalReceiver (const SignalReceiver &other) | |
| Copy constructor, does not copy any existing signal connections from other. | |
| SignalReceiver & | operator= (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 | |
| ProtectedSignal< const std::string & > | signalSelectedInstrumentChanged |
| Signal emits the tracker ID when the selection changed. | |
Additional Inherited Members | |
Protected Member Functions inherited from SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
| enum FormattingOptions |
| Enumerator | |
|---|---|
| ID | Show unique id. |
| ModelNumber | Show model number. |
| Name | Show name. |
| All | Show all fields in the form "id|modelNumber|name" (equivalent to TrackerID::toIDModelNameString) |
| void initFromTrackingStream | ( | TrackingStream * | trackingStream, |
| Flags< FormattingOptions > | idFormatting = FormattingOptions::All, | ||
| bool | supportsNoSelection = false ) |
Convenience initialization method for the instruments of a tracking stream.
The combo box is automatically updated when the tracking stream changes its instrument list.
| bool selectInstrument | ( | const std::string & | trackerId | ) |
Selects the instrument by id if trackerId is found, otherwise selection is not changed.
If supportsNoSelection is true, the selection is reset when trackerId is empty. Returns true if the specified instrument could be selected, false otherwise.