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
gcscontrolgadgetoptionspage.h
Go to the documentation of this file.
1
12
/*
13
* This program is free software; you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation; either version 3 of the License, or
16
* (at your option) any later version.
17
*
18
* This program is distributed in the hope that it will be useful, but
19
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
* for more details.
22
*
23
* You should have received a copy of the GNU General Public License along
24
* with this program; if not, see <http://www.gnu.org/licenses/>
25
*/
26
27
#ifndef GCSCONTROLGADGETOPTIONSPAGE_H
28
#define GCSCONTROLGADGETOPTIONSPAGE_H
29
30
#include "
coreplugin/dialogs/ioptionspage.h
"
31
32
#if defined(USE_SDL)
33
#include "sdlgamepad/sdlgamepad.h"
34
#include <SDL/SDL.h>
35
#endif
36
37
#include <QDebug>
38
#include <QCheckBox>
39
#include <QComboBox>
40
#include <QDoubleSpinBox>
41
#include <QLabel>
42
43
namespace
Core {
44
class
IUAVGadgetConfiguration
;
45
}
46
47
class
GCSControlGadgetConfiguration
;
48
49
namespace
Ui {
50
class
GCSControlGadgetOptionsPage
;
51
}
52
53
using namespace
Core;
54
55
class
GCSControlGadgetOptionsPage
:
public
IOptionsPage
56
{
57
Q_OBJECT
58
public
:
59
explicit
GCSControlGadgetOptionsPage
(
GCSControlGadgetConfiguration
*config,
60
QObject *parent =
nullptr
);
61
~
GCSControlGadgetOptionsPage
();
62
63
QWidget *createPage(QWidget *parent);
64
void
apply();
65
void
finish();
66
67
private
:
68
Ui::GCSControlGadgetOptionsPage *options_page;
69
GCSControlGadgetConfiguration
*m_config;
70
#if defined(USE_SDL)
71
SDLGamepad *sdlGamepad;
72
#endif
73
74
QList<QComboBox *>
chList;
75
QList<QCheckBox *>
chRevList;
76
QList<QComboBox *>
buttonFunctionList;
77
QList<QComboBox *>
buttonActionList;
78
QList<QDoubleSpinBox *>
buttonValueList;
79
QList<QLabel *>
buttonLabelList;
80
81
protected
slots:
82
// signals from joystick
83
void
gamepads(quint8 count);
84
#if defined(USE_SDL)
85
void
buttonState(ButtonNumber number,
bool
pressed);
86
void
axesValues(QListInt16 values);
87
#endif
88
void
updateButtonFunction();
89
void
updateButtonAction(
int
controlID);
90
void
updateButtonAction_0
(
void
) { updateButtonAction(0); };
91
void
updateButtonAction_1
(
void
) { updateButtonAction(1); };
92
void
updateButtonAction_2
(
void
) { updateButtonAction(2); };
93
void
updateButtonAction_3
(
void
) { updateButtonAction(3); };
94
void
updateButtonAction_4
(
void
) { updateButtonAction(4); };
95
void
updateButtonAction_5
(
void
) { updateButtonAction(5); };
96
void
updateButtonAction_6
(
void
) { updateButtonAction(6); };
97
void
updateButtonAction_7
(
void
) { updateButtonAction(7); };
98
};
99
100
#endif // GCSCONTROLGADGETOPTIONSPAGE_H
ioptionspage.h
GCSControlGadgetOptionsPage::updateButtonAction_2
void updateButtonAction_2(void)
Definition:
gcscontrolgadgetoptionspage.h:92
GCSControlGadgetOptionsPage
Definition:
gcscontrolgadgetoptionspage.h:55
GCSControlGadgetOptionsPage::updateButtonAction_7
void updateButtonAction_7(void)
Definition:
gcscontrolgadgetoptionspage.h:97
GCSControlGadgetOptionsPage::updateButtonAction_0
void updateButtonAction_0(void)
Definition:
gcscontrolgadgetoptionspage.h:90
GCSControlGadgetOptionsPage::updateButtonAction_6
void updateButtonAction_6(void)
Definition:
gcscontrolgadgetoptionspage.h:96
Core::IUAVGadgetConfiguration
Definition:
iuavgadgetconfiguration.h:44
GCSControlGadgetOptionsPage::updateButtonAction_4
void updateButtonAction_4(void)
Definition:
gcscontrolgadgetoptionspage.h:94
GCSControlGadgetConfiguration
Definition:
gcscontrolgadgetconfiguration.h:48
QList< QComboBox * >
GCSControlGadgetOptionsPage::updateButtonAction_5
void updateButtonAction_5(void)
Definition:
gcscontrolgadgetoptionspage.h:95
GCSControlGadgetOptionsPage::updateButtonAction_1
void updateButtonAction_1(void)
Definition:
gcscontrolgadgetoptionspage.h:91
Core::IOptionsPage
The IOptionsPage is an interface for providing options pages.
Definition:
ioptionspage.h:42
GCSControlGadgetOptionsPage::updateButtonAction_3
void updateButtonAction_3(void)
Definition:
gcscontrolgadgetoptionspage.h:93
ground
gcs
src
plugins
gcscontrolplugin
gcscontrolgadgetoptionspage.h
Generated by
1.8.6