Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

calibration.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the OPIE Project
00003                =.            Copyright (c)  2002 Maximilian Reiss <harlekin@handhelds.org>
00004              .=l.            Copyright (c)  2002 Robert Griebl <sandman@handhelds.org>
00005            .>+-=
00006  _;:,     .>    :=|.         This file is free software; you can
00007 .> <`_,   >  .   <=          redistribute it and/or modify it under
00008 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00009 .="- .-=="i,     .._         License as published by the Free Software
00010  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00011      ._= =}       :          or (at your option) any later version.
00012     .%`+i>       _;_.
00013     .i_,=:_.      -<s.       This file is distributed in the hope that
00014      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00015     : ..    .:,     . . .    without even the implied warranty of
00016     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00017   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00018 ..}^=.=       =       ;      Public License for more details.
00019 ++=   -.     .`     .:       
00020  :     =  ...= . :.=-        You should have received a copy of the GNU
00021  -.   .:....=;==+<;          General Public License along with this file;
00022   -_. . .   )=.  =           see the file COPYING. If not, write to the
00023     --        :-=`           Free Software Foundation, Inc.,
00024                              59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 #ifndef __CALIBRATION_H__
00029 #define __CALIBRATION_H__
00030 
00031 #include <qwidget.h>
00032 
00033 class Calibration : public QWidget {
00034         Q_OBJECT
00035         
00036 public:
00037         Calibration ( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
00038         virtual ~Calibration ( );
00039         
00040         QSize scale ( ) const;  
00041         int lineSteps ( ) const;
00042         int interval ( ) const;
00043         QPoint startPoint ( ) const;
00044         QPoint endPoint ( ) const;      
00045 
00046 signals:
00047         void startPointChanged ( const QPoint & );
00048         void endPointChanged ( const QPoint & );
00049 
00050 public slots:
00051         void setScale ( const QSize &s );
00052         void setLineSteps ( int step );
00053         void setInterval ( int iv );
00054         void setStartPoint ( const QPoint &p );
00055         void setEndPoint ( const QPoint &p );
00056         
00057 protected:
00058         virtual void paintEvent ( QPaintEvent * );
00059         virtual void mousePressEvent ( QMouseEvent * ); 
00060         virtual void mouseMoveEvent ( QMouseEvent * );  
00061         virtual void mouseReleaseEvent ( QMouseEvent * );       
00062 
00063         void checkPoints ( );
00064         
00065 private:
00066         QSize m_scale;
00067         QPoint m_p [2];
00068         int m_dragged;
00069         int m_steps;
00070         int m_interval;
00071 };
00072 
00073 #endif
00074 
00075 

Generated on Sat Nov 5 16:15:57 2005 for OPIE by  doxygen 1.4.2