#include "MBDebug.h"
//---------------------------------------------------------
-
-/*!
- \class PV3DViewer_ViewWindow
- \brief PVGUI view window.
-*/
-
/*!
\brief Constructor.
\param theDesktop parent desktop window
myDesktop = theDesktop;
myModel = theModel;
setViewManager(myModel->getViewManager());
- /*myPVMgr = qobject_cast<pqTabbedMultiViewWidget*>(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET"));
- if (myPVMgr) {
- SUIT_Application* app = SUIT_Session::session()->activeApplication();
- if ( app )
- app->addPostRoutine(&PV3DViewer_ViewWindow::removePVMgr);
- myPVMgr->setParent( this );
- // This is mandatory, see setParent() method in Qt 4 documentation
- myPVMgr->show();
- setCentralWidget( myPVMgr );
- } else
- qDebug("No multiViewManager defined");*/
}
/*!
/*!
\brief Returns the ParaView multi-view manager previously set with setPVManager()
*/
-pqTabbedMultiViewWidget* PV3DViewer_ViewWindow::getMultiViewManager() const
+pqTabbedMultiViewWidget *PV3DViewer_ViewWindow::getMultiViewManager() const
{
DBG_FUN();
return myPVMgr;
#include "QtxMultiAction.h"
#include "QtxActionGroup.h"
+#include <pqCameraReaction.h>
+#include <pqParaViewBehaviors.h>
+
#include "SALOME_ListIO.hxx"
#include "SPV3D_Prs.h"
+#include <QToolBar>
+
//---------------------------------------------------------
#define USE_DEBUG
#define MBCLASSNAME "SPV3D_ViewWindow"
QWidget *wid = myModel->getView()->widget();
wid->setParent( this );
setCentralWidget( myModel->getView()->widget() );
+ //
+ myToolBar = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL"), // title (language-dependant)
+ QString( "PV3DViewerViewOperations" ), // name (language-independant)
+ false );
+ QAction* resetCenterAction =
+ toolMgr()->toolBar(myToolBar)->addAction(QIcon(":/pqWidgets/Icons/pqResetCamera.svg"), tr( "MNU_FITALL" ) );
+ new pqCameraReaction(resetCenterAction, pqCameraReaction::RESET_CAMERA);
}
SPV3D_Prs *SPV3D_ViewWindow::findOrCreatePrs( const char* entry )
void onMouseMoving(QMouseEvent* event);
protected:
+ int myToolBar = -1;
SPV3D_ViewModel* myModel;
std::list< std::pair<std::string, std::unique_ptr<SPV3D_EXPORTSPV3DData> > > myPrs;
};