]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
0023084: [CEA 1431] To choose in the preferences of the type Paravis trace Paraview
authorvsr <vsr@opencascade.com>
Thu, 18 Jun 2015 09:26:13 +0000 (12:26 +0300)
committervsr <vsr@opencascade.com>
Thu, 18 Jun 2015 09:26:13 +0000 (12:26 +0300)
- Show single warning messages if Preferences dialog box if any option that requires application restart has been changed

src/PVGUI/PVGUI_Module.cxx
src/PVGUI/resources/PARAVIS_msg_en.ts
src/PVGUI/resources/PARAVIS_msg_fr.ts
src/PVGUI/resources/PARAVIS_msg_ja.ts

index dbc634408e4f8420a0ef2f053881f0d56e70f1d2..5439ff1c85b425c1bdc607e99b384be944cb9f8e 100644 (file)
@@ -875,6 +875,9 @@ pqServer* PVGUI_Module::getActiveServer()
 */
 void PVGUI_Module::createPreferences()
 {
+  QList<QVariant> aIndices;
+  QStringList aStrings;
+
   // Paraview settings tab
   int aParaViewSettingsTab = addPreference( tr( "TIT_PVIEWSETTINGS" ) );
 
@@ -886,8 +889,6 @@ void PVGUI_Module::createPreferences()
 
   // Paravis settings tab
   int aParaVisSettingsTab = addPreference( tr( "TIT_PVISSETTINGS" ) );
-  addPreference( tr( "PREF_STOP_TRACE" ), aParaVisSettingsTab, 
-                 LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "stop_trace" );
 
   addPreference( tr( "PREF_NO_EXT_PVSERVER" ), aParaVisSettingsTab, 
                  LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "no_ext_pv_server" );
@@ -896,24 +897,30 @@ void PVGUI_Module::createPreferences()
                                  LightApp_Preferences::Selector,
                                  PARAVIS_MODULE_NAME, "savestate_type" );
 
-  int aTraceType = addPreference( tr( "PREF_TRACE_TYPE_LBL" ), aParaVisSettingsTab,
-                                 LightApp_Preferences::Selector,
-                                 PARAVIS_MODULE_NAME, "tracestate_type" );
-  QList<QVariant> aIndices;
-  QStringList aStrings;
+  aStrings.clear();
+  aIndices.clear();
   aIndices << 0 << 1 << 2;
-  aStrings << tr("PREF_SAVE_TYPE_0");
-  aStrings << tr("PREF_SAVE_TYPE_1");
-  aStrings << tr("PREF_SAVE_TYPE_2");
+  aStrings << tr("PREF_SAVE_TYPE_0") << tr("PREF_SAVE_TYPE_1") << tr("PREF_SAVE_TYPE_2");
   setPreferenceProperty( aSaveType, "strings", aStrings );
   setPreferenceProperty( aSaveType, "indexes", aIndices );
 
+  // ... "Language" group <<start>>
+  int traceGroup = addPreference( tr( "PREF_GROUP_TRACE" ), aParaVisSettingsTab );
+
+  int stopTrace = addPreference( tr( "PREF_STOP_TRACE" ), traceGroup, 
+                                 LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "stop_trace" );
+  setPreferenceProperty( stopTrace, "restart",  true );
+
+  int aTraceType = addPreference( tr( "PREF_TRACE_TYPE_LBL" ), traceGroup,
+                                 LightApp_Preferences::Selector,
+                                 PARAVIS_MODULE_NAME, "tracestate_type" );
   aStrings.clear();
-  aStrings << tr("PREF_TRACE_TYPE_0");
-  aStrings << tr("PREF_TRACE_TYPE_1");
-  aStrings << tr("PREF_TRACE_TYPE_2");
+  aIndices.clear();
+  aIndices << 0 << 1 << 2;
+  aStrings << tr("PREF_TRACE_TYPE_0") << tr("PREF_TRACE_TYPE_1") << tr("PREF_TRACE_TYPE_2");
   setPreferenceProperty( aTraceType, "strings", aStrings );
   setPreferenceProperty( aTraceType, "indexes", aIndices );
+  setPreferenceProperty( aTraceType, "restart",  true );
 }
 
 /*!
index 06c2f1647b74e75552ea212d561e4a788b1be0d1..fd6d323c2b96fe1b7b0e44d02b4cdecb131c9a67 100644 (file)
         <source>TOOL_VCR_CONTROLS</source>
         <translation>VCR Controls</translation>
     </message>
+    <message>
+        <source>PREF_GROUP_TRACE</source>
+        <translation>Trace</translation>
+    </message>
     <message>
         <source>PREF_STOP_TRACE</source>
-        <translation>Deactivate Trace (for next session only)</translation>
+        <translation>Deactivate Trace</translation>
     </message>
     <message>
         <source>PREF_NO_EXT_PVSERVER</source>
index ea61e3f07286083d9cb4fa874aad58f1ca099f5f..7f149ccba55070a3b5679868ffeae24dd2b1f5f6 100644 (file)
         <source>TOOL_VCR_CONTROLS</source>
         <translation>Contrôles VCR</translation>
     </message>
+    <message>
+        <source>PREF_GROUP_TRACE</source>
+        <translation>Trace</translation>
+    </message>
     <message>
         <source>PREF_STOP_TRACE</source>
         <translation>Déactiver la trace (seulement pour la session suivante)</translation>
index 6eb05744176c6d85be525af06211c7d51a1317b9..7765e30d10f8d0b789ede73e0a78eb777f1beef3 100644 (file)
       <source>TOOL_VCR_CONTROLS</source>
       <translation>VCR のコントロール</translation>
     </message>
+    <message>
+      <source>PREF_GROUP_TRACE</source>
+      <translation type="unfinished">Trace</translation>
+    </message>
     <message>
       <source>PREF_STOP_TRACE</source>
       <translation>(のみのための次のセッション) のトレースを有効に</translation>