]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_CutLinesDlg.h
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISUGUI / VisuGUI_CutLinesDlg.h
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : VisuGUI_CutLinesDlg.h
21 //  Author : VSV
22 //  Module : VISU
23
24 #ifndef VISUGUI_CUTLINESDLG_H
25 #define VISUGUI_CUTLINESDLG_H
26
27 #include "VisuGUI_CutPlanesDlg.h"
28
29 #include <qhbuttongroup.h>
30 #include <qvalidator.h>
31 #include <qtabwidget.h>
32 #include <qcheckbox.h>
33
34 class QLineEdit;
35
36 class SUIT_ViewManager;
37 class SalomeApp_Module;
38 class VisuGUI_InputPane;
39
40 namespace VISU
41 {
42   class CutLines_i;
43 }
44
45 class VisuGUI_CutLinesDlg: public VisuGUI_ScalarBarBaseDlg
46 {
47     Q_OBJECT
48
49 public:
50     VisuGUI_CutLinesDlg (SalomeApp_Module* theModule);
51     ~VisuGUI_CutLinesDlg();
52
53     virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
54                                     bool theInit );
55
56     virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
57
58     bool isGenerateTable() { return myCreateTable->isChecked(); }
59     bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); }
60
61 protected:
62   virtual QString GetContextHelpFilePath();
63  
64 protected slots:
65   void accept();
66   void reject();
67
68 private slots:
69   void onPlaneSelect (int theId);
70   void onCutSelect (int theId, bool theUpdate = true);
71   void setBaseDefault (bool theUpdate = true);
72   void setDefault (int all = -1);
73   void DrawTable();
74   void onValueChanged (int theRow, int theCol);
75   void onPreviewCheck (bool thePreview);
76   void onAllCurvesInvertedCheck(bool theInvert);
77   void onRotation (double theValue);
78   void onPlanePos (const QString& theValue);
79
80 private:
81   void createPlanes();
82   void deletePlanes();
83   void updateGlyphs(bool update);
84
85   QHButtonGroup* mySelPlane;
86   QtxDblSpinBox* myRotXSpn;
87   QtxDblSpinBox* myRotYSpn;
88   QLabel* myRotXLbl;
89   QLabel* myRotYLbl;
90   QtxDblSpinBox* myPosSpn;
91   QLineEdit* myBasePlanePos;
92   QCheckBox* myCBSetDef;
93   QCheckBox* myCreateTable;
94   QCheckBox* myCurvesCheck;
95
96   QHButtonGroup* mySelPlane2;
97   QtxDblSpinBox* myNbSpn;
98   QtxDblSpinBox* myRotXSpn2;
99   QtxDblSpinBox* myRotYSpn2;
100   QLabel* myRotXLbl2;
101   QLabel* myRotYLbl2;
102   QtxDblSpinBox* myPosSpn2;
103   QTable* myPosTable;
104   bool hasInit;
105
106   QDoubleValidator *mydvalidator;
107   SALOME::GenericObjPtr<VISU::CutLines_i> myCutLines;
108
109   QTabWidget*            myTabBox;
110   VisuGUI_InputPane*     myInputPane;
111
112   VISU::CutPlanes::Orientation getOrientaion (bool IsBasePlane = true);
113   void setOrientation (const VISU::CutPlanes::Orientation orient);
114   void setOrientation2 (const VISU::CutPlanes::Orientation orient);
115
116   SALOME_Actor* myPreviewActor;
117   SALOME_Actor* myPreviewActorGlyphs;
118   QCheckBox* myPreviewCheck;
119   QCheckBox* myAllCurvesInvertedCheck;
120   QCheckBox* myUseAbsoluteLengthCheck;
121
122   SALOME::GenericObjPtr<VISU::CutLines_i> myPrsCopy;
123 };
124
125 #endif // VISUGUI_CUTLINESDLG_H