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  

MaximumFunction Class Reference

#include <maximumfunction.h>

Inheritance diagram for MaximumFunction:

Inheritance graph
[legend]
Collaboration diagram for MaximumFunction:

Collaboration graph
[legend]
List of all members.

Public Methods

 MaximumFunction (BasicGraph *, int)
 ~MaximumFunction ()

Protected Methods

void calculate_and_draw (QPainter *)
 When creating a math function subclass, overwrite this function to calculate and then draw whatever visual you wish using the given QPainter.

void draw_stored (QPainter *)
 When creating a math function subclass, overwrite this function with a function to more quickly draw the result of the function.


Detailed Description

Author:
Fungmeista
Note:
This numerically calculates the maximum point on the interval. This means that for non-continuous functions it will not return correct values for the maximum since the maximum may not be defined.

Definition at line 28 of file maximumfunction.h.


Member Function Documentation

void MaximumFunction::calculate_and_draw QPainter *    painter [protected, virtual]
 

When creating a math function subclass, overwrite this function to calculate and then draw whatever visual you wish using the given QPainter.

You should also call the function setResult() inside this function and pass to it a string that you wish to be displayed as the result of the function.

Reimplemented from MathFunction.

Definition at line 33 of file maximumfunction.cpp.

References draw_stored(), MathFunction::expression, MathFunction::setResult(), and MathFunction::toGraphXCoord().

void MaximumFunction::draw_stored QPainter *    painter [protected, virtual]
 

When creating a math function subclass, overwrite this function with a function to more quickly draw the result of the function.

For example, if calculate_and_draw calculates many points, these can be saved and drawn in draw_stored instead of recalculating them.

Reimplemented from MathFunction.

Definition at line 66 of file maximumfunction.cpp.

References MathFunction::drawSelectedPoint().

Referenced by calculate_and_draw().


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