Add Qt version to About, remove changelog
This commit is contained in:
parent
d4ec14584d
commit
12dba1a8b3
3 changed files with 84 additions and 113 deletions
|
@ -1,117 +1,89 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>AboutPorymap</class>
|
<class>AboutPorymap</class>
|
||||||
<widget class="QMainWindow" name="AboutPorymap">
|
<widget class="QDialog" name="AboutPorymap">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>582</width>
|
<width>383</width>
|
||||||
<height>438</height>
|
<height>121</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>About Porymap</string>
|
<string>About Porymap</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<item>
|
||||||
<item>
|
<widget class="QLabel" name="label_Title">
|
||||||
<widget class="QLabel" name="label_Title">
|
<property name="font">
|
||||||
<property name="font">
|
<font>
|
||||||
<font>
|
<family>Arial</family>
|
||||||
<family>Arial</family>
|
<pointsize>22</pointsize>
|
||||||
<pointsize>22</pointsize>
|
<bold>true</bold>
|
||||||
<weight>75</weight>
|
<underline>false</underline>
|
||||||
<bold>true</bold>
|
<kerning>true</kerning>
|
||||||
<underline>false</underline>
|
</font>
|
||||||
<kerning>true</kerning>
|
</property>
|
||||||
</font>
|
<property name="text">
|
||||||
</property>
|
<string>Porymap</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Porymap</string>
|
<property name="textFormat">
|
||||||
</property>
|
<enum>Qt::TextFormat::RichText</enum>
|
||||||
<property name="textFormat">
|
</property>
|
||||||
<enum>Qt::RichText</enum>
|
<property name="alignment">
|
||||||
</property>
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
<property name="alignment">
|
</property>
|
||||||
<set>Qt::AlignCenter</set>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QLabel" name="label_Version">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<widget class="QLabel" name="label_Version">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<property name="sizePolicy">
|
<horstretch>0</horstretch>
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<verstretch>0</verstretch>
|
||||||
<horstretch>0</horstretch>
|
</sizepolicy>
|
||||||
<verstretch>0</verstretch>
|
</property>
|
||||||
</sizepolicy>
|
<property name="font">
|
||||||
</property>
|
<font>
|
||||||
<property name="font">
|
<family>Arial</family>
|
||||||
<font>
|
<pointsize>12</pointsize>
|
||||||
<family>Arial</family>
|
</font>
|
||||||
<pointsize>12</pointsize>
|
</property>
|
||||||
</font>
|
<property name="alignment">
|
||||||
</property>
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
<property name="alignment">
|
</property>
|
||||||
<set>Qt::AlignCenter</set>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QLabel" name="label_Description">
|
||||||
<item>
|
<property name="font">
|
||||||
<widget class="QLabel" name="label_Description">
|
<font>
|
||||||
<property name="font">
|
<family>Arial</family>
|
||||||
<font>
|
</font>
|
||||||
<family>Arial</family>
|
</property>
|
||||||
</font>
|
<property name="text">
|
||||||
</property>
|
<string>Map editor for pokeemerald, pokefirered and pokeruby.</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Map editor for pokeemerald, pokefirered and pokeruby.</string>
|
<property name="alignment">
|
||||||
</property>
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
<property name="alignment">
|
</property>
|
||||||
<set>Qt::AlignCenter</set>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QLabel" name="label_Manual">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QLabel" name="label_Manual">
|
<string><html><head/><body><p>Official Documentation: <a href="https://huderlem.github.io/porymap/"><span style=" text-decoration: underline; color:#0069d9;">https://huderlem.github.io/porymap/</span></a></p></body></html></string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string><html><head/><body><p>Official Documentation: <a href="https://huderlem.github.io/porymap/"><span style=" text-decoration: underline; color:#0069d9;">https://huderlem.github.io/porymap/</span></a></p></body></html></string>
|
<property name="alignment">
|
||||||
</property>
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
<property name="alignment">
|
</property>
|
||||||
<set>Qt::AlignCenter</set>
|
<property name="openExternalLinks">
|
||||||
</property>
|
<bool>true</bool>
|
||||||
<property name="openExternalLinks">
|
</property>
|
||||||
<bool>true</bool>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
</layout>
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextBrowser" name="textBrowser">
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenuBar" name="menubar">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>582</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QMainWindow>
|
#include <QDialog>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AboutPorymap;
|
class AboutPorymap;
|
||||||
}
|
}
|
||||||
|
|
||||||
class AboutPorymap : public QMainWindow
|
class AboutPorymap : public QDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit AboutPorymap(QWidget *parent = nullptr);
|
explicit AboutPorymap(QWidget *parent = nullptr);
|
||||||
|
|
|
@ -1,22 +1,21 @@
|
||||||
#include "aboutporymap.h"
|
#include "aboutporymap.h"
|
||||||
#include "ui_aboutporymap.h"
|
#include "ui_aboutporymap.h"
|
||||||
#include "log.h"
|
|
||||||
|
|
||||||
AboutPorymap::AboutPorymap(QWidget *parent) :
|
AboutPorymap::AboutPorymap(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::AboutPorymap)
|
ui(new Ui::AboutPorymap)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
QString versionInfo = QString("Version %1 - %2").arg(QCoreApplication::applicationVersion()).arg(QStringLiteral(__DATE__));
|
|
||||||
|
|
||||||
static const QString commitHash = PORYMAP_LATEST_COMMIT;
|
static const QString commitHash = PORYMAP_LATEST_COMMIT;
|
||||||
if (!commitHash.isEmpty())
|
this->ui->label_Version->setText(QString("Version %1%2\nQt %3 (%4)\n%5")
|
||||||
versionInfo.append(QString("\nCommit %1").arg(commitHash));
|
.arg(QCoreApplication::applicationVersion())
|
||||||
|
.arg(commitHash.isEmpty() ? "" : QString(" (%1)").arg(commitHash))
|
||||||
this->ui->label_Version->setText(versionInfo);
|
.arg(QStringLiteral(QT_VERSION_STR))
|
||||||
this->ui->textBrowser->setSource(QUrl("qrc:/CHANGELOG.md"));
|
.arg(QSysInfo::buildCpuArchitecture())
|
||||||
|
.arg(QStringLiteral(__DATE__))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
AboutPorymap::~AboutPorymap()
|
AboutPorymap::~AboutPorymap()
|
||||||
|
|
Loading…
Reference in a new issue