Back to index

salome-gui  6.5.0
Plot2d_Curve.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File   : Plot2d_Curve.h
00023 //  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
00024 
00025 #ifndef PLOT2D_CURVE_H
00026 #define PLOT2D_CURVE_H
00027 
00028 #include "Plot2d.h"
00029 #include "Plot2d_Object.h"
00030 
00031 #include <qwt_symbol.h>
00032 
00033 class PLOT2D_EXPORT Plot2d_Curve : public Plot2d_Object
00034 {
00035 public:
00036 
00037   Plot2d_Curve();
00038   Plot2d_Curve( const Plot2d_Curve& );
00039 
00040   virtual ~Plot2d_Curve();
00041   Plot2d_Curve& operator= ( const Plot2d_Curve& );
00042 
00043   virtual int          rtti();
00044   virtual QwtPlotItem* createPlotItem();
00045   virtual void         autoFill( const QwtPlot* );
00046   virtual void         updatePlotItem( QwtPlotItem* );
00047 
00048   void                 setColor( const QColor& );
00049   QColor               getColor() const;
00050 
00051   void                 setMarker( Plot2d::MarkerType, const int );
00052   void                 setMarker( Plot2d::MarkerType );
00053   void                     setMarkerStyle( QwtSymbol::Style style);
00054   Plot2d::MarkerType   getMarker() const;
00055   QwtSymbol::Style     getMarkerStyle() const;
00056   void                 setMarkerSize( const int );
00057   int                  getMarkerSize() const;
00058 
00059   void                 setLine( Plot2d::LineType, const int );
00060   void                 setLine( Plot2d::LineType );
00061   Plot2d::LineType     getLine() const;
00062   void                 setLineWidth( const int );
00063   int                  getLineWidth() const;
00064   void                 setDeviationData( const double*, const double*, const QList<int>&);
00065   void                 getDeviationData( double*&, double*&, QList<int>& ) const;
00066   void                 clearDeviationData();
00067 
00068   virtual double          getMinY() const;
00069   virtual double          getMaxY() const;
00070 
00071 
00072 protected:
00073 
00074   QColor               myColor;
00075   Plot2d::MarkerType   myMarker;
00076   QwtSymbol::Style     myMarkerStyle;
00077   int                  myMarkerSize;
00078   Plot2d::LineType     myLine;
00079   int                  myLineWidth;
00080 };
00081 
00082 typedef QList<Plot2d_Curve*> curveList;
00083 
00084 #endif