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

The handles are used to bring together data and graphics items. Node Handle contains pointers to all the graphics items that belong to it, the tools that apply to this item, the data for this item, and the family that it belongs with. More...

#include <ItemHandle.h>

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

List of all members.

Public Member Functions

virtual QList< ConnectionHandle * > connections () const
 funcion that returns all the connections from all the nodes in this handle
 NodeHandle (const QString &name=QString(), NodeFamily *nodeFamily=0)
 default constructor -- initialize everything
 NodeHandle (const NodeHandle &copy)
 copy constructor -- copies all the data (deep). graphic items are shallow copies
virtual NodeHandleoperator= (const NodeHandle &)
 operator =
 NodeHandle (NodeFamily *nodeFamily, NodeGraphicsItem *item)
 constructor using initial family and graphics item
 NodeHandle (NodeFamily *nodeFamily, const QString &name=QString())
 constructor using initial family and name
virtual ItemHandleclone () const
 return a clone of this handle
virtual ItemFamilyfamily () const
 get the node family for this handle
virtual void setFamily (ItemFamily *, bool useCommand=true)
 set the node family for this handle

Static Public Member Functions

static NodeHandlecast (ItemHandle *)
 checks if the item handle is a node handle and casts it as a node item. Returns 0 if it is not a node item
static QList< NodeHandle * > cast (const QList< ItemHandle * > &)
 checks if the item handles are node handles and casts then as node items. Returns QList<NodeHandle*>

Public Attributes

NodeFamilynodeFamily
 node family for this node handle

Static Public Attributes

static const int TYPE = 1
 this number is used to identify when a handle is a node handle

Detailed Description

The handles are used to bring together data and graphics items. Node Handle contains pointers to all the graphics items that belong to it, the tools that apply to this item, the data for this item, and the family that it belongs with.

Definition at line 247 of file ItemHandle.h.


Constructor & Destructor Documentation

Tinkercell::NodeHandle::NodeHandle ( const QString &  name = QString(),
NodeFamily nodeFamily = 0 
)

default constructor -- initialize everything

Definition at line 629 of file ItemHandle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Tinkercell::NodeHandle::NodeHandle ( const NodeHandle copy)

copy constructor -- copies all the data (deep). graphic items are shallow copies

Definition at line 679 of file ItemHandle.cpp.

Tinkercell::NodeHandle::NodeHandle ( NodeFamily nodeFamily,
NodeGraphicsItem item 
)

constructor using initial family and graphics item

Parameters:
nodeFamily*node family
NodeGraphicsItem*graphics item

Definition at line 635 of file ItemHandle.cpp.

Here is the call graph for this function:

Tinkercell::NodeHandle::NodeHandle ( NodeFamily nodeFamily,
const QString &  name = QString() 
)

constructor using initial family and name

Parameters:
nodeFamily*node family
QStringname

Definition at line 646 of file ItemHandle.cpp.

Here is the call graph for this function:


Member Function Documentation

NodeHandle * Tinkercell::NodeHandle::cast ( ItemHandle item) [static]

checks if the item handle is a node handle and casts it as a node item. Returns 0 if it is not a node item

Parameters:
ItemHandle*item

Definition at line 612 of file ItemHandle.cpp.

Here is the caller graph for this function:

QList< NodeHandle * > Tinkercell::NodeHandle::cast ( const QList< ItemHandle * > &  items) [static]

checks if the item handles are node handles and casts then as node items. Returns QList<NodeHandle*>

Parameters:
ReturnsQList<ItemHandle*> items

Definition at line 619 of file ItemHandle.cpp.

ItemHandle * Tinkercell::NodeHandle::clone ( ) const [virtual]

return a clone of this handle

Returns:
ItemFamily* node handle as item handle

Reimplemented from Tinkercell::ItemHandle.

Definition at line 691 of file ItemHandle.cpp.

Here is the call graph for this function:

QList< ConnectionHandle * > Tinkercell::NodeHandle::connections ( ) const [virtual]

funcion that returns all the connections from all the nodes in this handle

Returns:
QList<ConnectionHandle*> list of connection handles

Definition at line 696 of file ItemHandle.cpp.

Here is the call graph for this function:

ItemFamily * Tinkercell::NodeHandle::family ( ) const [virtual]

get the node family for this handle

Returns:
ItemFamily* node family as item family

Reimplemented from Tinkercell::ItemHandle.

Definition at line 674 of file ItemHandle.cpp.

Here is the caller graph for this function:

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

operator =

Definition at line 684 of file ItemHandle.cpp.

void Tinkercell::NodeHandle::setFamily ( ItemFamily p,
bool  useCommand = true 
) [virtual]

set the node family for this handle

Parameters:
NodeFamily*node family

Reimplemented from Tinkercell::ItemHandle.

Definition at line 652 of file ItemHandle.cpp.

Here is the call graph for this function:


Member Data Documentation

node family for this node handle

Definition at line 259 of file ItemHandle.h.

const int Tinkercell::NodeHandle::TYPE = 1 [static]

this number is used to identify when a handle is a node handle

Definition at line 253 of file ItemHandle.h.


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