author | llornkcor <llornkcor> | 2006-07-09 18:56:40 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2006-07-09 18:56:40 (UTC) |
commit | 36dece4760b1ac1799929221b49eb3bee98c2367 (patch) (unidiff) | |
tree | a45f66d2d90bd9fbbff8e8903cd1cb9323c39f6e /noncore/multimedia/camera2/mainwindow.h | |
parent | 604065c6e662cb3894acf03abadafacc3ab52913 (diff) | |
download | opie-36dece4760b1ac1799929221b49eb3bee98c2367.zip opie-36dece4760b1ac1799929221b49eb3bee98c2367.tar.gz opie-36dece4760b1ac1799929221b49eb3bee98c2367.tar.bz2 |
initial commit to add video4linux camera app from qtopia 2, needs more work
Diffstat (limited to 'noncore/multimedia/camera2/mainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/camera2/mainwindow.h | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/noncore/multimedia/camera2/mainwindow.h b/noncore/multimedia/camera2/mainwindow.h new file mode 100644 index 0000000..d6c5a7e --- a/dev/null +++ b/noncore/multimedia/camera2/mainwindow.h | |||
@@ -0,0 +1,132 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2006 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This program is free software; you can redistribute it and/or modify it | ||
7 | ** under the terms of the GNU General Public License as published by the | ||
8 | ** Free Software Foundation; either version 2 of the License, or (at your | ||
9 | ** option) any later version. | ||
10 | ** | ||
11 | ** A copy of the GNU GPL license version 2 is included in this package as | ||
12 | ** LICENSE.GPL. | ||
13 | ** | ||
14 | ** This program is distributed in the hope that it will be useful, but | ||
15 | ** WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | ** See the GNU General Public License for more details. | ||
18 | ** | ||
19 | ** In addition, as a special exception Trolltech gives permission to link | ||
20 | ** the code of this program with Qtopia applications copyrighted, developed | ||
21 | ** and distributed by Trolltech under the terms of the Qtopia Personal Use | ||
22 | ** License Agreement. You must comply with the GNU General Public License | ||
23 | ** in all respects for all of the code used other than the applications | ||
24 | ** licensed under the Qtopia Personal Use License Agreement. If you modify | ||
25 | ** this file, you may extend this exception to your version of the file, | ||
26 | ** but you are not obligated to do so. If you do not wish to do so, delete | ||
27 | ** this exception statement from your version. | ||
28 | ** | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | #ifndef MAINWINDOW_H | ||
36 | #define MAINWINDOW_H | ||
37 | |||
38 | #include "camerabase.h" | ||
39 | #include <qvaluelist.h> | ||
40 | #include <qmainwindow.h> | ||
41 | #include <qpe/applnk.h> | ||
42 | |||
43 | class LocationCombo; | ||
44 | class QAction; | ||
45 | class QTimer; | ||
46 | class CameraSettings; | ||
47 | |||
48 | |||
49 | class CameraMainWindow : public QMainWindow | ||
50 | { | ||
51 | Q_OBJECT | ||
52 | public: | ||
53 | static QString appName() { return QString::fromLatin1("camera2"); } | ||
54 | |||
55 | CameraMainWindow( QWidget *parent=0, const char *name=0, WFlags fl=0 ); | ||
56 | ~CameraMainWindow(); | ||
57 | |||
58 | public slots: | ||
59 | void takePhoto(); | ||
60 | void toggleVideo(); | ||
61 | void selectThumb(int i); | ||
62 | void thumbClicked(int i); | ||
63 | |||
64 | private slots: | ||
65 | void viewPictures(); | ||
66 | void viewVideos(); | ||
67 | void doSettings(); | ||
68 | void appMessage(const QCString& msg, const QByteArray& data); | ||
69 | void editThumb(); | ||
70 | void delThumb(); | ||
71 | void moveToContact(); | ||
72 | void takePhotoNow(); | ||
73 | void sendFile(); | ||
74 | void linkChanged(const QString&); | ||
75 | |||
76 | private: | ||
77 | bool event(QEvent* e); | ||
78 | void updateActions(); | ||
79 | void resizeEvent(QResizeEvent*); | ||
80 | |||
81 | bool eventFilter(QObject*, QEvent*); | ||
82 | QString nextFileName(); | ||
83 | void loadThumbs(); | ||
84 | void pushThumb(const DocLnk& f, const QImage& img); | ||
85 | static const int nthumb = 5; | ||
86 | QToolButton* thumb[nthumb]; | ||
87 | DocLnk picturefile[nthumb]; | ||
88 | int cur_thumb; | ||
89 | void delThumb(int th); | ||
90 | |||
91 | // Settings | ||
92 | void confirmSettings(); | ||
93 | CameraSettings *settings; | ||
94 | QString storagepath; | ||
95 | int thumbw; | ||
96 | int thumbh; | ||
97 | int psize; | ||
98 | int vsize; | ||
99 | int pquality; | ||
100 | int vquality; | ||
101 | int vframerate; | ||
102 | |||
103 | // Snap | ||
104 | QCString snap_ch; | ||
105 | QString snap_id; | ||
106 | int snap_maxw, snap_maxh; | ||
107 | bool inSnapMode() const; | ||
108 | void setSnapMode(bool); | ||
109 | |||
110 | CameraBase *camera; | ||
111 | |||
112 | int namehint; | ||
113 | QAction *a_pview, *a_vview, *a_settings; | ||
114 | QAction *a_th_edit, *a_th_del, *a_th_add; | ||
115 | QAction *a_send; | ||
116 | QValueList<QSize> photo_size; | ||
117 | QValueList<QSize> video_size; | ||
118 | |||
119 | QTimer *refocusTimer; | ||
120 | QString picfile; | ||
121 | |||
122 | bool recording; | ||
123 | void stopVideo(); | ||
124 | void startVideo(); | ||
125 | |||
126 | void preview(); | ||
127 | |||
128 | int camcat; | ||
129 | }; | ||
130 | |||
131 | #endif | ||
132 | |||