#ifndef WELDSEAM_DIALOGALGOARG_H #define WELDSEAM_DIALOGALGOARG_H #include #include class QLineEdit; class HandEyeCalibWidget; class ToolExtrinsicWidget; class WeldSeamPresenter; struct SystemConfig; namespace Ui { class DialogAlgoArg; } class DialogAlgoArg : public QDialog { Q_OBJECT public: explicit DialogAlgoArg(QWidget* parent = nullptr); ~DialogAlgoArg() override; void SetPresenter(WeldSeamPresenter* presenter); private slots: void on_btnOK_clicked(); void on_btnCancel_clicked(); void on_btnApply_clicked(); void on_btnReset_clicked(); void onCalibMatrixLoaded(int cameraIndex, const double* matrix); void onSaveCalibRequested(int cameraIndex, const double* matrix); private: void InitNumericEditors(); void InitCommunicationWidgets(); void Load(); void LoadCommunicationConfig(); bool Save(); bool SaveCommunicationConfig(SystemConfig& config); void ResetDefaults(); void SetDoubleText(QLineEdit* edit, double value); void SetIntText(QLineEdit* edit, int value); bool TryGetDouble(QLineEdit* edit, const QString& label, double& value); bool TryGetInt(QLineEdit* edit, const QString& label, int& value); private: Ui::DialogAlgoArg* ui = nullptr; WeldSeamPresenter* m_presenter = nullptr; ToolExtrinsicWidget* m_toolExtrinsicWidget = nullptr; HandEyeCalibWidget* m_handEyeCalibWidget = nullptr; }; #endif // WELDSEAM_DIALOGALGOARG_H