|
|
|
#ifndef HOMEPAGESETINGWIDGET_H
|
|
|
|
#define HOMEPAGESETINGWIDGET_H
|
|
|
|
|
|
|
|
#include "Src/GDDC/structDefineMyslef.h"
|
|
|
|
#include <QSettings>
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class HomePageSetingWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class HomePageSetingWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit HomePageSetingWidget(QWidget *parent = nullptr);
|
|
|
|
~HomePageSetingWidget();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::HomePageSetingWidget *ui;
|
|
|
|
std::unique_ptr<QSettings> _configIni; // 配置文件写入
|
|
|
|
QString urlFile; // 配置文件路径
|
|
|
|
settingStruct _GDDC; // 光电吊舱
|
|
|
|
settingStruct _lLink; // L链
|
|
|
|
settingStruct _adHocNetwork; // 自组网
|
|
|
|
settingStruct _satelliteComm; // PDT
|
|
|
|
settingStruct _ModelCamera; // 三维建模
|
|
|
|
std::unordered_map<QString, settingStruct> _allParamMap; // 存储所有设置信息
|
|
|
|
public:
|
|
|
|
void init();
|
|
|
|
/*************************************************
|
|
|
|
* @func getAllParam
|
|
|
|
* @brief 向外部提供接口 获取配置文件中的所有url信息
|
|
|
|
* @param
|
|
|
|
**************************************************/
|
|
|
|
std::unordered_map<QString, settingStruct> getAllParam();
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum urlEnum : unsigned char {
|
|
|
|
GDDC = 1,
|
|
|
|
L_Link,
|
|
|
|
Adhoc_Network,
|
|
|
|
Satelite_Comm,
|
|
|
|
ModelCamera
|
|
|
|
};
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_lLinkButton_clicked();
|
|
|
|
void on_netButton_clicked();
|
|
|
|
void on_sateliteButton_clicked();
|
|
|
|
void on_oneKeyButton_clicked();
|
|
|
|
void on_GDDCPushButton_clicked();
|
|
|
|
|
|
|
|
void on_modelCameraButton_clicked();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
// 发送信号给网页显示
|
|
|
|
void sendOneSet(unsigned char, settingStruct);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // HOMEPAGESETINGWIDGET_H
|