1 // Copyright (C) 2007-2024 CEA, EDF, 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, or (at your option) any later version.
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
19 // File : StdMeshersGUI_QuadrangleParamWdg.h
20 // Author : Open CASCADE S.A.S. (jfa)
22 #ifndef STDMESHERSGUI_QUADRANGLEPARAMWDG_H
23 #define STDMESHERSGUI_QUADRANGLEPARAMWDG_H
26 #include "SMESH_StdMeshersGUI.hxx"
27 #include "StdMeshersGUI_StdHypothesisCreator.h"
29 #include <SALOME_InteractiveObject.hxx>
33 #include <QItemDelegate>
42 class StdMeshersGUI_QuadrangleParamWdg;
43 class StdMeshersGUI_SubShapeSelectorWdg;
45 //================================================================================
47 * \brief Quadrangle Parameters Creator
49 class STDMESHERSGUI_EXPORT StdMeshersGUI_QuadrangleParamCreator : public StdMeshersGUI_StdHypothesisCreator
56 StdMeshersGUI_QuadrangleParamCreator( const QString& aHypType );
58 //virtual bool checkParams( QString& ) const;
59 virtual QString helpPage() const;
62 virtual QFrame* buildFrame();
63 virtual void retrieveParams() const;
64 virtual QString storeParams() const;
68 void onTypeChanged(int type);
73 void onSelectionChanged();
74 void onTabChanged(int);
79 StdMeshersGUI_QuadrangleParamWdg* myTypeWdg;
80 StdMeshersGUI_SubShapeSelectorWdg* myVertexSelWdg;
81 StdMeshersGUI_SubShapeSelectorWdg* myCornersSelWdg;
82 QListWidget* myShapesList;
83 QPushButton* myAddShapeBut;
84 QTreeWidget* myCoordsTreeWdg;
86 Handle(SALOME_InteractiveObject) mySelectedShapeIO;
89 //================================================================================
91 * \brief Transition type widget
93 class STDMESHERSGUI_EXPORT StdMeshersGUI_QuadrangleParamWdg : public QWidget
98 StdMeshersGUI_QuadrangleParamWdg (QWidget* parent = 0);
99 ~StdMeshersGUI_QuadrangleParamWdg();
101 void SetType (int theType);
104 GEOM::ListOfGO* GetShapes();
105 SMESH::nodes_array* GetPoints();
106 void Set( GEOM::ListOfGO_var shapes, SMESH::nodes_array_var points );
110 void typeChanged(int);
113 QButtonGroup* myType; // Quadrangle preference, Triangle preference, Reduced
116 //================================================================================
118 * \brief Item delegate for a tree widget
120 class StdMeshersGUI_QuadrangleParamCreator::ItemDelegate : public QItemDelegate
124 ItemDelegate( QObject* );
125 QWidget* createEditor( QWidget*, const QStyleOptionViewItem&, const QModelIndex& ) const;
128 #endif // STDMESHERSGUI_QUADRANGLEPARAMWDG_H