-rw-r--r-- | apps/Applications/camera.desktop | 10 | ||||
-rw-r--r-- | noncore/games/backgammon/moveengine.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/camera/.cvsignore | 1 | ||||
-rw-r--r-- | noncore/multimedia/camera/camera.pro | 21 | ||||
-rw-r--r-- | noncore/multimedia/camera/config.in | 7 | ||||
-rw-r--r-- | noncore/multimedia/camera/main.cpp | 28 | ||||
-rw-r--r-- | noncore/multimedia/camera/mainwindow.cpp | 50 | ||||
-rw-r--r-- | noncore/multimedia/camera/mainwindow.h | 40 | ||||
-rw-r--r-- | noncore/multimedia/camera/zcameraio.cpp | 56 | ||||
-rw-r--r-- | noncore/multimedia/camera/zcameraio.h | 35 | ||||
-rw-r--r-- | packages | 1 | ||||
-rwxr-xr-x | pics/camera/cam.png | bin | 0 -> 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] | ||
2 | Comment = A Camera Program | ||
3 | Comment[de] = Ein Kamera-Programm | ||
4 | Exec = opiecam | ||
5 | File = opiecam | ||
6 | Icon = camera/cam | ||
7 | Name = OpieCam | ||
8 | Type = Application | ||
9 | Name[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 | |||
@@ -1,38 +1,40 @@ | |||
1 | #include "moveengine.h" | 1 | #include "moveengine.h" |
2 | 2 | ||
3 | #include <qmessagebox.h> | 3 | #include <qmessagebox.h> |
4 | 4 | ||
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | 6 | ||
7 | #include <stdlib.h> | ||
8 | |||
7 | MoveEngine::MoveEngine() | 9 | MoveEngine::MoveEngine() |
8 | : QObject() | 10 | : QObject() |
9 | { | 11 | { |
10 | int offset=7; | 12 | int offset=7; |
11 | int a=0; //counter variable | 13 | int a=0; //counter variable |
12 | int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210}; | 14 | int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210}; |
13 | for(a=0;a<26;a++) | 15 | for(a=0;a<26;a++) |
14 | { | 16 | { |
15 | x_coord[a]=xfill[a]; | 17 | x_coord[a]=xfill[a]; |
16 | } | 18 | } |
17 | 19 | ||
18 | int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40}; | 20 | int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40}; |
19 | int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}; | 21 | int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}; |
20 | for(a=0;a<15;a++) | 22 | for(a=0;a<15;a++) |
21 | { | 23 | { |
22 | yup_coord[a]=yfill[a]; | 24 | yup_coord[a]=yfill[a]; |
23 | ylow_coord[a]=185-(yfill[a]); | 25 | ylow_coord[a]=185-(yfill[a]); |
24 | z_coord[a]=zfill[a]; | 26 | z_coord[a]=zfill[a]; |
25 | } | 27 | } |
26 | for(a=0;a<5;a++) | 28 | for(a=0;a<5;a++) |
27 | { | 29 | { |
28 | if(a<3) | 30 | if(a<3) |
29 | { | 31 | { |
30 | x_fin1[a]=65+a*15; | 32 | x_fin1[a]=65+a*15; |
31 | x_fin2[a]=155-a*15; | 33 | x_fin2[a]=155-a*15; |
32 | } | 34 | } |
33 | y_fin[a]=225-a*5; | 35 | y_fin[a]=225-a*5; |
34 | } | 36 | } |
35 | z_fin=1; | 37 | z_fin=1; |
36 | 38 | ||
37 | reset(); | 39 | reset(); |
38 | } | 40 | } |
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 @@ | |||
1 | MOC_DIR = ./moc | ||
2 | OBJECTS_DIR = ./obj | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | TEMPLATE = app | ||
5 | CONFIG = qt warn_on debug | ||
6 | |||
7 | HEADERS = zcameraio.h \ | ||
8 | mainwindow.h | ||
9 | |||
10 | SOURCES = zcameraio.cpp \ | ||
11 | mainwindow.cpp \ | ||
12 | main.cpp | ||
13 | |||
14 | INCLUDEPATH += $(OPIEDIR)/include | ||
15 | DEPENDPATH += $(OPIEDIR)/include | ||
16 | LIBS += -lqpe -lopiecore2 | ||
17 | INTERFACES = | ||
18 | TARGET = opiecam | ||
19 | |||
20 | include ( $(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 | |||
19 | int 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 | |||
25 | CameraMainWindow::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 | |||
41 | CameraMainWindow::~CameraMainWindow() | ||
42 | { | ||
43 | } | ||
44 | |||
45 | |||
46 | void 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 | |||
21 | class Wellenreiter; | ||
22 | class WellenreiterConfigWindow; | ||
23 | class QIconSet; | ||
24 | class QToolButton; | ||
25 | |||
26 | class 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 | |||
29 | ZCameraIO::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 | |||
38 | ZCameraIO::~ZCameraIO() | ||
39 | { | ||
40 | if ( _driver != -1 ) | ||
41 | close( _driver ); | ||
42 | } | ||
43 | |||
44 | |||
45 | bool 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 | |||
19 | class QImage; | ||
20 | |||
21 | class 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 | ||
@@ -1,37 +1,38 @@ | |||
1 | CONFIG_APPSKEY noncore/settings/appskeyappskey.pro | 1 | CONFIG_APPSKEY noncore/settings/appskeyappskey.pro |
2 | CONFIG_BACKGAMMONnoncore/games/backgammon/ backgammon.pro | 2 | CONFIG_BACKGAMMONnoncore/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 |
9 | CONFIG_KEYVIEW development/keyviewkeyview.pro | 10 | CONFIG_KEYVIEW development/keyviewkeyview.pro |
10 | CONFIG_LIBFFMPEG core/multimedia/opieplayer/libffmpeglibffmpeg.pro | 11 | CONFIG_LIBFFMPEG core/multimedia/opieplayer/libffmpeglibffmpeg.pro |
11 | CONFIG_LIBFLASH core/multimedia/opieplayer/libflashlibflash.pro | 12 | CONFIG_LIBFLASH core/multimedia/opieplayer/libflashlibflash.pro |
12 | CONFIG_LIBOPIE_PIM libopie/pimpim.pro | 13 | CONFIG_LIBOPIE_PIM libopie/pimpim.pro |
13 | CONFIG_LIBSQL libsqllibsql.pro | 14 | CONFIG_LIBSQL libsqllibsql.pro |
14 | CONFIG_MOBILEMSG noncore/comm/mobilemsgmobilemsg.pro | 15 | CONFIG_MOBILEMSG noncore/comm/mobilemsgmobilemsg.pro |
15 | CONFIG_OFILESELECTOR libopie/ofileselectorofileselector.pro | 16 | CONFIG_OFILESELECTOR libopie/ofileselectorofileselector.pro |
16 | CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro | 17 | CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro |
17 | CONFIG_QUICKEXEC quickexecquickexec.pro | 18 | CONFIG_QUICKEXEC quickexecquickexec.pro |
18 | CONFIG_RESTARTAPPLET core/applets/restartappletrestartapplet.pro | 19 | CONFIG_RESTARTAPPLET core/applets/restartappletrestartapplet.pro |
19 | CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro | 20 | CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro |
20 | CONFIG_SIMPLE noncore/tools/calc2/simplesimple.pro | 21 | CONFIG_SIMPLE noncore/tools/calc2/simplesimple.pro |
21 | CONFIG_TEST libsql/testtest.pro | 22 | CONFIG_TEST libsql/testtest.pro |
22 | CONFIG_TEST noncore/apps/opie-console/testtest.pro | 23 | CONFIG_TEST noncore/apps/opie-console/testtest.pro |
23 | CONFIG_UBROWSER noncore/net/ubrowserubrowser.pro | 24 | CONFIG_UBROWSER noncore/net/ubrowserubrowser.pro |
24 | CONFIG_WELLENREITER noncore/net/wellenreiterwellenreiter.pro | 25 | CONFIG_WELLENREITER noncore/net/wellenreiterwellenreiter.pro |
25 | CONFIG_ADDRESSBOOK core/pim/addressbookaddressbook.pro | 26 | CONFIG_ADDRESSBOOK core/pim/addressbookaddressbook.pro |
26 | CONFIG_ADVANCEDFM noncore/apps/advancedfmadvancedfm.pro | 27 | CONFIG_ADVANCEDFM noncore/apps/advancedfmadvancedfm.pro |
27 | CONFIG_APPEARANCE2 noncore/settings/appearance2appearance2.pro | 28 | CONFIG_APPEARANCE2 noncore/settings/appearance2appearance2.pro |
28 | CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/appletapplet.pro | 29 | CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/appletapplet.pro |
29 | CONFIG_AQPKG noncore/apps/aqpkgaqpkg.pro | 30 | CONFIG_AQPKG noncore/apps/aqpkgaqpkg.pro |
30 | CONFIG_BACKUP noncore/settings/backupbackup.pro | 31 | CONFIG_BACKUP noncore/settings/backupbackup.pro |
31 | CONFIG_BATTERYAPPLET core/applets/batteryappletbatteryapplet.pro | 32 | CONFIG_BATTERYAPPLET core/applets/batteryappletbatteryapplet.pro |
32 | CONFIG_BEND noncore/mail/bendbend.pro | 33 | CONFIG_BEND noncore/mail/bendbend.pro |
33 | CONFIG_BLUE-PIN noncore/net/opietooth/blue-pinblue-pin.pro | 34 | CONFIG_BLUE-PIN noncore/net/opietooth/blue-pinblue-pin.pro |
34 | CONFIG_BOUNCE noncore/games/bouncebounce.pro | 35 | CONFIG_BOUNCE noncore/games/bouncebounce.pro |
35 | CONFIG_BUTTON-SETTINGS core/settings/buttonbutton.pro | 36 | CONFIG_BUTTON-SETTINGS core/settings/buttonbutton.pro |
36 | CONFIG_BUZZWORD noncore/games/buzzwordbuzzword.pro | 37 | CONFIG_BUZZWORD noncore/games/buzzwordbuzzword.pro |
37 | CONFIG_CALCULATOR noncore/tools/calculatorcalculator.pro | 38 | CONFIG_CALCULATOR noncore/tools/calculatorcalculator.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 | |||