File indexing completed on 2024-05-19 09:39:04
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 ECMOSFET_H 0012 #define ECMOSFET_H 0013 0014 #include "component.h" 0015 0016 class MOSFET; 0017 0018 /** 0019 @short Simulates a MOSFET 0020 @author David Saxton 0021 */ 0022 class ECMOSFET : public Component 0023 { 0024 public: 0025 ECMOSFET(int MOSFET_type, ICNDocument *icnDocument, bool newItem, const char *id = nullptr); 0026 ~ECMOSFET() override; 0027 0028 static Item *constructNEM(ItemDocument *itemDocument, bool newItem, const char *id); 0029 static Item *constructPEM(ItemDocument *itemDocument, bool newItem, const char *id); 0030 // static Item * constructNDM( ItemDocument * itemDocument, bool newItem, const char * id ); 0031 // static Item * constructPDM( ItemDocument * itemDocument, bool newItem, const char * id ); 0032 static LibraryItem *libraryItemNEM(); 0033 static LibraryItem *libraryItemPEM(); 0034 // static LibraryItem * libraryItemNDM(); 0035 // static LibraryItem * libraryItemPDM(); 0036 0037 protected: 0038 void dataChanged() override; 0039 void drawShape(QPainter &p) override; 0040 0041 bool m_bHaveBodyPin; 0042 int m_MOSFET_type; 0043 MOSFET *m_pMOSFET; 0044 }; 0045 #endif