Diffstat (limited to 'noncore/multimedia/camera/previewwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/camera/previewwidget.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/noncore/multimedia/camera/previewwidget.cpp b/noncore/multimedia/camera/previewwidget.cpp index cdeacf6..f87dcc9 100644 --- a/noncore/multimedia/camera/previewwidget.cpp +++ b/noncore/multimedia/camera/previewwidget.cpp @@ -15,24 +15,28 @@ #include "previewwidget.h" #include "zcameraio.h" #include <opie2/odebug.h> +#include <assert.h> + PreviewWidget::PreviewWidget( QWidget * parent, const char * name, WFlags f ) :QLabel( parent, name, f ) { #ifndef QT_NO_DEBUG setBackgroundColor( QColor( 255, 0, 0 ) ); #else setBackgroundMode( NoBackground ); #endif - - startTimer( 150 ); - //startTimer( 2000 ); + #ifndef QT_NO_DEBUG + if ( ZCameraIO::instance()->isOpen() ) startTimer( 1500 ); + #else + if ( ZCameraIO::instance()->isOpen() ) startTimer( 200 ); + #endif }; PreviewWidget::~PreviewWidget() { } @@ -59,6 +63,12 @@ void PreviewWidget::timerEvent( QTimerEvent* ) { p.convertFromImage( i ); setPixmap( p ); } } + +void PreviewWidget::mousePressEvent( QMouseEvent* ) +{ + emit contextMenuRequested(); +} + |