00001 // Copyright (C) 2007-2011 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 // File : SMESHGUI_MeshOrderOp.h 00021 // Author : Pavel TELKOV, Open CASCADE S.A.S. 00022 // 00023 #ifndef SMESHGUI_MeshOrderOp_H 00024 #define SMESHGUI_MeshOrderOp_H 00025 00026 00027 // SMESH includes 00028 #include "SMESH_SMESHGUI.hxx" 00029 00030 #include "SMESHGUI_Operation.h" 00031 #include "SMESHGUI_MeshOrderDlg.h" 00032 00033 // IDL includes 00034 #include <SALOMEconfig.h> 00035 #include CORBA_SERVER_HEADER(SMESH_Gen) 00036 #include CORBA_SERVER_HEADER(SMESH_Mesh) 00037 00041 class SMESHGUI_EXPORT SMESHGUI_MeshOrderMgr 00042 { 00043 public: 00044 SMESHGUI_MeshOrderMgr( SMESHGUI_MeshOrderBox* ); 00045 virtual ~SMESHGUI_MeshOrderMgr(); 00047 void SetMesh( SMESH::SMESH_Mesh_var& theMesh ); 00049 bool GetMeshOrder(); 00051 bool GetMeshOrder( ListListId& theIds ); 00053 bool SetMeshOrder(); 00055 bool SetMeshOrder( const ListListId& theIds ); 00056 00058 bool IsOrderChanged() const; 00059 00060 private: 00061 SMESH::SMESH_Mesh_var myMesh; 00062 SMESHGUI_MeshOrderBox* myBox; 00063 }; 00064 00068 class SMESHGUI_EXPORT SMESHGUI_MeshOrderOp: public SMESHGUI_Operation 00069 { 00070 Q_OBJECT 00071 00072 public: 00073 SMESHGUI_MeshOrderOp(); 00074 virtual ~SMESHGUI_MeshOrderOp(); 00075 00076 protected: 00077 virtual LightApp_Dialog* dlg() const; 00078 00079 virtual void startOperation(); 00080 00082 virtual void initDialog(); 00083 00084 protected slots: 00085 virtual bool onApply(); 00086 virtual void onCancel(); 00087 00088 private: 00089 SMESHGUI_MeshOrderDlg* myDlg; 00090 SMESHGUI_MeshOrderMgr* myMgr; 00091 }; 00092 00093 #endif // SMESHGUI_MeshOrderOp_H