-
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
febd2ef
commit abbf43e
Showing
8 changed files
with
111 additions
and
4 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
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
#include "forms/AboutDialog.hpp" | ||
|
||
#include "trackerboy/version.hpp" | ||
|
||
AboutDialog::AboutDialog(QWidget *parent) : | ||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint), | ||
mLayout(), | ||
mLogo(), | ||
mLine(), | ||
mBodyLayout(), | ||
mIcon(), | ||
mBody(), | ||
mButtons() | ||
{ | ||
setModal(true); | ||
setWindowTitle(tr("About")); | ||
|
||
mBodyLayout.addWidget(&mIcon); | ||
mBodyLayout.addWidget(&mBody, 1); | ||
|
||
mLayout.addWidget(&mLogo); | ||
mLayout.addWidget(&mLine); | ||
mLayout.addLayout(&mBodyLayout, 1); | ||
mLayout.addWidget(&mButtons); | ||
mLayout.setSizeConstraint(QLayout::SizeConstraint::SetFixedSize); | ||
setLayout(&mLayout); | ||
|
||
mLogo.setPixmap(QPixmap(QStringLiteral(":/images/logo.png"))); | ||
mIcon.setPixmap(QPixmap(QStringLiteral(":/icons/app/appicon-48.png"))); | ||
|
||
mLine.setFrameShape(QFrame::HLine); | ||
mLine.setFrameShadow(QFrame::Sunken); | ||
|
||
mIcon.setAlignment(Qt::AlignTop | Qt::AlignHCenter); | ||
|
||
mBody.setTextFormat(Qt::RichText); | ||
mBody.setTextInteractionFlags(Qt::TextBrowserInteraction); | ||
mBody.setOpenExternalLinks(true); | ||
mBody.setText(QStringLiteral( | ||
R"bodystr( | ||
<html><head/> | ||
<body> | ||
<h1>Trackerboy v%1.%2.%3</h1> | ||
<h3> A Gameboy/Gameboy Color music tracker</h3> | ||
<h3>Copyright (C) 2019-2021 stoneface86</h3> | ||
<br/> | ||
<br/> | ||
<span>Repo - <a href="https://github.com/stoneface86/trackerboy">https://github.com/stoneface86/trackerboy</a></span> | ||
<br/> | ||
<p>This software is licensed under the MIT License.</p> | ||
</body> | ||
</html> | ||
)bodystr").arg(trackerboy::VERSION.major) | ||
.arg(trackerboy::VERSION.minor) | ||
.arg(trackerboy::VERSION.patch)); | ||
|
||
mButtons.addButton(QDialogButtonBox::Close); | ||
|
||
connect(&mButtons, &QDialogButtonBox::rejected, this, &AboutDialog::reject); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
#pragma once | ||
|
||
|
||
#include <QDialog> | ||
#include <QDialogButtonBox> | ||
#include <QFrame> | ||
#include <QHBoxLayout> | ||
#include <QLabel> | ||
#include <QVBoxLayout> | ||
|
||
|
||
class AboutDialog : public QDialog { | ||
|
||
Q_OBJECT | ||
|
||
public: | ||
explicit AboutDialog(QWidget *parent = nullptr); | ||
|
||
|
||
private: | ||
|
||
QVBoxLayout mLayout; | ||
QLabel mLogo; | ||
QFrame mLine; | ||
QHBoxLayout mBodyLayout; | ||
QLabel mIcon; | ||
QLabel mBody; | ||
QDialogButtonBox mButtons; | ||
|
||
|
||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<!DOCTYPE RCC><RCC version="1.0"> | ||
<qresource> | ||
<file>images/gridHeaderFont.bmp</file> | ||
<file>images/whitekey_down.png</file> | ||
<file>images/blackkey_down.png</file> | ||
<file>images/piano_whitekeys.png</file> | ||
<file>images/gridHeaderFont.bmp</file> | ||
<file>images/logo.png</file> | ||
<file>images/piano_blackkeys.png</file> | ||
<file>images/piano_whitekeys.png</file> | ||
<file>images/whitekey_down.png</file> | ||
</qresource> | ||
</RCC> |
File renamed without changes