for ( int i = 0, aNb = aNo2dActions.size(); i < aNb; i++ ) {
anAction = aToolMgr->action( aNo2dActions[i] );
if ( anAction )
+ {
anAction->setEnabled( !is2dMode );
+ anAction->setVisible( !is2dMode );
+ }
}
QAction* aTop = aToolMgr->action( OCCViewer_ViewWindow::TopId );
QtxMultiAction* aMulti = dynamic_cast<QtxMultiAction*>( aTop->parent() );
aDlg->show();
}
}
+
+bool OCCViewer_ViewWindow::isActionVisible( ActionId theId ) const
+{
+ QAction* a = toolMgr()->action( theId );
+ return a && a->isVisible();
+}
+
+void OCCViewer_ViewWindow::setActionVisible( ActionId theId, bool isVisible )
+{
+ QAction* a = toolMgr()->action( theId );
+ if( a )
+ a->setVisible( isVisible );
+}
Q_OBJECT
public:
- enum { DumpId, FitAllId, FitRectId, FitSelectionId, ZoomId, PanId, GlobalPanId,
+ enum ActionId { DumpId, FitAllId, FitRectId, FitSelectionId, ZoomId, PanId, GlobalPanId,
ChangeRotationPointId, RotationId,
FrontId, BackId, TopId, BottomId, LeftId, RightId, ClockWiseId, AntiClockWiseId,
ResetId, CloneId, ClippingId, MemId, RestoreId,
virtual SUIT_CameraProperties cameraProperties();
+ bool isActionVisible( ActionId theId ) const;
+ void setActionVisible( ActionId theId, bool isVisible );
+
public slots:
virtual void onFrontView();
virtual void onViewFitAll();