QtGroupView.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _QtGroupView_H_
00015 #define _QtGroupView_H_
00016 
00017 #ifdef _MSC_VER
00018 # pragma warning(disable:4250)  // inherits via dominance
00019 #endif
00020 
00021 #include "graphics/GroupViewBase.h"
00022 #include "QtView.h"
00023 #include "QtViewImp.h"
00024 
00025 #if QT_VERSION < 0x040000
00026 #include <qcanvas.h>
00027 #else
00028 #include <q3canvas.h>
00029 #endif
00030 
00031 namespace hippodraw {
00032 
00044 #if QT_VERSION < 0x040000
00045 class MDL_QTHIPPOPLOT_API QtGroupView : public GroupViewBase, public QtViewImp, public QCanvasRectangle
00046 #else
00047 class MDL_QTHIPPOPLOT_API QtGroupView :public GroupViewBase, public QtViewImp, public Q3CanvasRectangle
00048 #endif
00049 
00050 {
00051 
00052  private:
00053 
00056   bool m_is_drawing;
00057 
00060   std::vector < double > m_position;
00061 
00063   int toCanvasX ( double dx ) const;
00064 
00066   int toCanvasY ( double dy ) const;
00067 
00068  public:
00069 
00071   QtGroupView ( );
00072 
00074   QtGroupView (  const std::vector < ViewBase * > & inViews );
00075 
00077   //QtGroupView ( const QtGroupView & );
00078 
00080   virtual ~QtGroupView ();
00081 
00083   void setDrawRect ( float x, float y, float w, float h );
00084 
00086   void setDrawRect ( const QRect & rect );
00087 
00089   virtual Rect getDrawRect () const;
00090 
00092   virtual void draw ( QPainter & );
00093 
00097   virtual void moveBy ( double dx, double dy );
00098 
00099 
00101   int toViewX ( double datX ) const;
00102 
00104   int toViewY ( double datY ) const;
00105 
00106   virtual void fillPickedPoint ( double x, double y, 
00107                                  std::vector < double > & picked ) const;
00108 
00110   void setPositions();
00111 };
00112 
00113 } // namespace hippodraw
00114 
00115 #endif // _QtGroupView_H_

Generated for HippoDraw Class Library by doxygen