Linux multi-monitor fullscreen support
[ryzomcore.git] / studio / src / plugins / core / ioptions_page.h
blobb67ab7cfac8e80ac0f4912704b62aa063aa00eef
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 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 IOPTIONS_PAGE_H
22 #define IOPTIONS_PAGE_H
24 // Project includes
25 #include "core_global.h"
27 // Qt includes
28 #include <QtCore/QObject>
30 QT_BEGIN_NAMESPACE
31 class QWidget;
32 class QIcon;
33 QT_END_NAMESPACE
35 namespace Core
37 /**
38 @interface IOptionsPage
39 @brief The IOptionsPage is an interface for providing options pages.
40 @details You need to subclass this interface and put an instance of your subclass
41 into the plugin manager object pool.
43 class CORE_EXPORT IOptionsPage: public QObject
45 Q_OBJECT
46 public:
47 IOptionsPage(QObject *parent = 0): QObject(parent) {}
48 virtual ~IOptionsPage() {}
50 /// id() is a unique identifier for referencing this page
51 virtual QString id() const = 0;
53 /// trName() is the (translated) name for display.
54 virtual QString trName() const = 0;
56 /// category() is the unique id for the category that the page should be displayed in
57 virtual QString category() const = 0;
59 /// trCategory() is the translated category
60 virtual QString trCategory() const = 0;
62 virtual QIcon categoryIcon() const = 0;
64 /// createPage() is called to retrieve the widget to show in the preferences dialog
65 /// The widget will be destroyed by the widget hierarchy when the dialog closes
66 virtual QWidget *createPage(QWidget *parent) = 0;
68 /// apply() is called to store the settings. It should detect if any changes have been made and store those.
69 virtual void apply() = 0;
71 /// finish() is called directly before the preferences dialog closes
72 virtual void finish() = 0;
75 } // namespace Core
77 #endif // IOPTIONS_PAGE_H