diff options
Diffstat (limited to 'src/circuitdocument.cpp')
-rw-r--r-- | src/circuitdocument.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/circuitdocument.cpp b/src/circuitdocument.cpp index 43f4fca..8948b8d 100644 --- a/src/circuitdocument.cpp +++ b/src/circuitdocument.cpp @@ -29,14 +29,14 @@ #include <kinputdialog.h> #include <klocale.h> #include <kmessagebox.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqregexp.h> +#include <tqtimer.h> -CircuitDocument::CircuitDocument( const QString & caption, KTechlab *ktechlab, const char *name ) +CircuitDocument::CircuitDocument( const TQString & caption, KTechlab *ktechlab, const char *name ) : ICNDocument( caption, ktechlab, name ) { - m_pOrientationAction = new KActionMenu( i18n("Orientation"), "rotate", this ); + m_pOrientationAction = new KActionMenu( i18n("Qt::Orientation"), "rotate", this ); m_type = Document::dt_circuit; m_pDocumentIface = new CircuitDocumentIface(this); @@ -49,11 +49,11 @@ CircuitDocument::CircuitDocument( const QString & caption, KTechlab *ktechlab, c m_cmManager->addManipulatorInfo( CMItemResize::manipulatorInfo() ); m_cmManager->addManipulatorInfo( CMItemDrag::manipulatorInfo() ); - connect( this, SIGNAL(connectorAdded(Connector*)), this, SLOT(requestAssignCircuits()) ); - connect( this, SIGNAL(connectorAdded(Connector*)), this, SLOT(connectorAdded(Connector*)) ); + connect( this, TQT_SIGNAL(connectorAdded(Connector*)), this, TQT_SLOT(requestAssignCircuits()) ); + connect( this, TQT_SIGNAL(connectorAdded(Connector*)), this, TQT_SLOT(connectorAdded(Connector*)) ); - m_updateCircuitsTmr = new QTimer(); - connect( m_updateCircuitsTmr, SIGNAL(timeout()), this, SLOT(assignCircuits()) ); + m_updateCircuitsTmr = new TQTimer(); + connect( m_updateCircuitsTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(assignCircuits()) ); requestStateSave(); } @@ -194,7 +194,7 @@ void CircuitDocument::update() } -void CircuitDocument::fillContextMenu( const QPoint &pos ) +void CircuitDocument::fillContextMenu( const TQPoint &pos ) { ICNDocument::fillContextMenu(pos); @@ -224,7 +224,7 @@ void CircuitDocument::fillContextMenu( const QPoint &pos ) m_pOrientationAction->insert( orientation_actions[i] ); } - QPtrList<KAction> orientation_actionlist; + TQPtrList<KAction> orientation_actionlist; // orientation_actionlist.prepend( new KActionSeparator() ); orientation_actionlist.append( m_pOrientationAction ); p_ktechlab->plugActionList( "orientation_actionlist", orientation_actionlist ); @@ -232,7 +232,7 @@ void CircuitDocument::fillContextMenu( const QPoint &pos ) if(m_selectList->count() > 1 && countExtCon(m_selectList->items()) > 0) { - QPtrList<KAction> component_actionlist; + TQPtrList<KAction> component_actionlist; // component_actionlist.append( new KActionSeparator() ); component_actionlist.append( activeCircuitView->action("circuit_create_subcircuit") ); p_ktechlab->plugActionList( "component_actionlist", component_actionlist ); @@ -267,8 +267,8 @@ void CircuitDocument::connectorAdded( Connector * connector ) { if (connector) { - connect( connector, SIGNAL(numWiresChanged(unsigned )), this, SLOT(requestAssignCircuits()) ); - connect( connector, SIGNAL(removed(Connector*)), this, SLOT(requestAssignCircuits()) ); + connect( connector, TQT_SIGNAL(numWiresChanged(unsigned )), this, TQT_SLOT(requestAssignCircuits()) ); + connect( connector, TQT_SIGNAL(removed(Connector*)), this, TQT_SLOT(requestAssignCircuits()) ); } } @@ -288,14 +288,14 @@ void CircuitDocument::componentAdded( Item * item ) requestAssignCircuits(); - connect( component, SIGNAL(elementCreated(Element*)), this, SLOT(requestAssignCircuits()) ); - connect( component, SIGNAL(elementDestroyed(Element*)), this, SLOT(requestAssignCircuits()) ); - connect( component, SIGNAL(removed(Item*)), this, SLOT(componentRemoved(Item*)) ); + connect( component, TQT_SIGNAL(elementCreated(Element*)), this, TQT_SLOT(requestAssignCircuits()) ); + connect( component, TQT_SIGNAL(elementDestroyed(Element*)), this, TQT_SLOT(requestAssignCircuits()) ); + connect( component, TQT_SIGNAL(removed(Item*)), this, TQT_SLOT(componentRemoved(Item*)) ); // We don't attach the component to the Simulator just yet, as the // Component's vtable is not yet fully constructed, and so Simulator can't // tell whether or not it is a logic component - if ( !m_toSimulateList.contains(component) ) + if ( !m_toSimulateList.tqcontains(component) ) m_toSimulateList << component; } @@ -330,7 +330,7 @@ void CircuitDocument::calculateConnectorCurrents() n->resetCurrent(); n->setSwitchCurrentsUnknown(); - if ( !n->parentECNode()->isChildNode() ) + if ( !n->tqparentECNode()->isChildNode() ) { n->setCurrentKnown( true ); // (and it has a current of 0 amps) @@ -343,7 +343,7 @@ void CircuitDocument::calculateConnectorCurrents() else { // Child node that is non ground - n->setCurrentKnown( n->parentECNode()->numPins() < 2 ); + n->setCurrentKnown( n->tqparentECNode()->numPins() < 2 ); } } } @@ -446,7 +446,7 @@ void CircuitDocument::assignCircuits() - typedef QValueList<PinList> PinListList; + typedef TQValueList<PinList> PinListList; // Stage 1: Partition the circuit up into dependent areas (bar splitting // at ground pins) @@ -512,7 +512,7 @@ void CircuitDocument::getPartition( Pin *pin, PinList *pinList, PinList *unassig unassignedPins->remove(pin); - if ( pinList->contains(pin) ) + if ( pinList->tqcontains(pin) ) return; pinList->append(pin); @@ -540,7 +540,7 @@ void CircuitDocument::splitIntoCircuits( PinList *pinList ) { // First: identify ground PinList unassignedPins = *pinList; - typedef QValueList<PinList> PinListList; + typedef TQValueList<PinList> PinListList; PinListList pinListList; while ( !unassignedPins.isEmpty() ) { @@ -608,7 +608,7 @@ void CircuitDocument::recursivePinAdd( Pin *pin, Circuitoid *circuitoid, PinList if ( pin->eqId() != -1 ) unassignedPins->remove(pin); - if ( circuitoid->contains(pin) ) + if ( circuitoid->tqcontains(pin) ) return; circuitoid->addPin(pin); @@ -764,7 +764,7 @@ void CircuitDocument::createSubcircuit() } bool ok; - const QString name = KInputDialog::getText( "Subcircuit", "Name", QString::null, &ok, activeView() ); + const TQString name = KInputDialog::getText( "Subcircuit", "Name", TQString(), &ok, activeView() ); if (!ok) return; @@ -791,7 +791,7 @@ int CircuitDocument::countExtCon( const ItemList &itemList ) const } -bool CircuitDocument::isValidItem( const QString &itemId ) +bool CircuitDocument::isValidItem( const TQString &itemId ) { return itemId.startsWith("ec/") || itemId.startsWith("dp/") || itemId.startsWith("sc/"); } |