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 ECSUBCIRCUIT_H 00012 #define ECSUBCIRCUIT_H 00013 00014 #include <component.h> 00015 00016 #include <qvaluevector.h> 00017 00022 class ECSubcircuit : public Component 00023 { 00024 Q_OBJECT 00025 public: 00026 ECSubcircuit( ICNDocument *icnDocument, bool newItem, const char *id = 0 ); 00027 ~ECSubcircuit(); 00028 virtual bool canFlip() const { return true; } 00029 00030 static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id ); 00031 static LibraryItem *libraryItem(); 00032 00036 void setNumExtCon( unsigned numExtCon ); 00040 void setExtConName( unsigned numId, const QString & name ); 00044 void doneSCInit(); 00045 00046 public slots: 00047 virtual void removeItem(); 00048 00049 signals: 00053 void subcircuitDeleted(); 00054 00055 protected: 00056 virtual void dataChanged(); 00057 virtual void drawShape( QPainter &p ); 00058 QValueVector<QString> m_conNames; 00059 }; 00060 00061 #endif
1.5.1