float aPercents = float(i)/aSteps;
aPrsObject->SetMapScale(aPercents);
aPrsObject->UpdateActor(aActor);
- vw->getRenderWindow()->getRenderWindow()->Render();
+ vw->getRenderWindow()->Render();
usleep(aTemp);
}
}
#include "SVTK_ViewModel.h"
#include "SVTK_ViewManager.h"
#include "SVTK_Event.h"
+#include "SVTK_View.h"
#include "VisuGUI_Prs3dTools.h"
return;
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
- SVTK_View* view = viewWindow->getView();
+ SVTK_MainWindow* aMainWindow = viewWindow->getMainWindow();
int val;
if ( pref == "speed_increment" ) {
val = resMgr->integerValue( "VISU", pref, 10 );
- view->InvokeEvent( SVTK::SetSpeedIncrementEvent, &val );
+ aMainWindow->InvokeEvent( SVTK::SetSpeedIncrementEvent, &val );
}
else if ( pref == "spacemouse_func1_btn" ) {
val = resMgr->integerValue( "VISU", pref, 1 );
- view->InvokeEvent( SVTK::SetSpaceMouseF1Event, &val );
+ aMainWindow->InvokeEvent( SVTK::SetSpaceMouseF1Event, &val );
}
else if ( pref == "spacemouse_func2_btn" ) {
val = resMgr->integerValue( "VISU", pref, 2 );
- view->InvokeEvent( SVTK::SetSpaceMouseF2Event, &val );
+ aMainWindow->InvokeEvent( SVTK::SetSpaceMouseF2Event, &val );
}
else if ( pref == "spacemouse_func3_btn" ) {
val = resMgr->integerValue( "VISU", pref, 10 );
- view->InvokeEvent( SVTK::SetSpaceMouseF3Event, &val );
+ aMainWindow->InvokeEvent( SVTK::SetSpaceMouseF3Event, &val );
}
else if ( pref == "spacemouse_func4_btn" ) {
val = resMgr->integerValue( "VISU", pref, 11 );
- view->InvokeEvent( SVTK::SetSpaceMouseF4Event, &val );
+ aMainWindow->InvokeEvent( SVTK::SetSpaceMouseF4Event, &val );
}
else if ( pref == "spacemouse_func5_btn" ) {
val = resMgr->integerValue( "VISU", pref, 9 );
- view->InvokeEvent( SVTK::SetSpaceMouseF5Event, &val );
+ aMainWindow->InvokeEvent( SVTK::SetSpaceMouseF5Event, &val );
}
}
{
SVTK_ViewWindow* vf = GetViewWindow(theViewWindow);
vf->getRenderer()->ResetCameraClippingRange();
- vf->getRenderWindow()->getRenderWindow()->Render();
+ vf->getRenderWindow()->Render();
}
VISU_Actor* UpdateViewer (SUIT_ViewWindow* theStudyFrame, int theDisplaing, Prs3d_i* thePrs)
thePopup->insertSeparator();
if(TViewWindow* aView = dynamic_cast<TViewWindow*>(myViewManager->getActiveView())){
- if ( !aView->getView()->getToolBar()->isVisible() ){
+ if ( !aView->getMainWindow()->getToolBar()->isVisible() ){
thePopup->insertItem( VTKViewer_Viewer::tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );
}
}
QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
if(TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at(i))){
- aView->getView()->update();
+ aView->getMainWindow()->Repaint();
}
}
}
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){
if(TViewWindow* aView = dynamic_cast<TViewWindow*>(aViewWindow)){
- aView->setBackgroundColor(theColor);
+ aView->getMainWindow()->setBackgroundColor(theColor);
}
}
}
QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
for ( int i = 0; i < aViews.count(); i++ ){
if(TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i ))){
- aView->SetTrihedronSize( theSize );
+ aView->getMainWindow()->SetTrihedronSize( theSize );
}
}
}
QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
if(TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at(i))){
- aView->getView()->getToolBar()->show();
+ aView->getMainWindow()->getToolBar()->show();
}
}
}
QSplitter* aSplitter = new QSplitter(Qt::Vertical,aWidget);
// Create SVTK_View (successor of RenderWindowInteractor).
- myView = new SVTK_View(aSplitter,"SVTK_View",aResourceMgr);
+ myMainWindow = new SVTK_MainWindow(aSplitter,"SVTK_MainWindow",aResourceMgr);
+ myView = new SVTK_View(myMainWindow);
// important! : the default interactor style which is pushed is VVTK
// see onSwitchIS() for details
- myView->PushInteractorStyle(VVTK_InteractorStyle::New());
+ myMainWindow->PushInteractorStyle(VVTK_InteractorStyle::New());
// create another toolbar
- myToolBar = new QToolBar(myView);
+ myToolBar = new QToolBar(myMainWindow);
myToolBar->setCloseMode(QDockWindow::Undocked);
myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
// if SVTK is a current one - pop it (remove from stack), below it there MUST BE
// (logically) a VVTK interactor style.
if ( theIsVVTKStyle )
- getView()->PopInteractorStyle();
+ getMainWindow()->PopInteractorStyle();
else
- getView()->PushInteractorStyle( SVTK_InteractorStyle::New() );
+ getMainWindow()->PushInteractorStyle( SVTK_InteractorStyle::New() );
}
void
::OnSelectionModeSwitch(bool theIsSelectionOn)
{
Selection_Mode aMode = theIsSelectionOn? NodeSelection: ActorSelection;
- getView()->SetSelectionMode(aMode);
+ getMainWindow()->SetSelectionMode(aMode);
}