Back to index

salome-smesh  6.5.0
StdMeshersGUI_LayerDistributionParamWdg.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 // File   : StdMeshersGUI_LayerDistributionParamWdg.h
00024 // Author : Open CASCADE S.A.S.
00025 //
00026 #ifndef STDMESHERSGUI_LAYERDISTRIBUTIONPARAMWGD_H
00027 #define STDMESHERSGUI_LAYERDISTRIBUTIONPARAMWGD_H
00028 
00029 // SMESH includes
00030 #include "SMESH_StdMeshersGUI.hxx"
00031 
00032 // Qt includes
00033 #include <QWidget>
00034 #include <QStringList>
00035 
00036 // IDL includes
00037 #include <SALOMEconfig.h>
00038 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
00039 
00040 class SMESHGUI;
00041 class QPushButton;
00042 class QMenu;
00043 class QAction;
00044 class QDialog;
00045 
00049 class STDMESHERSGUI_EXPORT StdMeshersGUI_LayerDistributionParamWdg : public QWidget
00050 {
00051   Q_OBJECT
00052 
00053 public:
00054   StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr,
00055                                           const QString&,
00056                                           QDialog*);
00057   ~StdMeshersGUI_LayerDistributionParamWdg();
00058 
00059   SMESH::SMESH_Hypothesis_var GetHypothesis() { return myHyp; }
00060 
00061   QString GetValue() const { return myParamValue; }
00062 
00063   bool IsOk() const { return !myHyp->_is_nil(); }
00064 
00065 private slots:
00066   void onCreate(); 
00067   void onEdit(); 
00068   void onHypTypePopup( QAction* );
00069   void onEdited(int);
00070 
00071 private:
00072   void init();
00073   void set(SMESH::SMESH_Hypothesis_ptr);
00074   
00075 private:
00076  SMESH::SMESH_Hypothesis_var myHyp;
00077  SMESHGUI*                   mySMESHGUI;
00078 
00079  QPushButton*           myCreateButton;
00080  QPushButton*           myEditButton;
00081  QMenu*                 myHypTypePopup;
00082  QDialog*               myDlg;
00083  QString                myName;
00084  QString                myParamValue;
00085 
00086  QStringList            myHypTypes;
00087 };
00088 
00089 #endif // STDMESHERSGUI_LAYERDISTRIBUTIONPARAMWGD_H