SlugsVideoCamControl.h 1.27 KB
Newer Older
1 2 3 4 5 6 7 8
#ifndef SLUGSVIDEOCAMCONTROL_H
#define SLUGSVIDEOCAMCONTROL_H

#include <QWidget>
#include <QMouseEvent>
#include <QGraphicsView>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsScene>
tecnosapiens's avatar
tecnosapiens committed
9 10
#include "SlugsPadCameraControl.h"

11

12 13
#define DELTA 1000

14 15 16 17
namespace Ui {
    class SlugsVideoCamControl;
}

18
class SlugsVideoCamControl : public QWidget
19 20 21 22 23 24 25 26

{
    Q_OBJECT

public:
    explicit SlugsVideoCamControl(QWidget *parent = 0);
    ~SlugsVideoCamControl();

27 28 29 30 31 32 33 34 35 36
public slots:
    void changeViewCamBorderAtMapStatus(bool status);
    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 changeCamPosition(double dist, double dir, QString textDir);
    void viewCamBorderAtMap(bool status);

37
protected:
38 39
    virtual void mousePressEvent(QMouseEvent* event);
    virtual void mouseReleaseEvent(QMouseEvent* event);
40
    void mouseMoveEvent(QMouseEvent* event);
tecnosapiens's avatar
tecnosapiens committed
41 42
    //virtual void paintEvent(QPaintEvent *pe);
    void paintEvent(QPaintEvent *pe);
43

44

45 46
private:
    Ui::SlugsVideoCamControl *ui;
47
    bool dragging;
48 49 50

    int x1;
    int y1;
tecnosapiens's avatar
tecnosapiens committed
51 52 53 54
     QPoint tL;
      QPoint bR;

       SlugsPadCameraControl* padCamera;
55 56


57 58 59
};

#endif // SLUGSVIDEOCAMCONTROL_H