mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-05 00:38:49 +00:00
frontend: Add utilities
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
// Copyright 2020 threeSD Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <QDialog>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace Ui {
|
||||
class UtilitiesDialog;
|
||||
}
|
||||
|
||||
class UtilitiesDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UtilitiesDialog(QWidget* parent);
|
||||
~UtilitiesDialog() override;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Open a dialog to ask the user for source and destination paths.
|
||||
* @return {source, destination}
|
||||
*/
|
||||
std::pair<QString, QString> GetFilePaths(bool source_is_dir, bool destination_is_dir);
|
||||
|
||||
bool LoadSDKeys();
|
||||
|
||||
void ShowProgressDialog(std::function<bool()> operation);
|
||||
|
||||
/**
|
||||
* Gets SDMC root, and relative source path.
|
||||
* @return {success, sdmc root, relative source path}
|
||||
*/
|
||||
std::tuple<bool, std::string, std::string> GetSDMCRoot(const QString& source);
|
||||
|
||||
void SDDecryptionTool();
|
||||
void SaveDataExtractionTool();
|
||||
void ExtdataExtractionTool();
|
||||
void RomFSExtractionTool();
|
||||
void ShowResult();
|
||||
|
||||
bool result = false; /// Result of the last operation.
|
||||
std::unique_ptr<Ui::UtilitiesDialog> ui;
|
||||
};
|
||||
Reference in New Issue
Block a user