1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-07 18:46:06 +01:00
LibrePilot/ground/openpilotgcs/src/plugins/opmap/modelmapproxy.h

42 lines
1.3 KiB
C
Raw Normal View History

#ifndef MODELMAPPROXY_H
#define MODELMAPPROXY_H
#include <QWidget>
#include "opmapcontrol/opmapcontrol.h"
#include "pathaction.h"
#include "waypoint.h"
#include "QMutexLocker"
#include "QPointer"
#include "flightdatamodel.h"
#include <QItemSelectionModel>
using namespace mapcontrol;
class modelMapProxy:public QObject
{
Q_OBJECT
public:
explicit modelMapProxy(QObject *parent,OPMapWidget * map,flightDataModel * model,QItemSelectionModel * selectionModel);
WayPointItem *findWayPointNumber(int number);
void createWayPoint(internals::PointLatLng coord);
void deleteWayPoint(int number);
void deleteAll();
private slots:
void on_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight );
void on_rowsInserted ( const QModelIndex & parent, int first, int last );
void on_rowsRemoved ( const QModelIndex & parent, int first, int last );
void on_WPDeleted(int wp_numberint, WayPointItem *);
void on_WPInserted(int,WayPointItem*);
void on_WPValuesChanged(WayPointItem *wp);
void on_currentRowChanged(QModelIndex,QModelIndex);
void on_selectedWPChanged(QList<WayPointItem*>);
private:
OPMapWidget * myMap;
flightDataModel * model;
void refreshOverlays();
QItemSelectionModel * selection;
};
#endif // MODELMAPPROXY_H