1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, 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.
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
23 // VISU VISUGUI : GUI of VISU component
24 // File : VisuGUI_GaussPointsDlg.h
25 // Author : Oleg UVAROV
28 #ifndef VISUGUI_GAUSSPOINTSDLS_H
29 #define VISUGUI_GAUSSPOINTSDLS_H
31 #include "VisuGUI_Prs3dDlg.h"
32 #include "VISU_GaussPoints_i.hh"
34 class SalomeApp_DoubleSpinBox;
36 class SalomeApp_Module;
37 class SalomeApp_IntSpinBox;
38 class VisuGUI_PrimitiveBox;
39 class VisuGUI_SizeBox;
40 class VisuGUI_TextPrefDlg;
41 class VisuGUI_InputPane;
44 //! Specific Scalar Bar tab.
45 /*! Uses for set up Gauss Points Scalar Bars preferenses. */
46 class VisuGUI_GaussScalarBarPane : public QWidget//QVBox
51 VisuGUI_GaussScalarBarPane(QWidget* parent);
52 ~VisuGUI_GaussScalarBarPane() {};
55 void setPosAndSize( double x, double y, double w, double h, bool vert );
56 void setScalarBarData( int colors, int labels );
64 void initFromPrsObject(VISU::GaussPoints_i* thePrs, bool theInit);
65 int storeToPrsObject(VISU::GaussPoints_i* thePrs);
68 QButtonGroup* RangeGroup;
69 QRadioButton* RBFieldRange;
70 QRadioButton* RBImposedRange;
73 SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
78 SalomeApp_DoubleSpinBox* XSpin;
79 SalomeApp_DoubleSpinBox* YSpin;
81 SalomeApp_DoubleSpinBox* WidthSpin;
82 SalomeApp_DoubleSpinBox* HeightSpin;
83 SalomeApp_DoubleSpinBox* SpacingSpin;
85 QRadioButton* BicolorButton;
86 QRadioButton* RainbowButton;
88 SalomeApp_IntSpinBox* ColorSpin;
90 SalomeApp_IntSpinBox* LabelSpin;
93 QComboBox* myModeCombo;
94 QPushButton* myTextBtn;
95 QPushButton* myBarBtn;
96 VisuGUI_TextPrefDlg* myTextDlg;
97 VisuGUI_BarPrefDlg* myBarDlg;
98 QRadioButton* myRBLocal;
99 QRadioButton* myRBGlobal;
100 QCheckBox* myCBDisplayed;
101 QCheckBox* myHideBar;
104 double myHorX, myHorY, myHorW, myHorH;
105 double myVerX, myVerY, myVerW, myVerH;
106 int myHorTS, myHorLS, myHorBW, myHorBH;
107 int myVerTS, myVerLS, myVerBW, myVerBH;
109 bool myIsStoreTextProp;
111 bool UseFieldRange( bool theInit = true );
114 void onGlobalScalarBar();
115 void onLocalScalarBar();
117 void fieldRangeClicked();
118 void imposedRangeClicked();
119 void changeScalarMode( int );
121 void changeDefaults( int );
122 void XYChanged( double );
127 //! Create Gauss Points Presentation Dialog.
129 * Uses for set up initial parameters of the Gauss Points
130 * presentation and edit them interactively.
132 class VisuGUI_GaussPointsDlg : public VisuGUI_Prs3dDlg
137 VisuGUI_GaussPointsDlg (SalomeApp_Module* theModule);
138 ~VisuGUI_GaussPointsDlg();
140 //! Initializing dialog from the Gauss Points presentation.
141 virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
144 //! Update Gauss Points presentation using parameters from the dialog.
145 virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
148 virtual QString GetContextHelpFilePath();
151 void onToggleDefShape( bool );
155 QTabWidget* myTabBox;
156 VisuGUI_GaussScalarBarPane* myScalarPane;
157 VisuGUI_InputPane* myInputPane;
159 QRadioButton* myResultsButton;
160 QRadioButton* myGeometryButton;
161 QRadioButton* myDefShapeButton;
163 VisuGUI_PrimitiveBox* myPrimitiveBox;
164 VisuGUI_SizeBox* mySizeBox;
166 QGroupBox* myDefShapeBox;
167 SalomeApp_DoubleSpinBox* myScaleSpinBox;
169 SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
170 SalomeApp_Module* myModule;
173 #endif // VISUGUI_GAUSSPOINTSDLS_H