Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

camerahandler.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad     *
00003  *   bjoern_erik_nilsen@hotmail.com & fredrikbk@hotmail.com                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef CAMERAHANDLER_H
00021 #define CAMERAHANDLER_H
00022 
00023 #include "src/config.h"
00024 
00025 #include "src/presentation/frontends/qtfrontend/videoview.h"
00026 #include "src/presentation/frontends/qtfrontend/frameview.h"
00027 #include "modelhandler.h"
00028 // #include "camerainitthread.h"
00029 
00030 #include <qobject.h>
00031 #include <qpushbutton.h>
00032 #include <qstatusbar.h>
00033 #include <qwidgetstack.h>
00034 #include <qtimer.h>
00035 
00036 
00041 class CameraHandler : public QObject
00042 {
00043         Q_OBJECT
00044 public:
00052         CameraHandler ( QObject *parent = 0, QStatusBar *sb = 0, 
00053                         ModelHandler* modelHandler = 0, const char *name = 0);
00054         
00055         ~CameraHandler();
00056 
00057         void setCameraButton( QPushButton *cameraButton );
00058         void setWidgetStack(QWidgetStack *frameViewStack);
00059         void setFrameView(FrameView *frameView);
00060         void setVideoView(VideoView *videoView);
00061         
00070         bool setViewMode(int mode);
00071         
00076         bool isCameraRunning();
00077 
00078 public slots:
00079         void toggleCamera();
00080         void captureFrame();
00081         
00086         void switchToVideoView();
00087         
00088         
00089 private:
00090         QStatusBar *statusBar;
00091         QPushButton *cameraButton;
00092         QTimer *timer;
00093         char temp[256];
00094         bool isCameraOn;
00095         ModelHandler *modelHandler;
00096         
00097         QWidgetStack *frameViewStack;
00098         VideoView *videoView;
00099         FrameView *frameView;
00100         
00101         void cameraOn();
00102         void cameraOff();
00103 
00104 private slots:
00108         void storeFrame();
00109         
00110         void setMixCount(int mixCount);
00111         
00112         void setPlaybackSpeed(int playBackSpeed);
00113         
00114 signals:
00115         void capturedFrame();
00116         
00121         void cameraStateChanged(bool isActivated);
00122         
00123 };
00124 
00125 #endif

Generated on Thu May 19 01:51:20 2005 for stopmotion.kdevelop by  doxygen 1.4.2