myBgColor = c;
}
-SUIT_ViewWindow* OCCViewer_Viewer::createView( SUIT_Desktop* theDesktop )
+void OCCViewer_Viewer::initView( OCCViewer_ViewWindow* view )
{
- OCCViewer_ViewWindow* res = new OCCViewer_ViewWindow(theDesktop, this);
- res->initLayout();
+ if ( view ) {
+ view->initLayout();
+
+ OCCViewer_ViewPort3d* vp3d = view->getViewPort();
+ if ( vp3d )
+ vp3d->setBackgroundColor( myBgColor );
+ }
+}
- OCCViewer_ViewPort3d* vp3d = res->getViewPort();
- if ( vp3d )
- vp3d->setBackgroundColor( myBgColor );
- return res;
+SUIT_ViewWindow* OCCViewer_Viewer::createView( SUIT_Desktop* theDesktop )
+{
+ OCCViewer_ViewWindow* view = new OCCViewer_ViewWindow(theDesktop, this);
+ initView( view );
+ return view;
}
//*********************************************************************
class SUIT_ViewWindow;
class SUIT_Desktop;
+class OCCViewer_ViewWindow;
struct viewAspect
{
signals:
void selectionChanged();
+protected:
+ void initView( OCCViewer_ViewWindow* view );
+
protected slots:
void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);