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