1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
30 # if defined PLOT2D_EXPORTS || defined Plot2d_EXPORTS
31 # define PLOT2D_EXPORT __declspec(dllexport)
33 # define PLOT2D_EXPORT __declspec(dllimport)
36 # define PLOT2D_EXPORT
39 #include <qwt_symbol.h>
45 // Properties on the deviation marker.
46 #define PLOT2D_DEVIATION_COLOR "DEVIATION_COLOR"
47 #define PLOT2D_DEVIATION_LW "DEVIATION_LW"
48 #define PLOT2D_DEVIATION_TS "DEVIATION_TS"
50 struct PLOT2D_EXPORT Plot2d_Point
57 Plot2d_Point( double theX, double theY, const QString& theText = QString() );
59 bool deviation(double& min, double& max) const;
60 bool hasDeviation() const;
61 void setDeviation(double min, double max);
62 void clearDeviation();
63 bool minDeviation(double& min) const;
64 bool maxDeviation(double& max) const;
67 typedef QList<Plot2d_Point> pointList;
93 QwtSymbol::Style plot2qwtMarker( MarkerType );
94 MarkerType qwt2plotMarker( QwtSymbol::Style );
96 Qt::PenStyle plot2qwtLine( LineType );
97 LineType qwt2plotLine( Qt::PenStyle );
99 void drawLine( QPainter*, const QPoint&, const QPoint&,
100 Qt::PenStyle = Qt::SolidLine,
101 const QColor& = Qt::black, int = 0 );
102 void drawLine( QPainter*, const QPoint&, const QPoint&,
104 const QColor& = Qt::black, int = 0 );
105 void drawLine( QPainter*, int, int, int, int,
106 Qt::PenStyle = Qt::SolidLine,
107 const QColor& = Qt::black, int = 0 );
108 void drawLine( QPainter*, int, int, int, int,
110 const QColor& = Qt::black, int = 0 );
112 void drawMarker( QPainter*, const QPoint&, const QRect&,
113 QwtSymbol::Style = QwtSymbol::Ellipse,
114 const QColor& = Qt::black );
115 void drawMarker( QPainter*, const QPoint&, const QRect&,
117 const QColor& = Qt::black );
118 void drawMarker( QPainter*, int, int, int, int,
119 QwtSymbol::Style = QwtSymbol::Ellipse,
120 const QColor& = Qt::black );
121 void drawMarker( QPainter*, int, int, int, int,
123 const QColor& = Qt::black );
125 QPixmap markerIcon( const QSize&, const QColor&,
126 Plot2d::MarkerType );
128 QPixmap lineIcon( const QSize&, const QColor&,
131 void getNextMarker( const int rtti, const QwtPlot*, QwtSymbol::Style&,
132 QColor&, Qt::PenStyle& );
134 bool existMarker( const int rtti , const QwtPlot*, const QwtSymbol::Style,
135 const QColor&, const Qt::PenStyle );
138 bool closeColors( const QColor&,
145 # pragma warning ( disable: 4251 )