100 lines
3.2 KiB
C++
100 lines
3.2 KiB
C++
#ifndef DEBUGDIALOG_H
|
|
#define DEBUGDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include "sharedviews/setcontrolstyle.h"
|
|
|
|
namespace Ui {
|
|
class DebugDialog;
|
|
}
|
|
|
|
class DebugDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DebugDialog(QWidget *parent = 0);
|
|
~DebugDialog();
|
|
|
|
//调试功能参数类型的枚举
|
|
enum DEBUG_FUNCTION {
|
|
DEBUG_TRIM = 1, // 剪线
|
|
DEBUG_DIECUTTER, //冲刀
|
|
DEBUG_NEEDLESHUTTLE // 针梭
|
|
};
|
|
//控制动作
|
|
enum OUTCONTROL_FUN {
|
|
OUTCONTROL_ENABLE = 1, // 使能
|
|
OUTCONTROL_DISABLE, // 失能
|
|
OUTCONTROL_JOGP, // 正转
|
|
OUTCONTROL_JOGN, // 反转
|
|
OUTCONTROL_STOP, // 停止
|
|
OUTCONTROL_ZERO, // 归零
|
|
OUTCONTROL_UP, // 上升
|
|
OUTCONTROL_DOWN, // 下降
|
|
MANUALACTION_RUN, // 执行
|
|
OUTCONTROL_OPEN, // 打开
|
|
OUTCONTROL_CLOSE, // 关闭
|
|
OUTCONTROL_STARTOIL, // 开始
|
|
OUTCONTROL_STOPOIL, // 停止
|
|
OUTCONTROL_FOLLOWPOS, // 压脚跟随位
|
|
OUTCONTROL_TOUP, // 锯齿上位
|
|
OUTCONTROL_CTRL1 , //锯齿摆动位1
|
|
OUTCONTROL_CTRL2, //锯齿摆动位2
|
|
OUTCONTROL_ZEROPOS //锯齿零位
|
|
};
|
|
|
|
private:
|
|
Ui::DebugDialog *ui;
|
|
|
|
private:
|
|
void initControlStyle();//初始化窗体样式
|
|
int m_flag;
|
|
HeadInfo m_headParaValues;
|
|
ParaStruct m_mcParaValues;
|
|
ParaStruct m_wkParaValues;
|
|
|
|
int m_funType;//功能类型
|
|
int m_headParaFlag;//收到机头板参数改变标志
|
|
int m_mcParaFlag;
|
|
int m_id;
|
|
int m_val;
|
|
|
|
public:
|
|
void resizeUI(int w, int h);
|
|
void resizeTittle(int x, int y, int w, int h);
|
|
void resizeCancelBtn(int x, int y, int w, int h);
|
|
void resizeOkBtn(int x, int y, int w, int h);
|
|
void setTitleStr(QString str);
|
|
void setFlag(int flag = 0);
|
|
void excuteOrder(int def, int fun);//控制动作
|
|
void setFunType(int sel);
|
|
int getHeadPara(int idx=0);//读取外围板参数
|
|
int getMcPara(int idx = 0);//读取机器参数
|
|
int getWkPara(int idx = 0);//读取工作参数
|
|
void setHeadPara(int id = 0,int val = 0);//设置机头板参数
|
|
void setMcPara(int id = 0,int val = 0);//设置机器参数
|
|
void setWkPara(int id = 0,int val = 0);//设置工作参数
|
|
void saveHeadPara();//发送外围板参数
|
|
void saveMcPara();//发送机器参数
|
|
void saveWkPara();//发送工作参数
|
|
|
|
inline int getParaChange(){return m_headParaFlag;}
|
|
inline int getMcParaChange(){return m_mcParaFlag;}
|
|
//inline int getMcParaChange(){return m_wkParaFlag;}
|
|
|
|
public slots:
|
|
void EXBParaChange();//外围板参数改变
|
|
void paraChange(int type, int id);//机器工作参数改变
|
|
private slots:
|
|
void on_buttonCancel_clicked();
|
|
void on_buttonOk_clicked();
|
|
|
|
signals:
|
|
void siEXBParaChange();
|
|
void siMcParaChange();
|
|
void siWkParaChange();
|
|
};
|
|
|
|
#endif // DEBUGDIALOG_H
|