1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SMESHGUI_MeshOrderDlg.h
21 // Author : Pavel TELKOV, Open CASCADE S.A.S.
23 #ifndef SMESHGUI_MeshOrderDlg_H
24 #define SMESHGUI_MeshOrderDlg_H
27 #include "SMESH_SMESHGUI.hxx"
28 #include "SMESHGUI_Dialog.h"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
40 typedef QList<QStringList> ListListName;
41 typedef QList<int> ListId;
42 typedef QList<ListId> ListListId;
45 * \brief Reusable widget that shows and allows modify meshing order
48 class SMESHGUI_EXPORT SMESHGUI_MeshOrderBox : public QGroupBox
54 SMESHGUI_MeshOrderBox( QWidget* );
55 ~SMESHGUI_MeshOrderBox();
60 //! Set mesh (submesh) names and indeces
61 void SetMeshes(const ListListName& theMeshNames,
62 const ListListId& theMeshIds);
64 //! returns status is order changed by user
65 bool IsOrderChanged() const;
67 //! Returns result (ordered by user) mesh names
68 ListListId GetMeshIds() const;
69 //! Returns result (ordered by user) mesh indeces
70 ListListName GetMeshNames() const;
74 //! update state of arrow buttons according to selection
75 void onSelectionChanged();
76 //! move item according to clicked arrow button
81 //! move mesh in order up or down
82 void moveItem(const bool theIsUp);
88 QToolButton* myDownBtn;
89 QListWidget* myMeshNames;
93 * \brief Dialog contains mesh order box for modification operation
96 class SMESHGUI_EXPORT SMESHGUI_MeshOrderDlg : public SMESHGUI_Dialog
101 /*! Public methods */
102 SMESHGUI_MeshOrderDlg( QWidget* );
103 ~SMESHGUI_MeshOrderDlg();
105 SMESHGUI_MeshOrderBox* GetMeshOrderBox() const;
108 /*! Private fields */
109 SMESHGUI_MeshOrderBox* myBox;
112 #endif // SMESHGUI_MeshOrderDlg_H