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

NodeItem Class Reference

#include <CanvasItems.h>

Inheritance diagram for NodeItem:

CanvasItemBase CanvasItemIF gutz::Counted List of all members.

Detailed Description

a Node (point) also can keep track of edges it is connected to

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

Public Member Functions

 NodeItem (QCanvas *canvas, double x=0, double y=0, CompositeItem *comp=0)
 Construct.

virtual ~NodeItem ()
virtual void setPoint (double x, double y, EdgeItem *mover=0)
 set the position of this object, also updates any linked edges

virtual void setPoint (gutz::vec3d v, EdgeItem *mover=0)
gutz::vec3d getPoint () const
void setSize (int sz)
 change the diameter of the node

QPoint center ()
virtual void moveBy (double dx, double dy)
 part of QCanvasItem spec, not for general use updates edge items

virtual QPointArray areaPoints () const
 polygonalItem interface stuff

void addInEdge (EdgeItem *edge)
 these are for registering edge links, called by edge automatically, not for general use

void addOutEdge (EdgeItem *edge)
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)
 polygonalItem interface stuff

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

QPtrList< EdgeIteminList
QPtrList< EdgeItemoutList
int _sz
CompositeItem_comp
bool _updateLinks

Friends

class SmartPtr
class SmartPtrRef


Constructor & Destructor Documentation

NodeItem::NodeItem QCanvas *  canvas,
double  x = 0,
double  y = 0,
CompositeItem comp = 0
 

Construct.

Definition at line 222 of file CanvasItems.cpp.

References x, and y.

virtual NodeItem::~NodeItem  )  [inline, virtual]
 

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


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().

void NodeItem::addInEdge EdgeItem edge  )  [inline]
 

these are for registering edge links, called by edge automatically, not for general use

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

References inList.

Referenced by EdgeItem::EdgeItem().

void NodeItem::addOutEdge EdgeItem edge  )  [inline]
 

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

References outList.

Referenced by EdgeItem::EdgeItem().

QPointArray NodeItem::areaPoints  )  const [virtual]
 

polygonalItem interface stuff

Implements CanvasItemIF.

Definition at line 315 of file CanvasItems.cpp.

References _sz, x, and y.

QPoint NodeItem::center  )  [inline]
 

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

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

polygonalItem interface stuff

Implements CanvasItemIF.

Definition at line 330 of file CanvasItems.cpp.

References _sz, x, and y.

gutz::vec3d NodeItem::getPoint  )  const [inline]
 

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

References gutz::vec3d, x, y, and z.

Referenced by moveBy(), and setPoint().

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 NodeItem::moveBy double  dx,
double  dy
[virtual]
 

part of QCanvasItem spec, not for general use updates edge items

Definition at line 283 of file CanvasItems.cpp.

References CanvasItemIF::_comp, CanvasItemIF::_updateLinks, CompositeItem::childMoved(), getPoint(), inList, outList, EdgeItem::setEndPoint(), EdgeItem::setStartPoint(), and gutz::vec3d.

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 NodeItem::setPoint gutz::vec3d  v,
EdgeItem mover = 0
[virtual]
 

QCanvasItem::move(v::x,v::y);

Definition at line 240 of file CanvasItems.cpp.

References CanvasItemIF::_updateLinks, getPoint(), inList, outList, EdgeItem::setEndPoint(), EdgeItem::setStartPoint(), v, gutz::vec3d, x, y, and z.

void NodeItem::setPoint double  x,
double  y,
EdgeItem mover = 0
[virtual]
 

set the position of this object, also updates any linked edges

Definition at line 233 of file CanvasItems.cpp.

References gutz::vec3d, x, y, and z.

Referenced by EdgeItem::moveBy().

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 NodeItem::setSize int  sz  )  [inline]
 

change the diameter of the node

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

References _sz.

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(), moveBy(), and EdgeItem::moveBy().

int NodeItem::_sz [protected]
 

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

Referenced by areaPoints(), drawShape(), and setSize().

bool CanvasItemIF::_updateLinks [protected, inherited]
 

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

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

QPtrList<EdgeItem> NodeItem::inList [protected]
 

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

Referenced by addInEdge(), moveBy(), and setPoint().

QPtrList<EdgeItem> NodeItem::outList [protected]
 

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

Referenced by addOutEdge(), moveBy(), and setPoint().


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