Back to index

salome-smesh  6.5.0
SMESHGUI_SingleEditDlg.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   : SMESHGUI_SingleEditDlg.h
00024 // Author : Sergey LITONIN, Open CASCADE S.A.S.
00025 //
00026 #ifndef SMESHGUI_SINGLEEDITDLG_H
00027 #define SMESHGUI_SINGLEEDITDLG_H
00028 
00029 // SMESH includes
00030 #include "SMESH_SMESHGUI.hxx"
00031 
00032 // Qt includes
00033 #include <QDialog>
00034 
00035 // IDL includes
00036 #include <SALOMEconfig.h>
00037 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
00038 
00039 class QLineEdit;
00040 class QPushButton;
00041 
00042 class SMESHGUI;
00043 class SMESH_Actor;
00044 class SVTK_Selector;
00045 class LightApp_SelectionMgr;
00046 
00052 class SMESHGUI_EXPORT SMESHGUI_SingleEditDlg : public QDialog
00053 { 
00054   Q_OBJECT
00055 
00056 public:
00057   SMESHGUI_SingleEditDlg( SMESHGUI* );
00058   virtual ~SMESHGUI_SingleEditDlg();
00059 
00060   void                    Init();
00061 
00062 protected slots:
00063   void                    onOk();
00064   virtual bool            onApply();
00065   void                    onClose();
00066   void                    onHelp();
00067 
00068   void                    onDeactivate();
00069 
00070   void                    onSelectionDone();
00071   void                    onTextChange( const QString& );
00072 
00073 protected:
00074   void                    closeEvent( QCloseEvent* );
00075   void                    enterEvent( QEvent* );
00076   void                    hideEvent( QHideEvent* );                        /* ESC key */
00077   void                    keyPressEvent( QKeyEvent* );
00078   QWidget*                createButtonFrame( QWidget* );
00079   QWidget*                createMainFrame( QWidget* );
00080   bool                    isValid( const bool ) const;
00081   bool                    getNodeIds( const QString&, int&, int& ) const;
00082   virtual bool            process( SMESH::SMESH_MeshEditor_ptr, const int, const int ) = 0;
00083 
00084 protected:
00085   bool                    myBusy;
00086   QPushButton*            myOkBtn;
00087   QPushButton*            myApplyBtn;
00088   QPushButton*            myCloseBtn;
00089   QPushButton*            myHelpBtn;
00090   QLineEdit*              myEdge;
00091   SMESH_Actor*            myActor;
00092 
00093   LightApp_SelectionMgr*  mySelectionMgr;
00094   SVTK_Selector*          mySelector;
00095   SMESHGUI*               mySMESHGUI;
00096   
00097   QString                 myHelpFileName;
00098 };
00099 
00105 class SMESHGUI_TrianglesInversionDlg : public SMESHGUI_SingleEditDlg
00106 {
00107   Q_OBJECT
00108 
00109 public:
00110   SMESHGUI_TrianglesInversionDlg( SMESHGUI* );
00111   virtual ~SMESHGUI_TrianglesInversionDlg();
00112 
00113 protected:
00114   virtual bool process( SMESH::SMESH_MeshEditor_ptr, const int, const int );
00115 };
00116 
00122 class SMESHGUI_UnionOfTwoTrianglesDlg : public SMESHGUI_SingleEditDlg
00123 {
00124   Q_OBJECT
00125 
00126 public:
00127   SMESHGUI_UnionOfTwoTrianglesDlg( SMESHGUI* );
00128   virtual ~SMESHGUI_UnionOfTwoTrianglesDlg();
00129 
00130 protected:
00131   virtual bool process( SMESH::SMESH_MeshEditor_ptr, const int, const int );
00132 };
00133 
00134 #endif // SMESHGUI_SINGLEEDITDLG_H