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... | |
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.
AbstractMouseSelection::AbstractMouseSelection | ( | ) |
References m_iXnew, m_iXold, m_iYnew, m_iYold, and m_selectedRole.
|
virtual |
|
protectedvirtual |
drawing stuff
Reimplemented in Gui::PolyPickerSelection, Gui::RubberbandSelection, and SandboxGui::DrawingPlane.
const std::vector< SbVec2s > & Gui::AbstractMouseSelection::getPositions | ( | ) | const |
void AbstractMouseSelection::grabMouseModel | ( | Gui::View3DInventorViewer * | viewer | ) |
References initialize(), m_cPrevCursor, and OfflineRenderingUtils::viewer().
Referenced by Gui::NavigationStyle::startSelection().
References Continue, keyboardEvent(), locationEvent(), mouseButtonEvent(), and Restart.
Referenced by Gui::NavigationStyle::processEvent().
|
pure virtual |
implement this in derived classes
Implemented in Gui::PolyPickerSelection, Gui::RubberbandSelection, and SandboxGui::DrawingPlane.
Referenced by grabMouseModel().
|
protectedvirtual |
Reimplemented in Gui::PolyPickerSelection, Gui::RubberbandSelection, and SandboxGui::DrawingPlane.
Referenced by handleEvent().
|
protectedvirtual |
Reimplemented in Gui::PolyPickerSelection, Gui::FreehandSelection, Gui::RubberbandSelection, and SandboxGui::DrawingPlane.
Referenced by handleEvent().
|
protectedvirtual |
Reimplemented in Gui::PolyPickerSelection, Gui::FreehandSelection, Gui::RubberbandSelection, and SandboxGui::DrawingPlane.
Referenced by handleEvent().
void AbstractMouseSelection::redraw | ( | ) |
Referenced by Gui::NavigationStyle::redraw(), and draftguitools.gui_trimex.Trimex::trimObject().
void AbstractMouseSelection::releaseMouseModel | ( | bool | abort = false | ) |
SelectionRole Gui::AbstractMouseSelection::selectedRole | ( | ) | const |
Referenced by Gui::NavigationStyle::processEvent().
|
pure virtual |
implement this in derived classes
Implemented in Gui::PolyPickerSelection, Gui::RubberbandSelection, and Gui::BoxZoomSelection.
Referenced by releaseMouseModel(), and addonmanager_workers.CacheMacroCode::update_and_advance().
|
protected |
|
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().
|
protected |
|
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().
|
protected |
|
protected |
Referenced by AbstractMouseSelection(), and Gui::PolyClipSelection::popupMenu().