1
/***************************************************************************
3
Description : Definition of global constants and enums
4
--------------------------------------------------------------------
5
Copyright : (C) 2006-2009 Tilman Benkert (thzs*gmx.net)
6
Copyright : (C) 2006-2007 Ion Vasilief (ion_vasilief*yahoo.fr)
7
(replace * with @ in the email addresses)
9
***************************************************************************/
12
#include <QMessageBox>
15
#include <QMetaObject>
18
#include "ui_SciDAVisAbout.h"
20
// Don't forget to change the Doxyfile, the splash screen and the Windows
21
// installer when changing these!
22
const int SciDAVis::scidavis_version = 0x000203;
24
const char * SciDAVis::extra_version = "";
26
const char * SciDAVis::copyright_string = "\
31
The following people have written parts of the SciDAVis source code, ranging from a few lines to large chunks.\n\
32
In alphabetical order.\n\
34
Tilman Benkert[1], Knut Franke\n\
36
--- Documentation ---\n\
38
The following people have written parts of the manual and/or other documentation.\n\
39
In alphabetical order.\n\
41
Knut Franke, Roger Gadiou\n\
43
--- Translations ---\n\
45
The following people have contributed translations or parts thereof.\n\
46
In alphabetical order.\n\
48
Tilman Benkert[1], Markus Bongard, Tobias Burnus, R�my Claverie, f0ma, Jos� Antonio Lorenzo Fern�ndez, \
49
Daniel Klaer, Peter Landgren, Fellype do Nascimento, Tomomasa Ohkubo, Mikhail Shevyakov, Mauricio Troviano\n\
53
The following people have made installing SciDAVis easier by providing specialized binary packages.\n\
54
In alphabetical order.\n\
56
Burkhard Bunk (Debian), Quentin Denis (SUSE), Yu-Hung Lien (Mac OS X), Fellype do Nascimento (Slackware), \
57
Eric Tanguy (Fedora), Mauricio Troviano (Windows installer)\n\
61
SciDAVis uses code from QtiPlot, which consisted (at the time of the fork, i.e. QtiPlot 0.9-rc2) of code by the following people:\n\
63
Tilman Benkert[1], Shen Chen, Borries Demeler, Jos� Antonio Lorenzo Fern�ndez, Knut Franke, Vasileios Gkanis, Gudjon Gudjonsson, \
64
Alex Kargovsky, Michael Mac-Vicar, Tomomasa Ohkubo, Aaron Van Tassle, Branimir Vasilic, Ion Vasilief, Vincent Wagelaar\n\
66
The SciDAVis manual is based on the QtiPlot manual, written by (in alphabetical order):\n\
68
Knut Franke, Roger Gadiou, Ion Vasilief\n\
71
[1] birth name: Tilman H�ner zu Siederdissen\n\
73
=== Special Thanks ===\n\
75
We also want to acknowledge the people having helped us indirectly by contributing to the following\n\
76
fine pieces of software. In no particular order.\n\
78
Qt (http://doc.trolltech.com/4.3/credits.html),\n\
79
Qwt (http://qwt.sourceforge.net/#credits),\n\
80
Qwtplot3D (http://qwtplot3d.sourceforge.net/),\n\
81
muParser (http://muparser.sourceforge.net/),\n\
82
Python (http://www.python.org/),\n\
83
liborigin (http://sourceforge.net/projects/liborigin/),\n\
84
Vim (http://www.vim.org/thanks.php/),\n\
85
webgen (http://webgen.rubyforge.org/),\n\
86
Doxygen (http://www.doxygen.org/),\n\
87
Subversion (http://subversion.tigris.org/),\n\
88
GSL (http://www.gnu.org/software/gsl/)\n\
90
... and many more we just forgot to mention.\n";
92
const char * SciDAVis::release_date = " 2009-07-05";
94
int SciDAVis::version()
96
return scidavis_version;
99
QString SciDAVis::versionString()
102
QString::number((scidavis_version & 0xFF0000) >> 16)+"."+
103
QString::number((scidavis_version & 0x00FF00) >> 8)+"."+
104
QString::number(scidavis_version & 0x0000FF);
107
QString SciDAVis::extraVersion()
109
return QString(extra_version);
112
void SciDAVis::about()
114
QString text = QString(SciDAVis::copyright_string);
115
text.replace(QRegExp("\\[1\\]"), "<sup>1</sup>");
116
text.replace("�","é");
117
text.replace("�","á");
118
text.replace("�", "ö");
119
text.replace("\n", "<br>");
120
text.replace("=== ", "<h1>");
121
text.replace(" ===","</h1>");
122
text.replace("--- ", "<h2>");
123
text.replace(" ---","</h2>");
124
text.replace(" ---","</h2>");
125
text.replace("</h1><br><br>", "</h1>");
126
text.replace("</h2><br><br>", "</h2>");
127
text.replace("<br><h1>", "<h1>");
128
text.replace("<br><h2>", "<h2>");
130
QDialog *dialog = new QDialog();
131
Ui::SciDAVisAbout ui;
133
dialog->setAttribute(Qt::WA_DeleteOnClose);
134
dialog->setWindowTitle(QObject::tr("About SciDAVis"));
135
ui.version_label->setText(versionString() + extraVersion());
136
ui.release_date_label->setText(QObject::tr("Released") + ": " + QString(SciDAVis::release_date));
137
ui.credits_box->setHtml(text);
142
QString SciDAVis::copyrightString()
144
return copyright_string;
147
QString SciDAVis::releaseDateString()
152
QString SciDAVis::enumValueToString(int key, const QString& enum_name)
154
int index = staticMetaObject.indexOfEnumerator(enum_name.toAscii());
155
if(index == -1) return QString("invalid");
156
QMetaEnum meta_enum = staticMetaObject.enumerator(index);
157
return QString(meta_enum.valueToKey(key));
160
int SciDAVis::enumStringToValue(const QString& string, const QString& enum_name)
162
int index = staticMetaObject.indexOfEnumerator(enum_name.toAscii());
163
if(index == -1) return -1;
164
QMetaEnum meta_enum = staticMetaObject.enumerator(index);
165
return meta_enum.keyToValue(string.toAscii());