2006-05-06 08:54:13 +00:00
|
|
|
// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin
|
|
|
|
//
|
|
|
|
// Copyright (C) 2003 CEA
|
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
//
|
2006-06-01 11:42:55 +00:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2006-05-06 08:54:13 +00:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// File : NETGENPluginGUI_HypothesisCreator.h
|
|
|
|
// Author : Michael Zorin
|
|
|
|
// Module : NETGENPlugin
|
|
|
|
// $Header:
|
|
|
|
|
|
|
|
#ifndef NETGENPLUGINGUI_HypothesisCreator_HeaderFile
|
|
|
|
#define NETGENPLUGINGUI_HypothesisCreator_HeaderFile
|
|
|
|
|
|
|
|
#include <SMESHGUI_Hypotheses.h>
|
|
|
|
|
|
|
|
class QtxDblSpinBox;
|
|
|
|
class QtxComboBox;
|
|
|
|
class QCheckBox;
|
|
|
|
class QLineEdit;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
double myMaxSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius;
|
|
|
|
int myFineness;
|
|
|
|
bool mySecondOrder, myAllowQuadrangles, myOptimize;
|
|
|
|
QString myName;
|
|
|
|
} NetgenHypothesisData;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Class for creation of NETGEN2D and NETGEN3D hypotheses
|
|
|
|
*/
|
|
|
|
class NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
NETGENPluginGUI_HypothesisCreator( const QString& );
|
|
|
|
virtual ~NETGENPluginGUI_HypothesisCreator();
|
|
|
|
|
|
|
|
virtual bool checkParams() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual QFrame* buildFrame ();
|
|
|
|
virtual void retrieveParams() const;
|
|
|
|
virtual QString storeParams () const;
|
|
|
|
|
|
|
|
virtual QString caption() const;
|
|
|
|
virtual QPixmap icon() const;
|
|
|
|
virtual QString type() const;
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual void onFinenessChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool readParamsFromHypo( NetgenHypothesisData& ) const;
|
|
|
|
bool readParamsFromWidgets( NetgenHypothesisData& ) const;
|
|
|
|
bool storeParamsToHypo( const NetgenHypothesisData& ) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
QLineEdit* myName;
|
|
|
|
QtxDblSpinBox* myMaxSize;
|
|
|
|
QCheckBox* mySecondOrder;
|
|
|
|
QCheckBox* myOptimize;
|
|
|
|
QtxComboBox* myFineness;
|
|
|
|
QtxDblSpinBox* myGrowthRate;
|
|
|
|
QtxDblSpinBox* myNbSegPerEdge;
|
|
|
|
QtxDblSpinBox* myNbSegPerRadius;
|
|
|
|
QCheckBox* myAllowQuadrangles;
|
|
|
|
|
|
|
|
bool myIs2D;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|