summaryrefslogtreecommitdiff
path: root/client/videowidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/videowidget.cc')
-rw-r--r--client/videowidget.cc40
1 files changed, 17 insertions, 23 deletions
diff --git a/client/videowidget.cc b/client/videowidget.cc
index 8f733d5..6ff062d 100644
--- a/client/videowidget.cc
+++ b/client/videowidget.cc
@@ -24,38 +24,33 @@
* along with MIaV; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include <config.h>
-
-#ifdef USE_GUI
-
#include "videowidget.h"
-
#include "miav_config.h"
-VideoWidget::VideoWidget(QWidget *p, QWidget* old) : QWidget(p)
+VideoWidget::VideoWidget() : QFrame()
{
- parent = p;
+ // A welltested hack to force SDL to draw in the QWidget
- oldWindow = old;
+ // QString ids;
+ // setenv("SDL_WINDOWID", ids.setNum(winId()).toStdString().c_str(), 1);
+
+ // Make it visible
+ QPalette palette;
+ palette.setColor(backgroundRole(), Qt::blue);
+ setPalette(palette);
+
+ setLineWidth(1);
+ setFrameStyle(QFrame::Plain);
- // A welltested hack to force SDL to draw in the QWidget
- QString ids;
- setenv("SDL_WINDOWID", ids.setNum(winId()).toStdString().c_str(), 1);
}
VideoWidget::~VideoWidget()
{
}
-QPixmap VideoWidget::getScreenshot()
-{
- return QPixmap::grabWindow (winId());
-}
-
-static VideoWidget *fs = NULL;
-
void VideoWidget::mouseReleaseEvent(QMouseEvent *event)
{
+ /*
if(!parent) { // We are a fullscreen window
QString ids;
setenv("SDL_WINDOWID", ids.setNum(oldWindow->winId()).toStdString().c_str(), 1);
@@ -64,12 +59,11 @@ void VideoWidget::mouseReleaseEvent(QMouseEvent *event)
} else { // We are a nested window
// first delete old instance (if any)
if(fs) delete fs;
- fs = new VideoWidget(NULL, this);
+ fs = new VideoWidget();
fs->showFullScreen();
- fs->setFixedWidth(config->readInt("pixel_width"));
- fs->setFixedHeight(config->readInt("pixel_height"));
+ fs->setFixedWidth(MIaV::config->readInt("pixel_width"));
+ fs->setFixedHeight(MIaV::config->readInt("pixel_height"));
//camera->resize(fs->width(), fs->height(), true);
}
+ */
}
-
-#endif /* USE_GUI */