[desktop] Initial data manager prototype
Some checks failed
eden-license / license-header (pull_request) Failing after 31s
Some checks failed
eden-license / license-header (pull_request) Failing after 31s
Right now, all this adds is a small dialog to the Widgets frontend showing the user how much space is taken up by their saves, shaders, NAND, and mods. It also gives them the choice to clear these directories (with 2x confirmation), OR open the directory in their system file manager. In the future, a lot more can be done with this concept. Notably, a common import/export (a la android) could be added, the UI can obviously be polished, etc. We could also add this to Android, but I don't think common import/export is needed *for* Android, and should probably be left in qt_common. Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
954c17c18a
commit
221d9c71ac
15 changed files with 478 additions and 7 deletions
|
@ -348,4 +348,29 @@ void FixProfiles()
|
|||
QtCommon::Game::OpenSaveFolder();
|
||||
}
|
||||
|
||||
void ClearDataDir(FrontendCommon::DataManager::DataDir dir) {
|
||||
auto result = QtCommon::Frontend::Warning("Really clear data?",
|
||||
"Important data may be lost!",
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if (result != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
result = QtCommon::Frontend::Warning(
|
||||
"Are you REALLY sure?",
|
||||
"Once deleted, your data will NOT come back!\n"
|
||||
"Only do this if you're 100% sure you want to delete this data.",
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if (result != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
QtCommon::Frontend::QtProgressDialog dialog(tr("Clearing..."), QString(), 0, 0);
|
||||
dialog.show();
|
||||
|
||||
FrontendCommon::DataManager::ClearDir(dir);
|
||||
|
||||
dialog.close();
|
||||
}
|
||||
|
||||
} // namespace QtCommon::Content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue