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_ViewFrame
32 * Frame window for viewport in GLViewer
35 class GLVIEWER_API GLViewer_ViewFrame: public SUIT_ViewWindow
40 GLViewer_ViewFrame( SUIT_Desktop* , GLViewer_Viewer* );
41 ~GLViewer_ViewFrame();
44 void setViewer( GLViewer_Viewer* );
45 GLViewer_Viewer* getViewer() const;
47 void setViewPort( GLViewer_ViewPort* );
48 GLViewer_ViewPort* getViewPort() const;
50 void setBackgroundColor( const QColor& );
51 QColor backgroundColor() const;
53 QSize sizeHint() const;
55 virtual void onUpdate( int );
58 void vfDrawExternal( QPainter* );
59 void vfViewClosing( QCloseEvent* );
62 GLViewer_Viewer* myViewer;
63 GLViewer_ViewPort* myVP;
66 //ViewType getTypeView() const { return VIEW_GL; };
67 QWidget* getViewWidget() { return ( QWidget* )getViewPort(); };
75 void onViewFitSelect();
76 void onViewGlobalPan();
79 void onViewFront() {};
81 void onViewRight() {};
83 void onViewBottom() {};
85 void onViewTrihedron() {};
88 void keyEvent( QKeyEvent* );
89 void mouseEvent( QMouseEvent* );
90 void wheelEvent( QWheelEvent* );
98 enum { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId };
99 typedef QMap<int, QAction*> ActionsMap;
102 ActionsMap myActionsMap;
108 #pragma warning ( default:4251 )