New message box about program.

--HG--
branch : develop
This commit is contained in:
dismine 2013-10-23 13:40:51 +03:00
parent ef8d2957a7
commit aac3dca764
3 changed files with 22 additions and 2 deletions

View File

@ -206,7 +206,8 @@ HEADERS += mainwindow.h \
dialogs/dialogtriangle.h \ dialogs/dialogtriangle.h \
dialogs/dialogpointofintersection.h \ dialogs/dialogpointofintersection.h \
tools/drawTools/vtoolpointofintersection.h \ tools/drawTools/vtoolpointofintersection.h \
tools/modelingTools/vmodelingpointofintersection.h tools/modelingTools/vmodelingpointofintersection.h \
version.h
FORMS += mainwindow.ui \ FORMS += mainwindow.ui \
dialogs/dialogsinglepoint.ui \ dialogs/dialogsinglepoint.ui \

View File

@ -36,6 +36,7 @@
#include "exception/vexceptionemptyparameter.h" #include "exception/vexceptionemptyparameter.h"
#include "exception/vexceptionwrongparameterid.h" #include "exception/vexceptionwrongparameterid.h"
#include "exception/vexceptionuniqueid.h" #include "exception/vexceptionuniqueid.h"
#include "version.h"
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), ui(new Ui::MainWindow), tool(Tool::ArrowTool), currentScene(0), sceneDraw(0), 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(){ 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("<h1>%1</h1> %2 <br/><br/> %3 <br/><br/> %4")).arg(fullName).arg(qtBase).arg(buildOn).arg(WARRANTY);
QMessageBox::about(this, tr("About Valentina"), about);
} }
void MainWindow::AboutQt(){ void MainWindow::AboutQt(){

14
version.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef VERSION_H
#define VERSION_H
#include <QtCore/QString>
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