\r
switch ( ( int ) e->type( ) )\r
{\r
- case QEvent::GraphicsThis->M_SceneMousePress:\r
+ case QEvent::GraphicsSceneMousePress:\r
{\r
switch ( ( int ) me->button( ) )\r
{\r
case Qt::LeftButton:\r
{\r
- QGraphicsItem* item = this->itemAt( me->this->m_ScenePos( ) );\r
+ QGraphicsItem* item = this->itemAt( me->scenePos( ) );\r
if( item && item->type( ) == QNEPort::Type )\r
{\r
this->m_Conn = new QNEConnection( 0, this->m_Scene );\r
this->m_Conn->setPort1( ( QNEPort* ) item );\r
- this->m_Conn->setPos1( item->this->m_ScenePos( ) );\r
- this->m_Conn->setPos2( me->this->m_ScenePos( ) );\r
+ this->m_Conn->setPos1( item->scenePos( ) );\r
+ this->m_Conn->setPos2( me->scenePos( ) );\r
this->m_Conn->updatePath( );\r
\r
return( true );\r
}\r
case Qt::RightButton:\r
{\r
- QGraphicsItem* item = itemAt( me->this->m_ScenePos( ) );\r
+ QGraphicsItem* item = itemAt( me->scenePos( ) );\r
if( item && ( item->type( ) == QNEConnection::Type || item->type( ) == QNEBlock::Type ) )\r
delete item;\r
// if( selBlock == ( QNEBlock* ) item )\r
}\r
}\r
}\r
- case QEvent::GraphicsThis->M_SceneMouseMove:\r
+ case QEvent::GraphicsSceneMouseMove:\r
{\r
if( this->m_Conn )\r
{\r
- this->m_Conn->setPos2( me->this->m_ScenePos( ) );\r
+ this->m_Conn->setPos2( me->scenePos( ) );\r
this->m_Conn->updatePath( );\r
return( true );\r
}\r
break;\r
}\r
- case QEvent::GraphicsThis->M_SceneMouseRelease:\r
+ case QEvent::GraphicsSceneMouseRelease:\r
{\r
if( this->m_Conn && me->button( ) == Qt::LeftButton )\r
{\r
- QGraphicsItem* item = itemAt( me->this->m_ScenePos( ) );\r
+ QGraphicsItem* item = itemAt( me->scenePos( ) );\r
if( item && item->type( ) == QNEPort::Type )\r
{\r
QNEPort* port1 = this->m_Conn->port1( );\r
QNEPort* port2 = ( QNEPort* ) item;\r
\r
- if( port1->block( ) != port2->block( ) && port1->isOutput( ) != port2->isOutput( ) && !port1->isThis->M_Connected( port2 ) )\r
+ if( port1->block( ) != port2->block( ) && port1->isOutput( ) != port2->isOutput( ) && !port1->isConnected( port2 ) )\r
{\r
- this->m_Conn->setPos2( port2->this->m_ScenePos( ) );\r
+ this->m_Conn->setPos2( port2->scenePos( ) );\r
this->m_Conn->setPort2( port2 );\r
this->m_Conn->updatePath( );\r
this->m_Conn = NULL;\r
}\r
break;\r
}\r
- }\r
+ } // hctiws\r
return( this->Superclass::eventFilter( o, e ) );\r
}\r
\r
-// -------------------------------------------------------------------------\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
- } else if( type == QNEConnection::Type )\r
- {\r
- QNEConnection* this->m_Conn = new QNEConnection( 0, this->m_Scene );\r
- this->m_Conn->load( ds, portMap );\r
- }\r
- }\r
-}\r
-\r
// eof - $RCSfile$\r