diff options
author | deva <deva> | 2005-07-25 15:35:41 +0000 |
---|---|---|
committer | deva <deva> | 2005-07-25 15:35:41 +0000 |
commit | 3551a0a021d3e2ad4e4063602648da333510aef8 (patch) | |
tree | 61e2fc6d279bc33483b158c9835a67004c52d687 /src/videowidget.cc | |
parent | 0f2fc6abcdfb405dcc4c0ed7ea90df2f082b740c (diff) |
*** empty log message ***
Diffstat (limited to 'src/videowidget.cc')
-rw-r--r-- | src/videowidget.cc | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/videowidget.cc b/src/videowidget.cc index 4fadb1d..859763d 100644 --- a/src/videowidget.cc +++ b/src/videowidget.cc @@ -31,6 +31,9 @@ /* * $Log$ + * Revision 1.4 2005/07/25 15:35:41 deva + * *** empty log message *** + * * Revision 1.3 2005/05/03 08:31:59 deva * Removed the error object, and replaced it with a more generic info object. * @@ -44,8 +47,10 @@ #include "videowidget.h" -VideoWidget::VideoWidget(QWidget *parent) : QWidget(parent, "") +VideoWidget::VideoWidget(QWidget *p) : QWidget(p, "") { + parent = p; + // A welltested hack to force SDL to draw in the QWidget QString ids; setenv("SDL_WINDOWID", ids.setNum(winId()), 1); @@ -60,4 +65,25 @@ QPixmap VideoWidget::getScreenshot() return QPixmap::grabWindow (winId()); } +void VideoWidget::mousePressEvent(QMouseEvent *event) +{ + if(isFullScreen()) { + + printf("Going normal\n"); + + reparent(parent, 0, QPoint(0,0), FALSE); + + showNormal(); + + } else { + + printf("Going fullscreen\n"); + + reparent(NULL, 0, QPoint(10,10), FALSE); + + showFullScreen(); + + } +} + #endif /* USE_GUI */ |