1 // Copyright (C) 2016-2021 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef WIDGET_PRESENTATION_PARAMETERS_HXX
21 #define WIDGET_PRESENTATION_PARAMETERS_HXX
23 #include "MEDCALCGUIdialogs.hxx"
25 #include "ui_WidgetPresentationParameters.h"
27 #include <SALOMEconfig.h>
28 #include CORBA_SERVER_HEADER(MEDPresentationManager)
34 class MEDCALCGUI_DIALOGS_EXPORT WidgetPresentationParameters : public QWidget
39 WidgetPresentationParameters(QWidget* parent = 0);
40 virtual ~WidgetPresentationParameters() {}
42 std::string getComponent() const;
43 void setComponents(std::vector<std::string> compos, int selecIndex);
45 MEDCALC::MeshModeType getMeshMode() const;
46 void setMeshMode(MEDCALC::MeshModeType mode);
48 MEDCALC::ScalarBarRangeType getScalarBarRange() const;
49 void setScalarBarRange(MEDCALC::ScalarBarRangeType);
51 MEDCALC::IntegrationDirType getIntegrationDir() const;
52 void setIntegrationDir(MEDCALC::IntegrationDirType);
54 std::string getContourComponent() const;
55 void setContourComponents(std::vector<std::string> compos, int selecIndex);
57 bool getScalarBarVisibility() const;
58 void setScalarBarVisibility(const bool);
60 bool getHideDataOutsideCustomRange() const;
61 void setHideDataOutsideCustomRange(const bool);
63 void getScalarBarRangeValue( double* ) const;
64 void setScalarBarRangeValue(const double, const double);
66 double getScaleFactor() { return _ui.spinScaleFactor->value(); }
67 void setScaleFactor(double);
69 bool getScaleFactorFlag() { return _ui.checkBoxScaleFactor->isChecked(); }
70 void setScaleFactorFlag(const bool);
72 void getNormal( double * ) const;
73 void setNormal(const double, const double, const double);
75 void getCutPoint1( double *) const;
76 void setCutPoint1(const double, const double, const double);
77 void getCutPoint2( double *) const;
78 void setCutPoint2(const double, const double, const double);
81 void hideContourComponent();
83 double getPlanePosition() const;
84 void setPlanePosition( double );
86 // double getScalarBarTimestep() const;
87 // double getScalarBarMinVal() const;
88 // double getScalarBarMaxVal() const;
89 MEDCALC::ColorMapType getColorMap() const;
90 void setColorMap(MEDCALC::ColorMapType);
92 void setPresName(const std::string& name);
94 int getNbContour() const;
95 void setNbContour(int nbContour);
97 int getNbSlices() const;
98 void setNbSlices(int nbSlices);
100 MEDCALC::SliceOrientationType getSliceOrientation() const;
101 void setSliceOrientation(MEDCALC::SliceOrientationType orient);
103 void toggleWidget(bool show);
104 bool isShown() const;
106 void toggleCommonFieldWidget(bool show);
108 QComboBox* getRangeComboBox() { return _ui.comboBoxScalarBarRange; }
109 double getMixCustomRange() { return _ui.spinCustomRangeMin->value(); }
110 double getMaxCustomRange() { return _ui.spinCustomRangeMax->value(); }
113 void comboScalarBarRangeIndexChanged(int);
114 void comboColorMapIndexChanged(int);
115 void comboCompoIndexChanged(int);
116 void comboOrientIndexChanged(int);
117 void comboMeshIndexChanged(int);
118 void comboIntegrDirIndexChanged(int);
119 void comboContCompIndexChanged(int);
120 void spinBoxValueChanged(int);
121 void spinNormalValuesChanged(double, double, double);
122 void spinCutPoint1ValuesChanged(double, double, double);
123 void spinCutPoint2ValuesChanged(double, double, double);
124 void spinPlanePosValueChanged(double);
125 void checkboxScalarBarVisibilityChanged(int);
126 void checkboxCustomRangeChanged(int);
127 void checkboxScaleFactorChanged(int);
128 void spinboxCustomRangeChanged(double, double);
129 void spinboxScaleFactorChaged(double);
130 void checkboxCustomScaleFactorChanged(int);
131 void checkboxHideDataOutsideCustomRangeChanged(int);
135 void onComboScalarBarRangeIndexChanged(int);
136 void onComboColorMapIndexChanged(int);
137 void onComboCompoIndexChanged(int);
138 void onComboOrientIndexChanged(int);
139 void onComboMeshIndexChanged(int);
140 void onComboIntegrDirIndexChanged(int);
141 void onComboContCompIndexChanged(int);
142 void onSpinBoxEditingFinished();
143 void onSpinNormalEditingFinished();
144 void onSpinCutPoint1EditingFinished();
145 void onSpinCutPoint2EditingFinished();
146 void onSpinPlanePosEditingFinished();
147 void onCheckboxScalarBarVisibilityChanged(int);
148 void onCheckboxCustomRangeChanged(int);
149 void onCheckboxScaleFactorChanged(int);
150 void onSpinboxCustomRangeChanged();
151 void onSpinboxScaleFactorChanged();
152 void onCheckboxCustomScaleFactorChanged(int);
153 void onCheckboxHideDataOutsideCustomRangeChanged(int);
155 Ui_WidgetPresentationParameters _ui; // instancte of the class defined in ui_WidgetPresentationParameters.h