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
generalsettings.h
Go to the documentation of this file.
1
15
/*
16
* This program is free software; you can redistribute it and/or modify
17
* it under the terms of the GNU General Public License as published by
18
* the Free Software Foundation; either version 3 of the License, or
19
* (at your option) any later version.
20
*
21
* This program is distributed in the hope that it will be useful, but
22
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24
* for more details.
25
*
26
* You should have received a copy of the GNU General Public License along
27
* with this program; if not, see <http://www.gnu.org/licenses/>
28
*/
29
30
#ifndef GENERALSETTINGS_H
31
#define GENERALSETTINGS_H
32
33
#include <
coreplugin/dialogs/ioptionspage.h
>
34
#include <QtCore/QPointer>
35
#include <QWidget>
36
#include <QSettings>
37
#include <QtNetwork/QNetworkProxy>
38
39
namespace
Core {
40
namespace
Internal {
41
42
namespace
Ui {
43
class
GeneralSettings
;
44
}
45
46
class
CORE_EXPORT
GeneralSettings
:
public
IOptionsPage
47
{
48
Q_OBJECT
49
50
public
:
51
GeneralSettings
();
52
53
QString id()
const
;
54
QString trName()
const
;
55
QString category()
const
;
56
QString trCategory()
const
;
57
QWidget *createPage(QWidget *parent);
58
void
apply();
59
void
finish();
60
bool
saveSettingsOnExit()
const
;
61
bool
autoConnect()
const
;
62
bool
autoSelect()
const
;
63
void
readSettings(QSettings *qs);
64
void
saveSettings(QSettings *qs);
65
bool
useExpertMode()
const
;
66
QNetworkProxy getNetworkProxy();
67
void
setObservations(QString value);
68
QString getObservations();
69
void
setVehicleType(QString type);
70
QString getVehicleType();
71
void
setBoardType(QString type);
72
QString getBoardType();
73
void
setWeight(
int
weight);
74
int
getWeight();
75
void
setVehicleSize(
int
spacing);
76
int
getVehicleSize();
77
void
setBatteryCells(
int
cells);
78
int
getBatteryCells();
79
void
setMotors(QString motors);
80
QString getMotors();
81
void
setESCs(QString escs);
82
QString getESCs();
83
void
setProps(QString props);
84
QString getProps();
85
signals:
86
void
generalSettingsChanged();
87
private
slots:
88
void
resetLanguage();
89
void
showHelpForExternalEditor();
90
void
slotAutoConnect(
int
);
91
92
private
:
93
void
fillLanguageBox()
const
;
94
void
fillProxyTypesBox()
const
;
95
QString language()
const
;
96
void
setLanguage(
const
QString &);
97
Ui::GeneralSettings *m_page;
98
QString m_language;
99
bool
m_saveSettingsOnExit;
100
bool
m_autoConnect;
101
bool
m_autoSelect;
102
bool
m_useExpertMode;
103
QPointer<QWidget> m_dialog;
104
QList<QTextCodec *>
m_codecs;
105
int
m_proxyType;
106
int
m_proxyPort;
107
QString m_proxyHostname;
108
QString m_proxyUser;
109
QString m_proxyPassword;
110
QString m_observations;
111
QString m_vehicle;
112
QString m_board;
113
int
m_weight;
114
int
m_size;
115
int
m_cells;
116
QString m_motors;
117
QString m_escs;
118
QString m_props;
119
};
120
}
// namespace Internal
121
}
// namespace Core
122
123
#endif // GENERALSETTINGS_H
Core::Internal::GeneralSettings
Definition:
generalsettings.h:46
ioptionspage.h
QList< QTextCodec * >
Core::IOptionsPage
The IOptionsPage is an interface for providing options pages.
Definition:
ioptionspage.h:42
ground
gcs
src
plugins
coreplugin
generalsettings.h
Generated by
1.8.6