<parameter name="plot3d_represent" value="2"/>
<parameter name="scalar_def_represent" value="2"/>
<parameter name="scalar_def_shrink" value="false"/>
- <parameter name="floating_point_precision" value="6"/>
+ <!-- Input field precisions -->
+ <parameter name="length_precision" value="-3" />
+ <parameter name="angle_precision" value="-3" />
+ <parameter name="len_tol_precision" value="3" />
+ <parameter name="parametric_precision" value="-3" />
+ <parameter name="memory_precision" value="1" />
+ <parameter name="visual_data_precision" value="-6"/>
+
<parameter name="quadratic_mode" value="0" />
<parameter name="max_angle" value="2" />
<parameter name="elem0d_size" value="5" />
salomeinclude_HEADERS= \
VisuGUI_TableDlg.h \
- VisuGUITools.h
+ VisuGUITools.h \
+ VisuGUI_GUITools.h
-dist_libVISUGUITOOLS_la_SOURCES= VisuGUI_TableDlg.cxx
+dist_libVISUGUITOOLS_la_SOURCES= \
+ VisuGUI_TableDlg.cxx \
+ VisuGUI_GUITools.cxx
MOC_FILES= VisuGUI_TableDlg_moc.cxx
nodist_libVISUGUITOOLS_la_SOURCES=$(MOC_FILES)
libVISUGUITOOLS_la_LDFLAGS= \
$(KERNEL_LDFLAGS) -lSALOMELocalTrace \
- $(GUI_LDFLAGS) -lCAM -lsuit -lqtx
+ $(GUI_LDFLAGS) -lCAM -lsuit -lqtx -lSalomeApp
--- /dev/null
+// 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
+//
+// 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.
+//
+// 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
+//
+// File : VisuGUI_GUITools.cxx
+// Author : Sergey ANIKIN, Open CASCADE S.A.S.
+// Module : VISU
+//
+
+#include "VisuGUI_GUITools.h"
+
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+
+#include <QVariant>
+
+namespace VISU{
+ void initSpinBox( SalomeApp_IntSpinBox* sb,
+ const int bottom,
+ const int top,
+ const int step )
+ {
+ sb->setAcceptNames( false );
+ sb->setRange( bottom, top );
+ sb->setSingleStep( step );
+ }
+
+ void initSpinBox( SalomeApp_DoubleSpinBox* sb,
+ const double& bottom,
+ const double& top,
+ const double& step,
+ const char* quantity )
+ {
+ // Obtain precision from preferences
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ int precision = resMgr->integerValue( "VISU", quantity, 3 );
+
+ sb->setPrecision ( precision );
+ sb->setDecimals ( qAbs(precision) );
+ sb->setRange ( bottom, top );
+ sb->setSingleStep ( step );
+ sb->setDefaultValue( bottom );
+ sb->setAcceptNames ( false );
+
+ // Add a hint for the user saying how to tune precision
+ QString userPropName = QObject::tr( QString( "VISU_PREF_%1" ).arg( quantity ).toLatin1().constData() );
+ sb->setProperty( "validity_tune_hint",
+ QVariant( QObject::tr( "VISU_PRECISION_HINT" ).arg( userPropName ) ) );
+ }
+}
--- /dev/null
+// 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
+//
+// 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.
+//
+// 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
+//
+// File : VisuGUI_GUITools.h
+// Author : Sergey ANIKIN, Open CASCADE S.A.S.
+// Module : VISU
+//
+#ifndef VISUGUI_GUITOOLS_H
+#define VISUGUI_GUITOOLS_H
+
+class SalomeApp_IntSpinBox;
+class SalomeApp_DoubleSpinBox;
+
+namespace VISU{
+ void initSpinBox( SalomeApp_IntSpinBox*, const int, const int, const int );
+ void initSpinBox( SalomeApp_DoubleSpinBox*, const double&, const double&, const double&, const char* );
+}
+
+#endif
#
# $Header$
#
-SUBDIRS = CONVERTOR PIPELINE OBJECT VVTK GUITOOLS VISU_I VISUGUI VISU_SWIG ENGINE
+SUBDIRS = CONVERTOR PIPELINE OBJECT GUITOOLS VVTK VISU_I VISUGUI VISU_SWIG ENGINE
#include <stdexcept>
#include <sstream>
+#include <cmath> // to use std::abs( int )
// VTK Includes
#include <vtkProperty.h>
char aFormat[16] = "%g";
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
if (aResourceMgr) {
- int aFloatingPrec = aResourceMgr->integerValue("VISU", "floating_point_precision", 6);
+ // san: precision can be negative - this is used by double spin boxes
+ int aFloatingPrec = std::abs( aResourceMgr->integerValue("VISU", "visual_data_precision", 6) );
sprintf(aFormat, "%%.%dg", aFloatingPrec);
//cout << "$$$ aFormat = " << aFormat << endl;
}
#include <SUIT_ResourceMgr.h>
#include <sstream>
+#include <cmath> // to use std::abs( int )
#include <vtkObjectFactory.h>
#include <vtkUnstructuredGrid.h>
void *aPtr = aScalars->GetVoidPointer(0);
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
- int aDecimals = aResourceMgr->integerValue("VISU", "floating_point_precision", 6);
+ // san: precision can be negative - this is used by double spin boxes
+ int aDecimals = std::abs( aResourceMgr->integerValue("VISU", "visual_data_precision", 6) );
switch(aDataType) {
vtkTemplateMacro3(CutScalarsTempl,
<translation>Def. Shape and Scalar Map</translation>
</message>
<message>
- <source>VISU_FLOATING_POINT_PRECISION</source>
- <translation>Floating Point Precision</translation>
+ <source>VISU_PREF_GENERAL</source>
+ <translation>General</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_GROUP_PRECISION</source>
+ <translation>Input Fields Precision</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_visual_data_precision</source>
+ <translation>Visual Data Precision</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_length_precision</source>
+ <translation>Length Precision</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_angle_precision</source>
+ <translation>Angular Precision</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_len_tol_precision</source>
+ <translation>Length Tolerance Precision</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_parametric_precision</source>
+ <translation>Parametric Precision</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_memory_precision</source>
+ <translation>Memory Size Precision</translation>
+ </message>
+ <message>
+ <source>VISU_PRECISION_HINT</source>
+ <translation>
+Input value precision can be adjusted using
+'%1' parameter in Post-Pro module preferences.</translation>
</message>
<message>
<source>VISU_REALLY_DELETE</source>
<source>MEN_EXPORT_TABLE</source>
<translation>Export Table</translation>
</message>
+ <message>
+ <source>VISU_MEN_EXPORT_MED</source>
+ <translation>Export to MED file</translation>
+ </message>
<message>
<source>MEN_FEATURE_EDGES</source>
<translation>Feature Edges</translation>
tr("MEN_FILE_INFO"), "", 0, aParent, false,
this, SLOT(OnFileInfo()));
- createAction( VISU_EXPORT_MED, tr("MEN_EXPORT_MED"), QIcon(),
- tr("MEN_EXPORT_MED"), "", 0, aParent, false,
+ createAction( VISU_EXPORT_MED, tr("VISU_MEN_EXPORT_MED"), QIcon(),
+ tr("VISU_MEN_EXPORT_MED"), "", 0, aParent, false,
this, SLOT(OnExportMED()));
createAction( VISU_FILTERSCALARS, tr("MEN_FILTER_SCALARS"), QIcon(),
void VisuGUI::createPreferences()
{
+ // TAB: General
+ int genTab = addPreference( tr( "VISU_PREF_GENERAL" ) );
+ // Quantities with individual precision settings
+ int precGroup = addPreference( tr( "VISU_PREF_GROUP_PRECISION" ), genTab );
+ setPreferenceProperty( precGroup, "columns", 2 );
+
+ // Default precision used by some input fieklds and data visualization code
+ // Moved here from "Representation" tab to have all precisions in the same place
+ int point_precision = addPreference( tr( "VISU_PREF_visual_data_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "visual_data_precision" );
+ setPreferenceProperty( point_precision, "min", -16 );
+ setPreferenceProperty( point_precision, "max", 16 );
+ setPreferenceProperty( point_precision, "step", 1 );
+
+ const int nbQuantities = 5;
+ int precs[nbQuantities], ii = 0;
+ precs[ii++] = addPreference( tr( "VISU_PREF_length_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "length_precision" );
+ precs[ii++] = addPreference( tr( "VISU_PREF_angle_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "angle_precision" );
+ precs[ii++] = addPreference( tr( "VISU_PREF_len_tol_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "len_tol_precision" );
+ precs[ii++] = addPreference( tr( "VISU_PREF_parametric_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "parametric_precision" );
+ precs[ii ] = addPreference( tr( "VISU_PREF_memory_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "memory_precision" );
+
+ // Set property for precision value for spinboxes
+ for ( ii = 0; ii < nbQuantities; ii++ ){
+ setPreferenceProperty( precs[ii], "min", ii == 2 ? 0 : -10 );
+ setPreferenceProperty( precs[ii], "max", ii == 2 ? 3 : 10 );
+ setPreferenceProperty( precs[ii], "precision", 2 );
+ }
+
+
// TAB: "MED import"
int importTab = addPreference( tr( "MED import" ) );
//printf( "++++++++++++++++++ Tab index %d\n", importTab );
setPreferenceProperty( scalar_def_represent, "indexes", indices1 );
addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "scalar_def_shrink" );
- int point_precision = addPreference( tr( "VISU_FLOATING_POINT_PRECISION" ), representGr,
- LightApp_Preferences::IntSpin, "VISU", "floating_point_precision" );
- setPreferenceProperty( point_precision, "min", 1 );
- setPreferenceProperty( point_precision, "max", 16 );
- setPreferenceProperty( point_precision, "step", 1 );
addPreference( "", representGr, LightApp_Preferences::Space );
SUIT_FileDlg::getFileName(GetDesktop(this),
aPath,
aFilter,
- tr("MEN_EXPORT_MED"), // "Export To Med File"
+ tr("VISU_MEN_EXPORT_MED"), // "Export To Med File"
false);
QString aFile = aFileInfo.filePath();
#include "VisuGUI_Tools.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_PipeLine.hxx"
#include "SUIT_Desktop.h"
#include "SUIT_ResourceMgr.h"
#include "SalomeApp_Module.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_Application.h"
-#include "QtxDoubleSpinBox.h"
-
#include <QButtonGroup>
#include <QGroupBox>
#include <QLabel>
myMimimalMemoryButton->setChecked( !isLimitedMemory );
aGridLay->addWidget( myMimimalMemoryButton, 1, 0 );
- myLimitedMemory = new QtxDoubleSpinBox( 1.0, aLimitedMemoryMax, 10.0, aGB );
+ myLimitedMemory = new SalomeApp_DoubleSpinBox( aGB );
+ VISU::initSpinBox( myLimitedMemory, 1.0, aLimitedMemoryMax, 10.0, "memory_precision" );
myLimitedMemory->setSuffix( " Mb" );
myLimitedMemory->setValue( aLimitedMemory );
myLimitedMemory->setEnabled( isLimitedMemory );
class QLineEdit;
class QRadioButton;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class SalomeApp_Module;
QRadioButton* myMimimalMemoryButton;
QRadioButton* myLimitedMemoryButton;
- QtxDoubleSpinBox* myLimitedMemory;
+ SalomeApp_DoubleSpinBox* myLimitedMemory;
QLineEdit* myUsedMemory;
QLineEdit* myFreeMemory;
#include "VisuGUI_Tools.h"
#include "VisuGUI_ViewTools.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_Prs3d_i.hh"
#include "VISU_Result_i.hh"
#include "VISU_ColoredPrs3dHolder_i.hh"
#include "VISU_PipeLine.hxx"
#include "VISU_DataSetActor.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include "LightApp_SelectionMgr.h"
#include "LightApp_Application.h"
#include <QValidator>
#include <QTabWidget>
#include <QRadioButton>
-#include <QSpinBox>
#include <QKeyEvent>
#include <QPushButton>
#include <QListWidget>
vw->Repaint();
}
}
-
- void RangeStepAndValidator (QtxDoubleSpinBox* theSpinBox, double min, double max,
- double step, unsigned short decimals)
- {
- theSpinBox->setRange(min, max);
- theSpinBox->setSingleStep(step);
- theSpinBox->setRange(min, max );
- theSpinBox->setDecimals( decimals);
- }
};
//=================================================================================
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
// Initial state
- VISU::RangeStepAndValidator(SpinBoxDistance, 0.0, 1.0, 0.01, 3);
- VISU::RangeStepAndValidator(SpinBoxRot1, -180.0, 180.0, 1, 3);
- VISU::RangeStepAndValidator(SpinBoxRot2, -180.0, 180.0, 1, 3);
+ VISU::initSpinBox( SpinBoxDistance, 0., 1., .01, "length_precision" );
+ VISU::initSpinBox( SpinBoxRot1, -180., 180., 1., "angle_precision" );
+ VISU::initSpinBox( SpinBoxRot2, -180., 180., 1., "angle_precision" );
ComboBoxOrientation->addItem(tr("PARALLEL_XOY_COMBO_ITEM"));
ComboBoxOrientation->addItem(tr("PARALLEL_YOZ_COMBO_ITEM"));
TextLabelDistance->setText(tr("LBL_DISTANCE"));
GroupParametersLayout->addWidget(TextLabelDistance, 1, 0);
- SpinBoxDistance = new QtxDoubleSpinBox(GroupParameters);
+ SpinBoxDistance = new SalomeApp_DoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxDistance, 1, 1);
TextLabelRot1 = new QLabel(GroupParameters);
TextLabelRot1->setText(tr("LBL_ROTATION_YZ"));
GroupParametersLayout->addWidget(TextLabelRot1, 2, 0);
- SpinBoxRot1 = new QtxDoubleSpinBox(GroupParameters);
+ SpinBoxRot1 = new SalomeApp_DoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxRot1, 2, 1);
TextLabelRot2 = new QLabel(GroupParameters);
TextLabelRot2->setText(tr("LBL_ROTATION_XZ"));
GroupParametersLayout->addWidget(TextLabelRot2, 3, 0);
- SpinBoxRot2 = new QtxDoubleSpinBox(GroupParameters);
+ SpinBoxRot2 = new SalomeApp_DoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxRot2, 3, 1);
return GroupParameters;
// Index
TextLabelIJKIndex = new QLabel(WidgetIJKTab);
TextLabelIJKIndex->setText(tr("LBL_IJK_INDEX"));
- SpinBoxIJKIndex = new QSpinBox(WidgetIJKTab);
+ SpinBoxIJKIndex = new SalomeApp_IntSpinBox(WidgetIJKTab);
+ SpinBoxIJKIndex->setAcceptNames( false );
// Orientation
CheckBoxIJKPlaneReverse = new QCheckBox (tr("REVERSE_NORMAL_CHK"), WidgetIJKTab);
#include "SALOME_InteractiveObject.hxx"
-#include "QtxDoubleSpinBox.h"
+#include "SalomeApp_DoubleSpinBox.h"
// QT Includes
#include <QDialog>
class QGroupBox;
class QComboBox;
class QButtonGroup;
-class QSpinBox;
class QTabWidget;
class QListWidget;
class SALOME_Actor;
-class QtxDoubleSpinBox;
-
class SVTK_ViewWindow;
class LightApp_SelectionMgr;
+class SalomeApp_IntSpinBox;
+
class VisuGUI;
class vtkPlaneSource;
class vtkDataSetMapper;
QTabWidget* TabPane;
QComboBox* ComboBoxOrientation;
- QtxDoubleSpinBox* SpinBoxDistance;
- QtxDoubleSpinBox* SpinBoxRot1;
- QtxDoubleSpinBox* SpinBoxRot2;
+ SalomeApp_DoubleSpinBox* SpinBoxDistance;
+ SalomeApp_DoubleSpinBox* SpinBoxRot1;
+ SalomeApp_DoubleSpinBox* SpinBoxRot2;
QWidget* WidgetIJKTab;
QButtonGroup* ButtonGroupIJKAxis;
QGroupBox* GroupBoxIJKAxis;
QLabel* TextLabelIJKIndex;
- QSpinBox* SpinBoxIJKIndex;
+ SalomeApp_IntSpinBox* SpinBoxIJKIndex;
QCheckBox* CheckBoxIJKPlaneReverse;
QCheckBox* PreviewCheckBox;
#include "VisuGUI_Tools.h"
#include "VisuGUI_ViewTools.h"
+#include <VisuGUI_GUITools.h>
+
#include <VISU_Gen_i.hh>
#include <LightApp_Application.h>
#include <SUIT_ViewManager.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
-#include <QtxDoubleSpinBox.h>
#include <SVTK_ViewWindow.h>
#include <VTKViewer_Utilities.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <QVBoxLayout>
#include <QHBoxLayout>
QHBoxLayout* aOriginLayout = new QHBoxLayout(aOriginGroup);
aOriginLayout->addWidget( new QLabel("X", aOriginGroup) );
- myXOrigin = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aOriginGroup );
+ myXOrigin = new SalomeApp_DoubleSpinBox( aOriginGroup );
+ VISU::initSpinBox( myXOrigin, -1000.0, 1000.0, 0.1, "length_precision" );
myXOrigin->setValue( 0.0 );
connect(myXOrigin, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aOriginLayout->addWidget( myXOrigin );
aOriginLayout->addWidget( new QLabel("Y", aOriginGroup) );
- myYOrigin = new QtxDoubleSpinBox( -1000.0, 1000, 0.1, aOriginGroup );
+ myYOrigin = new SalomeApp_DoubleSpinBox( aOriginGroup );
+ VISU::initSpinBox( myYOrigin, -1000.0, 1000.0, 0.1, "length_precision" );
myYOrigin->setValue( 0.0 );
connect(myYOrigin, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aOriginLayout->addWidget( myYOrigin );
aOriginLayout->addWidget( new QLabel("Z", aOriginGroup) );
- myZOrigin = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aOriginGroup );
+ myZOrigin = new SalomeApp_DoubleSpinBox( aOriginGroup );
+ VISU::initSpinBox( myZOrigin, -1000.0, 1000.0, 0.1, "length_precision" );
myZOrigin->setValue( 0.0 );
connect(myZOrigin, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aOriginLayout->addWidget( myZOrigin );
QHBoxLayout* aDirLayout = new QHBoxLayout(aDirGroup);
aDirLayout->addWidget( new QLabel("dX", aDirGroup) );
- myXDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+ myXDir = new SalomeApp_DoubleSpinBox( aDirGroup );
+ VISU::initSpinBox( myXDir, -1000.0, 1000.0, 0.1, "length_precision" );
myXDir->setValue( 0.0 );
connect(myXDir, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aDirLayout->addWidget( myXDir );
aDirLayout->addWidget( new QLabel("dY", aDirGroup) );
- myYDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+ myYDir = new SalomeApp_DoubleSpinBox( aDirGroup );
+ VISU::initSpinBox( myYDir, -1000.0, 1000.0, 0.1, "length_precision" );
myYDir->setValue( 0.0 );
connect(myYDir, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aDirLayout->addWidget( myYDir );
aDirLayout->addWidget( new QLabel("dZ", aDirGroup) );
- myZDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+ myZDir = new SalomeApp_DoubleSpinBox( aDirGroup );
+ VISU::initSpinBox( myZDir, -1000.0, 1000.0, 0.1, "length_precision" );
myZDir->setValue( 1.0 );
connect(myZDir, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aDirLayout->addWidget( myZDir );
class QLineEdit;
class QCheckBox;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class vtkImplicitPlaneWidget;
class vtkCallbackCommand;
class vtkObject;
QLineEdit* myNameEdt;
- QtxDoubleSpinBox* myXOrigin;
- QtxDoubleSpinBox* myYOrigin;
- QtxDoubleSpinBox* myZOrigin;
+ SalomeApp_DoubleSpinBox* myXOrigin;
+ SalomeApp_DoubleSpinBox* myYOrigin;
+ SalomeApp_DoubleSpinBox* myZOrigin;
- QtxDoubleSpinBox* myXDir;
- QtxDoubleSpinBox* myYDir;
- QtxDoubleSpinBox* myZDir;
+ SalomeApp_DoubleSpinBox* myXDir;
+ SalomeApp_DoubleSpinBox* myYDir;
+ SalomeApp_DoubleSpinBox* myZDir;
QCheckBox* myAutoApply;
#include "LightApp_Application.h"
+#include <SalomeApp_IntSpinBox.h>
+
#include <QLayout>
#include <QLabel>
#include <QPushButton>
-#include <QSpinBox>
#include <QGroupBox>
#include <QKeyEvent>
Comment2->setAlignment( Qt::AlignCenter );
TopGroupBoxLayout->addWidget( Comment2, 1, 0 );
- SpinBox1 = new QSpinBox( TopGroupBox );
+ SpinBox1 = new SalomeApp_IntSpinBox( TopGroupBox );
+ SpinBox1->setAcceptNames( false );
SpinBox1->setMinimum( 0 );
SpinBox1->setMaximum(100 );
SpinBox1->setSingleStep( 1 );
#include <QDialog>
class QLabel;
class QPushButton;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QGroupBox;
class VisuGUI_CursorDlg : public QDialog
QGroupBox* TopGroupBox;
QLabel* Comment1;
QLabel* Comment2;
- QSpinBox* SpinBox1;
+ SalomeApp_IntSpinBox* SpinBox1;
QGroupBox* GroupButtons;
QPushButton* buttonOk;
QPushButton* buttonCancel;
#include "VisuGUI_Tools.h"
#include "VisuGUI_ViewTools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
#include "VISU_Gen_i.hh"
#include "VISU_CutLines_i.hh"
#include "LightApp_Application.h"
#include "SalomeApp_Study.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SUIT_Desktop.h"
#include "SUIT_Session.h"
myRotXLbl = new QLabel( tr( "LBL_ROT_X" ), aRotBox);
aGridLay->addWidget( myRotXLbl, 0, 0 );
- myRotXSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+ myRotXSpn = new SalomeApp_DoubleSpinBox( aRotBox );
+ VISU::initSpinBox( myRotXSpn, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotXSpn, 0, 1 );
myRotXSpn->setValue( 0 );
myRotYLbl = new QLabel( tr( "LBL_ROT_Y" ), aRotBox );
aGridLay->addWidget( myRotYLbl, 1, 0 );
- myRotYSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+ myRotYSpn = new SalomeApp_DoubleSpinBox( aRotBox );
+ VISU::initSpinBox( myRotYSpn, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotYSpn, 1, 1 );
myRotYSpn->setValue( 0 );
aHBLay->setSpacing(5);
aHBLay->addWidget( new QLabel (tr("LBL_POS"), aPosBox) );
- myPosSpn = new QtxDoubleSpinBox (0, 1, 0.1, aPosBox);
+ myPosSpn = new SalomeApp_DoubleSpinBox (aPosBox);
+ VISU::initSpinBox( myPosSpn, 0., 1., .1, "parametric_precision" );
myPosSpn->setValue(0.5);
aHBLay->addWidget( myPosSpn );
aPlaneLayout->addWidget(aPosBox);
myRotXLbl2 = new QLabel( tr( "LBL_ROT_X" ), aRotBox2);
aGridLay->addWidget( myRotXLbl2, 0, 0 );
- myRotXSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+ myRotXSpn2 = new SalomeApp_DoubleSpinBox( aRotBox2 );
+ VISU::initSpinBox( myRotXSpn2, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotXSpn2, 0, 1 );
myRotXSpn2->setValue( 0 );
myRotYLbl2 = new QLabel( tr( "LBL_ROT_Y" ), aRotBox2 );
aGridLay->addWidget( myRotYLbl2, 1, 0 );
- myRotYSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+ myRotYSpn2 = new SalomeApp_DoubleSpinBox( aRotBox2 );
+ VISU::initSpinBox( myRotYSpn2, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotYSpn2, 1, 1 );
myRotYSpn2->setValue( 0 );
aLinesLayout->addWidget( aRotBox2 );
aHBLay = new QHBoxLayout( aNbBox );
aHBLay->setSpacing(5);
aHBLay->addWidget( new QLabel( tr( "LBL_NB_PLANS" ), aNbBox ) );
- myNbSpn = new QtxDoubleSpinBox( 1, 100, 1, aNbBox );
+ myNbSpn = new SalomeApp_DoubleSpinBox( aNbBox );
+ VISU::initSpinBox( myNbSpn, 1., 100., 1., "parametric_precision" );
myNbSpn->setValue( 10 );
aHBLay->addWidget( myNbSpn );
aHBLay = new QHBoxLayout( aPosBox2 );
aHBLay->setSpacing(5);
aHBLay->addWidget( new QLabel( tr( "LBL_POS" ), aPosBox2 ) );
- myPosSpn2 = new QtxDoubleSpinBox( 0, 1, 0.1, aPosBox2 );
+ myPosSpn2 = new SalomeApp_DoubleSpinBox( aPosBox2 );
+ VISU::initSpinBox( myPosSpn2, 0., 1., .1, "parametric_precision" );
myPosSpn2->setValue( 0.5 );
aHBLay->addWidget( myPosSpn2 );
class SUIT_ViewManager;
class SalomeApp_Module;
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
void updateGlyphs(bool update);
QButtonGroup* mySelPlane;
- QtxDoubleSpinBox* myRotXSpn;
- QtxDoubleSpinBox* myRotYSpn;
+ SalomeApp_DoubleSpinBox* myRotXSpn;
+ SalomeApp_DoubleSpinBox* myRotYSpn;
QLabel* myRotXLbl;
QLabel* myRotYLbl;
- QtxDoubleSpinBox* myPosSpn;
+ SalomeApp_DoubleSpinBox* myPosSpn;
QLineEdit* myBasePlanePos;
QCheckBox* myCBSetDef;
QCheckBox* myCreateTable;
QCheckBox* myCurvesCheck;
QButtonGroup* mySelPlane2;
- QtxDoubleSpinBox* myNbSpn;
- QtxDoubleSpinBox* myRotXSpn2;
- QtxDoubleSpinBox* myRotYSpn2;
+ SalomeApp_DoubleSpinBox* myNbSpn;
+ SalomeApp_DoubleSpinBox* myRotXSpn2;
+ SalomeApp_DoubleSpinBox* myRotYSpn2;
QLabel* myRotXLbl2;
QLabel* myRotYLbl2;
- QtxDoubleSpinBox* myPosSpn2;
+ SalomeApp_DoubleSpinBox* myPosSpn2;
QTableWidget* myPosTable;
bool hasInit;
#include "VisuGUI_Tools.h"
#include "VisuGUI_ViewTools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_CutPlanes_i.hh"
#include "LightApp_Application.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include "SUIT_Application.h"
#include "SUIT_Desktop.h"
#include "SUIT_ViewWindow.h"
#include <QLineEdit>
#include <QTabWidget>
#include <QKeyEvent>
-#include <QSpinBox>
#include <QRadioButton>
#include <QTableWidget>
#include <QGroupBox>
QLabel* LabelPosi_3 = new QLabel (tr("LBL_NB_PLANS"), this);
- nbPlan = new QSpinBox( this );
+ nbPlan = new SalomeApp_IntSpinBox( this );
+ nbPlan->setAcceptNames( false );
nbPlan->setMinimum( 1 );
nbPlan->setMaximum(100);
nbPlan->setSingleStep( 1 );
LabelRot1 = new QLabel (tr("LBL_ROT_X"), GBrot );
GBrotLayout->addWidget( LabelRot1, 0, 0 );
- Rot1 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
+ Rot1 = new SalomeApp_DoubleSpinBox( GBrot );
+ VISU::initSpinBox( Rot1, -180., 180., 10., "angle_precision" );
Rot1->setValue( 0 );
Rot1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( Rot1, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
LabelRot2 = new QLabel (tr("LBL_ROT_Y"), GBrot );
GBrotLayout->addWidget( LabelRot2, 1, 0 );
- Rot2 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
+ Rot2 = new SalomeApp_DoubleSpinBox( GBrot );
+ VISU::initSpinBox( Rot2, -180., 180., 10., "angle_precision" );
Rot2->setValue( 0 );
Rot2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( Rot2, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
GBrotLayout->addWidget( Rot2, 1, 1 );
QLabel* aPosLbl = new QLabel(tr( "LBL_POS" ), this);
- myPosSpn = new QtxDoubleSpinBox( 0, 1, 0.1, this );
+ myPosSpn = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( myPosSpn, 0., 1., .1, "parametric_precision" );
GDeformation = new QGroupBox(tr("LBL_DEFORMATION"), this);
GDeformation->setCheckable(true);
myVectorialFieldCombo = new QComboBox (GDeformation);
GDeformationLayout->addWidget( myVectorialFieldCombo, 0, 1 );
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
QLabel* LabelDeformation2 = new QLabel (tr("LBL_DEFROMATION_SCALE"), GDeformation);
GDeformationLayout->addWidget( LabelDeformation2, 1, 0 );
- myScaleSpn = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, GDeformation);
+ myScaleSpn = new SalomeApp_DoubleSpinBox (GDeformation);
+ VISU::initSpinBox( myScaleSpn, 0., 1.0E+38, 0.1, "visual_data_precision" );
myScaleSpn->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GDeformationLayout->addWidget( myScaleSpn, 1, 1 );
connect(myVectorialFieldCombo, SIGNAL(activated(int)), this, SLOT(onVectorialFieldChanged(int)));
#include "VisuGUI_Prs3dDlg.h"
#include <SALOME_Actor.h>
-
-#include <QtxDoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <QFrame>
-class QSpinBox;
class QRadioButton;
class QTabWidget;
class QTableWidget;
QLabel* LabelRot1;
QLabel* LabelRot2;
QGroupBox* GDeformation;
- QSpinBox* nbPlan;
- QtxDoubleSpinBox* Rot1;
- QtxDoubleSpinBox* Rot2;
+ SalomeApp_IntSpinBox* nbPlan;
+ SalomeApp_DoubleSpinBox* Rot1;
+ SalomeApp_DoubleSpinBox* Rot2;
QRadioButton* RBzx;
QRadioButton* RByz;
QRadioButton* RBxy;
- QtxDoubleSpinBox* myPosSpn;
+ SalomeApp_DoubleSpinBox* myPosSpn;
QTableWidget* myPosTable;
SALOME::GenericObjPtr<VISU::CutPlanes_i> myCutPlanes;
QCheckBox* myPreviewCheck;
QComboBox* myVectorialFieldCombo;
- QtxDoubleSpinBox* myScaleSpn;
+ SalomeApp_DoubleSpinBox* myScaleSpn;
double X1, X2;
double Y1, Y2;
double Z1, Z2;
#include "VisuGUI_ViewTools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_Gen_i.hh"
#include "VISU_CutSegment_i.hh"
#include "VISU_ColoredPrs3dFactory.hh"
#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 );
}
class SalomeApp_Module;
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
bool hasInit;
- QList<QtxDoubleSpinBox*> myPoint1;
- QList<QtxDoubleSpinBox*> myPoint2;
+ QList<SalomeApp_DoubleSpinBox*> myPoint1;
+ QList<SalomeApp_DoubleSpinBox*> myPoint2;
SALOME::GenericObjPtr<VISU::CutSegment_i> myCutSegment;
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
#include "VISU_Result_i.hh"
#include "VISU_DeformedShapeAndScalarMap_i.hh"
#include "VISU_Convertor.hxx"
-#include <QtxDoubleSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <SalomeApp_Module.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <SUIT_Desktop.h>
-#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup);
TopGroupLayout->addWidget(ScaleLabel, 0, 0);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
- ScalFact = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup);
+ ScalFact = new SalomeApp_DoubleSpinBox (TopGroup);
+ VISU::initSpinBox( ScalFact, 0., 1.0E+38, .1, "visual_data_precision" );
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
class SalomeApp_Module;
class VisuGUI_InputPane;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class QComboBox;
class QTabWidget;
void onTimeStampChanged(int i=0);
private:
- QtxDoubleSpinBox* ScalFact;
+ SalomeApp_DoubleSpinBox* ScalFact;
QTabWidget* myTabBox;
VisuGUI_ScalarBarPane* myScalarPane;
VisuGUI_InputPane* myInputPane;
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
#include "VisuGUI.h"
+#include "VisuGUI_Prs3dTools.h"
+
+#include <VisuGUI_GUITools.h>
+
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_DeformedShape_i.hh"
#include "VisuGUI_ViewTools.h"
#include "VISU_Gen_i.hh"
#include "VISU_Result_i.hh"
-#include "VisuGUI_Prs3dTools.h"
+
#include "SVTK_ViewWindow.h"
#include "SalomeApp_Module.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_Application.h"
#include "SUIT_Desktop.h"
#include "SUIT_Session.h"
QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup );
TopGroupLayout->addWidget(ScaleLabel, 0, 0);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
- ScalFact = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, TopGroup);
+ ScalFact = new SalomeApp_DoubleSpinBox (TopGroup);
+ VISU::initSpinBox( ScalFact, 0., 1.0E+38, .1, "visual_data_precision" );
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
#include "VisuGUI_Prs3dDlg.h"
-#include "QtxDoubleSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include <QCheckBox>
class QTabWidget;
-
-
-class QtxDoubleSpinBox;
class SalomeApp_Module;
class VisuGUI_InputPane;
class VisuGUI;
protected:
virtual QString GetContextHelpFilePath();
- int isValid();
+ int isValid();
protected slots:
void accept();
bool onApply();
void reject();
private:
- QtxDoubleSpinBox* ScalFact;
+ SalomeApp_DoubleSpinBox* ScalFact;
QCheckBox* UseMagn;
QTabWidget* myTabBox;
VisuGUI_InputPane* myInputPane;
#include "VisuGUI_Tools.h"
#include "VisuGUI_ViewTools.h"
+#include <VisuGUI_GUITools.h>
+
#include <QCheckBox>
#include <QGroupBox>
#include <QKeyEvent>
#include <QLayout>
#include <QPushButton>
-#include <QtxDoubleSpinBox.h>
-
#include <SUIT_MessageBox.h>
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
#include <SalomeApp_Application.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <LightApp_SelectionMgr.h>
aLayout->setAlignment( Qt::AlignTop );
QLabel* anAngleLbl = new QLabel( tr( "FEATURE_EDGES_ANGLE" ), myGrp );
- myAngleSpinBox = new QtxDoubleSpinBox( 0.0, 90.0, 10.0, myGrp );
+ myAngleSpinBox = new SalomeApp_DoubleSpinBox( myGrp );
+ VISU::initSpinBox( myAngleSpinBox, 0.0, 90.0, 10.0, "angle_precision" );
myFeatureEdgesCB = new QCheckBox( tr( "SHOW_FEATURE_EDGES" ), myGrp );
myBoundaryEdgesCB = new QCheckBox( tr( "SHOW_BOUNDARY_EDGES" ), myGrp );
class QCheckBox;
class QGroupBox;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class VISU_Actor;
private:
QGroupBox* myGrp;
- QtxDoubleSpinBox* myAngleSpinBox;
+ SalomeApp_DoubleSpinBox* myAngleSpinBox;
QCheckBox* myFeatureEdgesCB;
QCheckBox* myBoundaryEdgesCB;
QCheckBox* myManifoldEdgesCB;
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_GaussPoints_i.hh"
#include "VISU_Prs3dUtils.hh"
#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() );
}
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 );
#include "VisuGUI_Prs3dDlg.h"
#include "VISU_GaussPoints_i.hh"
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
class VVTK_PrimitiveBox;
class VVTK_SizeBox;
class VisuGUI_TextPrefDlg;
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDoubleSpinBox* XSpin;
- QtxDoubleSpinBox* YSpin;
+ SalomeApp_DoubleSpinBox* XSpin;
+ SalomeApp_DoubleSpinBox* YSpin;
- QtxDoubleSpinBox* WidthSpin;
- QtxDoubleSpinBox* HeightSpin;
- QtxDoubleSpinBox* SpacingSpin;
+ SalomeApp_DoubleSpinBox* WidthSpin;
+ SalomeApp_DoubleSpinBox* HeightSpin;
+ SalomeApp_DoubleSpinBox* SpacingSpin;
QRadioButton* BicolorButton;
QRadioButton* RainbowButton;
QLabel* ColorLabel;
- QSpinBox* ColorSpin;
+ SalomeApp_IntSpinBox* ColorSpin;
QLabel* LabelLabel;
- QSpinBox* LabelSpin;
+ SalomeApp_IntSpinBox* LabelSpin;
QLabel* myModeLbl;
QComboBox* myModeCombo;
VVTK_SizeBox* mySizeBox;
QGroupBox* myDefShapeBox;
- QtxDoubleSpinBox* myScaleSpinBox;
+ SalomeApp_DoubleSpinBox* myScaleSpinBox;
SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
SalomeApp_Module* myModule;
#include <LightApp_Application.h>
+#include <SalomeApp_IntSpinBox.h>
+
#include <QtxColorButton.h>
#include <SUIT_Desktop.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
-#include <limits.h>
+#include <limits>
#include <QLayout>
#include <QValidator>
#include <QLabel>
#include <QGroupBox>
-#include <QSpinBox>
#include <QPushButton>
#include <QCheckBox>
#include <QLineEdit>
#include <QButtonGroup>
#include <QRadioButton>
-using namespace std;
-
VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent,
VisuGUI_ScalarBarPane* theScalarPane)
: QWidget(parent),
QLabel* LabelNbr = new QLabel (tr("NB_SURFACES"), TopGroup);
TopGroupLayout->addWidget( LabelNbr, 1, 0 );
- NbrIso = new QSpinBox( TopGroup );
+ NbrIso = new SalomeApp_IntSpinBox( TopGroup );
+ NbrIso->setAcceptNames( false );
NbrIso->setMaximum( 100 );
NbrIso->setMinimum( 1 );
NbrIso->setSingleStep( 1 );
myUseLabels = new QCheckBox(tr("SHOW_VALUES_CHK"), TopGroup);
myUseLabels->setChecked(false);
TopGroupLayout->addWidget( myUseLabels, 3, 0 );
- myNbLabels = new QSpinBox( TopGroup );
+ myNbLabels = new SalomeApp_IntSpinBox( TopGroup );
+ myNbLabels->setAcceptNames( false );
myNbLabels->setMinimum(1);
myNbLabels->setMaximum(100);
myNbLabels->setSingleStep(1);
class QTabWidget;
class QLineEdit;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QButtonGroup;
class QtxColorButton;
void setColor();
private:
- QButtonGroup* myRangeGrp;
- QLineEdit* MinIso;
- QLineEdit* MaxIso;
- QSpinBox* NbrIso;
- QCheckBox* myUseMagnitude;
- QtxColorButton* mySelColor;
- QCheckBox* myUseLabels;
- QSpinBox* myNbLabels;
+ QButtonGroup* myRangeGrp;
+ QLineEdit* MinIso;
+ QLineEdit* MaxIso;
+ SalomeApp_IntSpinBox* NbrIso;
+ QCheckBox* myUseMagnitude;
+ QtxColorButton* mySelColor;
+ QCheckBox* myUseLabels;
+ SalomeApp_IntSpinBox* myNbLabels;
VisuGUI_ScalarBarPane* myScalarPane;
};
#include "LightApp_SelectionMgr.h"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SalomeApp_Application.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SVTK_ViewWindow.h"
#include "SVTK_ViewModel.h"
#include "SUIT_ViewManager.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-#include "QtxDoubleSpinBox.h"
+#include <VisuGUI_GUITools.h>
// VTK Includes
#include "vtkRenderer.h"
aHBLay->setSpacing(6);
aHBLay->addWidget( new QLabel ("dX:", anOffsetsPane) );
- aHBLay->addWidget( myDxEdt = new QtxDoubleSpinBox (anOffsetsPane) );
- myDxEdt->setRange(-MAXVAL, MAXVAL);
+ aHBLay->addWidget( myDxEdt = new SalomeApp_DoubleSpinBox (anOffsetsPane) );
+ VISU::initSpinBox( myDxEdt, -MAXVAL, MAXVAL, 1., "length_precision" );
aHBLay->addWidget( new QLabel("dY:", anOffsetsPane) );;
- aHBLay->addWidget( myDyEdt = new QtxDoubleSpinBox (anOffsetsPane) );
- myDyEdt->setRange(-MAXVAL, MAXVAL);
+ aHBLay->addWidget( myDyEdt = new SalomeApp_DoubleSpinBox (anOffsetsPane) );
+ VISU::initSpinBox( myDyEdt, -MAXVAL, MAXVAL, 1., "length_precision" );
aHBLay->addWidget( new QLabel("dZ:", anOffsetsPane) );
- aHBLay->addWidget( myDzEdt = new QtxDoubleSpinBox (anOffsetsPane) );
- myDzEdt->setRange(-MAXVAL, MAXVAL);
+ aHBLay->addWidget( myDzEdt = new SalomeApp_DoubleSpinBox (anOffsetsPane) );
+ VISU::initSpinBox( myDzEdt, -MAXVAL, MAXVAL, 1., "length_precision" );
QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), anOffsetsPane);
aHBLay->addWidget( aResetBtn );
#include <QList>
class QCheckBox;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class VisuGUI;
class LightApp_SelectionMgr;
VisuGUI * myModule;
LightApp_SelectionMgr* mySelectionMgr;
- QtxDoubleSpinBox * myDxEdt;
- QtxDoubleSpinBox * myDyEdt;
- QtxDoubleSpinBox * myDzEdt;
+ SalomeApp_DoubleSpinBox * myDxEdt;
+ SalomeApp_DoubleSpinBox * myDyEdt;
+ SalomeApp_DoubleSpinBox * myDzEdt;
QCheckBox * mySaveChk;
QList<VISU::Prs3d_i*> myPrsList;
#include "VisuGUI_Tools.h"
#include "VisuGUI_ViewTools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_ViewManager_i.hh"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
#include "LightApp_Application.h"
-
-#include "QtxDoubleSpinBox.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <QLayout>
#include <QValidator>
#include <QTabWidget>
#include <QRadioButton>
-#include <QSpinBox>
#include <QCheckBox>
#include <QVBoxLayout>
#include <QHBoxLayout>
LabelRot1 = new QLabel (tr("ROTATION_X"), GBrot );
GBrotLayout->addWidget(LabelRot1, 0, 0);
// spin 1
- Rot1 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
+ Rot1 = new SalomeApp_DoubleSpinBox (GBrot);
+ VISU::initSpinBox( Rot1, -180, 180, 5, "angle_precision" );
Rot1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GBrotLayout->addWidget(Rot1, 0, 1);
// label 2
LabelRot2 = new QLabel (tr("ROTATION_Y"), GBrot);
GBrotLayout->addWidget(LabelRot2, 1, 0);
// spin 2
- Rot2 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
+ Rot2 = new SalomeApp_DoubleSpinBox (GBrot);
+ VISU::initSpinBox( Rot2, -180, 180, 5, "angle_precision" );
Rot2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GBrotLayout->addWidget(Rot2, 1, 1);
QLabel * valueLabel = new QLabel (tr("POSITION_VALUE"), GBpos);
GBposLayout->addWidget(valueLabel, 0, 0);
// value spin
- PositionSpn = new QtxDoubleSpinBox (0, 1, 0.1, GBpos);
+ PositionSpn = new SalomeApp_DoubleSpinBox (GBpos);
+ VISU::initSpinBox( PositionSpn, 0, 1, 0.1, "parametric_precision" );
GBposLayout->addWidget(PositionSpn, 0, 1);
// Relative CheckBox
RelativeChkB = new QCheckBox (tr("RELATIVE"), GBpos);
bottomLayout->setMargin(0);
// scale
QLabel* scaleLabel = new QLabel (tr("SCALE"), bottomFrame);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
- ScaleSpn = new QtxDoubleSpinBox (-1.e38, 1.e38, 0.1, aPrecision*(-1), 38, bottomFrame);
+ ScaleSpn = new SalomeApp_DoubleSpinBox (bottomFrame);
+ VISU::initSpinBox( ScaleSpn, -1.e38, 1.e38, 0.1, "visual_data_precision" );
// Presentation type
GBPrsType = new QButtonGroup ( bottomFrame);
QGroupBox* aGB = new QGroupBox (tr("PRESENTATION_TYPE"), bottomFrame);
GBPrsType->addButton( aRB, 1 );
// nb Contours
QLabel* nbContLabel = new QLabel (tr("NUMBER_CONTOURS"), bottomFrame);
- NbContoursSpn = new QSpinBox ( bottomFrame );
+ NbContoursSpn = new SalomeApp_IntSpinBox ( bottomFrame );
+ NbContoursSpn->setAcceptNames( false );
NbContoursSpn->setMinimum( 1 );
NbContoursSpn->setMaximum( 999 );
NbContoursSpn->setSingleStep( 1 );
class QGroupBox;
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
+
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
class VISU_Plot3DPL;
class SVTK_ViewWindow;
class SALOME_Actor;
-class QtxDoubleSpinBox;
class VisuGUI_Plot3DPane : public QWidget//QVBox
{
QGroupBox * GBoxOrient;
QLabel * LabelRot1;
QLabel * LabelRot2;
- QtxDoubleSpinBox * Rot1;
- QtxDoubleSpinBox * Rot2;
- QtxDoubleSpinBox * PositionSpn;
+ SalomeApp_DoubleSpinBox * Rot1;
+ SalomeApp_DoubleSpinBox * Rot2;
+ SalomeApp_DoubleSpinBox * PositionSpn;
QCheckBox * RelativeChkB;
- QtxDoubleSpinBox * ScaleSpn;
+ SalomeApp_DoubleSpinBox * ScaleSpn;
QButtonGroup * GBPrsType;
- QSpinBox * NbContoursSpn;
+ SalomeApp_IntSpinBox * NbContoursSpn;
QCheckBox * PreviewChkB;
private slots:
#include "VisuGUI_ViewTools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
+
#include "SVTK_ViewWindow.h"
#include "SVTK_FontWidget.h"
#include "VISU_Result_i.hh"
#include "VISU_Prs3dUtils.hh"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_Application.h"
#include "SUIT_Session.h"
#include <QKeyEvent>
#include <QGridLayout>
-#include "QtxDoubleSpinBox.h"
-
#include <vtkTextProperty.h>
-#include <limits.h>
-
-using namespace std;
+#include <limits>
//-----------------------------------------------------------------------
// Text Preferences Dialog
aDimGrpLay->setSpacing( 5 );
aDimGrpLay->setMargin( 5 );
- myTitleSizeSpin = new QSpinBox( aDimGrp );
+ myTitleSizeSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myTitleSizeSpin->setAcceptNames( false );
myTitleSizeSpin->setRange( 0, 100 );
myTitleSizeSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myTitleSizeSpin->setMinimumWidth( 70 );
myTitleSizeSpin->setSpecialValueText( tr( "AUTO" ) );
QLabel* aTitleSizeLbl = new QLabel( tr( "LBL_TITLE_W" ), aDimGrp );
- myLabelSizeSpin = new QSpinBox( aDimGrp );
+ myLabelSizeSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myLabelSizeSpin->setAcceptNames( false );
myLabelSizeSpin->setRange( 0, 100 );
myLabelSizeSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myLabelSizeSpin->setMinimumWidth( 70 );
myLabelSizeSpin->setSpecialValueText( tr( "AUTO" ) );
QLabel* aLabelSizeLbl = new QLabel( tr( "LBL_LABEL_W" ), aDimGrp );
- myBarWidthSpin = new QSpinBox( aDimGrp );
+ myBarWidthSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myBarWidthSpin->setAcceptNames( false );
myBarWidthSpin->setRange( 0, 100 );
myBarWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myBarWidthSpin->setMinimumWidth( 70 );
myBarWidthSpin->setSpecialValueText( tr( "AUTO" ) );
QLabel* aBarWidthLbl = new QLabel( tr( "LBL_BAR_W" ), aDimGrp );
- myBarHeightSpin = new QSpinBox( aDimGrp );
+ myBarHeightSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myBarHeightSpin->setAcceptNames( false );
myBarHeightSpin->setRange( 0, 100 );
myBarHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myBarHeightSpin->setMinimumWidth( 70 );
// format and units
QLabel* aPrecLbl = new QLabel( tr( "PRECISION" ), aDimGrp );
- myPrecisionSpin = new QSpinBox( aDimGrp );
+ myPrecisionSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myPrecisionSpin->setAcceptNames( false );
myPrecisionSpin->setRange( 1, 100 );
myUnitsChk = new QCheckBox( tr( "LBL_SHOW_UNITS" ), aDimGrp );
RangeGroup->addButton( RBIrange, 1 );
RBFrange->setChecked( true );
- 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);
//ColLabGroupLayout->setMargin( 11 );
QLabel* 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 );
QLabel* 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( OriginGroup );
- VISU::initSpinBox(XSpin, 0.0, +1.0);
+ XSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( XSpin, 0.0, +1.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( OriginGroup );
- VISU::initSpinBox(YSpin, 0.0, +1.0);
+ YSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( YSpin, 0.0, +1.0, .1, "parametric_precision" );
YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
//YSpin->setMinimumWidth( 70 );
YSpin->setValue( 0.1 );
//DimGroupLayout->setMargin( 11 );
QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup);
- WidthSpin = new QtxDoubleSpinBox( DimGroup );
- VISU::initSpinBox(WidthSpin, 0.0, +1.0);
+ WidthSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( WidthSpin, 0.0, +1.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( DimGroup );
- VISU::initSpinBox(HeightSpin, 0.0, +1.0);
+ HeightSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( HeightSpin, 0.0, +1.0, .1, "parametric_precision" );
HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
//HeightSpin->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
*/
void VisuGUI_ScalarBarPane::XYChanged( double )
{
- QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
+ SalomeApp_DoubleSpinBox* snd = (SalomeApp_DoubleSpinBox*)sender();
if ( snd == XSpin ) {
WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
if ( RBFrange->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(myScalarMap->GetSourceMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myScalarMap->GetSourceMax(), 'g', aPrecision));
if ( RBFrange->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(myScalarMap->GetSourceMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myScalarMap->GetSourceMax(), 'g', aPrecision));
void VisuGUI_ScalarBarPane::setRange( double imin, double imax, bool sbRange )
{
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(imin, 'g', aPrecision));
MaxEdit->setText(QString::number(imax, 'g', aPrecision));
class QCheckBox;
class QPushButton;
class QRadioButton;
-class QSpinBox;
class QLineEdit;
class QComboBox;
class QToolButton;
class QTabWidget;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
class SVTK_FontWidget;
class VISU_ScalarMapAct;
class VISU_ScalarMapPL;
void onHelp();
protected:
- QSpinBox* myTitleSizeSpin;
- QSpinBox* myLabelSizeSpin;
- QSpinBox* myBarWidthSpin;
- QSpinBox* myBarHeightSpin;
+ SalomeApp_IntSpinBox* myTitleSizeSpin;
+ SalomeApp_IntSpinBox* myLabelSizeSpin;
+ SalomeApp_IntSpinBox* myBarWidthSpin;
+ SalomeApp_IntSpinBox* myBarHeightSpin;
QCheckBox* myUnitsChk;
- QSpinBox* myPrecisionSpin;
+ SalomeApp_IntSpinBox* myPrecisionSpin;
int myTitleSize;
int myLabelSize;
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDoubleSpinBox* XSpin;
- QtxDoubleSpinBox* YSpin;
+ SalomeApp_DoubleSpinBox* XSpin;
+ SalomeApp_DoubleSpinBox* YSpin;
- QtxDoubleSpinBox* WidthSpin;
- QtxDoubleSpinBox* HeightSpin;
+ SalomeApp_DoubleSpinBox* WidthSpin;
+ SalomeApp_DoubleSpinBox* HeightSpin;
- QSpinBox* ColorSpin;
- QSpinBox* LabelSpin;
+ SalomeApp_IntSpinBox* ColorSpin;
+ SalomeApp_IntSpinBox* LabelSpin;
QCheckBox* CBSave;
QCheckBox* CBLog;
// QT Includes
#include <QLabel>
-#include <QSpinBox>
#include <QListWidget>
#include <QLayout>
#include <QButtonGroup>
// STL Includes
#include <map>
-using namespace std;
-
class CustomIntValidator: public QIntValidator
{
public:
#include "VisuGUI_SelectionPrefDlg.h"
#include "VisuGUI.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_PickingSettings.h"
#include <SUIT_Session.h>
#include <LightApp_Application.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include <QtxColorButton.h>
-#include <QtxDoubleSpinBox.h>
-#include <QtxIntSpinBox.h>
#include <QComboBox>
#include <QGroupBox>
#include <QLineEdit>
#include <QPushButton>
-using namespace std;
-
/*!
Constructor
*/
CursorGroupLayout->setMargin(11);
QLabel* CursorSizeLabel = new QLabel( tr( "CURSOR_SIZE" ), CursorGroup );
- myCursorSizeSpinBox = new QtxDoubleSpinBox( 0, 1, 0.1, CursorGroup );
+ myCursorSizeSpinBox = new SalomeApp_DoubleSpinBox( CursorGroup );
+ VISU::initSpinBox( myCursorSizeSpinBox, 0, 1, 0.1, "parametric_precision" );
myCursorSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* PyramidHeightLabel = new QLabel( tr( "PYRAMID_HEIGHT" ), CursorGroup );
double aHeightMin=1.e-7;
double aHeightMax=10.;
double aHeightStep=0.1;
- myPyramidHeightSpinBox = new QtxDoubleSpinBox(aHeightMin, aHeightMax, aHeightStep, CursorGroup );
+ myPyramidHeightSpinBox = new SalomeApp_DoubleSpinBox(CursorGroup );
+ VISU::initSpinBox( myPyramidHeightSpinBox, aHeightMin, aHeightMax, aHeightStep, "length_precision" );
myPyramidHeightSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* SelectionColorLabel = new QLabel( tr( "SELECTION_COLOR" ), CursorGroup );
ToleranceGroupLayout->setMargin(11);
QLabel* PointToleranceLabel = new QLabel( tr( "POINT_TOLERANCE" ), ToleranceGroup );
- myPointToleranceSpinBox = new QtxDoubleSpinBox( 0.001, 10.0, 0.01, ToleranceGroup );
+ myPointToleranceSpinBox = new SalomeApp_DoubleSpinBox(ToleranceGroup );
+ VISU::initSpinBox( myPointToleranceSpinBox, 0.001, 10.0, 0.01, "len_tol_precision" );
myPointToleranceSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ToleranceGroupLayout->addWidget( PointToleranceLabel, 0, 0 );
InfoWindowGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
QLabel* TransparencyLabel = new QLabel( tr( "TRANSPARENCY" ), myInfoWindowGroup );
- myTransparencySpinBox = new QtxIntSpinBox( 0, 100, 10, myInfoWindowGroup );
+ myTransparencySpinBox = new SalomeApp_IntSpinBox( 0, 100, 10, myInfoWindowGroup );
+ myTransparencySpinBox->setAcceptNames( false );
myTransparencySpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
InfoWindowGroupLayout->addWidget( TransparencyLabel, 0, 0 );
CameraGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
QLabel* ZoomFactorLabel = new QLabel( tr( "ZOOM_FACTOR" ), myCameraGroup );
- myZoomFactorSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1, myCameraGroup );
+ myZoomFactorSpinBox = new SalomeApp_DoubleSpinBox( myCameraGroup );
+ VISU::initSpinBox( myZoomFactorSpinBox, 0.1, 10.0, 0.1, "parametric_precision" );
myZoomFactorSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* StepNumberLabel = new QLabel( tr( "STEP_NUMBER" ), myCameraGroup );
StepNumberLabel->setToolTip( tr( "STEP_NUMBER_TIP" ) );
- myStepNumberSpinBox = new QtxIntSpinBox( 1, 100, 1, myCameraGroup );
+ myStepNumberSpinBox = new SalomeApp_IntSpinBox( 1, 100, 1, myCameraGroup );
+ myStepNumberSpinBox->setAcceptNames( false );
myStepNumberSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
CameraGroupLayout->addWidget( ZoomFactorLabel, 0, 0 );
class QPushButton;
class QtxColorButton;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class VisuGUI_SelectionPrefDlg : public QDialog
{
void onHelp();
private:
- QtxDoubleSpinBox* myCursorSizeSpinBox;
- QtxDoubleSpinBox* myPyramidHeightSpinBox;
+ SalomeApp_DoubleSpinBox* myCursorSizeSpinBox;
+ SalomeApp_DoubleSpinBox* myPyramidHeightSpinBox;
QtxColorButton* mySelectionColorButton;
- QtxDoubleSpinBox* myPointToleranceSpinBox;
+ SalomeApp_DoubleSpinBox* myPointToleranceSpinBox;
QGroupBox* myInfoWindowGroup;
- QtxIntSpinBox* myTransparencySpinBox;
+ SalomeApp_IntSpinBox* myTransparencySpinBox;
QComboBox* myPositionComboBox;
QGroupBox* myCameraGroup;
- QtxDoubleSpinBox* myZoomFactorSpinBox;
- QtxIntSpinBox* myStepNumberSpinBox;
+ SalomeApp_DoubleSpinBox* myZoomFactorSpinBox;
+ SalomeApp_IntSpinBox* myStepNumberSpinBox;
QPushButton* myButtonOk;
QPushButton* myButtonApply;
#include "LightApp_Application.h"
+#include <SalomeApp_IntSpinBox.h>
+
#include <QtxColorButton.h>
#include <SALOMEDSClient_AttributeTableOfInteger.hxx>
#include <QScrollArea>
#include <QLayout>
#include <QColorDialog>
-#include <QSpinBox>
#include <QKeyEvent>
#include <QFrame>
#include "utilities.h"
-using namespace std;
-
#define DLG_SIZE_WIDTH 500
#define DLG_SIZE_HEIGHT 400
#define MAX_LINE_WIDTH 100
if ( tblIntAttr ) {
try {
int nbRows = tblIntAttr->GetNbRows() ;
- vector<string> rowTitles = tblIntAttr->GetRowTitles();
- vector<string> rowUnits = tblIntAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblIntAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblIntAttr->GetRowUnits();
QStringList rows;
for ( int i = 0; i < nbRows; i++ )
rows.append( rowTitles[i].c_str() );
if ( tblRealAttr ) {
try {
int nbRows = tblRealAttr->GetNbRows() ;
- vector<string> rowTitles = tblRealAttr->GetRowTitles();
- vector<string> rowUnits = tblRealAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblRealAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblRealAttr->GetRowUnits();
QStringList rows;
for ( int i = 0; i < nbRows; i++ )
rows.append( rowTitles[i].c_str() );
if ( tblIntAttr ) {
try {
int nbCols = tblIntAttr->GetNbColumns() ;
- vector<string> rowTitles = tblIntAttr->GetRowTitles();
- vector<string> rowUnits = tblIntAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblIntAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblIntAttr->GetRowUnits();
for ( i = 0; i < verIndex.count(); i++ ) {
SPlot2d_Curve* curve = new SPlot2d_Curve();
if ( tblRealAttr ) {
try {
int nbCols = tblRealAttr->GetNbColumns() ;
- vector<string> rowTitles = tblRealAttr->GetRowTitles();
- vector<string> rowUnits = tblRealAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblRealAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblRealAttr->GetRowUnits();
for ( i = 0; i < verIndex.count(); i++ ) {
SPlot2d_Curve* curve = new SPlot2d_Curve();
myLineCombo->addItem( tr( "DAHSDOTDOT_LINE_LBL" ) );
myLineCombo->setCurrentIndex( 1 ); // SOLID by default
- myLineSpin = new QSpinBox( parentWidget );
+ myLineSpin = new SalomeApp_IntSpinBox( parentWidget );
+ myLineSpin->setAcceptNames( false );
myLineSpin->setMinimum( 0 );
myLineSpin->setMaximum( MAX_LINE_WIDTH );
myLineSpin->setSingleStep( 1 );
class QLabel;
class QCheckBox;
class QComboBox;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QToolButton;
class VisuGUI_ItemContainer;
class QtxColorButton;
QLabel* myUnitLab;
QCheckBox* myAutoCheck;
QComboBox* myLineCombo;
- QSpinBox* myLineSpin;
+ SalomeApp_IntSpinBox* myLineSpin;
QComboBox* myMarkerCombo, *myAssigned;
QtxColorButton* myColorBtn;
};
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SALOME_InteractiveObject.hxx"
+#include <SalomeApp_IntSpinBox.h>
+
#include "LightApp_Study.h"
#include "LightApp_SelectionMgr.h"
#include "LightApp_Application.h"
// QT Includes
#include <QLabel>
#include <QPushButton>
-#include <QSpinBox>
#include <QLayout>
#include <QGroupBox>
#include <QKeyEvent>
GroupC1Layout->setMargin( 11 );
ValueLab = new QLabel( tr( "SHRINKFACTOR_VALUE" ), GroupC1 );
- ValueSpin = new QSpinBox( GroupC1 );
+ ValueSpin = new SalomeApp_IntSpinBox( GroupC1 );
+ ValueSpin->setAcceptNames( false );
ValueSpin->setRange( 20, 100 );
ValueSpin->setSingleStep( 10 );
ValueSpin->setMinimumWidth( 70 );
class QLabel;
class QPushButton;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QGroupBox;
class LightApp_SelectionMgr;
class SalomeApp_Module;
QPushButton* buttonOk;
QPushButton* buttonHelp;
QLabel* ValueLab;
- QSpinBox* ValueSpin;
+ SalomeApp_IntSpinBox* ValueSpin;
public slots:
void help();
//
#include "VisuGUI_Slider.h"
+#include <VisuGUI_GUITools.h>
+
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "SalomeApp_Study.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_SelectionMgr.h"
#include "SVTK_Functor.h"
#include "QtxDockWidget.h"
-#include "QtxDoubleSpinBox.h"
#include <vtkActorCollection.h>
#include <vtkRenderer.h>
myLimitedMemoryButton->setChecked( true );
aHBoxLayout->addWidget( myLimitedMemoryButton );
- myLimitedMemory = new QtxDoubleSpinBox( aParent );
- myLimitedMemory->setMaximum( 10000 );
+ myLimitedMemory = new SalomeApp_DoubleSpinBox( aParent );
+ VISU::initSpinBox( myLimitedMemory, 0., 10000., 1., "memory_precision" );
myLimitedMemory->setValue( 512 );
aHBoxLayout->addWidget( myLimitedMemory );
class QLineEdit;
class QToolButton;
class QSlider;
-class QSpinBox;
class QCheckBox;
class QRadioButton;
class QMainWindow;
class QTimer;
class QAction;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class LightApp_SelectionMgr;
class VisuGUI;
QRadioButton* myMinimalMemoryButton;
QRadioButton* myLimitedMemoryButton;
- QtxDoubleSpinBox* myLimitedMemory;
+ SalomeApp_DoubleSpinBox* myLimitedMemory;
QLineEdit* myUsedMemory;
QLineEdit* myFreeMemory;
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_Mesh_i.hh"
#include "VISU_Gen_i.hh"
#include "VISU_StreamLines_i.hh"
#include "VISU_StreamLinesPL.hxx"
#include "VISU_Actor.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SalomeApp_Application.h"
#include "LightApp_Application.h"
#include "LightApp_SelectionMgr.h"
#include <SALOMEDSClient_SObject.hxx>
-#include <QtxDoubleSpinBox.h>
#include <QtxColorButton.h>
-#include <limits.h>
+#include <limits>
#include <QLayout>
#include <QLabel>
#include <QFrame>
-using namespace std;
-
VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
: VisuGUI_ScalarBarBaseDlg(theModule),
myVisuGUI(theModule)
QLabel* aPercentLbl = new QLabel (tr("LBL_USED_POINTS"), aSourceBox);
aSrcLayout->addWidget(aPercentLbl, 2, 0);
- myPntPercent = new QtxDoubleSpinBox( aSourceBox );
- VISU::initSpinBox(myPntPercent, 0, 1);
+ myPntPercent = new SalomeApp_DoubleSpinBox( aSourceBox );
+ VISU::initSpinBox( myPntPercent, 0., 1., .1, "parametric_precision" );
aSrcLayout->addWidget(myPntPercent, 2, 1);
TopLayout->addWidget(aSourceBox, 0, 0, 1, 2);
QLabel* aStepLenLbl = new QLabel (tr("LBL_STEP_LENGTH"), aTopBox);
TopLayout->addWidget(aStepLenLbl, 1, 0);
- myStepLen = new QtxDoubleSpinBox( aTopBox );
- VISU::initSpinBox(myStepLen, DBL_MIN, DBL_MAX);
+ myStepLen = new SalomeApp_DoubleSpinBox( aTopBox );
+ VISU::initSpinBox( myStepLen,
+ std::numeric_limits<double>::min(),
+ std::numeric_limits<double>::max(),
+ .1,
+ "parametrc_precision" );
myStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myStepLen, 1, 1);
connect(myStepLen, SIGNAL(valueChanged(double)), this, SLOT(StepLengthChanged(double)));
QLabel* aIntegStepLenLbl = new QLabel (tr("LBL_INTEGRATION_STEP"), aTopBox);
TopLayout->addWidget(aIntegStepLenLbl, 2, 0);
- myIntegStepLen = new QtxDoubleSpinBox( aTopBox );
- VISU::initSpinBox(myIntegStepLen, DBL_MIN, DBL_MAX);
+ myIntegStepLen = new SalomeApp_DoubleSpinBox( aTopBox );
+ VISU::initSpinBox( myIntegStepLen,
+ std::numeric_limits<double>::min(),
+ std::numeric_limits<double>::max(),
+ .1,
+ "parametrc_precision" );
myIntegStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myIntegStepLen, 2, 1);
connect(myIntegStepLen, SIGNAL(valueChanged(double)), this, SLOT(IntegrationStepChanged(double)));
QLabel* aPropagationLbl = new QLabel (tr("LBL_PROPAGATION_TIME"), aTopBox);
TopLayout->addWidget(aPropagationLbl, 3, 0);
- myPropTime = new QtxDoubleSpinBox( aTopBox );
- VISU::initSpinBox(myPropTime, DBL_MIN, DBL_MAX);
+ myPropTime = new SalomeApp_DoubleSpinBox( aTopBox );
+ VISU::initSpinBox( myPropTime,
+ std::numeric_limits<double>::min(),
+ std::numeric_limits<double>::max(),
+ .1,
+ "parametrc_precision" );
myPropTime->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myPropTime, 3, 1);
connect(myPropTime, SIGNAL(valueChanged(double)), this, SLOT(PropagationTimeChanged(double)));
class SalomeApp_Module;
class VisuGUI_InputPane;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class QtxColorButton;
namespace VISU
private:
VISU::Mesh_ptr createMesh(VISU::VISUType theType, QString theName);
- QtxDoubleSpinBox* myStepLen;
- QtxDoubleSpinBox* myIntegStepLen;
- QtxDoubleSpinBox* myPropTime;
+ SalomeApp_DoubleSpinBox* myStepLen;
+ SalomeApp_DoubleSpinBox* myIntegStepLen;
+ SalomeApp_DoubleSpinBox* myPropTime;
QComboBox* myDirCombo;
QCheckBox* myUseScalar;
QtxColorButton* SelColor;
//QCheckBox* myUseSrcChk;
QComboBox* myUseSrcCombo;
- QtxDoubleSpinBox* myPntPercent;
+ SalomeApp_DoubleSpinBox* myPntPercent;
QComboBox* mySrcCombo;
QTabWidget* myTabBox;
//
#include "VisuGUI_Sweep.h"
+#include <VisuGUI_GUITools.h>
+
#include "SUIT_ResourceMgr.h"
#include "LightApp_SelectionMgr.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include "VISU_Actor.h"
#include "VisuGUI.h"
#include "VISU_Actor.h"
#include "QtxDockWidget.h"
-#include "QtxIntSpinBox.h"
-#include "QtxDoubleSpinBox.h"
#include <QMainWindow>
#include <QComboBox>
aNumberOfStepsAnnotation->setText( tr( "NUMBER_OF_STEPS" ) );
aGridLayout->addWidget( aNumberOfStepsAnnotation, 1, 0, 1, 1 );
- myNumberOfSteps = new QtxIntSpinBox( aPropertiesTab );
+ myNumberOfSteps = new SalomeApp_IntSpinBox( aPropertiesTab );
+ myNumberOfSteps->setAcceptNames( false );
connect( myNumberOfSteps, SIGNAL( valueChanged( int ) ), SLOT( onNumberOfStepsChanged( int ) ) );
myNumberOfSteps->setValue( aResourceMgr->integerValue( "VISU", "sweeping_number_steps", 40 ) );
aGridLayout->addWidget( myNumberOfSteps, 1, 1, 1, 1 );
aStepDelayAnnotation->setText( tr( "DELAY_BETWEEN_STEPS" ) );
aGridLayout->addWidget( aStepDelayAnnotation, 2, 0, 1, 1 );
- myStepDelay = new QtxDoubleSpinBox( aPropertiesTab );
+ myStepDelay = new SalomeApp_DoubleSpinBox( aPropertiesTab );
+ VISU::initSpinBox( myStepDelay, 0., 99.99, .1, "parametric_precision" );
myStepDelay->setValue( aResourceMgr->doubleValue("VISU", "sweeping_time_step", 0.1) );
aGridLayout->addWidget( myStepDelay, 2, 1, 1, 1 );
}
class QComboBox;
class QToolButton;
class QSlider;
-class QSpinBox;
class QCheckBox;
class QMainWindow;
class QTimer;
class QAction;
-class QtxIntSpinBox;
-class QtxDoubleSpinBox;
+class SalomeApp_IntSpinBox;
+class SalomeApp_DoubleSpinBox;
class LightApp_SelectionMgr;
class SVTK_ViewWindow;
QCheckBox* myIsCycled;
QComboBox* mySweepMode;
- QtxIntSpinBox* myNumberOfSteps;
+ SalomeApp_IntSpinBox* myNumberOfSteps;
QComboBox* myIntervals;
- QtxDoubleSpinBox* myStepDelay;
+ SalomeApp_DoubleSpinBox* myStepDelay;
QTimer* myTimer;
QPixmap myPlayPixmap;
#include "VisuGUI_ViewTools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_ViewManager_i.hh"
#include "VISU_Prs3dUtils.hh"
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
#include <LightApp_Application.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <SVTK_FontWidget.h>
-#include <QtxDoubleSpinBox.h>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTabWidget>
#include <QRadioButton>
-#include <QSpinBox>
#include <QCheckBox>
#include <QLabel>
#include <QPushButton>
// scale
QLabel* scaleLabel = new QLabel( tr( "SCALE" ), this );
- ScaleSpn = new QtxDoubleSpinBox( -1.e6, 1.e6, 0.1, this );
+ ScaleSpn = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( ScaleSpn, -1.e6, 1.e6, 0.1, "parametric_precision" );
// Presentation type
GBPrsTypeBox = new QGroupBox( tr( "PRESENTATION_TYPE" ), this );
GBPrsType = new QButtonGroup( GBPrsTypeBox );
// nb Contours
QLabel* nbContLabel = new QLabel( tr( "NUMBER_CONTOURS" ), this );
- NbContoursSpn = new QSpinBox( this );
+ NbContoursSpn = new SalomeApp_IntSpinBox( this );
NbContoursSpn->setMinimum( 1 );
NbContoursSpn->setMaximum( 999 );
NbContoursSpn->setSingleStep( 1 );
ColLabGroupLayout->setMargin( 11 );
QLabel* ColorLabel = new QLabel( tr( "LBL_NB_COLORS" ), ColLabGroup );
- ColorSpin = new QSpinBox( ColLabGroup );
+ ColorSpin = new SalomeApp_IntSpinBox( ColLabGroup );
ColorSpin->setMinimum( 2 );
ColorSpin->setMaximum( 256 );
ColorSpin->setSingleStep( 1 );
ColorSpin->setValue( 64 );
QLabel* LabelLabel = new QLabel( tr( "LBL_NB_LABELS" ), ColLabGroup );
- LabelSpin = new QSpinBox( ColLabGroup );
+ LabelSpin = new SalomeApp_IntSpinBox( ColLabGroup );
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->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->setMinimumWidth( 70 );
YSpin->setValue( 0.1 );
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->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->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
*/
void VisuGUI_TableScalarBarPane::XYChanged( double )
{
- QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
+ SalomeApp_DoubleSpinBox* snd = (SalomeApp_DoubleSpinBox*)sender();
if ( snd == XSpin ) {
WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
class QLineEdit;
class QRadioButton;
class QPushButton;
-class QSpinBox;
-class QtxDoubleSpinBox;
+class SalomeApp_IntSpinBox;
+class SalomeApp_DoubleSpinBox;
class VisuGUI_TextPrefDlg;
class VisuGUI_BarPrefDlg;
class SVTK_ViewWindow;
SVTK_ViewWindow* myViewWindow;
VISU::PointMap3d_i* myPrs;
- QtxDoubleSpinBox* ScaleSpn;
+ SalomeApp_DoubleSpinBox* ScaleSpn;
QGroupBox* GBPrsTypeBox;
QButtonGroup* GBPrsType;
- QSpinBox* NbContoursSpn;
+ SalomeApp_IntSpinBox* NbContoursSpn;
};
class VisuGUI_TableScalarBarPane : public QWidget
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDoubleSpinBox* XSpin;
- QtxDoubleSpinBox* YSpin;
+ SalomeApp_DoubleSpinBox* XSpin;
+ SalomeApp_DoubleSpinBox* YSpin;
- QtxDoubleSpinBox* WidthSpin;
- QtxDoubleSpinBox* HeightSpin;
+ SalomeApp_DoubleSpinBox* WidthSpin;
+ SalomeApp_DoubleSpinBox* HeightSpin;
- QSpinBox* ColorSpin;
- QSpinBox* LabelSpin;
+ SalomeApp_IntSpinBox* ColorSpin;
+ SalomeApp_IntSpinBox* LabelSpin;
QCheckBox* CBSave;
QCheckBox* CBLog;
#include "VisuGUI_DeformedShapeAndScalarMapDlg.h"
#include "VisuGUI_GaussPointsDlg.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_TimeAnimation.h"
#include "VISU_ScalarMap_i.hh"
#include "VISU_ScalarBarActor.hxx"
#include "VISU_Actor.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SalomeApp_Study.h"
#include "LightApp_Application.h"
QHBoxLayout* aHLay = new QHBoxLayout( aDistPane );
aHLay->setSpacing(5);
aHLay->addWidget( new QLabel("Relative Distance", aDistPane) );
- myDistVal = new QtxDoubleSpinBox (-10,10, 0.5, aDistPane);
+ myDistVal = new SalomeApp_DoubleSpinBox( aDistPane );
+ VISU::initSpinBox( myDistVal, -10., 10., 0.5, "length_precision" );
myDistVal->setValue(1);
aHLay->addWidget( myDistVal );
aCoordLayout->setSpacing(5);
aCoordLayout->addWidget( new QLabel("X", aCoordPane), 0, 0 );
- myCoord[0] = new QtxDoubleSpinBox(aCoordPane);
- myCoord[0]->setRange(-MAXVAL, MAXVAL);
+ myCoord[0] = new SalomeApp_DoubleSpinBox(aCoordPane);
+ VISU::initSpinBox( myCoord[0], -MAXVAL, MAXVAL, 1., "length_precision" );
aCoordLayout->addWidget( myCoord[0], 0, 1 );
aCoordLayout->addWidget( new QLabel("Y", aCoordPane), 1, 0 );
- myCoord[1] = new QtxDoubleSpinBox(aCoordPane);
- myCoord[1]->setRange(-MAXVAL, MAXVAL);
+ myCoord[1] = new SalomeApp_DoubleSpinBox(aCoordPane);
+ VISU::initSpinBox( myCoord[1], -MAXVAL, MAXVAL, 1., "length_precision" );
aCoordLayout->addWidget( myCoord[1], 1, 1 );
aCoordLayout->addWidget( new QLabel("Z", aCoordPane), 2, 0 );
- myCoord[2] = new QtxDoubleSpinBox(aCoordPane);
- myCoord[2]->setRange(-MAXVAL, MAXVAL);
+ myCoord[2] = new SalomeApp_DoubleSpinBox(aCoordPane);
+ VISU::initSpinBox( myCoord[2], -MAXVAL, MAXVAL, 1., "length_precision" );
aCoordLayout->addWidget( myCoord[2], 2, 1 );
myStackWgt->insertWidget(ManualMode, aManualPane );
QLabel* aMinLbl = new QLabel("From", myUseRangeBox);
aRangeLayout->addWidget(aMinLbl);
- //myMinVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //myMinVal = new SalomeApp_DoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //VISU::initSpinBox( myMinVal, aMinTime, aMaxTime, aStep, "visual_data_precision" );
myMinVal = new LineEdit( myUseRangeBox );
myMinVal->setValidator( new QDoubleValidator( myMinVal ) );
if ( myUseRangeBox->isChecked() )
QLabel* aMaxLbl = new QLabel("To", myUseRangeBox);
aRangeLayout->addWidget(aMaxLbl);
- //myMaxVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //myMaxVal = new SalomeApp_DoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //VISU::initSpinBox( myMaxVal, aMinTime, aMaxTime, aStep, "visual_data_precision" );
myMaxVal = new LineEdit( myUseRangeBox );
myMaxVal->setValidator( new QDoubleValidator( myMaxVal ) );
if ( myUseRangeBox->isChecked() )
#ifndef VISUGUI_TIMEANIMATION_H
#define VISUGUI_TIMEANIMATION_H
-#include "QtxDoubleSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SALOMEDSClient_Study.hxx"
#include "VTKViewer.h"
class SVTK_ViewWindow;
-//class QtxDoubleSpinBox;
-
class QLabel;
class QSlider;
class QListWidget;
VISU_TimeAnimation* myAnimator;
SVTK_ViewWindow * myViewWindow;
- QStackedWidget* myStackWgt;
+ QStackedWidget* myStackWgt;
QButtonGroup* myAxisGrp;
- QtxDoubleSpinBox* myDistVal;
- QListWidget* myFieldLst;
- QtxDoubleSpinBox* myCoord[3];
- QList<Offset> myOffsets;
+ SalomeApp_DoubleSpinBox* myDistVal;
+ QListWidget* myFieldLst;
+ SalomeApp_DoubleSpinBox* myCoord[3];
+ QList<Offset> myOffsets;
QCheckBox* mySaveChk;
QPushButton* myPropBtn;
QPushButton* myArrangeBtn;
QGroupBox* myUseRangeBox;
- // QtxDoubleSpinBox* myMinVal;
- // QtxDoubleSpinBox* myMaxVal;
+ // SalomeApp_DoubleSpinBox* myMinVal;
+ // SalomeApp_DoubleSpinBox* myMaxVal;
QLineEdit* myMinVal;
QLineEdit* myMaxVal;
}
}
//------------------------------------------------------------
- void initSpinBox( QSpinBox* spinBox,
- int min, int max, int step )
- {
- spinBox->setRange( min, max );
- spinBox->setSingleStep( step );
- }
- //------------------------------------------------------------
- void initSpinBox( QDoubleSpinBox* spinBox,
- double min, double max,
- double step, int decimals )
- {
- spinBox->setRange( min, max );
- spinBox->setSingleStep( step );
- spinBox->setDecimals( decimals );
- }
- //------------------------------------------------------------
bool getClippingPlanesFolder(_PTR(Study) theStudy, _PTR(SObject)& theSObject)
{
_PTR(SComponent) aVisuSO = theStudy->FindComponent("VISU");
VISU::Prs3d_i* thePrs3d, int pos);
void RemoveScalarBarPosition(VisuGUI* theModule, SVTK_ViewWindow* theViewWindow,
VISU::Prs3d_i* thePrs3d);
- void initSpinBox( QSpinBox*, int, int, int = 1 );
- void initSpinBox( QDoubleSpinBox*, double, double, double = 0.1, int = 6 );
#define CLIP_PLANES_FOLDER "Clipping Planes"
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
+#include <VisuGUI_GUITools.h>
+
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_Vectors_i.hh"
#include "LightApp_Application.h"
#include "SalomeApp_Module.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include "SUIT_Desktop.h"
#include "SUIT_MessageBox.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
#include <QtxColorButton.h>
#include <QRadioButton>
#include <QCheckBox>
#include <QLabel>
-#include <QSpinBox>
#include <QPushButton>
#include <QKeyEvent>
// Scale factor
ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup );
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
- ScalFact = new QtxDoubleSpinBox( 0, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup );
+ ScalFact = new SalomeApp_DoubleSpinBox( TopGroup );
+ VISU::initSpinBox( ScalFact, 0., 1.0E+38, .1, "visual_data_precision" );
ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ScalFact->setValue( 0.1 );
// Line width
LineWidLabel = new QLabel (tr("LBL_LINE_WIDTH"), TopGroup );
- LinWid = new QSpinBox( TopGroup );
+ LinWid = new SalomeApp_IntSpinBox( TopGroup );
+ LinWid->setAcceptNames( false );
LinWid->setMinimum( 1 );
LinWid->setMaximum( 10 );
LinWid->setSingleStep( 1 );
#define VISUGUI_VECTORSDLG_H
#include "VisuGUI_Prs3dDlg.h"
-#include "QtxDoubleSpinBox.h"
class QGroupBox;
class QTabWidget;
#include CORBA_CLIENT_HEADER(VISU_Gen)
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
QCheckBox* UseMagn;
QtxColorButton* SelColor;
QLabel* LineWidLabel;
- QSpinBox* LinWid;
+ SalomeApp_IntSpinBox* LinWid;
QLabel* ScaleLabel;
- QtxDoubleSpinBox* ScalFact;
+ SalomeApp_DoubleSpinBox* ScalFact;
QCheckBox* UseGlyph;
QButtonGroup* TypeGlyph;
QGroupBox* TypeGB;
$(KERNEL_CXXFLAGS) \
$(GUI_CXXFLAGS) \
$(MED_CXXFLAGS) \
- -I$(srcdir)/../OBJECT -I$(srcdir)/../PIPELINE -I$(srcdir)/../CONVERTOR
+ -I$(srcdir)/../OBJECT -I$(srcdir)/../PIPELINE -I$(srcdir)/../CONVERTOR \
+ -I$(srcdir)/../GUITOOLS
libVVTK_la_LDFLAGS= \
../OBJECT/libVisuObject.la \
../PIPELINE/libVisuPipeLine.la \
../CONVERTOR/libVisuConvertor.la \
+ ../GUITOOLS/libVISUGUITOOLS.la \
$(KERNEL_LDFLAGS) -lOpUtil \
$(GUI_LDFLAGS) -lsuit -lCAM -lSalomeObject -lSVTK \
$(QT_MT_LIBS) \
// Module : VISU
//
#include "VVTK_PickingDlg.h"
+#include <VisuGUI_GUITools.h>
#include "VISU_GaussPtsAct.h"
#include "VISU_PickingSettings.h"
#include <QIntValidator>
#include "QtxAction.h"
-#include "QtxDoubleSpinBox.h"
-#include "QtxIntSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
#include "QtxColorButton.h"
#include "LightApp_Application.h"
CursorGroupLayout->setMargin(11);
QLabel* CursorSizeLabel = new QLabel( tr( "CURSOR_SIZE" ), CursorGroup );
- myCursorSizeSpinBox = new QtxDoubleSpinBox( 0, 1, 0.1, CursorGroup );
+ myCursorSizeSpinBox = new SalomeApp_DoubleSpinBox( CursorGroup );
+ VISU::initSpinBox( myCursorSizeSpinBox, 0, 1, 0.1, "parametric_precision" );
myCursorSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* PyramidHeightLabel = new QLabel( tr( "PYRAMID_HEIGHT" ), CursorGroup );
double aHeightMin=1.e-7;
double aHeightMax=10.;
double aHeightStep=0.1;
- myPyramidHeightSpinBox = new QtxDoubleSpinBox(aHeightMin, aHeightMax, aHeightStep, CursorGroup );
+ myPyramidHeightSpinBox = new SalomeApp_DoubleSpinBox( CursorGroup );
+ VISU::initSpinBox( myPyramidHeightSpinBox, aHeightMin, aHeightMax, aHeightStep, "length_precision" );
myPyramidHeightSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* SelectionColorLabel = new QLabel( tr( "SELECTION_COLOR" ), CursorGroup );
ToleranceGroupLayout->setMargin(11);
QLabel* PointToleranceLabel = new QLabel( tr( "POINT_TOLERANCE" ), ToleranceGroup );
- myPointToleranceSpinBox = new QtxDoubleSpinBox( 0.001, 10.0, 0.01, ToleranceGroup );
+ myPointToleranceSpinBox = new SalomeApp_DoubleSpinBox( ToleranceGroup );
+ VISU::initSpinBox( myPointToleranceSpinBox, 0.001, 10.0, 0.01, "len_tol_precision" );
myPointToleranceSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ToleranceGroupLayout->addWidget( PointToleranceLabel, 0, 0 );
InfoWindowGroupLayout->setMargin(11);
QLabel* TransparencyLabel = new QLabel( tr( "TRANSPARENCY" ), InfoWindowGroup );
- myTransparencySpinBox = new QtxIntSpinBox( 0, 100, 10, InfoWindowGroup );
+ myTransparencySpinBox = new SalomeApp_IntSpinBox( InfoWindowGroup );
+ VISU::initSpinBox( myTransparencySpinBox, 0, 100, 10 );
myTransparencySpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
InfoWindowGroupLayout->addWidget( TransparencyLabel, 0, 0 );
CameraGroupLayout->setMargin(11);
QLabel* ZoomFactorLabel = new QLabel( tr( "ZOOM_FACTOR" ), CameraGroup );
- myZoomFactorSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1, CameraGroup );
+ myZoomFactorSpinBox = new SalomeApp_DoubleSpinBox( CameraGroup );
+ VISU::initSpinBox( myZoomFactorSpinBox, 0.1, 10.0, 0.1, "parametric_precision" );
myZoomFactorSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* StepNumberLabel = new QLabel( tr( "STEP_NUMBER" ), CameraGroup );
- myStepNumberSpinBox = new QtxIntSpinBox( 1, 100, 1, CameraGroup );
+ myStepNumberSpinBox = new SalomeApp_IntSpinBox( CameraGroup );
+ VISU::initSpinBox( myStepNumberSpinBox, 1, 100, 1 );
myStepNumberSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
CameraGroupLayout->addWidget( ZoomFactorLabel, 0, 0 );
class QPushButton;
class QtxAction;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class QtxColorButton;
class VISU_GaussPtsAct;
void keyPressEvent( QKeyEvent* e );
private:
- QtxDoubleSpinBox* myCursorSizeSpinBox;
- QtxDoubleSpinBox* myPyramidHeightSpinBox;
+ SalomeApp_DoubleSpinBox* myCursorSizeSpinBox;
+ SalomeApp_DoubleSpinBox* myPyramidHeightSpinBox;
QtxColorButton* mySelectionColorButton;
- QtxDoubleSpinBox* myPointToleranceSpinBox;
- QtxIntSpinBox* myTransparencySpinBox;
+ SalomeApp_DoubleSpinBox* myPointToleranceSpinBox;
+ SalomeApp_IntSpinBox* myTransparencySpinBox;
QComboBox* myPositionComboBox;
- QtxDoubleSpinBox* myZoomFactorSpinBox;
- QtxIntSpinBox* myStepNumberSpinBox;
+ SalomeApp_DoubleSpinBox* myZoomFactorSpinBox;
+ SalomeApp_IntSpinBox* myStepNumberSpinBox;
QCheckBox* myDisplayParentMeshCheckBox;
QtxAction* myAction;
// Module : VISU
//
#include "VVTK_PrimitiveBox.h"
+#include <VisuGUI_GUITools.h>
#include "VISU_OpenGLPointSpriteMapper.hxx"
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include "QtxDoubleSpinBox.h"
-#include "QtxIntSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
#include <QLayout>
#include <QLabel>
// Clamp ( Point Sprite & OpenGL Point )
myClampLabel = new QLabel( tr( "CLAMP" ), this );
- myClampSpinBox = new QtxDoubleSpinBox( 1.0, 512.0, 1.0, this );
+ myClampSpinBox = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( myClampSpinBox, 1.0, 512.0, 1.0, "parametric_precision" );
myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
aLayout->addWidget( myClampLabel, 1, 0 );
// Alpha Threshold ( Point Sprite )
myAlphaThresholdLabel = new QLabel( tr( "ALPHA_THRESHOLD" ), this );
- myAlphaThresholdSpinBox = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, this );
+ myAlphaThresholdSpinBox = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( myAlphaThresholdSpinBox, 0.0, 1.0, 0.1, "parametric_precision" );
myAlphaThresholdSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
aLayout->addWidget( myAlphaThresholdLabel, 4, 0 );
// Resolution ( Geometrical Sphere )
myResolutionLabel = new QLabel( tr( "RESOLUTION" ), this );
- myResolutionSpinBox = new QtxIntSpinBox( 3, 100, 1, this );
+ myResolutionSpinBox = new SalomeApp_IntSpinBox( this );
+ VISU::initSpinBox( myResolutionSpinBox, 3, 100, 1 );
myResolutionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( myResolutionSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( onResolutionChanged( int ) ) );
// Notification ( Geometrical Sphere )
myFaceLimitLabel = new QLabel( tr( "FACE_LIMIT" ), this );
- myFaceLimitSpinBox = new QtxIntSpinBox( 10, 1000000, 10, this );
+ myFaceLimitSpinBox = new SalomeApp_IntSpinBox( this );
+ VISU::initSpinBox( myFaceLimitSpinBox, 10, 1000000, 10 );
myFaceLimitSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
aLayout->addWidget( myFaceLimitLabel, 7, 0 );
class QPushButton;
class QRadioButton;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class VVTK_EXPORT VVTK_PrimitiveBox : public QGroupBox
{
QString myAlphaTexture;
QLabel* myClampLabel;
- QtxDoubleSpinBox* myClampSpinBox;
+ SalomeApp_DoubleSpinBox* myClampSpinBox;
QLabel* myMainTextureLabel;
QLineEdit* myMainTextureLineEdit;
QPushButton* myAlphaTextureButton;
QLabel* myAlphaThresholdLabel;
- QtxDoubleSpinBox* myAlphaThresholdSpinBox;
+ SalomeApp_DoubleSpinBox* myAlphaThresholdSpinBox;
QLabel* myResolutionLabel;
- QtxIntSpinBox* myResolutionSpinBox;
+ SalomeApp_IntSpinBox* myResolutionSpinBox;
QLabel* myFaceNumberLabel;
QLineEdit* myFaceNumberLineEdit;
QLabel* myFaceLimitLabel;
- QtxIntSpinBox* myFaceLimitSpinBox;
+ SalomeApp_IntSpinBox* myFaceLimitSpinBox;
};
//
#include "VVTK_RecorderDlg.h"
#include "VVTK_Recorder.h"
+#include <VisuGUI_GUITools.h>
#include "SUIT_FileDlg.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include "QtxDoubleSpinBox.h"
-#include "QtxIntSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
#include "LightApp_Application.h"
myRecordingModeComboBox->setCurrentIndex( aResourceMgr->integerValue( "VISU", "recorder_mode", 1 ) );
QLabel* aFPSLabel = new QLabel( tr( "FPS" ), mySettingsBox );
- myFPSSpinBox = new QtxDoubleSpinBox( 0.1, 100.0, 1.0, mySettingsBox );
+ myFPSSpinBox = new SalomeApp_DoubleSpinBox( mySettingsBox );
+ VISU::initSpinBox( myFPSSpinBox, 0.1, 100.0, 1.0, "parametric_precision" );
myFPSSpinBox->setValue( aResourceMgr->doubleValue( "VISU", "recorder_fps", 10.0 ) );
QLabel* aQualityLabel = new QLabel( tr( "QUALITY" ), mySettingsBox );
- myQualitySpinBox = new QtxIntSpinBox( 1, 100, 1, mySettingsBox );
+ myQualitySpinBox = new SalomeApp_IntSpinBox( mySettingsBox );
+ VISU::initSpinBox( myQualitySpinBox, 1, 100, 1 );
myQualitySpinBox->setValue( aResourceMgr->integerValue( "VISU", "recorder_quality", 80 ) );
myProgressiveCheckBox = new QCheckBox( tr( "PROGRESSIVE" ), mySettingsBox );
class QPushButton;
class QTimer;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class VVTK_Recorder;
QLineEdit* myFileNameLineEdit;
QComboBox* myRecordingModeComboBox;
- QtxDoubleSpinBox* myFPSSpinBox;
- QtxIntSpinBox* myQualitySpinBox;
+ SalomeApp_DoubleSpinBox* myFPSSpinBox;
+ SalomeApp_IntSpinBox* myQualitySpinBox;
QCheckBox* myProgressiveCheckBox;
};
#include "VVTK_SegmentationCursorDlg.h"
#include "VVTK_PrimitiveBox.h"
#include "VVTK_SizeBox.h"
+#include <VisuGUI_GUITools.h>
#include "VISU_GaussPtsAct.h"
#include "VISU_GaussPtsSettings.h"
#include <QTabWidget>
#include <QtxAction.h>
-#include <QtxDoubleSpinBox.h>
-#include <QtxIntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
#include <CAM_Module.h>
//----------------------------------------------------------------
OriginGroupLayout->setMargin(11);
QLabel* XOriginLabel = new QLabel( tr( "ORIGIN_X" ), myOriginGroup );
- myXOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+ myXOriginSpinBox = new SalomeApp_DoubleSpinBox( myOriginGroup );
+ VISU::initSpinBox( myXOriginSpinBox, -1000.0, 1000.0, 0.1, "length_precision" );
myXOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myXOriginSpinBox->setMinimumWidth( 100 );
myXOriginSpinBox->setValue( 0.0 );
QLabel* YOriginLabel = new QLabel( tr( "ORIGIN_Y" ), myOriginGroup );
- myYOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+ myYOriginSpinBox = new SalomeApp_DoubleSpinBox( myOriginGroup );
+ VISU::initSpinBox( myYOriginSpinBox, -1000.0, 1000.0, 0.1, "length_precision" );
myYOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myYOriginSpinBox->setMinimumWidth( 100 );
myYOriginSpinBox->setValue( 0.0 );
QLabel* ZOriginLabel = new QLabel( tr( "ORIGIN_Z" ), myOriginGroup );
- myZOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+ myZOriginSpinBox = new SalomeApp_DoubleSpinBox( myOriginGroup );
+ VISU::initSpinBox( myZOriginSpinBox, -1000.0, 1000.0, 0.1, "length_precision" );
//myZOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myZOriginSpinBox->setMinimumWidth( 100 );
myZOriginSpinBox->setValue( 1.0 );
DirectionGroupLayout->setMargin(11);
QLabel* DXDirectionLabel = new QLabel( tr( "DIRECTION_DX" ), myDirectionGroup );
- myDXDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+ myDXDirectionSpinBox = new SalomeApp_DoubleSpinBox( myDirectionGroup );
+ VISU::initSpinBox( myDXDirectionSpinBox, -1.0, 1.0, 0.1, "length_precision" );
myDXDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDXDirectionSpinBox->setMinimumWidth( 100 );
myDXDirectionSpinBox->setValue( 0.0 );
QLabel* DYDirectionLabel = new QLabel( tr( "DIRECTION_DY" ), myDirectionGroup );
- myDYDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+ myDYDirectionSpinBox = new SalomeApp_DoubleSpinBox( myDirectionGroup );
+ VISU::initSpinBox( myDYDirectionSpinBox, -1.0, 1.0, 0.1, "length_precision" );
myDYDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDYDirectionSpinBox->setMinimumWidth( 100 );
myDYDirectionSpinBox->setValue( 0.0 );
QLabel* DZDirectionLabel = new QLabel( tr( "DIRECTION_DZ" ), myDirectionGroup );
- myDZDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+ myDZDirectionSpinBox = new SalomeApp_DoubleSpinBox( myDirectionGroup );
+ VISU::initSpinBox( myDZDirectionSpinBox, -1.0, 1.0, 0.1, "length_precision" );
myDZDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDZDirectionSpinBox->setMinimumWidth( 100 );
myDZDirectionSpinBox->setValue( 1.0 );
DepthGroupLayout->setMargin(11);
QLabel* DepthLabel = new QLabel( tr( "DEPTH" ), myDepthGroup );
- myDepthSpinBox = new QtxDoubleSpinBox( 0.0, VTK_LARGE_FLOAT, 0.1, myDepthGroup );
+ myDepthSpinBox = new SalomeApp_DoubleSpinBox( myDepthGroup );
+ VISU::initSpinBox( myDepthSpinBox, 0.0, VTK_LARGE_FLOAT, 0.1, "length_precision" );
myDepthSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDepthSpinBox->setMinimumWidth( 100 );
myDepthSpinBox->setValue( 1.0 );
RadiusGroupLayout->setMargin(11);
QLabel* RadiusLabel = new QLabel( tr( "RADIUS" ),myRadiusGroup );
- myRadiusSpinBox = new QtxDoubleSpinBox( 0.0, 1000.0, 1.0,myRadiusGroup );
+ myRadiusSpinBox = new SalomeApp_DoubleSpinBox( myRadiusGroup );
+ VISU::initSpinBox( myRadiusSpinBox, 0.0, 1000.0, 1.0, "length_precision" );
myRadiusSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myRadiusSpinBox->setMinimumWidth( 100 );
myRadiusSpinBox->setValue( 100.0 );
QLabel* RatioLabel = new QLabel( tr( "RATIO" ), myRadiusGroup );
- myRatioSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1,myRadiusGroup );
+ myRatioSpinBox = new SalomeApp_DoubleSpinBox( myRadiusGroup );
+ VISU::initSpinBox( myRatioSpinBox, 0.1, 10.0, 0.1, "parametric_precision" );
myRatioSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myRatioSpinBox->setMinimumWidth( 100 );
myRatioSpinBox->setValue( 2.0 );
MagnificationGroupLayout->setMargin(11);
myMagnificationLabel = new QLabel( tr( "MAGNIFICATION" ), MagnificationGroup );
- myMagnificationSpinBox = new QtxIntSpinBox( 1, 10000, 10, MagnificationGroup );
+ myMagnificationSpinBox = new SalomeApp_IntSpinBox( MagnificationGroup );
+ VISU::initSpinBox( myMagnificationSpinBox, 1, 10000, 10 );
myMagnificationSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
MagnificationGroupLayout->addWidget( myMagnificationLabel, 0, 0 );
// Increment
myIncrementLabel = new QLabel( tr( "INCREMENT" ), MagnificationGroup );
- myIncrementSpinBox = new QtxDoubleSpinBox( 0.01, 10, 0.1, MagnificationGroup );
+ myIncrementSpinBox = new SalomeApp_DoubleSpinBox( MagnificationGroup );
+ VISU::initSpinBox( myIncrementSpinBox, 0.01, 10, 0.1, "parametric_precision" );
myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
MagnificationGroupLayout->addWidget( myIncrementLabel, 0, 2 );
//class QVBox;
class QtxAction;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class VISU_GaussPtsAct1;
class VISU_InsideCursorSettings;
QWidget* mySegmentationCursorBox;
QGroupBox* myOriginGroup;
- QtxDoubleSpinBox* myXOriginSpinBox;
- QtxDoubleSpinBox* myYOriginSpinBox;
- QtxDoubleSpinBox* myZOriginSpinBox;
+ SalomeApp_DoubleSpinBox* myXOriginSpinBox;
+ SalomeApp_DoubleSpinBox* myYOriginSpinBox;
+ SalomeApp_DoubleSpinBox* myZOriginSpinBox;
QGroupBox* myDirectionGroup;
- QtxDoubleSpinBox* myDXDirectionSpinBox;
- QtxDoubleSpinBox* myDYDirectionSpinBox;
- QtxDoubleSpinBox* myDZDirectionSpinBox;
+ SalomeApp_DoubleSpinBox* myDXDirectionSpinBox;
+ SalomeApp_DoubleSpinBox* myDYDirectionSpinBox;
+ SalomeApp_DoubleSpinBox* myDZDirectionSpinBox;
QGroupBox* myDepthGroup;
- QtxDoubleSpinBox* myDepthSpinBox;
+ SalomeApp_DoubleSpinBox* myDepthSpinBox;
QGroupBox* myRadiusGroup;
- QtxDoubleSpinBox* myRadiusSpinBox;
- QtxDoubleSpinBox* myRatioSpinBox;
+ SalomeApp_DoubleSpinBox* myRadiusSpinBox;
+ SalomeApp_DoubleSpinBox* myRatioSpinBox;
bool myIsPlaneSegmentation;
vtkSmartPointer<VISU_OutsideCursorSettings> myOutsideCursorSettings;
QLabel* myMagnificationLabel;
- QtxIntSpinBox* myMagnificationSpinBox;
+ SalomeApp_IntSpinBox* myMagnificationSpinBox;
QLabel* myIncrementLabel;
- QtxDoubleSpinBox* myIncrementSpinBox;
+ SalomeApp_DoubleSpinBox* myIncrementSpinBox;
};
#endif
//
#include "VVTK_SizeBox.h"
+#include <VisuGUI_GUITools.h>
+
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include <QtxDoubleSpinBox.h>
-#include <QtxIntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
#include <QtxColorButton.h>
#include <QLayout>
// Outside Size
myOutsideSizeLabel = new QLabel( tr( "OUTSIDE_SIZE" ), SizeGroup );
- myOutsideSizeSpinBox = new QtxIntSpinBox( 0, 100, 1, SizeGroup );
+ myOutsideSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myOutsideSizeSpinBox, 0, 100, 1 );
myOutsideSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SizeGroupLayout->addWidget( myOutsideSizeLabel, 0, 0 );
// Geometry Size
myGeomSizeLabel = new QLabel( tr( "GEOM_SIZE" ), SizeGroup );
- myGeomSizeSpinBox = new QtxIntSpinBox( 0, 100, 1, SizeGroup );
+ myGeomSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myGeomSizeSpinBox, 0, 100, 1 );
myGeomSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SizeGroupLayout->addWidget( myGeomSizeLabel, 0, 0 );
// Min Size
myMinSizeLabel = new QLabel( tr( "MIN_SIZE" ), SizeGroup );
- myMinSizeSpinBox = new QtxIntSpinBox( 0, 100, 1, SizeGroup );
+ myMinSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myMinSizeSpinBox, 0, 100, 1 );
myMinSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SizeGroupLayout->addWidget( myMinSizeLabel, 1, 0 );
// Max Size
myMaxSizeLabel = new QLabel( tr( "MAX_SIZE" ), SizeGroup );
- myMaxSizeSpinBox = new QtxIntSpinBox( 0, 100, 1, SizeGroup );
+ myMaxSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myMaxSizeSpinBox, 0, 100, 1 );
myMaxSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SizeGroupLayout->addWidget( myMaxSizeLabel, 1, 2 );
// Magnification
myMagnificationLabel = new QLabel( tr( "MAGNIFICATION" ), SizeGroup );
- myMagnificationSpinBox = new QtxIntSpinBox( 1, 10000, 10, SizeGroup );
+ myMagnificationSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myMagnificationSpinBox, 1, 10000, 10 );
myMagnificationSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SizeGroupLayout->addWidget( myMagnificationLabel, 2, 0 );
// Increment
myIncrementLabel = new QLabel( tr( "INCREMENT" ), SizeGroup );
- myIncrementSpinBox = new QtxDoubleSpinBox( 0.01, 10, 0.1, SizeGroup );
+ myIncrementSpinBox = new SalomeApp_DoubleSpinBox( SizeGroup );
+ VISU::initSpinBox( myIncrementSpinBox, 0.01, 10, 0.1, "parametric_precision" );
myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SizeGroupLayout->addWidget( myIncrementLabel, 2, 2 );
class QCheckBox;
class QGroupBox;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class QtxColorButton;
class VVTK_EXPORT VVTK_SizeBox : public QWidget
int myType;
QLabel* myOutsideSizeLabel;
- QtxIntSpinBox* myOutsideSizeSpinBox;
+ SalomeApp_IntSpinBox* myOutsideSizeSpinBox;
QLabel* myGeomSizeLabel;
- QtxIntSpinBox* myGeomSizeSpinBox;
+ SalomeApp_IntSpinBox* myGeomSizeSpinBox;
QLabel* myMinSizeLabel;
- QtxIntSpinBox* myMinSizeSpinBox;
+ SalomeApp_IntSpinBox* myMinSizeSpinBox;
QLabel* myMaxSizeLabel;
- QtxIntSpinBox* myMaxSizeSpinBox;
+ SalomeApp_IntSpinBox* myMaxSizeSpinBox;
QLabel* myMagnificationLabel;
- QtxIntSpinBox* myMagnificationSpinBox;
+ SalomeApp_IntSpinBox* myMagnificationSpinBox;
QLabel* myIncrementLabel;
- QtxDoubleSpinBox* myIncrementSpinBox;
+ SalomeApp_DoubleSpinBox* myIncrementSpinBox;
QCheckBox* myUniformCheckBox;