00001 /*************************************************************************** 00002 * Copyright (C) 2005 by David Saxton * 00003 * david@bluehaze.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 00011 #ifndef BUSSPLITTER_H 00012 #define BUSSPLITTER_H 00013 00014 #include <component.h> 00015 00016 #include <qguardedptr.h> 00017 #include <qvaluevector.h> 00018 00019 class Wire; 00020 00024 class BusSplitter : public Component 00025 { 00026 public: 00027 BusSplitter( ICNDocument *icnDocument, bool newItem, const char *id = 0 ); 00028 ~BusSplitter(); 00029 00030 static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id ); 00031 static LibraryItem *libraryItem(); 00032 00033 virtual bool canFlip() const { return true; } 00034 00035 protected: 00036 QString outNodeID( unsigned node ) const; 00037 virtual void dataChanged(); 00038 virtual void drawShape( QPainter &p ); 00039 00040 unsigned m_busSize; 00041 QValueVector<QGuardedPtr<Wire> > m_pWires; 00042 ECNode * m_pInNode; 00043 }; 00044 00045 #endif
1.5.1