Play-/Source/ui_qt/bootablelistdialog.h

71 lines
1.5 KiB
C
Raw Permalink Normal View History

2019-01-16 20:00:10 +00:00
#pragma once
#include <QResizeEvent>
2019-01-16 20:00:10 +00:00
#include <QDialog>
#include <QDir>
2020-03-09 01:08:59 +00:00
#include <QStatusBar>
#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);
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
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;
std::thread cover_loader;
std::atomic<bool> m_thread_running;
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
void SelectionChange(const QModelIndex&);
2020-03-09 01:08:59 +00:00
void SetupStatusBar();
void DisplayWarningMessage();
2019-01-17 12:26:47 +00:00
Q_SIGNALS:
void AsyncResetModel(bool);
void AsyncUpdateCoverDisplay();
2020-03-09 01:08:59 +00:00
void AsyncUpdateStatus(std::string);
2019-01-16 20:00:10 +00:00
protected:
void showEvent(QShowEvent*) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
void closeEvent(QCloseEvent*) Q_DECL_OVERRIDE;
2019-01-16 20:00:10 +00:00
};