1 // Copyright (C) 2007-2015 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, 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 QListWidget* myShapesList;
82 QPushButton* myAddShapeBut;
83 QTreeWidget* myCoordsTreeWdg;
85 Handle(SALOME_InteractiveObject) mySelectedShapeIO;
88 //================================================================================
90 * \brief Transition type widget
92 class STDMESHERSGUI_EXPORT StdMeshersGUI_QuadrangleParamWdg : public QWidget
97 StdMeshersGUI_QuadrangleParamWdg (QWidget* parent = 0);
98 ~StdMeshersGUI_QuadrangleParamWdg();
100 void SetType (int theType);
103 GEOM::ListOfGO* GetShapes();
104 SMESH::nodes_array* GetPoints();
105 void Set( GEOM::ListOfGO_var shapes, SMESH::nodes_array_var points );
109 void typeChanged(int);
112 QButtonGroup* myType; // Quadranle preference, Triangle preference, Reduced
115 //================================================================================
117 * \brief Item delegate for a tree widget
119 class StdMeshersGUI_QuadrangleParamCreator::ItemDelegate : public QItemDelegate
123 ItemDelegate( QObject* );
124 QWidget* createEditor( QWidget*, const QStyleOptionViewItem&, const QModelIndex& ) const;
127 #endif // STDMESHERSGUI_QUADRANGLEPARAMWDG_H