Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

SPlot2d_Curve Class Reference

#include <SPlot2d_Curve.h>

Inheritance diagram for SPlot2d_Curve:
Inheritance graph

Public Member Functions

 SPlot2d_Curve ()
virtual ~SPlot2d_Curve ()
 SPlot2d_Curve (const SPlot2d_Curve &curve)
SPlot2d_Curveoperator= (const SPlot2d_Curve &curve)
virtual QString getTableTitle () const
virtual bool hasIO () const
virtual Handle (SALOME_InteractiveObject) getIO() const
virtual void setIO (const Handle(SALOME_InteractiveObject)&)
virtual bool hasTableIO () const
virtual Handle (SALOME_InteractiveObject) getTableIO() const
virtual void setTableIO (const Handle(SALOME_InteractiveObject)&)
virtual void addOwner (const QString &owner)
virtual void removeOwner (const QString &owner)
virtual OwnerSet getOwners () const
virtual void addOwners (OwnerSet &owners)
virtual int rtti ()
virtual QwtPlotItemcreatePlotItem ()
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
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

Private Member Functions

 Handle (SALOME_InteractiveObject) myIO
 Handle (SALOME_InteractiveObject) myTableIO

Private Attributes

OwnerSet myOwners

Constructor & Destructor Documentation

SPlot2d_Curve::SPlot2d_Curve ( )

Constructor

SPlot2d_Curve::~SPlot2d_Curve ( ) [virtual]

Destructor

SPlot2d_Curve::SPlot2d_Curve ( const SPlot2d_Curve curve)

Copy constructor. Makes deep copy of data.


Member Function Documentation

SPlot2d_Curve & SPlot2d_Curve::operator= ( const SPlot2d_Curve curve)

operator=. Makes deep copy of data.

QString SPlot2d_Curve::getTableTitle ( ) const [virtual]
Returns:
table title

Reimplemented from Plot2d_Object.

References hasTableIO().

bool SPlot2d_Curve::hasIO ( ) const [virtual]
virtual SPlot2d_Curve.Handle ( SALOME_InteractiveObject  ) const [virtual]
void SPlot2d_Curve::setIO ( const Handle(SALOME_InteractiveObject)&  io) [virtual]

Sets corresponding SALOME_InteractiveObject

Parameters:
io- SALOME_InteractiveObject
bool SPlot2d_Curve::hasTableIO ( ) const [virtual]
Returns:
true if curve has table interactive object
virtual SPlot2d_Curve.Handle ( SALOME_InteractiveObject  ) const [virtual]
void SPlot2d_Curve::setTableIO ( const Handle(SALOME_InteractiveObject)&  io) [virtual]

Sets table interactive object of curve

Parameters:
io- SALOME_InteractiveObject
void SPlot2d_Curve::addOwner ( const QString &  owner) [virtual]

Add owner of the curve.

Parameters:
owner- owner of the curve

References myOwners.

void SPlot2d_Curve::removeOwner ( const QString &  owner) [virtual]

Remove owner of the curve.

Parameters:
owner- owner of the curve

References myOwners.

OwnerSet SPlot2d_Curve::getOwners ( ) const [virtual]

Get all owners of the curve.

Returns:
owners of the curve.

References myOwners.

void SPlot2d_Curve::addOwners ( OwnerSet owners) [virtual]

Add owners of the curve.

Parameters:
owners- owners of the curve

References myOwners.

SPlot2d_Curve.Handle ( SALOME_InteractiveObject  ) [private]
SPlot2d_Curve.Handle ( SALOME_InteractiveObject  ) [private]
int Plot2d_Curve::rtti ( ) [virtual, inherited]

Get typeid for the plot2d curve class

Implements Plot2d_Object.

QwtPlotItem * Plot2d_Curve::createPlotItem ( ) [virtual, inherited]

Create plot object for the curve

Implements Plot2d_Object.

References Plot2d_Object.getVerTitle(), Plot2d_Object.getYAxis(), and Plot2d_Curve.updatePlotItem().

void Plot2d_Curve::autoFill ( const QwtPlot thePlot) [virtual, inherited]
void Plot2d_Curve::updatePlotItem ( QwtPlotItem theItem) [virtual, inherited]
void Plot2d_Curve::setColor ( const QColor &  color) [inherited]

Sets curve's color ( and resets AutoAssign flag )

References Plot2d_Curve.myColor, and Plot2d_Object.setAutoAssign().

QColor Plot2d_Curve::getColor ( ) const [inherited]

Gets curve's color

References Plot2d_Curve.myColor.

void Plot2d_Curve::setMarker ( Plot2d::MarkerType  marker,
const int  markerSize 
) [inherited]

Sets marker type and size ( and resets AutoAssign flag )

References Plot2d_Object.setAutoAssign(), and Plot2d_Curve.setMarkerSize().

void Plot2d_Curve::setMarker ( Plot2d::MarkerType  marker) [inherited]

Sets marker type ( and resets AutoAssign flag )

References Plot2d_Curve.myMarker, and Plot2d_Object.setAutoAssign().

Plot2d::MarkerType Plot2d_Curve::getMarker ( ) const [inherited]

Gets marker type

References Plot2d_Curve.myMarker.

void Plot2d_Curve::setMarkerSize ( const int  theSize) [inherited]

Sets new marker size ( and resets AutoAssign flag )

References Plot2d_Curve.myMarkerSize, and Plot2d_Object.setAutoAssign().

int Plot2d_Curve::getMarkerSize ( ) const [inherited]

Gets marker size

References Plot2d_Curve.myMarkerSize.

void Plot2d_Curve::setLine ( Plot2d::LineType  line,
const int  lineWidth 
) [inherited]

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 Plot2d_Curve.setLineWidth().

void Plot2d_Curve::setLine ( Plot2d::LineType  line) [inherited]

Sets line type ( and resets AutoAssign flag )

References Plot2d_Curve.myLine, and Plot2d_Object.setAutoAssign().

Plot2d::LineType Plot2d_Curve::getLine ( ) const [inherited]

Gets line type

References Plot2d_Curve.myLine.

void Plot2d_Curve::setLineWidth ( const int  lineWidth) [inherited]

Sets line width ( and resets AutoAssign flag )

References Plot2d_Curve.myLineWidth, and Plot2d_Object.setAutoAssign().

int Plot2d_Curve::getLineWidth ( ) const [inherited]

Gets line width

References Plot2d_Curve.myLineWidth.

void Plot2d_Curve::getNextMarker ( const QwtPlot thePlot,
QwtSymbol::Style &  typeMarker,
QColor &  color,
Qt::PenStyle &  typeLine 
) [protected, inherited]

Gets new unique marker for item if possible

References Plot2d_Curve.existMarker(), and MAX_ATTEMPTS.

bool Plot2d_Curve::existMarker ( const QwtPlot thePlot,
const QwtSymbol::Style  typeMarker,
const QColor &  color,
const Qt::PenStyle  typeLine 
) [protected, inherited]

Checks if marker belongs to any enitity

References Plot2d_Object.closeColors(), and Plot2d_Curve.rtti().

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

Parameters:
ind-- index of point
txt-- new text

References Plot2d_Object.myPoints, and Plot2d_Object.text().

QString Plot2d_Object::text ( const int  ind) const [inherited]
Returns:
text assigned to point
Parameters:
ind-- index of point

References Plot2d_Object.myPoints.

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.


Field Documentation

QColor Plot2d_Curve.myColor [protected, inherited]
Plot2d::MarkerType Plot2d_Curve.myMarker [protected, inherited]
int Plot2d_Curve.myMarkerSize [protected, inherited]
Plot2d::LineType Plot2d_Curve.myLine [protected, inherited]
int Plot2d_Curve.myLineWidth [protected, inherited]
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]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS