From 0759ac4eab8abf9e306533c268f7b8322fac0efa Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 22 Jun 2005 09:58:12 +0000 Subject: [PATCH] Preferences --- src/GEOMGUI/GEOM_msg_en.po | 6 ------ src/GEOMGUI/GeometryGUI.cxx | 31 ++++++++--------------------- src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 8 ++++---- 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po index de7d79c71..c904053eb 100644 --- a/src/GEOMGUI/GEOM_msg_en.po +++ b/src/GEOMGUI/GEOM_msg_en.po @@ -2882,12 +2882,6 @@ msgstr "OCC Viewer 3d" msgid "PREF_GROUP_GENERAL" msgstr "General" -msgid "PREF_ISOS_U" -msgstr "Number of isolines along U" - -msgid "PREF_ISOS_V" -msgstr "Number of isolines along V" - msgid "PREF_SHADING_COLOR" msgstr "Default shading color" diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 2c5a356e7..2e48c4022 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -1398,7 +1398,6 @@ void GeometryGUI::windows( QMap& mappa ) const { mappa.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::DockLeft ); mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::DockBottom ); - mappa.insert( SalomeApp_Application::WT_LogWindow, Qt::DockBottom ); } void GeometryGUI::viewManagers( QStringList& lst ) const @@ -1487,30 +1486,16 @@ void GeometryGUI::createPreferences() int genGroup = addPreference( tr( "PREF_GROUP_GENERAL" ), tabId ); addPreference( tr( "PREF_SHADING_COLOR" ), genGroup, SalomeApp_Preferences::Color, "Geometry", "shading_color" ); - //addPreference( tr( "PREF_STEP_VALUE" ), genGroup, - // SalomeApp_Preferences::IntSpin, "GEOM", "SettingsGeomStep" ); - - int occGroup = addPreference( tr( "PREF_GROUP_OCCVIEWER" ), tabId ); - setPreferenceProperty( occGroup, "columns", 1 ); - addPreference( tr( "PREF_ISOS_U" ), occGroup, - SalomeApp_Preferences::IntSpin, "Geometry", "isos_u" ); - addPreference( tr( "PREF_ISOS_V" ), occGroup, - SalomeApp_Preferences::IntSpin, "Geometry", "isos_v" ); + int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup, + SalomeApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" ); + + setPreferenceProperty( genGroup, "columns", 1 ); + + setPreferenceProperty( step, "min", 0.001 ); + setPreferenceProperty( step, "max", 10000 ); + setPreferenceProperty( step, "precision", 3 ); } void GeometryGUI::preferencesChanged( const QString& section, const QString& param ) { - //printf( "\n-------------> %s , %s\n", section.latin1(), param.latin1() ); - if ( section == QString( "Geometry" ) && - ( param == QString( "isos_u" ) || param == QString( "isos_v" ) ) ) - { - QPtrList lst; - application()->viewManagers( OCCViewer_Viewer::Type(), lst ); - const int u = application()->resourceMgr()->integerValue( section, "isos_u" ); - const int v = application()->resourceMgr()->integerValue( section, "isos_v" ); - for ( QPtrListIterator it( lst ); it.current(); ++it ) - { - ((OCCViewer_Viewer*)it.current())->setIsos( u, v ); - } - } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 07f21b975..31dd045d1 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -148,12 +148,12 @@ void GEOMToolsGUI::OnSettingsStep() SUIT_Session* sess = SUIT_Session::session(); SUIT_ResourceMgr* resMgr = sess->resourceMgr(); - double step = resMgr->doubleValue( "Geometry:SettingsGeomStep", 100. ); - + double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100. ); + Standard_Boolean res = false; - double dd = GEOMBase::Parameter(res, QString("%1").arg(step), tr("GEOM_MEN_STEP_LABEL"), tr("GEOM_STEP_TITLE"), 0.001, 10000.0, 3); + double dd = GEOMBase::Parameter( res, QString("%1").arg(step), tr("GEOM_MEN_STEP_LABEL"), tr("GEOM_STEP_TITLE"), 0.001, 10000.0, 3); if(res) { - resMgr->setValue( "Geometry:SettingsGeomStep", dd ); + resMgr->setValue( "Geometry", "SettingsGeomStep", dd ); /* Emit signal to GeometryGUI_SpinBoxes */ getGeometryGUI()->EmitSignalDefaultStepValueChanged( dd ); -- 2.39.2