Merge branch 'release/0.2'

feature/qt-as-conan-package
mandlm 2019-01-30 21:42:37 +01:00
commit baf8532edf
4 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6)
set(BUILD_VERSION_MAJOR_MINOR 0.1)
set(BUILD_VERSION_MAJOR_MINOR 0.2)
if ($ENV{BUILD_NUMBER})
set(BUILD_VERSION_PATCH $ENV{BUILD_NUMBER})

View File

@ -1,6 +1,8 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "version.h"
#include <QJsonObject>
#include <QJsonDocument>
#include <QFile>
@ -58,6 +60,8 @@ void MainWindow::setupUi()
connect(ui->actionPrint, &QAction::triggered, this, &MainWindow::print);
connect(ui->actionExport_PDF, &QAction::triggered, this, qOverload<>(&MainWindow::savePdf));
connect(ui->actionAbout, &QAction::triggered, this, &MainWindow::aboutDialog);
connect(&m_dataModel, &DataModel::modelChanged, this, &MainWindow::dataModelChanged);
}
@ -235,3 +239,10 @@ void MainWindow::savePdf(const QString &filename)
printDoc.print(&printer);
}
void MainWindow::aboutDialog()
{
QString infoString =
QString::fromUtf8(ESGRAF48_DESCRIPTION) + " Version " + QString::fromUtf8(ESGRAF48_VERSION);
QMessageBox::information(this, ESGRAF48_DESCRIPTION, infoString);
}

View File

@ -38,6 +38,7 @@ public slots:
void print() const;
void dataModelChanged();
void savePdf();
void aboutDialog();
protected:
void closeEvent(QCloseEvent *event) override;

View File

@ -137,7 +137,14 @@
<addaction name="separator"/>
<addaction name="actionQuit"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
@ -237,6 +244,11 @@
<string>Export as PDF file</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
<string>About</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>