Back to index

salome-smesh  6.5.0
SMESHGUI_SmoothingDlg.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 // SMESH SMESHGUI : GUI for SMESH component
00024 // File   : SMESHGUI_SmoothingDlg.h
00025 // Author : Michael ZORIN, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_SMOOTHINGDLG_H
00028 #define SMESHGUI_SMOOTHINGDLG_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 
00033 // Qt includes
00034 #include <QDialog>
00035 
00036 // SALOME GUI includes
00037 #include <SALOME_InteractiveObject.hxx>
00038 
00039 // IDL includes
00040 #include <SALOMEconfig.h>
00041 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00042 
00043 class QGroupBox;
00044 class QLabel;
00045 class QLineEdit;
00046 class QPushButton;
00047 class QRadioButton;
00048 class QComboBox;
00049 class QCheckBox;
00050 class SMESHGUI;
00051 class SalomeApp_IntSpinBox;
00052 class SMESHGUI_IdValidator;
00053 class SMESHGUI_SpinBox;
00054 class SMESHGUI_FilterDlg;
00055 class SMESH_Actor;
00056 class SVTK_Selector;
00057 class LightApp_SelectionMgr;
00058 class SMESH_LogicalFilter;
00059 
00060 //=================================================================================
00061 // class    : SMESHGUI_SmoothingDlg
00062 // purpose  :
00063 //=================================================================================
00064 class SMESHGUI_EXPORT SMESHGUI_SmoothingDlg : public QDialog
00065 { 
00066   Q_OBJECT
00067 
00068 public:
00069   SMESHGUI_SmoothingDlg( SMESHGUI* );
00070   ~SMESHGUI_SmoothingDlg();
00071 
00072 private:
00073   void                   Init();
00074   void                   closeEvent( QCloseEvent* );
00075   void                   enterEvent( QEvent* );        /* mouse enter the QWidget */
00076   void                   hideEvent( QHideEvent* );     /* ESC key */
00077   void                   keyPressEvent( QKeyEvent* );
00078   void                   setFilters( const bool theIsElem );
00079 
00080   bool                   isValid();
00081   
00082   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
00083   SMESHGUI_IdValidator*  myIdValidator;
00084   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
00085   int                    myNbOkElements;          /* to check when elements are defined */
00086   int                    myNbOkNodes;             /* to check when fixed nodes are defined */
00087   int                    myConstructorId;         /* Current constructor id = radio button id */
00088   QLineEdit*             myEditCurrentArgument;   /* Current  LineEdit */
00089   SVTK_Selector*         mySelector;
00090 
00091   SMESH::SMESH_IDSource_var mySelectedObject;
00092 
00093   bool                   myBusy;
00094   SMESH::SMESH_Mesh_var  myMesh;
00095   SMESH_Actor*           myActor;
00096   Handle(SALOME_InteractiveObject) myIO;
00097   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
00098 
00099   QGroupBox*             GroupConstructors;
00100   QRadioButton*          Constructor1;
00101   QGroupBox*             GroupButtons;
00102   QPushButton*           buttonOk;
00103   QPushButton*           buttonCancel;
00104   QPushButton*           buttonApply;
00105   QPushButton*           buttonHelp;
00106   QGroupBox*             GroupArguments;
00107   QLabel*                TextLabelElements;
00108   QPushButton*           SelectElementsButton;
00109   QLineEdit*             LineEditElements;
00110   QCheckBox*             CheckBoxMesh;
00111   QLabel*                TextLabelNodes;
00112   QPushButton*           SelectNodesButton;
00113   QLineEdit*             LineEditNodes;
00114   QLabel*                TextLabelMethod;
00115   QComboBox*             ComboBoxMethod;
00116   QLabel*                TextLabelLimit;
00117   SalomeApp_IntSpinBox*  SpinBox_IterationLimit;
00118   QLabel*                TextLabelAspectRatio;
00119   SMESHGUI_SpinBox*      SpinBox_AspectRatio;
00120   QCheckBox*             CheckBoxParametric;
00121 
00122   QString                myHelpFileName;
00123 
00124   QPushButton*           myElemFilterBtn;
00125   SMESHGUI_FilterDlg*    myFilterDlg;
00126    
00127 private slots:
00128   void                   ClickOnOk();
00129   void                   ClickOnCancel();
00130   bool                   ClickOnApply();
00131   void                   ClickOnHelp();
00132   void                   SetEditCurrentArgument();
00133   void                   SelectionIntoArgument();
00134   void                   DeactivateActiveDialog();
00135   void                   ActivateThisDialog();
00136   void                   onTextChange( const QString& );
00137   void                   onSelectMesh( bool );
00138   void                   setElemFilters();
00139   void                   setNodeFilters();
00140 };
00141 
00142 #endif // SMESHGUI_SMOOTHINGDLG_H