1 // File: GLViewer_ViewFrame.h
2 // Created: November, 2004
4 // Copyright (C) CEA 2004
6 /***************************************************************************
7 ** Class: GLViewer_ViewFrame
8 ** Descr: Frame window for viewport in QAD-based application
10 ** Created: UI team, 05.09.00
11 ****************************************************************************/
12 #ifndef GLVIEWER_VIEWFRAME_H
13 #define GLVIEWER_VIEWFRAME_H
15 #include "SUIT_ViewWindow.h"
22 class GLViewer_Viewer;
23 class GLViewer_ViewPort;
28 #pragma warning( disable:4251 )
31 class GLVIEWER_API GLViewer_ViewFrame: public SUIT_ViewWindow
36 GLViewer_ViewFrame( SUIT_Desktop* , GLViewer_Viewer* );
37 ~GLViewer_ViewFrame();
40 void setViewer( GLViewer_Viewer* );
41 GLViewer_Viewer* getViewer() const;
43 void setViewPort( GLViewer_ViewPort* );
44 GLViewer_ViewPort* getViewPort() const;
46 void setBackgroundColor( const QColor& );
47 QColor backgroundColor() const;
49 QSize sizeHint() const;
51 virtual void onUpdate( int );
54 void vfDrawExternal( QPainter* );
55 void vfViewClosing( QCloseEvent* );
58 GLViewer_Viewer* myViewer;
59 GLViewer_ViewPort* myVP;
62 //ViewType getTypeView() const { return VIEW_GL; };
63 QWidget* getViewWidget() { return ( QWidget* )getViewPort(); };
71 void onViewFitSelect();
72 void onViewGlobalPan();
75 void onViewFront() {};
77 void onViewRight() {};
79 void onViewBottom() {};
81 void onViewTrihedron() {};
84 void keyEvent( QKeyEvent* );
85 void mouseEvent( QMouseEvent* );
86 void wheelEvent( QWheelEvent* );
93 enum { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId };
94 typedef QMap<int, QAction*> ActionsMap;
97 ActionsMap myActionsMap;
103 #pragma warning ( default:4251 )