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