X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlot2d%2FPlot2d_Curve.h;h=f7e85fc50d16d708a6f06f19179d271edad4d1e4;hb=HEAD;hp=133f744da76022b6bd1512209ff2dcf12781dd4e;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;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 133f744da..f7e85fc50 --- a/src/Plot2d/Plot2d_Curve.h +++ b/src/Plot2d/Plot2d_Curve.h @@ -1,78 +1,84 @@ +// Copyright (C) 2007-2024 CEA, EDF, 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, 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// 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 "Plot2d_Object.h" -#include - -#include -#include -#include +#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 ); - - 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; - 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 QList curveList; + #endif