Version: 9.16.0
Plot2d_AnalyticalCurve.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22// File : Plot2d_AnalyticalCurve.h
23// Author : Roman NIKOLAEV, Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
24
25#ifndef PLOT2D_ANALYTICAL_CURVE_H
26#define PLOT2D_ANALYTICAL_CURVE_H
27
28#include "Plot2d.h"
29
30
31class QwtPlot;
32class QwtPlotItem;
33class QwtPlotCurve;
34
35
37{
38public:
39
40 /*
41 Action enumeration.
42 */
43 enum {
44 ActAddInView = 0,
47 ActNothing
48 };
49
50 /*
51 State enumeration.
52 */
53 enum {
54 StateOk = 0,
55 StateNeedUpdate
56 };
57
61
63
64 virtual QwtPlotItem* plotItem();
65 virtual void autoFill( const QwtPlot* );
66 virtual void updatePlotItem();
67 virtual bool checkCurve( const QwtPlot* );
68
69 virtual void calculate();
70
71 long getData( double** , double** ) const;
72
73 void setSelected(const bool);
74 bool isSelected() const;
75
76
77
78 void setAutoAssign( bool );
79 bool isAutoAssign( ) const;
80
81 void setColor( const QColor& );
82 QColor getColor() const;
83
84 void setMarker( Plot2d::MarkerType );
85 Plot2d::MarkerType getMarker() const;
86
87 void setMarkerSize( const int );
88 int getMarkerSize() const;
89
90 void setLine( Plot2d::LineType );
91 Plot2d::LineType getLine() const;
92
93 void setLineWidth( const int );
94 int getLineWidth() const;
95
96 void setNbIntervals( const long );
97 long getNbIntervals() const;
98
99 void setRangeBegin( const double );
100 double getRangeBegin() const;
101
102 void setRangeEnd( const double );
103 double getRangeEnd() const;
104
105 void setExpression( const QString& );
106 QString getExpression() const;
107
108 void setName( const QString& );
109 QString getName() const;
110
111 void setActive(const bool);
112 bool isActive() const;
113
114 void setAction(const int);
115 int getAction() const;
116 int state() const;
117
118
119protected:
120
122 QColor myColor;
132 QString myName;
138
139private:
140 static int myNbCurves;
141
142};
143
145
147{
148public:
151 virtual void updateAnalyticalCurve( Plot2d_AnalyticalCurve*, bool = false ) = 0;
152 virtual void updateAnalyticalCurves() = 0;
154};
155
156#endif //PLOT2D_ANALYTICAL_CURVE_H
157
QList< Plot2d_Point > pointList
Definition: Plot2d.h:69
#define PLOT2D_EXPORT
Definition: Plot2d.h:36
QList< Plot2d_AnalyticalCurve * > AnalyticalCurveList
Definition: Plot2d_AnalyticalCurve.h:144
Definition: Plot2d_AnalyticalCurve.h:37
double myRangeEnd
Definition: Plot2d_AnalyticalCurve.h:130
int myLineWidth
Definition: Plot2d_AnalyticalCurve.h:126
int myMarkerSize
Definition: Plot2d_AnalyticalCurve.h:124
@ ActRemoveFromView
Add curve in view.
Definition: Plot2d_AnalyticalCurve.h:45
@ ActUpdateInView
Remove curve from view.
Definition: Plot2d_AnalyticalCurve.h:46
double myRangeBegin
Definition: Plot2d_AnalyticalCurve.h:129
long myNbIntervals
Definition: Plot2d_AnalyticalCurve.h:127
bool myIsSelected
Definition: Plot2d_AnalyticalCurve.h:137
int myState
Definition: Plot2d_AnalyticalCurve.h:134
QwtPlotCurve * myCurve
Definition: Plot2d_AnalyticalCurve.h:135
bool myActive
Definition: Plot2d_AnalyticalCurve.h:136
QColor myColor
Definition: Plot2d_AnalyticalCurve.h:122
bool myAutoAssign
Definition: Plot2d_AnalyticalCurve.h:121
pointList myPoints
Definition: Plot2d_AnalyticalCurve.h:128
QString myExpression
Definition: Plot2d_AnalyticalCurve.h:131
Plot2d::LineType myLine
Definition: Plot2d_AnalyticalCurve.h:125
static int myNbCurves
Definition: Plot2d_AnalyticalCurve.h:140
Plot2d::MarkerType myMarker
Definition: Plot2d_AnalyticalCurve.h:123
QString myName
Definition: Plot2d_AnalyticalCurve.h:132
int myAction
Definition: Plot2d_AnalyticalCurve.h:133
Definition: Plot2d_AnalyticalCurve.h:147
virtual void updateAnalyticalCurves()=0
virtual AnalyticalCurveList getAnalyticalCurves() const =0
virtual void removeAnalyticalCurve(Plot2d_AnalyticalCurve *)=0
virtual void updateAnalyticalCurve(Plot2d_AnalyticalCurve *, bool=false)=0
virtual void addAnalyticalCurve(Plot2d_AnalyticalCurve *)=0
MarkerType
Definition: Plot2d.h:74
LineType
Definition: Plot2d.h:86