1
/***************************************************************************
2
* Copyright (C) 2012 by santiago González *
3
* santigoro@gmail.com *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
18
***************************************************************************/
20
#include "e-resistordip.h"
21
#include "simulator.h"
25
eResistorDip::eResistorDip( QString id )
30
eResistorDip::~eResistorDip(){ }
32
void eResistorDip::setRes( double resist )
34
for( eResistor* res : m_resistor ) res->setRes( resist );
38
/*void eResistorDip::initEpins()
40
m_resistor.resize( m_size );
41
m_ePin.resize( m_size*2 );
43
for( int i=0; i<m_size; i++ )
46
QString reid = m_elmId;
47
reid.append(QString("-resistor"+QString::number(i)));
48
m_resistor[i] = new eResistor( reid );
50
QString pinId = reid+"-ePin"+QString::number(index);
51
ePin* epin = new ePin( pinId, 0 );
52
m_resistor[i]->setEpin( 0, epin );
55
pinId = reid+"-ePin"+QString::number(index+1);
56
epin = new ePin( pinId, 0 );
57
m_resistor[i]->setEpin( 1, epin );
58
m_ePin[index+1] = epin;