]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_CutLinesDlg.h
Salome HOME
596798bd7ea83ffd45c9a51f1b5d9db0d613464e
[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
32 class SUIT_ViewManager;
33 class SalomeApp_Module;
34
35 namespace VISU{
36   class CutLines_i;
37 }
38
39 class VisuGUI_CutLinesDlg: public QDialog
40 {
41     Q_OBJECT
42
43 public:
44     VisuGUI_CutLinesDlg (SalomeApp_Module* theModule);
45     ~VisuGUI_CutLinesDlg();
46
47     void initFromPrsObject (VISU::CutLines_i* thePrs);
48     int  storeToPrsObject (VISU::CutLines_i* thePrs);
49
50     bool isGenerateTable() { return myCreateTable->isChecked(); }
51     bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); }
52
53 protected slots:
54   void accept();
55   void reject();
56
57 private slots:
58   void onPlaneSelect (int theId);
59   void onCutSelect (int theId, bool theUpdate = true);
60   void setBaseDefault (bool theUpdate = true);
61   void setDefault (int all = -1);
62   void DrawTable();
63   void onValueChanged (int theRow, int theCol);
64   void onPreviewCheck (bool thePreview);
65   void onAllCurvesInvertedCheck(bool theInvert);
66   void onRotation (double theValue);
67   void onPlanePos (const QString& theValue);
68   void onHelp();
69   //jfa tmp:void onWindowActivated (SUIT_ViewWindow*);
70
71 private:
72   void createPlanes();
73   void deletePlanes();
74   void updateGlyphs(bool update);
75
76   QHButtonGroup* mySelPlane;
77   QtxDblSpinBox* myRotXSpn;
78   QtxDblSpinBox* myRotYSpn;
79   QLabel* myRotXLbl;
80   QLabel* myRotYLbl;
81   QtxDblSpinBox* myPosSpn;
82   QLineEdit* myBasePlanePos;
83   QCheckBox* myCBSetDef;
84   QCheckBox* myCreateTable;
85   QCheckBox* myCurvesCheck;
86
87   QHButtonGroup* mySelPlane2;
88   QtxDblSpinBox* myNbSpn;
89   QtxDblSpinBox* myRotXSpn2;
90   QtxDblSpinBox* myRotYSpn2;
91   QLabel* myRotXLbl2;
92   QLabel* myRotYLbl2;
93   QtxDblSpinBox* myPosSpn2;
94   QTable* myPosTable;
95   bool hasInit;
96
97   QDoubleValidator *mydvalidator;
98   VISU::CutLines_i* myCutLines;
99
100   VisuGUI_ScalarBarPane* myScalarPane;
101
102   VISU::CutPlanes::Orientation getOrientaion (bool IsBasePlane = true);
103   void setOrientation (const VISU::CutPlanes::Orientation orient);
104   void setOrientation2 (const VISU::CutPlanes::Orientation orient);
105
106   SALOME_Actor* myPreviewActor;
107   SALOME_Actor* myPreviewActorGlyphs;
108   QCheckBox* myPreviewCheck;
109   QCheckBox* myAllCurvesInvertedCheck;
110
111   VISU::CutLines_i* myPrs;
112
113   //jfa tmp:SUIT_ViewManager *myMgr;
114   //jfa tmp:SUIT_ViewWindow *myStudyWnd;
115
116   static bool MYGenerateTable;
117   static bool MYGenerateCurve;
118 };
119
120 #endif // VISUGUI_CUTLINESDLG_H