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