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