-/*!
- \brief Creates ParaViS context menu popup
-*/
-void PVGUI_Module::contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle)
-{
- LightApp_Module::contextMenuPopup(theClient, theMenu, theTitle);
-
- // Check if we are in Object Browser
- SUIT_DataBrowser* ob = getApp()->objectBrowser();
- bool isOBClient = (ob && theClient == ob->popupClientType());
- if (!isOBClient) {
- return;
- }
-
- // Get list of selected objects
- LightApp_SelectionMgr* aSelectionMgr = getApp()->selectionMgr();
- SALOME_ListIO aListIO;
- aSelectionMgr->selectedObjects(aListIO);
- if (aListIO.Extent() == 1 && aListIO.First()->hasEntry()) {
- QString entry = QString(aListIO.First()->getEntry());
-
- // Get active study
- SalomeApp_Study* activeStudy =
- dynamic_cast<SalomeApp_Study*>(getApp()->activeStudy());
- if(!activeStudy) {
- return;
- }
-
- // Get SALOMEDS client study
- _PTR(Study) studyDS = activeStudy->studyDS();
- if(!studyDS) {
- return;
- }
-
- QString paravisDataType(PARAVIS_MODULE_NAME);
- if(activeStudy && activeStudy->isComponent(entry) &&
- activeStudy->componentDataType(entry) == paravisDataType) {
- // ParaViS module object
- theMenu->addSeparator();
- theMenu->addAction(action(SaveStatePopupId));
- }
- else {
- // Try to get state object
- _PTR(SObject) stateSObj =
- studyDS->FindObjectID(entry.toLatin1().constData());
- if (!stateSObj) {
- return;
- }
-
- // Check local id
- _PTR(GenericAttribute) anAttr;
- if (!stateSObj->FindAttribute(anAttr, "AttributeLocalID")) {
- return;
- }
-
- _PTR(AttributeLocalID) anID(anAttr);
-
- if (anID->Value() == PVSTATEID) {
- // Paraview state object
- theMenu->addSeparator();
- theMenu->addAction(action(AddStatePopupId));
- theMenu->addAction(action(CleanAndAddStatePopupId));
- theMenu->addSeparator();
- theMenu->addAction(action(ParaVisRenameId));
- theMenu->addAction(action(ParaVisDeleteId));
- }
- }
- }
+ addPreference( tr( "PREF_NO_EXT_PVSERVER" ), aParaVisSettingsTab,
+ LightApp_Preferences::Bool, PARAVIS_MODULE_NAME, "no_ext_pv_server" );
+
+ int aSaveType = addPreference( tr( "PREF_SAVE_TYPE_LBL" ), aParaVisSettingsTab,
+ LightApp_Preferences::Selector,
+ PARAVIS_MODULE_NAME, "savestate_type" );
+
+ aStrings.clear();
+ aIndices.clear();
+ aIndices << 0 << 1 << 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();
+ 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 );