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_ScalarBarDlg.h"
35 #include <qgroupbox.h>
36 #include <qcheckbox.h>
38 #include <qpushbutton.h>
39 #include <qlineedit.h>
40 #include <qbuttongroup.h>
41 #include <qradiobutton.h>
43 #include <qcombobox.h>
44 #include <qtoolbutton.h>
46 class SalomeApp_Module;
47 class VVTK_PrimitiveBox;
49 class VisuGUI_TextPrefDlg;
56 //! Specific Scalar Bar tab.
57 /*! Uses for set up Gauss Points Scalar Bars preferenses. */
58 class VisuGUI_GaussScalarBarPane : public QVBox
63 VisuGUI_GaussScalarBarPane(QWidget* parent, bool SetPref);
64 ~VisuGUI_GaussScalarBarPane() {};
67 void setPosAndSize( double x, double y, double w, double h, bool vert );
68 double getX() {return XSpin->value();}
69 double getY() {return YSpin->value();}
70 double getWidth() {return WidthSpin->value();}
71 double getHeight() {return HeightSpin->value();}
72 void setScalarBarData( int colors, int labels );
73 int getNbColors() {return ColorSpin->value();}
74 int getNbLabels() {return LabelSpin->value();}
75 bool isToSave() {return CBSave ? CBSave->isChecked() : false;}
77 void initFromPrsObject(VISU::GaussPoints_i* thePrs);
78 int storeToPrsObject(VISU::GaussPoints_i* thePrs);
81 QButtonGroup* RangeGroup;
89 QtxDblSpinBox* WidthSpin;
90 QtxDblSpinBox* HeightSpin;
91 QtxDblSpinBox* SpacingSpin;
93 QRadioButton* BicolorButton;
94 QRadioButton* RainbowButton;
102 QComboBox* myModeCombo;
103 QPushButton* myTextBtn;
104 VisuGUI_TextPrefDlg* myTextDlg;
105 QRadioButton* myRBLocal;
106 QRadioButton* myRBGlobal;
107 QCheckBox* myCBDisplayed;
110 double myHorX, myHorY, myHorW, myHorH;
111 double myVerX, myVerY, myVerW, myVerH;
113 bool myIsStoreTextProp;
116 void changeDefaults( int );
117 void changeRange( int );
118 void XYChanged( double );
120 void onSetDisplayGlobal();
123 //! Create Gauss Points Presentation Dialog.
125 * Uses for set up initial parameters of the Gauss Points
126 * presentation and edit them interactively.
128 class VisuGUI_GaussPointsDlg : public QDialog
133 VisuGUI_GaussPointsDlg (SalomeApp_Module* theModule, bool SetPref = FALSE);
134 ~VisuGUI_GaussPointsDlg() {}
136 //! Initializing dialog from the Gauss Points presentation.
137 void initFromPrsObject(VISU::GaussPoints_i* thePrs);
139 //! Update Gauss Points presentation using parameters from the dialog.
140 int storeToPrsObject(VISU::GaussPoints_i* thePrs);
143 void onToggleDefShape( bool );
149 VISU::GaussPoints_i* myPrs;
150 VisuGUI_GaussScalarBarPane* myScalarPane;
152 QRadioButton* myResultsButton;
153 QRadioButton* myGeometryButton;
154 QRadioButton* myDefShapeButton;
156 VVTK_PrimitiveBox* myPrimitiveBox;
157 VVTK_SizeBox* mySizeBox;
159 QGroupBox* myDefShapeBox;
160 QtxDblSpinBox* myScaleSpinBox;
163 #endif // VISUGUI_GAUSSPOINTSDLS_H