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
pfdqmlgadgetoptionspage.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 "
pfdqmlgadgetoptionspage.h
"
17
#include "
pfdqmlgadgetconfiguration.h
"
18
#include "ui_pfdqmlgadgetoptionspage.h"
19
#include "
extensionsystem/pluginmanager.h
"
20
#include "
uavobjects/uavobjectmanager.h
"
21
#include "
uavobjects/uavdataobject.h
"
22
23
#include <QtAlgorithms>
24
#include <QStringList>
25
26
PfdQmlGadgetOptionsPage::PfdQmlGadgetOptionsPage
(
PfdQmlGadgetConfiguration
*config, QObject *parent)
27
: IOptionsPage(parent)
28
, m_config(config)
29
{
30
}
31
32
// creates options page widget (uses the UI file)
33
QWidget *
PfdQmlGadgetOptionsPage::createPage
(QWidget *parent)
34
{
35
options_page =
new
Ui::PfdQmlGadgetOptionsPage();
36
// main widget
37
QWidget *optionsPageWidget =
new
QWidget(parent);
38
// main layout
39
options_page->setupUi(optionsPageWidget);
40
41
// Restore the contents from the settings:
42
options_page->qmlSourceFile->setExpectedKind(Utils::PathChooser::File);
43
options_page->qmlSourceFile->setPromptDialogFilter(tr(
"QML file (*.qml)"
));
44
options_page->qmlSourceFile->setPromptDialogTitle(tr(
"Choose QML file"
));
45
options_page->qmlSourceFile->setPath(m_config->
qmlFile
());
46
47
return
optionsPageWidget;
48
}
49
56
void
PfdQmlGadgetOptionsPage::apply
()
57
{
58
m_config->
setQmlFile
(options_page->qmlSourceFile->path());
59
}
60
61
void
PfdQmlGadgetOptionsPage::finish
()
62
{
63
}
PfdQmlGadgetConfiguration::qmlFile
QString qmlFile() const
Definition:
pfdqmlgadgetconfiguration.h:32
pluginmanager.h
PfdQmlGadgetOptionsPage::finish
void finish()
Definition:
pfdqmlgadgetoptionspage.cpp:61
PfdQmlGadgetOptionsPage::apply
void apply()
Definition:
pfdqmlgadgetoptionspage.cpp:56
PfdQmlGadgetConfiguration::setQmlFile
void setQmlFile(const QString &fileName)
Definition:
pfdqmlgadgetconfiguration.h:30
uavdataobject.h
pfdqmlgadgetconfiguration.h
PfdQmlGadgetOptionsPage::PfdQmlGadgetOptionsPage
PfdQmlGadgetOptionsPage(PfdQmlGadgetConfiguration *config, QObject *parent=nullptr)
Definition:
pfdqmlgadgetoptionspage.cpp:26
PfdQmlGadgetConfiguration
Definition:
pfdqmlgadgetconfiguration.h:23
PfdQmlGadgetOptionsPage::createPage
QWidget * createPage(QWidget *parent)
Definition:
pfdqmlgadgetoptionspage.cpp:33
pfdqmlgadgetoptionspage.h
uavobjectmanager.h
ground
gcs
src
plugins
pfdqml
pfdqmlgadgetoptionspage.cpp
Generated by
1.8.6