Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GLViewer_ViewSketcher Class Reference

#include <GLViewer_Viewer.h>

Inheritance diagram for GLViewer_ViewSketcher:
Inheritance graph

Public Member Functions

 GLViewer_ViewSketcher (GLViewer_Viewer *, int type)
 
 ~GLViewer_ViewSketcher ()
 
int type () const
 
void * data () const
 
int buttonState () const
 
virtual bool eventFilter (QObject *, QEvent *)
 

Static Public Member Functions

static int sketchButton ()
 
static void setSketchButton (int b)
 

Protected Types

enum  SketchState { Debut, EnTrain, Fin }
 

Protected Member Functions

virtual void onSketch (SketchState)
 
void drawRect (const QRect &theRect)
 
void endDrawRect ()
 Delete rubber band on the end on the dragging operation. More...
 

Protected Attributes

GLViewer_ViewermyViewer
 
int myType
 
void * myData
 
QCursor mySavedCursor
 
QPoint myStart
 
QPoint myCurr
 
int myButtonState
 
QRubberBand * myRectBand
 selection rectangle rubber band More...
 

Static Protected Attributes

static int sketchBtn = Qt::LeftButton
 

Member Enumeration Documentation

Enumerator
Debut 
EnTrain 
Fin 

Constructor & Destructor Documentation

GLViewer_ViewSketcher::GLViewer_ViewSketcher ( GLViewer_Viewer viewer,
int  type 
)
GLViewer_ViewSketcher::~GLViewer_ViewSketcher ( )

Member Function Documentation

int GLViewer_ViewSketcher::buttonState ( ) const
inline

Returns current state of mouse/sys kbd buttons

void* GLViewer_ViewSketcher::data ( ) const
inline

Returns result of sketching

void GLViewer_ViewSketcher::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_ViewSketcher::endDrawRect ( )
protected

References myRectBand.

bool GLViewer_ViewSketcher::eventFilter ( QObject o,
QEvent e 
)
virtual

Catches mouse events for the viewport. [ virtual protected ]

References Debut, EnTrain, Fin, myButtonState, myCurr, myStart, onSketch(), and sketchButton().

static void GLViewer_ViewSketcher::setSketchButton ( int  b)
inlinestatic
static int GLViewer_ViewSketcher::sketchButton ( )
inlinestatic

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

int GLViewer_ViewSketcher::type ( ) const
inline

Returns sketcher type

Member Data Documentation

int GLViewer_ViewSketcher::myButtonState
protected
QPoint GLViewer_ViewSketcher::myCurr
protected
void* GLViewer_ViewSketcher::myData
protected
QRubberBand* GLViewer_ViewSketcher::myRectBand
protected
QCursor GLViewer_ViewSketcher::mySavedCursor
protected
QPoint GLViewer_ViewSketcher::myStart
protected
int GLViewer_ViewSketcher::myType
protected
GLViewer_Viewer* GLViewer_ViewSketcher::myViewer
protected
int GLViewer_ViewSketcher::sketchBtn = Qt::LeftButton
staticprotected

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