Diffstat (limited to 'core/apps/calibrate/calibrate.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/calibrate/calibrate.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/core/apps/calibrate/calibrate.h b/core/apps/calibrate/calibrate.h new file mode 100644 index 0000000..97108c9 --- a/dev/null +++ b/core/apps/calibrate/calibrate.h | |||
@@ -0,0 +1,67 @@ | |||
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 | class QTimer; | ||
29 | |||
30 | class Calibrate : public QDialog | ||
31 | { | ||
32 | Q_OBJECT | ||
33 | public: | ||
34 | Calibrate(QWidget* parent=0, const char * name=0, WFlags=0); | ||
35 | ~Calibrate(); | ||
36 | |||
37 | void show(); | ||
38 | void hide(); | ||
39 | |||
40 | private: | ||
41 | QPoint fromDevice( const QPoint &p ); | ||
42 | bool sanityCheck(); | ||
43 | void moveCrosshair( QPoint pt ); | ||
44 | void paintEvent( QPaintEvent * ); | ||
45 | void mousePressEvent( QMouseEvent * ); | ||
46 | void mouseReleaseEvent( QMouseEvent * ); | ||
47 | |||
48 | private slots: | ||
49 | void timeout(); | ||
50 | |||
51 | private: | ||
52 | void store(); | ||
53 | void reset(); | ||
54 | QPixmap logo; | ||
55 | QWSPointerCalibrationData goodcd,cd; | ||
56 | QWSPointerCalibrationData::Location location; | ||
57 | QPoint crossPos; | ||
58 | QPoint penPos; | ||
59 | QPixmap saveUnder; | ||
60 | QTimer *timer; | ||
61 | int dx; | ||
62 | int dy; | ||
63 | bool showCross; | ||
64 | }; | ||
65 | |||
66 | #endif // _WS_QWS_ | ||
67 | |||