summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/camera/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/mainwindow.cpp11
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
@@ -14,6 +14,7 @@
14**********************************************************************/ 14**********************************************************************/
15 15
16#include "mainwindow.h" 16#include "mainwindow.h"
17#include "zcameraio.h"
17 18
18#include <qvbox.h> 19#include <qvbox.h>
19#include <qpushbutton.h> 20#include <qpushbutton.h>
@@ -26,7 +27,7 @@ CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags
26 :QMainWindow( parent, name, f ) 27 :QMainWindow( parent, name, f )
27{ 28{
28 QVBox* v = new QVBox( this ); 29 QVBox* v = new QVBox( this );
29 QLabel* l = new QLabel( v ); 30 l = new QLabel( v );
30 l->setFixedSize( QSize( 240, 160 ) ); 31 l->setFixedSize( QSize( 240, 160 ) );
31 QPushButton* p = new QPushButton( "Snapshot", v ); 32 QPushButton* p = new QPushButton( "Snapshot", v );
32 connect( p, SIGNAL( clicked() ), this, SLOT( clickedSnapShot() ) ); 33 connect( p, SIGNAL( clicked() ), this, SLOT( clickedSnapShot() ) );
@@ -45,6 +46,12 @@ CameraMainWindow::~CameraMainWindow()
45 46
46void CameraMainWindow::clickedSnapShot() 47void CameraMainWindow::clickedSnapShot()
47{ 48{
48 qDebug( "Hello!" ); 49 QImage i;
50 QPixmap p;
51 if ( ZCameraIO::instance()->snapshot( &i ) )
52 {
53 p.convertFromImage( i );
54 l->setPixmap( p );
55 }
49} 56}
50 57