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_MeshOrderDlg.h 00021 // Author : Pavel TELKOV, Open CASCADE S.A.S. 00022 // 00023 #ifndef SMESHGUI_MeshOrderDlg_H 00024 #define SMESHGUI_MeshOrderDlg_H 00025 00026 // SMESH includes 00027 #include "SMESH_SMESHGUI.hxx" 00028 #include "SMESHGUI_Dialog.h" 00029 00030 // Qt includes 00031 #include <QGroupBox> 00032 00033 // IDL includes 00034 #include <SALOMEconfig.h> 00035 #include CORBA_SERVER_HEADER(SMESH_Mesh) 00036 00037 class QToolButton; 00038 class QListWidget; 00039 00040 typedef QList<QStringList> ListListName; 00041 typedef QList<int> ListId; 00042 typedef QList<ListId> ListListId; 00043 00048 class SMESHGUI_EXPORT SMESHGUI_MeshOrderBox : public QGroupBox 00049 { 00050 Q_OBJECT 00051 00052 public: 00054 SMESHGUI_MeshOrderBox( QWidget* ); 00055 ~SMESHGUI_MeshOrderBox(); 00056 00058 void Clear(); 00059 00061 void SetMeshes(const ListListName& theMeshNames, 00062 const ListListId& theMeshIds); 00063 00065 bool IsOrderChanged() const; 00066 00068 ListListId GetMeshIds() const; 00070 ListListName GetMeshNames() const; 00071 00072 private slots: 00074 00075 void onSelectionChanged(); 00077 void onMoveItem(); 00078 00079 private: 00081 00082 void moveItem(const bool theIsUp); 00083 00084 private: 00086 bool myIsChanged; 00087 QToolButton* myUpBtn; 00088 QToolButton* myDownBtn; 00089 QListWidget* myMeshNames; 00090 }; 00091 00096 class SMESHGUI_EXPORT SMESHGUI_MeshOrderDlg : public SMESHGUI_Dialog 00097 { 00098 Q_OBJECT 00099 00100 public: 00102 SMESHGUI_MeshOrderDlg( QWidget* ); 00103 ~SMESHGUI_MeshOrderDlg(); 00104 00105 SMESHGUI_MeshOrderBox* GetMeshOrderBox() const; 00106 00107 private: 00109 SMESHGUI_MeshOrderBox* myBox; 00110 }; 00111 00112 #endif // SMESHGUI_MeshOrderDlg_H