Salome HOME
add comments
authorPaul RASCLE <paul.rascle@edf.fr>
Tue, 28 Feb 2017 14:57:53 +0000 (15:57 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Tue, 28 Feb 2017 14:57:53 +0000 (15:57 +0100)
src/LightApp/LightApp_Application.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.h
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx
src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx

index 0b8cc6431b8c61ca617483f2f7616d3f2cc6935d..18532ce0e8d1260e39e6df59a8dd25c2314cc78a 100644 (file)
@@ -1007,13 +1007,11 @@ void LightApp_Application::onHelpAbout()
 */
 void LightApp_Application::onSelection()
 {
-  MESSAGE("onSelection_1")
+  //MESSAGE("onSelection")
   onSelectionChanged();
-  MESSAGE("onSelection_2")
 
   if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
     ((LightApp_Module*)activeModule())->selectionChanged();
-  MESSAGE("onSelection_3")
 }
 
 /*!
index cdb758ba09cacae7147f08f2b109257cf8f40fae..fd5147e3cfc0525d94ac439b7d79061657b73041 100644 (file)
@@ -33,7 +33,9 @@
 
 /*!
  *  Class:       SALOME_PYQT_BorrowedDataObjectLight
- *  Description: LIGHT PYTHON module's Borrowed data object: reference objects from other modules
+ *  Description: LIGHT PYTHON module's Borrowed data object: reference objects from other modules.
+ *  Used to propagate selection in a light module client of other modules publishing objects in study.
+ *  (copied from SALOME_PYQT_DataObjectLight)
  */
 
 //=================================================================================
index 344818eb69d888692c2967b70405132a328eb274..e0e8ebf92ab0e5660eae9ef23d10a4ad51d5a811 100644 (file)
@@ -32,6 +32,9 @@
 
 /*!
  * SALOME_PYQT_BorrowedDataObjectLight - PYTHON LIGHT module's data object class
+ * for objects created by other modules and referenced in a light module.
+ * Used to propagate selection in a light module client of other modules publishing objects in study.
+ * (copied from SALOME_PYQT_DataObjectLight)
  */
 class SALOME_PYQT_LIGHT_EXPORT SALOME_PYQT_BorrowedDataObjectLight : public virtual LightApp_DataObject
 {
index 6b17d8d0941d806d97dde44c3d35790ec99bc504..80f3e8ea012dff22b5657289e683d5ebfd2e91d0 100644 (file)
@@ -605,31 +605,44 @@ SALOME_PYQT_DataObjectLight* SALOME_PYQT_ModuleLight::findObject( const QString&
   return obj;
 }
 
+/*!
+  \brief not used yet
+*/
 void SALOME_PYQT_ModuleLight::getSelected( DataObjectList& ) const
 {
   MESSAGE("getSelected");
 }
 
+/*!
+  \brief not used yet
+*/
 unsigned long SALOME_PYQT_ModuleLight::getModifiedTime() const
 {
   MESSAGE("getModifiedTime");
-
 }
 
-
+/*!
+  \brief not used yet
+*/
 SUIT_DataObject* SALOME_PYQT_ModuleLight::root() const
 {
   MESSAGE("root");
-
 }
 
-
+/*!
+  \brief Used to notify a Python light module of a modification of selection in study (propagation of a remote selection)
+  \param list of study entries
+*/
 void SALOME_PYQT_ModuleLight::setSelected( const QStringList& entries, const bool isUnused)
 {
   MESSAGE("setSelected");
   return myHelper->selectionUpdated(entries);
 }
 
+/*!
+  \brief called by Python module to notify a list of study entries locally selected (for selection propagation)
+  \param list of study entries
+*/
 void SALOME_PYQT_ModuleLight::setLocalSelected(const QStringList & entries)
 {
   MESSAGE("setLocalSelected");
index 60ef71c81d12391e6429a2a0c5796efca462dceb..f674cbf1890f45234e027cd8dd92f75a95976c00 100644 (file)
@@ -2882,7 +2882,10 @@ bool SalomePyQt::activateView( const int id )
 }
 
 /*!
- *
+  \fn bool SalomePyQt::activateManagerAndView( const int id );
+  \brief Activate view manager and view: useful for a view embedded in a module main Window
+  \param id window identifier
+  \return \c true if operation is completed successfully and \c false otherwise
  */
 
 class TActivateViewManagerAndView: public SALOME_Event
@@ -2901,8 +2904,7 @@ public:
     if ( wnd )
       {
         LightApp_Application* app  = getApplication();
-        app->desktop()->windowActivated(wnd);
-        //app->setActiveViewManager(wnd->getViewManager());
+        app->desktop()->windowActivated(wnd); // equivalent to app->setActiveViewManager(wnd->getViewManager())
         wnd->setFocus();
         myResult = true;
       }