arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

PolygonEdit Class Reference

#include <CanvasItems.h>

Inheritance diagram for PolygonEdit:

CanvasItemIF CompositeItem gutz::Counted TFItem TFBoxItem List of all members.

Detailed Description

A Polygon that you can edit.

Definition at line 245 of file commonQt/canvas/CanvasItems.h.

Public Member Functions

 PolygonEdit (QCanvas *canvas, CompositeItem *comp=0)
 Construct.

virtual ~PolygonEdit ()
 Destruct.

virtual void setPoints (QPointArray p)
 Set Points.

QPointArray areaPoints () const
 Area points.

virtual void childUpdate (CanvasItemBase *child)
 TODO: as far as I can tell child update is unused!!

virtual void childMovedBy (CanvasItemBase *child, gutz::vec3d dv)
 child Moveby (relative motion)

virtual void childMoved (CanvasItemBase *child, gutz::vec3d last, gutz::vec3d point)
 child moved (absolute modtion)

virtual void moveBy (double dx, double dy)
virtual void moveBy (gutz::vec3d dv)
 this (incrmentaly) translates each node by differential vec "dv"

virtual void setSelected (bool yes)
 is it selected? (currently being modified) bool isSelected() declared in QCanvasItem

virtual void setActive (bool yes)
 has it been selected and modifiable as a group? bool isActive() declared in QCanvasItem

bool getUpdateLinks () const
 do you want this object to update other objects that are linked to it?

void setUpdateLinks (bool yes)

Protected Member Functions

virtual void drawShape (QPainter &p)
 Draw Shape.

void nukePoints ()
 Nuke Points.

void nukeEdges ()
 Nuke Edges.

int getEdgeIndex (CanvasItemBase *ptr)
 returns -1 if not an edge/node respectively

int getNodeIndex (CanvasItemBase *ptr)
 node index

void updatePen ()
virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

NodeItemVec _points
EdgeItemVec _edges
CompositeItem_comp
bool _updateLinks

Friends

class SmartPtr
class SmartPtrRef


Constructor & Destructor Documentation

PolygonEdit::PolygonEdit QCanvas *  canvas,
CompositeItem comp = 0
 

Construct.

Definition at line 343 of file CanvasItems.cpp.

PolygonEdit::~PolygonEdit  )  [virtual]
 

Destruct.

Definition at line 351 of file CanvasItems.cpp.

References nukeEdges(), and nukePoints().


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

QPointArray PolygonEdit::areaPoints  )  const [virtual]
 

Area points.

Implements CanvasItemIF.

Definition at line 360 of file CanvasItems.cpp.

References _points, x, and y.

virtual void PolygonEdit::childMoved CanvasItemBase child,
gutz::vec3d  last,
gutz::vec3d  point
[inline, virtual]
 

child moved (absolute modtion)

Implements CompositeItem.

Reimplemented in TFBoxItem.

Definition at line 260 of file commonQt/canvas/CanvasItems.h.

virtual void PolygonEdit::childMovedBy CanvasItemBase child,
gutz::vec3d  dv
[inline, virtual]
 

child Moveby (relative motion)

Implements CompositeItem.

Reimplemented in TFBoxItem.

Definition at line 258 of file commonQt/canvas/CanvasItems.h.

virtual void PolygonEdit::childUpdate CanvasItemBase child  )  [inline, virtual]
 

TODO: as far as I can tell child update is unused!!

Implements CompositeItem.

Reimplemented in TFBoxItem.

Definition at line 256 of file commonQt/canvas/CanvasItems.h.

void PolygonEdit::drawShape QPainter &  p  )  [protected, virtual]
 

Draw Shape.

Implements CanvasItemIF.

Definition at line 417 of file CanvasItems.cpp.

int PolygonEdit::getEdgeIndex CanvasItemBase ptr  )  [protected]
 

returns -1 if not an edge/node respectively

Definition at line 424 of file CanvasItems.cpp.

References _edges.

Referenced by TFBoxItem::childMoved(), and TFBoxItem::childMovedBy().

int PolygonEdit::getNodeIndex CanvasItemBase ptr  )  [protected]
 

node index

Definition at line 435 of file CanvasItems.cpp.

References _points.

Referenced by TFBoxItem::childMoved(), and TFBoxItem::childMovedBy().

bool CanvasItemIF::getUpdateLinks  )  const [inline, inherited]
 

do you want this object to update other objects that are linked to it?

Definition at line 117 of file commonQt/canvas/CanvasItems.h.

References CanvasItemIF::_updateLinks.

void PolygonEdit::moveBy gutz::vec3d  dv  )  [virtual]
 

this (incrmentaly) translates each node by differential vec "dv"

Definition at line 446 of file CanvasItems.cpp.

References _points.

virtual void PolygonEdit::moveBy double  dx,
double  dy
[inline, virtual]
 

Definition at line 262 of file commonQt/canvas/CanvasItems.h.

void PolygonEdit::nukeEdges  )  [protected]
 

Nuke Edges.

Definition at line 406 of file CanvasItems.cpp.

References _edges, and EdgeItemVec.

Referenced by setPoints(), and ~PolygonEdit().

void PolygonEdit::nukePoints  )  [protected]
 

Nuke Points.

Definition at line 395 of file CanvasItems.cpp.

References _points, and NodeItemVec.

Referenced by setPoints(), and ~PolygonEdit().

void CanvasItemIF::setActive bool  yes  )  [virtual, inherited]
 

has it been selected and modifiable as a group? bool isActive() declared in QCanvasItem

Definition at line 68 of file CanvasItems.cpp.

void PolygonEdit::setPoints QPointArray  p  )  [virtual]
 

Set Points.

create nodes

create points

Definition at line 374 of file CanvasItems.cpp.

References _edges, _points, EdgeItemSP, NodeItemSP, nukeEdges(), and nukePoints().

Referenced by TFView::TFView().

void CanvasItemIF::setSelected bool  yes  )  [virtual, inherited]
 

is it selected? (currently being modified) bool isSelected() declared in QCanvasItem

Definition at line 61 of file CanvasItems.cpp.

void CanvasItemIF::setUpdateLinks bool  yes  )  [inline, inherited]
 

Definition at line 118 of file commonQt/canvas/CanvasItems.h.

References CanvasItemIF::_updateLinks.

void CanvasItemIF::updatePen  )  [protected, inherited]
 


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

CompositeItem* CanvasItemIF::_comp [protected, inherited]
 

Definition at line 129 of file commonQt/canvas/CanvasItems.h.

Referenced by CanvasItemIF::CanvasItemIF(), NodeItem::moveBy(), and EdgeItem::moveBy().

EdgeItemVec PolygonEdit::_edges [protected]
 

Definition at line 276 of file commonQt/canvas/CanvasItems.h.

Referenced by getEdgeIndex(), TFBoxItem::initBox(), nukeEdges(), and setPoints().

NodeItemVec PolygonEdit::_points [protected]
 

Definition at line 275 of file commonQt/canvas/CanvasItems.h.

Referenced by areaPoints(), getNodeIndex(), TFBoxItem::initBox(), moveBy(), nukePoints(), TFBoxItem::setBoxDims(), and setPoints().

bool CanvasItemIF::_updateLinks [protected, inherited]
 

Definition at line 131 of file commonQt/canvas/CanvasItems.h.

Referenced by CanvasItemIF::CanvasItemIF(), CanvasItemIF::getUpdateLinks(), NodeItem::moveBy(), EdgeItem::moveBy(), NodeItem::setPoint(), and CanvasItemIF::setUpdateLinks().


The documentation for this class was generated from the following files:
Send questions, comments, and bug reports to:
jmk