]> Creatis software - cpPlugins.git/blobdiff - lib/cpPipelineEditor/Connection.cxx
Now it's broken :-(
[cpPlugins.git] / lib / cpPipelineEditor / Connection.cxx
similarity index 51%
rename from appli/cpPipelineEditor/QNEConnection.cxx
rename to lib/cpPipelineEditor/Connection.cxx
index c79bb7ed27e02d6b7c5d1af662d3a7671665ab71..59f66c01af8f4e43a0b806113931e2f368960a83 100644 (file)
@@ -1,39 +1,13 @@
-/* Copyright (c) 2012, STANISLAW ADASZEWSKI\r
-   All rights reserved.\r
-\r
-   Redistribution and use in source and binary forms, with or without\r
-   modification, are permitted provided that the following conditions are met:\r
-   * Redistributions of source code must retain the above copyright\r
-   notice, this list of conditions and the following disclaimer.\r
-   * Redistributions in binary form must reproduce the above copyright\r
-   notice, this list of conditions and the following disclaimer in the\r
-   documentation and/or other materials provided with the distribution.\r
-   * Neither the name of STANISLAW ADASZEWSKI nor the\r
-   names of its contributors may be used to endorse or promote products\r
-   derived from this software without specific prior written permission.\r
-\r
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
-   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
-   DISCLAIMED. IN NO EVENT SHALL STANISLAW ADASZEWSKI BE LIABLE FOR ANY\r
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-#include "QNEConnection.h"\r
-#include "QNEPort.h"\r
+#include "Connection.h"\r
+#include "Port.h"\r
 \r
 #include <QBrush>\r
 #include <QPen>\r
 #include <QGraphicsScene>\r
 \r
 // -------------------------------------------------------------------------\r
-PipelineEditor::QNEConnection::\r
-QNEConnection( QGraphicsItem* parent, QGraphicsScene* scene )\r
+cpPipelineEditor::Connection::\r
+Connection( QGraphicsItem* parent, QGraphicsScene* scene )\r
   : Superclass( parent, scene )\r
 {\r
   this->setPen( QPen( Qt::black, 2 ) );\r
@@ -44,8 +18,8 @@ QNEConnection( QGraphicsItem* parent, QGraphicsScene* scene )
 }\r
 \r
 // -------------------------------------------------------------------------\r
-PipelineEditor::QNEConnection::\r
-~QNEConnection( )\r
+cpPipelineEditor::Connection::\r
+~Connection( )\r
 {\r
   if( this->m_Port1 != NULL )\r
     this->m_Port1->connections( ).\r
@@ -56,22 +30,22 @@ PipelineEditor::QNEConnection::
 }\r
 \r
 // -------------------------------------------------------------------------\r
-void PipelineEditor::QNEConnection::\r
+void cpPipelineEditor::Connection::\r
 setPos1( const QPointF& p )\r
 {\r
   this->m_Pos1 = p;\r
 }\r
 \r
 // -------------------------------------------------------------------------\r
-void PipelineEditor::QNEConnection::\r
+void cpPipelineEditor::Connection::\r
 setPos2( const QPointF& p )\r
 {\r
   this->m_Pos2 = p;\r
 }\r
 \r
 // -------------------------------------------------------------------------\r
-void PipelineEditor::QNEConnection::\r
-setPort1( QNEOutputPort* p )\r
+void cpPipelineEditor::Connection::\r
+setPort1( OutputPort* p )\r
 {\r
   if( p != NULL )\r
   {\r
@@ -82,8 +56,8 @@ setPort1( QNEOutputPort* p )
 }\r
 \r
 // -------------------------------------------------------------------------\r
-void PipelineEditor::QNEConnection::\r
-setPort2( QNEInputPort* p )\r
+void cpPipelineEditor::Connection::\r
+setPort2( InputPort* p )\r
 {\r
   if( p != NULL )\r
   {\r
@@ -98,7 +72,7 @@ setPort2( QNEInputPort* p )
 }\r
 \r
 // -------------------------------------------------------------------------\r
-void PipelineEditor::QNEConnection::\r
+void cpPipelineEditor::Connection::\r
 updatePosFromPorts( )\r
 {\r
   if( this->m_Port1 != NULL )\r
@@ -112,7 +86,7 @@ updatePosFromPorts( )
 }\r
 \r
 // -------------------------------------------------------------------------\r
-void PipelineEditor::QNEConnection::\r
+void cpPipelineEditor::Connection::\r
 updatePath( )\r
 {\r
   QPainterPath p;\r
@@ -128,14 +102,14 @@ updatePath( )
 }\r
 \r
 // -------------------------------------------------------------------------\r
-PipelineEditor::QNEOutputPort* PipelineEditor::QNEConnection::\r
+cpPipelineEditor::OutputPort* cpPipelineEditor::Connection::\r
 port1( ) const\r
 {\r
   return( this->m_Port1 );\r
 }\r
 \r
 // -------------------------------------------------------------------------\r
-PipelineEditor::QNEInputPort* PipelineEditor::QNEConnection::\r
+cpPipelineEditor::InputPort* cpPipelineEditor::Connection::\r
 port2( ) const\r
 {\r
   return( this->m_Port2 );\r