Files
gcs-nf/App/ToolsUI/ToolsUI.h
T

126 lines
2.6 KiB
C++
Raw Normal View History

2022-08-16 22:13:55 +08:00
#ifndef TOOLSUI_H
2020-03-28 21:27:22 +08:00
#define TOOLSUI_H
#include <QWidget>
2020-05-28 18:11:23 +08:00
#include "QFile"
#include "QTextStream"
#include "tools_Index0.h"
#include "tools_Index1.h"
2020-06-04 18:20:13 +08:00
#include "tools_Index2.h"
#include "tools_Index3.h"
2020-08-19 22:21:48 +08:00
#include "tools_Index4.h"
2020-10-06 15:18:29 +08:00
#include "PowerSystem/PowerSystem.h"
2020-10-06 17:11:59 +08:00
#include "ServoSystem/ServoSystem.h"
2020-03-28 21:27:22 +08:00
2020-10-10 12:12:30 +08:00
#include "CommandUI/CommandUI.h"
#include "CommandBox/CommandBox.h"
#include "Diagram/Diagram.h"
2020-12-03 16:07:39 +08:00
#include "Senser/Senser.h"
2021-01-07 10:55:02 +08:00
#include "ToolsWidget.h"
2021-01-06 14:03:02 +08:00
#include "evtol/evtol.h"
#include "RemoteControl/remotecontrol.h"
2022-06-15 18:52:14 +08:00
#include "ECU/ECU.h"
2022-07-16 23:54:47 +08:00
#include "INS/INS.h"
#include "LandingGear_AJ500/landinggear.h"
2021-01-06 14:03:02 +08:00
2020-03-28 21:27:22 +08:00
namespace Ui {
class ToolsUI;
}
class ToolsUI : public QWidget
{
Q_OBJECT
public:
2020-10-15 22:21:38 +08:00
enum state{
unSelected = 0,
preSelected = 1,
Selected = 2,
};
2020-03-28 21:27:22 +08:00
explicit ToolsUI(QWidget *parent = nullptr);
~ToolsUI();
2020-05-28 18:11:23 +08:00
void resizeEvent(QResizeEvent *event);
2020-03-28 21:27:22 +08:00
Tools_Index0 *index0 = nullptr;
Tools_Index1 *index1 = nullptr;
2020-06-04 18:20:13 +08:00
Tools_Index2 *index2 = nullptr;
Tools_Index3 *index3 = nullptr;
2020-08-19 22:21:48 +08:00
tools_Index4 *index4 = nullptr;
2020-10-06 15:18:29 +08:00
2020-10-10 12:12:30 +08:00
CommandBox *command = nullptr;
2020-12-03 16:07:39 +08:00
Senser *senser = nullptr;
RemoteControl *remotecontrol = nullptr;
2022-06-15 18:52:14 +08:00
ECU *ecu = nullptr;
2022-07-16 23:54:47 +08:00
INS *ins = nullptr;
2022-06-15 18:52:14 +08:00
2022-07-16 23:54:47 +08:00
landinggear *gear = nullptr;
2022-06-15 18:52:14 +08:00
2021-06-03 23:01:25 +08:00
2020-03-28 21:27:22 +08:00
private slots:
2021-01-06 16:54:28 +08:00
2022-06-15 18:52:14 +08:00
void install(ToolsWidget *widget, QString name);
2021-01-06 16:54:28 +08:00
2020-10-15 22:21:38 +08:00
void setPushButtonState(QWidget *w,state s);
2020-05-28 18:11:23 +08:00
void onTabIndexChanged(const int &index);
2021-01-06 16:54:28 +08:00
void btnClicked();
2022-08-16 22:13:55 +08:00
void recieveDataSlot(int const &id, QByteArray const &data);
2020-05-28 18:11:23 +08:00
2020-10-09 21:55:15 +08:00
void on_pushButton_ShowExtern_clicked();
2021-01-06 16:54:28 +08:00
2022-08-16 22:13:55 +08:00
2020-05-28 18:11:23 +08:00
signals:
void IndexChanged(const int &index);
2020-03-28 21:27:22 +08:00
2022-06-15 18:52:14 +08:00
void recieveData(const int &id,const QByteArray &data);
2022-08-16 23:24:55 +08:00
void parseData(const int &id,const QByteArray &data);
2020-03-28 21:27:22 +08:00
2022-08-19 22:08:04 +08:00
void INS_Info(Parse::_ins info);
void NAV_Info(Parse::_nav info);
void gear_Info(Parse::_gear info);
void EADC_Info(Parse::_eadc info);
void ECU_Info(Parse::_ecu info);
void SSPC_Info(Parse::_sspc info);
void actuator_info(Parse::_actuator info);
2022-08-24 11:51:28 +08:00
void actuator_info_brake(Parse::_actuator info);
2022-08-19 22:08:04 +08:00
void actuator1_info(Parse::_actuator1 info);
void actuator2_info(Parse::_actuator2 info);
void imu_info(Parse::_imu info);
void euler_info(Parse::_euler info);
void vel_info(Parse::_vel info);
void pos_info(Parse::_pos info);
void SSPC_Info_state(Parse::_sspc info);
2020-03-28 21:27:22 +08:00
private:
2022-08-16 22:13:55 +08:00
// QTimer timer;
2020-03-28 21:27:22 +08:00
Ui::ToolsUI *ui;
2020-05-28 18:11:23 +08:00
int CurrentIndex = 0;
2021-01-06 16:54:28 +08:00
QMap<int,QPushButton *> btnList;
2021-01-07 10:55:02 +08:00
QMap<int,ToolsWidget *> ToolsList;
2021-01-06 16:54:28 +08:00
2020-03-28 21:27:22 +08:00
};
#endif // TOOLSUI_H