dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
waypointdialog.h
Go to the documentation of this file.
1 
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.
17  *
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.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with this program; if not, see <http://www.gnu.org/licenses/>
25  */
26 
27 #ifndef WAYPOINT_DIALOG_H
28 #define WAYPOINT_DIALOG_H
29 
30 #include <QComboBox>
31 #include <QDialog>
32 #include <QDataWidgetMapper>
33 #include <QItemDelegate>
34 #include <QItemSelectionModel>
35 #include "flightdatamodel.h"
36 
37 class Ui_waypoint_dialog;
38 
42 class PATHPLANNER_EXPORT WaypointDialog : public QDialog
43 {
44  Q_OBJECT
45 
46 public:
47  WaypointDialog(QWidget *parent, QAbstractItemModel *model, QItemSelectionModel *selection);
48  ~WaypointDialog();
49 
51  void editWaypoint(int number);
52 
53 private slots:
55  void currentIndexChanged(int index);
56 
58  void setupModeWidgets();
59 
61  void onCancelButton_clicked();
62 
64  void onOkButton_clicked();
65 
67  void onPreviousButton_clicked();
68 
70  void onNextButton_clicked();
71 
73  void currentRowChanged(QModelIndex, QModelIndex);
74 
76  void enableEditWidgets();
77 
78 private:
80  Ui_waypoint_dialog *ui;
81 
83  QDataWidgetMapper *mapper;
84 
86  QAbstractItemModel *model;
87 
89  QItemSelectionModel *itemSelection;
90 
92  int index;
93 };
94 
95 #endif /* WAYPOINT_DIALOG_H */
The WaypointDialog class creates a dialog for editing the properties of a single waypoint.