Fix game:addSpawnShapesByZone
[ryzomcore.git] / studio / src / plugins / core / settings_dialog.h
blob3c4d14910323d4c355bc888b70251ff704464611
1 // Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Winch Gate Property Limited
6 // Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
7 //
8 // This program is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef SETTINGS_DIALOG_H
22 #define SETTINGS_DIALOG_H
24 #include "ui_settings_dialog.h"
26 // Qt includes
27 #include <QtCore/QList>
29 // Project includes
30 #include "../../extension_system/iplugin_manager.h"
32 namespace Core
34 class IOptionsPage;
36 /**
37 @class CSettingsDialog
38 @brief Settings dialog
40 class SettingsDialog: public QDialog
42 Q_OBJECT
44 public:
45 SettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
46 const QString &initialCategory = QString(),
47 const QString &initialPage = QString(),
48 QWidget *parent = 0);
50 ~SettingsDialog();
52 /// Run the dialog and return true if 'Ok' was choosen or 'Apply' was invoked at least once
53 bool execDialog();
55 public Q_SLOTS:
56 void done(int);
58 private Q_SLOTS:
59 void pageSelected();
60 void accept();
61 void reject();
62 void apply();
64 private:
65 QList<IOptionsPage *> m_pages;
66 bool m_applied;
67 QString m_currentCategory;
68 QString m_currentPage;
70 ExtensionSystem::IPluginManager *m_plugMan;
72 Ui::SettingsDialog m_ui;
73 }; /* class CSettingsDialog */
75 } /* namespace Core */
77 #endif // SETTINGS_DIALOG_H