60 lines
1.4 KiB
C++
60 lines
1.4 KiB
C++
#ifndef DIALOGALGOARG_H
|
|
#define DIALOGALGOARG_H
|
|
|
|
#include <QDialog>
|
|
#include <QString>
|
|
|
|
class QLineEdit;
|
|
class HandEyeCalibWidget;
|
|
class NetworkConfigWidget;
|
|
class ScrewPositionPresenter;
|
|
|
|
namespace Ui {
|
|
class DialogAlgoArg;
|
|
}
|
|
|
|
class DialogAlgoArg : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DialogAlgoArg(QWidget *parent = nullptr);
|
|
~DialogAlgoArg();
|
|
|
|
void SetPresenter(ScrewPositionPresenter* 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 initHandEyeCalibTab();
|
|
void initNetworkConfigTab();
|
|
|
|
void loadParams();
|
|
void loadHandEyeCalibConfig();
|
|
void loadNetworkConfig();
|
|
|
|
bool saveParams();
|
|
void resetParams();
|
|
|
|
void setDoubleEditorText(QLineEdit* edit, double value);
|
|
void setIntEditorText(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;
|
|
ScrewPositionPresenter* m_presenter = nullptr;
|
|
HandEyeCalibWidget* m_handEyeCalibWidget = nullptr;
|
|
NetworkConfigWidget* m_networkConfigWidget = nullptr;
|
|
};
|
|
|
|
#endif // DIALOGALGOARG_H
|