2019-01-16 20:00:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-05-19 16:16:24 +01:00
|
|
|
#include <QResizeEvent>
|
2019-01-16 20:00:10 +00:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QDir>
|
2020-03-09 01:08:59 +00:00
|
|
|
#include <QStatusBar>
|
2019-01-19 23:09:01 +00:00
|
|
|
#include <thread>
|
|
|
|
#include <atomic>
|
2019-01-16 20:00:10 +00:00
|
|
|
#include "BootableModel.h"
|
2020-03-07 17:58:03 +00:00
|
|
|
#include "ContinuationChecker.h"
|
2020-03-09 01:08:59 +00:00
|
|
|
#include "ElidedLabel.h"
|
2019-01-16 20:00:10 +00:00
|
|
|
|
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class BootableListDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class
|
2019-01-17 12:26:47 +00:00
|
|
|
BootableListDialog : public QDialog
|
2019-01-16 20:00:10 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit BootableListDialog(QWidget* parent = 0);
|
|
|
|
~BootableListDialog();
|
|
|
|
|
|
|
|
BootablesDb::Bootable getResult();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_add_games_button_clicked();
|
2019-01-17 12:26:47 +00:00
|
|
|
void on_listView_doubleClicked(const QModelIndex& index);
|
2019-01-16 20:00:10 +00:00
|
|
|
void on_refresh_button_clicked();
|
|
|
|
|
|
|
|
void on_comboBox_currentIndexChanged(int index);
|
2019-05-17 23:42:40 +01:00
|
|
|
void UpdateCoverDisplay();
|
2019-01-16 20:00:10 +00:00
|
|
|
|
2020-03-07 17:58:03 +00:00
|
|
|
void on_awsS3Button_clicked();
|
2020-03-09 01:08:59 +00:00
|
|
|
void UpdateStatus(std::string);
|
2020-03-07 17:58:03 +00:00
|
|
|
|
2020-03-11 10:35:30 +00:00
|
|
|
void resetModel(bool = true);
|
|
|
|
|
2019-01-16 20:00:10 +00:00
|
|
|
private:
|
|
|
|
Ui::BootableListDialog* ui;
|
|
|
|
|
2020-03-09 01:08:59 +00:00
|
|
|
QStatusBar* m_statusBar = nullptr;
|
|
|
|
ElidedLabel* m_msgLabel = nullptr;
|
|
|
|
|
2019-01-16 20:00:10 +00:00
|
|
|
BootablesDb::Bootable bootable;
|
2019-01-17 21:52:23 +00:00
|
|
|
std::vector<BootablesDb::Bootable> m_bootables;
|
2019-01-16 20:00:10 +00:00
|
|
|
BootableModel* model = nullptr;
|
|
|
|
int m_sortingMethod = 2;
|
2019-01-19 23:09:01 +00:00
|
|
|
std::thread cover_loader;
|
|
|
|
std::atomic<bool> m_thread_running;
|
2020-03-09 01:10:10 +00:00
|
|
|
std::atomic<bool> m_s3_processing;
|
2020-03-07 17:58:03 +00:00
|
|
|
CContinuationChecker* m_continuationChecker = nullptr;
|
2019-01-16 20:00:10 +00:00
|
|
|
|
2020-02-18 13:56:53 +00:00
|
|
|
void SelectionChange(const QModelIndex&);
|
2020-03-09 01:08:59 +00:00
|
|
|
void SetupStatusBar();
|
2020-04-16 15:33:45 +01:00
|
|
|
void DisplayWarningMessage();
|
2019-01-17 12:26:47 +00:00
|
|
|
|
2019-05-17 23:42:40 +01:00
|
|
|
Q_SIGNALS:
|
2020-03-11 10:35:30 +00:00
|
|
|
void AsyncResetModel(bool);
|
2019-05-17 23:42:40 +01:00
|
|
|
void AsyncUpdateCoverDisplay();
|
2020-03-09 01:08:59 +00:00
|
|
|
void AsyncUpdateStatus(std::string);
|
2019-05-17 23:42:40 +01:00
|
|
|
|
2019-01-16 20:00:10 +00:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent*) Q_DECL_OVERRIDE;
|
2019-05-19 16:16:24 +01:00
|
|
|
void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
|
2020-03-09 01:10:10 +00:00
|
|
|
void closeEvent(QCloseEvent*) Q_DECL_OVERRIDE;
|
2019-01-16 20:00:10 +00:00
|
|
|
};
|