SlugsVideoCamControl.cpp 2.27 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
#include "SlugsVideoCamControl.h"
#include "ui_SlugsVideoCamControl.h"

#include <QGraphicsScene>
#include <QGraphicsTextItem>
#include <QTextStream>
#include <QScrollBar>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QDebug>
#include <qmath.h>
#include <QPainter>
#include <QGridLayout>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>
#include "SlugsPadCameraControl.h"


SlugsVideoCamControl::SlugsVideoCamControl(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SlugsVideoCamControl)
{
    ui->setupUi(this);
//   x1= 0;
//   y1 = 0;

    connect(ui->viewCamBordeatMap_checkBox,SIGNAL(clicked(bool)),this,SLOT(changeViewCamBorderAtMapStatus(bool)));
    padCamera = new SlugsPadCameraControl(this);

    ui->gridLayout->addWidget(padCamera);

    //connect(padCamera,SIGNAL(mouseMoveCoord(int,int)),this,SLOT(mousePadMoveEvent(int,int)));
    //connect(padCamera,SIGNAL(mousePressCoord(int,int)),this,SLOT(mousePadPressEvent(int,int)));
    //connect(padCamera,SIGNAL(mouseReleaseCoord(int,int)),this,SLOT(mousePadReleaseEvent(int,int)));
    //connect(padCamera,SIGNAL(changeCursorPosition(double,double,QString)),this,SLOT(getDeltaPositionPad(double,double,QString)));


}

SlugsVideoCamControl::~SlugsVideoCamControl()
{
    delete ui;
}

//void SlugsVideoCamControl::mouseMoveEvent(QMouseEvent *event)
//{
//     Q_UNUSED(event);

//}


//void SlugsVideoCamControl::mousePressEvent(QMouseEvent *evnt)
//{
//  Q_UNUSED(evnt);

//}

//void SlugsVideoCamControl::mouseReleaseEvent(QMouseEvent *evnt)
//{
//    Q_UNUSED(evnt);

//}


//void SlugsVideoCamControl::mousePadMoveEvent(int x, int y)
//{

//}

//void SlugsVideoCamControl::mousePadPressEvent(int x, int y)
//{

//}

//void SlugsVideoCamControl::mousePadReleaseEvent(int x, int y)
//{


//}

void SlugsVideoCamControl::changeViewCamBorderAtMapStatus(bool status)
{
    emit viewCamBorderAtMap(status);
}

void SlugsVideoCamControl::getDeltaPositionPad(double bearing, double distance, QString dirText)
{
    ui->label_dir->setText(dirText);
    ui->label_x->setText("Distancia= " + QString::number(distance));
    ui->label_y->setText("Bearing= " + QString::number(bearing));

    //emit changeCamPosition(20, bearing, dirText);
}