refine
This commit is contained in:
21
Classes/AboutDialog.cpp
Normal file
21
Classes/AboutDialog.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "AboutDialog.h"
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent)
|
||||
: QDialog(parent), ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->textEdit->setReadOnly(true);
|
||||
auto w = ui->label->width();
|
||||
auto h = ui->label->height();
|
||||
ui->label->setPixmap(QPixmap(":/Reconstruction/image/common/logo.png").scaled(w, h, Qt::KeepAspectRatio));
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void AboutDialog::on_pushButton_clicked() {
|
||||
QDialog::accept();
|
||||
}
|
||||
23
Classes/AboutDialog.h
Normal file
23
Classes/AboutDialog.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_aboutdialog.h"
|
||||
#include <QtWidgets/QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AboutDialog;
|
||||
}
|
||||
|
||||
class AboutDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AboutDialog(QWidget *parent = Q_NULLPTR);
|
||||
~AboutDialog();
|
||||
|
||||
public slots:
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::AboutDialog *ui;
|
||||
};
|
||||
@@ -61,6 +61,12 @@ Reconstruction::Reconstruction(QWidget* parent)
|
||||
#pragma region Style
|
||||
void Reconstruction::setStyle()
|
||||
{
|
||||
QAction* aboutAction = ui.menuBar->addAction(tr("About"), this, SLOT(about()));
|
||||
aboutAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_A));
|
||||
|
||||
QAction* quitAction = ui.menuBar->addAction(tr("Exit"), this, SLOT(close()));
|
||||
quitAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q));
|
||||
|
||||
this->setContentsMargins(0, 0, 0, 0);
|
||||
// this->setFixedSize(1240, 680);
|
||||
// ui.centralWidget->setGeometry(0, 40, 1240, 680);
|
||||
@@ -216,6 +222,7 @@ void Reconstruction::updateQVTK(PointCloud<PointXYZRGB> cloud, QColor color)
|
||||
{
|
||||
boost::shared_ptr<visualization::PCLVisualizer> viewer;
|
||||
visualization::Camera camera;
|
||||
double size = 1;
|
||||
if (PointCloudData::getInstance() != nullptr)
|
||||
{
|
||||
auto pclData = PointCloudData::getInstance();
|
||||
@@ -229,6 +236,7 @@ void Reconstruction::updateQVTK(PointCloud<PointXYZRGB> cloud, QColor color)
|
||||
if(location)
|
||||
{
|
||||
viewer->setCameraParameters(camera);
|
||||
pclData->getViewer()->getPointCloudRenderingProperties(visualization::PCL_VISUALIZER_POINT_SIZE, size, "cloud");
|
||||
}else
|
||||
{
|
||||
location = true;
|
||||
@@ -249,8 +257,7 @@ void Reconstruction::updateQVTK(PointCloud<PointXYZRGB> cloud, QColor color)
|
||||
pclData->setViewer(viewer);
|
||||
pclData->setUI(ui);
|
||||
}
|
||||
double size = 1;
|
||||
viewer->getPointCloudRenderingProperties(visualization::PCL_VISUALIZER_POINT_SIZE, size, "cloud");
|
||||
|
||||
viewer->removeAllPointClouds();
|
||||
if (cloud.size() != 0)
|
||||
{
|
||||
@@ -785,3 +792,13 @@ void Reconstruction::on_pushButton_18_clicked()
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
void Reconstruction::about()
|
||||
{
|
||||
AboutDialog* aboutDialog;
|
||||
aboutDialog = new AboutDialog(this);
|
||||
aboutDialog->setWindowFlags(Qt::Window);
|
||||
aboutDialog->setWindowModality(Qt::ApplicationModal);
|
||||
aboutDialog->setWindowTitle(QString::fromLocal8Bit("关于"));
|
||||
aboutDialog->show();
|
||||
}
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "QVTKWidget.h"
|
||||
#include "vtkRenderWindow.h"
|
||||
#include "Help.h"
|
||||
#include "AboutDialog.h"
|
||||
#include <iostream>
|
||||
#include<vtkAutoInit.h>
|
||||
|
||||
@@ -122,4 +123,5 @@ private slots:
|
||||
void on_pushButton_19_clicked();
|
||||
void setPicAction(QString action);
|
||||
void setCloud();
|
||||
void about();
|
||||
};
|
||||
93
DialogButtonRight.ui
Normal file
93
DialogButtonRight.ui
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutDialog</class>
|
||||
<widget class="QDialog" name="AboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>407</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>13</x>
|
||||
<y>16</y>
|
||||
<width>271</width>
|
||||
<height>271</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">结构光三维重建软件 V1.0</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;"> 基于相机和结构光投影仪实现的三维重构软件。通过投影基于 DeBruijn 序列编码的条纹图案,对捕获的图片进行结构光解码,获得物体的三维点云数据并可视化展示。</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"><br /></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">版权所有:北京交通大学</span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">17301138@bjtu.edu.cn</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>220</y>
|
||||
<width>93</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关闭</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>60</y>
|
||||
<width>91</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>Resources/image/common/logo.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>closeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>351</x>
|
||||
<y>38</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>233</x>
|
||||
<y>29</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -94,12 +94,14 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="UI\AboutDialog.ui" />
|
||||
<QtUic Include="UI\DisplayPic.ui" />
|
||||
<QtUic Include="UI\Help.ui" />
|
||||
<QtUic Include="UI\Loading.ui" />
|
||||
<QtUic Include="UI\Reconstruction.ui" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Classes\AboutDialog.cpp" />
|
||||
<ClCompile Include="Classes\API.cpp" />
|
||||
<ClCompile Include="Classes\bsxfun.cpp" />
|
||||
<ClCompile Include="Classes\CalibrationData.cpp" />
|
||||
@@ -151,6 +153,7 @@
|
||||
<QtRcc Include="Resources\Reconstruction.qrc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="Classes\AboutDialog.h" />
|
||||
<ClInclude Include="Classes\API.h" />
|
||||
<ClInclude Include="Classes\bsxfun.h" />
|
||||
<ClInclude Include="Classes\CalibrationData.h" />
|
||||
|
||||
@@ -81,6 +81,9 @@
|
||||
<QtUic Include="UI\Help.ui">
|
||||
<Filter>ui</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="UI\AboutDialog.ui">
|
||||
<Filter>ui</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Classes\main.cpp">
|
||||
@@ -212,6 +215,9 @@
|
||||
<ClCompile Include="Classes\HisThread.cpp">
|
||||
<Filter>src\scene\resultscene</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Classes\AboutDialog.cpp">
|
||||
<Filter>src\scene\common</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="Classes\Reconstruction.h">
|
||||
@@ -226,6 +232,9 @@
|
||||
<QtMoc Include="Classes\Help.h">
|
||||
<Filter>src\scene\resultscene</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Classes\AboutDialog.h">
|
||||
<Filter>src\scene\common</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="Resources\Reconstruction.qrc">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<qresource prefix="/Reconstruction">
|
||||
<file>image/loading/loading.png</file>
|
||||
<file>image/reconstruction/help.png</file>
|
||||
<file>image/common/logo.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/icon">
|
||||
<file>image/common/3D.png</file>
|
||||
|
||||
BIN
Resources/image/common/logo.png
Normal file
BIN
Resources/image/common/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
93
UI/AboutDialog.ui
Normal file
93
UI/AboutDialog.ui
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutDialog</class>
|
||||
<widget class="QDialog" name="AboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>407</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>13</x>
|
||||
<y>16</y>
|
||||
<width>271</width>
|
||||
<height>271</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">结构光三维重建软件 V1.0</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;"> 基于相机和结构光投影仪实现的三维重构软件。通过投影基于 DeBruijn 序列编码的条纹图案,对捕获的图片进行结构光解码,获得物体的三维点云数据并可视化展示。</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"><br /></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">版权所有:北京交通大学</span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">17301138@bjtu.edu.cn</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>220</y>
|
||||
<width>93</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关闭</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>60</y>
|
||||
<width>91</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../Resources/image/common/logo.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>closeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>351</x>
|
||||
<y>38</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>233</x>
|
||||
<y>29</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -451,7 +451,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>640</width>
|
||||
<height>512</height>
|
||||
<height>511</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
@@ -588,7 +588,7 @@
|
||||
<x>690</x>
|
||||
<y>200</y>
|
||||
<width>291</width>
|
||||
<height>211</height>
|
||||
<height>231</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@@ -1709,6 +1709,7 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@@ -1718,32 +1719,7 @@
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menusettings">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>相机设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuabout">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
</widget>
|
||||
<addaction name="menusettings"/>
|
||||
<addaction name="menuabout"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<action name="actioncamera">
|
||||
<property name="text">
|
||||
<string>camera</string>
|
||||
|
||||
Reference in New Issue
Block a user