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 (void) |
SelectionRole | selectedRole () const |
virtual void | terminate ()=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.
Member Enumeration Documentation
◆ anonymous enum
Constructor & Destructor Documentation
◆ AbstractMouseSelection()
AbstractMouseSelection::AbstractMouseSelection | ( | ) |
References m_iXnew, m_iXold, m_iYnew, m_iYold, and m_selectedRole.
◆ ~AbstractMouseSelection()
|
virtual |
Member Function Documentation
◆ draw()
|
protectedvirtual |
drawing stuff
Reimplemented in Gui::RubberbandSelection, Gui::PolyPickerSelection, and SandboxGui::DrawingPlane.
◆ getPositions()
const std::vector<SbVec2s>& Gui::AbstractMouseSelection::getPositions | ( | ) | const |
◆ grabMouseModel()
void AbstractMouseSelection::grabMouseModel | ( | Gui::View3DInventorViewer * | viewer | ) |
References initialize(), m_cPrevCursor, and OfflineRenderingUtils::viewer().
Referenced by Gui::NavigationStyle::startSelection().
◆ handleEvent()
int AbstractMouseSelection::handleEvent | ( | const SoEvent *const | ev, |
const SbViewportRegion & | vp | ||
) |
References Continue, keyboardEvent(), locationEvent(), mouseButtonEvent(), and Restart.
Referenced by Gui::NavigationStyle::processEvent().
◆ initialize()
|
pure virtual |
implement this in derived classes
Implemented in Gui::RubberbandSelection, Gui::PolyPickerSelection, and SandboxGui::DrawingPlane.
Referenced by grabMouseModel().
◆ keyboardEvent()
|
protectedvirtual |
Reimplemented in Gui::RubberbandSelection, Gui::PolyPickerSelection, and SandboxGui::DrawingPlane.
Referenced by handleEvent().
◆ locationEvent()
|
protectedvirtual |
Reimplemented in Gui::RubberbandSelection, Gui::FreehandSelection, Gui::PolyPickerSelection, and SandboxGui::DrawingPlane.
Referenced by handleEvent().
◆ mouseButtonEvent()
|
protectedvirtual |
Reimplemented in Gui::RubberbandSelection, Gui::FreehandSelection, Gui::PolyPickerSelection, and SandboxGui::DrawingPlane.
Referenced by handleEvent().
◆ redraw()
void AbstractMouseSelection::redraw | ( | ) |
Referenced by Gui::NavigationStyle::redraw(), and draftguitools.gui_trimex.Trimex::trimObject().
◆ releaseMouseModel()
void AbstractMouseSelection::releaseMouseModel | ( | void | ) |
◆ selectedRole()
SelectionRole Gui::AbstractMouseSelection::selectedRole | ( | ) | const |
Referenced by Gui::NavigationStyle::processEvent().
◆ terminate()
|
pure virtual |
implement this in derived classes
Implemented in Gui::BoxZoomSelection, Gui::RubberbandSelection, Gui::PolyPickerSelection, and SandboxGui::DrawingPlane.
Referenced by releaseMouseModel().
Member Data Documentation
◆ m_cPrevCursor
|
protected |
◆ m_iXnew
|
protected |
Referenced by AbstractMouseSelection(), Gui::PolyPickerSelection::locationEvent(), Gui::FreehandSelection::locationEvent(), Gui::RubberbandSelection::locationEvent(), Gui::PolyPickerSelection::mouseButtonEvent(), Gui::FreehandSelection::mouseButtonEvent(), Gui::RubberbandSelection::mouseButtonEvent(), and Gui::BoxZoomSelection::terminate().
◆ m_iXold
|
protected |
◆ m_iYnew
|
protected |
Referenced by AbstractMouseSelection(), Gui::PolyPickerSelection::locationEvent(), Gui::FreehandSelection::locationEvent(), Gui::RubberbandSelection::locationEvent(), Gui::PolyPickerSelection::mouseButtonEvent(), Gui::FreehandSelection::mouseButtonEvent(), Gui::RubberbandSelection::mouseButtonEvent(), and Gui::BoxZoomSelection::terminate().
◆ m_iYold
|
protected |
◆ m_selectedRole
|
protected |
Referenced by AbstractMouseSelection(), and Gui::PolyClipSelection::popupMenu().
The documentation for this class was generated from the following files:
- src/Gui/MouseSelection.h
- src/Gui/MouseSelection.cpp