diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
commit | 5de3dd4762ca33a0f92e79ffa4fe2ff67069d531 (patch) | |
tree | bad482b7afa4cdf47422d60a5dd2c61c7e333b09 /src/fpnode.h | |
download | ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.tar.gz ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.zip |
Added KDE3 version of ktechlab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1095338 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/fpnode.h')
-rw-r--r-- | src/fpnode.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/fpnode.h b/src/fpnode.h new file mode 100644 index 0000000..43d1834 --- /dev/null +++ b/src/fpnode.h @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (C) 2003-2005 by David Saxton * + * david@bluehaze.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef FPNODE_H +#define FPNODE_H + +#include "node.h" + + +class FlowPart; +typedef QValueList<FlowPart*> FlowPartList; + +/** +You should use this node for all FlowParts. It ensures that connections between FlowParts are +always valid (eg not more than two outputs from one node, which makes no sense) +@short FlowPart node +@author David Saxton +*/ +class FPNode : public Node +{ +Q_OBJECT +public: + FPNode( ICNDocument *_icnView, Node::node_type type, node_dir dir, const QPoint &pos, QString *id = 0L ); + ~FPNode(); + + /** + * Returns a pointer to the FlowPart attached to this node if this node isInput, or + * to the other end of the connector (if one exists) if it isOutput() + */ + FlowPart *outputFlowPart() const; + /** + * Returns a list of FlowParts attached to the node - either a single-item list containing + * the FlowPart attached to this node if isOutput, or a list of FlowParts connected to the + * input (?) connectors + */ + FlowPartList inputFlowParts() const; + +protected: + virtual void drawShape( QPainter & p ); + +private: + bool m_isInput; +}; + +#endif + |