-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_CutSegmentDlg.cxx
// Author : Oleg UVAROV
// Module : VISU
#include "LightApp_Application.h"
#include "SalomeApp_Study.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SUIT_ResourceMgr.h"
QLabel* aPoint2YLabel = new QLabel( tr( "LBL_Y" ), aSegmentBox );
QLabel* aPoint2ZLabel = new QLabel( tr( "LBL_Z" ), aSegmentBox );
for( int i = 0; i < 3; i++ ) {
- myPoint1.append( new QtxDoubleSpinBox( aSegmentBox ) );
- myPoint2.append( new QtxDoubleSpinBox( aSegmentBox ) );
+ myPoint1.append( new SalomeApp_DoubleSpinBox( aSegmentBox ) );
+ myPoint2.append( new SalomeApp_DoubleSpinBox( aSegmentBox ) );
}
- QListIterator<QtxDoubleSpinBox*> anIter( myPoint1 + myPoint2 );
+ QListIterator<SalomeApp_DoubleSpinBox*> anIter( myPoint1 + myPoint2 );
while( anIter.hasNext() ) {
- QtxDoubleSpinBox* aSpinBox = anIter.next();
- aSpinBox->setDecimals( 6 );
+ SalomeApp_DoubleSpinBox* aSpinBox = anIter.next();
+ // Use default range - see QDoubleSpinBox minimum/maximum properties
+ VISU::initSpinBox( aSpinBox, 0., 99.99, 1., "length_precision" );
aSpinBox->setMinimumWidth( 100 );
}
//------------------------------------------------------------------------------
void VisuGUI_CutSegmentDlg::initFromPrsObject ( VISU::ColoredPrs3d_i* thePrs,
- bool theInit )
+ bool theInit )
{
if( theInit )
myPrsCopy = VISU::TSameAsFactory<VISU::TCUTSEGMENT>().Create(thePrs, VISU::ColoredPrs3d_i::EDoNotPublish);
aPoints->InsertNextPoint( aPoint2 );
vtkCellArray* aVerts = vtkCellArray::New();
- for( int i = 0, n = aPoints->GetNumberOfPoints(); i < n; i++ )
+ for( vtkIdType i = 0, n = aPoints->GetNumberOfPoints(); i < n; i++ )
aVerts->InsertNextCell( 1, &i );
vtkPolyData* aProfile = vtkPolyData::New();