1 // Copyright (C) 2007-2015 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, or (at your option) any later version.
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>
47 // Properties on the deviation marker.
48 #define PLOT2D_DEVIATION_COLOR "DEVIATION_COLOR"
49 #define PLOT2D_DEVIATION_LW "DEVIATION_LW"
50 #define PLOT2D_DEVIATION_TS "DEVIATION_TS"
52 struct PLOT2D_EXPORT Plot2d_Point
59 Plot2d_Point( double theX, double theY, const QString& theText = QString() );
61 bool deviation(double& min, double& max) const;
62 bool hasDeviation() const;
63 void setDeviation(double min, double max);
64 void clearDeviation();
65 bool minDeviation(double& min) const;
66 bool maxDeviation(double& max) const;
69 typedef QList<Plot2d_Point> pointList;
95 QwtSymbol::Style plot2qwtMarker( MarkerType );
96 MarkerType qwt2plotMarker( QwtSymbol::Style );
98 Qt::PenStyle plot2qwtLine( LineType );
99 LineType qwt2plotLine( Qt::PenStyle );
101 void drawLine( QPainter*, const QPoint&, const QPoint&,
102 Qt::PenStyle = Qt::SolidLine,
103 const QColor& = Qt::black, int = 0 );
104 void drawLine( QPainter*, const QPoint&, const QPoint&,
106 const QColor& = Qt::black, int = 0 );
107 void drawLine( QPainter*, int, int, int, int,
108 Qt::PenStyle = Qt::SolidLine,
109 const QColor& = Qt::black, int = 0 );
110 void drawLine( QPainter*, int, int, int, int,
112 const QColor& = Qt::black, int = 0 );
114 void drawMarker( QPainter*, const QPoint&, const QRect&,
115 QwtSymbol::Style = QwtSymbol::Ellipse,
116 const QColor& = Qt::black );
117 void drawMarker( QPainter*, const QPoint&, const QRect&,
119 const QColor& = Qt::black );
120 void drawMarker( QPainter*, int, int, int, int,
121 QwtSymbol::Style = QwtSymbol::Ellipse,
122 const QColor& = Qt::black );
123 void drawMarker( QPainter*, int, int, int, int,
125 const QColor& = Qt::black );
127 QPixmap markerIcon( const QSize&, const QColor&,
128 Plot2d::MarkerType );
130 QPixmap lineIcon( const QSize&, const QColor&,
133 void getNextMarker( const int rtti, const QwtPlot*, QwtSymbol::Style&,
134 QColor&, Qt::PenStyle& );
136 bool existMarker( const int rtti , const QwtPlot*, const QwtSymbol::Style,
137 const QColor&, const Qt::PenStyle );
140 bool closeColors( const QColor&,
147 # pragma warning ( disable: 4251 )