1 /* Copyright (c) 2012, STANISLAW ADASZEWSKI
\r
4 Redistribution and use in source and binary forms, with or without
\r
5 modification, are permitted provided that the following conditions are met:
\r
6 * Redistributions of source code must retain the above copyright
\r
7 notice, this list of conditions and the following disclaimer.
\r
8 * Redistributions in binary form must reproduce the above copyright
\r
9 notice, this list of conditions and the following disclaimer in the
\r
10 documentation and/or other materials provided with the distribution.
\r
11 * Neither the name of STANISLAW ADASZEWSKI nor the
\r
12 names of its contributors may be used to endorse or promote products
\r
13 derived from this software without specific prior written permission.
\r
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
\r
16 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
\r
17 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
18 DISCLAIMED. IN NO EVENT SHALL STANISLAW ADASZEWSKI BE LIABLE FOR ANY
\r
19 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
20 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
\r
21 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
\r
22 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
23 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
\r
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
27 #ifndef __PIPELINEEDITOR__QNEBLOCK__H__
\r
28 #define __PIPELINEEDITOR__QNEBLOCK__H__
\r
30 #include <QGraphicsPathItem>
\r
32 namespace PipelineEditor
\r
37 : public QGraphicsPathItem
\r
40 typedef QNEBlock Self;
\r
41 typedef QGraphicsPathItem Superclass;
\r
44 enum { Type = QGraphicsItem::UserType + 3 };
\r
46 QNEBlock( QGraphicsItem* parent = NULL, QGraphicsScene* scene = NULL );
\r
47 virtual ~QNEBlock( );
\r
50 const QString& name, bool isOutput, int flags = 0, int ptr = 0
\r
52 QNEPort* addInputPort( const QString& name );
\r
53 QNEPort* addOutputPort( const QString& name );
\r
54 void addInputPorts( const QStringList& names );
\r
55 void addOutputPorts( const QStringList& names );
\r
58 const QStyleOptionGraphicsItem* option,
\r
62 QVector< QNEPort* > ports( );
\r
65 { return( this->Type ); }
\r
68 QVariant itemChange( GraphicsItemChange change, const QVariant& value );
\r
79 #endif // __PIPELINEEDITOR__QNEBLOCK__H__
\r