#include "GLViewer_Viewer2d.h"
#include "SUIT_Desktop.h"
-int GLViewer_ViewManager::myMaxId = 0;
-
/*!Constructor.*/
GLViewer_ViewManager::GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop )
-: SUIT_ViewManager( theStudy, theDesktop )
+: SUIT_ViewManager( theStudy, theDesktop, new GLViewer_Viewer2d( "GLViewer" ) )
{
- myId = ++myMaxId;
- setViewModel( new GLViewer_Viewer2d( "GLViewer" ) );
+ setTitle( tr( "GL_VIEW_TITLE" ) );
}
/*!Destructor.*/
{
}
-/*!Sets view name for view window \a theView.*/
-void GLViewer_ViewManager::setViewName(SUIT_ViewWindow* theView)
-{
- int aPos = myViews.find(theView);
- theView->setCaption( QString( "GL scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1));
-}
-
/*!Context menu popup for \a popup.*/
void GLViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
{
Q_OBJECT
public:
GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop );
- ~GLViewer_ViewManager();
+ virtual ~GLViewer_ViewManager();
GLViewer_Viewer* getGLViewer() { return (GLViewer_Viewer*) myViewModel; }
virtual void contextMenuPopup( QPopupMenu* );
-
-protected:
- void setViewName(SUIT_ViewWindow* theView);
-
-protected:
- static int myMaxId;
- int myId;
};
#endif // GLVIEWER_VIEWMANAGER_H