Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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. More...
 

Protected Attributes

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

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

static int GLViewer_ViewTransformer::accelKey ( )
inlinestatic

Sets/returns acceleration key ( CTRL by default )

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.

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().

static int GLViewer_ViewTransformer::fitRectButton ( )
inlinestatic

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

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.

static int GLViewer_ViewTransformer::panButton ( )
inlinestatic

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

static int GLViewer_ViewTransformer::panGlobalButton ( )
inlinestatic

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

static void GLViewer_ViewTransformer::setAccelKey ( int  k)
inlinestatic
static void GLViewer_ViewTransformer::setFitRectButton ( int  b)
inlinestatic
static void GLViewer_ViewTransformer::setPanButton ( int  b)
inlinestatic
static void GLViewer_ViewTransformer::setPanGlobalButton ( int  b)
inlinestatic
static void GLViewer_ViewTransformer::setZoomButton ( int  b)
inlinestatic
int GLViewer_ViewTransformer::type ( ) const

Returns transformer type

Returns the type of the transformer. [ public ]

References myType.

static int GLViewer_ViewTransformer::zoomButton ( )
inlinestatic

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

Member Data Documentation

int GLViewer_ViewTransformer::acccelKey = Qt::ControlModifier
staticprotected
int GLViewer_ViewTransformer::fitRectBtn = Qt::LeftButton
staticprotected
int GLViewer_ViewTransformer::myButtonState
protected
QPoint GLViewer_ViewTransformer::myCurr
protected
int GLViewer_ViewTransformer::myMajorBtn
protected
QRubberBand* GLViewer_ViewTransformer::myRectBand
protected
QCursor GLViewer_ViewTransformer::mySavedCursor
protected
bool GLViewer_ViewTransformer::mySavedMouseTrack
protected
QPoint GLViewer_ViewTransformer::myStart
protected
int GLViewer_ViewTransformer::myType
protected
GLViewer_Viewer* GLViewer_ViewTransformer::myViewer
protected
int GLViewer_ViewTransformer::panBtn = Qt::MidButton
staticprotected
int GLViewer_ViewTransformer::panGlobalBtn = Qt::LeftButton
staticprotected
int GLViewer_ViewTransformer::zoomBtn = Qt::LeftButton
staticprotected

The documentation for this class was generated from the following files: