openmw-tes3coop/apps/opencs/view/settings/settingsdialog.hpp

59 lines
1.3 KiB
C++
Raw Normal View History

2014-09-15 21:44:07 +00: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-15 21:44:07 +00:00
namespace CSVSettings {
class SettingsDialog : public QTabWidget, private Ui::TabWidget
2014-09-15 21:44:07 +00:00
{
Q_OBJECT
CSMSettings::UserSettings *mModel;
2014-09-15 21:44:07 +00:00
public:
2014-09-16 20:11:41 +00:00
SettingsDialog (QTabWidget *parent = 0);
///set the model the view uses (instance of UserSettings)
void setModel (CSMSettings::UserSettings &model) { mModel = &model; }
2014-09-15 21:44:07 +00:00
protected:
///save settings from the GUI to file
void saveSettings();
2014-09-15 21:44:07 +00:00
/// Settings are written on close
void closeEvent (QCloseEvent *event);
private:
///sets the defined values for the views that have been created
2014-09-16 20:11:41 +00:00
void setViewValues();
2014-09-15 21:44:07 +00:00
///create connections between settings (used for proxy settings)
void createConnections (const QList <CSMSettings::Setting *> &list);
2014-09-15 21:44:07 +00:00
public slots:
void show();
void slotStandardClicked();
void slotCustomClicked();
void slotRendererChanged(const QString &renderer);
void slotOverrideToggled(bool checked);
2014-09-16 20:11:41 +00:00
void slotStandardToggled(bool checked);
2014-09-15 21:44:07 +00:00
};
}
#endif // CSVSETTINGS_SETTINGSDIALOG_H