LP-419 cleanup QSettings usage throughout GCS
[librepilot.git] / ground / gcs / src / plugins / pfdqml / pfdqmlgadget.cpp
blob872b8bf05044bf32281a3723854839212e931b01
1 /**
2 ******************************************************************************
4 * @file pfdqmlgadget.cpp
5 * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
6 * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
7 * @addtogroup
8 * @{
9 * @addtogroup
10 * @{
11 * @brief
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.
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.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "pfdqmlgadget.h"
29 #include "pfdqmlgadgetwidget.h"
30 #include "pfdqmlgadgetconfiguration.h"
32 PfdQmlGadget::PfdQmlGadget(QString classId, QWidget *parent) :
33 IUAVGadget(classId, parent)
35 m_qmlGadgetWidget = new PfdQmlGadgetWidget(parent);
38 PfdQmlGadget::~PfdQmlGadget()
40 delete m_qmlGadgetWidget;
43 QWidget *PfdQmlGadget::widget()
45 return m_qmlGadgetWidget;
48 void PfdQmlGadget::loadConfiguration(IUAVGadgetConfiguration *config)
50 PfdQmlGadgetConfiguration *m = qobject_cast<PfdQmlGadgetConfiguration *>(config);
52 m_qmlGadgetWidget->loadConfiguration(m);
55 void PfdQmlGadget::saveState(QSettings &settings)
57 m_qmlGadgetWidget->saveState(settings);
60 void PfdQmlGadget::restoreState(QSettings &settings)
62 m_qmlGadgetWidget->restoreState(settings);