Home

Download

Features

Screenshots

Handbook

Browse Source

Authors

SourceForge.net Logo
Hosted by SourceForge.net

OSI Certified


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Search  

mathfunctionimplementor.h

00001 /***************************************************************************
00002                           mathfunctionimplementor.h  -  description
00003                              -------------------
00004     begin                : Thu Feb 27 2003
00005     copyright            : (C) 2003 by Fungmeista
00006     email                : mizunoami44@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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