// // Created by Wakanda_shaw on 2022/4/27. // // You may need to build the project (run Qt uic code generator) to get "ui_main_window.h" resolved #include "main_window.h" #include "UI/ui_main_window.h" #include "rtklib.h" using namespace std; main_window::main_window(QWidget *parent) : QWidget(parent), ui(new Ui::main_window) { ui->setupUi(this); this->setAcceptDrops(true); ui->progressBar->setValue(0); ui->progressBar->setRange(0, 100); // QString aa,bb; // Read_Log("/Users/wakanda_shaw/Library/Mobile Documents/com~apple~CloudDocs/GNSS文献/LG69T/20220419 06-44 IMU/log/rover419.log", aa,bb); // Read_Sat("/Users/wakanda_shaw/Library/Mobile Documents/com~apple~CloudDocs/GNSS文献/LG69T/20220419 06-44 IMU/log/rover419.obs","/Users/wakanda_shaw/Library/Mobile Documents/com~apple~CloudDocs/GNSS文献/LG69T/20220419 06-44 IMU/log/rover419.nav",""); // 点击文件选择按钮 connect(ui->toolButton_input, &QPushButton::clicked,[=](){ QString filepath; filepath = QFileDialog::getOpenFileName(this,"打开文件",QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); ui->lineEdit_input->setText(filepath); }); // Output_Dir connect(ui->toolButton_output, &QPushButton::clicked,[=](){ QString filepath; filepath = QFileDialog::getExistingDirectory(this,"选择路径",QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); if(!filepath.isEmpty()){ ui->lineEdit_output->setText(filepath); ui->lineEdit_IMU->setText(filepath+"/"+"IMU"+".csv"); ui->lineEdit_PVT->setText(filepath+"/"+"PVT"+".csv"); ui->lineEdit_Sat->setText(filepath+"/"+"Sat"+".csv"); } }); // start按钮 connect(ui->pushButton, &QPushButton::clicked, [=](){ ui->pushButton->setEnabled(false); QString inpath, IMUpath, PVTpath, Satpath, Obspath, Navpath; inpath = ui->lineEdit_input->text(); IMUpath = ui->lineEdit_IMU->text(); PVTpath = ui->lineEdit_PVT->text(); Satpath = ui->lineEdit_Sat->text(); if (!inpath.isEmpty() && !IMUpath.isEmpty() && !PVTpath.isEmpty() && !Satpath.isEmpty()) { Read_IMU(inpath, IMUpath); ui->progressBar->setValue(30); Read_PVT(inpath, PVTpath); ui->progressBar->setValue(70); /* 读取log文件成功 */ if(Read_Log(inpath, Obspath, Navpath)){ cout<comboBox->currentText()=="Single"){ Read_Sat(Obspath, Navpath, Satpath,IONOOPT_BRDC); } else{ Read_Sat(Obspath, Navpath, Satpath,IONOOPT_IFLC); } ui->progressBar->setValue(100); } } ui->pushButton->setEnabled(true); }); } main_window::~main_window() { delete ui; }