#include <pqCameraReaction.h>
#include <pqParaViewBehaviors.h>
+#include <pqRenderView.h>
#include "SALOME_ListIO.hxx"
#include "SPV3D_Prs.h"
false );
QAction* resetCenterAction =
toolMgr()->toolBar(myToolBar)->addAction(QIcon(":/pqWidgets/Icons/pqResetCamera.svg"), tr( "MNU_FITALL" ) );
- new pqCameraReaction(resetCenterAction, pqCameraReaction::RESET_CAMERA);
+ new pqCameraReaction(resetCenterAction, pqCameraReaction::RESET_CAMERA);
+ QAction *showCenterAction =
+ toolMgr()->toolBar(myToolBar)->addAction(QIcon(":/pqWidgets/Icons/pqShowCenterAxes.svg"), tr( "DSC_SHOW_TRIHEDRON" ) );
+ showCenterAction->setCheckable(true);
+ QObject::connect(showCenterAction, &QAction::toggled, this, &SPV3D_ViewWindow::showCenterAxes);
+}
+
+void SPV3D_ViewWindow::showCenterAxes(bool show_axes)
+{
+ if(!myModel)
+ return;
+ pqRenderView* renderView = qobject_cast<pqRenderView*>(myModel->getView());
+ if (!renderView)
+ return;
+ renderView->setCenterAxesVisibility(show_axes);
+ renderView->render();
}
SPV3D_Prs *SPV3D_ViewWindow::findOrCreatePrs( const char* entry )
public slots:
virtual void showEvent( QShowEvent * );
virtual void hideEvent( QHideEvent * );
+ void showCenterAxes(bool);
protected slots:
void onKeyPressed(QKeyEvent* event);