- 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");
-
- int aSaveType = addPreference(tr( "PREF_SAVE_TYPE_LBL" ), aParaVisSettingsTab,
- LightApp_Preferences::Selector,
- PARAVIS_MODULE_NAME, "savestate_type");
- QList<QVariant> aIndices;
- QStringList aStrings;
- aIndices<<0<<1<<2;
- aStrings<<tr("PREF_SAVE_TYPE_0");
- aStrings<<tr("PREF_SAVE_TYPE_1");
- aStrings<<tr("PREF_SAVE_TYPE_2");
- setPreferenceProperty(aSaveType, "strings", aStrings);
- setPreferenceProperty(aSaveType, "indexes", aIndices);
-}
-
-/*!
- \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);