1 /******************************************************************* 2 3 Part of the Fritzing project - http://fritzing.org 4 Copyright (c) 2007-2014 Fachhochschule Potsdam - http://fh-potsdam.de 5 6 Fritzing is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Fritzing is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Fritzing. If not, see <http://www.gnu.org/licenses/>. 18 19 ******************************************************************** 20 21 $Revision: 6955 $: 22 $Author: irascibl@gmail.com $: 23 $Date: 2013-04-06 23:14:37 +0200 (Sa, 06. Apr 2013) $ 24 25 ********************************************************************/ 26 27 #ifndef BUS_H 28 #define BUS_H 29 30 #include <QString> 31 #include <QDomElement> 32 #include <QHash> 33 #include <QList> 34 #include <QXmlStreamWriter> 35 #include <QGraphicsScene> 36 #include <QPointer> 37 38 class Bus : public QObject 39 { 40 Q_OBJECT 41 42 public: 43 Bus(class BusShared *, class ModelPart *); 44 45 const QString & id() const; 46 void addConnector(class Connector *); 47 class ModelPart * modelPart(); 48 const QList<Connector *> & connectors() const; 49 Connector * subConnector() const; 50 void addSubConnector(Connector *); 51 52 protected: 53 QList<class Connector *> m_connectors; 54 class Connector * m_subConnector; 55 BusShared * m_busShared; 56 QPointer<class ModelPart> m_modelPart; 57 }; 58 59 60 #endif 61