Add About Dialog and PCL LICENSE
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#include "about.h"
|
||||
#include <QTextEdit>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFile>
|
||||
|
||||
About::About(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
setWindowTitle(tr("About Tenmon"));
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
QLabel *label = new QLabel(this);
|
||||
|
||||
QFile tenmonText(":/about/tenmon");
|
||||
tenmonText.open(QIODevice::ReadOnly);
|
||||
label->setText(tenmonText.readAll());
|
||||
|
||||
QTextEdit *pcl = new QTextEdit(this);
|
||||
QFile pclText(":/about/pcl");
|
||||
pclText.open(QIODevice::ReadOnly);
|
||||
pcl->setText(pclText.readAll());
|
||||
pcl->setReadOnly(true);
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||
|
||||
layout->addWidget(label);
|
||||
layout->addWidget(pcl);
|
||||
layout->addWidget(buttonBox);
|
||||
}
|
||||
Reference in New Issue
Block a user