fix:修复主界面读取配置文件分配网络地址问题

main
wanghaoyu 2 weeks ago
parent 0452e1b92e
commit dcd5068d7f

@ -471,7 +471,7 @@ void GDDCdlg::resizeUI() {
void GDDCdlg::setGlobalSetMap( void GDDCdlg::setGlobalSetMap(
std::unordered_map<QString, settingStruct> &gSetMap) { std::unordered_map<QString, settingStruct> &gSetMap) {
if (m_DlgGDDCSet) { if (m_DlgGDDCSet) {
m_DlgGDDCSet->initPullURL(gSetMap["光电吊舱"].net.remoteIp); m_DlgGDDCSet->initPullURL(gSetMap["Pod"].net.remoteIp);
} }
} }

@ -2,7 +2,7 @@
global::global() {} global::global() {}
QString g_SoftwareVersion = "版本号V1.1.0.6_20250215"; QString g_SoftwareVersion = "版本号V1.1.0.7_20250218";
NotifyManager *g_notifyManager = nullptr; NotifyManager *g_notifyManager = nullptr;

@ -93,7 +93,7 @@ void MainWindow::initWindow() {
// 使用类中的get方法获取配置文件中的IP // 使用类中的get方法获取配置文件中的IP
m_allSetMap = m_HomePagedlg->settingWidget->getAllParam(); m_allSetMap = m_HomePagedlg->settingWidget->getAllParam();
m_GDDCdlg->setGlobalSetMap(m_allSetMap); m_GDDCdlg->setGlobalSetMap(m_allSetMap);
qDebug() << "=============设备配置================"; /*qDebug() << "=============设备配置================";
qDebug() << "光电吊舱------"; qDebug() << "光电吊舱------";
qDebug() << "远端ip" << m_allSetMap["光电吊舱"].net.remoteIp; qDebug() << "远端ip" << m_allSetMap["光电吊舱"].net.remoteIp;
qDebug() << "L链----------"; qDebug() << "L链----------";
@ -106,14 +106,14 @@ void MainWindow::initWindow() {
qDebug() << "远端ip:" << m_allSetMap["三维建模"].net.remoteIp; qDebug() << "远端ip:" << m_allSetMap["三维建模"].net.remoteIp;
qDebug() << "远端端口:" << m_allSetMap["三维建模"].net.remotePort; qDebug() << "远端端口:" << m_allSetMap["三维建模"].net.remotePort;
qDebug() << "本地ip:" << m_allSetMap["三维建模"].net.localIp; qDebug() << "本地ip:" << m_allSetMap["三维建模"].net.localIp;
qDebug() << "本地端口:" << m_allSetMap["三维建模"].net.localPort; qDebug() << "本地端口:" << m_allSetMap["三维建模"].net.localPort;*/
// mWeb = new CWebEngineView(); // mWeb = new CWebEngineView();
// mWeb->setPage(new CustomWebEnginePage()); // mWeb->setPage(new CustomWebEnginePage());
// mWeb->load(QUrl("http://192.168.150.1")); // mWeb->load(QUrl("http://192.168.150.1"));
lLinkWeb = new CWebEngineView(); lLinkWeb = new CWebEngineView();
lLinkWeb->setPage(new CustomWebEnginePage()); lLinkWeb->setPage(new CustomWebEnginePage());
lLinkWeb->load(QUrl(m_allSetMap["L"].url)); lLinkWeb->load(QUrl(m_allSetMap["L-Link"].url));
connect(lLinkWeb->page(), &QWebEnginePage::loadFinished, this, [=]() { connect(lLinkWeb->page(), &QWebEnginePage::loadFinished, this, [=]() {
// QString jsScript = R"( // QString jsScript = R"(
// var usernameField = // var usernameField =
@ -139,14 +139,14 @@ void MainWindow::initWindow() {
adHocNetworkWeb = new CWebEngineView(); adHocNetworkWeb = new CWebEngineView();
adHocNetworkWeb->setPage(new CustomWebEnginePage()); adHocNetworkWeb->setPage(new CustomWebEnginePage());
adHocNetworkWeb->load(QUrl(m_allSetMap["宽带自组网"].url)); adHocNetworkWeb->load(QUrl(m_allSetMap["HocNetwork"].url));
satelliteCommWeb = new CWebEngineView(); satelliteCommWeb = new CWebEngineView();
satelliteCommWeb->setPage(new CustomWebEnginePage()); satelliteCommWeb->setPage(new CustomWebEnginePage());
satelliteCommWeb->load(QUrl(m_allSetMap["机载卫通"].url)); satelliteCommWeb->load(QUrl(m_allSetMap["SatelliteComm"].url));
m_ModelCameraDlg = new ModelCameraDlg(this); m_ModelCameraDlg = new ModelCameraDlg(this);
emit m_ModelCameraDlg->sendNetParam_signal(m_allSetMap["三维建模"].net); emit m_ModelCameraDlg->sendNetParam_signal(m_allSetMap["ModelCamera"].net);
// 接收主页面设置窗口的url数据传递并设置 // 接收主页面设置窗口的url数据传递并设置
connect( connect(
m_HomePagedlg->settingWidget, &HomePageSetingWidget::sendOneSet, this, m_HomePagedlg->settingWidget, &HomePageSetingWidget::sendOneSet, this,

Loading…
Cancel
Save