-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e463a33
commit 609c6bd
Showing
7 changed files
with
1,179 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,47 @@ | ||
#include "about.h" | ||
#include "ui_about.h" | ||
|
||
#include <QDebug> | ||
#include <QDesktopServices> | ||
|
||
#define STRINGIFY(string) LOCALSTRING(string) | ||
#define LOCALSTRING(string) #string | ||
|
||
About::About(QWidget *parent) : QDialog(parent), ui(new Ui::About) | ||
{ | ||
ui->setupUi(this); | ||
|
||
connect(ui->btnOk, &QPushButton::clicked, [this]() { this->close(); }); | ||
|
||
// Ascii flow | ||
ui->labelAsciiFlowVersion->setText(STRINGIFY(GIT_COMMIT_HASH)); | ||
ui->labelAsciiFlowBranch->setText(STRINGIFY(GIT_BRANCH)); | ||
ui->labelAsciiFlowDescription->setText(STRINGIFY(GIT_DESCRIPTION)); | ||
|
||
connect(ui->commandLinkButtonHomeAsciiFlow, &QCommandLinkButton::pressed, | ||
[this]() { | ||
QString link = ui->commandLinkButtonHomeAsciiFlow->text(); | ||
link.remove(0, 1); | ||
bool res = QDesktopServices::openUrl(QUrl(link)); | ||
if (!res) | ||
{ | ||
qDebug() << "Failed to open url: " << link; | ||
} | ||
}); | ||
|
||
// QT | ||
ui->labelRunningQTVersion->setText(qVersion()); | ||
ui->labelCompiledQTVersion->setText(QT_VERSION_STR); | ||
connect(ui->commandLinkButtonHomeQT, &QCommandLinkButton::pressed, | ||
[this]() { | ||
QString link = ui->commandLinkButtonHomeQT->text(); | ||
link.remove(0, 1); | ||
bool res = QDesktopServices::openUrl(QUrl(link)); | ||
if (!res) | ||
{ | ||
qDebug() << "Failed to open url: " << link; | ||
} | ||
}); | ||
} | ||
|
||
About::~About() { delete ui; } |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters