SlugsPadCameraControl.h 1.36 KB
Newer Older
1 2 3 4
#ifndef SLUGSPADCAMERACONTROL_H
#define SLUGSPADCAMERACONTROL_H

#include <QWidget>
5
#include <QGraphicsView>
6 7 8 9 10

namespace Ui {
    class SlugsPadCameraControl;
}

11
class SlugsPadCameraControl : public QWidget //QGraphicsView//
12 13 14 15 16
{
    Q_OBJECT

public:
    explicit SlugsPadCameraControl(QWidget *parent = 0);
17

18 19
    ~SlugsPadCameraControl();

20 21 22 23
public slots:
    void getDeltaPositionPad(int x, int y);
    double getDistPixel(int x1, int y1, int x2, int y2);
    QPointF ObtenerMarcacionDistanciaPixel(double lon1, double lat1, double lon2, double lat2);
24 25
    QPointF getPointBy_BearingDistance(double lat1, double lon1, double rumbo, double distancia);

26

27

28 29 30 31 32 33 34 35 36 37 38 39 40 41
signals:
    void mouseMoveCoord(int x, int y);
    void mousePressCoord(int x, int y);
    void mouseReleaseCoord(int x, int y);
    void dirCursorText(QString dir);
    void distance_Bearing(double dist, double bearing);
     void changeCursorPosition(double bearing, double distance, QString textDir);

protected:
    void mousePressEvent(QMouseEvent* event);
    void mouseReleaseEvent(QMouseEvent* event);
    void mouseMoveEvent(QMouseEvent* event);
    void paintEvent(QPaintEvent *pe);

42

43 44
private:
    Ui::SlugsPadCameraControl *ui;
45 46 47
      bool dragging;
      int x1;
      int y1;
48 49 50 51 52
      int xFin;
      int yFin;
      double bearingPad;
      double distancePad;
      QString directionPad;
53

54 55 56
};

#endif // SLUGSPADCAMERACONTROL_H