2019-03-21 22:04:56 +00:00
|
|
|
// Copyright 2019 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2019-03-21 22:04:56 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
2019-03-30 11:45:00 +00:00
|
|
|
#include <utility>
|
2019-03-21 22:04:56 +00:00
|
|
|
|
2019-03-30 11:45:00 +00:00
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QFormLayout>
|
|
|
|
#include <QLineEdit>
|
2019-03-21 22:04:56 +00:00
|
|
|
#include <QPushButton>
|
|
|
|
#include <QTableWidget>
|
|
|
|
#include <QTextEdit>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2024-04-09 05:55:20 +00:00
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
enum class State;
|
|
|
|
}
|
2019-03-21 22:04:56 +00:00
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
class Volume;
|
|
|
|
}
|
|
|
|
|
|
|
|
class VerifyWidget final : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit VerifyWidget(std::shared_ptr<DiscIO::Volume> volume);
|
|
|
|
|
|
|
|
private:
|
2024-04-09 05:55:20 +00:00
|
|
|
void OnEmulationStateChanged(Core::State state);
|
2019-03-21 22:04:56 +00:00
|
|
|
void CreateWidgets();
|
2019-03-30 11:45:00 +00:00
|
|
|
std::pair<QCheckBox*, QLineEdit*> AddHashLine(QFormLayout* layout, QString text);
|
2019-03-21 22:04:56 +00:00
|
|
|
void ConnectWidgets();
|
|
|
|
|
2019-08-23 11:20:09 +00:00
|
|
|
bool CanVerifyRedump() const;
|
|
|
|
void UpdateRedumpEnabled();
|
2019-03-21 22:04:56 +00:00
|
|
|
void Verify();
|
|
|
|
void SetProblemCellText(int row, int column, QString text);
|
|
|
|
|
|
|
|
std::shared_ptr<DiscIO::Volume> m_volume;
|
|
|
|
QTableWidget* m_problems;
|
|
|
|
QTextEdit* m_summary_text;
|
2019-03-30 11:45:00 +00:00
|
|
|
QFormLayout* m_hash_layout;
|
2019-08-23 11:20:09 +00:00
|
|
|
QFormLayout* m_redump_layout;
|
2019-03-30 11:45:00 +00:00
|
|
|
QCheckBox* m_crc32_checkbox;
|
|
|
|
QCheckBox* m_md5_checkbox;
|
|
|
|
QCheckBox* m_sha1_checkbox;
|
2019-08-23 11:20:09 +00:00
|
|
|
QCheckBox* m_redump_checkbox;
|
2019-03-30 11:45:00 +00:00
|
|
|
QLineEdit* m_crc32_line_edit;
|
|
|
|
QLineEdit* m_md5_line_edit;
|
|
|
|
QLineEdit* m_sha1_line_edit;
|
2019-08-23 11:20:09 +00:00
|
|
|
QLineEdit* m_redump_line_edit;
|
2019-03-21 22:04:56 +00:00
|
|
|
QPushButton* m_verify_button;
|
|
|
|
};
|