summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--apps/Applications/camera.desktop10
-rw-r--r--noncore/games/backgammon/moveengine.cpp2
-rw-r--r--noncore/multimedia/camera/.cvsignore1
-rw-r--r--noncore/multimedia/camera/camera.pro21
-rw-r--r--noncore/multimedia/camera/config.in7
-rw-r--r--noncore/multimedia/camera/main.cpp28
-rw-r--r--noncore/multimedia/camera/mainwindow.cpp50
-rw-r--r--noncore/multimedia/camera/mainwindow.h40
-rw-r--r--noncore/multimedia/camera/zcameraio.cpp56
-rw-r--r--noncore/multimedia/camera/zcameraio.h35
-rw-r--r--packages1
-rwxr-xr-xpics/camera/cam.pngbin0 -> 2567 bytes
12 files changed, 251 insertions, 0 deletions
diff --git a/apps/Applications/camera.desktop b/apps/Applications/camera.desktop
new file mode 100644
index 0000000..26cc119
--- a/dev/null
+++ b/apps/Applications/camera.desktop
@@ -0,0 +1,10 @@
1[Desktop Entry]
2Comment = A Camera Program
3Comment[de] = Ein Kamera-Programm
4Exec = opiecam
5File = opiecam
6Icon = camera/cam
7Name = OpieCam
8Type = Application
9Name[de]= Kamera
10
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp
index 009c449..8106b3f 100644
--- a/noncore/games/backgammon/moveengine.cpp
+++ b/noncore/games/backgammon/moveengine.cpp
@@ -4,6 +4,8 @@
4 4
5#include <qtimer.h> 5#include <qtimer.h>
6 6
7#include <stdlib.h>
8
7MoveEngine::MoveEngine() 9MoveEngine::MoveEngine()
8 : QObject() 10 : QObject()
9{ 11{
diff --git a/noncore/multimedia/camera/.cvsignore b/noncore/multimedia/camera/.cvsignore
new file mode 100644
index 0000000..6d678c6
--- a/dev/null
+++ b/noncore/multimedia/camera/.cvsignore
@@ -0,0 +1 @@
config.in
diff --git a/noncore/multimedia/camera/camera.pro b/noncore/multimedia/camera/camera.pro
new file mode 100644
index 0000000..e937807
--- a/dev/null
+++ b/noncore/multimedia/camera/camera.pro
@@ -0,0 +1,21 @@
1MOC_DIR = ./moc
2OBJECTS_DIR = ./obj
3DESTDIR = $(OPIEDIR)/bin
4TEMPLATE = app
5CONFIG = qt warn_on debug
6
7HEADERS = zcameraio.h \
8 mainwindow.h
9
10SOURCES = zcameraio.cpp \
11 mainwindow.cpp \
12 main.cpp
13
14INCLUDEPATH += $(OPIEDIR)/include
15DEPENDPATH += $(OPIEDIR)/include
16LIBS += -lqpe -lopiecore2
17INTERFACES =
18TARGET = opiecam
19
20include ( $(OPIEDIR)/include.pro )
21
diff --git a/noncore/multimedia/camera/config.in b/noncore/multimedia/camera/config.in
new file mode 100644
index 0000000..a4dd248
--- a/dev/null
+++ b/noncore/multimedia/camera/config.in
@@ -0,0 +1,7 @@
1 config CAMERA
2 boolean "opie-camera"
3 default "n"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && LIBOPIE2CORE
5 comment "opie-camera needs a libqpe, libopie and libopie2core"
6 depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE && LIBOPIE2CORE)
7
diff --git a/noncore/multimedia/camera/main.cpp b/noncore/multimedia/camera/main.cpp
new file mode 100644
index 0000000..f25475c
--- a/dev/null
+++ b/noncore/multimedia/camera/main.cpp
@@ -0,0 +1,28 @@
1/**********************************************************************
2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#include "mainwindow.h"
17#include <opie2/oapplication.h>
18
19int main( int argc, char **argv )
20{
21 OApplication a( argc, argv, "Opie-Camera" );
22 CameraMainWindow* w = new CameraMainWindow();
23 a.showMainWidget( w );
24 a.exec();
25 delete w;
26 return 0;
27}
28
diff --git a/noncore/multimedia/camera/mainwindow.cpp b/noncore/multimedia/camera/mainwindow.cpp
new file mode 100644
index 0000000..6431dfa
--- a/dev/null
+++ b/noncore/multimedia/camera/mainwindow.cpp
@@ -0,0 +1,50 @@
1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#include "mainwindow.h"
17
18#include <qvbox.h>
19#include <qpushbutton.h>
20#include <qlabel.h>
21
22#include <qpe/resource.h>
23#include <opie/ofiledialog.h>
24
25CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags f )
26 :QMainWindow( parent, name, f )
27{
28 QVBox* v = new QVBox( this );
29 QLabel* l = new QLabel( v );
30 l->setFixedSize( QSize( 240, 160 ) );
31 QPushButton* p = new QPushButton( "Snapshot", v );
32 connect( p, SIGNAL( clicked() ), this, SLOT( clickedSnapShot() ) );
33 v->show();
34 l->show();
35 p->show();
36 setCentralWidget( v );
37
38};
39
40
41CameraMainWindow::~CameraMainWindow()
42{
43}
44
45
46void CameraMainWindow::clickedSnapShot()
47{
48 qDebug( "Hello!" );
49}
50
diff --git a/noncore/multimedia/camera/mainwindow.h b/noncore/multimedia/camera/mainwindow.h
new file mode 100644
index 0000000..a349652
--- a/dev/null
+++ b/noncore/multimedia/camera/mainwindow.h
@@ -0,0 +1,40 @@
1/**********************************************************************
2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#ifndef MAINWINDOW_H
17#define MAINWINDOW_H
18
19#include <qmainwindow.h>
20
21class Wellenreiter;
22class WellenreiterConfigWindow;
23class QIconSet;
24class QToolButton;
25
26class CameraMainWindow: public QMainWindow
27{
28 Q_OBJECT
29
30 public:
31 CameraMainWindow( QWidget * parent = 0, const char * name = "mainwindow", WFlags f = 0 );
32 virtual ~CameraMainWindow();
33
34 protected:
35
36 public slots:
37 void clickedSnapShot();
38};
39
40#endif
diff --git a/noncore/multimedia/camera/zcameraio.cpp b/noncore/multimedia/camera/zcameraio.cpp
new file mode 100644
index 0000000..aa6cbe3
--- a/dev/null
+++ b/noncore/multimedia/camera/zcameraio.cpp
@@ -0,0 +1,56 @@
1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#include "zcameraio.h"
17
18#include <sys/types.h>
19#include <sys/stat.h>
20#include <errno.h>
21#include <string.h>
22#include <fcntl.h>
23#include <unistd.h>
24
25#include <qimage.h>
26
27#include <opie2/odebug.h>
28
29ZCameraIO::ZCameraIO()
30{
31 _driver = open( "/dev/sharp_zdc", O_RDWR );
32 if ( _driver == -1 )
33 oerr << "Can't open camera driver: " << strerror(errno) << oendl;
34
35};
36
37
38ZCameraIO::~ZCameraIO()
39{
40 if ( _driver != -1 )
41 close( _driver );
42}
43
44
45bool ZCameraIO::snapshot( QImage* img )
46{
47 char buf[76800];
48
49 write( _driver, "M=13", 4 );
50 write( _driver, "R=240,160,256,480", 17 );
51 write( _driver, "M=12", 4 );
52
53 int result = read( _driver, &buf, sizeof buf );
54
55 return result == sizeof buf;
56}
diff --git a/noncore/multimedia/camera/zcameraio.h b/noncore/multimedia/camera/zcameraio.h
new file mode 100644
index 0000000..817d3b4
--- a/dev/null
+++ b/noncore/multimedia/camera/zcameraio.h
@@ -0,0 +1,35 @@
1/**********************************************************************
2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved.
3**
4** This file is part of Opie Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14**********************************************************************/
15
16#ifndef ZCAMERAIO_H
17#define ZCAMERAIO_H
18
19class QImage;
20
21class ZCameraIO
22{
23 public:
24 ZCameraIO();
25 virtual ~ZCameraIO();
26
27 bool isOpen() const { return _driver != -1; };
28
29 bool snapshot( QImage* );
30
31 private:
32 int _driver;
33};
34
35#endif
diff --git a/packages b/packages
index 5fdf5d2..0e4ae43 100644
--- a/packages
+++ b/packages
@@ -3,6 +3,7 @@ CONFIG_BACKGAMMON noncore/games/backgammon/ backgammon.pro
3 CONFIG_BINARY noncore/tools/calc2/binarybinary.pro 3 CONFIG_BINARY noncore/tools/calc2/binarybinary.pro
4 CONFIG_CALC2 noncore/tools/calc2calc2.pro 4 CONFIG_CALC2 noncore/tools/calc2calc2.pro
5 CONFIG_CALIBRATE core/apps/calibratecalibrate.pro 5 CONFIG_CALIBRATE core/apps/calibratecalibrate.pro
6 CONFIG_CAMERA noncore/multimedia/cameracamera.pro
6 CONFIG_DICTIONARY noncore/apps/dictionarydictionary.pro 7 CONFIG_DICTIONARY noncore/apps/dictionarydictionary.pro
7 CONFIG_EUROCONV noncore/tools/euroconv/ euroconv.pro 8 CONFIG_EUROCONV noncore/tools/euroconv/ euroconv.pro
8 CONFIG_GSMTOOL noncore/comm/gsmtoolgsmtool.pro 9 CONFIG_GSMTOOL noncore/comm/gsmtoolgsmtool.pro
diff --git a/pics/camera/cam.png b/pics/camera/cam.png
new file mode 100755
index 0000000..6bd468b
--- a/dev/null
+++ b/pics/camera/cam.png
Binary files differ