Salome HOME
Merge from V6_main 13/12/2012
[modules/paravis.git] / src / Plugins / MedReader / ParaViewPlugin / pqMedReaderPanel.h
1 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _pqMedReaderPanel_h
21 #define _pqMedReaderPanel_h
22
23 #include "pqNamedObjectPanel.h"
24
25 #include <QTreeWidget>
26 class pqTreeWidgetItemObject;
27
28 class vtkSMProperty;
29
30 class pqMedReaderPanel: public pqNamedObjectPanel
31 {
32 Q_OBJECT
33   typedef pqNamedObjectPanel Superclass;
34 public:
35   /// constructor
36   pqMedReaderPanel(pqProxy* proxy, QWidget* p = NULL);
37   /// destructor
38   ~pqMedReaderPanel();
39
40 protected slots:
41   void animationModeChanged(int mode);
42
43   // void timeComboChanged(int timeStep);
44
45   void updateSIL();
46
47 protected:
48   /// populate widgets with properties from the server manager
49   virtual void linkServerManagerProperties();
50
51   enum PixmapType
52   {
53     PM_NONE = -1,
54     PM_POINT,
55     PM_CELL,
56     PM_QUADRATURE,
57     PM_ELNO
58   };
59
60   void addSelectionsToTreeWidget(const QString& prop,
61       QTreeWidget* tree, PixmapType pix);
62
63   void addSelectionToTreeWidget(const QString& name,
64       const QString& realName, QTreeWidget* tree, PixmapType pix,
65       const QString& prop, int propIdx);
66
67   void setupAnimationModeWidget();
68   void updateAvailableTimes();
69
70   class pqUI;
71   pqUI* UI;
72 };
73
74 #endif