2014-01-27 19:14:02 +00:00
|
|
|
#ifndef SETTINGSPAGE_HPP
|
|
|
|
#define SETTINGSPAGE_HPP
|
|
|
|
|
2014-04-16 14:54:55 +00:00
|
|
|
#include <components/process/processinvoker.hpp>
|
2014-01-27 19:14:02 +00:00
|
|
|
|
|
|
|
#include "ui_settingspage.h"
|
|
|
|
|
2014-04-16 14:54:55 +00:00
|
|
|
#include "maindialog.hpp"
|
|
|
|
|
2014-04-16 22:01:19 +00:00
|
|
|
namespace Files
|
|
|
|
{
|
|
|
|
struct ConfigurationManager;
|
|
|
|
}
|
2014-04-16 14:54:55 +00:00
|
|
|
namespace Config
|
|
|
|
{
|
|
|
|
class GameSettings;
|
|
|
|
class LauncherSettings;
|
|
|
|
}
|
|
|
|
|
2014-01-27 19:14:02 +00:00
|
|
|
namespace Launcher
|
|
|
|
{
|
2014-04-16 14:54:55 +00:00
|
|
|
class TextInputDialog;
|
2014-01-27 19:14:02 +00:00
|
|
|
|
|
|
|
class SettingsPage : public QWidget, private Ui::SettingsPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-03-30 21:57:30 +00:00
|
|
|
|
2014-01-27 19:14:02 +00:00
|
|
|
public:
|
2014-04-16 22:01:19 +00:00
|
|
|
SettingsPage(Files::ConfigurationManager& cfg, Config::GameSettings& gameSettings,
|
2020-11-13 07:39:47 +00:00
|
|
|
Config::LauncherSettings& launcherSettings, MainDialog* parent = nullptr);
|
2021-05-19 00:42:24 +00:00
|
|
|
~SettingsPage() override;
|
2014-01-27 19:14:02 +00:00
|
|
|
|
2014-03-30 21:57:30 +00:00
|
|
|
void saveSettings();
|
|
|
|
bool loadSettings();
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2015-02-21 19:46:12 +00:00
|
|
|
/// set progress bar on page to 0%
|
|
|
|
void resetProgressBar();
|
2014-03-30 21:57:30 +00:00
|
|
|
|
|
|
|
private slots:
|
2014-04-16 22:01:19 +00:00
|
|
|
|
2014-03-30 21:57:30 +00:00
|
|
|
void on_wizardButton_clicked();
|
|
|
|
void on_importerButton_clicked();
|
2014-04-16 16:34:24 +00:00
|
|
|
void on_browseButton_clicked();
|
2014-04-16 14:54:55 +00:00
|
|
|
|
|
|
|
void wizardStarted();
|
|
|
|
void wizardFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
|
|
|
|
|
|
void importerStarted();
|
|
|
|
void importerFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
|
|
|
|
|
|
void updateOkButton(const QString& text);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Process::ProcessInvoker* mWizardInvoker;
|
|
|
|
Process::ProcessInvoker* mImporterInvoker;
|
2014-04-16 22:01:19 +00:00
|
|
|
|
|
|
|
Files::ConfigurationManager& mCfgMgr;
|
2014-04-16 14:54:55 +00:00
|
|
|
|
|
|
|
Config::GameSettings& mGameSettings;
|
|
|
|
Config::LauncherSettings& mLauncherSettings;
|
|
|
|
|
|
|
|
MainDialog* mMain;
|
|
|
|
TextInputDialog* mProfileDialog;
|
2014-01-27 19:14:02 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SETTINGSPAGE_HPP
|