1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #include <HYDROGUI_LocalCSDlg.h>
20 #include <QtxDoubleSpinBox.h>
24 const double RANGE = 1E+10;
25 const double STEP = 1.00;
26 const double PREC = 2;
28 HYDROGUI_LocalCSDlg::HYDROGUI_LocalCSDlg( HYDROGUI_Module* theModule, const QString& theTitle )
29 : HYDROGUI_InputPanel( theModule, theTitle )
31 QFrame* aFrame = new QFrame( mainFrame() );
32 addWidget( aFrame, 1 );
34 QGridLayout* aLayout = new QGridLayout( aFrame );
35 aLayout->setMargin( 5 );
36 aLayout->setSpacing( 5 );
38 myLX = new QtxDoubleSpinBox( 0, RANGE, STEP, PREC, PREC, aFrame );
39 myLX->setValue( 0.0 );
40 myLY = new QtxDoubleSpinBox( 0, RANGE, STEP, PREC, PREC, aFrame );
41 myLY->setValue( 0.0 );
43 aLayout->addWidget( new QLabel( tr( "LX" ), aFrame ), 0, 0 );
44 aLayout->addWidget( myLX, 0, 1 );
45 aLayout->addWidget( new QLabel( tr( "LY" ), aFrame ), 1, 0 );
46 aLayout->addWidget( myLY, 1, 1 );
47 aLayout->setColumnStretch( 0, 0 );
48 aLayout->setColumnStretch( 1, 1 );
49 aLayout->setRowStretch( 2, 1 );
52 HYDROGUI_LocalCSDlg::~HYDROGUI_LocalCSDlg()
56 double HYDROGUI_LocalCSDlg::GetLocalX() const
61 double HYDROGUI_LocalCSDlg::GetLocalY() const
66 void HYDROGUI_LocalCSDlg::SetLocalCS( double theLX, double theLY )
68 myLX->setValue( theLX );
69 myLY->setValue( theLY );