1 // Copyright (C) 2007-2009 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESHGUI_MeshOrderDlg.h
23 // Author : Pavel TELKOV, Open CASCADE S.A.S.
25 #ifndef SMESHGUI_MeshOrderDlg_H
26 #define SMESHGUI_MeshOrderDlg_H
29 #include "SMESH_SMESHGUI.hxx"
30 #include "SMESHGUI_Dialog.h"
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
42 typedef QList<QStringList> ListListName;
43 typedef QList<int> ListId;
44 typedef QList<ListId> ListListId;
47 * \brief Reusable widget that shows and allows modify meshing order
50 class SMESHGUI_EXPORT SMESHGUI_MeshOrderBox : public QGroupBox
56 SMESHGUI_MeshOrderBox( QWidget* );
57 ~SMESHGUI_MeshOrderBox();
62 //! Set mesh (submesh) names and indeces
63 void SetMeshes(const ListListName& theMeshNames,
64 const ListListId& theMeshIds);
66 //! returns status is order changed by user
67 bool IsOrderChanged() const;
69 //! Returns result (ordered by user) mesh names
70 ListListId GetMeshIds() const;
71 //! Returns result (ordered by user) mesh indeces
72 ListListName GetMeshNames() const;
76 //! update state of arrow buttons according to selection
77 void onSelectionChanged();
78 //! move item according to clicked arrow button
83 //! move mesh in order up or down
84 void moveItem(const bool theIsUp);
90 QToolButton* myDownBtn;
91 QListWidget* myMeshNames;
95 * \brief Dialog contains mesh order box for modification operation
98 class SMESHGUI_EXPORT SMESHGUI_MeshOrderDlg : public SMESHGUI_Dialog
103 /*! Public methods */
104 SMESHGUI_MeshOrderDlg( QWidget* );
105 ~SMESHGUI_MeshOrderDlg();
107 SMESHGUI_MeshOrderBox* GetMeshOrderBox() const;
110 /*! Private fields */
111 SMESHGUI_MeshOrderBox* myBox;
114 #endif // SMESHGUI_MeshOrderDlg_H