#include <LightApp_SelectionMgr.h>
#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewFrame.h>
#include <QtxWorkstack.h>
+#include <QtxActionToolMgr.h>
#include <STD_TabDesktop.h>
Handle(HYDROData_Entity) anObject = anIterator.Current();
if( !anObject.IsNull() && (
( anObject->GetKind() == KIND_IMAGE ) ||
- ( anObject->GetKind() == KIND_POLYLINE ) ||
+ ( anObject->GetKind() == KIND_POLYLINEXY ) ||
( anObject->GetKind() == KIND_IMMERSIBLE_ZONE ) ||
( anObject->GetKind() == KIND_REGION ) ||
+ ( anObject->GetKind() == KIND_BATHYMETRY ) ||
( anObject->GetKind() == KIND_ZONE ) ||
( anObject->GetKind() == KIND_OBSTACLE ) ) )
{
return getViewIdList( theModule, OCCViewer_Viewer::Type() );
}
+void HYDROGUI_Tool::setOCCActionShown( OCCViewer_ViewFrame* theViewFrame,
+ const int theActionId,
+ const bool isShown )
+{
+ if ( !theViewFrame )
+ return;
+
+ OCCViewer_ViewWindow* aView = theViewFrame->getView( OCCViewer_ViewFrame::MAIN_VIEW );
+ if ( aView ) {
+ aView->toolMgr()->setShown( theActionId, isShown );
+ if ( theActionId == OCCViewer_ViewWindow::MaximizedId )
+ theViewFrame->onMaximizedView( aView, true );
+ }
+}
+
+void HYDROGUI_Tool::setOCCActionShown( HYDROGUI_Module* theModule,
+ const int theActionId,
+ const bool isShown )
+{
+ QList<size_t> aList;
+ ViewManagerList aViewMgrs;
+ theModule->getApp()->viewManagers( OCCViewer_Viewer::Type(), aViewMgrs );
+ QListIterator<SUIT_ViewManager*> anIter( aViewMgrs );
+ while( anIter.hasNext() )
+ {
+ if( SUIT_ViewManager* aViewMgr = anIter.next() )
+ {
+ OCCViewer_ViewFrame* aViewFrame = dynamic_cast<OCCViewer_ViewFrame*>
+ ( aViewMgr->getActiveView() );
+ if ( aViewFrame )
+ setOCCActionShown( aViewFrame, theActionId, isShown );
+ }
+ }
+}
+
void HYDROGUI_Tool::GetObjectReferences( const Handle(HYDROData_Image)& theImage,
HYDROData_SequenceOfObjects& theRefObjects,
QStringList& theRefNames )