From 22f4fbfbecca12ba0ab2ad41960d794a5fbcdebc Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Mon, 14 May 2007 10:46:06 +0000 Subject: [PATCH] Added cngrt dialog --- src/meshlab/images/100mesh.html | 25 +++++++++++++++++++++++++ src/meshlab/mainwindow_Init.cpp | 24 ++++++++++++++++++++++++ src/meshlab/meshlab.pro | 3 ++- src/meshlab/meshlab.qrc | 1 + 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/meshlab/images/100mesh.html diff --git a/src/meshlab/images/100mesh.html b/src/meshlab/images/100mesh.html new file mode 100644 index 000000000..09599b16a --- /dev/null +++ b/src/meshlab/images/100mesh.html @@ -0,0 +1,25 @@ + + + + +
+
+ + Congratulations! +
+
+ You have successfully used MeshLab to open and process more than one hundred meshes!
+ We hope that this means that you have found MeshLab useful.

+ Please consider to send a short email to the developers of MeshLab, describing how MeshLab fitted your needs, + attach to the email some screenshots of your processed meshes and tell us your impression about MeshLab.
+
+ MeshLab is developed on public funding and assessment of its impact on the whole community is necessary, so, please, spend a couple of minutes writing down a mail to us.
+ Thanks for using MeshLab
+
+ Paolo Cignoni
+
+
+
+
+ + \ No newline at end of file diff --git a/src/meshlab/mainwindow_Init.cpp b/src/meshlab/mainwindow_Init.cpp index d40480d86..6476ca118 100644 --- a/src/meshlab/mainwindow_Init.cpp +++ b/src/meshlab/mainwindow_Init.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.76 2007/05/14 10:46:04 cignoni +Added cngrt dialog + Revision 1.75 2007/04/16 09:24:37 cignoni ** big change ** Added Layers managemnt. @@ -141,6 +144,7 @@ Added short key lastFilter #include "plugindialog.h" #include "customDialog.h" #include "saveSnapshotDialog.h" +#include "ui_congratsDialog.h" QProgressBar *MainWindow::qb; @@ -661,6 +665,26 @@ void MainWindow::setCurrentFile(const QString &fileName) if(loadedMeshCounter-lastComunicatedValue>connectionInterval && !myLocalBuf.isOpen()) { checkForUpdates(false); + + int congratsMeshCounter = settings.value("congratsMeshCounter",0).toInt(); + if(loadedMeshCounter > congratsMeshCounter + 100 ) + { + QFile txtFile(":/images/100mesh.html"); + txtFile.open(QIODevice::ReadOnly | QIODevice::Text); + QString tttt=txtFile.readAll(); + // This preference values store when you did the last request for a mail + settings.setValue("congratsMeshCounter",loadedMeshCounter); + + QDialog *congratsDialog = new QDialog(); + Ui::CongratsDialog temp; + temp.setupUi(congratsDialog); + + temp.buttonBox->addButton("Send Mail", QDialogButtonBox::AcceptRole); + temp.congratsTextEdit->setHtml(tttt); + congratsDialog->exec(); + if(congratsDialog->result()==QDialog::Accepted) + QDesktopServices::openUrl(QUrl("mailto:p.cignoni@isti.cnr.it?subject=[MeshLab] Reporting Info on MeshLab Usage")); + } } } diff --git a/src/meshlab/meshlab.pro b/src/meshlab/meshlab.pro index fd36418f3..133b9ab5c 100644 --- a/src/meshlab/meshlab.pro +++ b/src/meshlab/meshlab.pro @@ -48,7 +48,8 @@ FORMS = ui/layerDialog.ui \ ui/aboutDialog.ui \ ui/renametexture.ui \ ui/savemaskexporter.ui \ - ui/GenericELDialog.ui + ui/GenericELDialog.ui \ + ui/congratsDialog.ui RESOURCES = meshlab.qrc diff --git a/src/meshlab/meshlab.qrc b/src/meshlab/meshlab.qrc index b981643f8..68da75b3a 100644 --- a/src/meshlab/meshlab.qrc +++ b/src/meshlab/meshlab.qrc @@ -30,5 +30,6 @@ images/layer_eye_close.png images/layer_edit_locked.png images/layer_edit_unlocked.png + images/100mesh.html