Salome HOME
Merge from V6_3_BR 06/06/2011
[modules/geom.git] / src / BasicGUI / BasicGUI_ParamCurveWidget.cxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File   : BasicGUI_ParamCurveWidget.h
25 // Author : Roman NIKOLAEV (roman.nikolaev@opencascade.com)
26
27 #include "BasicGUI_ParamCurveWidget.h"
28
29 #include <QLabel>
30 #include <QLineEdit>
31 #include <QGridLayout>
32 #include <QGroupBox>
33
34 #include <SalomeApp_DoubleSpinBox.h>
35
36
37 BasicGUI_ParamCurveWidget::BasicGUI_ParamCurveWidget(QWidget* parent):
38   QWidget(parent) {
39
40   QGridLayout* l = new QGridLayout( this );
41   l->setSpacing( 0 );
42   l->setMargin( 0 );
43
44   QGroupBox* groupBox = new QGroupBox( tr("GEOM_PCURVE_TITLE"), this );
45
46   QGridLayout* gridLayout = new QGridLayout( groupBox );
47   gridLayout->setSpacing( 6 );
48   gridLayout->setMargin( 11 );
49   
50   //X Equation
51   QLabel* textLabel1 = new QLabel( tr("GEOM_PCURVE_X"), groupBox );
52   myXExpr = new QLineEdit( groupBox );
53
54   //Y Equation
55   QLabel* textLabel2 = new QLabel(tr("GEOM_PCURVE_Y"), groupBox);
56   myYExpr = new QLineEdit( groupBox );
57
58   //Z Equation
59   QLabel* textLabel3 = new QLabel( tr("GEOM_PCURVE_Z"), groupBox );
60   myZExpr = new QLineEdit( groupBox );
61
62   // Min and Max
63   QLabel* textLabel4 = new QLabel( tr("GEOM_PCURVE_MIN"), groupBox );
64   myPMin = new SalomeApp_DoubleSpinBox( groupBox );
65
66   // Min and Max
67   QLabel* textLabel5 = new QLabel( tr("GEOM_PCURVE_MAX"), groupBox );
68   myPMax = new SalomeApp_DoubleSpinBox( groupBox );    
69
70   // Step
71   QLabel* textLabel6 = new QLabel( tr("GEOM_PCURVE_STEP"), groupBox );
72   myPStep = new SalomeApp_DoubleSpinBox( groupBox );
73
74   //Layout
75   gridLayout->addWidget(textLabel1, 0, 0, 1, 1);
76   gridLayout->addWidget(myXExpr,    0, 1, 1, 1);
77
78   gridLayout->addWidget(textLabel2, 1, 0, 1, 1);
79   gridLayout->addWidget(myYExpr,    1, 1, 1, 1);
80
81   gridLayout->addWidget(textLabel3, 2, 0, 1, 1);
82   gridLayout->addWidget(myZExpr,    2, 1, 1, 1);
83
84   gridLayout->addWidget(textLabel4, 3, 0, 1, 1);
85   gridLayout->addWidget(myPMin,     3, 1, 1, 1);
86
87   gridLayout->addWidget(textLabel5, 4, 0, 1, 1);
88   gridLayout->addWidget(myPMax,     4, 1, 1, 1);
89
90   gridLayout->addWidget(textLabel6, 5, 0, 1, 1);
91   gridLayout->addWidget(myPStep,    5, 1, 1, 1);
92
93   l->addWidget(groupBox, 0, 0, 1, 1);
94 }
95
96
97 BasicGUI_ParamCurveWidget::~BasicGUI_ParamCurveWidget(){
98 }