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;
26 #pragma warning( disable:4251 )
29 class GLVIEWER_EXPORT GLViewer_ViewFrame: public SUIT_ViewWindow
34 GLViewer_ViewFrame( SUIT_Desktop* , GLViewer_Viewer* );
35 ~GLViewer_ViewFrame();
38 void setViewer( GLViewer_Viewer* );
39 GLViewer_Viewer* getViewer() const;
41 void setViewPort( GLViewer_ViewPort* );
42 GLViewer_ViewPort* getViewPort() const;
44 void setBackgroundColor( const QColor& );
45 QColor backgroundColor() const;
47 QSize sizeHint() const;
49 virtual void onUpdate( int );
52 void vfDrawExternal( QPainter* );
53 void vfViewClosing( QCloseEvent* );
56 GLViewer_Viewer* myViewer;
57 GLViewer_ViewPort* myVP;
63 //ViewType getTypeView() const { return VIEW_GL; };
64 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, QtxAction*> ActionsMap;
97 ActionsMap myActionsMap;
103 #pragma warning ( default:4251 )