1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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, or (at your option) any later version.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include <HYDROGUI_LocalCSDlg.h>
24 #include <QtxDoubleSpinBox.h>
28 const double RANGE = 1E+10;
29 const double STEP = 1.00;
30 const double PREC = 2;
32 HYDROGUI_LocalCSDlg::HYDROGUI_LocalCSDlg( HYDROGUI_Module* theModule, const QString& theTitle )
33 : HYDROGUI_InputPanel( theModule, theTitle )
35 QFrame* aFrame = new QFrame( mainFrame() );
36 addWidget( aFrame, 1 );
38 QGridLayout* aLayout = new QGridLayout( aFrame );
39 aLayout->setMargin( 5 );
40 aLayout->setSpacing( 5 );
42 myLX = new QtxDoubleSpinBox( 0, RANGE, STEP, PREC, PREC, aFrame );
43 myLX->setValue( 0.0 );
44 myLY = new QtxDoubleSpinBox( 0, RANGE, STEP, PREC, PREC, aFrame );
45 myLY->setValue( 0.0 );
47 aLayout->addWidget( new QLabel( tr( "LX" ), aFrame ), 0, 0 );
48 aLayout->addWidget( myLX, 0, 1 );
49 aLayout->addWidget( new QLabel( tr( "LY" ), aFrame ), 1, 0 );
50 aLayout->addWidget( myLY, 1, 1 );
51 aLayout->setColumnStretch( 0, 0 );
52 aLayout->setColumnStretch( 1, 1 );
53 aLayout->setRowStretch( 2, 1 );
56 HYDROGUI_LocalCSDlg::~HYDROGUI_LocalCSDlg()
60 double HYDROGUI_LocalCSDlg::GetLocalX() const
65 double HYDROGUI_LocalCSDlg::GetLocalY() const
70 void HYDROGUI_LocalCSDlg::SetLocalCS( double theLX, double theLY )
72 myLX->setValue( theLX );
73 myLY->setValue( theLY );