TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
Tinkercell::NodeGraphicsItem::Shape Class Reference

A closed polygon path made from arcs, lines, and beziers. More...

#include <NodeGraphicsItem.h>

Collaboration diagram for Tinkercell::NodeGraphicsItem::Shape:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { Type = UserType + 3 }
 for enabling dynamic_cast More...

Public Member Functions

 Shape (NodeGraphicsItem *idrawable_ptr=0, QGraphicsItem *parent=0, QGraphicsScene *scene=0)
 Shape (const Shape &copy)
virtual Shapeoperator= (const Shape &copy)
void refresh ()
 Generates a new polygon using the points and types vectors Precondition: points.size > 1 Postcondition: NA.
bool isClosed () const
 Checks if the polygon is closed.
virtual QPainterPath shape () const
 gets a path that represents this shape
virtual QRectF boundingRect () const
 bounding rect
virtual int type () const
 for enabling dynamic_cast

Public Attributes

QBrush defaultBrush
 permanent brush for this control point
QPen defaultPen
 permanent pen for this control point
NodeGraphicsItemnodeItem
 paint method. Call's parent's paint after setting antialiasing to true
bool negative
QVector< ControlPoint * > controlPoints
 control points defining this shape
QVector< qreal > parameters
 thinckness, arc angles, etc.
QVector< ShapeTypetypes
 types of shapes to draw using the control points
QPolygonF polygon
 the polygon constructed from controls and types vectors
QPainterPath path
 the path constructed from controls and types vectors
QPair< QPointF, QPointF > gradientPoints
 start and stop coordinates for gradient fill

Protected Member Functions

virtual void recomputeBoundingRect ()
 reconstruct bounding rect

Protected Attributes

QRectF boundingRectangle
 bounding reactangle for this shape

Detailed Description

A closed polygon path made from arcs, lines, and beziers.

Definition at line 132 of file NodeGraphicsItem.h.


Member Enumeration Documentation

anonymous enum

for enabling dynamic_cast

Enumerator:
Type 

Definition at line 176 of file NodeGraphicsItem.h.


Constructor & Destructor Documentation

Tinkercell::NodeGraphicsItem::Shape::Shape ( NodeGraphicsItem idrawable_ptr = 0,
QGraphicsItem *  parent = 0,
QGraphicsScene *  scene = 0 
)

Constructor: sets angle to 0 and scale to 1

Definition at line 727 of file NodeGraphicsItem.cpp.

Here is the call graph for this function:

Tinkercell::NodeGraphicsItem::Shape::Shape ( const Shape copy)

Copy Constructor

Copy Constructor : shallow copy of all vectors

Definition at line 736 of file NodeGraphicsItem.cpp.

Here is the call graph for this function:


Member Function Documentation

QRectF Tinkercell::NodeGraphicsItem::Shape::boundingRect ( ) const [virtual]

bounding rect

bounding rectangle

Definition at line 846 of file NodeGraphicsItem.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Tinkercell::NodeGraphicsItem::Shape::isClosed ( ) const

Checks if the polygon is closed.

Definition at line 853 of file NodeGraphicsItem.cpp.

NodeGraphicsItem::Shape & Tinkercell::NodeGraphicsItem::Shape::operator= ( const Shape copy) [virtual]

Copy operator

operator = shallow copy of all vectors

Definition at line 753 of file NodeGraphicsItem.cpp.

Here is the call graph for this function:

void Tinkercell::NodeGraphicsItem::Shape::recomputeBoundingRect ( ) [protected, virtual]

reconstruct bounding rect

Definition at line 878 of file NodeGraphicsItem.cpp.

void Tinkercell::NodeGraphicsItem::Shape::refresh ( )

Generates a new polygon using the points and types vectors Precondition: points.size > 1 Postcondition: NA.

paint method. Call's parent's paint after setting antialiasing to true

Parameters:
void
Returns:
void

Generates a new polygon using the points and types vectors Precondition: controlPoints.size > 1 Postcondition: NA

Parameters:
void
Returns:
void

Definition at line 780 of file NodeGraphicsItem.cpp.

Here is the call graph for this function:

QPainterPath Tinkercell::NodeGraphicsItem::Shape::shape ( ) const [virtual]

gets a path that represents this shape

gets a path that represents this graphicsItem

Definition at line 863 of file NodeGraphicsItem.cpp.

virtual int Tinkercell::NodeGraphicsItem::Shape::type ( ) const [inline, virtual]

for enabling dynamic_cast

Definition at line 178 of file NodeGraphicsItem.h.


Member Data Documentation

bounding reactangle for this shape

Definition at line 185 of file NodeGraphicsItem.h.

control points defining this shape

Definition at line 160 of file NodeGraphicsItem.h.

permanent brush for this control point

Definition at line 136 of file NodeGraphicsItem.h.

permanent pen for this control point

Definition at line 138 of file NodeGraphicsItem.h.

start and stop coordinates for gradient fill

Definition at line 172 of file NodeGraphicsItem.h.

is this a negative (clip out) shape

Definition at line 150 of file NodeGraphicsItem.h.

paint method. Call's parent's paint after setting antialiasing to true

the NodeGraphicsItem that this shape belongs in

Definition at line 148 of file NodeGraphicsItem.h.

thinckness, arc angles, etc.

Definition at line 162 of file NodeGraphicsItem.h.

the path constructed from controls and types vectors

Definition at line 168 of file NodeGraphicsItem.h.

the polygon constructed from controls and types vectors

Definition at line 166 of file NodeGraphicsItem.h.

types of shapes to draw using the control points

Definition at line 164 of file NodeGraphicsItem.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines