diff options
Diffstat (limited to 'src/electronics/components/discretelogic.cpp')
-rw-r--r-- | src/electronics/components/discretelogic.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/electronics/components/discretelogic.cpp b/src/electronics/components/discretelogic.cpp index e2e284e..03f4468 100644 --- a/src/electronics/components/discretelogic.cpp +++ b/src/electronics/components/discretelogic.cpp @@ -16,7 +16,7 @@ #include "simulator.h" #include <klocale.h> -#include <qpainter.h> +#include <tqpainter.h> //BEGIN class Inverter @@ -27,7 +27,7 @@ Item* Inverter::construct( ItemDocument *itemDocument, bool newItem, const char LibraryItem* Inverter::libraryItem() { - QStringList ids; + TQStringList ids; ids << "ec/inverter" << "ec/not"; return new LibraryItem( ids, @@ -67,15 +67,15 @@ void Inverter::inStateChanged( bool newState ) } -void Inverter::drawShape( QPainter &p ) +void Inverter::drawShape( TQPainter &p ) { initPainter(p); int _x = (int)x()-8; int _y = (int)y()-8; - QPointArray pa(3); - pa[0] = QPoint( _x, _y ); - pa[1] = QPoint( _x+width()-6, _y+(height()/2) ); - pa[2] = QPoint( _x, _y+height() ); + TQPointArray pa(3); + pa[0] = TQPoint( _x, _y ); + pa[1] = TQPoint( _x+width()-6, _y+(height()/2) ); + pa[2] = TQPoint( _x, _y+height() ); p.drawPolygon(pa); p.drawPolyline(pa); p.drawEllipse( _x+width()-6, _y+(height()/2)-3, 7, 7 ); @@ -93,7 +93,7 @@ Item* Buffer::construct( ItemDocument *itemDocument, bool newItem, const char *i LibraryItem* Buffer::libraryItem() { return new LibraryItem( - QString::QString("ec/buffer"), + TQString::TQString("ec/buffer"), i18n("Buffer"), i18n("Logic"), "buffer.png", @@ -130,15 +130,15 @@ void Buffer::inStateChanged( bool newState ) } -void Buffer::drawShape( QPainter &p ) +void Buffer::drawShape( TQPainter &p ) { initPainter(p); int _x = (int)x()-8; int _y = (int)y()-8; - QPointArray pa(3); - pa[0] = QPoint( _x, _y ); - pa[1] = QPoint( _x+width(), _y+(height()/2) ); - pa[2] = QPoint( _x, _y+height() ); + TQPointArray pa(3); + pa[0] = TQPoint( _x, _y ); + pa[1] = TQPoint( _x+width(), _y+(height()/2) ); + pa[2] = TQPoint( _x, _y+height() ); p.drawPolygon(pa); p.drawPolyline(pa); deinitPainter(p); @@ -155,7 +155,7 @@ Item* ECLogicInput::construct( ItemDocument *itemDocument, bool newItem, const c LibraryItem* ECLogicInput::libraryItem() { return new LibraryItem( - QString::QString("ec/logic_input"), + TQString::TQString("ec/logic_input"), i18n("Logic Input"), i18n("Logic"), "logic_input.png", @@ -172,7 +172,7 @@ ECLogicInput::ECLogicInput( ICNDocument *icnDocument, bool newItem, const char * setSize( -8, -8, 16, 16 ); b_state = false; - addButton( "button", QRect( -24, -8, 16, 16 ), "", true ); + addButton( "button", TQRect( -24, -8, 16, 16 ), "", true ); createProperty( "useToggle", Variant::Type::Bool ); property("useToggle")->setCaption( i18n("Use Toggle") ); @@ -195,19 +195,19 @@ void ECLogicInput::dataChanged() } -void ECLogicInput::drawShape( QPainter &p ) +void ECLogicInput::drawShape( TQPainter &p ) { initPainter(p); if (b_state) - p.setBrush( QColor( 255, 166, 0 ) ); + p.setBrush( TQColor( 255, 166, 0 ) ); else - p.setBrush( Qt::white ); + p.setBrush( TQt::white ); p.drawEllipse( (int)x()-4, (int)y()-6, 12, 12 ); deinitPainter(p); } -void ECLogicInput::buttonStateChanged( const QString &, bool state ) +void ECLogicInput::buttonStateChanged( const TQString &, bool state ) { b_state = state; m_pOut->setHigh(b_state); @@ -224,7 +224,7 @@ Item* ECLogicOutput::construct( ItemDocument *itemDocument, bool newItem, const LibraryItem* ECLogicOutput::libraryItem() { return new LibraryItem( - QString::QString("ec/logic_output"), + TQString::TQString("ec/logic_output"), i18n("Logic Output"), i18n("Logic"), "logic_output.png", @@ -276,7 +276,7 @@ void ECLogicOutput::inStateChanged( bool newState ) } -void ECLogicOutput::drawShape( QPainter &p ) +void ECLogicOutput::drawShape( TQPainter &p ) { unsigned long long newTime = m_pSimulator->time(); unsigned long long runTime = newTime - m_lastDrawTime; @@ -297,7 +297,7 @@ void ECLogicOutput::drawShape( QPainter &p ) state = m_lastDrawState = double(m_highTime)/double(runTime); initPainter(p); - p.setBrush( QColor( 255, uint(255-state*(255-166)), uint((1-state)*255) ) ); + p.setBrush( TQColor( 255, uint(255-state*(255-166)), uint((1-state)*255) ) ); p.drawEllipse( int(x()-8), int(y()-8), width(), height() ); deinitPainter(p); |