forked from eden-emu/eden
This adds a "Data Manager" dialog to the Tools menu. The Data Manager allows for the following operations: - Open w/ system file manager - Clear - Export - Import On any of the following directories: - Save (w/ profile selector) - UserNAND - SysNAND - Mods - Shaders TODO for the future: - "Cleanup" for each directory - TitleID -> Game name--let users clean data for a specific game if applicable Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: eden-emu/eden#2700 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef DATA_DIALOG_H
|
|
#define DATA_DIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include "frontend_common/data_manager.h"
|
|
#include "qt_common/qt_string_lookup.h"
|
|
|
|
#include "ui_data_widget.h"
|
|
|
|
namespace Ui {
|
|
class DataDialog;
|
|
}
|
|
|
|
class DataDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DataDialog(QWidget *parent = nullptr);
|
|
~DataDialog();
|
|
|
|
private:
|
|
std::unique_ptr<Ui::DataDialog> ui;
|
|
};
|
|
|
|
class DataWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit DataWidget(FrontendCommon::DataManager::DataDir data_dir,
|
|
QtCommon::StringLookup::StringKey tooltip,
|
|
const QString &exportName,
|
|
QWidget *parent = nullptr);
|
|
|
|
public slots:
|
|
void clear();
|
|
void open();
|
|
void upload();
|
|
void download();
|
|
|
|
void scan();
|
|
|
|
private:
|
|
std::unique_ptr<Ui::DataWidget> ui;
|
|
FrontendCommon::DataManager::DataDir m_dir;
|
|
const QString m_exportName;
|
|
|
|
std::string selectProfile();
|
|
};
|
|
|
|
#endif // DATA_DIALOG_H
|