1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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, or (at your option) any later version.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // MED MEDGUI : MED component GUI implemetation
24 // File : MEDGUIFileContentDial.h
27 #ifndef __MEDGUIFILECONTENTDIAL_H__
28 #define __MEDGUIFILECONTENTDIAL_H__
30 #include "MEDCalculatorBrowserLiteStruct.hxx"
33 #include <QTreeWidgetItem>
35 class MEDGUIDataBaseDockWidget;
39 class MEDGUIFileContentDial;
42 class MEDGUIFileContentDial : public QDialog
46 MEDGUIFileContentDial(MEDGUIDataBaseDockWidget*, QWidget* = 0);
47 ~MEDGUIFileContentDial();
50 void changeEvent(QEvent *e);
51 void selFromFile(QTreeWidgetItem*, QString);// Methode to set all elements of a MedGUI_LiteStruct to (un)selected according to a string (such as "all", "none", ...)
52 void selFromField(QTreeWidgetItem*, QString);// Methode to set all elements of a MedGUI_Field to (un)selected according to a string (such as "all", "none", ...)
53 void selFromStep(QTreeWidgetItem*,QString);// Methode to set all elements of a MedGUI_Field when selection is made from a MedGUI_Step to (un)selected according to a string (such as "all", "none", ...)
56 void openFile();// Create a new MedGUI_LiteStruct from a file and add content to QTreeWidgets
57 void meshesStateChange(QTreeWidgetItem*, int);// Change the select statement of one or more meshes, the item represents a mesh or a file
58 void fieldsStateChange(QTreeWidgetItem*, int);// Change tje select statement of one or more fields, the item represents a mesh or a field or a step
59 void fieldsStateChanges();
60 void sendSelectionToDB();
61 void unselectAll();// Unselec all fields and meshes
62 void overfield(QTreeWidgetItem*,int);// Show in red the corresponding meshes from a field or a step or a field hoovered by mouse
63 void selCompoPopup(bool);// Show the dialog for selecting components and changing components names
64 void selStepsPopup(bool);// Show the QLineEdit for selecting steps
67 Ui::MEDGUIFileContentDial *ui;
68 MEDGUIDataBaseDockWidget *_db;
69 std::vector<ParaMEDMEM::MEDCalculatorBrowserLiteStruct> litestructs;// Liste of files (MEdGUI_LiteStruct)
70 std::vector<QTreeWidgetItem*> coloredMeshes;// Liste of meshes currently colored in red
73 #endif // MEDGUI_FILECONTENTDIAL_HXX