Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef GLVIEWER_VIEWFRAME_H
00028 #define GLVIEWER_VIEWFRAME_H
00029
00030 #include "SUIT_ViewWindow.h"
00031 #include "GLViewer.h"
00032
00033 class QColor;
00034
00035 class SUIT_Desktop;
00036
00037 class GLViewer_Viewer;
00038 class GLViewer_ViewPort;
00039
00040 #include <QtxAction.h>
00041
00042 #ifdef WIN32
00043 #pragma warning( disable:4251 )
00044 #endif
00045
00051 class GLVIEWER_API GLViewer_ViewFrame: public SUIT_ViewWindow
00052 {
00053 Q_OBJECT
00054
00055 public:
00057 enum { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId };
00058
00059 public:
00060 GLViewer_ViewFrame( SUIT_Desktop* , GLViewer_Viewer* );
00061 ~GLViewer_ViewFrame();
00062
00063 public:
00064 void setViewer( GLViewer_Viewer* );
00065 GLViewer_Viewer* getViewer() const;
00066
00067 void setViewPort( GLViewer_ViewPort* );
00068 GLViewer_ViewPort* getViewPort() const;
00069
00070 void setBackgroundColor( const QColor& );
00071 QColor backgroundColor() const;
00072
00073 QSize sizeHint() const;
00074
00075 virtual void onUpdate( int );
00076
00077 virtual QString getVisualParameters();
00078 virtual void setVisualParameters( const QString& parameters );
00079
00080 virtual QImage dumpView();
00081
00082 signals:
00083 void vfDrawExternal( QPainter* );
00084 void vfViewClosing( QCloseEvent* );
00085
00086 protected:
00087 GLViewer_Viewer* myViewer;
00088 GLViewer_ViewPort* myVP;
00089
00090 public:
00091
00092 QWidget* getViewWidget() { return ( QWidget* )getViewPort(); };
00093
00094 protected slots:
00095 void onViewPan();
00096 void onViewZoom();
00097 void onViewFitAll();
00098 void onViewFitArea();
00099 void onViewFitSelect();
00100 void onViewGlobalPan();
00101 void onViewRotate();
00102 void onViewReset();
00103 void onViewFront() {};
00104 void onViewBack() {};
00105 void onViewRight() {};
00106 void onViewLeft() {};
00107 void onViewBottom() {};
00108 void onViewTop() {};
00109 void onViewTrihedron() {};
00110
00111 private slots:
00112 void keyEvent( QKeyEvent* );
00113 void mouseEvent( QMouseEvent* );
00114 void wheelEvent( QWheelEvent* );
00115
00116 private:
00117 void createActions();
00118 void createToolBar();
00119 };
00120
00121
00122 #ifdef WIN32
00123 #pragma warning ( default:4251 )
00124 #endif
00125
00126 #endif