1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/apps/launcher/settingspage.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.9 KiB
C++
Raw Normal View History

2023-01-06 19:01:50 +00:00
#ifndef SETTINGSPAGE_H
#define SETTINGSPAGE_H
2014-01-27 19:14:02 +00:00
2023-01-06 19:01:50 +00:00
#include <QCompleter>
#include <QStringListModel>
2014-01-27 19:14:02 +00:00
#include "ui_settingspage.h"
2023-01-06 19:01:50 +00:00
#include <components/settings/settings.hpp>
namespace Config
{
class GameSettings;
}
2014-01-27 19:14:02 +00:00
namespace Launcher
{
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:
2023-01-06 19:01:50 +00:00
explicit SettingsPage(Config::GameSettings& gameSettings, QWidget* parent = nullptr);
2014-01-27 19:14:02 +00:00
2014-03-30 21:57:30 +00:00
bool loadSettings();
2023-01-06 19:01:50 +00:00
void saveSettings();
2022-09-22 18:26:05 +00:00
2023-01-06 19:01:50 +00:00
public slots:
void slotLoadedCellsChanged(QStringList cellNames);
2014-03-30 21:57:30 +00:00
private slots:
2023-01-06 19:01:50 +00:00
void on_skipMenuCheckBox_stateChanged(int state);
void on_runScriptAfterStartupBrowseButton_clicked();
void slotAnimSourcesToggled(bool checked);
void slotPostProcessToggled(bool checked);
void slotSkyBlendingToggled(bool checked);
private:
Config::GameSettings& mGameSettings;
2023-01-06 19:01:50 +00:00
QCompleter mCellNameCompleter;
QStringListModel mCellNameCompleterModel;
/**
* Load the cells associated with the given content files for use in autocomplete
* @param filePaths the file paths of the content files to be examined
*/
void loadCellsForAutocomplete(QStringList filePaths);
static void loadSettingBool(QCheckBox* checkbox, const std::string& setting, const std::string& group);
static void saveSettingBool(QCheckBox* checkbox, const std::string& setting, const std::string& group);
static void loadSettingInt(QComboBox* comboBox, const std::string& setting, const std::string& group);
static void saveSettingInt(QComboBox* comboBox, const std::string& setting, const std::string& group);
static void loadSettingInt(QSpinBox* spinBox, const std::string& setting, const std::string& group);
static void saveSettingInt(QSpinBox* spinBox, const std::string& setting, const std::string& group);
2014-01-27 19:14:02 +00:00
};
}
2023-01-06 19:01:50 +00:00
#endif