From 911a05806c4cce85750f3bd9bca84e18162cb739 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Tue, 01 Apr 2003 23:19:16 +0000 Subject: figured out how to get binary RAW data into a QImage actual capturing is now only a footstep away :-D --- (limited to 'noncore/multimedia/camera/mainwindow.cpp') diff --git a/noncore/multimedia/camera/mainwindow.cpp b/noncore/multimedia/camera/mainwindow.cpp index 6431dfa..2cca9f9 100644 --- a/noncore/multimedia/camera/mainwindow.cpp +++ b/noncore/multimedia/camera/mainwindow.cpp @@ -14,6 +14,7 @@ **********************************************************************/ #include "mainwindow.h" +#include "zcameraio.h" #include #include @@ -26,7 +27,7 @@ CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags :QMainWindow( parent, name, f ) { QVBox* v = new QVBox( this ); - QLabel* l = new QLabel( v ); + l = new QLabel( v ); l->setFixedSize( QSize( 240, 160 ) ); QPushButton* p = new QPushButton( "Snapshot", v ); connect( p, SIGNAL( clicked() ), this, SLOT( clickedSnapShot() ) ); @@ -45,6 +46,12 @@ CameraMainWindow::~CameraMainWindow() void CameraMainWindow::clickedSnapShot() { - qDebug( "Hello!" ); + QImage i; + QPixmap p; + if ( ZCameraIO::instance()->snapshot( &i ) ) + { + p.convertFromImage( i ); + l->setPixmap( p ); + } } -- cgit v0.9.0.2