GLC_3DWidget Class Reference

GLC_3DWidget : The base class for 3D user interface class. More...

#include <glc_3dwidget.h>

Inheritance diagram for GLC_3DWidget:
GLC_Axis GLC_CuttingPlane

List of all members.

Signals

void asChanged ()
 Sub class must emit this signal if they changed.

Public Member Functions

Constructor / Destructor

 GLC_3DWidget (GLC_3DWidgetManagerHandle *pWidgetManagerHandle=NULL)
 Construct a 3d widget with the given 3DWidget manager handle.
 GLC_3DWidget (const GLC_3DWidget &widget)
 Construct a 3d widget form the given 3d widget.
virtual ~GLC_3DWidget ()
 Destructor.
Get Functions

GLC_uint id () const
 Return this widget id.
bool operator== (const GLC_3DWidget &widget) const
 Return true if this 3d widget is equal to the given 3d widget.
bool instanceBelongTo (GLC_uint id) const
 Return true if the given instance id belongs to this widget.
const GLC_3DWidgetManagerHandlewidgetManagerHandle () const
 Return the widget manager of this 3d widget.
bool has3DWidgetManager () const
 Return true if this widget has a 3DWidgetManager.
bool useOrtho () const
 Return true if otho is used.
Set Functions

virtual GLC_3DWidgetoperator= (const GLC_3DWidget &widget)
 Copy the given widget in this widget and return a reference on this widget.
void setWidgetManager (GLC_3DWidgetManagerHandle *pWidgetManagerHandle)
 Set the given widgetManager to this widget.
virtual void updateWidgetRep ()
 Update widget representation.
void setVisible (bool visible)
 Set the visibility of 3DView Instance of this widget.
Interaction Functions

virtual glc::WidgetEventFlag select (const GLC_Point3d &, GLC_uint id)
 This widget as been selected.
virtual glc::WidgetEventFlag unselect (const GLC_Point3d &, GLC_uint id)
 This widget as been unselected.
virtual glc::WidgetEventFlag mouseOver (const GLC_Point3d &, GLC_uint id)
 The mouse is over this widget.
virtual glc::WidgetEventFlag mousePressed (const GLC_Point3d &, Qt::MouseButton, GLC_uint id)
 The mouse is over this widget and a mousse button is pressed.
virtual glc::WidgetEventFlag mouseReleased (Qt::MouseButton)
 The mouse is over this widget and a mousse button is released.
virtual glc::WidgetEventFlag mouseMove (const GLC_Point3d &, Qt::MouseButtons, GLC_uint id)
 This widget is selected and the mousse move with a pressed buttons.

Protected Member Functions

virtual void create3DviewInstance ()=0
 Create the 3DView instance of this 3d widget.
bool isEmpty () const
 Return true if this 3DWidget hasen't 3d instance.
void add3DViewInstance (const GLC_3DViewInstance &instance)
 Add 3D view instance in the widget manager handle.
GLC_3DViewInstanceinstanceHandle (int index)
 Return the 3D view instance handle from the given index.
void remove3DViewInstance ()
 Remove instance of this 3d widget from the 3D widget manager handle.
void set3DViewInstanceVisibility (int index, bool visibility)
 Set the specified 3D view instance visibility.
int indexOfIntsanceId (GLC_uint id)
 Return the index of the given instance id.
virtual void resetViewState ()=0
 Reset the view state of this 3DWidget.

Private Types

typedef QList< GLC_uintInstanceIdList

Private Attributes

GLC_uint m_Uid
 The id of this 3d widget.
GLC_3DWidgetManagerHandlem_pWidgetManagerHandle
 Pointer to this widget manager handle.
QList< GLC_uintm_InstanceIdList
 The List of this widget instance id.

Detailed Description

GLC_3DWidget : The base class for 3D user interface class.

GLC_3DWidget The 3D widget has a 3d representation and react on user interactions

Definition at line 41 of file glc_3dwidget.h.


Member Typedef Documentation

typedef QList<GLC_uint> GLC_3DWidget::InstanceIdList [private]

Definition at line 45 of file glc_3dwidget.h.


Constructor & Destructor Documentation

GLC_3DWidget::GLC_3DWidget ( GLC_3DWidgetManagerHandle pWidgetManagerHandle = NULL  ) 

Construct a 3d widget with the given 3DWidget manager handle.

Definition at line 27 of file glc_3dwidget.cpp.

GLC_3DWidget::GLC_3DWidget ( const GLC_3DWidget widget  ) 

Construct a 3d widget form the given 3d widget.

Definition at line 36 of file glc_3dwidget.cpp.

References GLC_3DWidgetManagerHandle::add3DViewInstance(), GLC_3DWidgetManagerHandle::instanceHandle(), m_InstanceIdList, m_pWidgetManagerHandle, and m_Uid.

GLC_3DWidget::~GLC_3DWidget (  )  [virtual]

Destructor.

Definition at line 53 of file glc_3dwidget.cpp.

References remove3DViewInstance().


Member Function Documentation

void GLC_3DWidget::add3DViewInstance ( const GLC_3DViewInstance instance  )  [protected]
void GLC_3DWidget::asChanged (  )  [signal]

Sub class must emit this signal if they changed.

Referenced by GLC_CuttingPlane::mouseMove(), and GLC_Axis::mouseMove().

virtual void GLC_3DWidget::create3DviewInstance (  )  [protected, pure virtual]

Create the 3DView instance of this 3d widget.

Implemented in GLC_Axis, and GLC_CuttingPlane.

Referenced by setWidgetManager().

bool GLC_3DWidget::has3DWidgetManager (  )  const [inline]

Return true if this widget has a 3DWidgetManager.

Definition at line 83 of file glc_3dwidget.h.

Referenced by GLC_CuttingPlane::updateLength().

GLC_uint GLC_3DWidget::id (  )  const [inline]

Return this widget id.

Definition at line 68 of file glc_3dwidget.h.

Referenced by GLC_3DWidgetManagerHandle::add3DWidget().

int GLC_3DWidget::indexOfIntsanceId ( GLC_uint  id  )  [inline, protected]

Return the index of the given instance id.

Definition at line 165 of file glc_3dwidget.h.

Referenced by GLC_CuttingPlane::mousePressed(), and GLC_Axis::select().

bool GLC_3DWidget::instanceBelongTo ( GLC_uint  id  )  const [inline]

Return true if the given instance id belongs to this widget.

Definition at line 75 of file glc_3dwidget.h.

Referenced by GLC_3DWidgetManagerHandle::mousePressEvent().

GLC_3DViewInstance* GLC_3DWidget::instanceHandle ( int  index  )  [inline, protected]
bool GLC_3DWidget::isEmpty ( void   )  const [inline, protected]

Return true if this 3DWidget hasen't 3d instance.

Definition at line 148 of file glc_3dwidget.h.

Referenced by GLC_CuttingPlane::create3DviewInstance(), GLC_Axis::create3DviewInstance(), and GLC_Axis::setAxisLength().

glc::WidgetEventFlag GLC_3DWidget::mouseMove ( const GLC_Point3d ,
Qt::MouseButtons  ,
GLC_uint  id 
) [virtual]

This widget is selected and the mousse move with a pressed buttons.

Reimplemented in GLC_Axis, and GLC_CuttingPlane.

Definition at line 138 of file glc_3dwidget.cpp.

References glc::IgnoreEvent.

Referenced by GLC_3DWidgetManagerHandle::mouseMoveEvent().

glc::WidgetEventFlag GLC_3DWidget::mouseOver ( const GLC_Point3d ,
GLC_uint  id 
) [virtual]

The mouse is over this widget.

Definition at line 123 of file glc_3dwidget.cpp.

References glc::IgnoreEvent.

Referenced by GLC_3DWidgetManagerHandle::mouseMoveEvent().

glc::WidgetEventFlag GLC_3DWidget::mousePressed ( const GLC_Point3d ,
Qt::MouseButton  ,
GLC_uint  id 
) [virtual]

The mouse is over this widget and a mousse button is pressed.

Reimplemented in GLC_Axis, and GLC_CuttingPlane.

Definition at line 128 of file glc_3dwidget.cpp.

References glc::IgnoreEvent.

Referenced by GLC_3DWidgetManagerHandle::mousePressEvent().

glc::WidgetEventFlag GLC_3DWidget::mouseReleased ( Qt::MouseButton   )  [virtual]

The mouse is over this widget and a mousse button is released.

Reimplemented in GLC_Axis, and GLC_CuttingPlane.

Definition at line 133 of file glc_3dwidget.cpp.

References glc::IgnoreEvent.

Referenced by GLC_3DWidgetManagerHandle::mouseReleaseEvent().

GLC_3DWidget & GLC_3DWidget::operator= ( const GLC_3DWidget widget  )  [virtual]

Copy the given widget in this widget and return a reference on this widget.

Definition at line 63 of file glc_3dwidget.cpp.

References GLC_3DWidgetManagerHandle::add3DViewInstance(), GLC_3DWidgetManagerHandle::instanceHandle(), m_InstanceIdList, m_pWidgetManagerHandle, m_Uid, and remove3DViewInstance().

bool GLC_3DWidget::operator== ( const GLC_3DWidget widget  )  const

Return true if this 3d widget is equal to the given 3d widget.

Definition at line 58 of file glc_3dwidget.cpp.

void GLC_3DWidget::remove3DViewInstance (  )  [protected]

Remove instance of this 3d widget from the 3D widget manager handle.

Definition at line 154 of file glc_3dwidget.cpp.

References m_InstanceIdList, m_pWidgetManagerHandle, and GLC_3DWidgetManagerHandle::remove3DViewInstance().

Referenced by operator=(), GLC_Axis::setAxisLength(), setWidgetManager(), GLC_CuttingPlane::updateLength(), and ~GLC_3DWidget().

virtual void GLC_3DWidget::resetViewState (  )  [protected, pure virtual]

Reset the view state of this 3DWidget.

Implemented in GLC_Axis, and GLC_CuttingPlane.

Referenced by setVisible().

glc::WidgetEventFlag GLC_3DWidget::select ( const GLC_Point3d ,
GLC_uint  id 
) [virtual]

This widget as been selected.

Reimplemented in GLC_Axis, and GLC_CuttingPlane.

Definition at line 113 of file glc_3dwidget.cpp.

References glc::IgnoreEvent.

Referenced by GLC_3DWidgetManagerHandle::mousePressEvent().

void GLC_3DWidget::set3DViewInstanceVisibility ( int  index,
bool  visibility 
) [protected]
void GLC_3DWidget::setVisible ( bool  visible  ) 

Set the visibility of 3DView Instance of this widget.

Definition at line 98 of file glc_3dwidget.cpp.

References GLC_3DWidgetManagerHandle::instanceHandle(), m_InstanceIdList, m_pWidgetManagerHandle, and resetViewState().

void GLC_3DWidget::setWidgetManager ( GLC_3DWidgetManagerHandle pWidgetManagerHandle  ) 

Set the given widgetManager to this widget.

Definition at line 86 of file glc_3dwidget.cpp.

References create3DviewInstance(), m_pWidgetManagerHandle, m_Uid, remove3DViewInstance(), and GLC_3DWidgetManagerHandle::take().

Referenced by GLC_3DWidgetManagerHandle::add3DWidget().

glc::WidgetEventFlag GLC_3DWidget::unselect ( const GLC_Point3d ,
GLC_uint  id 
) [virtual]

This widget as been unselected.

Reimplemented in GLC_Axis, and GLC_CuttingPlane.

Definition at line 118 of file glc_3dwidget.cpp.

References glc::IgnoreEvent.

Referenced by GLC_3DWidgetManagerHandle::mousePressEvent().

virtual void GLC_3DWidget::updateWidgetRep (  )  [inline, virtual]

Update widget representation.

Reimplemented in GLC_Axis, and GLC_CuttingPlane.

Definition at line 104 of file glc_3dwidget.h.

bool GLC_3DWidget::useOrtho (  )  const [inline]

Return true if otho is used.

Definition at line 87 of file glc_3dwidget.h.

const GLC_3DWidgetManagerHandle* GLC_3DWidget::widgetManagerHandle (  )  const [inline]

Member Data Documentation

The List of this widget instance id.

Definition at line 188 of file glc_3dwidget.h.

Referenced by add3DViewInstance(), GLC_3DWidget(), operator=(), remove3DViewInstance(), set3DViewInstanceVisibility(), and setVisible().

Pointer to this widget manager handle.

Definition at line 185 of file glc_3dwidget.h.

Referenced by add3DViewInstance(), GLC_3DWidget(), operator=(), remove3DViewInstance(), set3DViewInstanceVisibility(), setVisible(), and setWidgetManager().

The id of this 3d widget.

Generated on GLC_3DWidget construction

Definition at line 182 of file glc_3dwidget.h.

Referenced by add3DViewInstance(), GLC_3DWidget(), operator=(), and setWidgetManager().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon