1 /********************************************************************************
2 * @file osgearthviewgadgetfactory.cpp
3 * @author The OpenPilot Team Copyright (C) 2012.
4 * @addtogroup GCSPlugins GCS Plugins
6 * @addtogroup OsgEarthview Plugin
8 * @brief Osg Earth view of UAV
9 *****************************************************************************/
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "osgearthviewgadgetfactory.h"
26 #include "osgearthviewwidget.h"
27 #include "osgearthviewgadget.h"
28 #include "osgearthviewgadgetconfiguration.h"
29 #include "osgearthviewgadgetoptionspage.h"
30 #include <coreplugin/iuavgadget.h>
32 OsgEarthviewGadgetFactory::OsgEarthviewGadgetFactory(QObject
*parent
) :
33 IUAVGadgetFactory(QString("OsgEarthviewGadget"),
38 OsgEarthviewGadgetFactory::~OsgEarthviewGadgetFactory()
41 Core::IUAVGadget
*OsgEarthviewGadgetFactory::createGadget(QWidget
*parent
)
43 OsgEarthviewWidget
*gadgetWidget
= new OsgEarthviewWidget(parent
);
45 return new OsgEarthviewGadget(QString("OsgEarthviewGadget"), gadgetWidget
, parent
);
48 IUAVGadgetConfiguration
*OsgEarthviewGadgetFactory::createConfiguration(QSettings
*qSettings
)
50 return new OsgEarthviewGadgetConfiguration(QString("OsgEarthviewGadget"), qSettings
);
53 IOptionsPage
*OsgEarthviewGadgetFactory::createOptionsPage(IUAVGadgetConfiguration
*config
)
55 return new OsgEarthviewGadgetOptionsPage(qobject_cast
<OsgEarthviewGadgetConfiguration
*>(config
));