summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/gui/mainwindow.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (side-by-side diff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/multimedia/camera/gui/mainwindow.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/multimedia/camera/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/gui/mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/camera/gui/mainwindow.cpp b/noncore/multimedia/camera/gui/mainwindow.cpp
index 2f42049..e4e1b6c 100644
--- a/noncore/multimedia/camera/gui/mainwindow.cpp
+++ b/noncore/multimedia/camera/gui/mainwindow.cpp
@@ -53,98 +53,98 @@ using namespace Opie;
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#define CAPTUREFILE "/tmp/capture.dat"
#define OUTPUTFILE "/tmp/output.avi"
#define OUTPUT_TO_CUSTOM 250
#define OUTPUT_TO_DOCFOLDER 251
CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags f )
:QMainWindow( parent, name, f ),
_rotation( 270 ), // FIXME: get this from current settings (ODevice?)
_capturing( false ),
_pics( 1 ), _videos( 1 )
{
#ifdef QT_NO_DEBUG
if ( !ZCameraIO::instance()->isOpen() )
{
QVBox* v = new QVBox( this );
v->setMargin( 10 );
QLabel* l1 = new QLabel( v );
l1->setPixmap( Resource::loadPixmap( "camera/error" ) );
QLabel* l2 = new QLabel( v );
l2->setText( "<b>Sorry. could not detect your camera :-(</b><p>"
"* Is the sharpzdc_cs module loaded ?<br>"
"* Is /dev/sharpzdc read/writable ?<p>" );
connect( new QPushButton( "Exit", v ), SIGNAL( clicked() ), this, SLOT( close() ) );
setCentralWidget( v );
return;
}
#endif
init();
_rotation = 270; //TODO: grab these from the actual settings
preview = new PreviewWidget( this, "camera preview widget" );
//setCentralWidget( preview ); <--- don't do this!
preview->resize( QSize( 240, 288 ) );
preview->show();
// construct a System Channel to receive setRotation messages
_sysChannel = new QCopChannel( "QPE/System", this );
- connect( _sysChannel, SIGNAL( received( const QCString&, const QByteArray& ) ),
- this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) );
+ connect( _sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
+ this, SLOT( systemMessage(const QCString&,const QByteArray&) ) );
connect( preview, SIGNAL( contextMenuRequested() ), this, SLOT( showContextMenu() ) );
connect( ZCameraIO::instance(), SIGNAL( shutterClicked() ), this, SLOT( shutterClicked() ) );
updateCaption();
};
CameraMainWindow::~CameraMainWindow()
{
// write back configuration
OConfigGroupSaver cgs( oApp->config(), "General" );
cgs.config()->writeEntry( "flip", flip );
cgs.config()->writeEntry( "quality", quality );
cgs.config()->writeEntry( "zoom", zoom );
cgs.config()->writeEntry( "captureX", captureX );
cgs.config()->writeEntry( "captureY", captureY );
cgs.config()->writeEntry( "captureFormat", captureFormat );
cgs.config()->writeEntry( "outputTo", outputTo );
cgs.config()->writeEntry( "prefix", prefix );
cgs.config()->writeEntry( "appendSettings", appendSettings );
}
void CameraMainWindow::init()
{
// get values from configuration
OConfigGroupSaver cgs( oApp->config(), "General" );
flip = cgs.config()->readEntry( "flip", "A" );
quality = cgs.config()->readNumEntry( "quality", 50 );
zoom = cgs.config()->readNumEntry( "zoom", 1 );
captureX = cgs.config()->readNumEntry( "captureX", 480 );
captureY = cgs.config()->readNumEntry( "captureY", 640 );
captureFormat = cgs.config()->readEntry( "captureFormat", "JPEG" );
outputTo = cgs.config()->readEntry( "outputTo", "Documents Folder" );
prefix = cgs.config()->readEntry( "prefix", "Untitled" );
appendSettings = cgs.config()->readBoolEntry( "appendSettings", true );
// create action groups
QAction* a;
resog = new QActionGroup( 0, "reso", true );
resog->setToggleAction( true );
new QAction( " 64 x 48", 0, 0, resog, "64x48", true );
new QAction( "128 x 96", 0, 0, resog, "128x96", true );
new QAction( "192 x 144", 0, 0, resog, "192x144", true );
new QAction( "256 x 192", 0, 0, resog, "256x192", true );