Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
mathfunctionimplementor.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _MATHFUNCTIONIMPLEMENTOR_H_
00019 #define _MATHFUNCTIONIMPLEMENTOR_H_
00020
00021 #include <map>
00022 #include <string>
00023
00024 class MathFunction;
00025 class QMouseEvent;
00026 class QPainter;
00027
00032 class MathFunctionImplementor
00033 {
00034 typedef std::map<std::string,MathFunction*> MathFunctionMap;
00035 typedef std::pair<std::string,MathFunction*> MathFunctionPair;
00036
00037 public:
00038 MathFunctionImplementor();
00039 virtual ~MathFunctionImplementor();
00040
00044 virtual void installMathFunctions(){}
00045
00046 protected:
00048 virtual void drawMathFunctions(QPainter *);
00049
00051 virtual void cancelMathFunctions();
00052
00054 void addMathFunction( MathFunction *, const char * id );
00055
00057 MathFunction* getMathFunction( const char * id );
00058
00060 virtual void sendCustomClick(QMouseEvent *, MathFunction *, double x, double y);
00061
00062 virtual int mathFunctionCount(){return math_functions.size();}
00063
00068 void mathFunctionClick(QMouseEvent *e, double x, double y);
00069
00070 private:
00071 MathFunctionMap math_functions;
00072 };
00073
00074 #endif
|