1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00
OpenMW/apps/opencs/view/settings/settingsdialog.hpp

56 lines
1.2 KiB
C++
Raw Normal View History

2014-09-16 07:44:07 +10:00
#ifndef CSVSETTINGS_SETTINGSDIALOG_H
#define CSVSETTINGS_SETTINGSDIALOG_H
#include <QStandardItem>
#include "ui_settingstab.h"
class QListWidgetItem;
namespace CSMSettings
{
class Setting;
class UserSettings;
}
2014-09-16 07:44:07 +10:00
namespace CSVSettings {
class SettingsDialog : public QTabWidget, private Ui::TabWidget
2014-09-16 07:44:07 +10:00
{
Q_OBJECT
CSMSettings::UserSettings *mModel;
2014-09-16 07:44:07 +10:00
public:
2014-09-17 06:11:41 +10:00
SettingsDialog (QTabWidget *parent = 0);
///set the model the view uses (instance of UserSettings)
void setModel (CSMSettings::UserSettings &model) { mModel = &model; }
2014-09-16 07:44:07 +10:00
protected:
///save settings from the GUI to file
void saveSettings();
2014-09-16 07:44:07 +10:00
/// Settings are written on close
void closeEvent (QCloseEvent *event);
private:
///sets the defined values for the views that have been created
2014-09-17 06:11:41 +10:00
void setViewValues();
2014-09-16 07:44:07 +10:00
///create connections between settings (used for proxy settings)
void createConnections (const QList <CSMSettings::Setting *> &list);
2014-09-16 07:44:07 +10:00
public slots:
void show();
2014-09-17 06:11:41 +10:00
void rendererChanged();
void slotStandardToggled(bool checked);
2014-09-16 07:44:07 +10:00
};
}
#endif // CSVSETTINGS_SETTINGSDIALOG_H