Salome HOME
Bug IPAL21228 SIGSEGV on exit from Salome with active GaussPointsDlg
[modules/visu.git] / src / VISUGUI / VisuGUI_InputPane.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 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VisuGUI_InputPane.h
24 //  Author : Oleg UVAROV
25 //  Module : VISU
26 //
27 #ifndef VISUGUI_INPUTPANE_H
28 #define VISUGUI_INPUTPANE_H
29
30 #include "VISUConfig.hh"
31
32 #include "SALOME_ListIO.hxx"
33
34 #include <QGroupBox>
35
36 class QCheckBox;
37 class QComboBox;
38 class QLineEdit;
39 class QListWidgetItem;
40 class QToolButton;
41
42 class SalomeApp_Module;
43 class LightApp_SelectionMgr;
44
45 class VisuGUI_ListWidget;
46 class VisuGUI_Prs3dDlg;
47 class VisuGUI_FieldFilter;
48
49 namespace VISU
50 {
51   class ColoredPrs3d_i;
52   class Result_i;
53 }
54
55 class VisuGUI_InputPane : public QGroupBox
56 {
57   Q_OBJECT
58
59 public:
60   VisuGUI_InputPane( VISU::VISUType theType,
61                      SalomeApp_Module* theModule,
62                      VisuGUI_Prs3dDlg* theDialog );
63   virtual ~VisuGUI_InputPane();
64
65 public:
66   virtual bool       check();
67   virtual void       clear();
68
69   void               initFromPrsObject( VISU::ColoredPrs3d_i* );
70   int                storeToPrsObject( VISU::ColoredPrs3d_i* );
71
72   bool               eventFilter (QObject* object, QEvent* event);
73   void               SetRestoreInitialSelection(bool on);
74   bool               GetRestoreInitialSelection();
75
76 public slots:
77   virtual void       onSelectionChanged();
78   virtual void       onReInitialize( bool );
79   virtual void       changeTimeStamp( int );
80
81 private slots:
82   void               onTypeChanged();
83   void               onListDoubleClicked( QListWidgetItem* theItem );
84   void               onAdd();
85   void               onRemove();
86
87 private:
88   SalomeApp_Module*  myModule;
89   VisuGUI_Prs3dDlg*  myDialog;
90   VISU::ColoredPrs3d_i* myPrs;
91
92   QGroupBox*         myUseGroupsGroupBox;
93   VisuGUI_ListWidget* myAllGroups;
94   VisuGUI_ListWidget* mySelectedGroups;
95   QToolButton*       myAddButton;
96   QToolButton*       myRemoveButton;
97
98   QGroupBox*         myDataSourceGroupBox;
99   QLineEdit*         myMedFile;
100   QLineEdit*         myMeshName;
101   QLineEdit*         myEntityName;
102   QLineEdit*         myFieldName;
103   QComboBox*         myTimeStamps;
104   QCheckBox*         myReInit;
105
106   VISU::Result_var   myResult;
107   int                myEntity;
108   bool               isRestoreInitialSelection;
109
110   VisuGUI_FieldFilter* myFieldFilter;
111   SALOME_ListIO        mySavedSelection;
112 };
113
114 #endif