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

A simple circle or square that is used for changing specific locations. More...

#include <ControlPoint.h>

Inheritance diagram for Tinkercell::ControlPoint:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { Type = UserType + 1 }
 paint method. Call's parent's paint after setting antialiasing to true More...
enum  ShapeType { circle, square, triangle }
 type of shape to paint. More...

Public Member Functions

virtual qreal x ()
 x position
virtual qreal y ()
 y position
 ControlPoint (QGraphicsItem *parent=0)
 Constructor: Setup colors and z value.
 ControlPoint (const ControlPoint &copy)
 copy constructor
virtual int type () const
 for enabling dynamic_cast
virtual void sideEffect ()
 side effect when moved. always call this after moving
virtual ControlPointclone () const
 make a copy of this control point
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option=new QStyleOptionGraphicsItem(), QWidget *widget=0)
 paint method.
virtual QRectF boundingRect () const
 bounding rect method.
virtual void setRect (const QRectF &)
 set size rect.
virtual QRectF rect () const
 get size rect.
virtual ItemHandlehandle () const
 get the handle of this control point, usually 0 or the parent's handle
virtual void setHandle (ItemHandle *)
 set the handle of this control point, usually sets parent's handle or does nothing

Static Public Member Functions

static ControlPointcast (QGraphicsItem *item)
 cast QGraphicsItem to ControlPoint item. output will be 0 if pointer is not a control point
static QList< ControlPoint * > cast (const QList< QGraphicsItem * > &items)
 cast QGraphicsItems to ControlPoint items

Public Attributes

QBrush defaultBrush
 permanent brush for this control point
QPen defaultPen
 permanent pen for this control point
QSizeF defaultSize
 default size for this item
ShapeType shapeType
 type of shape to paint.

Protected Attributes

QRectF bounds

Detailed Description

A simple circle or square that is used for changing specific locations.

Definition at line 52 of file ControlPoint.h.


Member Enumeration Documentation

anonymous enum

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

for enabling dynamic_cast

Enumerator:
Type 

Definition at line 72 of file ControlPoint.h.

type of shape to paint.

Enumerator:
circle 
square 
triangle 

Definition at line 88 of file ControlPoint.h.


Constructor & Destructor Documentation

Tinkercell::ControlPoint::ControlPoint ( QGraphicsItem *  parent = 0)

Constructor: Setup colors and z value.

Definition at line 38 of file ControlPoint.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Tinkercell::ControlPoint::ControlPoint ( const ControlPoint copy)

copy constructor

Copy Constructor.

Definition at line 52 of file ControlPoint.cpp.

Here is the call graph for this function:


Member Function Documentation

QRectF Tinkercell::ControlPoint::boundingRect ( ) const [virtual]

bounding rect method.

Definition at line 69 of file ControlPoint.cpp.

Here is the caller graph for this function:

ControlPoint * Tinkercell::ControlPoint::cast ( QGraphicsItem *  item) [static]

cast QGraphicsItem to ControlPoint item. output will be 0 if pointer is not a control point

Definition at line 73 of file ConnectionGraphicsItem.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QList< ControlPoint * > Tinkercell::ControlPoint::cast ( const QList< QGraphicsItem * > &  items) [static]

cast QGraphicsItems to ControlPoint items

Definition at line 102 of file ConnectionGraphicsItem.cpp.

Here is the call graph for this function:

ControlPoint * Tinkercell::ControlPoint::clone ( ) const [virtual]

make a copy of this control point

make a copy of this item

Reimplemented in Tinkercell::ConnectionGraphicsItem::ControlPoint, and Tinkercell::NodeGraphicsItem::ControlPoint.

Definition at line 88 of file ControlPoint.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ItemHandle * Tinkercell::ControlPoint::handle ( ) const [virtual]

get the handle of this control point, usually 0 or the parent's handle

Reimplemented in Tinkercell::ConnectionGraphicsItem::ControlPoint, and Tinkercell::NodeGraphicsItem::ControlPoint.

Definition at line 27 of file ControlPoint.cpp.

Here is the caller graph for this function:

void Tinkercell::ControlPoint::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option = new QStyleOptionGraphicsItem(),
QWidget *  widget = 0 
) [virtual]

paint method.

paint method. draw one of the shapes

Reimplemented in Tinkercell::NodeGraphicsItem::ControlPoint.

Definition at line 100 of file ControlPoint.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QRectF Tinkercell::ControlPoint::rect ( ) const [virtual]

get size rect.

bounding rect method.

Definition at line 76 of file ControlPoint.cpp.

Here is the caller graph for this function:

void Tinkercell::ControlPoint::setHandle ( ItemHandle ) [virtual]

set the handle of this control point, usually sets parent's handle or does nothing

Reimplemented in Tinkercell::ConnectionGraphicsItem::ControlPoint, and Tinkercell::NodeGraphicsItem::ControlPoint.

Definition at line 32 of file ControlPoint.cpp.

void Tinkercell::ControlPoint::setRect ( const QRectF &  rect) [virtual]

set size rect.

set size.

Definition at line 82 of file ControlPoint.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Tinkercell::ControlPoint::sideEffect ( ) [virtual]

side effect when moved. always call this after moving

Reimplemented in Tinkercell::NodeGraphicsItem::ControlPoint.

Definition at line 94 of file ControlPoint.cpp.

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

for enabling dynamic_cast

Reimplemented in Tinkercell::ConnectionGraphicsItem::ControlPoint, and Tinkercell::NodeGraphicsItem::ControlPoint.

Definition at line 74 of file ControlPoint.h.

virtual qreal Tinkercell::ControlPoint::x ( ) [inline, virtual]

x position

Definition at line 62 of file ControlPoint.h.

Here is the caller graph for this function:

virtual qreal Tinkercell::ControlPoint::y ( ) [inline, virtual]

y position

Definition at line 64 of file ControlPoint.h.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 104 of file ControlPoint.h.

permanent brush for this control point

Definition at line 56 of file ControlPoint.h.

permanent pen for this control point

Definition at line 58 of file ControlPoint.h.

default size for this item

Definition at line 60 of file ControlPoint.h.

type of shape to paint.

Definition at line 90 of file ControlPoint.h.


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