Files
gcs-nf/App/ToolsUI/ToolsUI.h
T
2022-07-16 23:54:47 +08:00

97 lines
1.8 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 on_pushButton_ShowExtern_clicked();
signals:
void IndexChanged(const int &index);
void recieveData(const int &id,const QByteArray &data);
private:
Ui::ToolsUI *ui;
int CurrentIndex = 0;
QMap<int,QPushButton *> btnList;
QMap<int,ToolsWidget *> ToolsList;
};
#endif // TOOLSUI_H