author | mickeyl <mickeyl> | 2003-04-01 23:19:16 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-01 23:19:16 (UTC) |
commit | 911a05806c4cce85750f3bd9bca84e18162cb739 (patch) (side-by-side diff) | |
tree | d5bbed42b991968852aa30e702deda95fa7b1393 /noncore/multimedia/camera/mainwindow.cpp | |
parent | 3497616220db68ea4105880c40c4c542d9b5228d (diff) | |
download | opie-911a05806c4cce85750f3bd9bca84e18162cb739.zip opie-911a05806c4cce85750f3bd9bca84e18162cb739.tar.gz opie-911a05806c4cce85750f3bd9bca84e18162cb739.tar.bz2 |
figured out how to get binary RAW data into a QImage
actual capturing is now only a footstep away :-D
Diffstat (limited to 'noncore/multimedia/camera/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/camera/mainwindow.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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 @@ -16,2 +16,3 @@ #include "mainwindow.h" +#include "zcameraio.h" @@ -28,3 +29,3 @@ CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags QVBox* v = new QVBox( this ); - QLabel* l = new QLabel( v ); + l = new QLabel( v ); l->setFixedSize( QSize( 240, 160 ) ); @@ -47,3 +48,9 @@ void CameraMainWindow::clickedSnapShot() { - qDebug( "Hello!" ); + QImage i; + QPixmap p; + if ( ZCameraIO::instance()->snapshot( &i ) ) + { + p.convertFromImage( i ); + l->setPixmap( p ); + } } |