1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/apps/opencs/view/settings/settingwindow.hpp

50 lines
1019 B
C++
Raw Normal View History

2014-04-22 22:17:19 -05:00
#ifndef CSVSETTINGS_SETTINGWINDOW_HPP
#define CSVSETTINGS_SETTINGWINDOW_HPP
#include <QMainWindow>
#include <QList>
#include "../../model/settings/support.hpp"
namespace CSMSettings {
class Setting;
2014-05-06 07:33:32 -05:00
class UserSettings;
2014-04-22 22:17:19 -05:00
}
namespace CSVSettings {
class Page;
class View;
typedef QList <Page *> PageList;
class SettingWindow : public QMainWindow
{
Q_OBJECT
PageList mPages;
2014-05-06 07:33:32 -05:00
CSMSettings::UserSettings *mModel;
2014-04-22 22:17:19 -05:00
public:
explicit SettingWindow(QWidget *parent = 0);
View *findView (const QString &pageName, const QString &setting);
2014-05-06 07:33:32 -05:00
void setModel (CSMSettings::UserSettings &model) { mModel = &model; }
2014-04-22 22:17:19 -05:00
protected:
virtual void closeEvent (QCloseEvent *event);
void createPages();
const PageList &pages() const { return mPages; }
void saveSettings();
private:
void createConnections (const QList <CSMSettings::Setting *> &list);
};
}
#endif // CSVSETTINGS_SETTINGWINDOW_HPP