-
Notifications
You must be signed in to change notification settings - Fork 17
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
Showing
7 changed files
with
67 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "about.h" | ||
#include "define.h" | ||
#include <QLabel> | ||
#include <QVBoxLayout> | ||
|
||
About::About(QWidget *parent) | ||
: QDialog(parent) | ||
{ | ||
setWindowTitle("关于"); | ||
setFixedSize(500, 200); | ||
|
||
QLabel *label = new QLabel( | ||
"<a href=\"https://github.com/lanthora/cake\">Cake</a> " | ||
"是使用 Qt 并基于 " | ||
"<a href=\"https://github.com/lanthora/candy\">Candy</a> " | ||
"开发的桌面应用程序<br>" | ||
"当前版本: " CAKE_VERSION "<br>", | ||
this); | ||
|
||
label->setAlignment(Qt::AlignCenter); | ||
label->setOpenExternalLinks(true); | ||
|
||
QVBoxLayout *layout = new QVBoxLayout(this); | ||
layout->addWidget(label, 0, Qt::AlignCenter); | ||
layout->setAlignment(Qt::AlignCenter); | ||
} |
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,14 @@ | ||
#ifndef ABOUT_H | ||
#define ABOUT_H | ||
|
||
#include <QDialog> | ||
#include <QObject> | ||
|
||
class About : public QDialog | ||
{ | ||
Q_OBJECT | ||
public: | ||
About(QWidget *parent = nullptr); | ||
}; | ||
|
||
#endif |
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,8 @@ | ||
#ifndef DEFINE_H | ||
#define DEFINE_H | ||
|
||
#ifndef CAKE_VERSION | ||
#define CAKE_VERSION "Unknown" | ||
#endif | ||
|
||
#endif |
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