X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlot2d%2FPlot2d_Curve.h;h=4f6821eeb33e48fd07f0ce7382f82e79ccea492e;hb=d0b0c10e5649e0338079df4a53cf95044792d989;hp=e54009d5e18ed207e83c020902de8c404d2835e4;hpb=232b55569765049c7d1cceb5096a45f8584c9369;p=modules%2Fgui.git diff --git a/src/Plot2d/Plot2d_Curve.h b/src/Plot2d/Plot2d_Curve.h old mode 100755 new mode 100644 index e54009d5e..4f6821eeb --- a/src/Plot2d/Plot2d_Curve.h +++ b/src/Plot2d/Plot2d_Curve.h @@ -1,102 +1,84 @@ -// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D -// +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File : Plot2d_Curve.h +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) + #ifndef PLOT2D_CURVE_H #define PLOT2D_CURVE_H #include "Plot2d.h" -#include -#include -#include +#include "Plot2d_Object.h" -class QColor; +#include -typedef struct -{ - double x; - double y; -} Plot2d_Point; - -typedef QValueList pointList; - -class PLOT2D_EXPORT Plot2d_Curve +class PLOT2D_EXPORT Plot2d_Curve : public Plot2d_Object { public: - enum MarkerType { None, Circle, Rectangle, Diamond, - DTriangle, UTriangle, LTriangle, RTriangle, - Cross, XCross }; - enum LineType { NoPen, Solid, Dash, Dot, DashDot, DashDotDot }; Plot2d_Curve(); + Plot2d_Curve( const Plot2d_Curve& ); + virtual ~Plot2d_Curve(); - Plot2d_Curve( const Plot2d_Curve& curve ); - Plot2d_Curve& operator= ( const Plot2d_Curve& curve ); - - virtual QString getTableTitle() const; - - void setHorTitle( const QString& title ); - QString getHorTitle() const; - void setVerTitle( const QString& title ); - QString getVerTitle() const; - void setHorUnits( const QString& units ); - QString getHorUnits() const; - void setVerUnits( const QString& units ); - QString getVerUnits() const; - void addPoint(double theX, double theY); - void insertPoint(int thePos, double theX, double theY); - void deletePoint(int thePos); - void clearAllPoints(); - pointList getPointList() const; - - void setData( const double* hData, const double* vData, long size ); - double* horData() const; - double* verData() const; - - int nbPoints() const; - bool isEmpty() const; - - void setAutoAssign( bool on ); - bool isAutoAssign() const; - void setColor( const QColor& color ); - QColor getColor() const; - void setMarker( MarkerType marker ); - MarkerType getMarker() const; - void setLine( LineType line, const int lineWidth = 0 ); - LineType getLine() const; - int getLineWidth() const; - void setYAxis(QwtPlot::Axis theYAxis); - QwtPlot::Axis getYAxis() const; + 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 ); + void setMarkerStyle( QwtSymbol::Style style); + Plot2d::MarkerType getMarker() const; + QwtSymbol::Style getMarkerStyle() 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 setDeviationData( const double*, const double*, const QList&); + void getDeviationData( double*&, double*&, QList& ) const; + void clearDeviationData(); + + virtual double getMinY() const; + virtual double getMaxY() const; + protected: - bool myAutoAssign; - QString myHorTitle; - QString myVerTitle; - QString myHorUnits; - QString myVerUnits; - QColor myColor; - MarkerType myMarker; - LineType myLine; - int myLineWidth; - QwtPlot::Axis myYAxis; - - pointList myPoints; + + QColor myColor; + Plot2d::MarkerType myMarker; + QwtSymbol::Style myMarkerStyle; + int myMarkerSize; + Plot2d::LineType myLine; + int myLineWidth; }; -typedef QPtrList curveList; +typedef QList curveList; #endif