dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
pathplannerplugin.cpp
Go to the documentation of this file.
1 
11 /*
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20  * for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, see <http://www.gnu.org/licenses/>
24  */
25 #include "pathplannerplugin.h"
27 #include <QtPlugin>
28 #include <QStringList>
30 
31 PathPlannerPlugin::PathPlannerPlugin()
32 {
33  // Do nothing
34 }
35 
36 PathPlannerPlugin::~PathPlannerPlugin()
37 {
38  // Do nothing
39 }
40 
45 bool PathPlannerPlugin::initialize(const QStringList &args, QString *errMsg)
46 {
47  Q_UNUSED(args);
48  Q_UNUSED(errMsg);
49 
50  // Create a factory for making gadgets
51  mf = new PathPlannerGadgetFactory(this);
53 
54  // Create the data model for the flight plan
55  dataModel = new FlightDataModel(this);
56  addAutoReleasedObject(dataModel);
57 
58  // Create a selector and add it to the plugin
59  selection = new QItemSelectionModel(dataModel);
60  addAutoReleasedObject(selection);
61 
62  // Create a common dialog to be used by the map and path planner
63  waypointDialog = new WaypointDialog(NULL, dataModel, selection);
64  addAutoReleasedObject(waypointDialog);
65 
66  return true;
67 }
68 
69 void PathPlannerPlugin::extensionsInitialized()
70 {
71  // Do nothing
72 }
73 
74 void PathPlannerPlugin::shutdown()
75 {
76  // Do nothing
77 }
78 
The WaypointDialog class creates a dialog for editing the properties of a single waypoint.
void addAutoReleasedObject(QObject *obj)
Definition: iplugin.cpp:306