1 // File : Plot2d_Curve.h
2 // Created : UI team, 05.09.00
3 // Descrip : Curve class
5 // Modified : Mon Dec 03 15:37:21 2001
6 // Author : Vadim SANDLER
9 // Copyright : Open CASCADE 2001
12 #ifndef Plot2d_Curve_h
13 #define Plot2d_Curve_h
17 #include <qmemarray.h>
18 #ifndef _Handle_SALOME_InteractiveObject_HeaderFile
19 #include <Handle_SALOME_InteractiveObject.hxx>
21 #include "SALOME_InteractiveObject.hxx"
23 typedef QMemArray<double> DoubleArray;
28 enum MarkerType { None, Circle, Rectangle, Diamond,
29 DTriangle, UTriangle, LTriangle, RTriangle,
31 enum LineType { NoPen, Solid, Dash, Dot, DashDot, DashDotDot };
35 Plot2d_Curve( const Plot2d_Curve& curve );
36 Plot2d_Curve& operator= ( const Plot2d_Curve& curve );
38 void setHorTitle( const QString& title );
39 QString getHorTitle() const;
40 void setVerTitle( const QString& title );
41 QString getVerTitle() const;
42 void setHorUnits( const QString& units );
43 QString getHorUnits() const;
44 void setVerUnits( const QString& units );
45 QString getVerUnits() const;
46 void setData( const double* hData, const double* vData, long size );
47 double* horData() const;
48 double* verData() const;
49 long nbPoints() const;
52 void setAutoAssign( bool on );
53 bool isAutoAssign() const;
54 void setColor( const QColor color );
55 QColor getColor() const;
56 void setMarker( MarkerType marker );
57 MarkerType getMarker() const;
58 void setLine( LineType line, const int lineWidth = 0 );
59 LineType getLine() const;
60 int getLineWidth() const;
62 virtual bool hasIO() { return !myIO.IsNull(); }
63 virtual Handle(SALOME_InteractiveObject) getIO() { return myIO; }
64 virtual void setIO( const Handle(SALOME_InteractiveObject)& io ) { myIO = io; }
67 Handle(SALOME_InteractiveObject) myIO;
78 DoubleArray myHorData;
79 DoubleArray myVerData;
82 #endif // Plot2d_Curve_h