Back to index

salome-med  6.5.0
MEDGUIFileContentDial.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  MED MEDGUI : MED component GUI implemetation
00024 //  File   : MEDGUIFileContentDial.h
00025 //  Module : MED
00026 //
00027 #ifndef __MEDGUIFILECONTENTDIAL_H__
00028 #define __MEDGUIFILECONTENTDIAL_H__
00029 
00030 #include "MEDCalculatorBrowserLiteStruct.hxx"
00031 
00032 #include <QDialog>
00033 #include <QTreeWidgetItem>
00034 
00035 class MEDGUIDataBaseDockWidget;
00036 
00037 namespace Ui
00038 {
00039   class MEDGUIFileContentDial;
00040 }
00041 
00042 class MEDGUIFileContentDial : public QDialog
00043 {
00044   Q_OBJECT
00045     public:
00046   MEDGUIFileContentDial(MEDGUIDataBaseDockWidget*, QWidget* = 0);
00047   ~MEDGUIFileContentDial();
00048   
00049  protected:
00050   void changeEvent(QEvent *e);
00051   void selFromFile(QTreeWidgetItem*, QString);//  Methode to set all elements of a MedGUI_LiteStruct to (un)selected according to a string (such as "all", "none", ...)
00052   void selFromField(QTreeWidgetItem*, QString);//  Methode to set all elements of a MedGUI_Field to (un)selected according to a string (such as "all", "none", ...)
00053   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", ...)
00054   
00055 public slots:
00056   void openFile();//  Create a new MedGUI_LiteStruct from a file and add content to QTreeWidgets
00057   void meshesStateChange(QTreeWidgetItem*, int);//  Change the select statement of one or more meshes, the item represents a mesh or a file
00058   void fieldsStateChange(QTreeWidgetItem*, int);//  Change tje select statement of one or more fields, the item represents a mesh or a field or a step
00059   void fieldsStateChanges();
00060   void sendSelectionToDB();
00061   void unselectAll();//  Unselec all fields and meshes
00062   void overfield(QTreeWidgetItem*,int);//  Show in red the corresponding meshes from a field or a step or a field hoovered by mouse
00063   void selCompoPopup(bool);//  Show the dialog for selecting components and changing components names
00064   void selStepsPopup(bool);//  Show the QLineEdit for selecting steps
00065   
00066 private:
00067   Ui::MEDGUIFileContentDial *ui;
00068   MEDGUIDataBaseDockWidget *_db;
00069   std::vector<ParaMEDMEM::MEDCalculatorBrowserLiteStruct> litestructs;//  Liste of files (MEdGUI_LiteStruct)
00070   std::vector<QTreeWidgetItem*> coloredMeshes;//  Liste of meshes currently colored in red
00071 };
00072 
00073 #endif // MEDGUI_FILECONTENTDIAL_HXX