Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

GLViewer_ViewTransformer Class Reference

#include <GLViewer_Viewer.h>

Inheritance diagram for GLViewer_ViewTransformer:
Inheritance graph

Public Member Functions

 GLViewer_ViewTransformer (GLViewer_Viewer *, int type)
 ~GLViewer_ViewTransformer ()
int type () const
virtual void exec ()
virtual bool eventFilter (QObject *, QEvent *)

Static Public Member Functions

static int accelKey ()
static void setAccelKey (int k)
static int zoomButton ()
static void setZoomButton (int b)
static int panButton ()
static void setPanButton (int b)
static int panGlobalButton ()
static void setPanGlobalButton (int b)
static int fitRectButton ()
static void setFitRectButton (int b)

Protected Types

enum  TransformState { Debut, EnTrain, Fin }

Protected Member Functions

virtual void onTransform (TransformState)
void initTransform (bool)
void drawRect (const QRect &theRect)
void endDrawRect ()
 Delete rubber band on the end on the dragging operation.

Protected Attributes

GLViewer_ViewermyViewer
int myType
QCursor mySavedCursor
bool mySavedMouseTrack
QPoint myStart
QPoint myCurr
int myButtonState
int myMajorBtn
QRubberBand * myRectBand
 selection rectangle rubber band

Static Protected Attributes

static int panBtn = Qt::MidButton
static int zoomBtn = Qt::LeftButton
static int fitRectBtn = Qt::LeftButton
static int panGlobalBtn = Qt::LeftButton
static int acccelKey = Qt::ControlModifier

Member Enumeration Documentation

Enumerator:
Debut 
EnTrain 
Fin 

Constructor & Destructor Documentation

GLViewer_ViewTransformer::GLViewer_ViewTransformer ( GLViewer_Viewer v,
int  type 
)
GLViewer_ViewTransformer::~GLViewer_ViewTransformer ( )

Member Function Documentation

int GLViewer_ViewTransformer::type ( ) const

Returns transformer type

Returns the type of the transformer. [ public ]

References myType.

static int GLViewer_ViewTransformer.accelKey ( ) [static]

Sets/returns acceleration key ( CTRL by default )

static void GLViewer_ViewTransformer.setAccelKey ( int  k) [static]

References test_big_table.k.

static int GLViewer_ViewTransformer.zoomButton ( ) [static]

Sets/returns mouse button used for zooming ( MB1 by default )

static void GLViewer_ViewTransformer.setZoomButton ( int  b) [static]
static int GLViewer_ViewTransformer.panButton ( ) [static]

Sets/returns mouse button used for panning ( MB2 by default )

static void GLViewer_ViewTransformer.setPanButton ( int  b) [static]
static int GLViewer_ViewTransformer.panGlobalButton ( ) [static]

Sets/returns mouse button used for global pan ( MB1 by default )

static void GLViewer_ViewTransformer.setPanGlobalButton ( int  b) [static]
static int GLViewer_ViewTransformer.fitRectButton ( ) [static]

Sets/returns mouse button used for fit area ( MB1 by default )

static void GLViewer_ViewTransformer.setFitRectButton ( int  b) [static]
void GLViewer_ViewTransformer::exec ( ) [virtual]
bool GLViewer_ViewTransformer::eventFilter ( QObject o,
QEvent e 
) [virtual]

Catches mouse events for the viewport. [ virtual protected ]

References Debut, EnTrain, Fin, myButtonState, myCurr, myMajorBtn, myStart, and onTransform().

void GLViewer_ViewTransformer::onTransform ( TransformState  state) [protected, virtual]
void GLViewer_ViewTransformer::initTransform ( bool  init) [protected]

Inits long transformations ( Zoom, Pan etc ) [ protected ]

Saves viewport state( cursor etc ) and installs event filter to process mouse events if 'init' is true. Restores viewport state if 'init' is false.

References GLViewer_Viewer.getActiveView(), GLViewer_ViewFrame.getViewPort(), mySavedCursor, mySavedMouseTrack, and myViewer.

void GLViewer_ViewTransformer::drawRect ( const QRect &  theRect) [protected]

Draws rectangle by starting and current points

References GLViewer_Viewer.getActiveView(), GLViewer_ViewFrame.getViewPort(), myRectBand, myViewer, and Plot2d.Rectangle.

void GLViewer_ViewTransformer::endDrawRect ( ) [protected]

References myRectBand.


Field Documentation

int GLViewer_ViewTransformer::panBtn = Qt::MidButton [static, protected]
int GLViewer_ViewTransformer::zoomBtn = Qt::LeftButton [static, protected]
int GLViewer_ViewTransformer::fitRectBtn = Qt::LeftButton [static, protected]
int GLViewer_ViewTransformer::panGlobalBtn = Qt::LeftButton [static, protected]
int GLViewer_ViewTransformer::acccelKey = Qt::ControlModifier [static, protected]
QPoint GLViewer_ViewTransformer.myCurr [protected]
QRubberBand* GLViewer_ViewTransformer.myRectBand [protected]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS