solve the chinese path problem
This commit is contained in:
@@ -25,7 +25,9 @@ void MyThread::run()
|
||||
|
||||
void MyThread::setPcd(QString str)
|
||||
{
|
||||
pcd = str.toStdString();
|
||||
QTextCodec* code = QTextCodec::codecForName("GB2312");//½â¾öÖÐÎÄ·¾¶ÎÊÌâ
|
||||
pcd = code->fromUnicode(str).data();
|
||||
// pcd = str.toStdString();
|
||||
}
|
||||
|
||||
PointCloud<PointXYZRGB> MyThread::getCloud()
|
||||
|
||||
@@ -143,6 +143,10 @@ void Reconstruction::setButtonStyle()
|
||||
|
||||
// 图案投影界面
|
||||
ui.pushButton_4->setIcon(QIcon(":/icon/image/projection/file.png"));
|
||||
ui.pushButton_19->setIcon(QIcon(":/icon/image/projection/projector.png"));
|
||||
ui.pushButton_9->setIcon(QIcon(":/icon/image/projection/image.png"));
|
||||
ui.pushButton_10->setIcon(QIcon(":/icon/image/projection/save.png"));
|
||||
ui.pushButton_17->setIcon(QIcon(":/icon/image/projection/three_d.png"));
|
||||
|
||||
// 三维重建界面
|
||||
ui.pushButton_13->setIcon(QIcon(":/icon/image/reconstruction/import.png"));
|
||||
@@ -604,8 +608,10 @@ void Reconstruction::on_pushButton_4_clicked()
|
||||
return;
|
||||
}
|
||||
|
||||
QTextCodec* code = QTextCodec::codecForName("GB2312");//解决中文路径问题
|
||||
auto name = code->fromUnicode(fileName).data();
|
||||
ui.lineEdit->setText(fileName);
|
||||
td->setPath(fileName.toStdString());
|
||||
td->setPath(name);
|
||||
auto w = ui.label_21->width();
|
||||
auto h = ui.label_21->height();
|
||||
ui.label_21->setPixmap(QPixmap(fileName).scaled(w, h, Qt::KeepAspectRatio));
|
||||
@@ -671,7 +677,6 @@ void Reconstruction::on_pushButton_10_clicked()
|
||||
if (!fileName.isNull())
|
||||
{
|
||||
QScreen* screen = QGuiApplication::primaryScreen();
|
||||
|
||||
screen->grabWindow(ui.label_21->winId()).save(fileName);
|
||||
}
|
||||
}
|
||||
@@ -760,10 +765,12 @@ void Reconstruction::on_pushButton_14_clicked()
|
||||
|
||||
if (!fileName.isNull())
|
||||
{
|
||||
if (fileName.endsWith(".pcd", Qt::CaseInsensitive))
|
||||
io::savePCDFileBinary(fileName.toStdString(), cloud);
|
||||
else if (fileName.endsWith(".ply", Qt::CaseInsensitive))
|
||||
io::savePLYFileBinary(fileName.toStdString(), cloud);
|
||||
QTextCodec* code = QTextCodec::codecForName("GB2312");//解决中文路径问题
|
||||
auto name = code->fromUnicode(fileName).data();
|
||||
if (QString::fromStdString(name).endsWith(".pcd", Qt::CaseInsensitive))
|
||||
io::savePCDFileBinary(name, cloud);
|
||||
else if (QString::fromStdString(name).endsWith(".ply", Qt::CaseInsensitive))
|
||||
io::savePLYFileBinary(name, cloud);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <QStyleFactory>
|
||||
#include <QScreen>
|
||||
#include <QtTest/QtTest>
|
||||
#include <QTextCodec>
|
||||
#include "DisplayPic.h"
|
||||
#include "ui_Reconstruction.h"
|
||||
#include <pcl/point_types.h>
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
<file>image/reconstruction/help2.png</file>
|
||||
<file>image/common/icon.png</file>
|
||||
<file>icon1.ico</file>
|
||||
<file>image/projection/image.png</file>
|
||||
<file>image/projection/projector.png</file>
|
||||
<file>image/projection/save.png</file>
|
||||
<file>image/projection/three_d.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/qss">
|
||||
<file>qss/flat.qss</file>
|
||||
|
||||
BIN
Resources/image/projection/image.png
Normal file
BIN
Resources/image/projection/image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 851 B |
BIN
Resources/image/projection/projector.png
Normal file
BIN
Resources/image/projection/projector.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 892 B |
BIN
Resources/image/projection/save.png
Normal file
BIN
Resources/image/projection/save.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 322 B |
BIN
Resources/image/projection/three_d.png
Normal file
BIN
Resources/image/projection/three_d.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 415 B |
Binary file not shown.
Binary file not shown.
@@ -1,31 +1,5 @@
|
||||
Reconstruction.cpp
|
||||
MyThread.cpp
|
||||
Unknown compiler version - please run the configure tests and report the results
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(17,1): warning C4005: “M_E”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(155): message : 参见“M_E”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(18,1): warning C4005: “M_LOG2E”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(159): message : 参见“M_LOG2E”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(19,1): warning C4005: “M_LOG10E”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(163): message : 参见“M_LOG10E”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(20,1): warning C4005: “M_LN2”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(167): message : 参见“M_LN2”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(21,1): warning C4005: “M_LN10”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(171): message : 参见“M_LN10”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(22,1): warning C4005: “M_PI”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(175): message : 参见“M_PI”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(23,1): warning C4005: “M_PI_2”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(179): message : 参见“M_PI_2”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(24,1): warning C4005: “M_PI_4”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(183): message : 参见“M_PI_4”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(25,1): warning C4005: “M_1_PI”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(187): message : 参见“M_1_PI”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(26,1): warning C4005: “M_2_PI”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(191): message : 参见“M_2_PI”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(27,1): warning C4005: “M_2_SQRTPI”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(195): message : 参见“M_2_SQRTPI”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(28,1): warning C4005: “M_SQRT2”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(199): message : 参见“M_SQRT2”的前一个定义
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math_defines.h(29,1): warning C4005: “M_SQRT1_2”: 宏重定义
|
||||
D:\Qt\5.12.3\msvc2017_64\include\QtCore\qmath.h(203): message : 参见“M_SQRT1_2”的前一个定义
|
||||
D:\BJTU\Reconstruction\Lib\PCL\PCL 1.8.1\include\pcl-1.8\pcl\point_traits.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
|
||||
D:\BJTU\Reconstruction\Lib\PCL\PCL 1.8.1\include\pcl-1.8\pcl\visualization\interactor_style.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
|
||||
D:\BJTU\Reconstruction\Lib\PCL\PCL 1.8.1\include\pcl-1.8\pcl\visualization\pcl_visualizer.h(1585,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
|
||||
@@ -38,5 +12,4 @@ D:\BJTU\Reconstruction\Lib\FlyCapture2\include\Utilities.h(1,1): warning C4819:
|
||||
D:\BJTU\Reconstruction\Lib\FlyCapture2\include\AVIRecorder.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
|
||||
D:\BJTU\Reconstruction\Lib\FlyCapture2\include\TopologyNode.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
|
||||
D:\BJTU\Reconstruction\Lib\FlyCapture2\include\ImageStatistics.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
|
||||
D:\BJTU\Reconstruction\Classes\Reconstruction.cpp(14,43): warning C4806: “==”: 不安全操作: 从类型“bool”提升到类型“int”的值不能等于给定的常量
|
||||
Reconstruction.vcxproj -> D:\BJTU\Reconstruction\x64\Debug\Reconstruction.exe
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -659,7 +659,7 @@ public:
|
||||
groupBox_6->setTitle(QString());
|
||||
label_21->setText(QApplication::translate("ReconstructionClass", "NO VIDEO", nullptr));
|
||||
pushButton_4->setText(QApplication::translate("ReconstructionClass", "\351\200\211\346\213\251\346\226\207\344\273\266", nullptr));
|
||||
label_18->setText(QApplication::translate("ReconstructionClass", "\350\275\275\345\205\245\346\212\225\345\275\261\345\233\276\346\241\210", nullptr));
|
||||
label_18->setText(QApplication::translate("ReconstructionClass", "\350\275\275\345\205\245\346\212\225\345\275\261\345\233\276\345\203\217", nullptr));
|
||||
groupBox_7->setTitle(QApplication::translate("ReconstructionClass", "\351\207\215\345\273\272\346\227\245\345\277\227", nullptr));
|
||||
groupBox_8->setTitle(QString());
|
||||
pushButton_9->setText(QApplication::translate("ReconstructionClass", "\347\233\270\346\234\272\346\213\215\347\205\247", nullptr));
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user