Back to index

salome-geom  6.5.0
BasicGUI_ParamCurveWidget.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // GEOM GEOMGUI : GUI for Geometry component
00024 // File   : BasicGUI_ParamCurveWidget.h
00025 // Author : Roman NIKOLAEV (roman.nikolaev@opencascade.com)
00026 
00027 #include "BasicGUI_ParamCurveWidget.h"
00028 
00029 #include <QLabel>
00030 #include <QLineEdit>
00031 #include <QGridLayout>
00032 #include <QGroupBox>
00033 
00034 #include <SalomeApp_DoubleSpinBox.h>
00035 #include <SalomeApp_IntSpinBox.h>
00036 
00037 
00038 BasicGUI_ParamCurveWidget::BasicGUI_ParamCurveWidget(QWidget* parent):
00039   QWidget(parent) {
00040 
00041   QGridLayout* l = new QGridLayout( this );
00042   l->setSpacing( 0 );
00043   l->setMargin( 0 );
00044 
00045   QGroupBox* groupBox = new QGroupBox( tr("GEOM_PCURVE_TITLE"), this );
00046 
00047   QGridLayout* gridLayout = new QGridLayout( groupBox );
00048   gridLayout->setSpacing( 6 );
00049   gridLayout->setMargin( 11 );
00050   
00051   //X Equation
00052   QLabel* textLabel1 = new QLabel( tr("GEOM_PCURVE_X"), groupBox );
00053   myXExpr = new QLineEdit( groupBox );
00054 
00055   //Y Equation
00056   QLabel* textLabel2 = new QLabel(tr("GEOM_PCURVE_Y"), groupBox);
00057   myYExpr = new QLineEdit( groupBox );
00058 
00059   //Z Equation
00060   QLabel* textLabel3 = new QLabel( tr("GEOM_PCURVE_Z"), groupBox );
00061   myZExpr = new QLineEdit( groupBox );
00062 
00063   // Min and Max
00064   QLabel* textLabel4 = new QLabel( tr("GEOM_PCURVE_MIN"), groupBox );
00065   myPMin = new SalomeApp_DoubleSpinBox( groupBox );
00066 
00067   // Min and Max
00068   QLabel* textLabel5 = new QLabel( tr("GEOM_PCURVE_MAX"), groupBox );
00069   myPMax = new SalomeApp_DoubleSpinBox( groupBox );    
00070 
00071   // Step
00072   QLabel* textLabel6 = new QLabel( tr("GEOM_PCURVE_NBSTEP"), groupBox );
00073   myPStep = new SalomeApp_IntSpinBox( groupBox );
00074 
00075   //Layout
00076   gridLayout->addWidget(textLabel1, 0, 0, 1, 1);
00077   gridLayout->addWidget(myXExpr,    0, 1, 1, 1);
00078 
00079   gridLayout->addWidget(textLabel2, 1, 0, 1, 1);
00080   gridLayout->addWidget(myYExpr,    1, 1, 1, 1);
00081 
00082   gridLayout->addWidget(textLabel3, 2, 0, 1, 1);
00083   gridLayout->addWidget(myZExpr,    2, 1, 1, 1);
00084 
00085   gridLayout->addWidget(textLabel4, 3, 0, 1, 1);
00086   gridLayout->addWidget(myPMin,     3, 1, 1, 1);
00087 
00088   gridLayout->addWidget(textLabel5, 4, 0, 1, 1);
00089   gridLayout->addWidget(myPMax,     4, 1, 1, 1);
00090 
00091   gridLayout->addWidget(textLabel6, 5, 0, 1, 1);
00092   gridLayout->addWidget(myPStep,    5, 1, 1, 1);
00093 
00094   l->addWidget(groupBox, 0, 0, 1, 1);
00095 }
00096 
00097 
00098 BasicGUI_ParamCurveWidget::~BasicGUI_ParamCurveWidget(){
00099 }