Some simple fleshing out of AboutDialog.
This commit is contained in:
+6
-10
@@ -7,19 +7,15 @@ project (glabels_qt)
|
|||||||
|
|
||||||
|
|
||||||
#=======================================
|
#=======================================
|
||||||
# Package and Version Information
|
# Version Information
|
||||||
#=======================================
|
#=======================================
|
||||||
set (Package_Name "glabels-qt")
|
set (Website "http://glabels.org")
|
||||||
set (Short_Name "glabels-qt")
|
|
||||||
set (Package_URL "https://github.com/jimevins/glabels-qt")
|
|
||||||
|
|
||||||
set (Major_Version "0")
|
set (Major_Version "3")
|
||||||
set (Minor_Version "0")
|
set (Minor_Version "99")
|
||||||
set (Bugfix_Version "0")
|
set (Micro_Version "0")
|
||||||
|
|
||||||
set (Package_Version "${Major_Version}.${Minor_Version}.${Bugfix_Version}")
|
set (Full_Version "${Major_Version}.${Minor_Version}.${Micro_Version}")
|
||||||
|
|
||||||
set (Unique_Package_Name ${Package_Name}-${API_Version})
|
|
||||||
|
|
||||||
|
|
||||||
#=======================================
|
#=======================================
|
||||||
|
|||||||
+24
-7
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "AboutDialog.h"
|
#include "AboutDialog.h"
|
||||||
|
|
||||||
|
#include "Version.h"
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
@@ -33,14 +34,30 @@ AboutDialog::AboutDialog( QWidget *parent )
|
|||||||
{
|
{
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
|
|
||||||
QString titleImage = ":images/glabels-label-designer.png";
|
QString version = tr("Version") + " " + Version::STRING;
|
||||||
QString version = "x.x.x";
|
|
||||||
QString description = tr("A program to create labels and business cards.");
|
QString description = tr("A program to create labels and business cards.");
|
||||||
|
|
||||||
|
QString copyright = "Copyright © 2017 Jim Evins <evins@snaught.com>";
|
||||||
|
|
||||||
|
QString licenseParagraph1 =
|
||||||
|
tr( "gLabels is free software: you can redistribute it and/or modify "
|
||||||
|
"it under the terms of the GNU General Public License as published by "
|
||||||
|
"the Free Software Foundation, either version 3 of the License, or "
|
||||||
|
"(at your option) any later version." );
|
||||||
|
|
||||||
QString markup = QString("<p><img src='%1'></p>").arg( titleImage )
|
QString licenseParagraph2 =
|
||||||
+ "<p>" + version + "</p>"
|
tr( "gLabels is distributed in the hope that it will be useful, "
|
||||||
+ "<p>" + description + "</p>"
|
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
|
||||||
+ "<p>Copyright © 2016 Jim Evins <evins@snaught.com></p>";
|
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
|
||||||
|
"GNU General Public License for more details." );
|
||||||
|
|
||||||
|
QString markup =
|
||||||
|
"<p align='center'>" + version + "</p>" +
|
||||||
|
"<p align='center'>" + description + "</p>" +
|
||||||
|
"<p align='center'>" + copyright + "</p>" +
|
||||||
|
"<p align='left'>" + licenseParagraph1 + "</p>" +
|
||||||
|
"<p align='left'>" + licenseParagraph2 + "</p>";
|
||||||
|
|
||||||
aboutLabel->setText( markup );
|
aboutLabel->setText( markup );
|
||||||
}
|
}
|
||||||
@@ -60,5 +77,5 @@ void AboutDialog::onLicenseButtonClicked()
|
|||||||
///
|
///
|
||||||
void AboutDialog::onWebsiteButtonClicked()
|
void AboutDialog::onWebsiteButtonClicked()
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl( QUrl("http://glabels.org/") );
|
QDesktopServices::openUrl( QUrl(Version::WEBSITE) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ cmake_minimum_required (VERSION 2.8.12)
|
|||||||
project (app CXX)
|
project (app CXX)
|
||||||
|
|
||||||
|
|
||||||
|
#=======================================
|
||||||
|
# Auto-generate Version.h
|
||||||
|
#=======================================
|
||||||
|
configure_file (Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/Version.h @ONLY)
|
||||||
|
|
||||||
|
|
||||||
#=======================================
|
#=======================================
|
||||||
# Sources
|
# Sources
|
||||||
#=======================================
|
#=======================================
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/* Version.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2016 Jim Evins <evins@snaught.com>
|
||||||
|
*
|
||||||
|
* This file is part of gLabels-qt.
|
||||||
|
*
|
||||||
|
* gLabels-qt is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* gLabels-qt is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with gLabels-qt. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef glabels_Version_h
|
||||||
|
#define glabels_Version_h
|
||||||
|
|
||||||
|
|
||||||
|
namespace Version
|
||||||
|
{
|
||||||
|
const QString WEBSITE = "@Website@";
|
||||||
|
|
||||||
|
const int MAJOR = @Major_Version@;
|
||||||
|
const int MINOR = @Minor_Version@;
|
||||||
|
const int MICRO = @Micro_Version@;
|
||||||
|
|
||||||
|
const QString STRING = "@Full_Version@";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // glabels_Version_h
|
||||||
+28
-25
@@ -9,8 +9,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>379</width>
|
<width>456</width>
|
||||||
<height>317</height>
|
<height>497</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<property name="modal">
|
<property name="modal">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="Icon">
|
<widget class="QLabel" name="Icon">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -39,6 +39,19 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../images.qrc">:/images/glabels-label-designer.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="aboutLabel">
|
<widget class="QLabel" name="aboutLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -48,7 +61,10 @@
|
|||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::RichText</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>10</number>
|
<number>10</number>
|
||||||
@@ -57,19 +73,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="licenseButton">
|
<widget class="QPushButton" name="licenseButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -85,14 +88,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="closeButton">
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="text">
|
|
||||||
<string>&Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -104,6 +100,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="closeButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Close</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user