NDEVR
API Documentation
CalibratorWidget

A widget that allows the user to interact with an IMUCalibrator object and perform an IMU calibration. More...

Collaboration diagram for CalibratorWidget:
[legend]

Public Member Functions

 CalibratorWidget (IMUCalibrator *calibrator, QWidget *parent=nullptr)
 Constructs a CalibratorWidget with an associated IMU calibrator.
 CalibratorWidget (QWidget *parent=nullptr)
 Constructs a CalibratorWidget without an associated calibrator.
void cancelCalibration ()
 Cancels the currently running calibration.
void saveCalibration ()
 Saves the calibration data to the default location.
void saveToLocation ()
 Prompts the user to choose a file location and saves the calibration data there.
void setCalibrator (IMUCalibrator *calibrator)
 Sets the IMU calibrator for this widget to control.
void showButtonOptions (bool show_buttons)
 Shows or hides the start, save, and save-as buttons.
void startCalibration ()
 Starts the calibration process.

Static Public Member Functions

static FileFormat CalibrationTemplateFormat ()
 Returns the file format used for calibration template files.

Protected Member Functions

void init ()
 Initializes the widget layout and child widgets.
void onUpdatedSlot ()
 Slot called when the calibrator reports updated progress or state.

Protected Attributes

IMUCalibratorm_calibrator
 The IMU calibrator being controlled.
FileChooserDialogm_file_dialog = nullptr
 File chooser dialog for save-as operations.
bool m_is_calibrating = false
 Whether a calibration is currently in progress.
ProgressWidgetm_progress_widget
 Widget displaying calibration progress.
Buttonm_save_as_button = nullptr
 Button to save calibration data to a chosen location.
Buttonm_save_button = nullptr
 Button to save calibration data.
Buttonm_start_button = nullptr
 Button to start or cancel calibration.

Detailed Description

A widget that allows the user to interact with an IMUCalibrator object and perform an IMU calibration.


Definition at line 16 of file CalibratorWidget.h.

Constructor & Destructor Documentation

◆ CalibratorWidget() [1/2]

CalibratorWidget::CalibratorWidget ( QWidget * parent = nullptr)

Constructs a CalibratorWidget without an associated calibrator.

Parameters
[in]parentThe parent widget.

◆ CalibratorWidget() [2/2]

CalibratorWidget::CalibratorWidget ( IMUCalibrator * calibrator,
QWidget * parent = nullptr )

Constructs a CalibratorWidget with an associated IMU calibrator.

Parameters
[in]calibratorThe IMU calibrator to interact with.
[in]parentThe parent widget.

Member Function Documentation

◆ CalibrationTemplateFormat()

FileFormat CalibratorWidget::CalibrationTemplateFormat ( )
static

Returns the file format used for calibration template files.

Returns
The calibration template FileFormat.

◆ setCalibrator()

void CalibratorWidget::setCalibrator ( IMUCalibrator * calibrator)

Sets the IMU calibrator for this widget to control.

Parameters
[in]calibratorThe IMU calibrator.

◆ showButtonOptions()

void CalibratorWidget::showButtonOptions ( bool show_buttons)

Shows or hides the start, save, and save-as buttons.

Parameters
[in]show_buttonsWhether to display the button options.

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