diff --git a/CMakeLists.txt b/CMakeLists.txt index 00dc6ee..a059461 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set(PROJECT_VERSION 1.4.2.1) +set(PROJECT_VERSION 1.4.2.2) add_definitions(-DProjectVersion=\"${PROJECT_VERSION}\") project(zxrcClient VERSION ${PROJECT_VERSION} LANGUAGES CXX) @@ -130,6 +130,9 @@ set(LOCALALGO sagauss.h twopoint.cpp twopoint.h + idpath.cpp + idpath.h + idpath.ui ) add_executable (zxrcClientPC WIN32 ${LOCALALGO} ${PROJECT_SOURCES}) diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index bac5166..8f9de14 100644 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -400,22 +400,6 @@ 1 - true - true - true - - 2 - - false - zxrcClient - CMakeProjectManager.CMakeRunConfiguration.zxrcClient - zxrcClient - true - true - true - D:/WorkSpace/zxrcClientNew/build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release - - true true true @@ -431,7 +415,7 @@ true D:/WorkSpace/zxrcClientNew/build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release - 2 + 1 diff --git a/idpath.cpp b/idpath.cpp new file mode 100644 index 0000000..e670eae --- /dev/null +++ b/idpath.cpp @@ -0,0 +1,20 @@ +#include "idpath.h" +#include "ui_idpath.h" + +idpath::idpath(QWidget *parent) : + QDialog(parent), + ui(new Ui::idpath) +{ + ui->setupUi(this); +} + +idpath::~idpath() +{ + delete ui; +} + +void idpath::on_buttonBox_accepted() +{ + emit signalIDpath(ui->lineEdit->text()+"-"+ui->doubleSpinBox->text()); +} + diff --git a/idpath.h b/idpath.h new file mode 100644 index 0000000..bd657b1 --- /dev/null +++ b/idpath.h @@ -0,0 +1,29 @@ +#ifndef IDPATH_H +#define IDPATH_H + +#include + +namespace Ui { +class idpath; +} + +class idpath : public QDialog +{ + Q_OBJECT + +public: + explicit idpath(QWidget *parent = nullptr); + ~idpath(); + + +signals: + void signalIDpath(QString); + +private slots: + void on_buttonBox_accepted(); + +private: + Ui::idpath *ui; +}; + +#endif // IDPATH_H diff --git a/idpath.ui b/idpath.ui new file mode 100644 index 0000000..0441cd0 --- /dev/null +++ b/idpath.ui @@ -0,0 +1,84 @@ + + + idpath + + + + 0 + 0 + 318 + 78 + + + + 输入编号等信息 + + + + + + 机芯编号 + + + + + + + + + + Qt::Vertical + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + 积分时间 + + + + + + + + + + + + buttonBox + accepted() + idpath + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + idpath + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/menu5.cpp b/menu5.cpp index 0e88e8f..f5dfeba 100644 --- a/menu5.cpp +++ b/menu5.cpp @@ -83,17 +83,26 @@ void menu5::on_pushButton_2_clicked() void menu5::on_pushButton_3_clicked() { - QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./")); - - emit signalsavedata(path); +// QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./")); + idpath* p = new idpath; + p->show(); + connect(p,&idpath::signalIDpath,[=](QString path){ + emit signalsavedata(path); + p->deleteLater(); + }); } void menu5::on_pushButton_4_clicked() { // emit signalloaddata(); - QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./")); - emit signalloaddata(path); +// QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./")); + idpath* p = new idpath; + p->show(); + connect(p,&idpath::signalIDpath,[=](QString path){ + emit signalloaddata(path); + p->deleteLater(); + }); } diff --git a/menu5.h b/menu5.h index 715590b..c3ed229 100644 --- a/menu5.h +++ b/menu5.h @@ -3,6 +3,7 @@ #include #include +#include "idpath.h" namespace Ui { class menu5; } diff --git a/multipoint.cpp b/multipoint.cpp index ebb0897..7f09fab 100644 --- a/multipoint.cpp +++ b/multipoint.cpp @@ -79,7 +79,7 @@ void MultiPoint::calcData(QVector vct) double* ss = stages+(k-1)*512*640; double* ks = kstages+k*512*640; - // *(bstages+k) = vs; + *(bstages+k) = vs; double* bs = bstages+k*512*640; @@ -94,7 +94,7 @@ void MultiPoint::calcData(QVector vct) for(int j = 0;j< ms.cols;j++){ *(ss+i*ms.cols+j) = ms.at(i,j); *(ks+i*ms.cols+j) = (ve-vs)/(me.at(i,j) - ms.at(i,j)); - *(bs+i*ms.cols+j) = vs ; + // *(bs+i*ms.cols+j) = vs ; //- k*ms.at(i,j); } } @@ -107,7 +107,7 @@ void MultiPoint::calcData(QVector vct) double* ss = stages+(k-1)*512*640; double* ks = kstages+k*512*640; double* bs = bstages+k; - // *(bs) = 65535; + *(bs) = 65535; // cv::Mat ms = end.value(); @@ -117,7 +117,7 @@ void MultiPoint::calcData(QVector vct) for(int j = 0;j<640;j++){ *(ss+i*640+j) = ms.at(i,j); *(ks+i*640+j) = 0; - *(bs+i*640+j) = 65535; + // *(bs+i*640+j) = 65535; } } @@ -196,6 +196,8 @@ void MultiPoint::savedata(QString path) // cv::imwrite(QString::number(k).toStdString()+ ".tiff",iter.value()); // k+=1; // } + QDir d; + d.mkdir(path); QFile fs(path+ "/s.bin"); fs.open(QIODevice::ReadWrite);