#ifndef CCTRLGRAPH_WORKTABLE_XY_H
#define CCTRLGRAPH_WORKTABLE_XY_H

#include "cctrlgraph_worktable.h"
#include "cctrlgraphbutton.h"
class CCtrlGraph_WorkTable_XY : public CCtrlGraph_WorkTable
{
    Q_OBJECT
public:
    explicit CCtrlGraph_WorkTable_XY(QWidget *parent = 0);
public:
    void refreshPixmap(bool bupdate=true);
    void DrawChannel(int32_t iChid, int32_t chshape, QString &chname, enum Qt::GlobalColor ecolor, QPainter& painter);
    void MTimeFresh();
	void MInit();
    void mouseReleaseEvent(QMouseEvent *pEvent);
    void mousePressEvent(QMouseEvent *pEvent);
    void DrawTable(QPainter& painter);
	void DrawCell(QPainter& painter);
	void DrawLaserCheck(QPainter& painter);
	void DrawLaserCheckCell(QPainter& painter);
	void DrawPowerCheck(QPainter& painter);
	void DrawLine(QPainter& painter);
	void DrawUserPanel(QPainter& painter);
	void DrawLevelPt(QPainter& painter);
	void DrawLocatePt(QPainter& painter);
    void DrawMsg(QPainter& painter);
	

	void SetArrowAngle(double& dAngle) { m_dAngleArrow = dAngle; }
signals:

public slots:
public:
    CCtrlGraphButton m_MoveBtn;
    bool m_bDrawButton;
    void DrawButton(QPainter &painter);
private:
	double m_dAngleArrow;
    CMPointd ConvertToLogicAixs(CMPointd wt);
    CMPointd ConvertToRealAxis(CMPointd wt);

    QString GetLaserPathName(int32_t iPathId);
    int m_iLaserPathId = -1;
};

#endif // CCTRLGRAPH_WORKTABLE_XY_H
