File indexing completed on 2024-05-05 05:46:03

0001 /***************************************************************************
0002  *   Copyright (C) 2003 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 CAPACITOR_H
0012 #define CAPACITOR_H
0013 
0014 #include "component.h"
0015 
0016 class Capacitance;
0017 class ECNode;
0018 
0019 /**
0020 @short Capacitor
0021 Simple capacitor
0022 @author David Saxton
0023 */
0024 class Capacitor : public Component
0025 {
0026 public:
0027     Capacitor(ICNDocument *icnDocument, bool newItem, const char *id = nullptr);
0028     ~Capacitor() override;
0029 
0030     static Item *construct(ItemDocument *itemDocument, bool newItem, const char *id);
0031     static LibraryItem *libraryItem();
0032 
0033 private:
0034     void dataChanged() override;
0035     void drawShape(QPainter &p) override;
0036 
0037     Capacitance *m_capacitance;
0038 };
0039 
0040 #endif