LicenseDialog.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "LicenseDialog.h"
00019
00020 #include <QFile>
00021 #include <QString>
00022
00023
00024 LicenseDialog::LicenseDialog(QWidget *parent)
00025 : QDialog(parent)
00026 {
00027 ui.setupUi(this);
00028
00029 ui.txtLicense->setHtml(loadHtml(":/docs/license.html"));
00030 ui.txtCredits->setHtml(loadHtml(":/docs/credits.html"));
00031 }
00032
00033 QString
00034 LicenseDialog::loadHtml(const QString &source) const
00035 {
00036 QFile file(source);
00037 if (! file.open(QIODevice::ReadOnly | QIODevice::Text))
00038 return QString();
00039 return QString(file.readAll());
00040 }
00041