Added cngrt dialog

This commit is contained in:
Paolo Cignoni cignoni 2007-05-14 10:46:06 +00:00
parent 0689eda28b
commit 22f4fbfbec
4 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,25 @@
<html>
<head>
</head>
<body>
<center>
<div style="text-align: center;">
<span style="font-family: Lucida Sans; font-size: 18pt;">
Congratulations!
</span><br />
<span style="font-family: Lucida Sans;"><br />
You have successfully used MeshLab to open and process more than <em> one hundred meshes</em>!<br />
We hope that this means that you have found MeshLab useful.<br/><br/>
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. <br />
<br/>
MeshLab is developed on public funding and assessment of its impact on the whole community is necessary, so, <em>please</em>, spend a couple of minutes writing down a mail to us.<br />
Thanks for using MeshLab<br />
<br />
Paolo Cignoni<br />
<br />
</span>
</div>
</center>
</body>
</html>

View File

@ -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"));
}
}
}

View File

@ -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

View File

@ -30,5 +30,6 @@
<file>images/layer_eye_close.png</file>
<file>images/layer_edit_locked.png</file>
<file>images/layer_edit_unlocked.png</file>
<file>images/100mesh.html</file>
</qresource>
</RCC>