|
wiRedPanda
Logic Circuit Simulator
|
Functions | |
| void | addItems (Scene *scene, const QList< QGraphicsItem * > &items) |
| void | deleteItems (Scene *scene, const QList< QGraphicsItem * > &items) |
| void | drainPortConnections (GraphicElement *elm, int fromPort, int toPort, bool isInput, QDataStream &stream, Scene *scene) |
| Saves and deletes connections on ports in range [fromPort, toPort). | |
| Connection * | findConn (Scene *scene, const int id) |
| const QList< GraphicElement * > | findElements (Scene *scene, const QList< int > &ids) |
| GraphicElement * | findElm (Scene *scene, const int id) |
| const QList< QGraphicsItem * > | findItems (Scene *scene, const QList< int > &ids) |
| const QList< QGraphicsItem * > | loadItems (Scene *scene, QByteArray &itemData, const QList< int > &ids, QList< int > &otherIds) |
| const QList< QGraphicsItem * > | loadList (const QList< QGraphicsItem * > &items, QList< int > &ids, QList< int > &otherIds) |
| void | saveItems (Scene *scene, QByteArray &itemData, const QList< QGraphicsItem * > &items, const QList< int > &otherIds) |
| void | storeIds (const QList< QGraphicsItem * > &items, QList< int > &ids) |
| void | storeOtherIds (const QList< QGraphicsItem * > &connections, const QList< int > &ids, QList< int > &otherIds) |
| void CommandUtils::addItems | ( | Scene * | scene, |
| const QList< QGraphicsItem * > & | items ) |
Definition at line 172 of file Commands.cpp.
References Scene::addItem(), and GraphicElement::Type.
Referenced by AddItemsCommand::AddItemsCommand(), and loadItems().
| void CommandUtils::deleteItems | ( | Scene * | scene, |
| const QList< QGraphicsItem * > & | items ) |
Definition at line 220 of file Commands.cpp.
References Scene::removeItem().
Referenced by DeleteItemsCommand::redo(), and AddItemsCommand::undo().
| void CommandUtils::drainPortConnections | ( | GraphicElement * | elm, |
| int | fromPort, | ||
| int | toPort, | ||
| bool | isInput, | ||
| QDataStream & | stream, | ||
| Scene * | scene ) |
Saves and deletes connections on ports in range [fromPort, toPort).
Definition at line 229 of file Commands.cpp.
References Port::connections(), GraphicElement::inputPort(), GraphicElement::outputPort(), and Scene::removeItem().
Referenced by ChangePortSizeCommand::redo().
| Connection * CommandUtils::findConn | ( | Scene * | scene, |
| const int | id ) |
Definition at line 147 of file Commands.cpp.
References Scene::itemById().
Referenced by SplitCommand::redo(), and SplitCommand::undo().
| const QList< GraphicElement * > CommandUtils::findElements | ( | Scene * | scene, |
| const QList< int > & | ids ) |
Definition at line 129 of file Commands.cpp.
References Scene::itemById(), and PANDACEPTION_WITH_CONTEXT.
Referenced by ElementsCommand::elements(), loadItems(), saveItems(), and ChangePortSizeCommand::undo().
| GraphicElement * CommandUtils::findElm | ( | Scene * | scene, |
| const int | id ) |
Definition at line 152 of file Commands.cpp.
References Scene::itemById().
Referenced by SplitCommand::redo(), ToggleTruthTableOutputCommand::redo(), and SplitCommand::undo().
| const QList< QGraphicsItem * > CommandUtils::findItems | ( | Scene * | scene, |
| const QList< int > & | ids ) |
Definition at line 111 of file Commands.cpp.
References Scene::itemById(), and PANDACEPTION_WITH_CONTEXT.
Referenced by DeleteItemsCommand::redo(), and AddItemsCommand::undo().
| const QList< QGraphicsItem * > CommandUtils::loadItems | ( | Scene * | scene, |
| QByteArray & | itemData, | ||
| const QList< int > & | ids, | ||
| QList< int > & | otherIds ) |
Definition at line 185 of file Commands.cpp.
References addItems(), Scene::deserializationContext(), Serialization::deserialize(), findElements(), InMemorySnapshot, PANDACEPTION_WITH_CONTEXT, Serialization::readPandaHeader(), and Scene::updateItemId().
Referenced by AddItemsCommand::redo(), and DeleteItemsCommand::undo().
| const QList< QGraphicsItem * > CommandUtils::loadList | ( | const QList< QGraphicsItem * > & | items, |
| QList< int > & | ids, | ||
| QList< int > & | otherIds ) |
Definition at line 57 of file Commands.cpp.
References storeIds(), storeOtherIds(), Connection::Type, and GraphicElement::Type.
Referenced by AddItemsCommand::AddItemsCommand(), and DeleteItemsCommand::DeleteItemsCommand().
| void CommandUtils::saveItems | ( | Scene * | scene, |
| QByteArray & | itemData, | ||
| const QList< QGraphicsItem * > & | items, | ||
| const QList< int > & | otherIds ) |
Definition at line 157 of file Commands.cpp.
References findElements(), InMemorySnapshot, Serialization::serialize(), and Serialization::writePandaHeader().
Referenced by DeleteItemsCommand::redo(), and AddItemsCommand::undo().
| void CommandUtils::storeIds | ( | const QList< QGraphicsItem * > & | items, |
| QList< int > & | ids ) |
Definition at line 28 of file Commands.cpp.
Referenced by loadList().
| void CommandUtils::storeOtherIds | ( | const QList< QGraphicsItem * > & | connections, |
| const QList< int > & | ids, | ||
| QList< int > & | otherIds ) |
Definition at line 39 of file Commands.cpp.
Referenced by loadList().