gepetto::gui::SelectionEvent Class Reference

#include <gepetto/gui/selection-event.hh>

Inheritance diagram for gepetto::gui::SelectionEvent:
[legend]
Collaboration diagram for gepetto::gui::SelectionEvent:
[legend]

Public Types

enum  Type {
  FromOsgWindow,
  FromBodyTree
}
 

Public Slots

Type type () const
 
QString nodeName () const
 
Qt::KeyboardModifiers modKey () const
 
bool hasIntersection ()
 
QVector3D normal (bool local) const
 
QVector3D point (bool local) const
 
void done ()
 User must call this in slots using SelectionEvent. More...
 

Public Member Functions

 SelectionEvent (const Type &t, NodePtr_t node=NodePtr_t(), Qt::KeyboardModifiers modKey=Qt::NoModifier)
 
 SelectionEvent (const Type &t, Qt::KeyboardModifiers modKey)
 
void setupIntersection (const osgUtil::LineSegmentIntersector::Intersection &it)
 
const NodePtr_tnode () const
 
void modKey (const Qt::KeyboardModifiers &m)
 
void setCounter (int c)
 Set this to the number of slots that will receive the event. More...
 

Member Enumeration Documentation

◆ Type

Enumerator
FromOsgWindow 
FromBodyTree 

Constructor & Destructor Documentation

◆ SelectionEvent() [1/2]

gepetto::gui::SelectionEvent::SelectionEvent ( const Type t,
NodePtr_t  node = NodePtr_t(),
Qt::KeyboardModifiers  modKey = Qt::NoModifier 
)
inline

References node().

◆ SelectionEvent() [2/2]

gepetto::gui::SelectionEvent::SelectionEvent ( const Type t,
Qt::KeyboardModifiers  modKey 
)
inline

References setupIntersection().

Member Function Documentation

◆ done

void gepetto::gui::SelectionEvent::done ( )
slot

User must call this in slots using SelectionEvent.

This decreases the internal counter and destroys the object when it reaches zero. This is thread-safe.

Referenced by point().

◆ hasIntersection

bool gepetto::gui::SelectionEvent::hasIntersection ( )
inlineslot

◆ modKey() [1/2]

void gepetto::gui::SelectionEvent::modKey ( const Qt::KeyboardModifiers &  m)
inline

◆ modKey [2/2]

Qt::KeyboardModifiers gepetto::gui::SelectionEvent::modKey ( ) const
inlineslot

◆ node()

const NodePtr_t& gepetto::gui::SelectionEvent::node ( ) const
inline

Referenced by SelectionEvent().

◆ nodeName

QString gepetto::gui::SelectionEvent::nodeName ( ) const
inlineslot

◆ normal

QVector3D gepetto::gui::SelectionEvent::normal ( bool  local) const
inlineslot

◆ point

QVector3D gepetto::gui::SelectionEvent::point ( bool  local) const
inlineslot

References done().

◆ setCounter()

void gepetto::gui::SelectionEvent::setCounter ( int  c)
inline

Set this to the number of slots that will receive the event.

Warning
Not thread-safe

◆ setupIntersection()

void gepetto::gui::SelectionEvent::setupIntersection ( const osgUtil::LineSegmentIntersector::Intersection &  it)

Referenced by SelectionEvent().

◆ type

Type gepetto::gui::SelectionEvent::type ( ) const
inlineslot