mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-14 09:38:34 +05:00
Preferences
This commit is contained in:
parent
a3dbf9db14
commit
0759ac4eab
@ -2882,12 +2882,6 @@ msgstr "OCC Viewer 3d"
|
|||||||
msgid "PREF_GROUP_GENERAL"
|
msgid "PREF_GROUP_GENERAL"
|
||||||
msgstr "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"
|
msgid "PREF_SHADING_COLOR"
|
||||||
msgstr "Default 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_ObjectBrowser, Qt::DockLeft );
|
||||||
mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::DockBottom );
|
mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::DockBottom );
|
||||||
mappa.insert( SalomeApp_Application::WT_LogWindow, Qt::DockBottom );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryGUI::viewManagers( QStringList& lst ) const
|
void GeometryGUI::viewManagers( QStringList& lst ) const
|
||||||
@ -1487,30 +1486,16 @@ void GeometryGUI::createPreferences()
|
|||||||
int genGroup = addPreference( tr( "PREF_GROUP_GENERAL" ), tabId );
|
int genGroup = addPreference( tr( "PREF_GROUP_GENERAL" ), tabId );
|
||||||
addPreference( tr( "PREF_SHADING_COLOR" ), genGroup,
|
addPreference( tr( "PREF_SHADING_COLOR" ), genGroup,
|
||||||
SalomeApp_Preferences::Color, "Geometry", "shading_color" );
|
SalomeApp_Preferences::Color, "Geometry", "shading_color" );
|
||||||
//addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
|
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
|
||||||
// SalomeApp_Preferences::IntSpin, "GEOM", "SettingsGeomStep" );
|
SalomeApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
|
||||||
|
|
||||||
int occGroup = addPreference( tr( "PREF_GROUP_OCCVIEWER" ), tabId );
|
setPreferenceProperty( genGroup, "columns", 1 );
|
||||||
setPreferenceProperty( occGroup, "columns", 1 );
|
|
||||||
addPreference( tr( "PREF_ISOS_U" ), occGroup,
|
setPreferenceProperty( step, "min", 0.001 );
|
||||||
SalomeApp_Preferences::IntSpin, "Geometry", "isos_u" );
|
setPreferenceProperty( step, "max", 10000 );
|
||||||
addPreference( tr( "PREF_ISOS_V" ), occGroup,
|
setPreferenceProperty( step, "precision", 3 );
|
||||||
SalomeApp_Preferences::IntSpin, "Geometry", "isos_v" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryGUI::preferencesChanged( const QString& section, const QString& param )
|
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_Session* sess = SUIT_Session::session();
|
||||||
SUIT_ResourceMgr* resMgr = sess->resourceMgr();
|
SUIT_ResourceMgr* resMgr = sess->resourceMgr();
|
||||||
|
|
||||||
double step = resMgr->doubleValue( "Geometry:SettingsGeomStep", 100. );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100. );
|
||||||
|
|
||||||
Standard_Boolean res = false;
|
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) {
|
if(res) {
|
||||||
resMgr->setValue( "Geometry:SettingsGeomStep", dd );
|
resMgr->setValue( "Geometry", "SettingsGeomStep", dd );
|
||||||
|
|
||||||
/* Emit signal to GeometryGUI_SpinBoxes */
|
/* Emit signal to GeometryGUI_SpinBoxes */
|
||||||
getGeometryGUI()->EmitSignalDefaultStepValueChanged( dd );
|
getGeometryGUI()->EmitSignalDefaultStepValueChanged( dd );
|
||||||
|
Loading…
Reference in New Issue
Block a user