diff options
Diffstat (limited to 'src/electronics/components/serialportcomponent.cpp')
-rw-r--r-- | src/electronics/components/serialportcomponent.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/electronics/components/serialportcomponent.cpp b/src/electronics/components/serialportcomponent.cpp index c8e6a4e..6e6bfed 100644 --- a/src/electronics/components/serialportcomponent.cpp +++ b/src/electronics/components/serialportcomponent.cpp @@ -19,7 +19,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qpainter.h> +#include <tqpainter.h> #include <cmath> #include <termios.h> @@ -58,11 +58,11 @@ SerialPortComponent::SerialPortComponent( ICNDocument *icnDocument, bool newItem "<li><b>RI</b> - Ring Indicator (control; output)</li>" "</ul>"); - QPointArray pa( 4 ); - pa[0] = QPoint( -32, -48 ); - pa[1] = QPoint( 32, -40 ); - pa[2] = QPoint( 32, 40 ); - pa[3] = QPoint( -32, 48 ); + TQPointArray pa( 4 ); + pa[0] = TQPoint( -32, -48 ); + pa[1] = TQPoint( 32, -40 ); + pa[2] = TQPoint( 32, 40 ); + pa[3] = TQPoint( -32, 48 ); setItemPoints( pa ); @@ -72,51 +72,51 @@ SerialPortComponent::SerialPortComponent( ICNDocument *icnDocument, bool newItem // Works pin = createPin( -40, 32, 0, "CD" ); - addDisplayText( "CD", QRect( -28, 24, 28, 16 ), "CD", true, Qt::AlignLeft | Qt::AlignVCenter ); + addDisplayText( "CD", TQRect( -28, 24, 28, 16 ), "CD", true, TQt::AlignLeft | TQt::AlignVCenter ); m_pCD = createLogicOut( pin, false ); // Doesn't work // pin = createPin( -40, 16, 0, "RD" ); - addDisplayText( "RD", QRect( -28, 8, 28, 16 ), "RD", true, Qt::AlignLeft | Qt::AlignVCenter ); + addDisplayText( "RD", TQRect( -28, 8, 28, 16 ), "RD", true, TQt::AlignLeft | TQt::AlignVCenter ); // m_pRD = createLogicOut( pin, false ); // Works pin = createPin( -40, 0, 0, "TD" ); - addDisplayText( "TD", QRect( -28, -8, 28, 16 ), "TD", true, Qt::AlignLeft | Qt::AlignVCenter ); + addDisplayText( "TD", TQRect( -28, -8, 28, 16 ), "TD", true, TQt::AlignLeft | TQt::AlignVCenter ); m_pTD = createLogicIn( pin); m_pTD->setCallback( this, (CallbackPtr)(&SerialPortComponent::tdCallback) ); // Works pin = createPin( -40, -16, 0, "DTR" ); - addDisplayText( "DTR", QRect( -28, -24, 28, 16 ), "DTR", true, Qt::AlignLeft | Qt::AlignVCenter ); + addDisplayText( "DTR", TQRect( -28, -24, 28, 16 ), "DTR", true, TQt::AlignLeft | TQt::AlignVCenter ); m_pDTR = createLogicIn( pin ); m_pDTR->setCallback( this, (CallbackPtr)(&SerialPortComponent::dtrCallback) ); // N/A pin = createPin( -40, -32, 0, "GND" ); - addDisplayText( "GND", QRect( -28, -40, 28, 16 ), "GND", true, Qt::AlignLeft | Qt::AlignVCenter ); + addDisplayText( "GND", TQRect( -28, -40, 28, 16 ), "GND", true, TQt::AlignLeft | TQt::AlignVCenter ); pin->pin()->setGroundType( Pin::gt_always ); // Doesn't work // pin = createPin( 40, 24, 180, "DSR" ); - addDisplayText( "DSR", QRect( 0, 16, 28, 16 ), "DSR", true, Qt::AlignRight | Qt::AlignVCenter ); + addDisplayText( "DSR", TQRect( 0, 16, 28, 16 ), "DSR", true, TQt::AlignRight | TQt::AlignVCenter ); // m_pDSR = createLogicIn( pin ); // m_pDSR->setCallback( this, (CallbackPtr)(&SerialPortComponent::dsrCallback) ); // Doesn't work // pin = createPin( 40, 8, 180, "RTS" ); - addDisplayText( "RTS", QRect( 0, 0, 28, 16 ), "RTS", true, Qt::AlignRight | Qt::AlignVCenter ); + addDisplayText( "RTS", TQRect( 0, 0, 28, 16 ), "RTS", true, TQt::AlignRight | TQt::AlignVCenter ); // m_pRTS = createLogicIn( pin ); // m_pRTS->setCallback( this, (CallbackPtr)(&SerialPortComponent::rtsCallback) ); // Works pin = createPin( 40, -8, 180, "CTS" ); - addDisplayText( "CTS", QRect( 0, -16, 28, 16 ), "CTS", true, Qt::AlignRight | Qt::AlignVCenter ); + addDisplayText( "CTS", TQRect( 0, -16, 28, 16 ), "CTS", true, TQt::AlignRight | TQt::AlignVCenter ); m_pCTS = createLogicOut( pin, false ); // Works pin = createPin( 40, -24, 180, "RI" ); - addDisplayText( "RI", QRect( 0, -32, 28, 16 ), "RI", true, Qt::AlignRight | Qt::AlignVCenter ); + addDisplayText( "RI", TQRect( 0, -32, 28, 16 ), "RI", true, TQt::AlignRight | TQt::AlignVCenter ); m_pRI = createLogicOut( pin, false ); Variant * v = createProperty( "port", Variant::Type::Combo ); @@ -124,7 +124,7 @@ SerialPortComponent::SerialPortComponent( ICNDocument *icnDocument, bool newItem v->setCaption( i18n("Port") ); // v = createProperty( "baudRate", Variant::Type::Select ); -// v->setAllowed( QStringList::split( ",", "B0,B50,B75,B110,B134,B150,B200,B300,B600,B1200,B1800,B2400,B4800,B9600,B19200,B38400" ) ); +// v->setAllowed( TQStringList::split( ",", "B0,B50,B75,B110,B134,B150,B200,B300,B600,B1200,B1800,B2400,B4800,B9600,B19200,B38400" ) ); // v->setCaption( i18n("Baud rate") ); // v->setValue("B9600"); } @@ -139,7 +139,7 @@ SerialPortComponent::~SerialPortComponent() void SerialPortComponent::dataChanged() { #if 0 - QString baudString = dataString("baudRate"); + TQString baudString = dataString("baudRate"); unsigned baudRate = 0; if ( baudString == "B0" ) @@ -187,7 +187,7 @@ void SerialPortComponent::dataChanged() } -void SerialPortComponent::initPort( const QString & port, unsigned baudRate ) +void SerialPortComponent::initPort( const TQString & port, unsigned baudRate ) { if ( port.isEmpty() ) { @@ -197,7 +197,7 @@ void SerialPortComponent::initPort( const QString & port, unsigned baudRate ) if ( ! m_pSerialPort->openPort( port, baudRate ) ) { - p_itemDocument->canvas()->setMessage( i18n("Could not open port %1").arg( port ) ); + p_itemDocument->canvas()->setMessage( i18n("Could not open port %1").tqarg( port ) ); return; } } @@ -236,7 +236,7 @@ void SerialPortComponent::rtsCallback( bool isHigh ) } -void SerialPortComponent::drawShape( QPainter & p ) +void SerialPortComponent::drawShape( TQPainter & p ) { drawPortShape( p ); } |