| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <memory> |
| 7 |
#include <utility> |
| 8 |
|
| 9 |
#include <QCheckBox> |
| 10 |
#include <QFormLayout> |
| 11 |
#include <QLineEdit> |
| 12 |
#include <QPushButton> |
| 13 |
#include <QTableWidget> |
| 14 |
#include <QTextEdit> |
| 15 |
#include <QWidget> |
| 16 |
|
| 17 |
namespace Core |
| 18 |
{ |
| 19 |
enum class State; |
| 20 |
} |
| 21 |
namespace DiscIO |
| 22 |
{ |
| 23 |
class Volume; |
| 24 |
} |
| 25 |
|
| 26 |
class VerifyWidget final : public QWidget |
| 27 |
{ |
| 28 |
Q_OBJECT |
| 29 |
public: |
| 30 |
explicit VerifyWidget(std::shared_ptr<DiscIO::Volume> volume); |
| 31 |
|
| 32 |
private: |
| 33 |
void OnEmulationStateChanged(Core::State state); |
| 34 |
void CreateWidgets(); |
| 35 |
std::pair<QCheckBox*, QLineEdit*> AddHashLine(QFormLayout* layout, const QString& text); |
| 36 |
void ConnectWidgets(); |
| 37 |
|
| 38 |
bool CanVerifyRedump() const; |
| 39 |
void UpdateRedumpEnabled(); |
| 40 |
void Verify(); |
| 41 |
void SetProblemCellText(int row, int column, const QString& text); |
| 42 |
|
| 43 |
std::shared_ptr<DiscIO::Volume> m_volume; |
| 44 |
QTableWidget* m_problems; |
| 45 |
QTextEdit* m_summary_text; |
| 46 |
QFormLayout* m_hash_layout; |
| 47 |
QFormLayout* m_redump_layout; |
| 48 |
QCheckBox* m_crc32_checkbox; |
| 49 |
QCheckBox* m_md5_checkbox; |
| 50 |
QCheckBox* m_sha1_checkbox; |
| 51 |
QCheckBox* m_redump_checkbox; |
| 52 |
QLineEdit* m_crc32_line_edit; |
| 53 |
QLineEdit* m_md5_line_edit; |
| 54 |
QLineEdit* m_sha1_line_edit; |
| 55 |
QLineEdit* m_redump_line_edit; |
| 56 |
QPushButton* m_verify_button; |
| 57 |
}; |