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 RESISTORDIP_H 00012 #define RESISTORDIP_H 00013 00014 #include "component.h" 00015 00016 const int maxCount = 256; 00017 00021 class ResistorDIP : public Component 00022 { 00023 public: 00024 ResistorDIP( ICNDocument *icnDocument, bool newItem, const char *id = 0 ); 00025 ~ResistorDIP(); 00026 00027 static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id ); 00028 static LibraryItem *libraryItem(); 00029 00030 protected: 00031 virtual void drawShape( QPainter &p ); 00032 void updateDIPNodePositions(); 00033 virtual void dataChanged(); 00037 void initPins(); 00038 00039 int m_resistorCount; 00040 Resistance* m_resistance[maxCount]; 00041 }; 00042 00043 #endif
1.5.1