From 8baafaa4593033e1b95dfd985911e1f87c9f8eb7 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 3 Apr 2006 08:20:25 +0000 Subject: *** empty log message *** --- client/videowidget.cc | 59 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) (limited to 'client/videowidget.cc') diff --git a/client/videowidget.cc b/client/videowidget.cc index cc81ead..a007df8 100644 --- a/client/videowidget.cc +++ b/client/videowidget.cc @@ -27,7 +27,10 @@ #include "videowidget.h" #include "miav_config.h" -VideoWidget::VideoWidget() +#include +#include + +VideoWidget::VideoWidget() : QWidget() { // A welltested hack to force SDL to draw in the QWidget @@ -39,8 +42,8 @@ VideoWidget::VideoWidget() palette.setColor(backgroundRole(), Qt::blue); setPalette(palette); - setLineWidth(10); - setFrameStyle(QFrame::Raised); + // setLineWidth(10); + // setFrameStyle(QFrame::Raised); } @@ -67,3 +70,53 @@ void VideoWidget::mouseReleaseEvent(QMouseEvent *event) } */ } + +void VideoWidget::moveEvent(QMoveEvent *event) +{ + mutex.lock(); + myposition = mapToGlobal(event->pos()); + mutex.unlock(); +} + +void VideoWidget::resizeEvent(QResizeEvent *event) +{ + mutex.lock(); + mysize = event->size(); + mutex.unlock(); +} + +int VideoWidget::getX() +{ + int val; + mutex.lock(); + val = myposition.x(); + mutex.unlock(); + return val; +} + +int VideoWidget::getY() +{ + int val; + mutex.lock(); + val = myposition.y(); + mutex.unlock(); + return val; +} + +int VideoWidget::getWidth() +{ + int val; + mutex.lock(); + val = mysize.width(); + mutex.unlock(); + return val; +} + +int VideoWidget::getHeight() +{ + int val; + mutex.lock(); + val = mysize.height(); + mutex.unlock(); + return val; +} -- cgit v1.2.3