File indexing completed on 2025-01-05 03:56:35

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2020-12-21
0007  * Description : Online version dialog.
0008  *
0009  * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_ONLINE_VERSION_DLG_H
0016 #define DIGIKAM_ONLINE_VERSION_DLG_H
0017 
0018 // Qt includes
0019 
0020 #include <QDialog>
0021 
0022 // Local includes
0023 
0024 #include "digikam_export.h"
0025 #include "digikam_version.h"
0026 
0027 namespace Digikam
0028 {
0029 
0030 class DIGIKAM_EXPORT OnlineVersionDlg : public QDialog
0031 {
0032     Q_OBJECT
0033 
0034 public:
0035 
0036     explicit OnlineVersionDlg(QWidget* const parent = nullptr,
0037                               const QString& version = QLatin1String(digikam_version_short),
0038                               const QDateTime& buildDt = digiKamBuildDate(),
0039                               bool checkPreRelease = false,
0040                               bool updateWithDebug = false);
0041     ~OnlineVersionDlg() override;
0042 
0043 Q_SIGNALS:
0044 
0045     void signalSetupUpdate();
0046 
0047 private Q_SLOTS:
0048 
0049     void slotNewVersionAvailable(const QString& version);
0050     void slotNewVersionCheckError(const QString& error);
0051 
0052     void slotDownloadInstaller();
0053     void slotDownloadError(const QString& error);
0054     void slotDownloadProgress(qint64, qint64);
0055 
0056     void slotComputeChecksum();
0057 
0058     void slotRunInstaller();
0059     void slotOpenInFileManager();
0060 
0061     void slotHelp();
0062     void slotSetupUpdate();
0063 
0064     void slotUpdateStats();
0065 
0066 private:
0067 
0068     class Private;
0069     Private* const d;
0070 };
0071 
0072 } // namespace Digikam
0073 
0074 #endif // DIGIKAM_ONLINE_VERSION_DLG_H