Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Examples  

qsdrvhittest.h

00001 /***************************************************************************
00002                                qsdrvhittest.h
00003                              -------------------                                         
00004     begin                : 01-January-2000
00005     copyright            : (C) 2000 by Kamil Dobkowski                         
00006     email                : kamildobk@poczta.onet.pl                                     
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   * 
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QSDRVHITTEST_H
00019 #define QSDRVHITTEST_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include<qobject.h>
00026 #include"qsdrvqt.h"
00027 
00028 //-------------------------------------------------------------//
00029 
00040 class QSDrvHitTest : public QObject, public QSDrvQt
00041  {
00042     Q_OBJECT
00043   public:
00044     QSDrvHitTest( const QSPt2f& hitPosition, QObject *parent = NULL );
00045     virtual ~QSDrvHitTest();
00046         virtual QSDrvHitTest *copy();
00047     void copySettingsFrom( const QSDrvHitTest *drv );
00048     bool isHit() const { return m_is_hit; }
00049     int hitCategory() const { return m_category; }
00050     int hitElement() const { return m_element; }
00051     QSPt2f hitPosition() const { return m_hit_pos; }
00052     virtual void clearCanvas( const QSGFill& f, const QSPt2f& pos, const QSPt2f& size );
00053     virtual void drawLine( const QSPt2f &one, const QSPt2f &two );
00054     virtual void beginPolyline( const QSPt2f& pos );
00055     virtual void drawPolylineTo( const QSPt2f& pos );
00056     virtual void endPolyline();
00057     virtual QSPt2f currPolylinePos() { return m_curr_polyline_pos; }
00058     virtual void drawRect( const QSPt2f &p1, const QSPt2f &p2 );
00059     virtual void drawPoly( const QSPt2f pts[], int npoints, const bool edges[] = NULL, int edgeAutoColor = 0 );
00060     virtual void drawEllipse( const QSPt2f& p1, const QSPt2f& p2  );
00061     virtual void drawText( const QSPt2f &pos, const QString& text, int align = AlignLeft | AlignBottom );
00062     virtual void drawRText( const QSPt2f &pos, int angle, const QString& text, int align = AlignLeft | AlignBottom );
00063     virtual void getPixmapBuffer( PixmapBuffer *buff, int pwidth, int pheight );
00064     virtual void drawPixmap( const QSPt2f& pos, PixmapBuffer *data );
00065     virtual void setFill( const QSGFill &f );
00066     virtual void setLine( const QSGLine &l );
00067   signals:
00068     void hitDetected( int hitCategory, int hitElement );
00069   protected:
00070     QSPt2f m_hit_pos;
00071     bool m_is_hit;
00072     int m_hit_category;
00073     int m_hit_element;
00074     int m_curr_pixmap_width;
00075     QSGFill m_curr_fill;
00076     QSGLine m_curr_line;
00077     void hit();
00078  };
00079 
00080 
00081 #endif
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 
00143 
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00151 
00152 
00153 
00154 
00155 
00156 

Generated on Mon Mar 18 19:16:32 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002