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
pfdqmlgadget.cpp
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful, but
8
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
10
* for more details.
11
*
12
* You should have received a copy of the GNU General Public License along
13
* with this program; if not, see <http://www.gnu.org/licenses/>
14
*/
15
16
#include "
pfdqmlgadget.h
"
17
#include "
pfdqmlgadgetwidget.h
"
18
#include "
pfdqmlgadgetconfiguration.h
"
19
20
#include "
utils/pathutils.h
"
21
22
PfdQmlGadget::PfdQmlGadget
(QString classId,
PfdQmlGadgetWidget
*widget, QWidget *parent)
23
: IUAVGadget(classId, parent)
24
, m_widget(widget)
25
{
26
m_container = NULL;
27
m_parent = parent;
28
}
29
30
PfdQmlGadget::~PfdQmlGadget
()
31
{
32
m_widget->deleteLater();
33
}
34
35
/*
36
This is called when a configuration is loaded, and updates the plugin's settings.
37
Careful: the plugin is already drawn before the loadConfiguration method is called the
38
first time, so you have to be careful not to assume all the plugin values are initialized
39
the first time you use them
40
*/
41
void
PfdQmlGadget::loadConfiguration
(IUAVGadgetConfiguration *config)
42
{
43
PfdQmlGadgetConfiguration
*
m
= qobject_cast<
PfdQmlGadgetConfiguration
*>(config);
44
m_widget->
setQmlFile
(m->
qmlFile
());
45
m_widget->
setSettingsMap
(m->
settings
());
46
}
PfdQmlGadgetConfiguration::qmlFile
QString qmlFile() const
Definition:
pfdqmlgadgetconfiguration.h:32
pfdqmlgadget.h
pathutils.h
m
m
Definition:
uavobjecttemplate.m:257
pfdqmlgadgetconfiguration.h
PfdQmlGadgetConfiguration
Definition:
pfdqmlgadgetconfiguration.h:23
PfdQmlGadgetWidget::setSettingsMap
void setSettingsMap(const QVariantMap &settings)
Definition:
pfdqmlgadgetwidget.cpp:117
PfdQmlGadgetConfiguration::settings
QVariantMap settings() const
Definition:
pfdqmlgadgetconfiguration.h:33
PfdQmlGadget::PfdQmlGadget
PfdQmlGadget(QString classId, PfdQmlGadgetWidget *widget, QWidget *parent=nullptr)
Definition:
pfdqmlgadget.cpp:22
PfdQmlGadget::~PfdQmlGadget
~PfdQmlGadget()
Definition:
pfdqmlgadget.cpp:30
PfdQmlGadgetWidget::setQmlFile
void setQmlFile(QString fn)
Definition:
pfdqmlgadgetwidget.cpp:96
pfdqmlgadgetwidget.h
PfdQmlGadget::loadConfiguration
void loadConfiguration(IUAVGadgetConfiguration *config)
Definition:
pfdqmlgadget.cpp:41
PfdQmlGadgetWidget
Definition:
pfdqmlgadgetwidget.h:24
ground
gcs
src
plugins
pfdqml
pfdqmlgadget.cpp
Generated by
1.8.6