summaryrefslogtreecommitdiff
path: root/src/hub.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hub.cpp')
-rw-r--r--src/hub.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/hub.cpp b/src/hub.cpp
index 52ca0e9..bdb1026 100644
--- a/src/hub.cpp
+++ b/src/hub.cpp
@@ -17,6 +17,8 @@
#include "hub.h"
#include "diagramobject.h"
#include "diagramdocument.h"
+#include "connector.h"
+#include "line.h"
Hub::Hub(DiagramObject *owner)
: m_owner(owner)
@@ -57,3 +59,16 @@ void
Hub::update()
{
}
+
+QList<Line *>
+Hub::outgoingLines() const
+{
+ QList<Line *> result;
+ foreach (Connector *connector, m_connectors) {
+ Line *line = connector->owner();
+ if (connector == line->connector(0)) {
+ result << line;
+ }
+ }
+ return result;
+}