]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_CutLinesDlg.h
Salome HOME
IPAL9620: SIGSEGV on attempt to set properties of Cut Planes during animation setup
[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 onRotation (double theValue);
53   void onPlanePos (const QString& theValue);
54   //jfa tmp:void onWindowActivated (SUIT_ViewWindow*);
55
56 private:
57   void createPlanes();
58   void deletePlanes();
59
60   QHButtonGroup* mySelPlane;
61   QtxDblSpinBox* myRotXSpn;
62   QtxDblSpinBox* myRotYSpn;
63   QLabel* myRotXLbl;
64   QLabel* myRotYLbl;
65   QtxDblSpinBox* myPosSpn;
66   QLineEdit* myBasePlanePos;
67   QCheckBox* myCBSetDef;
68   QCheckBox* myCreateTable;
69   QCheckBox* myCurvesCheck;
70
71   QHButtonGroup* mySelPlane2;
72   QtxDblSpinBox* myNbSpn;
73   QtxDblSpinBox* myRotXSpn2;
74   QtxDblSpinBox* myRotYSpn2;
75   QLabel* myRotXLbl2;
76   QLabel* myRotYLbl2;
77   QtxDblSpinBox* myPosSpn2;
78   QTable* myPosTable;
79   bool hasInit;
80
81   QDoubleValidator *mydvalidator;
82   VISU::CutLines_i* myCutLines;
83
84   VisuGUI_ScalarBarPane* myScalarPane;
85
86   VISU::CutPlanes::Orientation getOrientaion (bool IsBasePlane = true);
87   void setOrientation (const VISU::CutPlanes::Orientation orient);
88   void setOrientation2 (const VISU::CutPlanes::Orientation orient);
89
90   SALOME_Actor* myPreviewActor;
91   QCheckBox* myPreviewCheck;
92
93   VISU::CutLines_i* myPrs;
94
95   //jfa tmp:SUIT_ViewManager *myMgr;
96   //jfa tmp:SUIT_ViewWindow *myStudyWnd;
97
98   static bool MYGenerateTable;
99   static bool MYGenerateCurve;
100 };
101
102 #endif // VISUGUI_CUTLINESDLG_H