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