1 // VISU VISUGUI : GUI of VISU component
3 // Copyright (C) 2003 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
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"
38 class SalomeApp_Module;
39 class VVTK_PrimitiveBox;
41 class VisuGUI_TextPrefDlg;
42 class VisuGUI_InputPane;
45 //! Specific Scalar Bar tab.
46 /*! Uses for set up Gauss Points Scalar Bars preferenses. */
47 class VisuGUI_GaussScalarBarPane : public QVBox
52 VisuGUI_GaussScalarBarPane(QWidget* parent);
53 ~VisuGUI_GaussScalarBarPane() {};
56 void setPosAndSize( double x, double y, double w, double h, bool vert );
57 void setScalarBarData( int colors, int labels );
65 void initFromPrsObject(VISU::GaussPoints_i* thePrs, bool theInit);
66 int storeToPrsObject(VISU::GaussPoints_i* thePrs);
69 QButtonGroup* RangeGroup;
70 QRadioButton* RBFieldRange;
71 QRadioButton* RBImposedRange;
74 SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
82 QtxDblSpinBox* WidthSpin;
83 QtxDblSpinBox* HeightSpin;
84 QtxDblSpinBox* SpacingSpin;
86 QRadioButton* BicolorButton;
87 QRadioButton* RainbowButton;
94 QComboBox* myModeCombo;
95 QPushButton* myTextBtn;
96 QPushButton* myBarBtn;
97 VisuGUI_TextPrefDlg* myTextDlg;
98 VisuGUI_BarPrefDlg* myBarDlg;
99 QRadioButton* myRBLocal;
100 QRadioButton* myRBGlobal;
101 QCheckBox* myCBDisplayed;
104 double myHorX, myHorY, myHorW, myHorH;
105 double myVerX, myVerY, myVerW, myVerH;
106 int myHorTW, myHorTH, myHorLW, myHorLH, myHorBW, myHorBH;
107 int myVerTW, myVerTH, myVerLW, myVerLH, 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 VVTK_PrimitiveBox* myPrimitiveBox;
164 VVTK_SizeBox* mySizeBox;
166 QGroupBox* myDefShapeBox;
167 QtxDblSpinBox* myScaleSpinBox;
169 SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
172 #endif // VISUGUI_GAUSSPOINTSDLS_H