00001 // Copyright (C) 2007-2011 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_plot_curve.h> 00032 00033 class PLOT2D_EXPORT Plot2d_Curve : public Plot2d_Object 00034 { 00035 public: 00036 Plot2d_Curve(); 00037 Plot2d_Curve( const Plot2d_Curve& ); 00038 00039 virtual ~Plot2d_Curve(); 00040 Plot2d_Curve& operator= ( const Plot2d_Curve& ); 00041 00042 virtual int rtti(); 00043 virtual QwtPlotItem* createPlotItem(); 00044 virtual void autoFill( const QwtPlot* ); 00045 virtual void updatePlotItem( QwtPlotItem* ); 00046 00047 void setColor( const QColor& ); 00048 QColor getColor() const; 00049 00050 void setMarker( Plot2d::MarkerType, const int ); 00051 void setMarker( Plot2d::MarkerType ); 00052 Plot2d::MarkerType getMarker() const; 00053 void setMarkerSize( const int ); 00054 int getMarkerSize() const; 00055 00056 void setLine( Plot2d::LineType, const int ); 00057 void setLine( Plot2d::LineType ); 00058 Plot2d::LineType getLine() const; 00059 void setLineWidth( const int ); 00060 int getLineWidth() const; 00061 00062 protected: 00063 void getNextMarker( const QwtPlot*, QwtSymbol::Style&, 00064 QColor&, Qt::PenStyle& ); 00065 bool existMarker( const QwtPlot*, const QwtSymbol::Style, 00066 const QColor&, const Qt::PenStyle ); 00067 00068 protected: 00069 QColor myColor; 00070 Plot2d::MarkerType myMarker; 00071 int myMarkerSize; 00072 Plot2d::LineType myLine; 00073 int myLineWidth; 00074 }; 00075 00076 typedef QList<Plot2d_Curve*> curveList; 00077 00078 #endif