diff options
author | deva <deva> | 2006-04-03 08:20:25 +0000 |
---|---|---|
committer | deva <deva> | 2006-04-03 08:20:25 +0000 |
commit | 8baafaa4593033e1b95dfd985911e1f87c9f8eb7 (patch) | |
tree | d767a363f4e5214a10aeef11584cd50ef4ba0aa4 /client/videowidget.cc | |
parent | 451678d3aadf81b6f39f2f0e7957f4bf704bf9af (diff) |
*** empty log message ***
Diffstat (limited to 'client/videowidget.cc')
-rw-r--r-- | client/videowidget.cc | 59 |
1 files changed, 56 insertions, 3 deletions
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 <QMoveEvent> +#include <QResizeEvent> + +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; +} |