116 lines
2.6 KiB
C++
116 lines
2.6 KiB
C++
#ifndef COMMANDBOX_H
|
|
#define COMMANDBOX_H
|
|
|
|
#include <QWidget>
|
|
#include "QDebug"
|
|
#include "QAction"
|
|
#include "QContextMenuEvent"
|
|
#include "QMenu"
|
|
#include "QMessageBox"
|
|
|
|
#include "multiselector.h"
|
|
#include "Selector.h"
|
|
#include "Inputter.h"
|
|
#include "CharInputter.h"
|
|
#include "Confirm.h"
|
|
#include "CommandEditor.h"
|
|
|
|
namespace Ui {
|
|
class CommandBox;
|
|
}
|
|
|
|
class CommandBox : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CommandBox(QWidget *parent = nullptr);
|
|
~CommandBox();
|
|
|
|
|
|
protected:
|
|
void closeEvent(QCloseEvent *event);
|
|
void contextMenuEvent(QContextMenuEvent *event);
|
|
|
|
public slots:
|
|
void setFloat(void);
|
|
void setFloatFlag(bool flag);
|
|
|
|
|
|
void on_comboBox_TestPoint_currentIndexChanged(int index);
|
|
void on_pushButton_SendTest_clicked();
|
|
|
|
void setSecondConfirm(QVariant value);
|
|
void on_commandClicked(QString name,
|
|
float param1, float param2, float param3, float param4,
|
|
float param5, float param6, float param7,
|
|
uint16_t command, uint8_t confirmation);
|
|
|
|
signals:
|
|
|
|
void cmd_int(float param1, float param2, float param3, float param4, int x, int y, float z);
|
|
void cmd_long( float param1,float param2,float param3,float param4,float param5,float param6,float param7,uint16_t command,uint8_t confirmation);
|
|
|
|
|
|
private slots:
|
|
void on_pushButton_Servo_Check_clicked();
|
|
|
|
void on_pushButton_Servo_Read_clicked();
|
|
|
|
void on_pushButton_Servo_Zero_clicked();
|
|
|
|
void on_pushButton_Servo_Work_clicked();
|
|
|
|
void on_pushButton_AirHeatOn_clicked();
|
|
|
|
void on_pushButton_AirHeatOff_clicked();
|
|
|
|
void on_pushButton_coldrun_clicked();
|
|
|
|
void on_pushButton_groundstartup_clicked();
|
|
|
|
void on_pushButton_Afterburner_off_clicked();
|
|
|
|
void on_pushButton_stop_clicked();
|
|
|
|
void on_pushButton_EmergencyStop_clicked();
|
|
|
|
void on_pushButton_Hardware_off_clicked();
|
|
|
|
void on_pushButton_Hardware_on_clicked();
|
|
|
|
void on_pushButton_Afterburner_on_clicked();
|
|
|
|
void on_pushButton_Afterburner_half_clicked();
|
|
|
|
void on_pushButton_setRPM_clicked();
|
|
|
|
void on_pushButton_SendCommand_clicked();
|
|
|
|
void on_pushButton_Cancel_clicked();
|
|
|
|
private:
|
|
|
|
QWidget *m_parent;
|
|
|
|
bool floatflag = true;
|
|
|
|
Ui::CommandBox *ui;
|
|
|
|
|
|
QString m_name = 0;
|
|
float m_param1 = 0;
|
|
float m_param2 = 0;
|
|
float m_param3 = 0;
|
|
float m_param4 = 0;
|
|
float m_param5 = 0;
|
|
float m_param6 = 0;
|
|
float m_param7 = 0;
|
|
uint16_t m_command = 10;
|
|
uint8_t m_confirm = 10;
|
|
|
|
|
|
};
|
|
|
|
#endif // COMMANDBOX_H
|