-// -------------------------------------------------------------------------\r
-void PipelineEditor::QNodesEditor::\r
-save( QDataStream& ds )\r
-{\r
- foreach( QGraphicsItem* item, this->m_Scene->items( ) )\r
- if( item->type( ) == QNEBlock::Type )\r
- {\r
- ds << item->type( );\r
- ( ( QNEBlock* ) item )->save( ds );\r
- }\r
-\r
- foreach( QGraphicsItem* item, this->m_Scene->items( ) )\r
- if( item->type( ) == QNEConnection::Type )\r
- {\r
- ds << item->type( );\r
- ( ( QNEConnection* ) item )->save( ds );\r
- }\r
-}\r
-\r
-// -------------------------------------------------------------------------\r
-void PipelineEditor::QNodesEditor::\r
-load( QDataStream& ds )\r
-{\r
- this->m_Scene->clear( );\r
-\r
- QMap<quint64, QNEPort*> portMap;\r
-\r
- while ( !ds.atEnd( ) )\r
- {\r
- int type;\r
- ds >> type;\r
- if( type == QNEBlock::Type )\r
- {\r
- QNEBlock* block = new QNEBlock( 0, this->m_Scene );\r
- block->load( ds, portMap );\r
- }\r
- else if( type == QNEConnection::Type )\r
- {\r
- this->m_Conn = new QNEConnection( 0, this->m_Scene );\r
- this->m_Conn->load( ds, portMap );\r
- }\r
- }\r
-}\r
-\r