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

Plot2d_Histogram Class Reference

#include <Plot2d_Histogram.h>

Inheritance diagram for Plot2d_Histogram:
Inheritance graph

Public Member Functions

 Plot2d_Histogram ()
 Plot2d_Histogram (const Plot2d_Histogram &)
virtual ~Plot2d_Histogram ()
Plot2d_Histogramoperator= (const Plot2d_Histogram &)
virtual int rtti ()
virtual QwtPlotItemcreatePlotItem ()
virtual void autoFill (const QwtPlot *)
virtual void updatePlotItem (QwtPlotItem *)
void setData (const QList< double > &, const QList< double > &)
QwtIntervalData getData () const
void setColor (const QColor &)
QColor getColor () const
void setWidth (const double)
double getWidth (const bool) 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 double getMinInterval (const QList< double > &)
static bool closeColors (const QColor &, const QColor &, int distance=-1)

Protected Member Functions

QColor getNextColor (const QwtPlot *)
bool existColor (const QwtPlot *, const QColor &)

Protected Attributes

bool myAutoAssign
QString myHorTitle
QString myVerTitle
QString myHorUnits
QString myVerUnits
QString myName
QwtPlot::Axis myXAxis
QwtPlot::Axis myYAxis
pointList myPoints

Private Attributes

QColor myColor
double myWidth
double myDefWidth

Constructor & Destructor Documentation

Plot2d_Histogram::Plot2d_Histogram ( )

Constructor.

Plot2d_Histogram::Plot2d_Histogram ( const Plot2d_Histogram hist)

Copy constructor. Makes deep copy of data.

References myColor, myDefWidth, and myWidth.

Plot2d_Histogram::~Plot2d_Histogram ( ) [virtual]

Destructor.


Member Function Documentation

Plot2d_Histogram & Plot2d_Histogram::operator= ( const Plot2d_Histogram hist)

operator=. Makes deep copy of data.

References myColor, myDefWidth, and myWidth.

int Plot2d_Histogram::rtti ( ) [virtual]

Get typeid for the plot2d histogram class

Implements Plot2d_Object.

QwtPlotItem * Plot2d_Histogram::createPlotItem ( ) [virtual]

Create plot object for the histogram

Implements Plot2d_Object.

References updatePlotItem().

void Plot2d_Histogram::autoFill ( const QwtPlot thePlot) [virtual]

Auto fill parameters of object by plot view

Reimplemented from Plot2d_Object.

References getNextColor(), and setColor().

void Plot2d_Histogram::updatePlotItem ( QwtPlotItem theItem) [virtual]

Updates histogram fields

Reimplemented from Plot2d_Object.

References getColor(), getData(), rtti(), Plot2d_HistogramQwtItem.setColor(), and Plot2d_HistogramQwtItem.setData().

void Plot2d_Histogram::setData ( const QList< double > &  theXVals,
const QList< double > &  theYVals 
)

Sets data to object

References getMinInterval(), myDefWidth, myWidth, and Plot2d_Object.setPointList().

QwtIntervalData Plot2d_Histogram::getData ( ) const

Gets data

References Plot2d_Object.getPointList(), myDefWidth, and myWidth.

void Plot2d_Histogram::setColor ( const QColor &  theColor)

Sets color of histogram

References myColor, and Plot2d_Object.setAutoAssign().

QColor Plot2d_Histogram::getColor ( ) const

Returns color of histogram

References myColor.

void Plot2d_Histogram::setWidth ( const double  theWidth)

Sets custom width of a histogram bar

References myWidth.

double Plot2d_Histogram::getWidth ( const bool  isDef) const

Returns custom or automatic width for a histogram bar

References myDefWidth, and myWidth.

double Plot2d_Histogram::getMinInterval ( const QList< double > &  theVals) [static]

Return min interval from values

QColor Plot2d_Histogram::getNextColor ( const QwtPlot thePlot) [protected]

Gets new unique marker for item if possible

References existColor(), and MAX_ATTEMPTS.

bool Plot2d_Histogram::existColor ( const QwtPlot thePlot,
const QColor &  theColor 
) [protected]

Checks if color is already user by other histogram entity

References Plot2d_Object.closeColors(), Plot2d_HistogramQwtItem.color(), and rtti().

QString Plot2d_Object::getTableTitle ( ) const [virtual, inherited]
Returns:
title of table

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

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_Histogram.myColor [private]
double Plot2d_Histogram.myWidth [private]
double Plot2d_Histogram.myDefWidth [private]
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