SlugsPadCameraControl.h 1.15 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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);

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);

39 40
private:
    Ui::SlugsPadCameraControl *ui;
41 42 43 44
      bool dragging;
      int x1;
      int y1;

45 46 47
};

#endif // SLUGSPADCAMERACONTROL_H