1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : Plot2d_Curve.h
6 // Author : Vadim SANDLER
10 #ifndef Plot2d_Curve_h
11 #define Plot2d_Curve_h
15 #include <qmemarray.h>
16 #ifndef _Handle_SALOME_InteractiveObject_HeaderFile
17 #include <Handle_SALOME_InteractiveObject.hxx>
19 #include "SALOME_InteractiveObject.hxx"
21 typedef QMemArray<double> DoubleArray;
26 enum MarkerType { None, Circle, Rectangle, Diamond,
27 DTriangle, UTriangle, LTriangle, RTriangle,
29 enum LineType { NoPen, Solid, Dash, Dot, DashDot, DashDotDot };
33 Plot2d_Curve( const Plot2d_Curve& curve );
34 Plot2d_Curve& operator= ( const Plot2d_Curve& curve );
36 void setHorTitle( const QString& title );
37 QString getHorTitle() const;
38 void setVerTitle( const QString& title );
39 QString getVerTitle() const;
40 void setHorUnits( const QString& units );
41 QString getHorUnits() const;
42 void setVerUnits( const QString& units );
43 QString getVerUnits() const;
44 void setData( const double* hData, const double* vData, long size );
45 double* horData() const;
46 double* verData() const;
47 long nbPoints() const;
50 void setAutoAssign( bool on );
51 bool isAutoAssign() const;
52 void setColor( const QColor color );
53 QColor getColor() const;
54 void setMarker( MarkerType marker );
55 MarkerType getMarker() const;
56 void setLine( LineType line, const int lineWidth = 0 );
57 LineType getLine() const;
58 int getLineWidth() const;
60 virtual bool hasIO() { return !myIO.IsNull(); }
61 virtual Handle(SALOME_InteractiveObject) getIO() { return myIO; }
62 virtual void setIO( const Handle(SALOME_InteractiveObject)& io ) { myIO = io; }
64 virtual bool hasTableIO() { return !myTableIO.IsNull(); }
65 virtual Handle(SALOME_InteractiveObject) getTableIO() { return myTableIO; }
66 virtual void setTableIO( const Handle(SALOME_InteractiveObject)& io ) { myTableIO = io; }
69 Handle(SALOME_InteractiveObject) myIO;
70 Handle(SALOME_InteractiveObject) myTableIO;
81 DoubleArray myHorData;
82 DoubleArray myVerData;
85 #endif // Plot2d_Curve_h