netgenplugin/src/GUI/NETGENPluginGUI_HypothesisCreator.h

95 lines
2.9 KiB
C
Raw Normal View History

2009-02-17 07:15:34 +00:00
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
2009-02-17 07:15:34 +00:00
// 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.
//
2009-02-17 07:15:34 +00:00
// 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.
//
2009-02-17 07:15:34 +00:00
// 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
//
2009-02-17 07:15:34 +00:00
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin
// File : NETGENPluginGUI_HypothesisCreator.h
// Author : Michael Zorin
// Module : NETGENPlugin
// $Header:
2009-02-17 07:15:34 +00:00
//
#ifndef NETGENPLUGINGUI_HypothesisCreator_HeaderFile
#define NETGENPLUGINGUI_HypothesisCreator_HeaderFile
2009-02-17 07:15:34 +00:00
#include "NETGENPluginGUI.h"
#include <SMESHGUI_Hypotheses.h>
2009-02-17 07:15:34 +00:00
class SalomeApp_DoubleSpinBox;
class QComboBox;
class QCheckBox;
class QLineEdit;
typedef struct
{
double myMaxSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius;
int myFineness;
bool mySecondOrder, myAllowQuadrangles, myOptimize;
QString myName;
2009-02-17 07:15:34 +00:00
QString myMaxSizeVar, myGrowthRateVar, myNbSegPerEdgeVar, myNbSegPerRadiusVar;
} NetgenHypothesisData;
/*!
* \brief Class for creation of NETGEN2D and NETGEN3D hypotheses
*/
class NETGENPLUGIN_GUI_EXPORT NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
{
Q_OBJECT
public:
NETGENPluginGUI_HypothesisCreator( const QString& );
virtual ~NETGENPluginGUI_HypothesisCreator();
2009-02-17 07:15:34 +00:00
virtual bool checkParams(QString& msg) const;
virtual QString helpPage() 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:
2009-02-17 07:15:34 +00:00
QLineEdit* myName;
SalomeApp_DoubleSpinBox* myMaxSize;
QCheckBox* mySecondOrder;
QCheckBox* myOptimize;
QComboBox* myFineness;
SalomeApp_DoubleSpinBox* myGrowthRate;
SalomeApp_DoubleSpinBox* myNbSegPerEdge;
SalomeApp_DoubleSpinBox* myNbSegPerRadius;
QCheckBox* myAllowQuadrangles;
bool myIs2D;
};
#endif