summaryrefslogtreecommitdiff
path: root/src/videowidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/videowidget.cc')
-rw-r--r--src/videowidget.cc21
1 files changed, 6 insertions, 15 deletions
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 */