diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
commit | 87a016680e3677da3993f333561e79eb0cead7d5 (patch) | |
tree | cbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/electronics/simulation | |
parent | 6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff) | |
download | ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip |
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/electronics/simulation')
-rw-r--r-- | src/electronics/simulation/capacitance.cpp | 6 | ||||
-rw-r--r-- | src/electronics/simulation/capacitance.h | 2 | ||||
-rw-r--r-- | src/electronics/simulation/circuit.cpp | 12 | ||||
-rw-r--r-- | src/electronics/simulation/circuit.h | 14 | ||||
-rw-r--r-- | src/electronics/simulation/element.cpp | 10 | ||||
-rw-r--r-- | src/electronics/simulation/element.h | 2 | ||||
-rw-r--r-- | src/electronics/simulation/elementset.cpp | 2 | ||||
-rw-r--r-- | src/electronics/simulation/elementset.h | 6 | ||||
-rw-r--r-- | src/electronics/simulation/inductance.cpp | 6 | ||||
-rw-r--r-- | src/electronics/simulation/inductance.h | 2 | ||||
-rw-r--r-- | src/electronics/simulation/logic.h | 6 | ||||
-rw-r--r-- | src/electronics/simulation/reactive.cpp | 6 | ||||
-rw-r--r-- | src/electronics/simulation/reactive.h | 2 |
13 files changed, 38 insertions, 38 deletions
diff --git a/src/electronics/simulation/capacitance.cpp b/src/electronics/simulation/capacitance.cpp index 9087c7f..c289f90 100644 --- a/src/electronics/simulation/capacitance.cpp +++ b/src/electronics/simulation/capacitance.cpp @@ -101,9 +101,9 @@ void Capacitance::time_step() i_eq_old = i_eq_new; } -bool Capacitance::updateStatus() +bool Capacitance::updatetqStatus() { - b_status = Reactive::updateStatus(); + b_status = Reactive::updatetqStatus(); if ( m_method == Capacitance::m_none ) b_status = false; return b_status; } @@ -111,7 +111,7 @@ bool Capacitance::updateStatus() void Capacitance::setMethod( Method m ) { m_method = m; - updateStatus(); + updatetqStatus(); } diff --git a/src/electronics/simulation/capacitance.h b/src/electronics/simulation/capacitance.h index ccc083d..b26899c 100644 --- a/src/electronics/simulation/capacitance.h +++ b/src/electronics/simulation/capacitance.h @@ -42,7 +42,7 @@ public: protected: virtual void updateCurrents(); - virtual bool updateStatus(); + virtual bool updatetqStatus(); private: double m_cap; // Capacitance diff --git a/src/electronics/simulation/circuit.cpp b/src/electronics/simulation/circuit.cpp index c152756..c138a7a 100644 --- a/src/electronics/simulation/circuit.cpp +++ b/src/electronics/simulation/circuit.cpp @@ -50,19 +50,19 @@ Circuit::~Circuit() void Circuit::addPin( Pin *node ) { - if ( m_pinList.contains(node) ) return; + if ( m_pinList.tqcontains(node) ) return; m_pinList.append(node); } void Circuit::addElement( Element *element ) { - if ( m_elementList.contains(element) ) return; + if ( m_elementList.tqcontains(element) ) return; m_elementList.append(element); } -bool Circuit::contains( Pin *node ) +bool Circuit::tqcontains( Pin *node ) { - return m_pinList.contains(node); + return m_pinList.tqcontains(node); } @@ -427,7 +427,7 @@ void Circuit::createMatrixMap() bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *associated, PinList *nodes ) { - if ( !unassignedNodes->contains(node) ) + if ( !unassignedNodes->tqcontains(node) ) return false; unassignedNodes->remove(node); @@ -437,7 +437,7 @@ bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *ass const PinList::const_iterator dEnd = circuitDependentPins.end(); for ( PinList::const_iterator it = circuitDependentPins.begin(); it != dEnd; ++it ) { - if ( !associated->contains(*it) ) + if ( !associated->tqcontains(*it) ) associated->append(*it); } diff --git a/src/electronics/simulation/circuit.h b/src/electronics/simulation/circuit.h index 2455edc..c8c53cd 100644 --- a/src/electronics/simulation/circuit.h +++ b/src/electronics/simulation/circuit.h @@ -11,9 +11,9 @@ #ifndef CIRCUIT_H #define CIRCUIT_H -#include <qguardedptr.h> -#include "qstringlist.h" -#include "qvaluelist.h" +#include <tqguardedptr.h> +#include "tqstringlist.h" +#include "tqvaluelist.h" #include "elementset.h" @@ -23,8 +23,8 @@ class Pin; class Element; class LogicOut; -typedef QValueList<QGuardedPtr<Pin> > PinList; -typedef QValueList<Element*> ElementList; +typedef TQValueList<TQGuardedPtr<Pin> > PinList; +typedef TQValueList<Element*> ElementList; class LogicCacheNode @@ -60,7 +60,7 @@ class Circuit void addPin( Pin *node ); void addElement( Element *element ); - bool contains( Pin *node ); + bool tqcontains( Pin *node ); bool containsNonLinear() const { return m_elementSet->containsNonLinear(); } void init(); @@ -70,7 +70,7 @@ class Circuit */ void initCache(); /** - * Marks all cached results as invalidated and removes them. + * Marks all cached results as tqinvalidated and removes them. */ void setCacheInvalidated(); /** diff --git a/src/electronics/simulation/element.cpp b/src/electronics/simulation/element.cpp index 2411897..46f0442 100644 --- a/src/electronics/simulation/element.cpp +++ b/src/electronics/simulation/element.cpp @@ -55,7 +55,7 @@ void Element::setElementSet( ElementSet *c ) p_eSet = c; p_A = p_eSet->matrix(); p_b = p_eSet->b(); - updateStatus(); + updatetqStatus(); } void Element::componentDeleted() @@ -113,7 +113,7 @@ void Element::setCNodes( const int n0, const int n1, const int n2, const int n3 p_cnode[1] = (n1>-1)?p_eSet->cnodes()[n1]:(n1==-1?p_eSet->ground():0l); p_cnode[2] = (n2>-1)?p_eSet->cnodes()[n2]:(n2==-1?p_eSet->ground():0l); p_cnode[3] = (n3>-1)?p_eSet->cnodes()[n3]:(n3==-1?p_eSet->ground():0l); - updateStatus(); + updatetqStatus(); } void Element::setCBranches( const int b0, const int b1, const int b2, const int b3 ) @@ -128,10 +128,10 @@ void Element::setCBranches( const int b0, const int b1, const int b2, const int p_cbranch[1] = (b1>-1)?p_eSet->cbranches()[b1]:0l; p_cbranch[2] = (b2>-1)?p_eSet->cbranches()[b2]:0l; p_cbranch[3] = (b3>-1)?p_eSet->cbranches()[b3]:0l; - updateStatus(); + updatetqStatus(); } -bool Element::updateStatus() +bool Element::updatetqStatus() { // First, set status to false if all nodes in use are ground b_status = false; @@ -160,7 +160,7 @@ bool Element::updateStatus() resetCurrents(); } // And return the status :-) -// kdDebug() << "Element::updateStatus(): Setting b_status to "<<(b_status?"true":"false")<<" this="<<this<<endl; +// kdDebug() << "Element::updatetqStatus(): Setting b_status to "<<(b_status?"true":"false")<<" this="<<this<<endl; return b_status; } diff --git a/src/electronics/simulation/element.h b/src/electronics/simulation/element.h index e05de46..7b219c9 100644 --- a/src/electronics/simulation/element.h +++ b/src/electronics/simulation/element.h @@ -188,7 +188,7 @@ protected: /** * Update the status, returning b_status */ - virtual bool updateStatus(); + virtual bool updatetqStatus(); /** * Set by child class - the number of branches that the element uses * Typically, this is 0, but could be 1 (e.g. independent voltage source) diff --git a/src/electronics/simulation/elementset.cpp b/src/electronics/simulation/elementset.cpp index 25057c2..8a0adc9 100644 --- a/src/electronics/simulation/elementset.cpp +++ b/src/electronics/simulation/elementset.cpp @@ -87,7 +87,7 @@ void ElementSet::setCacheInvalidated() void ElementSet::addElement( Element *e ) { - if ( !e || m_elementList.contains(e) ) return; + if ( !e || m_elementList.tqcontains(e) ) return; e->setElementSet(this); m_elementList.append(e); if ( e->isNonLinear() ) diff --git a/src/electronics/simulation/elementset.h b/src/electronics/simulation/elementset.h index c7ef7ca..317d8be 100644 --- a/src/electronics/simulation/elementset.h +++ b/src/electronics/simulation/elementset.h @@ -13,7 +13,7 @@ #include <vector> -#include <qvaluelist.h> +#include <tqvaluelist.h> class CBranch; class Circuit; @@ -25,8 +25,8 @@ class Matrix; class NonLinear; class Vector; -typedef QValueList<Element*> ElementList; -typedef QValueList<NonLinear*> NonLinearList; +typedef TQValueList<Element*> ElementList; +typedef TQValueList<NonLinear*> NonLinearList; /** Steps in simulation of a set of elements: diff --git a/src/electronics/simulation/inductance.cpp b/src/electronics/simulation/inductance.cpp index 22c5f9e..6737ab6 100644 --- a/src/electronics/simulation/inductance.cpp +++ b/src/electronics/simulation/inductance.cpp @@ -109,9 +109,9 @@ void Inductance::time_step() } -bool Inductance::updateStatus() +bool Inductance::updatetqStatus() { - b_status = Reactive::updateStatus(); + b_status = Reactive::updatetqStatus(); if ( m_method == Inductance::m_none ) b_status = false; return b_status; @@ -121,6 +121,6 @@ bool Inductance::updateStatus() void Inductance::setMethod( Method m ) { m_method = m; - updateStatus(); + updatetqStatus(); } diff --git a/src/electronics/simulation/inductance.h b/src/electronics/simulation/inductance.h index 46ccb09..e4bd119 100644 --- a/src/electronics/simulation/inductance.h +++ b/src/electronics/simulation/inductance.h @@ -42,7 +42,7 @@ class Inductance : public Reactive protected: virtual void updateCurrents(); - virtual bool updateStatus(); + virtual bool updatetqStatus(); private: double m_inductance; // Inductance diff --git a/src/electronics/simulation/logic.h b/src/electronics/simulation/logic.h index be8374f..40ab498 100644 --- a/src/electronics/simulation/logic.h +++ b/src/electronics/simulation/logic.h @@ -13,14 +13,14 @@ #include "element.h" -#include <qguardedptr.h> -#include <qvaluelist.h> +#include <tqguardedptr.h> +#include <tqvaluelist.h> class Component; class Pin; class Simulator; -typedef QValueList<QGuardedPtr<Pin> > PinList; +typedef TQValueList<TQGuardedPtr<Pin> > PinList; typedef struct { diff --git a/src/electronics/simulation/reactive.cpp b/src/electronics/simulation/reactive.cpp index 83fcfd4..c753f42 100644 --- a/src/electronics/simulation/reactive.cpp +++ b/src/electronics/simulation/reactive.cpp @@ -26,11 +26,11 @@ Reactive::~Reactive() void Reactive::setDelta( double delta ) { m_delta = delta; - updateStatus(); + updatetqStatus(); } -bool Reactive::updateStatus() +bool Reactive::updatetqStatus() { - return Element::updateStatus(); + return Element::updatetqStatus(); } diff --git a/src/electronics/simulation/reactive.h b/src/electronics/simulation/reactive.h index 1142b34..a93459b 100644 --- a/src/electronics/simulation/reactive.h +++ b/src/electronics/simulation/reactive.h @@ -34,7 +34,7 @@ public: virtual void time_step() = 0; protected: - virtual bool updateStatus(); + virtual bool updatetqStatus(); double m_delta; // Delta time interval }; |