author | schurig <schurig> | 2003-06-27 11:17:49 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-27 11:17:49 (UTC) |
commit | 5bb184fd350f1e6352b6f41fbb18b59d2d3d7403 (patch) (unidiff) | |
tree | 50a42c4140645c7cce11add8dd53f6a7667d1ed3 /development/calibrate2/calibrate.h | |
parent | 33e6a3606697b428cbc213e576e740338fc54f4e (diff) | |
download | opie-5bb184fd350f1e6352b6f41fbb18b59d2d3d7403.zip opie-5bb184fd350f1e6352b6f41fbb18b59d2d3d7403.tar.gz opie-5bb184fd350f1e6352b6f41fbb18b59d2d3d7403.tar.bz2 |
added for others to test
Diffstat (limited to 'development/calibrate2/calibrate.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | development/calibrate2/calibrate.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/development/calibrate2/calibrate.h b/development/calibrate2/calibrate.h new file mode 100644 index 0000000..56c19e4 --- a/dev/null +++ b/development/calibrate2/calibrate.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia 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 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include <qwsmouse_qws.h> | ||
22 | |||
23 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | ||
24 | |||
25 | #include <qdialog.h> | ||
26 | #include <qpixmap.h> | ||
27 | |||
28 | struct calibration { | ||
29 | int x[5], xfb[5]; | ||
30 | int y[5], yfb[5]; | ||
31 | int a[7]; | ||
32 | }; | ||
33 | |||
34 | class Calibrate : public QDialog | ||
35 | { | ||
36 | Q_OBJECT | ||
37 | public: | ||
38 | Calibrate(QWidget* parent=0, const char * name=0, WFlags=0); | ||
39 | ~Calibrate(); | ||
40 | |||
41 | void show(); | ||
42 | void hide(); | ||
43 | |||
44 | private: | ||
45 | QPoint fromDevice( const QPoint &p ); | ||
46 | bool performCalculation(void); | ||
47 | void moveCrosshair( QPoint pt ); | ||
48 | void paintEvent( QPaintEvent * ); | ||
49 | void mouseMoveEvent( QMouseEvent * ); | ||
50 | void mouseReleaseEvent( QMouseEvent * ); | ||
51 | struct calibration cal; | ||
52 | |||
53 | private: | ||
54 | void store(); | ||
55 | void reset(); | ||
56 | QPixmap logo; | ||
57 | QPixmap saveUnder; | ||
58 | bool showCross; | ||
59 | QPoint crossPos; | ||
60 | QPoint penPos; | ||
61 | int samples; | ||
62 | int location; | ||
63 | }; | ||
64 | |||
65 | #endif // _WS_QWS_ | ||