added option to not copy screenshots

+ moved select all checkbox to top row, centered.

Signed-off-by: Marcelo Hernandez <marcelohdez.inq@gmail.com>
This commit is contained in:
Marcelo Hernandez
2022-10-29 22:27:31 -04:00
parent c00f96c7ca
commit 5d1aac3c53
5 changed files with 81 additions and 32 deletions

View File

@ -12,7 +12,8 @@ bool InstanceCopyPrefs::allTrue() const
copyResourcePacks &&
copyShaderPacks &&
copyServers &&
copyMods;
copyMods &&
copyScreenshots;
}
// Returns a single RegEx string of the selected folders/files to filter out (ex: ".minecraft/saves|.minecraft/server.dat")
@ -38,6 +39,9 @@ QString InstanceCopyPrefs::getSelectedFiltersAsRegex() const
if(!copyMods)
filters << "coremods" << "mods" << "config";
if(!copyScreenshots)
filters << "screenshots";
// If we have any filters to add, join them as a single regex string to return:
if (!filters.isEmpty()) {
const QString MC_ROOT = "[.]?minecraft/";
@ -84,6 +88,11 @@ bool InstanceCopyPrefs::isCopyModsEnabled() const
return copyMods;
}
bool InstanceCopyPrefs::isCopyScreenshotsEnabled() const
{
return copyScreenshots;
}
// ======= Setters =======
void InstanceCopyPrefs::enableCopySaves(bool b)
{
@ -119,3 +128,8 @@ void InstanceCopyPrefs::enableCopyMods(bool b)
{
copyMods = b;
}
void InstanceCopyPrefs::enableCopyScreenshots(bool b)
{
copyScreenshots = b;
}