Files
gcs-nf/App/ToolsUI/ToolsUI.h
T
2022-08-24 11:51:28 +08:00

126 lines
2.6 KiB
C++

#ifndef TOOLSUI_H
#define TOOLSUI_H
#include <QWidget>
#include "QFile"
#include "QTextStream"
#include "tools_Index0.h"
#include "tools_Index1.h"
#include "tools_Index2.h"
#include "tools_Index3.h"
#include "tools_Index4.h"
#include "PowerSystem/PowerSystem.h"
#include "ServoSystem/ServoSystem.h"
#include "CommandUI/CommandUI.h"
#include "CommandBox/CommandBox.h"
#include "Diagram/Diagram.h"
#include "Senser/Senser.h"
#include "ToolsWidget.h"
#include "evtol/evtol.h"
#include "RemoteControl/remotecontrol.h"
#include "ECU/ECU.h"
#include "INS/INS.h"
#include "LandingGear_AJ500/landinggear.h"
namespace Ui {
class ToolsUI;
}
class ToolsUI : public QWidget
{
Q_OBJECT
public:
enum state{
unSelected = 0,
preSelected = 1,
Selected = 2,
};
explicit ToolsUI(QWidget *parent = nullptr);
~ToolsUI();
void resizeEvent(QResizeEvent *event);
Tools_Index0 *index0 = nullptr;
Tools_Index1 *index1 = nullptr;
Tools_Index2 *index2 = nullptr;
Tools_Index3 *index3 = nullptr;
tools_Index4 *index4 = nullptr;
CommandBox *command = nullptr;
Senser *senser = nullptr;
RemoteControl *remotecontrol = nullptr;
ECU *ecu = nullptr;
INS *ins = nullptr;
landinggear *gear = nullptr;
private slots:
void install(ToolsWidget *widget, QString name);
void setPushButtonState(QWidget *w,state s);
void onTabIndexChanged(const int &index);
void btnClicked();
void recieveDataSlot(int const &id, QByteArray const &data);
void on_pushButton_ShowExtern_clicked();
signals:
void IndexChanged(const int &index);
void recieveData(const int &id,const QByteArray &data);
void parseData(const int &id,const QByteArray &data);
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);
void actuator_info_brake(Parse::_actuator info);
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);
private:
// QTimer timer;
Ui::ToolsUI *ui;
int CurrentIndex = 0;
QMap<int,QPushButton *> btnList;
QMap<int,ToolsWidget *> ToolsList;
};
#endif // TOOLSUI_H