summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/previewwidget.cpp
authormickeyl <mickeyl>2003-04-12 15:02:32 (UTC)
committer mickeyl <mickeyl>2003-04-12 15:02:32 (UTC)
commit2cc909c36a779d1041a3382939f8ad41d84b0fc5 (patch) (side-by-side diff)
tree42c95673d72f7ecb7a8f4acbb0f517dd75ecc167 /noncore/multimedia/camera/previewwidget.cpp
parent11861d35730cee70920aa6797ba12263bbcce081 (diff)
downloadopie-2cc909c36a779d1041a3382939f8ad41d84b0fc5.zip
opie-2cc909c36a779d1041a3382939f8ad41d84b0fc5.tar.gz
opie-2cc909c36a779d1041a3382939f8ad41d84b0fc5.tar.bz2
- make main layout a full preview window and think about configuring capturing parameters later...adding an on-demand-applet to the taskbar would be spiffy
- portrait or landscape mode is now self-configuring thanks to life-rotation :-D
Diffstat (limited to 'noncore/multimedia/camera/previewwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/previewwidget.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/noncore/multimedia/camera/previewwidget.cpp b/noncore/multimedia/camera/previewwidget.cpp
index bb84c00..cdeacf6 100644
--- a/noncore/multimedia/camera/previewwidget.cpp
+++ b/noncore/multimedia/camera/previewwidget.cpp
@@ -16,13 +16,20 @@
#include "previewwidget.h"
#include "zcameraio.h"
+#include <opie2/odebug.h>
+
PreviewWidget::PreviewWidget( QWidget * parent, const char * name, WFlags f )
:QLabel( parent, name, f )
{
- setFixedSize( QSize( 240, 160 ) );
+ #ifndef QT_NO_DEBUG
+ setBackgroundColor( QColor( 255, 0, 0 ) );
+ #else
setBackgroundMode( NoBackground );
+ #endif
+
startTimer( 150 );
+ //startTimer( 2000 );
};
@@ -31,6 +38,18 @@ PreviewWidget::~PreviewWidget()
}
+void PreviewWidget::resizeEvent( QResizeEvent* e )
+{
+ QLabel::resizeEvent( e );
+ int w = e->size().width();
+ int h = e->size().height();
+ ZCameraIO::instance()->setCaptureFrame( e->size().width(),
+ e->size().height(),
+ 256,
+ w < h );
+}
+
+
void PreviewWidget::timerEvent( QTimerEvent* )
{
//QDirectPainter fb( this );