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

QtViewWidget.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _QtViewWidget_H_
00015 #define _QtViewWidget_H_
00016 
00017 #include "QtViewImp.h"
00018 
00019 #include <qpixmap.h>
00020 #include <qwidget.h>
00021 
00022 class Action;
00023 class QPaintEvent;
00024 
00036 class MDL_QTHIPPOPLOT_API QtViewWidget : public QtViewImp, public QWidget
00037 {
00039   QtViewWidget ( const QtViewWidget & );
00040 
00042   int toCanvasX ( double dx ) const;
00043 
00045   int toCanvasY ( double dy ) const;
00046 
00052   void transformAndFill ( QPointArray & array, 
00053                           const std::vector < double > & x,
00054                           const std::vector < double > & y,
00055                           int (QtViewWidget::* xfunc ) ( double ) const,
00056                           int (QtViewWidget::* yfunc ) ( double ) const );
00057 
00060   void drawMethod ( const std::vector< double > & x,
00061                     const std::vector< double > & y,
00062                     int opt1, 
00063                     int opt2 );
00064 
00071   void drawViewMethod ( const std::vector< double > & x,
00072                         const std::vector< double > & y,
00073                         int opt1, 
00074                         int opt2 );
00075 
00076   QPixmap offscr;
00077   int double_buffer;
00078 
00079 public:
00080 
00083   QtViewWidget ( QWidget * parent = 0, 
00084                  const char * name = 0, 
00085                  Qt::WFlags wflags = 0 );
00086 
00088   virtual ~QtViewWidget ();
00089 
00096   void setPlotter ( PlotterBase * );
00097 
00099   virtual QSize sizeHint () const;
00100 
00103   virtual void draw ( QPainter & );
00104 
00106   virtual void paintEvent ( QPaintEvent * );
00107 
00108   virtual void update ( const Observable * );
00109 
00111   virtual HippoRectangle getDrawRect () const;
00112 
00114   void setDrawRect ( const QRect & rect );
00115 
00117   virtual void setDrawRect ( float x, float y, float width, float height );
00118 
00120   virtual void initPlot ( double aspect );
00121 
00123   virtual void endPlot ();
00124 
00126   int toViewX ( double datX ) const;
00127 
00129   int toViewY ( double datY ) const;
00130 
00131   virtual void fillPickedPoint ( double x, double y, 
00132                                  std::vector < double > & picked ) const;
00133 
00134   virtual void setDoubleBuffering( unsigned dblbuf);
00135 
00140   virtual void mousePressEvent ( QMouseEvent * e );
00141 
00142 };
00143 
00144 #endif // _QtViewWidget_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3