]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_CutSegmentDlg.h
Salome HOME
439e62da4c84e30e80652120b00fa5756d066cef
[modules/visu.git] / src / VISUGUI / VisuGUI_CutSegmentDlg.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : VisuGUI_CutSegmentDlg.h
23 //  Author : Oleg UVAROV
24 //  Module : VISU
25 //
26 #ifndef VISUGUI_CUTSEGMENTDLG_H
27 #define VISUGUI_CUTSEGMENTDLG_H
28
29 #include "VisuGUI_CutPlanesDlg.h"
30
31 #include <QCheckBox>
32 #include <QList>
33
34 class QTabWidget;
35
36 class SalomeApp_Module;
37 class VisuGUI_InputPane;
38
39 namespace VISU
40 {
41   class CutSegment_i;
42 }
43
44 class VisuGUI_CutSegmentDlg: public VisuGUI_ScalarBarBaseDlg
45 {
46   Q_OBJECT
47
48 public:
49   VisuGUI_CutSegmentDlg (SalomeApp_Module* theModule);
50   ~VisuGUI_CutSegmentDlg();
51
52   virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
53                                   bool theInit );
54
55   virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
56
57   bool isGenerateTable() { return myCreateTable->isChecked(); }
58   bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); }
59
60 protected:
61   virtual QString GetContextHelpFilePath();
62  
63 protected slots:
64   void accept();
65   void reject();
66
67 private slots:
68   void onPreviewCheck(bool thePreview);
69   void onAllCurvesInvertedCheck(bool theInvert);
70   void onPointModified();
71
72 private:
73   void createPlanes();
74   void deletePlanes();
75   void updateGlyphs(bool update);
76   void updatePoints(bool update);
77
78   QCheckBox* myCreateTable;
79   QCheckBox* myCurvesCheck;
80
81   bool hasInit;
82
83   QList<QtxDoubleSpinBox*> myPoint1;
84   QList<QtxDoubleSpinBox*> myPoint2;
85
86   SALOME::GenericObjPtr<VISU::CutSegment_i> myCutSegment;
87
88   QTabWidget*            myTabBox;
89   VisuGUI_InputPane*     myInputPane;
90
91   SALOME_Actor* myPreviewActor;
92   SALOME_Actor* myPreviewActorGlyphs;
93   SALOME_Actor* myPreviewActorPoints;
94   QCheckBox* myPreviewCheck;
95   QCheckBox* myAllCurvesInvertedCheck;
96   QCheckBox* myUseAbsoluteLengthCheck;
97
98   SALOME::GenericObjPtr<VISU::CutSegment_i> myPrsCopy;
99 };
100
101 #endif // VISUGUI_CUTSEGMENTDLG_H