mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
Preferences
This commit is contained in:
parent
a3dbf9db14
commit
0759ac4eab
@ -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"
|
||||
|
||||
|
@ -1398,7 +1398,6 @@ void GeometryGUI::windows( QMap<int, int>& 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 step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
|
||||
SalomeApp_Preferences::IntSpin, "Geometry", "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" );
|
||||
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<SUIT_ViewManager> 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<SUIT_ViewManager> it( lst ); it.current(); ++it )
|
||||
{
|
||||
((OCCViewer_Viewer*)it.current())->setIsos( u, v );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user