Add "Select all" checkbox + ui revamp + code cleanup
Signed-off-by: Marcelo Hernandez <marcelohdez.inq@gmail.com>
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include "BaseVersion.h"
|
||||
#include <BaseInstance.h>
|
||||
#include "InstanceCopyPrefs.h"
|
||||
|
||||
class BaseInstance;
|
||||
|
||||
@ -39,18 +39,16 @@ public:
|
||||
QString instName() const;
|
||||
QString instGroup() const;
|
||||
QString iconKey() const;
|
||||
bool shouldCopySaves() const;
|
||||
bool shouldKeepPlaytime() const;
|
||||
bool shouldCopyGameOptions() const;
|
||||
bool shouldCopyResourcePacks() const;
|
||||
bool shouldCopyShaderPacks() const;
|
||||
bool shouldCopyServers() const;
|
||||
bool shouldCopyMods() const;
|
||||
const InstanceCopyPrefs& getChosenOptions() const;
|
||||
|
||||
private
|
||||
slots:
|
||||
void on_iconButton_clicked();
|
||||
void on_instNameTextBox_textChanged(const QString &arg1);
|
||||
|
||||
// Checkbox options:
|
||||
void checkAllCheckboxes(bool b);
|
||||
void on_selectAllCheckbox_stateChanged(int state);
|
||||
void on_copySavesCheckbox_stateChanged(int state);
|
||||
void on_keepPlaytimeCheckbox_stateChanged(int state);
|
||||
void on_copyGameOptionsCheckbox_stateChanged(int state);
|
||||
@ -63,11 +61,5 @@ private:
|
||||
Ui::CopyInstanceDialog *ui;
|
||||
QString InstIconKey;
|
||||
InstancePtr m_original;
|
||||
bool m_copySaves = true;
|
||||
bool m_keepPlaytime = true;
|
||||
bool m_copyGameOptions = true;
|
||||
bool m_copyResourcePacks = true;
|
||||
bool m_copyShaderPacks = true;
|
||||
bool m_copyServers = true;
|
||||
bool m_copyMods = true;
|
||||
InstanceCopyPrefs m_selectedOptions = InstanceCopyPrefs(true); // Default to all options as true
|
||||
};
|
||||
|
Reference in New Issue
Block a user