summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/camera/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/camera/mainwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/multimedia/camera/mainwindow.cpp b/noncore/multimedia/camera/mainwindow.cpp
index 2cca9f9..4218232 100644
--- a/noncore/multimedia/camera/mainwindow.cpp
+++ b/noncore/multimedia/camera/mainwindow.cpp
@@ -11,24 +11,26 @@
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#include "mainwindow.h" 16#include "mainwindow.h"
17#include "zcameraio.h" 17#include "zcameraio.h"
18 18
19#include <qvbox.h> 19#include <qvbox.h>
20#include <qpushbutton.h> 20#include <qpushbutton.h>
21#include <qlabel.h> 21#include <qlabel.h>
22 22
23#include <qdirectpainter_qws.h>
24
23#include <qpe/resource.h> 25#include <qpe/resource.h>
24#include <opie/ofiledialog.h> 26#include <opie/ofiledialog.h>
25 27
26CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags f ) 28CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags f )
27 :QMainWindow( parent, name, f ) 29 :QMainWindow( parent, name, f )
28{ 30{
29 QVBox* v = new QVBox( this ); 31 QVBox* v = new QVBox( this );
30 l = new QLabel( v ); 32 l = new QLabel( v );
31 l->setFixedSize( QSize( 240, 160 ) ); 33 l->setFixedSize( QSize( 240, 160 ) );
32 QPushButton* p = new QPushButton( "Snapshot", v ); 34 QPushButton* p = new QPushButton( "Snapshot", v );
33 connect( p, SIGNAL( clicked() ), this, SLOT( clickedSnapShot() ) ); 35 connect( p, SIGNAL( clicked() ), this, SLOT( clickedSnapShot() ) );
34 v->show(); 36 v->show();
@@ -37,21 +39,26 @@ CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags
37 setCentralWidget( v ); 39 setCentralWidget( v );
38 40
39}; 41};
40 42
41 43
42CameraMainWindow::~CameraMainWindow() 44CameraMainWindow::~CameraMainWindow()
43{ 45{
44} 46}
45 47
46 48
47void CameraMainWindow::clickedSnapShot() 49void CameraMainWindow::clickedSnapShot()
48{ 50{
51 QDirectPainter fb( l );
52 ZCameraIO::instance()->snapshot( fb.frameBuffer() );
53
54 /*
49 QImage i; 55 QImage i;
50 QPixmap p; 56 QPixmap p;
51 if ( ZCameraIO::instance()->snapshot( &i ) ) 57 if ( ZCameraIO::instance()->snapshot( &i ) )
52 { 58 {
53 p.convertFromImage( i ); 59 p.convertFromImage( i );
54 l->setPixmap( p ); 60 l->setPixmap( p );
55 } 61 }
62 */
56} 63}
57 64