27 #ifndef GLVIEWER_VIEWPORT_H 
   28 #define GLVIEWER_VIEWPORT_H 
   46 #pragma warning( disable:4251 ) 
   73     void                             setSketchingEnabled( 
bool );
 
   75     bool                             isSketchingEnabled() 
const;
 
   77     void                             setTransformEnabled( 
bool );
 
   79     bool                             isTransformEnabled() 
const;
 
   82     virtual QColor                   backgroundColor() 
const;
 
   84     virtual void                     setBackgroundColor( 
const QColor& );
 
   87     void                             redrawPainters();
 
   90     virtual void                     onUpdate();
 
   97     void                             selectVisualId( ViewType );
 
  100     virtual void                     contextMenuEvent( QContextMenuEvent * e );
 
  103     static void                      createCursors();
 
  104     static void                      destroyCursors();
 
  106     static void                      setHandCursor( 
const QCursor& newCursor );
 
  108     static void                      setPanCursor( 
const QCursor& newCursor );
 
  110     static void                      setPanglCursor( 
const QCursor& newCursor );
 
  112     static void                      setZoomCursor( 
const QCursor& newCursor );
 
  116     static void                      setDefaultCursor( 
const QCursor& newCursor );
 
  118     static void                      setRotCursor( 
const QCursor& newCursor );
 
  120     static void                      setSketchCursor( 
const QCursor& newCursor );
 
  124     virtual void                     paintEvent( QPaintEvent *);
 
  125     virtual void                     mouseMoveEvent( QMouseEvent *);
 
  126     virtual void                     mouseReleaseEvent( QMouseEvent *);
 
  127     virtual void                     mousePressEvent( QMouseEvent *);
 
  128     virtual void                     mouseDoubleClickEvent( QMouseEvent *);
 
  129     virtual void                     keyPressEvent( QKeyEvent *);
 
  130     virtual void                     keyReleaseEvent( QKeyEvent *);
 
  131     virtual void                     wheelEvent( QWheelEvent *);
 
  134     virtual void                     reset() = 0;
 
  135     virtual void                     pan( 
int, 
int ) = 0;
 
  136     virtual void                     setCenter( 
int, 
int ) = 0;    
 
  137     virtual void                     zoom( 
int, 
int, 
int, 
int ) = 0;
 
  138     virtual void                     fitRect( 
const QRect& ) = 0;
 
  139     virtual void                     fitSelect() = 0;
 
  140     virtual void                     fitAll( 
bool keepScale = 
false, 
bool withZ = 
true ) = 0;
 
  143     virtual void                     onChangeBgColor();
 
  146     void                             vpKeyEvent( QKeyEvent* );
 
  147     void                             vpMouseEvent( QMouseEvent* );
 
  148     void                             vpWheelEvent( QWheelEvent* );
 
  149     void                             vpDrawExternal( QPainter* );
 
  151     void                             contextMenuRequested( QContextMenuEvent* );
 
  176 #pragma warning ( default:4251 )