1 // Copyright (C) 2007-2023 CEA, EDF, 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
22 // File : Plot2d_AnalyticalCurveDlg.h
23 // Author : Roman NIKOLAEV, Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
26 #ifndef PLOT2D_ANALYTICAL_CURVE_DLG_H
27 #define PLOT2D_ANALYTICAL_CURVE_DLG_H
30 #include "Plot2d_AnalyticalCurve.h"
36 class QListWidgetItem;
47 class Plot2d_AnalyticalCurve;
48 class Plot2d_CurveContainer;
49 class Plot2d_ViewFrame;
51 class PLOT2D_EXPORT Plot2d_AnalyticalCurveDlg : public QDialog
58 enum { ItemExisting, ItemAdded, ItemRemoved };
61 Plot2d_AnalyticalCurveDlg( Plot2d_CurveContainer*, QWidget* );
62 ~Plot2d_AnalyticalCurveDlg();
70 void initPropsFromCurve(Plot2d_AnalyticalCurve*);
71 QListWidgetItem* selected() const;
72 Plot2d_AnalyticalCurve* selectedCurve() const;
73 QListWidgetItem* getItem(Plot2d_AnalyticalCurve*) const;
76 int propStatus( Plot2d_AnalyticalCurve* = 0, const int def = ItemExisting );
77 QString propTitle( Plot2d_AnalyticalCurve* = 0, const QString& def = "" );
78 bool propVisible( Plot2d_AnalyticalCurve* = 0, bool def = true );
79 QString propFormula( Plot2d_AnalyticalCurve* = 0, const QString& def = "" );
80 int propIntervals( Plot2d_AnalyticalCurve* = 0, int def = 100 );
81 Plot2d::MarkerType propMarkerType( Plot2d_AnalyticalCurve* = 0, Plot2d::MarkerType def = Plot2d::None );
82 Plot2d::LineType propLineType( Plot2d_AnalyticalCurve* = 0, Plot2d::LineType def = Plot2d::NoPen );
83 int propLineWidth( Plot2d_AnalyticalCurve* = 0, int def = 0 );
84 QColor propColor( Plot2d_AnalyticalCurve* = 0, const QColor& def = QColor() );
85 bool propAutoAssign( Plot2d_AnalyticalCurve* = 0, bool def = true );
92 void selectionChanged();
97 typedef QMap <QString, QVariant> CurveProps;
98 typedef QMap <Plot2d_AnalyticalCurve*, CurveProps> PropMap;
100 Plot2d_CurveContainer* myContainer;
101 PropMap myProperties;
104 QListWidget* myCurvesList;
105 QGroupBox* myCurveParams;
106 QLineEdit* myFormula;
107 QtxIntSpinBox* myNbIntervals;
108 QGroupBox* myCurveProps;
109 QCheckBox* myAutoAssign;
111 QComboBox* myMarkerType;
112 QComboBox* myLineType;
113 QtxIntSpinBox* myLineWidth;
114 QtxColorButton* myColor;
115 QPushButton* myAddButton;
116 QPushButton* myRemoveButton;
119 class Plot2d_AnalyticalCurveDlg::Updater : public QObject
123 Updater( QWidget* parent );
129 #endif //PLOT2D_ANALYTICAL_CURVE_DLG_H