From 3e8ec0e8630788d691b035b4ad6ad847e7a68d72 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Tue, 28 Feb 2017 15:57:53 +0100 Subject: [PATCH] add comments --- src/LightApp/LightApp_Application.cxx | 4 +--- .../SALOME_PYQT_BorrowedDataObjectLight.cxx | 4 +++- .../SALOME_PYQT_BorrowedDataObjectLight.h | 3 +++ .../SALOME_PYQT_ModuleLight.cxx | 21 +++++++++++++++---- src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx | 8 ++++--- 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 0b8cc6431..18532ce0e 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -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") } /*! diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.cxx index cdb758ba0..fd5147e3c 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.cxx @@ -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) */ //================================================================================= diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.h b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.h index 344818eb6..e0e8ebf92 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.h @@ -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 { diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx index 6b17d8d09..80f3e8ea0 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx @@ -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"); diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx index 60ef71c81..f674cbf18 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx @@ -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; } -- 2.39.2