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