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
public slots:
    void getDeltaPositionPad(int x, int y);
22 23 24



25 26
    double getDistPixel(int x1, int y1, int x2, int y2);
    QPointF ObtenerMarcacionDistanciaPixel(double lon1, double lat1, double lon2, double lat2);
27 28
    QPointF getPointBy_BearingDistance(double lat1, double lon1, double rumbo, double distancia);

29

30

31

32 33 34 35 36 37 38 39 40 41 42 43 44 45
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);

46

47 48
private:
    Ui::SlugsPadCameraControl *ui;
49 50 51
      bool dragging;
      int x1;
      int y1;
52 53 54 55 56
      int xFin;
      int yFin;
      double bearingPad;
      double distancePad;
      QString directionPad;
57

58 59 60
};

#endif // SLUGSPADCAMERACONTROL_H