2023-05-31 07:03:44 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QTreeWidgetItem>
|
|
|
|
|
|
|
|
#include "Version.h"
|
2023-06-01 22:55:20 +01:00
|
|
|
#include "updater/prismupdater/GitHubRelease.h"
|
2023-05-31 07:03:44 +01:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SelectReleaseDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SelectReleaseDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit SelectReleaseDialog(const Version& cur_version, const QList<GitHubRelease>& releases, QWidget* parent = 0);
|
|
|
|
~SelectReleaseDialog();
|
|
|
|
|
|
|
|
void loadReleases();
|
|
|
|
void appendRelease(GitHubRelease const& release);
|
|
|
|
GitHubRelease selectedRelease() { return m_selectedRelease; }
|
|
|
|
private slots:
|
|
|
|
GitHubRelease getRelease(QTreeWidgetItem* item);
|
|
|
|
void selectionChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
QList<GitHubRelease> m_releases;
|
|
|
|
GitHubRelease m_selectedRelease;
|
|
|
|
Version m_currentVersion;
|
|
|
|
|
|
|
|
Ui::SelectReleaseDialog* ui;
|
|
|
|
};
|