NDEVR
API Documentation
CalibratorWidget.h
1
#pragma once
2
#include "DLLInfo.h"
3
#include <QWidget>
4
namespace
NDEVR
5
{
6
class
ProgressWidget
;
7
class
Button
;
8
class
IMUCalibrator
;
9
class
FileChooserDialog
;
10
class
FileFormat
;
16
class
HARDWARE_WIDGETS_API
CalibratorWidget
:
public
QWidget
17
{
18
public
:
23
CalibratorWidget
(QWidget* parent =
nullptr
);
29
CalibratorWidget
(
IMUCalibrator
* calibrator, QWidget* parent =
nullptr
);
34
static
FileFormat
CalibrationTemplateFormat
();
39
void
setCalibrator
(
IMUCalibrator
* calibrator);
41
void
startCalibration
();
43
void
cancelCalibration
();
45
void
saveToLocation
();
47
void
saveCalibration
();
52
void
showButtonOptions
(
bool
show_buttons);
53
protected
:
55
void
init
();
56
protected
slots:
58
void
onUpdatedSlot
();
59
protected
:
60
ProgressWidget
*
m_progress_widget
;
61
Button
*
m_start_button
=
nullptr
;
62
Button
*
m_save_button
=
nullptr
;
63
Button
*
m_save_as_button
=
nullptr
;
64
IMUCalibrator
*
m_calibrator
;
65
FileChooserDialog
*
m_file_dialog
=
nullptr
;
66
bool
m_is_calibrating
=
false
;
67
};
68
}
Button
A core widget that allows the user to click one of many button types.
Definition
Button.h:68
CalibratorWidget::m_is_calibrating
bool m_is_calibrating
Whether a calibration is currently in progress.
Definition
CalibratorWidget.h:66
CalibratorWidget::saveToLocation
void saveToLocation()
Prompts the user to choose a file location and saves the calibration data there.
CalibratorWidget::saveCalibration
void saveCalibration()
Saves the calibration data to the default location.
CalibratorWidget::showButtonOptions
void showButtonOptions(bool show_buttons)
Shows or hides the start, save, and save-as buttons.
CalibratorWidget::CalibratorWidget
CalibratorWidget(QWidget *parent=nullptr)
Constructs a CalibratorWidget without an associated calibrator.
CalibratorWidget::m_progress_widget
ProgressWidget * m_progress_widget
Widget displaying calibration progress.
Definition
CalibratorWidget.h:60
CalibratorWidget::m_file_dialog
FileChooserDialog * m_file_dialog
File chooser dialog for save-as operations.
Definition
CalibratorWidget.h:65
CalibratorWidget::CalibrationTemplateFormat
static FileFormat CalibrationTemplateFormat()
Returns the file format used for calibration template files.
CalibratorWidget::m_save_as_button
Button * m_save_as_button
Button to save calibration data to a chosen location.
Definition
CalibratorWidget.h:63
CalibratorWidget::onUpdatedSlot
void onUpdatedSlot()
Slot called when the calibrator reports updated progress or state.
CalibratorWidget::m_calibrator
IMUCalibrator * m_calibrator
The IMU calibrator being controlled.
Definition
CalibratorWidget.h:64
CalibratorWidget::m_save_button
Button * m_save_button
Button to save calibration data.
Definition
CalibratorWidget.h:62
CalibratorWidget::startCalibration
void startCalibration()
Starts the calibration process.
CalibratorWidget::cancelCalibration
void cancelCalibration()
Cancels the currently running calibration.
CalibratorWidget::m_start_button
Button * m_start_button
Button to start or cancel calibration.
Definition
CalibratorWidget.h:61
CalibratorWidget::setCalibrator
void setCalibrator(IMUCalibrator *calibrator)
Sets the IMU calibrator for this widget to control.
CalibratorWidget::init
void init()
Initializes the widget layout and child widgets.
CalibratorWidget::CalibratorWidget
CalibratorWidget(IMUCalibrator *calibrator, QWidget *parent=nullptr)
Constructs a CalibratorWidget with an associated IMU calibrator.
FileChooserDialog
A dialog designed to allow the user to navigate a filesytem and select or create one or more files or...
Definition
FileChooserDialog.h:81
FileFormat
Data that describes a particular file format and how to use the format with the program.
Definition
FileFormat.h:45
IMUCalibrator
Logic and storage for IMU calibration.
Definition
IMUCalibrator.h:22
ProgressWidget
Displays the progress, either horizontally as a bar or as a round spin dial.
Definition
ProgressWidget.h:49
NDEVR
The primary namespace for the NDEVR SDK.
Definition
ArialTileFetcherModule.h:35
HardwareWidgets
Headers
CalibratorWidget.h
NDEVR.org