#include <cnitemgroup.h>
Inheritance diagram for CNItemGroup:


Public Slots | |
| void | slotSetOrientation0 () |
| void | slotSetOrientation90 () |
| void | slotSetOrientation180 () |
| void | slotSetOrientation270 () |
| void | slotRotateCW () |
| void | slotRotateCCW () |
| void | slotFlip () |
Signals | |
| void | connectorAdded (Connector *con) |
| void | connectorRemoved (Connector *con) |
| void | nodeAdded (Node *node) |
| void | nodeRemoved (Node *node) |
Public Member Functions | |
| CNItemGroup (ICNDocument *icnDocument, const char *name=0) | |
| ~CNItemGroup () | |
| bool | addItem (Item *item) |
| bool | addNode (Node *node) |
| bool | addConnector (Connector *con) |
| virtual bool | addQCanvasItem (QCanvasItem *qcanvasItem) |
| virtual void | setItems (QCanvasItemList list) |
| void | removeItem (Item *item) |
| void | removeNode (Node *node) |
| void | removeConnector (Connector *con) |
| virtual void | removeQCanvasItem (QCanvasItem *qcanvasItem) |
| virtual bool | contains (QCanvasItem *qcanvasItem) const |
| uint | nodeCount () const |
| uint | connectorCount () const |
| uint | count () const |
| virtual void | setSelected (bool sel) |
| void | setOrientationAngle (int angleDegrees) |
| void | setOrientationFlipped (bool flipped) |
| void | setFlowPartOrientation (unsigned orientation) |
| void | setComponentOrientation (int angleDegrees, bool flipped) |
| virtual void | mergeGroup (ItemGroup *group) |
| virtual void | removeAllItems () |
| virtual void | deleteAllItems () |
| NodeList | nodes (bool excludeParented=true) const |
| ConnectorList | connectors (bool excludeParented=true) const |
| QStringList | itemIDs () |
| bool | canRotate () const |
| bool | canFlip () const |
Protected Member Functions | |
| void | updateInfo () |
| void | getActiveItem () |
| void | setActiveItem (Item *item) |
Definition at line 37 of file cnitemgroup.h.
| bool CNItemGroup::addItem | ( | Item * | item | ) |
Adds a CNItem to the group, if it is not already in it, or other items at a lower levels are already in the group. If there are items are a high level, those items are removed first. Returns false on failure to add.
Definition at line 32 of file cnitemgroup.cpp.
References Item::isMovable(), Item::level(), ItemGroup::m_itemList, ItemGroup::registerItem(), removeAllItems(), setActiveItem(), Item::setSelected(), and updateInfo().
Referenced by addQCanvasItem(), and mergeGroup().
| bool CNItemGroup::addNode | ( | Node * | node | ) |
Adds a Node to the group, if it is not already in it. Note: This node will *NOT* be added if it is a child node, and the function will return false. If the node is not already present, and is added, then this will return true.
Definition at line 57 of file cnitemgroup.cpp.
References Node::isChildNode(), and updateInfo().
Referenced by addQCanvasItem(), and mergeGroup().
| bool CNItemGroup::addConnector | ( | Connector * | con | ) |
Adds a Connector to the group, if it is not already in it (if it is, returns false)
Definition at line 68 of file cnitemgroup.cpp.
References updateInfo().
Referenced by addQCanvasItem(), and mergeGroup().
| bool CNItemGroup::addQCanvasItem | ( | QCanvasItem * | qcanvasItem | ) | [virtual] |
If the item is a a CNItem, Node or Connector, returns the status for that particular add function, else returns false
Implements ItemGroup.
Definition at line 79 of file cnitemgroup.cpp.
References addConnector(), addItem(), addNode(), and ConnectorLine::parent().
Referenced by setItems().
| void CNItemGroup::setItems | ( | QCanvasItemList | list | ) | [virtual] |
Sets the contained items to those in this list
Implements ItemGroup.
Definition at line 102 of file cnitemgroup.cpp.
References addQCanvasItem(), ItemGroup::m_itemList, removeConnector(), removeItem(), and removeNode().
| void CNItemGroup::removeItem | ( | Item * | item | ) |
Removes the CNItem from the group
Definition at line 176 of file cnitemgroup.cpp.
References getActiveItem(), ItemGroup::m_activeItem, ItemGroup::m_itemList, ItemGroup::unregisterItem(), and updateInfo().
Referenced by removeAllItems(), removeQCanvasItem(), and setItems().
| void CNItemGroup::removeNode | ( | Node * | node | ) |
Removes the Node from the group
Definition at line 188 of file cnitemgroup.cpp.
References updateInfo().
Referenced by removeAllItems(), removeQCanvasItem(), and setItems().
| void CNItemGroup::removeConnector | ( | Connector * | con | ) |
Removes the Connector from the group
Definition at line 198 of file cnitemgroup.cpp.
References updateInfo().
Referenced by removeAllItems(), removeQCanvasItem(), and setItems().
| void CNItemGroup::removeQCanvasItem | ( | QCanvasItem * | qcanvasItem | ) | [virtual] |
If the item is a a CNItem, Node or Connector, then attempts to remove it
Implements ItemGroup.
Definition at line 207 of file cnitemgroup.cpp.
References ConnectorLine::parent(), removeConnector(), removeItem(), and removeNode().
Referenced by PinMapDocument::deleteSelection(), and ICNDocument::flushDeleteList().
| bool CNItemGroup::contains | ( | QCanvasItem * | qcanvasItem | ) | const [virtual] |
Returns true if the QCanvasItem passed is contained in the group
Implements ItemGroup.
Definition at line 281 of file cnitemgroup.cpp.
References ItemGroup::m_itemList.
Referenced by ICNDocument::flowContainer().
| uint CNItemGroup::nodeCount | ( | ) | const [inline] |
Returns the number of Nodes in the CanvasGroup
Definition at line 92 of file cnitemgroup.h.
| uint CNItemGroup::connectorCount | ( | ) | const [inline] |
Returns the number of Connectors in the CanvasGroup
Definition at line 96 of file cnitemgroup.h.
| uint CNItemGroup::count | ( | ) | const [inline, virtual] |
Returns the total number of items in the group (CNItems, Nodes, Connectors)
Implements ItemGroup.
Definition at line 101 of file cnitemgroup.h.
References ItemGroup::itemCount().
Referenced by CircuitDocument::fillContextMenu(), and CircuitDocument::slotInitItemActions().
| void CNItemGroup::setSelected | ( | bool | sel | ) | [virtual] |
Sets the selected state of all items in the group
Implements ItemGroup.
Definition at line 308 of file cnitemgroup.cpp.
References ItemGroup::m_itemList.
| void CNItemGroup::setOrientationAngle | ( | int | angleDegrees | ) |
Sets the orientation (degrees component) of all items in the group
Definition at line 402 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, and ItemDocument::requestStateSave().
Referenced by slotSetOrientation0(), slotSetOrientation180(), slotSetOrientation270(), and slotSetOrientation90().
| void CNItemGroup::setOrientationFlipped | ( | bool | flipped | ) |
Sets the orientation (flipped component) of all items in the group
| void CNItemGroup::setFlowPartOrientation | ( | unsigned | orientation | ) |
Sets the orientation of all flowparts in the group
Definition at line 447 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, and ItemDocument::requestStateSave().
Referenced by ItemInterface::setFlowPartOrientation().
| void CNItemGroup::setComponentOrientation | ( | int | angleDegrees, | |
| bool | flipped | |||
| ) |
Sets the orientation (degrees and flipped) of all components in the group
Definition at line 421 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, and ItemDocument::requestStateSave().
Referenced by ItemInterface::setComponentOrientation().
| void CNItemGroup::mergeGroup | ( | ItemGroup * | group | ) | [virtual] |
Merges all items in the given group with this group
Implements ItemGroup.
Definition at line 459 of file cnitemgroup.cpp.
References addConnector(), addItem(), addNode(), connectors(), ItemGroup::items(), and nodes().
| void CNItemGroup::removeAllItems | ( | ) | [virtual] |
Removes all items from this group (doesn't delete them)
| unselect | whether to unselect the items or not. This will be done after removal from group |
Implements ItemGroup.
Definition at line 485 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, removeConnector(), removeItem(), and removeNode().
Referenced by addItem(), and deleteAllItems().
| void CNItemGroup::deleteAllItems | ( | ) | [virtual] |
Attempts to delete everything in the group. Note: You *must* call ICNDocument::flushDeleteList() after calling this function, as this function only tells the items to remove themselves
Implements ItemGroup.
Definition at line 497 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, and removeAllItems().
Referenced by ICNDocument::deleteSelection().
| NodeList CNItemGroup::nodes | ( | bool | excludeParented = true |
) | const |
Returns a list of all the Nodes in the group.
| excludeParented | if false, then nodes that are fully contained within item children will also be returned. |
Definition at line 227 of file cnitemgroup.cpp.
References ICNDocument::getTranslatable(), and ItemGroup::items().
Referenced by mergeGroup().
| ConnectorList CNItemGroup::connectors | ( | bool | excludeParented = true |
) | const |
Returns a list of all the Connectors in the group.
| excludeParented | if false, then connectors that are fully contained within item children will also be returned. |
Definition at line 249 of file cnitemgroup.cpp.
References ICNDocument::getTranslatable(), and ItemGroup::items().
Referenced by ICNDocument::copy(), and mergeGroup().
| QStringList CNItemGroup::itemIDs | ( | ) |
Returns a list of the ids of all the CNItems in the group.
Definition at line 540 of file cnitemgroup.cpp.
References ItemGroup::m_itemList.
| bool CNItemGroup::canRotate | ( | ) | const |
Returns true if at least some of the CNItems in this group can be rotated. Returns false if no items present.
Definition at line 332 of file cnitemgroup.cpp.
References ItemGroup::m_itemList.
Referenced by ItemInterface::updateItemActions().
| bool CNItemGroup::canFlip | ( | ) | const |
Returns true if at least some of the CNItems in this group can be flipped. Returns false if no items present.
Definition at line 344 of file cnitemgroup.cpp.
References ItemGroup::m_itemList.
Referenced by ItemInterface::updateItemActions().
| void CNItemGroup::slotSetOrientation0 | ( | ) | [inline, slot] |
Sets the orientation of all selected items to 0 degrees.
Definition at line 168 of file cnitemgroup.h.
References setOrientationAngle().
Referenced by CircuitDocument::setOrientation0().
| void CNItemGroup::slotSetOrientation90 | ( | ) | [inline, slot] |
Sets the orientation of all selected items to 90 degrees.
Definition at line 172 of file cnitemgroup.h.
References setOrientationAngle().
Referenced by CircuitDocument::setOrientation90().
| void CNItemGroup::slotSetOrientation180 | ( | ) | [inline, slot] |
Sets the orientation of all selected items to 180 degrees.
Definition at line 176 of file cnitemgroup.h.
References setOrientationAngle().
Referenced by CircuitDocument::setOrientation180().
| void CNItemGroup::slotSetOrientation270 | ( | ) | [inline, slot] |
Sets the orientation of all selected items to 270 (actually -90) degrees.
Definition at line 180 of file cnitemgroup.h.
References setOrientationAngle().
Referenced by CircuitDocument::setOrientation270().
| void CNItemGroup::slotRotateCW | ( | ) | [slot] |
Rotates all CNItems in the group clockwise
Definition at line 356 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, and ItemDocument::requestStateSave().
Referenced by CircuitDocument::rotateClockwise().
| void CNItemGroup::slotRotateCCW | ( | ) | [slot] |
Rotates all CNItems in the group counter-clockwise
Definition at line 371 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, and ItemDocument::requestStateSave().
Referenced by CircuitDocument::rotateCounterClockwise().
| void CNItemGroup::slotFlip | ( | ) | [slot] |
Flips all CNItems in the group
Definition at line 386 of file cnitemgroup.cpp.
References ItemGroup::m_itemList, and ItemDocument::requestStateSave().
Referenced by CircuitDocument::itemFlip().
1.5.1