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;
80 virtual void update (
const Observable * display );
85 virtual int toCanvasX (
double dx )
const = 0;
88 virtual int toCanvasY (
double dy )
const = 0;
95 #if QT_VERSION < 0x040000
98 void transformAndFill ( QPolygon & array,
100 const std::vector < double > & x,
101 const std::vector < double > & y,
102 int (
QtViewImp::* xfunc ) (
double )
const,
103 int (
QtViewImp::* yfunc ) (
double )
const );
107 void drawMethod (
const std::vector< double > & x,
108 const std::vector< double > & y,
112 virtual void drawPoints (
const std::vector<double> & x,
113 const std::vector<double> & y,
116 const Color & color );
124 void drawViewMethod (
const std::vector< double > & x,
125 const std::vector< double > & y,
145 void setInspector (
QObject * );
148 virtual int toViewX (
double datX )
const = 0;
151 virtual int toViewY (
double datY )
const = 0;
157 virtual void fillPickedPoint (
double x,
double y,
158 std::vector < double > & picked )
const = 0;
162 inline int toView (
double x )
const;
164 virtual void drawLines (
const std::vector< double > & x,
165 const std::vector< double > & y,
170 virtual void drawColorLines (
const std::vector< double > & x,
171 const std::vector< double > & y,
173 const std::vector < Color > & colors,
176 virtual void drawViewLines (
const std::vector< double > & x,
177 const std::vector< double > & y,
182 virtual void drawViewLines (
const std::vector< double > & x,
183 const std::vector< double > & y,
188 virtual void drawPolyLine (
const std::vector< double > & xpoints,
189 const std::vector< double > & ypoints,
194 virtual void drawPolygon (
const std::vector < double > & x,
195 const std::vector < double > & y,
197 const Color & edge );
200 void setCrossX (
double val );
203 void setCrossY (
double val );
207 virtual void draw_Text (
const std::string &s,
209 float fontsize,
float angle,
217 virtual void drawImage (
const std::string &filename,
int position = 0 );
219 virtual void drawLatex (
const std::string &eq,
int position = 0 );
221 virtual void drawText (
const std::string &s,
float x,
float y,
222 float fontsize,
float angle,
char xp,
char yp,
225 virtual void drawText (
const std::string &s,
float x,
float y,
226 float fontsize,
float angle,
char xp,
char yp,
229 const Color * color );
231 virtual void drawPoints (
const std::vector<double> & x,
232 const std::vector<double> & y,
236 virtual void drawPoints (
const std::vector< double > & x,
237 const std::vector< double > & y,
238 const std::vector< Color > & colors,
242 virtual void drawSquare (
double x1,
double y1,
double x2,
double y2,
243 int red,
int green,
int blue );
245 virtual void drawViewSquare (
float x1,
float y1,
float x2,
float y2,
246 int red,
int green,
int blue );
248 float userToDrawX (
double x )
const;
249 float userToDrawXAutoInv (
double x )
const;
250 float userToDrawY (
double x )
const;
251 float userToDrawColor (
double c )
const;
253 virtual void setDefaultFont(
const QFont& font );
255 virtual const QFont & defaultFont();
261 return static_cast< int > ( x );
266 #endif // _QtViewImp_H_