Back to index

salome-smesh  6.5.0
SMESHGUI_FindElemByPointDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef SMESHGUI_FindElemByPointDLG_H
00021 #define SMESHGUI_FindElemByPointDLG_H
00022 
00023 // SMESH includes
00024 #include "SMESH_SMESHGUI.hxx"
00025 
00026 #include "SMESHGUI_Dialog.h"
00027 #include "SMESHGUI_SelectionOp.h"
00028 
00029 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00030 
00031 class QLineEdit;
00032 class QPushButton;
00033 class QListWidget;
00034 class QtxComboBox;
00035 class SMESHGUI_SpinBox;
00036 class SMESHGUI_MeshEditPreview;
00037 class SMESHGUI_FindElemByPointDlg;
00038 
00042 class SMESHGUI_EXPORT SMESHGUI_FindElemByPointOp: public SMESHGUI_SelectionOp
00043 {
00044   Q_OBJECT
00045 
00046 public:
00047   SMESHGUI_FindElemByPointOp();
00048   virtual ~SMESHGUI_FindElemByPointOp();
00049 
00050   virtual LightApp_Dialog*       dlg() const;  
00051 
00052 protected:
00053 
00054   virtual void                   startOperation();
00055   virtual void                   stopOperation();
00056 
00057   virtual void                   activateSelection();
00058 
00059 protected slots:
00060 
00061   virtual void                   onFind();
00062   virtual bool                   onApply();
00063 
00064 private slots:
00065 
00066   void                           onRejectedDlg();
00067   void                           onSelectionDone();
00068   void                           onElemSelected();
00069   void                           onElemTypeChange(int);
00070   void                           redisplayPreview();
00071 
00072 private:
00073   SMESHGUI_FindElemByPointDlg*     myDlg;
00074 
00075   SUIT_SelectionFilter*            myFilter;
00076   SMESHGUI_MeshEditPreview*        mySimulation; // to show point coordinates
00077   SMESH::SMESH_IDSource_var        myMeshOrPart;
00078   SMESH::MeshPreviewStruct_var     myPreview;
00079   Handle(SALOME_InteractiveObject) myMeshIO;
00080 };
00081 
00086 class SMESHGUI_EXPORT SMESHGUI_FindElemByPointDlg : public SMESHGUI_Dialog
00087 {
00088   Q_OBJECT
00089 
00090 public:
00091   SMESHGUI_FindElemByPointDlg();
00092 
00093   void setTypes(SMESH::array_of_ElementType_var & types);
00094 
00095 private:
00096   QWidget*                      createMainFrame( QWidget* );
00097 
00098   QLineEdit*                    myMeshName;
00099   SMESHGUI_SpinBox*             myX;
00100   SMESHGUI_SpinBox*             myY;
00101   SMESHGUI_SpinBox*             myZ;
00102   QtxComboBox*                  myElemTypeCombo;
00103   QPushButton*                  myFindBtn;
00104   QListWidget*                  myFoundList;
00105 
00106   QString                       myHelpFileName;
00107 
00108   friend class SMESHGUI_FindElemByPointOp;
00109 
00110 signals:
00111   void                           rejectedDlg();
00112 
00113 protected slots:
00114   virtual void                   reject();
00115 
00116 private slots:
00117 //void                          ButtonToggled( bool );
00118 };
00119 
00120 #endif // SMESHGUI_FindElemByPointDLG_H