Salome HOME
2c9cbd67e031d8d09b4227e649b3d37653777d55
[modules/visu.git] / src / VISUGUI / VisuGUI_EditContainerDlg.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_EditContainerDlg.h
23 //  Author : VSV
24 //  Module : VISU
25 //
26 #ifndef VISUGUI_EDITCONTAINER_H
27 #define VISUGUI_EDITCONTAINER_H
28
29 #include <QDialog>
30 #include <QVector>
31
32 class QTreeWidget;
33 class QToolButton;
34
35
36 #include "SALOMEDSClient_SObject.hxx"
37
38 class VisuGUI;
39
40 namespace VISU {
41   class Container_i;
42 }
43
44
45 struct CurveStruct {
46   QString TableName;
47   QString CurveName;
48   QString CurveEntry;
49 };
50
51
52 class VisuGUI_EditContainerDlg: public QDialog
53 {
54   Q_OBJECT;
55
56  public:
57   VisuGUI_EditContainerDlg (VisuGUI* theModule, bool theIsModal = true);
58   ~VisuGUI_EditContainerDlg() {};
59
60   void initFromPrsObject (VISU::Container_i* theContainer);
61   void storeToPrsObject  (VISU::Container_i* theContainer);
62   
63  private:
64   void keyPressEvent( QKeyEvent* e );
65
66  private slots:
67   void onLeftClicked();
68   void onRightClicked();
69   void onLeftSelected();
70   void onRightSelected();
71   void onHelp();
72
73  private:
74   QString getSObjectName (_PTR(SObject) theSObject);
75
76   QTreeWidget* myStudyLst;
77   QTreeWidget* myContainerLst;
78   QToolButton* myLeftBtn;
79   QToolButton* myRightBtn;
80
81   VisuGUI* myVisuGUI;
82 };
83
84 #endif // VISUGUI_EDITCONTAINER_H