summaryrefslogtreecommitdiff
path: root/src/videowidget.cc
diff options
context:
space:
mode:
authordeva <deva>2005-07-25 15:56:27 +0000
committerdeva <deva>2005-07-25 15:56:27 +0000
commitca7341269959f106656efa78f17628560105bd3d (patch)
tree662a9ff242eebdbc7a393c5baaa356adf57a05a1 /src/videowidget.cc
parent8c381fe44a179b4b84ecc50e810980f7af9a0f58 (diff)
*** empty log message ***
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 */