dRonin
adbada4
dRonin GCS
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Groups
Pages
ioptionspage.h
Go to the documentation of this file.
1
13
/*
14
* This program is free software; you can redistribute it and/or modify
15
* it under the terms of the GNU General Public License as published by
16
* the Free Software Foundation; either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful, but
20
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22
* for more details.
23
*
24
* You should have received a copy of the GNU General Public License along
25
* with this program; if not, see <http://www.gnu.org/licenses/>
26
*/
27
28
#ifndef IOPTIONSPAGE_H
29
#define IOPTIONSPAGE_H
30
31
#include <
coreplugin/core_global.h
>
32
33
#include <QtCore/QObject>
34
#include <QIcon>
35
36
QT_BEGIN_NAMESPACE
37
class
QWidget;
38
QT_END_NAMESPACE
39
40
namespace
Core {
41
42
class
CORE_EXPORT
IOptionsPage
:
public
QObject
43
{
44
Q_OBJECT
45
public
:
46
IOptionsPage
(QObject *parent =
nullptr
)
47
: QObject(parent)
48
, m_icon(QIcon())
49
{
50
}
51
virtual
~IOptionsPage
() {}
52
53
void
setIcon
(QIcon icon) { m_icon = icon; }
54
QIcon
icon
() {
return
m_icon; }
55
56
/* gadget options pages can leave these 4 functions as is,
57
since they are decorated by UAVGadgetOptionsPageDecorator,
58
all other options pages must override these */
59
virtual
QString
id
()
const
{
return
""
; };
60
virtual
QString
trName
()
const
{
return
""
; };
61
virtual
QString
category
()
const
{
return
"DefaultCategory"
; };
62
virtual
QString
trCategory
()
const
{
return
"DefaultCategory"
; };
63
64
virtual
QWidget *createPage(QWidget *parent) = 0;
65
virtual
void
apply() = 0;
66
virtual
void
finish() = 0;
67
68
private
:
69
QIcon m_icon;
70
};
71
72
}
// namespace Core
73
74
#endif // IOPTIONSPAGE_H
Core::IOptionsPage::icon
QIcon icon()
Definition:
ioptionspage.h:54
Core::IOptionsPage::category
virtual QString category() const
Definition:
ioptionspage.h:61
Core::IOptionsPage::setIcon
void setIcon(QIcon icon)
Definition:
ioptionspage.h:53
Core::IOptionsPage::id
virtual QString id() const
Definition:
ioptionspage.h:59
core_global.h
Core::IOptionsPage::trName
virtual QString trName() const
Definition:
ioptionspage.h:60
Core::IOptionsPage::trCategory
virtual QString trCategory() const
Definition:
ioptionspage.h:62
Core::IOptionsPage::IOptionsPage
IOptionsPage(QObject *parent=nullptr)
Definition:
ioptionspage.h:46
Core::IOptionsPage
The IOptionsPage is an interface for providing options pages.
Definition:
ioptionspage.h:42
Core::IOptionsPage::~IOptionsPage
virtual ~IOptionsPage()
Definition:
ioptionspage.h:51
ground
gcs
src
plugins
coreplugin
dialogs
ioptionspage.h
Generated by
1.8.6