if( this->m_Workspace == ws )
return;
this->m_Workspace = ws;
- QGraphicsScene* scene = this->scene( );
-
- // Create graph
this->m_Graph = TGraph::New( );
+ /* TODO
+ QGraphicsScene* scene = this->scene( );
// Add vertices and keep track of ports
std::map< std::string, std::map< std::string, QNEPort* > >
in_ports, out_ports;
for( ; vIt != vIt_end; ++vIt )
{
this->_createBlock( dynamic_cast< TFilter* >( vIt->second.GetPointer( ) ) );
-#error ACA VOY
- // Add block
- QNEBlock* b = new QNEBlock( 0, scene );
- b->addPort( vIt->second->GetName( ), 0, QNEPort::NamePort );
- b->addPort( vIt->second->GetClassName( ).c_str( ), 0, QNEPort::TypePort );
-
- // Get filter
- if( f == NULL )
- continue;
-
- // Add input ports
- std::set< std::string > inputs;
- f->GetInputsNames( inputs );
- for( auto iIt = inputs.begin( ); iIt != inputs.end( ); ++iIt )
- in_ports[ vIt->first ][ *iIt ] = b->addInputPort( iIt->c_str( ) );
-
- // Add output ports
- std::set< std::string > outputs;
- f->GetOutputsNames( outputs );
- for( auto oIt = outputs.begin( ); oIt != outputs.end( ); ++oIt )
- out_ports[ vIt->first ][ *oIt ] = b->addOutputPort( oIt->c_str( ) );
-
- // Keep a trace of this visual graph
- this->m_Graph->InsertVertex( vIt->first, b );
} // rof
+ */
// Add edges
/* TODO
{
std::string filter = ( *iIt )->text( 0 ).toStdString( );
std::string name = filter;
- if( this->m_Workspace->GetFilter( name ) != NULL )
+ while( this->m_Workspace->HasFilter( name ) )
name += std::string( "_" );
if( this->m_Workspace->CreateFilter( filter, name ) )
- {
- } // fi
+ this->_createBlock( this->m_Workspace->GetFilter( name ) );
} // rof
}