File indexing completed on 2024-05-19 09:39:02
0001 /*************************************************************************** 0002 * Copyright (C) 2005 by David Saxton * 0003 * david@bluehaze.org * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 ***************************************************************************/ 0010 0011 #ifndef BUSSPLITTER_H 0012 #define BUSSPLITTER_H 0013 0014 #include <component.h> 0015 0016 #include <QPointer> 0017 // #include <q3valuevector.h> 0018 0019 class Wire; 0020 0021 /** 0022 @author David Saxton 0023 */ 0024 class BusSplitter : public Component 0025 { 0026 public: 0027 BusSplitter(ICNDocument *icnDocument, bool newItem, const char *id = nullptr); 0028 ~BusSplitter() override; 0029 0030 static Item *construct(ItemDocument *itemDocument, bool newItem, const char *id); 0031 static LibraryItem *libraryItem(); 0032 0033 protected: 0034 QString outNodeID(unsigned node) const; 0035 void dataChanged() override; 0036 void drawShape(QPainter &p) override; 0037 0038 unsigned m_busSize; 0039 QVector<QPointer<Wire>> m_pWires; 0040 ECNode *m_pInNode; 0041 }; 0042 0043 #endif