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->getMainWindow()->SetBackgroundColor(theColor);
+ aView->setBackgroundColor(theColor);
}
}
}
}
//==========================================================
-SUIT_ViewWindow*
+SUIT_ViewWindow*
SVTK_Viewer::
createView( SUIT_Desktop* theDesktop )
{
- SVTK_ViewWindow* aViewWindow = new SVTK_ViewWindow(theDesktop);
+ TViewWindow* aViewWindow = new TViewWindow(theDesktop);
aViewWindow->Initialize(this);
-
+
aViewWindow->setBackgroundColor( backgroundColor() );
aViewWindow->SetTrihedronSize( trihedronSize(), trihedronRelative() );
return myTrihedronRelative;
}
-void SVTK_Viewer::setTrihedronSize( const int sz, const bool relative )
+void SVTK_Viewer::setTrihedronSize( const int theSize, const bool theRelative )
{
- myTrihedronSize = sz;
- myTrihedronRelative = relative;
-
- SUIT_ViewManager* vm = getViewManager();
- if ( !vm )
- return;
-
- QPtrVector<SUIT_ViewWindow> vec = vm->getViews();
- for ( int i = 0; i < vec.count(); i++ )
- {
- SUIT_ViewWindow* win = vec.at( i );
- if ( !win || !win->inherits( "SVTK_ViewWindow" ) )
- continue;
-
- SVTK_ViewWindow* vw = (SVTK_ViewWindow*)win;
- vw->SetTrihedronSize( sz, relative );
+ myTrihedronSize = theSize;
+ myTrihedronRelative = theRelative;
+
+ if (SUIT_ViewManager* aViewManager = getViewManager()) {
+ 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, theRelative);
+ }
+ }
}
}
thePopup->insertSeparator();
if(TViewWindow* aView = dynamic_cast<TViewWindow*>(myViewManager->getActiveView())){
- if ( !aView->getView()->GetMainWindow()->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()->GetMainWindow()->getToolBar()->show();
+ aView->getMainWindow()->getToolBar()->show();
}
}
}
{
QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
- if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i)))
- if(SVTK_View* aView = aViewWindow->getView())
- if(!aView->isVisible( io ))
- return false;
+ if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
+ if(TViewWindow* aViewWnd = dynamic_cast<TViewWindow*>(aViewWindow))
+ if(SVTK_View* aView = aViewWnd->getView())
+ if(!aView->isVisible( io ))
+ return false;
return true;
}
// if (theUpdateTrihedron) onAdjustTrihedron();
QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
- if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i)))
+ if(TViewWindow* aViewWindow = dynamic_cast<TViewWindow*>(aViews.at(i)))
if(SVTK_View* aView = aViewWindow->getView())
aView->Repaint();
}