From ca7341269959f106656efa78f17628560105bd3d Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 25 Jul 2005 15:56:27 +0000 Subject: *** empty log message *** --- src/videowidget.cc | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/videowidget.cc') diff --git a/src/videowidget.cc b/src/videowidget.cc index 2aa7ba9..4633ff1 100644 --- a/src/videowidget.cc +++ b/src/videowidget.cc @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.6 2005/07/25 15:56:27 deva + * *** empty log message *** + * * Revision 1.5 2005/07/25 15:40:07 deva * *** empty log message *** * @@ -50,8 +53,9 @@ #include "videowidget.h" -VideoWidget::VideoWidget(QWidget *p) : QWidget(p, "") +VideoWidget::VideoWidget(QWidget *p, Camera *c) : QWidget(p, "") { + camera = c; parent = p; // A welltested hack to force SDL to draw in the QWidget @@ -70,33 +74,20 @@ QPixmap VideoWidget::getScreenshot() void VideoWidget::mousePressEvent(QMouseEvent *event) { - QString ids; - if(isFullScreen()) { - printf("Going normal\n"); - setenv("SDL_WINDOWID", ids.setNum(0), 1); - reparent(parent, 0, QPoint(10,10), FALSE); - setenv("SDL_WINDOWID", ids.setNum(winId()), 1); - showNormal(); - } else { - printf("Going fullscreen\n"); - setenv("SDL_WINDOWID", ids.setNum(0), 1); - reparent(NULL, 0, QPoint(0,0), FALSE); - setenv("SDL_WINDOWID", ids.setNum(winId()), 1); - showFullScreen(); - } + camera->resize(width(), height()); } #endif /* USE_GUI */ -- cgit v1.2.3