1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: LightApp_Module.cxx
24 // Created: 6/20/2005 16:30:56 AM
27 #include "LightApp_Module.h"
29 #include "CAM_Application.h"
31 #include "LightApp_Application.h"
32 #include "LightApp_DataModel.h"
33 #include "LightApp_DataObject.h"
34 #include "LightApp_Study.h"
35 #include "LightApp_Preferences.h"
36 #include "LightApp_Selection.h"
37 #include "LightApp_Operation.h"
38 #include "LightApp_SwitchOp.h"
39 #include "LightApp_UpdateFlags.h"
40 #include "LightApp_ShowHideOp.h"
41 #include "LightApp_SelectionMgr.h"
43 #include <SUIT_Study.h>
44 #include <SUIT_DataObject.h>
45 #include <SUIT_DataBrowser.h>
46 #include <SUIT_Operation.h>
47 #include <SUIT_ViewManager.h>
48 #include <SUIT_ResourceMgr.h>
49 #include <SUIT_ShortcutMgr.h>
50 #include <SUIT_Desktop.h>
51 #include <SUIT_TreeModel.h>
52 #include <SUIT_Session.h>
54 #ifndef DISABLE_SALOMEOBJECT
55 #include <SALOME_ListIO.hxx>
56 #include <SALOME_ListIteratorOfListIO.hxx>
59 #ifndef DISABLE_VTKVIEWER
60 #ifndef DISABLE_SALOMEOBJECT
61 #include <SVTK_ViewWindow.h>
62 #include <SVTK_ViewModel.h>
64 #include <VTKViewer_ViewWindow.h>
66 #include <VTKViewer_ViewModel.h>
68 #ifndef DISABLE_OCCVIEWER
69 #include <OCCViewer_ViewWindow.h>
70 #include <OCCViewer_ViewPort3d.h>
71 #ifndef DISABLE_SALOMEOBJECT
72 #include <SOCC_ViewModel.h>
74 #include <OCCViewer_ViewModel.h>
77 #ifndef DISABLE_GLVIEWER
78 #include <GLViewer_ViewFrame.h>
79 #include <GLViewer_ViewPort.h>
81 #ifndef DISABLE_PLOT2DVIEWER
82 #include <Plot2d_ViewWindow.h>
83 #include <Plot2d_ViewFrame.h>
84 #ifndef DISABLE_SALOMEOBJECT
85 #include <SPlot2d_ViewModel.h>
87 #include <Plot2d_ViewModel.h>
91 #include <QtxPopupMgr.h>
95 #include <QStringList>
101 LightApp_Module::LightApp_Module( const QString& name )
102 : CAM_Module( name ),
109 myIsFirstActivate( true )
114 LightApp_Module::~LightApp_Module()
120 /*!Initialize module.*/
121 void LightApp_Module::initialize( CAM_Application* app )
123 CAM_Module::initialize( app );
125 SUIT_ResourceMgr* resMgr = app ? app->resourceMgr() : 0;
127 resMgr->raiseTranslators( name() );
131 void LightApp_Module::windows( QMap<int, int>& ) const
136 void LightApp_Module::viewManagers( QStringList& ) const
140 /*!Context menu popup.*/
141 void LightApp_Module::contextMenuPopup( const QString& client, QMenu* menu, QString& /*title*/ )
143 LightApp_Selection* sel = createSelection();
144 sel->init( client, getApp()->selectionMgr() );
146 popupMgr()->setSelection( sel );
147 popupMgr()->setMenu( menu );
148 popupMgr()->updateMenu();
151 /*!Update object browser.
152 * For updating model or whole object browser use update() method can be used.
154 void LightApp_Module::updateObjBrowser( bool theIsUpdateDataModel,
155 SUIT_DataObject* theDataObject )
157 bool upd = getApp()->objectBrowser()->autoUpdate();
158 getApp()->objectBrowser()->setAutoUpdate( false );
160 if( theIsUpdateDataModel ){
161 if( CAM_DataModel* aDataModel = dataModel() ){
162 if ( LightApp_DataModel* aModel = dynamic_cast<LightApp_DataModel*>( aDataModel ) ) {
163 //SUIT_DataObject* aParent = NULL;
164 //if(theDataObject && theDataObject != aDataModel->root())
165 // aParent = theDataObject->parent();
167 LightApp_DataObject* anObject = dynamic_cast<LightApp_DataObject*>(theDataObject);
168 LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>(getApp()->activeStudy());
169 aModel->update( anObject, aStudy );
174 getApp()->objectBrowser()->setAutoUpdate( upd );
175 getApp()->objectBrowser()->updateTree( 0, false );
179 void LightApp_Module::selectionChanged()
183 /*! \brief If return false, selection will be cleared at module activation
185 bool LightApp_Module::isSelectionCompatible()
187 // return true if selected objects belong to this module
188 bool isCompatible = true;
189 #ifndef DISABLE_SALOMEOBJECT
190 SALOME_ListIO selected;
191 if ( LightApp_SelectionMgr *Sel = getApp()->selectionMgr() )
192 Sel->selectedObjects( selected );
194 LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>( getApp()->activeStudy() );
195 LightApp_DataObject* aRoot = dynamic_cast<LightApp_DataObject*>( dataModel()->root() );
196 if ( aStudy && aRoot ) {
198 QString moduleDataType = aRoot->componentDataType();
199 // check data type of selection
200 SALOME_ListIteratorOfListIO It( selected );
201 for ( ; isCompatible && It.More(); It.Next()) {
202 Handle(SALOME_InteractiveObject)& io = It.Value();
203 isCompatible = ( aStudy->componentDataType( io->getEntry() ) == moduleDataType );
210 /*!Activate module.*/
211 bool LightApp_Module::activateModule( SUIT_Study* study )
213 bool res = CAM_Module::activateModule( study );
215 if ( !isSelectionCompatible() )// PAL19290, PAL18352
216 getApp()->selectionMgr()->clearSelected();
218 if ( res && application() && application()->resourceMgr() )
219 application()->resourceMgr()->raiseTranslators( name() );
221 connect( application(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
222 this, SLOT( onViewManagerAdded( SUIT_ViewManager* ) ) );
223 connect( application(), SIGNAL( viewManagerRemoved( SUIT_ViewManager* ) ),
224 this, SLOT( onViewManagerRemoved( SUIT_ViewManager* ) ) );
226 if ( mySwitchOp == 0 )
227 mySwitchOp = new LightApp_SwitchOp( this );
229 // Enable Display and Erase actions
230 if ( action(myDisplay) )
231 action(myDisplay)->setEnabled(true);
232 if ( action(myErase) )
233 action(myErase)->setEnabled(true);
235 application()->shortcutMgr()->setSectionEnabled( moduleName() );
237 /* BUG 0020498 : The Entry column is always shown at module activation
238 The registration of column is moved into LightApp_Application
240 QString EntryCol = QObject::tr( "ENTRY_COLUMN" );
241 LightApp_DataModel* m = dynamic_cast<LightApp_DataModel*>( dataModel() );
244 SUIT_AbstractModel* treeModel = dynamic_cast<SUIT_AbstractModel*>( getApp()->objectBrowser()->model() );
245 m->registerColumn( getApp()->objectBrowser(), EntryCol, LightApp_DataObject::EntryId );
246 treeModel->setAppropriate( EntryCol, Qtx::Toggled );
249 if ( myIsFirstActivate ) {
250 updateModuleVisibilityState();
251 myIsFirstActivate = false;
257 /*!Deactivate module.*/
258 bool LightApp_Module::deactivateModule( SUIT_Study* study )
263 disconnect( application(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
264 this, SLOT( onViewManagerAdded( SUIT_ViewManager* ) ) );
265 disconnect( application(), SIGNAL( viewManagerRemoved( SUIT_ViewManager* ) ),
266 this, SLOT( onViewManagerRemoved( SUIT_ViewManager* ) ) );
268 // abort all operations
269 MapOfOperation::const_iterator anIt;
270 for( anIt = myOperations.begin(); anIt != myOperations.end(); anIt++ ) {
271 anIt.value()->abort();
274 // Disable Display and Erase action
275 if ( action(myDisplay) )
276 action(myDisplay)->setEnabled(false);
277 if ( action(myErase) )
278 action(myErase)->setEnabled(false);
280 application()->shortcutMgr()->setSectionEnabled( moduleName(), false );
282 /* BUG 0020498 : The Entry column is always shown at module activation
283 QString EntryCol = QObject::tr( "ENTRY_COLUMN" );
284 LightApp_DataModel* m = dynamic_cast<LightApp_DataModel*>( dataModel() );
287 SUIT_AbstractModel* treeModel = dynamic_cast<SUIT_AbstractModel*>( getApp()->objectBrowser()->model() );
289 treeModel->setAppropriate( EntryCol, Qtx::Shown );
290 m->unregisterColumn( getApp()->objectBrowser(), EntryCol );
293 return CAM_Module::deactivateModule( study );
296 /*! Redefined to reset internal flags valid for study instance */
297 void LightApp_Module::studyClosed( SUIT_Study* theStudy )
299 CAM_Module::studyClosed( theStudy );
301 myIsFirstActivate = true;
303 LightApp_Application* app = dynamic_cast<LightApp_Application*>(application());
305 SUIT_DataBrowser* ob = app->objectBrowser();
306 if ( ob && ob->model() )
307 disconnect( ob->model(), SIGNAL( clicked( SUIT_DataObject*, int ) ),
308 this, SLOT( onObjectClicked( SUIT_DataObject*, int ) ) );
313 void LightApp_Module::MenuItem()
318 void LightApp_Module::createPreferences()
323 void LightApp_Module::preferencesChanged( const QString&, const QString& )
328 void LightApp_Module::message( const QString& )
332 /*!Gets application.*/
333 LightApp_Application* LightApp_Module::getApp() const
335 return (LightApp_Application*)application();
339 * \brief Update something in accordance with update flags
340 * \param theFlags - update flags
342 * Update viewer or/and object browser etc. in accordance with update flags ( see
343 * LightApp_UpdateFlags enumeration ). Derived modules can redefine this method for their
346 void LightApp_Module::update( const int theFlags )
348 if ( theFlags & UF_Model )
350 if( CAM_DataModel* aDataModel = dataModel() )
351 if( LightApp_DataModel* aModel = dynamic_cast<LightApp_DataModel*>( aDataModel ) )
352 aModel->update( 0, dynamic_cast<LightApp_Study*>( getApp()->activeStudy() ) );
355 if ( theFlags & UF_ObjBrowser )
356 getApp()->objectBrowser()->updateTree( 0 );
358 if ( theFlags & UF_Controls )
360 if ( theFlags & UF_Viewer )
362 if ( SUIT_ViewManager* viewMgr = getApp()->activeViewManager() )
363 if ( SUIT_ViewWindow* viewWnd = viewMgr->getActiveView() )
365 #ifndef DISABLE_VTKVIEWER
366 #ifndef DISABLE_SALOMEOBJECT
367 if ( viewWnd->inherits( "SVTK_ViewWindow" ) )
368 ( (SVTK_ViewWindow*)viewWnd )->Repaint();
370 if ( viewWnd->inherits( "VTKViewer_ViewWindow" ) )
371 ( (VTKViewer_ViewWindow*)viewWnd )->Repaint();
374 #ifndef DISABLE_OCCVIEWER
375 if ( viewWnd->inherits( "OCCViewer_ViewWindow" ) )
376 ( (OCCViewer_ViewWindow*)viewWnd )->getViewPort()->onUpdate();
378 #ifndef DISABLE_PLOT2DVIEWER
379 if ( viewWnd->inherits( "Plot2d_ViewWindow" ) )
380 ( (Plot2d_ViewWindow*)viewWnd )->getViewFrame()->Repaint();
382 #ifndef DISABLE_GLVIEWER
383 if ( viewWnd->inherits( "GLViewer_ViewFrame" ) )
384 ( (GLViewer_ViewFrame*)viewWnd )->getViewPort()->onUpdate();
390 * \brief Updates controls
392 * Updates (i.e. disable/enable) controls states (menus, tool bars etc.). This method is
393 * called from update( UF_Controls ). You may redefine it in concrete module.
395 void LightApp_Module::updateControls()
399 /*!Create new instance of data model and return it.*/
400 CAM_DataModel* LightApp_Module::createDataModel()
402 return new LightApp_DataModel( this );
405 /*!Create and return instance of LightApp_Selection.*/
406 LightApp_Selection* LightApp_Module::createSelection() const
408 return new LightApp_Selection();
412 void LightApp_Module::onModelOpened()
417 void LightApp_Module::onModelSaved()
422 void LightApp_Module::onModelClosed()
426 /*!Gets popup manager.(create if not exist)*/
427 QtxPopupMgr* LightApp_Module::popupMgr()
431 myPopupMgr = new QtxPopupMgr( 0, this );
434 SUIT_Desktop* d = application()->desktop();
437 *disp = createAction( -1, tr( "TOP_SHOW" ), p, tr( "MEN_SHOW" ), tr( "STB_SHOW" ),
438 0, d, false, this, SLOT( onShowHide() ), QString("General:Show object(s)") ),
439 *erase = createAction( -1, tr( "TOP_HIDE" ), p, tr( "MEN_HIDE" ), tr( "STB_HIDE" ),
440 0, d, false, this, SLOT( onShowHide() ) , QString("General:Hide object(s)") ),
441 *dispOnly = createAction( -1, tr( "TOP_DISPLAY_ONLY" ), p, tr( "MEN_DISPLAY_ONLY" ), tr( "STB_DISPLAY_ONLY" ),
442 0, d, false, this, SLOT( onShowHide() ) ),
443 *eraseAll = createAction( -1, tr( "TOP_ERASE_ALL" ), p, tr( "MEN_ERASE_ALL" ), tr( "STB_ERASE_ALL" ),
444 0, d, false, this, SLOT( onShowHide() ) );
445 myDisplay = actionId( disp );
446 myErase = actionId( erase );
447 myDisplayOnly = actionId( dispOnly );
448 myEraseAll = actionId( eraseAll );
450 myPopupMgr->insert( disp, -1, 0 );
451 myPopupMgr->insert( erase, -1, 0 );
452 myPopupMgr->insert( dispOnly, -1, 0 );
453 myPopupMgr->insert( eraseAll, -1, 0 );
454 myPopupMgr->insert( separator(), -1, 0 );
456 QString oneAndNotActive = "( count( $component ) = 1 ) and ( not( activeModule in $component ) )";
457 QString uniform = "true in $canBeDisplayed and %1 and ( activeModule = '%2' )";
458 uniform = uniform.arg( oneAndNotActive ).arg( name() );
459 myPopupMgr->setRule( disp, /*QString( "( not isVisible ) and " ) + */ uniform, QtxPopupMgr::VisibleRule );
460 myPopupMgr->setRule( erase, /*QString( "( isVisible ) and " ) + */ uniform, QtxPopupMgr::VisibleRule );
461 myPopupMgr->setRule( dispOnly, uniform, QtxPopupMgr::VisibleRule );
465 #ifndef DISABLE_OCCVIEWER
466 #ifndef DISABLE_SALOMEOBJECT
467 viewers.append( SOCC_Viewer::Type() );
469 viewers.append( OCCViewer_Viewer::Type() );
472 #ifndef DISABLE_VTKVIEWER
473 #ifndef DISABLE_SALOMEOBJECT
474 viewers.append( SVTK_Viewer::Type() );
476 viewers.append( VTKViewer_Viewer::Type() );
479 #ifndef DISABLE_PLOT2DVIEWER
480 #ifndef DISABLE_SALOMEOBJECT
481 viewers.append( SPlot2d_Viewer::Type() );
483 viewers.append( Plot2d_Viewer::Type() );
487 if( !viewers.isEmpty() )
489 QString strViewers = "{ ", temp = "'%1' ";
490 QStringList::const_iterator anIt = viewers.begin(), aLast = viewers.end();
491 for( ; anIt!=aLast; anIt++ )
492 strViewers+=temp.arg( *anIt );
494 myPopupMgr->setRule( eraseAll, QString( "client in %1" ).arg( strViewers ), QtxPopupMgr::VisibleRule );
500 /*!Gets preferences.*/
501 LightApp_Preferences* LightApp_Module::preferences() const
503 LightApp_Preferences* pref = 0;
505 pref = getApp()->preferences();
509 /*!Add preference to preferences.*/
510 int LightApp_Module::addPreference( const QString& label )
512 LightApp_Preferences* pref = preferences();
516 int catId = pref->addPreference( moduleName(), -1 );
520 return pref->addPreference( label, catId );
523 /*!Add preference to preferences.*/
524 int LightApp_Module::addPreference( const QString& label, const int pId, const int type,
525 const QString& section, const QString& param )
527 LightApp_Preferences* pref = preferences();
531 return pref->addPreference( moduleName(), label, pId, type, section, param );
534 /*!Gets property of preferences.*/
535 QVariant LightApp_Module::preferenceProperty( const int id, const QString& prop ) const
538 LightApp_Preferences* pref = preferences();
540 var = pref->itemProperty( prop, id );
544 /*!Set property of preferences.*/
545 void LightApp_Module::setPreferenceProperty( const int id, const QString& prop, const QVariant& var )
547 LightApp_Preferences* pref = preferences();
549 pref->setItemProperty( prop, var, id );
553 * \brief Starts operation with given identifier
554 * \param id - identifier of operation to be started
556 * Module stores operations in map. This method starts operation by id.
557 * If operation isn't in map, then it will be created by createOperation method
558 * and will be inserted to map
560 void LightApp_Module::startOperation( const int id )
562 LightApp_Operation* op = 0;
563 if( myOperations.contains( id ) && reusableOperation( id ) )
564 op = myOperations[ id ];
567 op = createOperation( id );
570 myOperations.insert( id, op );
571 op->setModule( this );
572 connect( op, SIGNAL( stopped( SUIT_Operation* ) ), this, SLOT( onOperationStopped( SUIT_Operation* ) ) );
573 connect( op, SIGNAL( destroyed() ), this, SLOT( onOperationDestroyed() ) );
579 // be sure that operation has correct study pointer
580 op->setStudy( application() ? application()->activeStudy() : 0 );
586 * \brief Creates operation with given identifier
587 * \param id - identifier of operation to be started
588 * \return Pointer on created operation or NULL if operation is not created
590 * Creates operation with given id. You should not call this method, it will be called
591 * automatically from startOperation. You may redefine this method in concrete module to
594 LightApp_Operation* LightApp_Module::createOperation( const int id ) const
600 return new LightApp_ShowHideOp( LightApp_ShowHideOp::DISPLAY );
601 else if( id==myErase )
602 return new LightApp_ShowHideOp( LightApp_ShowHideOp::ERASE );
603 else if( id==myDisplayOnly )
604 return new LightApp_ShowHideOp( LightApp_ShowHideOp::DISPLAY_ONLY );
605 else if( id==myEraseAll )
606 return new LightApp_ShowHideOp( LightApp_ShowHideOp::ERASE_ALL );
612 * \brief Virtual protected slot called when operation stopped
613 * \param theOp - stopped operation
615 * Virtual protected slot called when operation stopped. Redefine this slot if you want to
616 * perform actions after stopping operation
618 void LightApp_Module::onOperationStopped( SUIT_Operation* /*theOp*/ )
623 * \brief Virtual protected slot called when operation destroyed
624 * \param theOp - destroyed operation
626 * Virtual protected slot called when operation destroyed. Redefine this slot if you want to
627 * perform actions after destroying operation. Base implementation removes pointer on
628 * destroyed operation from the map of operations
630 void LightApp_Module::onOperationDestroyed()
632 const QObject* s = sender();
633 if( s && s->inherits( "LightApp_Operation" ) )
635 const LightApp_Operation* op = ( LightApp_Operation* )s;
636 MapOfOperation::const_iterator anIt = myOperations.begin(),
637 aLast = myOperations.end();
638 for( ; anIt!=aLast; anIt++ )
639 if( anIt.value()==op )
641 myOperations.remove( anIt.key() );
648 Must be redefined in order to use standard displayer mechanism
649 \return displayer of module
651 LightApp_Displayer* LightApp_Module::displayer()
657 SLOT: called on activating of standard operations show/hide
659 void LightApp_Module::onShowHide()
661 if( !sender()->inherits( "QAction" ) || !popupMgr() )
664 QAction* act = ( QAction* )sender();
665 int id = actionId( act );
667 startOperation( id );
671 virtual SLOT: called on view manager adding
673 void LightApp_Module::onViewManagerAdded( SUIT_ViewManager* )
678 virtual SLOT: called on view manager removing
680 void LightApp_Module::onViewManagerRemoved( SUIT_ViewManager* )
685 \brief Returns instance of operation by its id; if there is no operation
686 corresponding to this id, null pointer is returned
687 \param id - operation id
688 \return operation instance
690 LightApp_Operation* LightApp_Module::operation( const int id ) const
692 return myOperations.contains( id ) ? myOperations[id] : 0;
696 virtual method called to manage the same operations
698 bool LightApp_Module::reusableOperation( const int id )
705 \return true if module can copy the current selection
707 bool LightApp_Module::canCopy() const
714 \return true if module can paste previously copied data
716 bool LightApp_Module::canPaste() const
723 \brief Copies the current selection into clipboard
725 void LightApp_Module::copy()
731 \brief Pastes the current data in the clipboard
733 void LightApp_Module::paste()
739 \return true if module allows dragging the given object
741 bool LightApp_Module::isDraggable( const SUIT_DataObject* /*what*/ ) const
748 \return true if module allows dropping one or more objects (currently selected) on the object \c where
750 bool LightApp_Module::isDropAccepted( const SUIT_DataObject* /*where*/ ) const
757 Complete drag-n-drop operation by processing objects \a what being dragged, dropped to the line \a row
758 within the object \a where. The drop action being performed is specified by \a action.
760 void LightApp_Module::dropObjects( const DataObjectList& /*what*/, SUIT_DataObject* /*where*/,
761 const int /*row*/, Qt::DropAction /*action*/ )
766 \brief Return \c true if object can be renamed
768 bool LightApp_Module::renameAllowed( const QString& /*entry*/ ) const
774 Rename object by entry.
775 \param entry entry of the object
776 \param name new name of the object
777 \brief Return \c true if rename operation finished successfully, \c false otherwise.
779 bool LightApp_Module::renameObject( const QString& /*entry*/, const QString& /*name*/ )
785 Update visibility state for data objects
787 void LightApp_Module::updateModuleVisibilityState()
789 // update visibility state of objects
790 LightApp_Application* app = dynamic_cast<LightApp_Application*>(SUIT_Session::session()->activeApplication());
793 SUIT_DataBrowser* ob = app->objectBrowser();
794 if ( !ob || !ob->model() ) return;
796 // connect to click on item
797 connect( ob->model(), SIGNAL( clicked( SUIT_DataObject*, int ) ),
798 this, SLOT( onObjectClicked( SUIT_DataObject*, int ) ), Qt::UniqueConnection );
800 SUIT_DataObject* rootObj = ob->root();
801 if ( !rootObj ) return;
803 DataObjectList listObj = rootObj->children( true );
805 SUIT_ViewModel* vmod = 0;
806 if ( SUIT_ViewManager* vman = app->activeViewManager() )
807 vmod = vman->getViewModel();
808 app->updateVisibilityState( listObj, vmod );
812 * \brief Virtual public slot
814 * This method is called after the object inserted into data view to update their visibility state
815 * This is default implementation
817 void LightApp_Module::onObjectClicked( SUIT_DataObject* theObject, int theColumn )
819 if ( !isActiveModule() ) return;
821 // change visibility of object
822 if ( !theObject || theColumn != SUIT_DataObject::VisibilityId ) return;
824 LightApp_Study* study = dynamic_cast<LightApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
825 if ( !study ) return;
827 LightApp_DataObject* lo = dynamic_cast<LightApp_DataObject*>( theObject );
830 // detect action index (from LightApp level)
833 if ( study->visibilityState( lo->entry() ) == Qtx::ShownState )
835 else if ( study->visibilityState( lo->entry() ) == Qtx::HiddenState )
839 startOperation( id );