22 #include <msdevstudio/MSconfig.h>
26 #include <qnamespace.h>
53 static std::map < hippodraw::Line::Style, Qt::PenStyle >
s_line_style;
57 std::map <const std::string, std::string>
m_eq_png;
84 virtual void update (
const Observable * display );
89 virtual int toCanvasX (
double dx )
const = 0;
92 virtual int toCanvasY (
double dy )
const = 0;
99 #if QT_VERSION < 0x040000
102 void transformAndFill ( QPolygon & array,
104 const std::vector < double > & x,
105 const std::vector < double > & y,
106 int (
QtViewImp::* xfunc ) (
double )
const,
107 int (
QtViewImp::* yfunc ) (
double )
const );
111 void drawMethod (
const std::vector< double > & x,
112 const std::vector< double > & y,
116 virtual void drawPoints (
const std::vector<double> & x,
117 const std::vector<double> & y,
120 const Color & color );
128 void drawViewMethod (
const std::vector< double > & x,
129 const std::vector< double > & y,
149 void setInspector (
QObject * );
152 virtual int toViewX (
double datX )
const = 0;
155 virtual int toViewY (
double datY )
const = 0;
161 virtual void fillPickedPoint (
double x,
double y,
162 std::vector < double > & picked )
const = 0;
166 inline int toView (
double x )
const;
168 virtual void drawLines (
const std::vector< double > & x,
169 const std::vector< double > & y,
174 virtual void drawColorLines (
const std::vector< double > & x,
175 const std::vector< double > & y,
177 const std::vector < Color > & colors,
180 virtual void drawViewLines (
const std::vector< double > & x,
181 const std::vector< double > & y,
186 virtual void drawViewLines (
const std::vector< double > & x,
187 const std::vector< double > & y,
192 virtual void drawPolyLine (
const std::vector< double > & xpoints,
193 const std::vector< double > & ypoints,
198 virtual void drawPolygon (
const std::vector < double > & x,
199 const std::vector < double > & y,
201 const Color & edge );
204 void setCrossX (
double val );
207 void setCrossY (
double val );
211 virtual void draw_Text (
const std::string &s,
213 float fontsize,
float angle,
221 virtual void drawImage (
const std::string &filename,
int position = 0 );
223 virtual void drawLatex (
const std::string &eq,
int position = 0 );
225 virtual void drawText (
const std::string &s,
float x,
float y,
226 float fontsize,
float angle,
char xp,
char yp,
229 virtual void drawText (
const std::string &s,
float x,
float y,
230 float fontsize,
float angle,
char xp,
char yp,
233 const Color * color );
235 virtual void drawPoints (
const std::vector<double> & x,
236 const std::vector<double> & y,
240 virtual void drawPoints (
const std::vector< double > & x,
241 const std::vector< double > & y,
242 const std::vector< Color > & colors,
246 virtual void drawSquare (
double x1,
double y1,
double x2,
double y2,
247 int red,
int green,
int blue );
249 virtual void drawViewSquare (
float x1,
float y1,
float x2,
float y2,
250 int red,
int green,
int blue );
252 float userToDrawX (
double x )
const;
253 float userToDrawXAutoInv (
double x )
const;
254 float userToDrawY (
double x )
const;
255 float userToDrawColor (
double c )
const;
257 virtual void setDefaultFont(
const QFont& font );
259 virtual const QFont & defaultFont();
265 return static_cast< int > ( x );
270 #endif // _QtViewImp_H_
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
#define MDL_QTHIPPOPLOT_API
static std::map< hippodraw::Line::Style, Qt::PenStyle > s_line_style
The mapping from LineStyle::Type to QPen PenStyle.
QPainter * m_painter
The current Qt QPainter object.
Type
Enumeration of the type of symbols supported by this class.
QObject * m_inspector
The receiver of update messages.
int toView(double x) const
Converts the view space coordinate x expressed as a double to one expressed as an int...
A abstract base class for font handling.
The abstract base class for views that have a region for drawing data points with area around it for ...
A Color class for creating the color object following the standard RGB color space.
The class of derived from ViewBase for drawing to the screen and PostScript generation using Qt toolk...
The base class for the PlotterBase hierarchy.
PyArray_TYPES type(numeric::array arr)
hippodraw::DataView class interface
intp size(numeric::array arr)
Style
Line style constants.
std::map< const std::string, std::string > m_eq_png
The mapping from LaTex equation to PNG filename.