2009-02-17 10:27:49 +05:00
|
|
|
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
2006-05-06 14:51:48 +06:00
|
|
|
//
|
2009-02-17 10:27:49 +05:00
|
|
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
2006-05-06 14:51:48 +06:00
|
|
|
//
|
2009-02-17 10:27:49 +05: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.
|
2006-05-06 14:51:48 +06:00
|
|
|
//
|
2009-02-17 10:27:49 +05: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.
|
2006-05-06 14:51:48 +06:00
|
|
|
//
|
2009-02-17 10:27:49 +05: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
|
2006-05-06 14:51:48 +06:00
|
|
|
//
|
2009-02-17 10:27:49 +05:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
|
|
|
//
|
|
|
|
// File : StdMeshersGUI_NbSegmentsCreator.h
|
|
|
|
// Author : Open CASCADE S.A.S.
|
|
|
|
//
|
|
|
|
#ifndef STDMESHERSGUI_NBSEGMENTSCREATOR_H
|
|
|
|
#define STDMESHERSGUI_NBSEGMENTSCREATOR_H
|
2005-12-28 14:17:39 +05:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// SMESH includes
|
2008-03-07 12:47:05 +05:00
|
|
|
#include "SMESH_StdMeshersGUI.hxx"
|
|
|
|
|
2005-12-28 14:17:39 +05:00
|
|
|
#include "StdMeshersGUI_StdHypothesisCreator.h"
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// IDL includes
|
2005-12-28 14:17:39 +05:00
|
|
|
#include <SALOMEconfig.h>
|
|
|
|
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
class SalomeApp_IntSpinBox;
|
2005-12-28 14:17:39 +05:00
|
|
|
class QtxComboBox;
|
|
|
|
class SMESHGUI_SpinBox;
|
|
|
|
class StdMeshersGUI_DistrTableFrame;
|
|
|
|
class StdMeshersGUI_DistrPreview;
|
|
|
|
class QLineEdit;
|
|
|
|
class QButtonGroup;
|
2009-02-17 10:27:49 +05:00
|
|
|
class QGroupBox;
|
2005-12-28 14:17:39 +05:00
|
|
|
class QGridLayout;
|
2006-02-07 20:01:11 +05:00
|
|
|
class QRadioButton;
|
2005-12-28 14:17:39 +05:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int myNbSeg, myDistrType, myConv;
|
|
|
|
double myScale;
|
|
|
|
SMESH::double_array myTable;
|
|
|
|
QString myName, myExpr;
|
2009-02-17 10:27:49 +05:00
|
|
|
QString myNbSegVarName, myScaleVarName;
|
2005-12-28 14:17:39 +05:00
|
|
|
|
|
|
|
} NbSegmentsHypothesisData;
|
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
class STDMESHERSGUI_EXPORT StdMeshersGUI_NbSegmentsCreator : public StdMeshersGUI_StdHypothesisCreator
|
2005-12-28 14:17:39 +05:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
StdMeshersGUI_NbSegmentsCreator();
|
|
|
|
virtual ~StdMeshersGUI_NbSegmentsCreator();
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
virtual bool checkParams( QString& ) const;
|
2005-12-28 14:17:39 +05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual QFrame* buildFrame();
|
|
|
|
virtual void retrieveParams() const;
|
2006-02-07 20:01:11 +05:00
|
|
|
virtual QString storeParams() const;
|
2005-12-28 14:17:39 +05:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual void onValueChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool readParamsFromHypo( NbSegmentsHypothesisData& ) const;
|
|
|
|
bool readParamsFromWidgets( NbSegmentsHypothesisData& ) const;
|
|
|
|
bool storeParamsToHypo( const NbSegmentsHypothesisData& ) const;
|
|
|
|
|
|
|
|
private:
|
2009-02-17 10:27:49 +05:00
|
|
|
SalomeApp_IntSpinBox* myNbSeg;
|
2005-12-28 14:17:39 +05:00
|
|
|
QtxComboBox* myDistr;
|
|
|
|
SMESHGUI_SpinBox* myScale;
|
|
|
|
StdMeshersGUI_DistrTableFrame* myTable;
|
|
|
|
StdMeshersGUI_DistrPreview* myPreview;
|
|
|
|
QLineEdit *myName, *myExpr;
|
2009-02-17 10:27:49 +05:00
|
|
|
QGroupBox* myConvBox;
|
2005-12-28 14:17:39 +05:00
|
|
|
QButtonGroup* myConv;
|
2009-02-17 10:27:49 +05:00
|
|
|
QLabel *myLScale, *myLTable, *myLExpr, *myInfo;
|
2005-12-28 14:17:39 +05:00
|
|
|
QGridLayout* myGroupLayout;
|
|
|
|
int myTableRow, myPreviewRow;
|
2006-02-07 20:01:11 +05:00
|
|
|
QRadioButton* myCutNeg;
|
2005-12-28 14:17:39 +05:00
|
|
|
};
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
#endif // STDMESHERSGUI_NBSEGMENTSCREATOR_H
|