14 #include "ui_UpdateDialog.h"
24 : QDialog(parent, Qt::Tool), m_ui(new
Ui::UpdateDialog) {
31 connect(m_updater, SIGNAL(checkingFinished(QString)),
this,
33 connect(m_updater, SIGNAL(appcastDownloaded(QString, QByteArray)),
this,
37 connect(m_ui->resetButton, SIGNAL(clicked()),
this, SLOT(
resetFields()));
38 connect(m_ui->closeButton, SIGNAL(clicked()),
this, SLOT(close()));
39 connect(m_ui->checkButton, SIGNAL(clicked()),
this,
57 m_ui->installedVersion->setText(
59 m_ui->customAppcast->setChecked(
false);
60 m_ui->enableDownloader->setChecked(
true);
61 m_ui->showAllNotifcations->setChecked(
false);
62 m_ui->showUpdateNotifications->setChecked(
true);
63 m_ui->mandatoryUpdate->setChecked(
false);
72 QString
version = m_ui->installedVersion->text();
73 bool customAppcast = m_ui->customAppcast->isChecked();
74 bool downloaderEnabled = m_ui->enableDownloader->isChecked();
75 bool notifyOnFinish = m_ui->showAllNotifcations->isChecked();
76 bool notifyOnUpdate = m_ui->showUpdateNotifications->isChecked();
77 bool mandatoryUpdate = m_ui->mandatoryUpdate->isChecked();
97 m_ui->changelogText->setText(m_updater->
getChangelog(url));
107 "This is the downloaded appcast: <p><pre>" +
108 QString::fromUtf8(reply) +
109 "</pre></p><p> If you need to store more information on the "
110 "appcast (or use another format), just use the "
111 "<b>QSimpleUpdater::setCustomAppcast()</b> function. "
112 "It allows your application to interpret the appcast "
113 "using your code and not QSU's code.</p>";
115 m_ui->changelogText->setText(text);
void setModuleVersion(const QString &url, const QString &version)
void setNotifyOnUpdate(const QString &url, const bool notify)
void setNotifyOnFinish(const QString &url, const bool notify)
QString getChangelog(const QString &url) const
void checkForUpdates(const QString &url)
void setMandatoryUpdate(const QString &url, const bool mandatory_update)
void setDownloaderEnabled(const QString &url, const bool enabled)
void setUseCustomAppcast(const QString &url, const bool customAppcast)
static QSimpleUpdater * getInstance()
void displayAppcast(const QString &url, const QByteArray &reply)
ecvUpdateDlg(QWidget *parent=nullptr)
void updateChangelog(const QString &url)
static const QString UPDATE_RUL
static const QString APP_VERSION