Gui::AbstractMouseSelection Class Referenceabstract

The mouse selection base class In derived classes you must implement the methods initialize() and terminate() For all drawing stuff you just have to reimplement the draw() method. More...

#include <MouseSelection.h>

Public Types

enum  {
  Continue =0 , Restart =1 , Finish =2 , Cancel =3 ,
  Ignore =4
}
 

Public Member Functions

 AbstractMouseSelection ()
 
const std::vector< SbVec2s > & getPositions () const
 
void grabMouseModel (Gui::View3DInventorViewer *)
 
virtual void initialize ()=0
 implement this in derived classes More...
 
void redraw ()
 
void releaseMouseModel (bool abort=false)
 
SelectionRole selectedRole () const
 
virtual void terminate (bool abort=false)=0
 implement this in derived classes More...
 
virtual ~AbstractMouseSelection (void)
 

Mouse events

QCursor m_cPrevCursor
 
int m_iXold
 
int m_iYold
 
int m_iXnew
 
int m_iYnew
 
SelectionRole m_selectedRole
 
int handleEvent (const SoEvent *const ev, const SbViewportRegion &vp)
 
virtual int mouseButtonEvent (const SoMouseButtonEvent *const, const QPoint &)
 
virtual int locationEvent (const SoLocation2Event *const, const QPoint &)
 
virtual int keyboardEvent (const SoKeyboardEvent *const)
 
virtual void draw ()
 drawing stuff More...
 

Detailed Description

The mouse selection base class In derived classes you must implement the methods initialize() and terminate() For all drawing stuff you just have to reimplement the draw() method.

In general you need not to do anything else.

Author
Werner Mayer and Jürgen Riegel

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Continue 
Restart 
Finish 
Cancel 
Ignore 

Constructor & Destructor Documentation

◆ AbstractMouseSelection()

AbstractMouseSelection::AbstractMouseSelection ( )

◆ ~AbstractMouseSelection()

virtual Gui::AbstractMouseSelection::~AbstractMouseSelection ( void  )
virtual

Member Function Documentation

◆ draw()

virtual void Gui::AbstractMouseSelection::draw ( )
protectedvirtual

◆ getPositions()

const std::vector< SbVec2s > & Gui::AbstractMouseSelection::getPositions ( ) const

◆ grabMouseModel()

void AbstractMouseSelection::grabMouseModel ( Gui::View3DInventorViewer viewer)

◆ handleEvent()

int AbstractMouseSelection::handleEvent ( const SoEvent *const  ev,
const SbViewportRegion &  vp 
)

◆ initialize()

virtual void Gui::AbstractMouseSelection::initialize ( )
pure virtual

implement this in derived classes

Implemented in Gui::PolyPickerSelection, Gui::RubberbandSelection, and SandboxGui::DrawingPlane.

Referenced by grabMouseModel().

◆ keyboardEvent()

virtual int Gui::AbstractMouseSelection::keyboardEvent ( const SoKeyboardEvent * const  )
protectedvirtual

◆ locationEvent()

virtual int Gui::AbstractMouseSelection::locationEvent ( const SoLocation2Event * const  ,
const QPoint &   
)
protectedvirtual

◆ mouseButtonEvent()

virtual int Gui::AbstractMouseSelection::mouseButtonEvent ( const SoMouseButtonEvent * const  ,
const QPoint &   
)
protectedvirtual

◆ redraw()

void AbstractMouseSelection::redraw ( )

◆ releaseMouseModel()

◆ selectedRole()

SelectionRole Gui::AbstractMouseSelection::selectedRole ( ) const

◆ terminate()

virtual void Gui::AbstractMouseSelection::terminate ( bool  abort = false)
pure virtual

Member Data Documentation

◆ m_cPrevCursor

QCursor Gui::AbstractMouseSelection::m_cPrevCursor
protected

◆ m_iXnew

◆ m_iXold

◆ m_iYnew

◆ m_iYold

◆ m_selectedRole

SelectionRole Gui::AbstractMouseSelection::m_selectedRole
protected

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