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

97 lines
1.8 KiB
C++
Raw Normal View History

#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();
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
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);
2020-03-28 21:27:22 +08:00
private:
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