summaryrefslogtreecommitdiff
path: root/core/settings/light-and-power/calibration.h
Unidiff
Diffstat (limited to 'core/settings/light-and-power/calibration.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/calibration.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/core/settings/light-and-power/calibration.h b/core/settings/light-and-power/calibration.h
new file mode 100644
index 0000000..2bff69a
--- a/dev/null
+++ b/core/settings/light-and-power/calibration.h
@@ -0,0 +1,71 @@
1/*
2 This file is part of the OPIE Project
3               =. Copyright (c) 2002 Maximilian Reiss <harlekin@handhelds.org>
4             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
5           .>+-=
6 _;:,     .>    :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28#ifndef __CALIBRATION_H__
29#define __CALIBRATION_H__
30
31#include <qwidget.h>
32
33class Calibration : public QWidget {
34 Q_OBJECT
35
36public:
37 Calibration ( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
38 virtual ~Calibration ( );
39
40 QSize scale ( ) const;
41 int lineSteps ( ) const;
42 int interval ( ) const;
43 QPoint startPoint ( ) const;
44 QPoint endPoint ( ) const;
45
46public slots:
47 void setScale ( const QSize &s );
48 void setLineSteps ( int step );
49 void setInterval ( int iv );
50 void setStartPoint ( const QPoint &p );
51 void setEndPoint ( const QPoint &p );
52
53protected:
54 virtual void paintEvent ( QPaintEvent * );
55 virtual void mousePressEvent ( QMouseEvent * );
56 virtual void mouseMoveEvent ( QMouseEvent * );
57 virtual void mouseReleaseEvent ( QMouseEvent * );
58
59 void checkPoints ( );
60
61private:
62 QSize m_scale;
63 QPoint m_p [2];
64 int m_dragged;
65 int m_steps;
66 int m_interval;
67};
68
69#endif
70
71