summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/gui/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/camera/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/gui/mainwindow.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/noncore/multimedia/camera/gui/mainwindow.cpp b/noncore/multimedia/camera/gui/mainwindow.cpp
index 5da3757..2f42049 100644
--- a/noncore/multimedia/camera/gui/mainwindow.cpp
+++ b/noncore/multimedia/camera/gui/mainwindow.cpp
@@ -16,12 +16,24 @@
16#include "mainwindow.h" 16#include "mainwindow.h"
17#include "previewwidget.h" 17#include "previewwidget.h"
18#include "zcameraio.h" 18#include "zcameraio.h"
19#include "imageio.h" 19#include "imageio.h"
20#include "avi.h" 20#include "avi.h"
21 21
22/* OPIE */
23#include <opie2/ofiledialog.h>
24#include <opie2/odevice.h>
25#include <opie2/oapplication.h>
26#include <opie2/oconfig.h>
27#include <opie2/odebug.h>
28#include <qpe/global.h>
29#include <qpe/resource.h>
30#include <qpe/qcopenvelope_qws.h>
31using namespace Opie;
32
33/* QT */
22#include <qapplication.h> 34#include <qapplication.h>
23#include <qaction.h> 35#include <qaction.h>
24#include <qvbox.h> 36#include <qvbox.h>
25#include <qcombobox.h> 37#include <qcombobox.h>
26#include <qcursor.h> 38#include <qcursor.h>
27#include <qdatastream.h> 39#include <qdatastream.h>
@@ -33,22 +45,14 @@
33#include <qpopupmenu.h> 45#include <qpopupmenu.h>
34#include <qprogressbar.h> 46#include <qprogressbar.h>
35#include <qpushbutton.h> 47#include <qpushbutton.h>
36#include <qmessagebox.h> 48#include <qmessagebox.h>
37#include <qlayout.h> 49#include <qlayout.h>
38#include <qdirectpainter_qws.h> 50#include <qdirectpainter_qws.h>
39#include <qpe/global.h>
40#include <qpe/resource.h>
41#include <qpe/qcopenvelope_qws.h>
42#include <opie/ofiledialog.h>
43#include <opie/odevice.h>
44using namespace Opie;
45#include <opie2/oapplication.h>
46#include <opie2/oconfig.h>
47#include <opie2/odebug.h>
48 51
52/* STD */
49#include <assert.h> 53#include <assert.h>
50#include <sys/types.h> 54#include <sys/types.h>
51#include <sys/stat.h> 55#include <sys/stat.h>
52#include <fcntl.h> 56#include <fcntl.h>
53#include <string.h> 57#include <string.h>
54#include <errno.h> 58#include <errno.h>
@@ -435,13 +439,13 @@ void CameraMainWindow::shutterClicked()
435 if ( captureFormat != "AVI" ) // capture one photo per shutterClick 439 if ( captureFormat != "AVI" ) // capture one photo per shutterClick
436 { 440 {
437 Global::statusMessage( "CAPTURING..." ); 441 Global::statusMessage( "CAPTURING..." );
438 qApp->processEvents(); 442 qApp->processEvents();
439 443
440 odebug << "Shutter has been pressed" << oendl; 444 odebug << "Shutter has been pressed" << oendl;
441 ODevice::inst()->touchSound(); 445 ODevice::inst()->playTouchSound();
442 446
443 performCapture( captureFormat ); 447 performCapture( captureFormat );
444 } 448 }
445 else // capture video! start with one shutter click and stop with the next 449 else // capture video! start with one shutter click and stop with the next
446 { 450 {
447 !_capturing ? startVideoCapture() : stopVideoCapture(); 451 !_capturing ? startVideoCapture() : stopVideoCapture();
@@ -489,13 +493,13 @@ void CameraMainWindow::performCapture( const QString& format )
489 } 493 }
490} 494}
491 495
492 496
493void CameraMainWindow::startVideoCapture() 497void CameraMainWindow::startVideoCapture()
494{ 498{
495 ODevice::inst()->touchSound(); 499 ODevice::inst()->playTouchSound();
496 ODevice::inst()->setLedState( Led_Mail, Led_BlinkSlow ); 500 ODevice::inst()->setLedState( Led_Mail, Led_BlinkSlow );
497 501
498 _capturefd = ::open( CAPTUREFILE, O_WRONLY | O_CREAT | O_TRUNC ); 502 _capturefd = ::open( CAPTUREFILE, O_WRONLY | O_CREAT | O_TRUNC );
499 if ( _capturefd == -1 ) 503 if ( _capturefd == -1 )
500 { 504 {
501 owarn << "can't open capture file: " << strerror(errno) << oendl; 505 owarn << "can't open capture file: " << strerror(errno) << oendl;
@@ -531,13 +535,13 @@ void CameraMainWindow::timerEvent( QTimerEvent* )
531} 535}
532 536
533 537
534void CameraMainWindow::stopVideoCapture() 538void CameraMainWindow::stopVideoCapture()
535{ 539{
536 killTimers(); 540 killTimers();
537 ODevice::inst()->touchSound(); 541 ODevice::inst()->playTouchSound();
538 ODevice::inst()->setLedState( Led_Mail, Led_Off ); 542 ODevice::inst()->setLedState( Led_Mail, Led_Off );
539 _capturing = false; 543 _capturing = false;
540 updateCaption(); 544 updateCaption();
541 ::close( _capturefd ); 545 ::close( _capturefd );
542 _framerate = 1000.0 / (_time.elapsed()/_videopics); 546 _framerate = 1000.0 / (_time.elapsed()/_videopics);
543 547