summaryrefslogtreecommitdiff
path: root/development/calibrate2/calibrate.h
Unidiff
Diffstat (limited to 'development/calibrate2/calibrate.h') (more/less context) (show whitespace changes)
-rw-r--r--development/calibrate2/calibrate.h65
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
28struct calibration {
29 int x[5], xfb[5];
30 int y[5], yfb[5];
31 int a[7];
32};
33
34class Calibrate : public QDialog
35{
36 Q_OBJECT
37public:
38 Calibrate(QWidget* parent=0, const char * name=0, WFlags=0);
39 ~Calibrate();
40
41 void show();
42 void hide();
43
44private:
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
53private:
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_