Salome HOME
d9f3d9b95f937042b4f5ad08dd28b9787b03e505
[modules/visu.git] / src / VISUGUI / VisuGUI_CutLinesDlg.h
1 //  VISU VISUGUI : GUI of VISU component
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : VisuGUI_CutLinesDlg.h
8 //  Author : VSV
9 //  Module : VISU
10
11 #ifndef VISUGUI_CUTLINESDLG_H
12 #define VISUGUI_CUTLINESDLG_H
13
14 #include "VisuGUI_CutPlanesDlg.h"
15
16 #include <qhbuttongroup.h>
17 #include <qvalidator.h>
18
19 namespace VISU{
20   class CutLines_i;
21 }
22
23 class VisuGUI_CutLinesDlg: public QDialog
24 {
25     Q_OBJECT
26
27 public:
28     VisuGUI_CutLinesDlg(bool theIsCreation);
29     ~VisuGUI_CutLinesDlg();
30
31     void initFromPrsObject(VISU::CutLines_i* thePrs);
32     int storeToPrsObject(VISU::CutLines_i* thePrs);
33
34     bool isGenerateTable() { return myCreateTable->isChecked(); }
35     bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); }
36
37 protected slots:
38   void accept();
39   void reject();
40
41 private slots:
42   void onPlaneSelect(int theId);
43   void onCutSelect(int theId, bool theUpdate = true);
44   void setBaseDefault(bool theUpdate = true);
45   void setDefault( int all = -1);
46   void DrawTable();
47   void onValueChanged(int theRow, int theCol);
48   void onPreviewCheck(bool thePreview);
49   void onRotation(double theValue);
50   void onPlanePos(const QString& theValue);
51   void onFrameActivated(QAD_StudyFrame* );
52
53 private:
54   void createPlanes();
55   void deletePlanes();
56
57
58   QHButtonGroup* mySelPlane;
59   QAD_SpinBoxDbl* myRotXSpn;
60   QAD_SpinBoxDbl* myRotYSpn;
61   QLabel* myRotXLbl;
62   QLabel* myRotYLbl;
63   QAD_SpinBoxDbl* myPosSpn;
64   QLineEdit* myBasePlanePos;
65   QCheckBox* myCBSetDef;
66   QCheckBox* myCreateTable;
67   QCheckBox* myCurvesCheck;
68
69   QHButtonGroup* mySelPlane2;  
70   QAD_SpinBoxDbl* myNbSpn;
71   QAD_SpinBoxDbl* myRotXSpn2;
72   QAD_SpinBoxDbl* myRotYSpn2;
73   QLabel* myRotXLbl2;
74   QLabel* myRotYLbl2;
75   QAD_SpinBoxDbl* myPosSpn2;
76   QTable* myPosTable;
77   bool hasInit;
78
79   QDoubleValidator *mydvalidator;
80   VISU::CutLines_i* myCutLines;
81
82   VisuGUI_ScalarBarPane* myScalarPane;
83
84   VISU::CutPlanes::Orientation  getOrientaion(bool IsBasePlane = true);
85   void   setOrientation( const VISU::CutPlanes::Orientation orient);
86   void   setOrientation2( const VISU::CutPlanes::Orientation orient);
87  
88   SALOME_Actor* myPreviewActor;
89   QCheckBox* myPreviewCheck;
90   
91   VISU::CutLines_i* myPrs;
92
93   QAD_Study *myStudy;
94   QAD_StudyFrame *myStudyFrame;
95
96   bool myIsCreation;
97
98   static bool MYGenerateTable;
99   static bool MYGenerateCurve;
100 };
101 #endif // VISUGUI_CUTLINESDLG_H
102