00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef PLOT2D_H
00027 #define PLOT2D_H
00028
00029 #ifdef WIN32
00030 # if defined PLOT2D_EXPORTS || defined Plot2d_EXPORTS
00031 # define PLOT2D_EXPORT __declspec(dllexport)
00032 # else
00033 # define PLOT2D_EXPORT __declspec(dllimport)
00034 # endif
00035 #else
00036 # define PLOT2D_EXPORT
00037 #endif
00038
00039 #include <qwt_symbol.h>
00040 #include <Qt>
00041
00042 class QPainter;
00043
00044 namespace Plot2d
00045 {
00046 typedef enum { None,
00047 Circle,
00048 Rectangle,
00049 Diamond,
00050 DTriangle,
00051 UTriangle,
00052 LTriangle,
00053 RTriangle,
00054 Cross,
00055 XCross
00056 } MarkerType;
00057
00058 typedef enum {
00059 NoPen,
00060 Solid,
00061 Dash,
00062 Dot,
00063 DashDot,
00064 DashDotDot
00065 } LineType;
00066
00067 QwtSymbol::Style plot2qwtMarker( MarkerType );
00068 MarkerType qwt2plotMarker( QwtSymbol::Style );
00069
00070 Qt::PenStyle plot2qwtLine( LineType );
00071 LineType qwt2plotLine( Qt::PenStyle );
00072
00073 void drawLine( QPainter*, const QPoint&, const QPoint&,
00074 Qt::PenStyle = Qt::SolidLine,
00075 const QColor& = Qt::black, int = 0 );
00076 void drawLine( QPainter*, const QPoint&, const QPoint&,
00077 LineType = Solid,
00078 const QColor& = Qt::black, int = 0 );
00079 void drawLine( QPainter*, int, int, int, int,
00080 Qt::PenStyle = Qt::SolidLine,
00081 const QColor& = Qt::black, int = 0 );
00082 void drawLine( QPainter*, int, int, int, int,
00083 LineType = Solid,
00084 const QColor& = Qt::black, int = 0 );
00085
00086 void drawMarker( QPainter*, const QPoint&, const QRect&,
00087 QwtSymbol::Style = QwtSymbol::Ellipse,
00088 const QColor& = Qt::black );
00089 void drawMarker( QPainter*, const QPoint&, const QRect&,
00090 MarkerType = Circle,
00091 const QColor& = Qt::black );
00092 void drawMarker( QPainter*, int, int, int, int,
00093 QwtSymbol::Style = QwtSymbol::Ellipse,
00094 const QColor& = Qt::black );
00095 void drawMarker( QPainter*, int, int, int, int,
00096 MarkerType = Circle,
00097 const QColor& = Qt::black );
00098 }
00099
00100 #if defined WIN32
00101 # pragma warning ( disable: 4251 )
00102 #endif
00103
00104 #endif // PLOT2D_H