![]() |
TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
|
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>
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 constructor -- copies all the data (deep). graphic items are shallow copies | |
virtual NodeHandle & | operator= (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 ItemHandle * | clone () const |
return a clone of this handle | |
virtual ItemFamily * | family () 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 NodeHandle * | cast (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 | |
NodeFamily * | nodeFamily |
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 |
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.
Tinkercell::NodeHandle::NodeHandle | ( | const QString & | name = QString() , |
NodeFamily * | nodeFamily = 0 |
||
) |
default constructor -- initialize everything
Definition at line 629 of file ItemHandle.cpp.
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
nodeFamily* | node family |
NodeGraphicsItem* | graphics item |
Definition at line 635 of file ItemHandle.cpp.
Tinkercell::NodeHandle::NodeHandle | ( | NodeFamily * | nodeFamily, |
const QString & | name = QString() |
||
) |
constructor using initial family and name
nodeFamily* | node family |
QString | name |
Definition at line 646 of file ItemHandle.cpp.
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
ItemHandle* | item |
Definition at line 612 of file ItemHandle.cpp.
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*>
Returns | QList<ItemHandle*> items |
Definition at line 619 of file ItemHandle.cpp.
ItemHandle * Tinkercell::NodeHandle::clone | ( | ) | const [virtual] |
return a clone of this handle
Reimplemented from Tinkercell::ItemHandle.
Definition at line 691 of file ItemHandle.cpp.
QList< ConnectionHandle * > Tinkercell::NodeHandle::connections | ( | ) | const [virtual] |
funcion that returns all the connections from all the nodes in this handle
Definition at line 696 of file ItemHandle.cpp.
ItemFamily * Tinkercell::NodeHandle::family | ( | ) | const [virtual] |
get the node family for this handle
Reimplemented from Tinkercell::ItemHandle.
Definition at line 674 of file ItemHandle.cpp.
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
NodeFamily* | node family |
Reimplemented from Tinkercell::ItemHandle.
Definition at line 652 of file ItemHandle.cpp.
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.