-
Notifications
You must be signed in to change notification settings - Fork 4
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
10 changed files
with
292 additions
and
7 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,67 @@ | ||
#include "aboutdialog.h" | ||
|
||
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent) | ||
{ | ||
|
||
setWindowTitle(tr("About")); | ||
|
||
mTabWidget = new QTabWidget; | ||
|
||
QLabel * mIconLabel = new QLabel; | ||
QLabel * mTitleLabel = new QLabel; | ||
|
||
mIconLabel->setPixmap(QPixmap(":/app.png").scaledToHeight(64, Qt::SmoothTransformation)); | ||
mTitleLabel->setText(qApp->applicationName()); | ||
mTitleLabel->setAlignment(Qt::AlignLeft); | ||
QFont font; | ||
font.setPixelSize(25); | ||
mTitleLabel->setFont(font); | ||
|
||
QHBoxLayout * hLayout = new QHBoxLayout; | ||
hLayout->addWidget(mIconLabel); | ||
hLayout->addWidget(mTitleLabel); | ||
|
||
QVBoxLayout * vLayout = new QVBoxLayout; | ||
vLayout->addLayout(hLayout); | ||
vLayout->addWidget(mTabWidget); | ||
|
||
QPlainTextEdit * edit = new QPlainTextEdit; | ||
edit->setPlainText(QString("Version: %1").arg(qApp->applicationVersion())); | ||
|
||
mTabWidget->addTab(edit, "Version"); | ||
|
||
setLayout(vLayout); | ||
|
||
|
||
} | ||
|
||
void AboutDialog::makeHeader() | ||
{ | ||
|
||
// QPixmap pix(width(), height()/2); | ||
// pix.fill(Qt::white); | ||
|
||
// QPainter painter(&pix); | ||
|
||
// QPixmap logo = QPixmap(":/app.png"); | ||
// int size = 128; | ||
// int margin = (pix.height() - size) / 2 ; | ||
|
||
// painter.drawPixmap(0,margin,logo); | ||
|
||
// QRect area(130, 0, pix.width()-130, pix.height() ); | ||
|
||
// QFont font; | ||
// font.setPixelSize(30); | ||
// painter.setFont(font); | ||
|
||
// painter.drawText(area, Qt::AlignLeft|Qt::AlignVCenter, qApp->applicationName() + "\n" + qApp->applicationVersion()); | ||
|
||
|
||
// mHeader->setPixmap(pix); | ||
// mHeader->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); | ||
// mHeader->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); | ||
|
||
|
||
|
||
} |
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,21 @@ | ||
#ifndef ABOUTDIALOG_H | ||
#define ABOUTDIALOG_H | ||
#include <QtWidgets> | ||
|
||
class AboutDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit AboutDialog(QWidget *parent = 0); | ||
|
||
protected: | ||
void makeHeader(); | ||
|
||
private: | ||
QTabWidget * mTabWidget; | ||
QDialogButtonBox * mButtons; | ||
|
||
|
||
}; | ||
|
||
#endif // ABOUTDIALOG_H |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 +1,7 @@ | ||
<RCC> | ||
<qresource prefix="/"> | ||
<file>dna.png</file> | ||
<file>search.png</file> | ||
<file>app.png</file> | ||
</qresource> | ||
</RCC> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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