ecpotentiometer.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003-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 ECPOTENTIOMETER_H
00012 #define ECPOTENTIOMETER_H
00013 
00014 #include "component.h"
00015 
00016 class QSlider;
00017 
00022 class ECPotentiometer : public Component
00023 {
00024 public:
00025         ECPotentiometer( ICNDocument *icnDocument, bool newItem, const char *id = 0 );
00026         ~ECPotentiometer();
00027         
00028         static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
00029         static LibraryItem *libraryItem();
00030         
00031         virtual void sliderValueChanged( const QString &id, int newValue );
00032         
00033 private:
00034         void dataChanged();
00035         virtual void drawShape( QPainter &p );
00036         
00037         ECNode * m_p1;
00038         Resistance *m_r1, *m_r2;
00039         double m_resistance;
00040         double m_sliderProp;
00041         QSlider * m_pSlider;
00042 };
00043 #endif

Generated on Tue May 8 17:05:29 2007 for KTechLab by  doxygen 1.5.1