#ifndef CMWCALILASERPOWER_H
#define CMWCALILASERPOWER_H

#include "cmwidget.h"
#include "v_msg.h"
#include "v_msgqueue.h"
#include "cprocess_laserpowercali.h"
#include "export_laser_power_cali.h"
namespace Ui {
class CMWCaliLaserPower;
}
class CProcess_LaserPowerCali;
class LASER_POWER_CALI_EXPORT CMWCaliLaserPower : public CMWidget
{
    Q_OBJECT

public:
    explicit CMWCaliLaserPower(QWidget *parent ,int iLaserPathID);
    ~CMWCaliLaserPower();
    void MInit();
    void MTimeFresh();
    void MFresh();

    int32_t m_iLaserPathID;
    CProcess_LaserPowerCali* m_pLaserPowercali;

    void calipower_msg(int iFreq, int iEpulse, double dBeamWidth, V_MsgQueue &msgqueue);
private slots:

    void on_pushButton_CaliPos_clicked();

    void on_pushButton_CaliStart_clicked();

    void on_pushButton_CaliAllStart_clicked();

    void on_pushButton_CaliStop_clicked();

    void on_pushButton_CaliPChange_clicked();

    void on_pushButton_CaliMaxPower_clicked();

    void on_comboBox_Freq_currentIndexChanged(const QString &arg1);

    void on_comboBox_SINDEX_currentIndexChanged(const QString &arg1);

    void on_comboBox_Epulse_currentIndexChanged(const QString& arg1);

    void on_pushButton_Test_clicked(bool checked);

    void on_btnPowerMeterZero_clicked();

    void on_btnExport_clicked();

private:
    Ui::CMWCaliLaserPower *ui;
    void MFreshCombo();
    void MFreshCurCaliParam();
    void MFreshPowerCaliParam();

    void SetCoord45();
    void SetCoord90();
};

#endif // CMWCALILASERPOWER_H
