-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 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) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_GaussPointsDlg.cxx
// Author : Oleg UVAROV
// Module : VISU
-
+//
#include "VisuGUI_GaussPointsDlg.h"
#include "VISUConfig.hh"
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
+#include "VisuGUI_PrimitiveBox.h"
+#include "VisuGUI_SizeBox.h"
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_GaussPoints_i.hh"
#include "VISU_OpenGLPointSpriteMapper.hxx"
#include "VISU_Convertor.hxx"
-#include "VVTK_PrimitiveBox.h"
-#include "VVTK_SizeBox.h"
-
#include "LightApp_Application.h"
#include "SalomeApp_Module.h"
+#include "SalomeApp_IntSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_SelectionMgr.h"
#include "SUIT_Desktop.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_MessageBox.h"
#include "SVTK_FontWidget.h"
-#include "QtxDoubleSpinBox.h"
-
#include <QLayout>
#include <QTabWidget>
#include <QButtonGroup>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
-#include <QSpinBox>
#include <QComboBox>
#include <QToolButton>
#include <QTabWidget>
RangeGroup->addButton( RBImposedRange );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
+ int aPrecision = qAbs(aResourceMgr->integerValue( "VISU", "visual_data_precision", 0 ));
QDoubleValidator* dv = new QDoubleValidator(this);
dv->setDecimals(aPrecision);
TypeGroup->addButton( RainbowButton );
ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup );
- ColorSpin = new QSpinBox( ColLabGroup );
+ ColorSpin = new SalomeApp_IntSpinBox( ColLabGroup );
+ ColorSpin->setAcceptNames( false );
ColorSpin->setMinimum( 2 );
ColorSpin->setMaximum( 256 );
ColorSpin->setSingleStep( 1 );
ColorSpin->setValue( 64 );
LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
- LabelSpin = new QSpinBox( ColLabGroup );
+ LabelSpin = new SalomeApp_IntSpinBox( ColLabGroup );
+ LabelSpin->setAcceptNames( false );
LabelSpin->setMinimum( 2 );
LabelSpin->setMaximum( 65 );
LabelSpin->setSingleStep( 1 );
OriginGroupLayout->setMargin( 11 );
QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup );
- XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ XSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( XSpin, 0.0, 1.0, 0.1, "parametric_precision" );
XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
XSpin->setMinimumWidth( 70 );
XSpin->setValue( 0.01 );
QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup );
- YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ YSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( YSpin, 0.0, 1.0, 0.1, "parametric_precision" );
YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
YSpin->setMinimumWidth( 70 );
YSpin->setValue( 0.01 );
DimGroupLayout->setMargin( 11 );
QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup );
- WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ WidthSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( WidthSpin, 0.0, 1.0, 0.1, "parametric_precision" );
WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
WidthSpin->setMinimumWidth( 70 );
WidthSpin->setValue( 0.1 );
QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup );
- HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ HeightSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( HeightSpin, 0.0, 1.0, 0.1, "parametric_precision" );
HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
HeightSpin->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
QLabel* SpacingLabel = new QLabel (tr("LBL_SPACING"), DimGroup );
- SpacingSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.01, DimGroup );
+ SpacingSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( SpacingSpin, 0.0, 1.0, 0.01, "parametric_precision" );
SpacingSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpacingSpin->setMinimumWidth( 70 );
SpacingSpin->setValue( 0.01 );
MaxEdit->setEnabled( false );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetMax(), 'g', aPrecision));
MaxEdit->setEnabled( RBImposedRange->isChecked() );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetMax(), 'g', aPrecision));
MaxEdit->setEnabled( false );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetMax(), 'g', aPrecision));
myPrsCopy->SetScalarMode( theMode );
if ( UseFieldRange() ) {
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetSourceMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetSourceMax(), 'g', aPrecision));
}
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(thePrs->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(thePrs->GetMax(), 'g', aPrecision));
*/
void VisuGUI_GaussScalarBarPane::XYChanged( double )
{
- QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
+ SalomeApp_DoubleSpinBox* snd = (SalomeApp_DoubleSpinBox*)sender();
if ( snd == XSpin ) {
WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
aVBLay->setSpacing(6);
// Primitive
- myPrimitiveBox = new VVTK_PrimitiveBox( aBox );
+ myPrimitiveBox = new VisuGUI_PrimitiveBox( aBox );
aVBLay->addWidget( myPrimitiveBox );
// Size
- mySizeBox = new VVTK_SizeBox( aBox );
+ mySizeBox = new VisuGUI_SizeBox( aBox );
aVBLay->addWidget( mySizeBox );
// Deformed Shape
aDefShapeLayout->setSpacing(6);
aDefShapeLayout->setMargin(11);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
QLabel* aScaleLabel = new QLabel( tr( "SCALE_FACTOR" ), myDefShapeBox );
- myScaleSpinBox = new QtxDoubleSpinBox( 0.0, 10.0, 0.1, aPrecision*(-1), 32, myDefShapeBox );
+ myScaleSpinBox = new SalomeApp_DoubleSpinBox( myDefShapeBox );
+ VISU::initSpinBox( myScaleSpinBox, 0.0, 10.0, 0.1, "visual_data_precision" );
aDefShapeLayout->addWidget( aScaleLabel, 0, 0 );
aDefShapeLayout->addWidget( myScaleSpinBox, 0, 1 );
myPrimitiveBox->setResolution( myPrsCopy->GetResolution() );
myPrimitiveBox->setFaceLimit( myPrsCopy->GetFaceLimit() );
- mySizeBox->setType( isResults || isDeformed ? VVTK_SizeBox::Results : VVTK_SizeBox::Geometry );
+ mySizeBox->setType( isResults || isDeformed ? VisuGUI_SizeBox::Results : VisuGUI_SizeBox::Geometry );
mySizeBox->setGeomSize( myPrsCopy->GetGeomSize() );
mySizeBox->setMinSize( myPrsCopy->GetMinSize() );
mySizeBox->setMaxSize( myPrsCopy->GetMaxSize() );
if( on )//myDefShapeButton->isChecked() )
{
myDefShapeBox->show();
- mySizeBox->setType( VVTK_SizeBox::Results );
+ mySizeBox->setType( VisuGUI_SizeBox::Results );
}
else
myDefShapeBox->hide();