1 // Copyright (C) 2007-2008 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
22 // VISU VISUGUI : GUI of VISU component
23 // File : VisuGUI_GaussPointsDlg.h
24 // Author : Oleg UVAROV
27 #ifndef VISUGUI_GAUSSPOINTSDLS_H
28 #define VISUGUI_GAUSSPOINTSDLS_H
30 #include "VisuGUI_Prs3dDlg.h"
31 #include "VISU_GaussPoints_i.hh"
33 class QtxDoubleSpinBox;
35 class SalomeApp_Module;
36 class VVTK_PrimitiveBox;
38 class VisuGUI_TextPrefDlg;
39 class VisuGUI_InputPane;
42 //! Specific Scalar Bar tab.
43 /*! Uses for set up Gauss Points Scalar Bars preferenses. */
44 class VisuGUI_GaussScalarBarPane : public QWidget//QVBox
49 VisuGUI_GaussScalarBarPane(QWidget* parent);
50 ~VisuGUI_GaussScalarBarPane() {};
53 void setPosAndSize( double x, double y, double w, double h, bool vert );
54 void setScalarBarData( int colors, int labels );
62 void initFromPrsObject(VISU::GaussPoints_i* thePrs, bool theInit);
63 int storeToPrsObject(VISU::GaussPoints_i* thePrs);
66 QButtonGroup* RangeGroup;
67 QRadioButton* RBFieldRange;
68 QRadioButton* RBImposedRange;
71 SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
76 QtxDoubleSpinBox* XSpin;
77 QtxDoubleSpinBox* YSpin;
79 QtxDoubleSpinBox* WidthSpin;
80 QtxDoubleSpinBox* HeightSpin;
81 QtxDoubleSpinBox* SpacingSpin;
83 QRadioButton* BicolorButton;
84 QRadioButton* RainbowButton;
91 QComboBox* myModeCombo;
92 QPushButton* myTextBtn;
93 QPushButton* myBarBtn;
94 VisuGUI_TextPrefDlg* myTextDlg;
95 VisuGUI_BarPrefDlg* myBarDlg;
96 QRadioButton* myRBLocal;
97 QRadioButton* myRBGlobal;
98 QCheckBox* myCBDisplayed;
102 double myHorX, myHorY, myHorW, myHorH;
103 double myVerX, myVerY, myVerW, myVerH;
104 int myHorTS, myHorLS, myHorBW, myHorBH;
105 int myVerTS, myVerLS, myVerBW, myVerBH;
107 bool myIsStoreTextProp;
109 bool UseFieldRange( bool theInit = true );
112 void onGlobalScalarBar();
113 void onLocalScalarBar();
115 void fieldRangeClicked();
116 void imposedRangeClicked();
117 void changeScalarMode( int );
119 void changeDefaults( int );
120 void XYChanged( double );
125 //! Create Gauss Points Presentation Dialog.
127 * Uses for set up initial parameters of the Gauss Points
128 * presentation and edit them interactively.
130 class VisuGUI_GaussPointsDlg : public VisuGUI_Prs3dDlg
135 VisuGUI_GaussPointsDlg (SalomeApp_Module* theModule);
136 ~VisuGUI_GaussPointsDlg();
138 //! Initializing dialog from the Gauss Points presentation.
139 virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
142 //! Update Gauss Points presentation using parameters from the dialog.
143 virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
146 virtual QString GetContextHelpFilePath();
149 void onToggleDefShape( bool );
153 QTabWidget* myTabBox;
154 VisuGUI_GaussScalarBarPane* myScalarPane;
155 VisuGUI_InputPane* myInputPane;
157 QRadioButton* myResultsButton;
158 QRadioButton* myGeometryButton;
159 QRadioButton* myDefShapeButton;
161 VVTK_PrimitiveBox* myPrimitiveBox;
162 VVTK_SizeBox* mySizeBox;
164 QGroupBox* myDefShapeBox;
165 QtxDoubleSpinBox* myScaleSpinBox;
167 SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
168 SalomeApp_Module* myModule;
171 #endif // VISUGUI_GAUSSPOINTSDLS_H