123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #include "mainwindow.h"
- #include "ui_mainwindow.h"
- #include <QFileDialog>
- MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent)
- , ui(new Ui::MainWindow)
- {
- ui->setupUi(this);
- setWindowTitle("Convert xodr map to Apollo HDMAP");
- }
- MainWindow::~MainWindow()
- {
- delete ui;
- }
- void MainWindow::on_pushButton_convert_clicked()
- {
- QString strlastpath = QString(ServiceIni.Getlastpath().data());
- QString strxodrpath = QFileDialog::getOpenFileName(this,"Select OpenDrive File",strlastpath,"*.xodr");
- if(strxodrpath.isEmpty())return;
- int indexsplash = strxodrpath.lastIndexOf('/');
- QString lastPath = strxodrpath.left(indexsplash);
- if(lastPath != strlastpath)
- {
- strlastpath = lastPath;
- ServiceIni.Setlastpath(strlastpath.toStdString());
- }
- QString strhdmappath = QFileDialog::getSaveFileName(this,"Select HDMAP File",".","*.xml");
- if(strhdmappath.isEmpty())return;
- indexsplash = strxodrpath.lastIndexOf('/');
- lastPath = strxodrpath.left(indexsplash);
- if(lastPath != strlastpath)
- {
- strlastpath = lastPath;
- ServiceIni.Setlastpath(strlastpath.toStdString());
- }
- }
|