diff --git a/Valentina.pro b/Valentina.pro index f9b662a95..b523128a3 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -206,7 +206,8 @@ HEADERS += mainwindow.h \ dialogs/dialogtriangle.h \ dialogs/dialogpointofintersection.h \ tools/drawTools/vtoolpointofintersection.h \ - tools/modelingTools/vmodelingpointofintersection.h + tools/modelingTools/vmodelingpointofintersection.h \ + version.h FORMS += mainwindow.ui \ dialogs/dialogsinglepoint.ui \ diff --git a/mainwindow.cpp b/mainwindow.cpp index e1d04f1f0..72b05ef32 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -36,6 +36,7 @@ #include "exception/vexceptionemptyparameter.h" #include "exception/vexceptionwrongparameterid.h" #include "exception/vexceptionuniqueid.h" +#include "version.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), tool(Tool::ArrowTool), currentScene(0), sceneDraw(0), @@ -523,7 +524,11 @@ void MainWindow::ClosedDialogPointOfIntersection(int result){ } void MainWindow::About(){ - QMessageBox::about(this, tr("About Valentina"), tr("Valentina v.0.1.0")); + QString fullName = QString("Valentina %1").arg(APP_VERSION); + QString qtBase(tr("Based on Qt %2 (32 bit)").arg(QT_VERSION_STR)); + QString buildOn(tr("Built on %3 at %4").arg(__DATE__).arg(__TIME__)); + QString about = QString(tr("

%1

%2

%3

%4")).arg(fullName).arg(qtBase).arg(buildOn).arg(WARRANTY); + QMessageBox::about(this, tr("About Valentina"), about); } void MainWindow::AboutQt(){ diff --git a/version.h b/version.h new file mode 100644 index 000000000..4c5d92805 --- /dev/null +++ b/version.h @@ -0,0 +1,14 @@ +#ifndef VERSION_H +#define VERSION_H + +#include + +extern const int MAJOR_VERSION = 0; +extern const int MINOR_VERSION = 1; +extern const int DEBUG_VERSION = 0; + +extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION) + .arg(MINOR_VERSION) + .arg(DEBUG_VERSION)); +extern const QString WARRANTY(QT_TR_NOOP("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.")); +#endif // VERSION_H