#include <Plot2d_Curve.h>

Public Member Functions | |
| Plot2d_Curve () | |
| Plot2d_Curve (const Plot2d_Curve &) | |
| virtual | ~Plot2d_Curve () |
| Plot2d_Curve & | operator= (const Plot2d_Curve &) |
| virtual int | rtti () |
| virtual QwtPlotItem * | createPlotItem () |
| virtual void | autoFill (const QwtPlot *) |
| virtual void | updatePlotItem (QwtPlotItem *) |
| void | setColor (const QColor &) |
| QColor | getColor () const |
| void | setMarker (Plot2d::MarkerType, const int) |
| void | setMarker (Plot2d::MarkerType) |
| Plot2d::MarkerType | getMarker () const |
| void | setMarkerSize (const int) |
| int | getMarkerSize () const |
| void | setLine (Plot2d::LineType, const int) |
| void | setLine (Plot2d::LineType) |
| Plot2d::LineType | getLine () const |
| void | setLineWidth (const int) |
| int | getLineWidth () const |
| virtual QString | getTableTitle () const |
| void | setHorTitle (const QString &) |
| QString | getHorTitle () const |
| void | setVerTitle (const QString &) |
| QString | getVerTitle () const |
| void | setHorUnits (const QString &) |
| QString | getHorUnits () const |
| void | setVerUnits (const QString &) |
| QString | getVerUnits () const |
| void | setName (const QString &) |
| QString | getName () const |
| void | addPoint (double, double, const QString &=QString()) |
| void | addPoint (const Plot2d_Point &) |
| void | insertPoint (int, double, double, const QString &=QString()) |
| void | insertPoint (int, const Plot2d_Point &) |
| void | deletePoint (int) |
| void | clearAllPoints () |
| pointList | getPointList () const |
| void | setPointList (const pointList &points) |
| void | setData (const double *, const double *, long, const QStringList &=QStringList()) |
| double * | horData () const |
| double * | verData () const |
| long | getData (double **, double **) const |
| void | setText (const int, const QString &) |
| QString | text (const int) const |
| int | nbPoints () const |
| bool | isEmpty () const |
| void | setAutoAssign (bool) |
| bool | isAutoAssign () const |
| void | setXAxis (QwtPlot::Axis) |
| QwtPlot::Axis | getXAxis () const |
| void | setYAxis (QwtPlot::Axis) |
| QwtPlot::Axis | getYAxis () const |
| double | getMinX () const |
| double | getMaxX () const |
| double | getMinY () const |
| double | getMaxY () const |
Static Public Member Functions | |
| static bool | closeColors (const QColor &, const QColor &, int distance=-1) |
Protected Member Functions | |
| void | getNextMarker (const QwtPlot *, QwtSymbol::Style &, QColor &, Qt::PenStyle &) |
| bool | existMarker (const QwtPlot *, const QwtSymbol::Style, const QColor &, const Qt::PenStyle) |
Protected Attributes | |
| QColor | myColor |
| Plot2d::MarkerType | myMarker |
| int | myMarkerSize |
| Plot2d::LineType | myLine |
| int | myLineWidth |
| bool | myAutoAssign |
| QString | myHorTitle |
| QString | myVerTitle |
| QString | myHorUnits |
| QString | myVerUnits |
| QString | myName |
| QwtPlot::Axis | myXAxis |
| QwtPlot::Axis | myYAxis |
| pointList | myPoints |
| Plot2d_Curve::Plot2d_Curve | ( | ) |
Constructor
| Plot2d_Curve::Plot2d_Curve | ( | const Plot2d_Curve & | curve | ) |
Copy constructor. Makes deep copy of data
References getColor(), getLine(), getLineWidth(), getMarker(), getMarkerSize(), myColor, myLine, myLineWidth, myMarker, and myMarkerSize.
| Plot2d_Curve::~Plot2d_Curve | ( | ) | [virtual] |
Destructor
| Plot2d_Curve & Plot2d_Curve::operator= | ( | const Plot2d_Curve & | curve | ) |
operator=. Makes deep copy of data
References getColor(), getLine(), getLineWidth(), getMarker(), getMarkerSize(), myColor, myLine, myLineWidth, myMarker, and myMarkerSize.
| int Plot2d_Curve::rtti | ( | ) | [virtual] |
Get typeid for the plot2d curve class
Implements Plot2d_Object.
| QwtPlotItem * Plot2d_Curve::createPlotItem | ( | ) | [virtual] |
Create plot object for the curve
Implements Plot2d_Object.
References Plot2d_Object.getVerTitle(), Plot2d_Object.getYAxis(), and updatePlotItem().
| void Plot2d_Curve::autoFill | ( | const QwtPlot * | thePlot | ) | [virtual] |
Auto fill parameters of object by plot view
Reimplemented from Plot2d_Object.
References DEFAULT_LINE_WIDTH, getNextMarker(), Plot2d.qwt2plotLine(), Plot2d.qwt2plotMarker(), setColor(), setLine(), and setMarker().
| void Plot2d_Curve::updatePlotItem | ( | QwtPlotItem * | theItem | ) | [virtual] |
Updates curve fields
Reimplemented from Plot2d_Object.
References getColor(), Plot2d_Object.getData(), getLine(), getLineWidth(), getMarker(), getMarkerSize(), Plot2d.plot2qwtLine(), Plot2d.plot2qwtMarker(), and rtti().
| void Plot2d_Curve::setColor | ( | const QColor & | color | ) |
Sets curve's color ( and resets AutoAssign flag )
References myColor, and Plot2d_Object.setAutoAssign().
| QColor Plot2d_Curve::getColor | ( | ) | const |
Gets curve's color
References myColor.
| void Plot2d_Curve::setMarker | ( | Plot2d::MarkerType | marker, |
| const int | markerSize | ||
| ) |
Sets marker type and size ( and resets AutoAssign flag )
References Plot2d_Object.setAutoAssign(), and setMarkerSize().
| void Plot2d_Curve::setMarker | ( | Plot2d::MarkerType | marker | ) |
Sets marker type ( and resets AutoAssign flag )
References myMarker, and Plot2d_Object.setAutoAssign().
| Plot2d::MarkerType Plot2d_Curve::getMarker | ( | ) | const |
Gets marker type
References myMarker.
| void Plot2d_Curve::setMarkerSize | ( | const int | theSize | ) |
Sets new marker size ( and resets AutoAssign flag )
References myMarkerSize, and Plot2d_Object.setAutoAssign().
| int Plot2d_Curve::getMarkerSize | ( | ) | const |
Gets marker size
References myMarkerSize.
| void Plot2d_Curve::setLine | ( | Plot2d::LineType | line, |
| const int | lineWidth | ||
| ) |
Sets line type and width ( and resets AutoAssign flag ) NOTE : A line width of 0 will produce a 1 pixel wide line using a fast algorithm for diagonals. A line width of 1 will also produce a 1 pixel wide line, but uses a slower more accurate algorithm for diagonals. For horizontal and vertical lines a line width of 0 is the same as a line width of 1.
References Plot2d_Object.setAutoAssign(), and setLineWidth().
| void Plot2d_Curve::setLine | ( | Plot2d::LineType | line | ) |
Sets line type ( and resets AutoAssign flag )
References myLine, and Plot2d_Object.setAutoAssign().
| Plot2d::LineType Plot2d_Curve::getLine | ( | ) | const |
Gets line type
References myLine.
| void Plot2d_Curve::setLineWidth | ( | const int | lineWidth | ) |
Sets line width ( and resets AutoAssign flag )
References myLineWidth, and Plot2d_Object.setAutoAssign().
| int Plot2d_Curve::getLineWidth | ( | ) | const |
Gets line width
References myLineWidth.
| void Plot2d_Curve::getNextMarker | ( | const QwtPlot * | thePlot, |
| QwtSymbol::Style & | typeMarker, | ||
| QColor & | color, | ||
| Qt::PenStyle & | typeLine | ||
| ) | [protected] |
Gets new unique marker for item if possible
References existMarker(), and MAX_ATTEMPTS.
| bool Plot2d_Curve::existMarker | ( | const QwtPlot * | thePlot, |
| const QwtSymbol::Style | typeMarker, | ||
| const QColor & | color, | ||
| const Qt::PenStyle | typeLine | ||
| ) | [protected] |
Checks if marker belongs to any enitity
References Plot2d_Object.closeColors(), and rtti().
| QString Plot2d_Object::getTableTitle | ( | ) | const [virtual, inherited] |
Reimplemented in SPlot2d_Curve.
| void Plot2d_Object::setHorTitle | ( | const QString & | title | ) | [inherited] |
Sets object's horizontal title
References Plot2d_Object.myHorTitle.
| QString Plot2d_Object::getHorTitle | ( | ) | const [inherited] |
Gets object's horizontal title
References Plot2d_Object.myHorTitle.
| void Plot2d_Object::setVerTitle | ( | const QString & | title | ) | [inherited] |
Sets object's vertical title
References Plot2d_Object.myVerTitle.
| QString Plot2d_Object::getVerTitle | ( | ) | const [inherited] |
Gets object's vertical title
References Plot2d_Object.myVerTitle.
| void Plot2d_Object::setHorUnits | ( | const QString & | units | ) | [inherited] |
Sets object's horizontal units
References Plot2d_Object.myHorUnits.
| QString Plot2d_Object::getHorUnits | ( | ) | const [inherited] |
Gets object's horizontal units
References Plot2d_Object.myHorUnits.
| void Plot2d_Object::setVerUnits | ( | const QString & | units | ) | [inherited] |
Sets object's vertical units
References Plot2d_Object.myVerUnits.
| QString Plot2d_Object::getVerUnits | ( | ) | const [inherited] |
Gets object's vertical units
References Plot2d_Object.myVerUnits.
| void Plot2d_Object::setName | ( | const QString & | theName | ) | [inherited] |
Sets object's name
References Plot2d_Object.myName.
| QString Plot2d_Object::getName | ( | ) | const [inherited] |
Gets object's name
References Plot2d_Object.myName.
| void Plot2d_Object::addPoint | ( | double | theX, |
| double | theY, | ||
| const QString & | theText = QString() |
||
| ) | [inherited] |
Adds one point for object.
| void Plot2d_Object::addPoint | ( | const Plot2d_Point & | thePoint | ) | [inherited] |
Adds one point for object.
References Plot2d_Object.myPoints.
| void Plot2d_Object::insertPoint | ( | int | thePos, |
| double | theX, | ||
| double | theY, | ||
| const QString & | theText = QString() |
||
| ) | [inherited] |
Insert one point for object on some position.
| void Plot2d_Object::insertPoint | ( | int | thePos, |
| const Plot2d_Point & | thePoint | ||
| ) | [inherited] |
Insert one point for object on some position.
References Plot2d_Object.myPoints.
| void Plot2d_Object::deletePoint | ( | int | thePos | ) | [inherited] |
Delete one point for object on some position.
References Plot2d_Object.myPoints.
| void Plot2d_Object::clearAllPoints | ( | ) | [inherited] |
Remove all points for object.
References Plot2d_Object.myPoints.
| pointList Plot2d_Object::getPointList | ( | ) | const [inherited] |
Gets object's data : abscissas of points
References Plot2d_Object.myPoints.
| void Plot2d_Object::setPointList | ( | const pointList & | points | ) | [inherited] |
Gets object's data : abscissas of points
References Plot2d_Object.myPoints.
| void Plot2d_Object::setData | ( | const double * | hData, |
| const double * | vData, | ||
| long | size, | ||
| const QStringList & | lst = QStringList() |
||
| ) | [inherited] |
Sets object's data.
References Plot2d_Object.addPoint(), and Plot2d_Object.clearAllPoints().
| double * Plot2d_Object::horData | ( | ) | const [inherited] |
Gets object's data : abscissas of points
References Plot2d_Object.myPoints, and Plot2d_Object.nbPoints().
| double * Plot2d_Object::verData | ( | ) | const [inherited] |
Gets object's data : ordinates of points
References Plot2d_Object.myPoints, and Plot2d_Object.nbPoints().
| long Plot2d_Object::getData | ( | double ** | theX, |
| double ** | theY | ||
| ) | const [inherited] |
Gets object's data
References Plot2d_Object.myPoints, and Plot2d_Object.nbPoints().
| void Plot2d_Object::setText | ( | const int | ind, |
| const QString & | txt | ||
| ) | [inherited] |
Changes text assigned to point of object
| ind | -- index of point |
| txt | -- new text |
References Plot2d_Object.myPoints, and Plot2d_Object.text().
| QString Plot2d_Object::text | ( | const int | ind | ) | const [inherited] |
| int Plot2d_Object::nbPoints | ( | ) | const [inherited] |
Gets object's data : number of points
References Plot2d_Object.myPoints.
| bool Plot2d_Object::isEmpty | ( | ) | const [inherited] |
Returns true if object has no data
References Plot2d_Object.myPoints.
| void Plot2d_Object::setAutoAssign | ( | bool | on | ) | [inherited] |
Sets object's AutoAssign flag - in this case attributes will be set automatically
References Plot2d_Object.myAutoAssign.
| bool Plot2d_Object::isAutoAssign | ( | ) | const [inherited] |
Gets object's AutoAssign flag state
References Plot2d_Object.myAutoAssign.
| void Plot2d_Object::setXAxis | ( | QwtPlot::Axis | theXAxis | ) | [inherited] |
Sets object's x axis
References Plot2d_Object.myXAxis.
| QwtPlot::Axis Plot2d_Object::getXAxis | ( | ) | const [inherited] |
Gets object's x axis
References Plot2d_Object.myXAxis.
| void Plot2d_Object::setYAxis | ( | QwtPlot::Axis | theYAxis | ) | [inherited] |
Sets object's y axis
References Plot2d_Object.myYAxis.
| QwtPlot::Axis Plot2d_Object::getYAxis | ( | ) | const [inherited] |
Gets object's y axis
References Plot2d_Object.myYAxis.
| double Plot2d_Object::getMinX | ( | ) | const [inherited] |
Gets object's minimal abscissa
References Plot2d_Object.myPoints.
| double Plot2d_Object::getMaxX | ( | ) | const [inherited] |
Gets object's maximal abscissa
References Plot2d_Object.myPoints.
| double Plot2d_Object::getMinY | ( | ) | const [inherited] |
Gets object's minimal ordinate
References Plot2d_Object.myPoints.
| double Plot2d_Object::getMaxY | ( | ) | const [inherited] |
Gets object's maximal ordinate
References Plot2d_Object.myPoints.
| bool Plot2d_Object::closeColors | ( | const QColor & | color1, |
| const QColor & | color2, | ||
| int | distance = -1 |
||
| ) | [static, inherited] |
Checks if two colors are close to each other [ static ] uses COLOR_DISTANCE variable as max tolerance for comparing of colors
References COLOR_DISTANCE.
QColor Plot2d_Curve.myColor [protected] |
Plot2d::MarkerType Plot2d_Curve.myMarker [protected] |
int Plot2d_Curve.myMarkerSize [protected] |
Plot2d::LineType Plot2d_Curve.myLine [protected] |
int Plot2d_Curve.myLineWidth [protected] |
bool Plot2d_Object.myAutoAssign [protected, inherited] |
QString Plot2d_Object.myHorTitle [protected, inherited] |
QString Plot2d_Object.myVerTitle [protected, inherited] |
QString Plot2d_Object.myHorUnits [protected, inherited] |
QString Plot2d_Object.myVerUnits [protected, inherited] |
QString Plot2d_Object.myName [protected, inherited] |
QwtPlot::Axis Plot2d_Object.myXAxis [protected, inherited] |
QwtPlot::Axis Plot2d_Object.myYAxis [protected, inherited] |
pointList Plot2d_Object.myPoints [protected, inherited] |