7#include "PluginAboutDialog.h"
10#include "MarbleDirs.h"
11#include "ui_MarbleAboutDialog.h"
22class PluginAboutDialogPrivate
25 PluginAboutDialogPrivate() =
default;
26 ~PluginAboutDialogPrivate() =
default;
28 Ui::MarbleAboutDialog u_dialog;
31PluginAboutDialog::PluginAboutDialog(
QWidget *parent)
33 , d(new PluginAboutDialogPrivate())
40 setLicenseAgreementText(
QString());
43PluginAboutDialog::~PluginAboutDialog()
48void PluginAboutDialog::setName(
const QString &name)
50 d->u_dialog.m_pMarbleTitleLabel->setText(name);
51 setWindowTitle(tr(
"About %1").arg(name));
54void PluginAboutDialog::setVersion(
const QString &version)
56 d->u_dialog.m_pMarbleVersionLabel->setText(tr(
"Version %1").arg(version));
59void PluginAboutDialog::setIcon(
const QIcon &icon)
61 d->u_dialog.m_pMarbleLogoLabel->setPixmap(icon.
pixmap(64, 64));
64void PluginAboutDialog::setAboutText(
const QString &about)
66 d->u_dialog.m_pMarbleAboutBrowser->setText(about);
72 for (
const PluginAuthor &author : authors) {
76 setAuthorsText(
string);
79void PluginAboutDialog::setAuthorsText(
const QString &authors)
81 d->u_dialog.m_pMarbleAuthorsBrowser->setText(authors);
84void PluginAboutDialog::setDataText(
const QString &data)
87 d->u_dialog.tabWidget->removeTab(d->u_dialog.tabWidget->indexOf(d->u_dialog.m_dataTab));
89 d->u_dialog.tabWidget->insertTab(dataTabIndex, d->u_dialog.m_dataTab, tr(
"Data"));
90 d->u_dialog.m_pMarbleDataBrowser->setText(data);
94void PluginAboutDialog::setLicense(PluginAboutDialog::LicenseKey license)
98 case PluginAboutDialog::License_LGPL_V2:
99 filename = QStringLiteral(
"lgpl2.txt");
102 filename = QStringLiteral(
"lgpl2.txt");
106 QTextBrowser *browser = d->u_dialog.m_pMarbleLicenseBrowser;
112 browser->
setText(ts.readAll());
118void PluginAboutDialog::setLicenseAgreementText(
const QString &license)
121 setLicense(PluginAboutDialog::License_LGPL_V2);
123 d->u_dialog.m_pMarbleLicenseBrowser->setText(license);
129#include "moc_PluginAboutDialog.cpp"
QString path(const QString &relativePath)
Binds a QML item to a specific geodetic location in screen coordinates.
QPixmap pixmap(QWindow *window, const QSize &size, Mode mode, State state) const const
bool isEmpty() const const
bool isNull() const const
void setText(const QString &text)