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

A node graphics item that is used to draw arrow heads on connection items. More...

#include <ConnectionGraphicsItem.h>

Inheritance diagram for Tinkercell::ArrowHeadItem:
Inheritance graph
[legend]
Collaboration diagram for Tinkercell::ArrowHeadItem:
Collaboration graph
[legend]

List of all members.

Public Types

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

Public Member Functions

 ArrowHeadItem (ConnectionGraphicsItem *c=0)
 constructor -- initializes the angle and connection item
 ArrowHeadItem (const QString &, ConnectionGraphicsItem *c=0)
 construct from file
 ArrowHeadItem (const ArrowHeadItem &)
 copy constructor
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option=new QStyleOptionGraphicsItem(), QWidget *widget=0)
 paint this arrow item. performs rotation using the angle member.
virtual NodeGraphicsItemclone () const
 returns a duplicate of this arrow head
virtual int type () const
 for enabling dynamic_cast

Static Public Member Functions

static ArrowHeadItemcast (QGraphicsItem *)
 cast a graphics item to a node graphics item using qgraphicsitem_cast

Public Attributes

ConnectionGraphicsItemconnectionItem
 The connection item that this arrow head belongs with.
qreal angle
 the direction (angle) that the arrow is pointing

Static Public Attributes

static const QString CLASSNAME = QString("ArrowHeadItem")
 for safe static casting

Detailed Description

A node graphics item that is used to draw arrow heads on connection items.

Definition at line 60 of file ConnectionGraphicsItem.h.


Member Enumeration Documentation

anonymous enum

for enabling dynamic_cast

Enumerator:
Type 

Definition at line 87 of file ConnectionGraphicsItem.h.


Constructor & Destructor Documentation

Tinkercell::ArrowHeadItem::ArrowHeadItem ( ConnectionGraphicsItem connection = 0)

constructor -- initializes the angle and connection item

Constructor: init everything

Definition at line 113 of file ConnectionGraphicsItem.cpp.

Here is the caller graph for this function:

Tinkercell::ArrowHeadItem::ArrowHeadItem ( const QString &  filename,
ConnectionGraphicsItem connection = 0 
)

construct from file

Constructor: init everything

Definition at line 121 of file ConnectionGraphicsItem.cpp.

Tinkercell::ArrowHeadItem::ArrowHeadItem ( const ArrowHeadItem copy)

copy constructor

Constructor: init everything

Definition at line 129 of file ConnectionGraphicsItem.cpp.


Member Function Documentation

ArrowHeadItem * Tinkercell::ArrowHeadItem::cast ( QGraphicsItem *  q) [static]

cast a graphics item to a node graphics item using qgraphicsitem_cast

Parameters:
QGraphicsItem*graphics item
Returns:
ArrowHeadItem* can be 0 if the cast is invalid

Reimplemented from Tinkercell::NodeGraphicsItem.

Definition at line 141 of file ConnectionGraphicsItem.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NodeGraphicsItem * Tinkercell::ArrowHeadItem::clone ( ) const [virtual]

returns a duplicate of this arrow head

make a copy of this item

Returns:
duplicate arrow head item

Reimplemented from Tinkercell::NodeGraphicsItem.

Definition at line 136 of file ConnectionGraphicsItem.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

paint this arrow item. performs rotation using the angle member.

Returns:
void

Reimplemented from Tinkercell::NodeGraphicsItem.

Definition at line 1760 of file ConnectionGraphicsItem.cpp.

Here is the call graph for this function:

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

for enabling dynamic_cast

Reimplemented from Tinkercell::NodeGraphicsItem.

Definition at line 89 of file ConnectionGraphicsItem.h.


Member Data Documentation

the direction (angle) that the arrow is pointing

Definition at line 66 of file ConnectionGraphicsItem.h.

const QString Tinkercell::ArrowHeadItem::CLASSNAME = QString("ArrowHeadItem") [static]

for safe static casting

Reimplemented from Tinkercell::NodeGraphicsItem.

Definition at line 94 of file ConnectionGraphicsItem.h.

The connection item that this arrow head belongs with.

Definition at line 64 of file ConnectionGraphicsItem.h.


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