185 lines
6.5 KiB
C++
185 lines
6.5 KiB
C++
#ifndef PROMPTDIALOG_H
|
|
#define PROMPTDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QDir>
|
|
#include <QFile>
|
|
#include <QTextCodec>
|
|
#include <QButtonGroup>
|
|
#include <QRadioButton>
|
|
#include <QStyleOption>
|
|
#include <QIcon>
|
|
#include "wordsinputdialog.h"
|
|
#include "numerinputdialog.h"
|
|
#include "setcontrolstyle.h"
|
|
#include "sharedviews/passworddialog.h"
|
|
|
|
#define NOODLES 1
|
|
#define BOTTOM 2
|
|
#define TIMELIMITMAX 2147483647
|
|
#define TIMELIMITMIN 2147385345
|
|
|
|
#define PARA_HEADSET 14
|
|
|
|
namespace Ui {
|
|
class PromptDialog;
|
|
}
|
|
|
|
class PromptDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PromptDialog(QWidget *parent = nullptr);
|
|
~PromptDialog();
|
|
|
|
enum BTN_SHOW
|
|
{
|
|
BTN_OK_CANCEL, //ok和cancel按钮
|
|
BTN_OK, //ok按钮
|
|
BTN_R_R_S, //重命名、替换、跳过
|
|
BTN_RESTART, //重启按钮
|
|
BTN_UCANCEL, //升级取消按钮
|
|
BTN_WARRANT, //授权按钮
|
|
BTN_BOTTOM, //底线检测
|
|
BTN_FACE, //面线检测
|
|
BTN_NONE, //无按钮
|
|
BTN_P_NONE, //进度条模式下无按钮(文件导入导出)
|
|
BTN_HMI_DECRYPT, //界面解密
|
|
BTN_CHANGE_PASSWORD, //修改一级密码
|
|
BTN_SPINDLE_ROTATE, //主轴旋转
|
|
BTN_ROTATE_ROTATE, //旋转电机旋转
|
|
BTN_AUTOMATIC_PULLMA, //自动拉料
|
|
BTN_SPINDLE_GRANDE, //主轴研车
|
|
BTN_WORK_AREA, //设置可工作区域
|
|
BTN_KNIFE_PRESSURE, //刀压设置
|
|
BTN_FAN_AREA, //风机区域
|
|
BTN_SPD_SELECT, //速度选择
|
|
BTN_FORCE, //刀压
|
|
BTN_FILETRANSFER, //文件传输
|
|
BTN_WORKHEADSET, //工作机头设置
|
|
BTN_O_S_C //覆盖、另存为、关闭
|
|
};
|
|
|
|
private:
|
|
Ui::PromptDialog *ui;
|
|
|
|
QPoint m_btnOkPoint;//ok按钮位置
|
|
QPoint m_btnCancelPoint;//cancel按钮位置
|
|
|
|
int m_funType;//功能类型
|
|
|
|
QString m_filePath;
|
|
|
|
QString m_speedStr1;
|
|
QString m_speedStr2;
|
|
QString m_speedStr3;
|
|
|
|
int m_spindleAngle;//主轴旋转角度值
|
|
int m_length;//自动拉料长度
|
|
int m_time;//主轴研车-时间
|
|
int m_speed;//主轴研车-速度
|
|
|
|
int m_area;//xy正负位置
|
|
QString m_newPassword;//获取新密码字符串
|
|
QString m_confirmPassword;//获取确认新密码字符串
|
|
private:
|
|
void initControl();//初始化窗体控件,包括位置、尺寸、样式
|
|
void initResolution();
|
|
void initControlStyle();//初始化窗体控件样式
|
|
void refreshColorOrderHead();//刷新当前色序的机头工作号
|
|
void refreshMcPara();//刷新机器参数
|
|
void refreshWkPara();//刷新工作参数
|
|
void btnDisplay(MyButton *btn, bool isTrue,QString str);
|
|
void delay(int millisecondsToWait);//延时
|
|
|
|
public:
|
|
void initDialog(int sel = 0);//初始化窗体
|
|
void setTitleStr(QString str);//设置标题
|
|
void setStrColor(QString str);//设置底线面线断线机头显示字体的颜色
|
|
void setContentStr(QString str);//设置显示内容
|
|
void setContentProcessStr(QString str);//设置进度条显示内容
|
|
void setContentInfoShow();//主板信息内容显示
|
|
void setContentWarrantShow();//授权信息内容显示
|
|
void setContentHMIDecryptShow(QString id);//界面解密网卡ID号显示
|
|
void setContentChangePasswordShow();//修改一级用户密码内容显示
|
|
void setValue(int progress);
|
|
void setButtonUCancelStr(QString str);
|
|
void setRange(int minimum, int maximum);
|
|
inline int getSpindleRotateAngle(){return m_spindleAngle;}//获取主轴旋转角度
|
|
inline int getArea(){return m_area;}
|
|
inline QString getInputNewPassword(){return m_newPassword;}//获取新密码
|
|
inline QString getInputConfirmPassword(){return m_confirmPassword;}//获取确认新密码
|
|
|
|
QString getNetworkCardID();//获取网卡ID
|
|
QString getInputPassword();//获取界面输入密码
|
|
|
|
void setDefaultButton(int flag);//
|
|
signals:
|
|
void siUpdataCancel();
|
|
void siSpindleAction(int action);//主轴动作(正转、反转、停止)
|
|
void siSpindleRotate(int angle);//主轴旋转角度
|
|
void siRotateRotate(int angle);//旋转电机旋转角度
|
|
void siAutoPull(int length); //自动拉料
|
|
void siSpindleTime(int time, int speed);//主轴研车-时间
|
|
|
|
void siBladePressureCol();//刀压采集
|
|
void siFileTransfer(int);//文件传输
|
|
public slots:
|
|
void slotMCInfoChange();
|
|
|
|
private slots:
|
|
void on_buttonOk_clicked();
|
|
void on_buttonCancel_clicked();
|
|
void on_buttonRename_clicked();
|
|
void on_buttonReplace_clicked();
|
|
void on_buttonSkip_clicked();
|
|
void on_buttonRestart_clicked();
|
|
void on_buttonUpdataCancel_clicked();
|
|
void on_buttonWarrant_clicked();
|
|
void on_buttonWarrantCancel_clicked();
|
|
void on_buttonDetectBegin_clicked();
|
|
void on_buttonDetectEnd_clicked();
|
|
void on_buttonDetectClose_clicked();
|
|
void on_buttonHMIPassword_clicked();
|
|
void on_buttonSpindleAngleValue_clicked();
|
|
void on_buttonNewPassword_clicked();
|
|
void on_buttonConfirmPassword_clicked();
|
|
void on_buttonForward_pressed();
|
|
void on_buttonForward_released();
|
|
void on_buttonReverse_pressed();
|
|
void on_buttonReverse_released();
|
|
void on_buttonX1_pressed();
|
|
void on_buttonX1_released();
|
|
void on_buttonX2_pressed();
|
|
void on_buttonX2_released();
|
|
void on_buttonY1_pressed();
|
|
void on_buttonY1_released();
|
|
void on_buttonY2_pressed();
|
|
void on_buttonY2_released();
|
|
void on_buttonLKTest_clicked();
|
|
void on_buttonRKTest_clicked();
|
|
void on_buttonLKParaModify_clicked();
|
|
void on_buttonRKParaModify_clicked();
|
|
void slot_buttonSpdParaModify_clicked(); //速度选择界面点击修改速度按钮
|
|
void slot_FanArea_clicked();
|
|
void slot_SpdSelect_clicked();//速度选择界面点击速度模式按钮
|
|
int slot_Modify_McPara_int(int index, QString descStr, QString unitStr, int Max, int Min, int afterpoint); // 修改int类型机器参数
|
|
void on_buttonFanClose5_clicked();
|
|
void on_buttonUp_clicked();
|
|
void on_buttonDn_clicked();
|
|
void on_pushButton_collect_clicked();
|
|
void on_button_USB_clicked();
|
|
void on_button_Local_clicked();
|
|
void slot_BladePressure_Clicked();
|
|
void on_pushButton_test_clicked();
|
|
void on_pushButton_Next_clicked();
|
|
void on_pushButton_Pre_clicked();
|
|
void on_pushButton_collect_bit_clicked();
|
|
void on_buttonOverWrite_clicked();
|
|
void on_buttonSaveAs_clicked();
|
|
void on_buttonClose_clicked();
|
|
};
|
|
|
|
#endif // PROMPTDIALOG_H
|