From eab98fd2123f1cfdfd839ed5d84f0c0e3e1612d6 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Mon, 23 Nov 2020 11:05:08 +0100 Subject: [PATCH] new about dialog --- src/meshlab/CMakeLists.txt | 4 +- src/meshlab/dialogs/about_dialog.cpp | 20 ++ src/meshlab/dialogs/about_dialog.h | 22 +++ src/meshlab/dialogs/about_dialog.ui | 221 ++++++++++++++++++++++ src/meshlab/mainwindow_RunTime.cpp | 19 +- src/meshlab/meshlab.pro | 4 +- src/meshlab/ui/aboutDialog.ui | 262 --------------------------- 7 files changed, 280 insertions(+), 272 deletions(-) create mode 100644 src/meshlab/dialogs/about_dialog.cpp create mode 100644 src/meshlab/dialogs/about_dialog.h create mode 100644 src/meshlab/dialogs/about_dialog.ui delete mode 100644 src/meshlab/ui/aboutDialog.ui diff --git a/src/meshlab/CMakeLists.txt b/src/meshlab/CMakeLists.txt index 80a21050b..328a1676d 100644 --- a/src/meshlab/CMakeLists.txt +++ b/src/meshlab/CMakeLists.txt @@ -23,6 +23,7 @@ set(SOURCES plugindialog.cpp saveSnapshotDialog.cpp savemaskexporter.cpp + dialogs/about_dialog.cpp dialogs/congrats_dialog.cpp rich_parameter_gui/richparameterlistdialog.cpp rich_parameter_gui/richparameterlistframe.cpp @@ -51,6 +52,7 @@ set(HEADERS saveSnapshotDialog.h savemaskexporter.h snapshotsetting.h + dialogs/about_dialog.h dialogs/congrats_dialog.h rich_parameter_gui/richparameterlistdialog.h rich_parameter_gui/richparameterlistframe.h @@ -64,8 +66,8 @@ set(HEADERS set(RESOURCES meshlab.qrc) set(UI + dialogs/about_dialog.ui dialogs/congrats_dialog.ui - ui/aboutDialog.ui ui/filterScriptDialog.ui ui/filtercreatortab.ui ui/filtergui.ui diff --git a/src/meshlab/dialogs/about_dialog.cpp b/src/meshlab/dialogs/about_dialog.cpp new file mode 100644 index 000000000..efcf4d699 --- /dev/null +++ b/src/meshlab/dialogs/about_dialog.cpp @@ -0,0 +1,20 @@ +#include "about_dialog.h" +#include "ui_about_dialog.h" + +#include "common/mlapplication.h" + +AboutDialog::AboutDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::AboutDialog) +{ + ui->setupUi(this); + ui->labelMLName->setText( + MeshLabApplication::completeName(MeshLabApplication::HW_ARCHITECTURE(QSysInfo::WordSize)) + "\n" + + "built on "+__DATE__+" with " + MeshLabApplication::compilerVersion() + + " and Qt " + MeshLabApplication::qtVersion() + "."); +} + +AboutDialog::~AboutDialog() +{ + delete ui; +} diff --git a/src/meshlab/dialogs/about_dialog.h b/src/meshlab/dialogs/about_dialog.h new file mode 100644 index 000000000..526681125 --- /dev/null +++ b/src/meshlab/dialogs/about_dialog.h @@ -0,0 +1,22 @@ +#ifndef ABOUT_DIALOG_H +#define ABOUT_DIALOG_H + +#include + +namespace Ui { +class AboutDialog; +} + +class AboutDialog : public QDialog +{ + Q_OBJECT + +public: + explicit AboutDialog(QWidget *parent = nullptr); + ~AboutDialog(); + +private: + Ui::AboutDialog *ui; +}; + +#endif // ABOUT_DIALOG_H diff --git a/src/meshlab/dialogs/about_dialog.ui b/src/meshlab/dialogs/about_dialog.ui new file mode 100644 index 000000000..b8558da05 --- /dev/null +++ b/src/meshlab/dialogs/about_dialog.ui @@ -0,0 +1,221 @@ + + + AboutDialog + + + + 0 + 0 + 1040 + 595 + + + + Dialog + + + + + + + + + + + 0 + 0 + + + + + + + :/images/meshlabLogo_256x256.png + + + Qt::AlignCenter + + + + + + + MESHLAB VERSION BUILT ON XXX + + + Qt::AlignCenter + + + + + + + + + Qt::Horizontal + + + + 13 + 20 + + + + + + + + + 0 + 0 + + + + + 0 + 300 + + + + <p><strong>General Info:&nbsp;<a href="http://www.meshlab.net">www.meshlab.net</a></strong></p> +<p>MeshLab is the most used open source system for processing and editing 3D triangular meshes. It provides a set of tools for editing, cleaning, healing, inspecting, rendering, texturing and converting meshes. It offers features for processing raw data produced by 3D digitization tools/devices and for preparing models for 3D printing. The system is heavily based on the <a href="http://www.vcglib.net">VCG library</a>. <br />Source code is available on <a href="https://github.com/cnr-isti-vclab/meshlab">GitHub </a>(protected by GPL).</p> +<p><strong>References</strong><br />Remember that the simplest way to show your appreciation of the MeshLab system is to remember citing it whenever you have used some of its functionalities. Please check the <a href="http://www.meshlab.net/#references">list of the many publications</a> related with MeshLab.</p> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + 3 + + + true + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + + 0 + 0 + + + + + 186 + 150 + + + + + + + :/images/logo.png + + + false + + + + + + + <p>Copyright(C) 2005-2020</p> +<p>Paolo Cignoni<br /><a href="http://vcg.isti.cnr.it/%7Ecignoni">http://vcg.isti.cnr.it/~cignoni</a></p> +<p>Visual Computing Lab<br /><a href="http://vcg.isti.cnr.it">http://vcg.isti.cnr.it</a></p> +<p>ISTI - CNR<br /><a href="http://www.isti.cnr.it">http://www.isti.cnr.it</a></p> + + + true + + + + + + + Qt::Horizontal + + + + 13 + 20 + + + + + + + + + + <p><strong>Contacts</strong><br />For detailed bug reports, meaningful feature requests and grounded technical issues please use the <a href="https://github.com/cnr-isti-vclab/meshlab/issues">GitHub services</a>.<br />For any other high-level question about MeshLab (<em>no bugs or feature requests, please</em>) contact:<br />- Paolo Cignoni (<a href="mailto:p.cignoni@isti.cnr.it?subject=%5BMeshLab%5D%20Info%20request">paolo.cignoni@isti.cnr.it</a>)<br />The complete list of contributors is available <a href="https://github.com/cnr-isti-vclab/meshlab/graphs/contributors">here</a>.<br />Some of the contributors of MeshLab have received financial support from various projects, acknowledged <a href="http://vcg.isti.cnr.it/projects.php">here</a>.</p> + + + true + + + true + + + + + + + + + + + + + + + buttonBox + accepted() + AboutDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + AboutDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index ffb0c16dc..625b43749 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -55,6 +55,7 @@ #include #include +#include "dialogs/about_dialog.h" using namespace std; using namespace vcg; @@ -2653,14 +2654,16 @@ bool MainWindow::saveSnapshot() } void MainWindow::about() { - QDialog *about_dialog = new QDialog(); - Ui::aboutDialog temp; - temp.setupUi(about_dialog); - temp.labelMLName->setText( - MeshLabApplication::completeName(MeshLabApplication::HW_ARCHITECTURE(QSysInfo::WordSize)) + "\n" + - "built on "+__DATE__+" with " + MeshLabApplication::compilerVersion() + - " and Qt " + MeshLabApplication::qtVersion() + "."); - about_dialog->show(); + AboutDialog* aboutDialog = new AboutDialog(this); + aboutDialog->show(); +// QDialog *about_dialog = new QDialog(); +// Ui::aboutDialog temp; +// temp.setupUi(about_dialog); +// temp.labelMLName->setText( +// MeshLabApplication::completeName(MeshLabApplication::HW_ARCHITECTURE(QSysInfo::WordSize)) + "\n" + +// "built on "+__DATE__+" with " + MeshLabApplication::compilerVersion() + +// " and Qt " + MeshLabApplication::qtVersion() + "."); +// about_dialog->show(); } void MainWindow::aboutPlugins() diff --git a/src/meshlab/meshlab.pro b/src/meshlab/meshlab.pro index c52db8bec..d0d425658 100644 --- a/src/meshlab/meshlab.pro +++ b/src/meshlab/meshlab.pro @@ -28,6 +28,7 @@ DEPENDPATH += \ HEADERS += \ mainwindow.h \ glarea.h \ + dialogs/about_dialog.h \ dialogs/congrats_dialog.h \ meshlab_settings/meshlabsettingsdialog.h \ meshlab_settings/settingdialog.h \ @@ -57,6 +58,7 @@ SOURCES += \ mainwindow_Init.cpp \ mainwindow_RunTime.cpp \ glarea.cpp \ + dialogs/about_dialog.cpp \ dialogs/congrats_dialog.cpp \ meshlab_settings/meshlabsettingsdialog.cpp \ meshlab_settings/settingdialog.cpp \ @@ -81,11 +83,11 @@ SOURCES += \ rich_parameter_gui/richparameterwidgets.cpp FORMS += \ + dialogs/about_dialog.ui \ dialogs/congrats_dialog.ui \ ui/layerDialog.ui \ ui/filterScriptDialog.ui \ ui/savesnapshotDialog.ui \ - ui/aboutDialog.ui \ ui/renametexture.ui \ ui/savemaskexporter.ui \ ui/filtergui.ui diff --git a/src/meshlab/ui/aboutDialog.ui b/src/meshlab/ui/aboutDialog.ui deleted file mode 100644 index e745082d1..000000000 --- a/src/meshlab/ui/aboutDialog.ui +++ /dev/null @@ -1,262 +0,0 @@ - - - aboutDialog - - - - 0 - 0 - 815 - 565 - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 65536 - 65536 - - - - About MeshLab - - - - .. - - - true - - - - - - - 0 - 0 - - - - - - - false - - - - - - - - - - - 0 - 0 - - - - - - - :/images/meshlabLogo_256x256.png - - - Qt::AlignCenter - - - - - - - MESHLAB VERSION BUILT ON XXX - - - Qt::AlignCenter - - - - - - - - - Qt::Horizontal - - - - 13 - 20 - - - - - - - - - 0 - 0 - - - - - 0 - 300 - - - - <p><strong>General Info:&nbsp;<a href="http://www.meshlab.net">www.meshlab.net</a></strong></p> -<p>MeshLab is the most used open source system for processing and editing 3D triangular meshes. It provides a set of tools for editing, cleaning, healing, inspecting, rendering, texturing and converting meshes. It offers features for processing raw data produced by 3D digitization tools/devices and for preparing models for 3D printing. The system is heavily based on the <a href="http://www.vcglib.net">VCG library</a>. <br />Source code is available on <a href="https://github.com/cnr-isti-vclab/meshlab">GitHub </a>(protected by GPL).</p> -<p><strong>References</strong><br />Remember that the simplest way to show your appreciation of the MeshLab system is to remember citing it whenever you have used some of its functionalities. Please check the <a href="http://www.meshlab.net/#references">list of the many publications</a> related with MeshLab.</p> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - 3 - - - true - - - - - - - - - - - - 0 - 0 - - - - - 186 - 150 - - - - - - - :/images/logo.png - - - false - - - - - - - <p>Copyright(C) 2005-2020</p> -<p>Paolo Cignoni<br /><a href="http://vcg.isti.cnr.it/%7Ecignoni">http://vcg.isti.cnr.it/~cignoni</a></p> -<p>Visual Computing Lab<br /><a href="http://vcg.isti.cnr.it">http://vcg.isti.cnr.it</a></p> -<p>ISTI - CNR<br /><a href="http://www.isti.cnr.it">http://www.isti.cnr.it</a></p> - - - true - - - - - - - Qt::Horizontal - - - - 13 - 20 - - - - - - - - - - <p><strong>Contacts</strong><br />For detailed bug reports, meaningful feature requests and grounded technical issues please use the <a href="https://github.com/cnr-isti-vclab/meshlab/issues">GitHub services</a>.<br />For any other high-level question about MeshLab (<em>no bugs or feature requests, please</em>) contact:<br />- Paolo Cignoni (<a href="mailto:p.cignoni@isti.cnr.it?subject=%5BMeshLab%5D%20Info%20request">paolo.cignoni@isti.cnr.it</a>)<br />The complete list of contributors is available <a href="https://github.com/cnr-isti-vclab/meshlab/graphs/contributors">here</a>.<br />Some of the contributors of MeshLab have received financial support from various projects, acknowledged <a href="http://vcg.isti.cnr.it/projects.php">here</a>.</p> - - - true - - - true - - - - - - - - - Qt::Horizontal - - - - 13 - 20 - - - - - - - - OK - - - - - - - - - - - - - - - - - - - - okButton - clicked() - aboutDialog - close() - - - 518 - 499 - - - 282 - 260 - - - - -