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 Class Reference

This class should be subclassed to allow a class to easily use MathFunction classes. More...

#include <mathfunctionimplementor.h>

Inheritance diagram for MathFunctionImplementor:

Inheritance graph
[legend]
List of all members.

Public Methods

 MathFunctionImplementor ()
virtual ~MathFunctionImplementor ()
virtual void installMathFunctions ()
 Implement this function to install any MathFunction's to a specific class.


Protected Methods

virtual void drawMathFunctions (QPainter *)
 Call this function when drawing the widget to get the visual for the installed math functionss.

virtual void cancelMathFunctions ()
 If a math function has been exec()'ed and is awaiting points to be selected, this will cancel it and return the widget to how it was.

void addMathFunction (MathFunction *, const char *id)
 Subclasses give a pointer to the MathFunction to add/install.

MathFunctiongetMathFunction (const char *id)
 Returns the installed MathFunction with the given id.

virtual void sendCustomClick (QMouseEvent *, MathFunction *, double x, double y)
 Implement this if a certain math function needs more arguments other than mouse coodinates.

virtual int mathFunctionCount ()
void mathFunctionClick (QMouseEvent *e, double x, double y)
 Call this function when the mouse is clicked and pass it the generated QMouseEvent pointer and the actual x and y coordinates of where the mouse is.


Detailed Description

This class should be subclassed to allow a class to easily use MathFunction classes.

The subclass must implement installMathFunctions() and add any MathFunction's to the math_functions vector. Also, call drawMathFunctions(QPainter*) when painting the widget to get the visual for the installed math functions.

Definition at line 32 of file mathfunctionimplementor.h.


Member Function Documentation

void MathFunctionImplementor::addMathFunction MathFunction  ,
const char *    id
[protected]
 

Subclasses give a pointer to the MathFunction to add/install.

This class will delete it

Definition at line 33 of file mathfunctionimplementor.cpp.

Referenced by ParametricGraph::installMathFunctions(), FunctionGraph::installMathFunctions(), and BasicGraph::installMathFunctions().

virtual void MathFunctionImplementor::installMathFunctions   [inline, virtual]
 

Implement this function to install any MathFunction's to a specific class.

A math function should be added by calling addMathFunction( MathFunction*, const char * id ) Example: addMathFunction(new DistanceMathFunction(this), "Distance");

Reimplemented in BasicGraph, FunctionGraph, and ParametricGraph.

Definition at line 44 of file mathfunctionimplementor.h.


The documentation for this class was generated from the following files: