14#include <QProgressBar>
16#include <QTableWidget>
39 void setGameInfo(
const QString& gameId,
const QString& gameName,
const QString& gamePath,
43 void progress(
const QString& status,
int percent,
const QString& currentFile,
44 int filesProcessed,
int totalFiles);
46 void error(
const QString& message);
57 std::atomic<bool> cancelled_{
false};
58 std::unique_ptr<FileVerificationService> service_;
83 QLabel* statusIcon_ =
nullptr;
84 QLabel* pathLabel_ =
nullptr;
85 QLabel* detailLabel_ =
nullptr;
108 QLabel* statusIcon_ =
nullptr;
109 QLabel* statusLabel_ =
nullptr;
110 QLabel* totalFilesLabel_ =
nullptr;
111 QLabel* validFilesLabel_ =
nullptr;
112 QLabel* invalidFilesLabel_ =
nullptr;
113 QLabel* missingFilesLabel_ =
nullptr;
114 QLabel* extraFilesLabel_ =
nullptr;
115 QLabel* totalSizeLabel_ =
nullptr;
116 QLabel* timeLabel_ =
nullptr;
117 QProgressBar* integrityBar_ =
nullptr;
135 void setGame(
const QString& gameId,
const QString& gameName,
const QString& gamePath,
149 void onVerifyClicked();
150 void onCancelClicked();
151 void onCloseClicked();
152 void onProgress(
const QString& status,
int percent,
const QString& currentFile,
153 int filesProcessed,
int totalFiles);
155 void onError(
const QString& message);
156 void onShowDetailsToggled(
bool checked);
161 void setupGameInfoSection(QWidget* container);
162 void setupProgressSection(QWidget* container);
163 void setupResultsSection(QWidget* container);
164 void showPage(
int index);
165 void updateFileList();
166 QString formatBytes(int64_t bytes)
const;
167 QString formatDuration(
int ms)
const;
177 bool verified_ =
false;
180 QStackedWidget* pageStack_ =
nullptr;
183 QWidget* startPage_ =
nullptr;
184 QLabel* gameNameLabel_ =
nullptr;
185 QLabel* gamePathLabel_ =
nullptr;
186 QLabel* gameTypeLabel_ =
nullptr;
187 QPushButton* verifyBtn_ =
nullptr;
190 QWidget* progressPage_ =
nullptr;
191 QLabel* progressStatusLabel_ =
nullptr;
192 QProgressBar* progressBar_ =
nullptr;
193 QLabel* progressFileLabel_ =
nullptr;
194 QLabel* progressCountLabel_ =
nullptr;
195 QPushButton* cancelBtn_ =
nullptr;
198 QWidget* resultsPage_ =
nullptr;
200 QPushButton* showDetailsBtn_ =
nullptr;
201 QTableWidget* fileTable_ =
nullptr;
202 QGroupBox* detailsGroup_ =
nullptr;
203 QPushButton* verifyAgainBtn_ =
nullptr;
204 QPushButton* closeBtn_ =
nullptr;
207 QThread* workerThread_ =
nullptr;
209 std::atomic<bool> verifying_{
false};
211 ThemeManager* themeManager_;
const GameVerificationResult & getResult() const
GameVerificationDialog(QWidget *parent=nullptr, ThemeManager *themeManager=nullptr)
void setGame(const QString &gameId, const QString &gameName, const QString &gamePath, int steamAppId=0)
~GameVerificationDialog() override
void setGameInfo(const QString &gameId, const QString &gameName, const QString &gamePath, int steamAppId)
VerificationWorker(QObject *parent=nullptr)
void finished(bool success, const GameVerificationResult &result)
void progress(const QString &status, int percent, const QString ¤tFile, int filesProcessed, int totalFiles)
void error(const QString &message)
Result of verifying a single file.
Complete verification result for a game.