summaryrefslogtreecommitdiffstats
path: root/src/flowparts
diff options
context:
space:
mode:
Diffstat (limited to 'src/flowparts')
-rw-r--r--src/flowparts/callsub.cpp4
-rw-r--r--src/flowparts/count.cpp8
-rw-r--r--src/flowparts/delay.cpp14
-rw-r--r--src/flowparts/embed.cpp8
-rw-r--r--src/flowparts/end.cpp2
-rw-r--r--src/flowparts/flowpart.cpp238
-rw-r--r--src/flowparts/flowpart.h45
-rw-r--r--src/flowparts/forloop.cpp2
-rw-r--r--src/flowparts/inputbutton.cpp4
-rw-r--r--src/flowparts/interrupt.cpp4
-rw-r--r--src/flowparts/keypad.cpp4
-rw-r--r--src/flowparts/pinmapping.cpp96
-rw-r--r--src/flowparts/pinmapping.h17
-rw-r--r--src/flowparts/pulse.cpp8
-rw-r--r--src/flowparts/readport.cpp4
-rw-r--r--src/flowparts/repeat.cpp6
-rw-r--r--src/flowparts/setpin.cpp20
-rw-r--r--src/flowparts/sevenseg.cpp4
-rw-r--r--src/flowparts/start.cpp2
-rw-r--r--src/flowparts/sub.cpp2
-rw-r--r--src/flowparts/testpin.cpp14
-rw-r--r--src/flowparts/unary.cpp12
-rw-r--r--src/flowparts/varassignment.cpp10
-rw-r--r--src/flowparts/varcomparison.cpp18
-rw-r--r--src/flowparts/varcomparison.h2
-rw-r--r--src/flowparts/while.cpp6
-rw-r--r--src/flowparts/writeport.cpp12
27 files changed, 285 insertions, 281 deletions
diff --git a/src/flowparts/callsub.cpp b/src/flowparts/callsub.cpp
index 8487ed0..09687e2 100644
--- a/src/flowparts/callsub.cpp
+++ b/src/flowparts/callsub.cpp
@@ -23,7 +23,7 @@ Item* CallSub::construct( ItemDocument *itemDocument, bool newItem, const char *
LibraryItem* CallSub::libraryItem()
{
return new LibraryItem(
- QString("flow/callsub"),
+ TQString("flow/callsub"),
i18n("Sub Call"),
i18n("Common"),
"subcall.png",
@@ -51,7 +51,7 @@ CallSub::~CallSub()
void CallSub::dataChanged()
{
- setCaption( i18n("Call %1").arg(dataString("sub")) );
+ setCaption( i18n("Call %1").tqarg(dataString("sub")) );
}
void CallSub::generateMicrobe( FlowCode *code )
diff --git a/src/flowparts/count.cpp b/src/flowparts/count.cpp
index dc0281f..190ed80 100644
--- a/src/flowparts/count.cpp
+++ b/src/flowparts/count.cpp
@@ -23,7 +23,7 @@ Item* Count::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* Count::libraryItem()
{
return new LibraryItem(
- QString::QString("flow/count"),
+ TQString::TQString("flow/count"),
i18n("Count"),
i18n("Functions"),
"ppcount.png",
@@ -41,7 +41,7 @@ Count::Count( ICNDocument *icnDocument, bool newItem, const char *id )
createStdOutput();
createProperty( "0-trigger", Variant::Type::Select );
- property("0-trigger")->setAllowed( QStringList::split(',',"rising,falling") );
+ property("0-trigger")->setAllowed( TQStringList::split(',',"rising,falling") );
property("0-triger")->setValue("rising");
property("0-trigger")->setCaption( i18n("Trigger") );
@@ -58,13 +58,13 @@ Count::~Count()
void Count::dataChanged()
{
double count = dataDouble("1-length");
- setCaption( i18n("Count %1 for %2 sec").arg(dataString("0-trigger")).arg(QString::number( count / getMultiplier(count), 'g', 3 ) + getNumberMag(count)) );
+ setCaption( i18n("Count %1 for %2 sec").tqarg(dataString("0-trigger")).tqarg(TQString::number( count / getMultiplier(count), 'g', 3 ) + getNumberMag(count)) );
}
void Count::generateMicrobe( FlowCode *code )
{
const double count_ms = dataDouble("1-length")*1e3;
- code->addCode( "count "+dataString("0-trigger")+" for "+QString::number(count_ms)+"ms" );
+ code->addCode( "count "+dataString("0-trigger")+" for "+TQString::number(count_ms)+"ms" );
code->addCodeBranch( outputPart("stdoutput") );
}
diff --git a/src/flowparts/delay.cpp b/src/flowparts/delay.cpp
index fa37770..5d42373 100644
--- a/src/flowparts/delay.cpp
+++ b/src/flowparts/delay.cpp
@@ -23,7 +23,7 @@ Item* Delay::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* Delay::libraryItem()
{
return new LibraryItem(
- QString::QString("flow/delay"),
+ TQString::TQString("flow/delay"),
i18n("Delay"),
i18n("Functions"),
"delay.png",
@@ -53,13 +53,13 @@ Delay::~Delay()
void Delay::dataChanged()
{
double delay = dataDouble("delay_length");
- setCaption( i18n("Delay for %1 sec").arg(QString::number( delay / getMultiplier(delay), 'g', 3 )+getNumberMag(delay)) );
+ setCaption( i18n("Delay for %1 sec").tqarg(TQString::number( delay / getMultiplier(delay), 'g', 3 )+getNumberMag(delay)) );
}
void Delay::generateMicrobe( FlowCode *code )
{
const double delayLength_ms = dataDouble("delay_length")*1e3;
- code->addCode( "delay "+QString::number(delayLength_ms) );
+ code->addCode( "delay "+TQString::number(delayLength_ms) );
code->addCodeBranch( outputPart("stdoutput") );
// code->addVariable("COUNT_REPEAT");
@@ -68,7 +68,7 @@ void Delay::generateMicrobe( FlowCode *code )
// Code for pauses less than 769uS
if ( pauseLength < 769 )
{
- code->addCodeBlock( id(), "movlw " + QString::number(pauseLength/3) + "\n"
+ code->addCodeBlock( id(), "movlw " + TQString::number(pauseLength/3) + "\n"
"movwf COUNT_REPEAT\n"
"call count_3uS\n"
+ gotoCode("stdoutput") );
@@ -81,7 +81,7 @@ void Delay::generateMicrobe( FlowCode *code )
{
code->addVariable("COUNT_LOOP_1");
- code->addCodeBlock( id(), "movlw " + QString::number(pauseLength/(3*256)) + "\n"
+ code->addCodeBlock( id(), "movlw " + TQString::number(pauseLength/(3*256)) + "\n"
"movwf COUNT_REPEAT\n"
"call count_768uS\n"
+ gotoCode("stdoutput") );
@@ -97,7 +97,7 @@ void Delay::generateMicrobe( FlowCode *code )
code->addVariable("COUNT_LOOP_1");
code->addVariable("COUNT_LOOP_2");
- code->addCodeBlock( id(), "movlw " + QString::number(pauseLength/(3*256*256)) + "\n"
+ code->addCodeBlock( id(), "movlw " + TQString::number(pauseLength/(3*256*256)) + "\n"
"movwf COUNT_REPEAT\n"
"call count_200mS\n"
+ gotoCode("stdoutput") );
@@ -116,7 +116,7 @@ void Delay::generateMicrobe( FlowCode *code )
code->addVariable("COUNT_LOOP_2");
code->addVariable("COUNT_LOOP_3");
- code->addCodeBlock( id(), "movlw " + QString::number(pauseLength/(3*256*256*256)) + "\n"
+ code->addCodeBlock( id(), "movlw " + TQString::number(pauseLength/(3*256*256*256)) + "\n"
"movwf COUNT_REPEAT\n"
"call count_50S\n"
+ gotoCode("stdoutput") );
diff --git a/src/flowparts/embed.cpp b/src/flowparts/embed.cpp
index ca04c65..996ce2f 100644
--- a/src/flowparts/embed.cpp
+++ b/src/flowparts/embed.cpp
@@ -23,7 +23,7 @@ Item* Embed::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* Embed::libraryItem()
{
return new LibraryItem(
- QString::QString("flow/embed"),
+ TQString::TQString("flow/embed"),
i18n("Embed"),
i18n("Common"),
"embed.png",
@@ -42,7 +42,7 @@ Embed::Embed( ICNDocument *icnDocument, bool newItem, const char *id )
createStdOutput();
createProperty( "type", Variant::Type::Select );
- property("type")->setAllowed( QStringList::split( ',', "Microbe,Assembly" ) );
+ property("type")->setAllowed( TQStringList::split( ',', "Microbe,Assembly" ) );
property("type")->setValue("Microbe");
property("type")->setCaption( i18n("Type") ); // TODO: replace this with i18n( "the type", "Type" );
@@ -58,8 +58,8 @@ Embed::~Embed()
void Embed::dataChanged()
{
- const QString sample = dataString("code").left(10).replace("\n"," ");
- setCaption( i18n("%1: %2...").arg(dataString("type")).arg(sample) );
+ const TQString sample = dataString("code").left(10).tqreplace("\n"," ");
+ setCaption( i18n("%1: %2...").tqarg(dataString("type")).tqarg(sample) );
}
diff --git a/src/flowparts/end.cpp b/src/flowparts/end.cpp
index 37d7e91..137dae0 100644
--- a/src/flowparts/end.cpp
+++ b/src/flowparts/end.cpp
@@ -23,7 +23,7 @@ Item* End::construct( ItemDocument *itemDocument, bool newItem, const char *id )
LibraryItem* End::libraryItem()
{
return new LibraryItem(
- QString("flow/end"),
+ TQString("flow/end"),
i18n("End"),
i18n("Common"),
"end.png",
diff --git a/src/flowparts/flowpart.cpp b/src/flowparts/flowpart.cpp
index e12213c..abf8880 100644
--- a/src/flowparts/flowpart.cpp
+++ b/src/flowparts/flowpart.cpp
@@ -24,11 +24,11 @@
#include <kdebug.h>
-#include <qbitarray.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qregexp.h>
+#include <tqbitarray.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
#include <assert.h>
#include <algorithm>
@@ -61,7 +61,7 @@ Node::node_dir inNodePositioning[4] = {Node::dir_up,Node::dir_right,Node::dir_do
Node::node_dir outNodePositioning[4] = {Node::dir_down,Node::dir_left,Node::dir_up,Node::dir_right};
-FlowPart::FlowPart( ICNDocument *icnDocument, bool newItem, const QString &id )
+FlowPart::FlowPart( ICNDocument *icnDocument, bool newItem, const TQString &id )
: CNItem( icnDocument, newItem, id )
{
icnDocument->registerItem(this);
@@ -74,8 +74,8 @@ FlowPart::FlowPart( ICNDocument *icnDocument, bool newItem, const QString &id )
m_stdOutput = 0l;
m_altOutput = 0l;
- connect( m_pFlowCodeDocument, SIGNAL(picTypeChanged()), this, SLOT(slotUpdateFlowPartVariables()) );
- connect( m_pFlowCodeDocument, SIGNAL(pinMappingsChanged()), this, SLOT(slotUpdateFlowPartVariables()) );
+ connect( m_pFlowCodeDocument, TQT_SIGNAL(picTypeChanged()), this, TQT_SLOT(slotUpdateFlowPartVariables()) );
+ connect( m_pFlowCodeDocument, TQT_SIGNAL(pinMappingsChanged()), this, TQT_SLOT(slotUpdateFlowPartVariables()) );
}
@@ -96,7 +96,7 @@ FlowPart::~FlowPart()
}
-void FlowPart::setCaption( const QString &caption )
+void FlowPart::setCaption( const TQString &caption )
{
if ( m_flowSymbol == FlowPart::ps_other )
{
@@ -104,10 +104,10 @@ void FlowPart::setCaption( const QString &caption )
return;
}
- QWidget *w = new QWidget();
- QPainter p(w);
+ TQWidget *w = new TQWidget();
+ TQPainter p(w);
p.setFont( font() );
- const int text_width = p.boundingRect( boundingRect(), (Qt::SingleLine | Qt::AlignHCenter | Qt::AlignVCenter), caption ).width();
+ const int text_width = p.boundingRect( boundingRect(), (TQt::SingleLine | TQt::AlignHCenter | TQt::AlignVCenter), caption ).width();
p.end();
delete w;
int width = std::max( ((int)(text_width/16))*16, 48 );
@@ -180,18 +180,18 @@ void FlowPart::initSymbol( FlowPart::FlowSymbol symbol, int width )
case FlowPart::ps_call:
case FlowPart::ps_process:
{
- setItemPoints( QRect( -width/2, -16, width, 24 ) );
+ setItemPoints( TQRect( -width/2, -16, width, 24 ) );
break;
}
case FlowPart::ps_io:
{
- // define parallelogram shape
- QPointArray pa(4);
- pa[0] = QPoint( -(width-10)/2, -16 );
- pa[1] = QPoint( width/2, -16 );
- pa[2] = QPoint( (width-10)/2, 8 );
- pa[3] = QPoint( -width/2, 8 );
+ // define parallelogram tqshape
+ TQPointArray pa(4);
+ pa[0] = TQPoint( -(width-10)/2, -16 );
+ pa[1] = TQPoint( width/2, -16 );
+ pa[2] = TQPoint( (width-10)/2, 8 );
+ pa[3] = TQPoint( -width/2, 8 );
setItemPoints(pa);
break;
}
@@ -207,13 +207,13 @@ void FlowPart::initSymbol( FlowPart::FlowSymbol symbol, int width )
// Draw semicircle
double x;
const int RP_NUM = 48;
- QPointArray pa(RP_NUM);
+ TQPointArray pa(RP_NUM);
int point = 0;
for ( double y = -1.0; y <= 1.0; y+= 4.0/(RP_NUM-2) )
{
x = sqrt(1-y*y)*halfHeight;
- pa[point] = QPoint( (int)(width+x)-halfHeight, (int)(halfHeight*y) );
- pa[RP_NUM-1-point] = QPoint ( (int)(halfHeight-x), (int)(halfHeight*y) );
+ pa[point] = TQPoint( (int)(width+x)-halfHeight, (int)(halfHeight*y) );
+ pa[RP_NUM-1-point] = TQPoint ( (int)(halfHeight-x), (int)(halfHeight*y) );
point++;
}
@@ -225,13 +225,13 @@ void FlowPart::initSymbol( FlowPart::FlowSymbol symbol, int width )
case FlowPart::ps_decision:
{
// define rhombus
- QPointArray pa(6);
- pa[0] = QPoint( 0, -24 );
- pa[1] = QPoint( width/2, -6 );
- pa[2] = QPoint( width/2, 6 );
- pa[3] = QPoint( 0, 24 );
- pa[4] = QPoint( -width/2, 6 );
- pa[5] = QPoint( -width/2, -6 );
+ TQPointArray pa(6);
+ pa[0] = TQPoint( 0, -24 );
+ pa[1] = TQPoint( width/2, -6 );
+ pa[2] = TQPoint( width/2, 6 );
+ pa[3] = TQPoint( 0, 24 );
+ pa[4] = TQPoint( -width/2, 6 );
+ pa[5] = TQPoint( -width/2, -6 );
setItemPoints(pa);
break;
}
@@ -239,7 +239,7 @@ void FlowPart::initSymbol( FlowPart::FlowSymbol symbol, int width )
}
}
-void FlowPart::drawShape( QPainter &p )
+void FlowPart::drawShape( TQPainter &p )
{
initPainter(p);
@@ -272,7 +272,7 @@ void FlowPart::drawShape( QPainter &p )
int outer16 = int(16*outer*DPR);
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawPolygon( areaPoints() );
p.restore();
@@ -292,7 +292,7 @@ void FlowPart::drawShape( QPainter &p )
case FlowPart::ps_decision:
{
- // TODO Make the shape nice and pretty with rounded corners
+ // TODO Make the tqshape nice and pretty with rounded corners
CNItem::drawShape(p);
break;
}
@@ -317,19 +317,19 @@ void FlowPart::drawShape( QPainter &p )
}
}
- p.setPen( Qt::black );
+ p.setPen( TQt::black );
p.setFont( font() );
- p.drawText( boundingRect(), (Qt::WordBreak | Qt::AlignHCenter | Qt::AlignVCenter), m_caption );
+ p.drawText( boundingRect(), (TQt::WordBreak | TQt::AlignHCenter | TQt::AlignVCenter), m_caption );
}
-QString FlowPart::gotoCode( const QString& internalNodeId )
+TQString FlowPart::gotoCode( const TQString& internalNodeId )
{
FlowPart *end = outputPart(internalNodeId);
if (!end) return "";
return "goto "+end->id();
}
-FlowPart* FlowPart::outputPart( const QString& internalNodeId )
+FlowPart* FlowPart::outputPart( const TQString& internalNodeId )
{
Node *node = p_icnDocument->nodeWithID( nodeId(internalNodeId) );
@@ -340,7 +340,7 @@ FlowPart* FlowPart::outputPart( const QString& internalNodeId )
return fpnode->outputFlowPart();
}
-FlowPartList FlowPart::inputParts( const QString& id )
+FlowPartList FlowPart::inputParts( const TQString& id )
{
Node *node = p_icnDocument->nodeWithID(id);
@@ -388,7 +388,7 @@ FlowPartList FlowPart::outputParts()
}
-FlowPart* FlowPart::endPart( QStringList ids, FlowPartList *previousParts )
+FlowPart* FlowPart::endPart( TQStringList ids, FlowPartList *previousParts )
{
if ( ids.empty() )
{
@@ -403,7 +403,7 @@ FlowPart* FlowPart::endPart( QStringList ids, FlowPartList *previousParts )
const bool createdList = (!previousParts);
if (createdList) {
previousParts = new FlowPartList;
- } else if ( previousParts->contains(this) ) {
+ } else if ( previousParts->tqcontains(this) ) {
return 0l;
}
previousParts->append(this);
@@ -415,23 +415,23 @@ FlowPart* FlowPart::endPart( QStringList ids, FlowPartList *previousParts )
return outputPart( *(ids.begin()) );
}
- typedef QValueList<FlowPartList> ValidPartsList;
+ typedef TQValueList<FlowPartList> ValidPartsList;
ValidPartsList validPartsList;
- const QStringList::iterator idsEnd = ids.end();
- for ( QStringList::iterator it = ids.begin(); it != idsEnd; ++it )
+ const TQStringList::iterator idsEnd = ids.end();
+ for ( TQStringList::iterator it = ids.begin(); it != idsEnd; ++it )
{
int prevLevel = level();
FlowPartList validParts;
FlowPart *part = outputPart(*it);
while (part)
{
- if ( !validParts.contains(part) )
+ if ( !validParts.tqcontains(part) )
{
validParts.append(part);
// if ( part->level() >= level() ) {
const int _l = part->level();
- part = part->endPart( QStringList(), previousParts );
+ part = part->endPart( TQStringList(), previousParts );
prevLevel = _l;
// } else {
// part = 0l;
@@ -462,7 +462,7 @@ FlowPart* FlowPart::endPart( QStringList ids, FlowPartList *previousParts )
bool ok = true;
for ( ValidPartsList::iterator vplit = validPartsList.begin(); vplit != vplEnd; ++vplit )
{
- if ( !(*vplit).contains(*it) ) ok = false;
+ if ( !(*vplit).tqcontains(*it) ) ok = false;
}
if (ok) return *it;
}
@@ -471,8 +471,8 @@ FlowPart* FlowPart::endPart( QStringList ids, FlowPartList *previousParts )
}
-void FlowPart::handleIfElse( FlowCode *code, const QString &case1Statement, const QString &case2Statement,
- const QString &case1, const QString &case2 )
+void FlowPart::handleIfElse( FlowCode *code, const TQString &case1Statement, const TQString &case2Statement,
+ const TQString &case1, const TQString &case2 )
{
if (!code) return;
@@ -480,7 +480,7 @@ void FlowPart::handleIfElse( FlowCode *code, const QString &case1Statement, cons
FlowPart *part1 = outputPart(case1);
FlowPart *part2 = outputPart(case2);
- if ( part1 && part2 ) stop = endPart( QStringList::split( ',', case1+","+case2 ) );
+ if ( part1 && part2 ) stop = endPart( TQStringList::split( ',', case1+","+case2 ) );
if ( (!part1 && !part2) || (part1 == stop && part2 == stop) ) return;
@@ -513,7 +513,7 @@ void FlowPart::handleIfElse( FlowCode *code, const QString &case1Statement, cons
}
-Variant * FlowPart::createProperty( const QString & id, Variant::Type::Value type )
+Variant * FlowPart::createProperty( const TQString & id, Variant::Type::Value type )
{
if ( type != Variant::Type::Port
&& type != Variant::Type::Pin
@@ -529,7 +529,7 @@ Variant * FlowPart::createProperty( const QString & id, Variant::Type::Value typ
{
if ( MicroSettings * settings = m_pFlowCodeDocument->microSettings() )
v->setAllowed( settings->variableNames() );
- connect( property(id), SIGNAL(valueChanged(QVariant, QVariant )), this, SLOT(varNameChanged(QVariant, QVariant )) );
+ connect( property(id), TQT_SIGNAL(valueChanged(TQVariant, TQVariant )), this, TQT_SLOT(varNameChanged(TQVariant, TQVariant )) );
}
else
slotUpdateFlowPartVariables();
@@ -548,8 +548,8 @@ void FlowPart::slotUpdateFlowPartVariables()
return;
const PinMappingMap pinMappings = s->pinMappings();
- QStringList sevenSegMaps;
- QStringList keyPadMaps;
+ TQStringList sevenSegMaps;
+ TQStringList keyPadMaps;
PinMappingMap::const_iterator pEnd = pinMappings.end();
for ( PinMappingMap::const_iterator it = pinMappings.begin(); it != pEnd; ++it )
{
@@ -569,10 +569,10 @@ void FlowPart::slotUpdateFlowPartVariables()
}
}
- QStringList ports = s->microInfo()->package()->portNames();
+ TQStringList ports = s->microInfo()->package()->portNames();
ports.sort();
- QStringList pins = s->microInfo()->package()->pinIDs(PicPin::type_bidir | PicPin::type_input | PicPin::type_open);
+ TQStringList pins = s->microInfo()->package()->pinIDs(PicPin::type_bidir | PicPin::type_input | PicPin::type_open);
pins.sort();
const VariantDataMap::iterator vEnd = m_variantData.end();
@@ -591,14 +591,14 @@ void FlowPart::slotUpdateFlowPartVariables()
else if ( v->type() == Variant::Type::SevenSegment )
{
v->setAllowed( sevenSegMaps );
- if ( !sevenSegMaps.isEmpty() && !sevenSegMaps.contains( v->value().toString() ) )
+ if ( !sevenSegMaps.isEmpty() && !sevenSegMaps.tqcontains( v->value().toString() ) )
v->setValue( sevenSegMaps.first() );
}
else if ( v->type() == Variant::Type::KeyPad )
{
v->setAllowed( keyPadMaps );
- if ( !keyPadMaps.isEmpty() && !keyPadMaps.contains( v->value().toString() ) )
+ if ( !keyPadMaps.isEmpty() && !keyPadMaps.tqcontains( v->value().toString() ) )
v->setValue( keyPadMaps.first() );
}
}
@@ -614,7 +614,7 @@ void FlowPart::updateVarNames()
if (!s)
return;
- const QStringList names = s->variableNames();
+ const TQStringList names = s->variableNames();
const VariantDataMap::iterator end = m_variantData.end();
for ( VariantDataMap::iterator it = m_variantData.begin(); it != end; ++it )
{
@@ -625,7 +625,7 @@ void FlowPart::updateVarNames()
}
-void FlowPart::varNameChanged( QVariant newValue, QVariant oldValue )
+void FlowPart::varNameChanged( TQVariant newValue, TQVariant oldValue )
{
if (!m_pFlowCodeDocument)
return;
@@ -656,17 +656,17 @@ void FlowPart::updateAttachedPositioning( )
return;
//BEGIN Rearrange text if appropriate
- const QRect textPos[4] = {
- QRect( offsetX()+width(), 6, 40, 16 ),
- QRect( 0, offsetY()-16, 40, 16 ),
- QRect( offsetX()-40, 6, 40, 16 ),
- QRect( 0, offsetY()+height(), 40, 16 ) };
+ const TQRect textPos[4] = {
+ TQRect( offsetX()+width(), 6, 40, 16 ),
+ TQRect( 0, offsetY()-16, 40, 16 ),
+ TQRect( offsetX()-40, 6, 40, 16 ),
+ TQRect( 0, offsetY()+height(), 40, 16 ) };
NodeInfo * stdOutputInfo = m_stdOutput ? &m_nodeMap["stdoutput"] : 0;
NodeInfo * altOutputInfo = m_altOutput ? &m_nodeMap["altoutput"] : 0l;
- Text *outputTrueText = m_textMap.contains("output_true") ? m_textMap["output_true"] : 0l;
- Text *outputFalseText = m_textMap.contains("output_false") ? m_textMap["output_false"] : 0l;
+ Text *outputTrueText = m_textMap.tqcontains("output_true") ? m_textMap["output_true"] : 0l;
+ Text *outputFalseText = m_textMap.tqcontains("output_false") ? m_textMap["output_false"] : 0l;
if ( stdOutputInfo && outputTrueText )
outputTrueText->setOriginalRect( textPos[ nodeDirToPos( (Node::node_dir)stdOutputInfo->orientation ) ] );
@@ -677,7 +677,7 @@ void FlowPart::updateAttachedPositioning( )
const TextMap::iterator textMapEnd = m_textMap.end();
for ( TextMap::iterator it = m_textMap.begin(); it != textMapEnd; ++it )
{
- QRect pos = it.data()->recommendedRect();
+ TQRect pos = it.data()->recommendedRect();
it.data()->move( pos.x() + x(), pos.y() + y() );
it.data()->setGuiPartSize( pos.width(), pos.height() );
}
@@ -820,9 +820,9 @@ uint FlowPart::allowedOrientations( ) const
return 0;
}
-void FlowPart::orientationPixmap( uint orientation, QPixmap & pm ) const
+void FlowPart::orientationPixmap( uint orientation, TQPixmap & pm ) const
{
- const QSize size = pm.size();
+ const TQSize size = pm.size();
if ( ! ( allowedOrientations() & ( 1 << orientation ) ) )
{
@@ -830,101 +830,101 @@ void FlowPart::orientationPixmap( uint orientation, QPixmap & pm ) const
return;
}
- QBitmap mask( 50, 50 );
- QPainter maskPainter(&mask);
- mask.fill( Qt::color0 );
- maskPainter.setBrush(Qt::color1);
- maskPainter.setPen(Qt::color1);
+ TQBitmap tqmask( 50, 50 );
+ TQPainter tqmaskPainter(&tqmask);
+ tqmask.fill( TQt::color0 );
+ tqmaskPainter.setBrush(TQt::color1);
+ tqmaskPainter.setPen(TQt::color1);
- QPainter p(&pm);
+ TQPainter p(&pm);
p.setBrush(m_brushCol);
- p.setPen( Qt::black );
+ p.setPen( TQt::black );
// In order: right corner, top corner, left corner, bottom corner
- QPoint c[4] = {
- QPoint( int(0.7*size.width()), int(0.5*size.height()) ),
- QPoint( int(0.5*size.width()), int(0.4*size.height()) ),
- QPoint( int(0.3*size.width()), int(0.5*size.height()) ),
- QPoint( int(0.5*size.width()), int(0.6*size.height()) ) };
+ TQPoint c[4] = {
+ TQPoint( int(0.7*size.width()), int(0.5*size.height()) ),
+ TQPoint( int(0.5*size.width()), int(0.4*size.height()) ),
+ TQPoint( int(0.3*size.width()), int(0.5*size.height()) ),
+ TQPoint( int(0.5*size.width()), int(0.6*size.height()) ) };
- QPoint d[4];
- d[0] = c[0] + QPoint( 7, 0 );
- d[1] = c[1] + QPoint( 0, -7 );
- d[2] = c[2] + QPoint( -7, 0 );
- d[3] = c[3] + QPoint( 0, 7 );
+ TQPoint d[4];
+ d[0] = c[0] + TQPoint( 7, 0 );
+ d[1] = c[1] + TQPoint( 0, -7 );
+ d[2] = c[2] + TQPoint( -7, 0 );
+ d[3] = c[3] + TQPoint( 0, 7 );
if ( m_stdInput && m_stdOutput && m_altOutput )
{
//BEGIN Draw diamond outline
- QPointArray diamond(4);
+ TQPointArray diamond(4);
for ( uint i=0; i<4; ++i )
diamond[i] = c[i];
p.drawPolygon(diamond);
- maskPainter.drawPolygon(diamond);
+ tqmaskPainter.drawPolygon(diamond);
//END Draw diamond outline
//BEGIN Draw input
int pos0 = nodeDirToPos( diamondNodePositioning[orientation][0] );
p.drawLine( c[pos0], d[pos0] );
- maskPainter.drawLine( c[pos0], d[pos0] );
+ tqmaskPainter.drawLine( c[pos0], d[pos0] );
//END Draw input
//BEGIN Draw "true" output as a tick
- QPointArray tick(4);
- tick[0] = QPoint( -3, 0 );
- tick[1] = QPoint( 0, 2 );
- tick[2] = QPoint( 0, 2 );
- tick[3] = QPoint( 4, -2 );
+ TQPointArray tick(4);
+ tick[0] = TQPoint( -3, 0 );
+ tick[1] = TQPoint( 0, 2 );
+ tick[2] = TQPoint( 0, 2 );
+ tick[3] = TQPoint( 4, -2 );
int pos1 = nodeDirToPos( diamondNodePositioning[orientation][1] );
tick.translate( d[pos1].x(), d[pos1].y() );
p.drawLineSegments(tick);
- maskPainter.drawLineSegments(tick);
+ tqmaskPainter.drawLineSegments(tick);
//END Draw "true" output as a tick
//BEGIN Draw "false" output as a cross
- QPointArray cross(4);
- cross[0] = QPoint( -2, -2 );
- cross[1] = QPoint( 2, 2 );
- cross[2] = QPoint( -2, 2 );
- cross[3] = QPoint( 2, -2 );
+ TQPointArray cross(4);
+ cross[0] = TQPoint( -2, -2 );
+ cross[1] = TQPoint( 2, 2 );
+ cross[2] = TQPoint( -2, 2 );
+ cross[3] = TQPoint( 2, -2 );
int pos2 = nodeDirToPos( diamondNodePositioning[orientation][2] );
cross.translate( d[pos2].x(), d[pos2].y() );
p.drawLineSegments(cross);
- maskPainter.drawLineSegments(cross);
+ tqmaskPainter.drawLineSegments(cross);
//END Draw "false" output as a cross
}
else if ( m_stdInput || m_stdOutput )
{
p.drawRoundRect( int(0.3*size.width()), int(0.4*size.height()), int(0.4*size.width()), int(0.2*size.height()) );
- maskPainter.drawRoundRect( int(0.3*size.width()), int(0.4*size.height()), int(0.4*size.width()), int(0.2*size.height()) );
+ tqmaskPainter.drawRoundRect( int(0.3*size.width()), int(0.4*size.height()), int(0.4*size.width()), int(0.2*size.height()) );
int hal = 5; // half arrow length
int haw = 3; // half arrow width
- QPoint arrows[4][6] = {
- { QPoint( hal, 0 ), QPoint( 0, -haw ),
- QPoint( hal, 0 ), QPoint( -hal, 0 ),
- QPoint( hal, 0 ), QPoint( 0, haw ) },
+ TQPoint arrows[4][6] = {
+ { TQPoint( hal, 0 ), TQPoint( 0, -haw ),
+ TQPoint( hal, 0 ), TQPoint( -hal, 0 ),
+ TQPoint( hal, 0 ), TQPoint( 0, haw ) },
- { QPoint( 0, -hal ), QPoint( -haw, 0 ),
- QPoint( 0, -hal ), QPoint( 0, hal ),
- QPoint( 0, -hal ), QPoint( haw, 0 ) },
+ { TQPoint( 0, -hal ), TQPoint( -haw, 0 ),
+ TQPoint( 0, -hal ), TQPoint( 0, hal ),
+ TQPoint( 0, -hal ), TQPoint( haw, 0 ) },
- { QPoint( -hal, 0 ), QPoint( 0, -haw ),
- QPoint( -hal, 0 ), QPoint( hal, 0 ),
- QPoint( -hal, 0 ), QPoint( 0, haw ) },
+ { TQPoint( -hal, 0 ), TQPoint( 0, -haw ),
+ TQPoint( -hal, 0 ), TQPoint( hal, 0 ),
+ TQPoint( -hal, 0 ), TQPoint( 0, haw ) },
- { QPoint( 0, hal ), QPoint( -haw, 0 ),
- QPoint( 0, hal ), QPoint( 0, -hal ),
- QPoint( 0, hal ), QPoint( haw, 0 ) } };
+ { TQPoint( 0, hal ), TQPoint( -haw, 0 ),
+ TQPoint( 0, hal ), TQPoint( 0, -hal ),
+ TQPoint( 0, hal ), TQPoint( haw, 0 ) } };
int inPos = -1;
int outPos = -1;
@@ -945,30 +945,30 @@ void FlowPart::orientationPixmap( uint orientation, QPixmap & pm ) const
if ( inPos != -1 )
{
- QPointArray inArrow(6);
+ TQPointArray inArrow(6);
for ( int i=0; i<6; ++i )
{
inArrow[i] = arrows[(inPos+2)%4][i];
}
inArrow.translate( d[inPos].x(), d[inPos].y() );
p.drawPolygon(inArrow);
- maskPainter.drawPolygon(inArrow);
+ tqmaskPainter.drawPolygon(inArrow);
}
if ( outPos != -1 )
{
- QPointArray outArrow(6);
+ TQPointArray outArrow(6);
for ( int i=0; i<6; ++i )
{
outArrow[i] = arrows[outPos][i];
}
outArrow.translate( d[outPos].x(), d[outPos].y() );
p.drawPolygon(outArrow);
- maskPainter.drawPolygon(outArrow);
+ tqmaskPainter.drawPolygon(outArrow);
}
}
- pm.setMask(mask);
+ pm.setMask(tqmask);
}
diff --git a/src/flowparts/flowpart.h b/src/flowparts/flowpart.h
index d689ebf..afa20c8 100644
--- a/src/flowparts/flowpart.h
+++ b/src/flowparts/flowpart.h
@@ -19,10 +19,10 @@ class FlowCode;
class FlowCodeDocument;
class FlowPart;
class FPNode;
-class QPixmap;
-class QSize;
+class TQPixmap;
+class TQSize;
-typedef QValueList<FlowPart*> FlowPartList;
+typedef TQValueList<FlowPart*> FlowPartList;
/**
All flow parts (eg 'CallSub', 'Read from Port' ,etc) should inherit from this class.
@@ -34,6 +34,7 @@ that you should reinherit for generating the assembly code.
class FlowPart : public CNItem
{
Q_OBJECT
+ TQ_OBJECT
public:
enum FlowSymbol
{
@@ -41,10 +42,10 @@ public:
ps_call, // Call - Rectangular box with double vertical lines at either end
ps_io, // I/O - Slanter rectangular box
ps_round, // Start/End - Rounded rectangular box
- ps_decision, // Decision - Diamond shape
- ps_other // Custom shape, which is ignored by FlowPart
+ ps_decision, // Decision - Diamond tqshape
+ ps_other // Custom tqshape, which is ignored by FlowPart
};
- FlowPart( ICNDocument *icnDocument, bool newItem, const QString &id );
+ FlowPart( ICNDocument *icnDocument, bool newItem, const TQString &id );
virtual ~FlowPart();
virtual void generateMicrobe( FlowCode */*code*/ ) = 0;
@@ -62,7 +63,7 @@ public:
/**
* Sets the caption displayed in the flowpart, resizes the item as necessary
*/
- virtual void setCaption( const QString &caption );
+ virtual void setCaption( const TQString &caption );
/**
* Traces the FlowCode document route from the nodes with the given internal
* ids, and returns the FlowPart to which:
@@ -73,7 +74,7 @@ public:
* @param previousParts A list of parts in the calling tree. This avoids infinite recursion.
* @returns The first FlowPart satisfying these conditions, or NULL if no such part exists
*/
- FlowPart* endPart( QStringList ids, FlowPartList *previousParts = 0l );
+ FlowPart* endPart( TQStringList ids, FlowPartList *previousParts = 0l );
/**
* Handles the addition of a if-else statement to the given FlowCode. This will
* order the code as necessary, adding the branches in the appropriate places
@@ -84,18 +85,18 @@ public:
* @param case1 The internal node id for case1
* @param case2 The internal node id for case2
*/
- void handleIfElse( FlowCode *code, const QString &case1Statement, const QString &case2Statement,
- const QString &case1, const QString &case2 );
+ void handleIfElse( FlowCode *code, const TQString &case1Statement, const TQString &case2Statement,
+ const TQString &case1, const TQString &case2 );
/**
* Returns a pointer to the FlowPart that is connected to the node with the
* given internal id, or NULL if no such node / no connected part
*/
- FlowPart* outputPart( const QString& internalNodeId );
+ FlowPart* outputPart( const TQString& internalNodeId );
/**
* Returns the FlowParts connected to the given node
* @see outputPart
*/
- FlowPartList inputParts( const QString& id );
+ FlowPartList inputParts( const TQString& id );
/**
* Returns a list of parts that are connected to *all* input parts
*/
@@ -109,8 +110,8 @@ public:
/**
* Draw the picture of the flowpart in the given orientation onto the pixmap
*/
- void orientationPixmap( uint orientation, QPixmap & pm ) const;
- virtual Variant * createProperty( const QString & id, Variant::Type::Value type );
+ void orientationPixmap( uint orientation, TQPixmap & pm ) const;
+ virtual Variant * createProperty( const TQString & id, Variant::Type::Value type );
public slots:
/**
@@ -121,7 +122,7 @@ public slots:
/**
* Called when a variable name has changed (from an entry box)
*/
- void varNameChanged( QVariant newValue, QVariant oldValue );
+ void varNameChanged( TQVariant newValue, TQVariant oldValue );
/**
* Called when some of the FlowPart-specific variables (e.g. Pin or
* SevenSegment) requiring updating, such as when the PIC type changes
@@ -134,19 +135,19 @@ protected:
/**
* Removes the node ids that shouldn't be used for finding the end part
*/
- virtual void filterEndPartIDs( QStringList *ids ) { Q_UNUSED(ids); }
+ virtual void filterEndPartIDs( TQStringList *ids ) { Q_UNUSED(ids); }
/**
* Normally just passes the paint request onto CNItem::drawShape,
* although in the case of some FlowSymbols (e.g. decision), it will handle
* the drawing itself
*/
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
/**
* Returns the goto instruction that will goto the FlowPart that is connected
* to the node with the given internal id.
* For example, gotoCode("stdOutput") might return "goto delay__13"
*/
- QString gotoCode( const QString& internalNodeId );
+ TQString gotoCode( const TQString& internalNodeId );
/**
* Creates a FPNode with an internal id of "stdinput".
* The node is positioned half-way along the top of the FlowPart,
@@ -166,7 +167,7 @@ protected:
*/
void createAltOutput();
/**
- * Initialises a symbol, by calling setItemPoints with the shape
+ * Initialises a symbol, by calling setItemPoints with the tqshape
*/
void initSymbol( FlowPart::FlowSymbol symbol, int width = 48 );
@@ -176,12 +177,12 @@ protected:
void initRoundedRectSymbol() { initSymbol( FlowPart::ps_round ); }
void initDecisionSymbol() { initSymbol( FlowPart::ps_decision ); }
- QString m_caption;
+ TQString m_caption;
uint m_orientation;
FPNode *m_stdInput;
FPNode *m_stdOutput;
FPNode *m_altOutput;
- QGuardedPtr<FlowCodeDocument> m_pFlowCodeDocument;
+ TQGuardedPtr<FlowCodeDocument> m_pFlowCodeDocument;
virtual void postResize();
void updateNodePositions();
@@ -189,7 +190,7 @@ protected:
private:
FlowSymbol m_flowSymbol;
};
-typedef QValueList<FlowPart*> FlowPartList;
+typedef TQValueList<FlowPart*> FlowPartList;
#endif
diff --git a/src/flowparts/forloop.cpp b/src/flowparts/forloop.cpp
index d2fe88b..23f4da5 100644
--- a/src/flowparts/forloop.cpp
+++ b/src/flowparts/forloop.cpp
@@ -23,7 +23,7 @@ Item* ForLoop::construct( ItemDocument *itemDocument, bool newItem, const char *
LibraryItem* ForLoop::libraryItem()
{
return new LibraryItem(
- QString("flow/forloop"),
+ TQString("flow/forloop"),
i18n("For"),
i18n("Loops"),
"for.png",
diff --git a/src/flowparts/inputbutton.cpp b/src/flowparts/inputbutton.cpp
index a0564d4..a140a2a 100644
--- a/src/flowparts/inputbutton.cpp
+++ b/src/flowparts/inputbutton.cpp
@@ -44,7 +44,7 @@ InputButton::InputButton( ICNDocument *icnDocument, bool newItem, const char *id
createProperty( "0-trigger", Variant::Type::Select );
property("0-trigger")->setCaption( i18n("Trigger") );
- property("0-trigger")->setAllowed( QStringList::split(',',"rising,falling") );
+ property("0-trigger")->setAllowed( TQStringList::split(',',"rising,falling") );
property("0-trigger")->setValue("rising");
createProperty( "1-pin", Variant::Type::Pin );
@@ -59,7 +59,7 @@ InputButton::~InputButton()
void InputButton::dataChanged()
{
- setCaption( i18n("Continue on %1 %2").arg(dataString("0-trigger")).arg(dataString("1-pin")) );
+ setCaption( i18n("Continue on %1 %2").tqarg(dataString("0-trigger")).tqarg(dataString("1-pin")) );
}
diff --git a/src/flowparts/interrupt.cpp b/src/flowparts/interrupt.cpp
index 5e8c42f..14a783f 100644
--- a/src/flowparts/interrupt.cpp
+++ b/src/flowparts/interrupt.cpp
@@ -37,7 +37,7 @@ Interrupt::Interrupt( ICNDocument *icnDocument, bool newItem, const char *id )
m_name = i18n("Interrupt");
m_desc = i18n("Defines the starting point of a interrupt handler.");
- QStringList interruptTypes;
+ TQStringList interruptTypes;
interruptTypes.append("changed");
interruptTypes.append("external");
interruptTypes.append("timer");
@@ -55,7 +55,7 @@ Interrupt::~Interrupt()
void Interrupt::dataChanged()
{
- setCaption( i18n("Interrupt %1").arg(dataString("interrupt")) );
+ setCaption( i18n("Interrupt %1").tqarg(dataString("interrupt")) );
}
void Interrupt::generateMicrobe( FlowCode *code )
diff --git a/src/flowparts/keypad.cpp b/src/flowparts/keypad.cpp
index f0d7136..8e49e29 100644
--- a/src/flowparts/keypad.cpp
+++ b/src/flowparts/keypad.cpp
@@ -55,12 +55,12 @@ Keypad::~Keypad()
void Keypad::dataChanged()
{
- setCaption( i18n("Read %1 to %2").arg( dataString( "keypad" ) ).arg( dataString( "variable" ) ) );
+ setCaption( i18n("Read %1 to %2").tqarg( dataString( "keypad" ) ).tqarg( dataString( "variable" ) ) );
}
void Keypad::generateMicrobe( FlowCode *code )
{
- code->addCode( QString("%1 = %2").arg( dataString("variable") ).arg( dataString("keypad") ) );
+ code->addCode( TQString("%1 = %2").tqarg( dataString("variable") ).tqarg( dataString("keypad") ) );
code->addCodeBranch( outputPart("stdoutput") );
}
diff --git a/src/flowparts/pinmapping.cpp b/src/flowparts/pinmapping.cpp
index 3b85b46..b00b2b3 100644
--- a/src/flowparts/pinmapping.cpp
+++ b/src/flowparts/pinmapping.cpp
@@ -23,10 +23,10 @@
#include <klocale.h>
#include <kstdaccel.h>
-#include <qaccel.h>
-#include <qapplication.h>
-#include <qframe.h>
-#include <qlayout.h>
+#include <tqaccel.h>
+#include <tqapplication.h>
+#include <tqframe.h>
+#include <tqlayout.h>
//BEGIN class PinMapping
@@ -50,45 +50,45 @@ PinMapping::~PinMapping()
//BEGIN class PinMapEditor
-PinMapEditor::PinMapEditor( PinMapping * pinMapping, MicroInfo * picInfo, QWidget * parent, const char * name )
- : KDialogBase( parent, name, true, i18n("Pin Map Editor"), Ok|Apply|Cancel, KDialogBase::Ok, true )
+PinMapEditor::PinMapEditor( PinMapping * pinMapping, MicroInfo * picInfo, TQWidget * tqparent, const char * name )
+ : KDialogBase( tqparent, name, true, i18n("Pin Map Editor"), Ok|Apply|Cancel, KDialogBase::Ok, true )
{
m_pPinMapping = pinMapping;
m_pPinMapDocument = new PinMapDocument();
- QAccel * accel = new QAccel( this );
+ TQAccel * accel = new TQAccel( this );
accel->connectItem( accel->insertItem( Key_Delete ),
m_pPinMapDocument,
- SLOT(deleteSelection()) );
+ TQT_SLOT(deleteSelection()) );
accel->connectItem( accel->insertItem( KStdAccel::selectAll().keyCodeQt() ),
m_pPinMapDocument,
- SLOT(selectAll()) );
+ TQT_SLOT(selectAll()) );
accel->connectItem( accel->insertItem( KStdAccel::undo().keyCodeQt() ),
m_pPinMapDocument,
- SLOT(undo()) );
+ TQT_SLOT(undo()) );
accel->connectItem( accel->insertItem( KStdAccel::redo().keyCodeQt() ),
m_pPinMapDocument,
- SLOT(redo()) );
+ TQT_SLOT(redo()) );
- QFrame * f = new QFrame(this);
+ TQFrame * f = new TQFrame(this);
f->setMinimumWidth( 480 );
f->setMinimumHeight( 480 );
- f->setFrameShape( QFrame::Box );
- f->setFrameShadow( QFrame::Plain );
- QVBoxLayout * fLayout = new QVBoxLayout( f, 1, 0, "fLayout" );
+ f->setFrameShape( TQFrame::Box );
+ f->setFrameShadow( TQFrame::Plain );
+ TQVBoxLayout * fLayout = new TQVBoxLayout( f, 1, 0, "fLayout" );
ViewContainer * vc = new ViewContainer( 0, 0, f );
fLayout->addWidget( vc );
m_pPinMapView = static_cast<PinMapView*>(m_pPinMapDocument->createView( vc, 0 ));
- qApp->processEvents();
+ tqApp->processEvents();
m_pPinMapDocument->init( *m_pPinMapping, picInfo );
@@ -141,11 +141,11 @@ void PinMapDocument::init( const PinMapping & pinMapping, MicroInfo * microInfo
{
m_pinMappingType = pinMapping.type();
- m_pPicComponent = static_cast<PIC_IC*>( addItem( "PIC_IC", QPoint( 336, 224 ), true ) );
+ m_pPicComponent = static_cast<PIC_IC*>( addItem( "PIC_IC", TQPoint( 336, 224 ), true ) );
m_pPicComponent->initPackage( microInfo );
- const QStringList pins = pinMapping.pins();
- const QStringList::const_iterator end = pins.end();
+ const TQStringList pins = pinMapping.pins();
+ const TQStringList::const_iterator end = pins.end();
int keypadCols = -1; // -1 means no keypad
@@ -153,12 +153,12 @@ void PinMapDocument::init( const PinMapping & pinMapping, MicroInfo * microInfo
{
case PinMapping::SevenSegment:
{
- m_pSevenSegment = static_cast<ECSevenSegment*>( addItem( "ec/seven_segment", QPoint( 144, 232 ), true ) );
+ m_pSevenSegment = static_cast<ECSevenSegment*>( addItem( "ec/seven_segment", TQPoint( 144, 232 ), true ) );
char ssPin = 'a';
- for ( QStringList::const_iterator it = pins.begin(); it != end; ++it )
+ for ( TQStringList::const_iterator it = pins.begin(); it != end; ++it )
{
- createConnector( m_pSevenSegment->childNode( QChar(ssPin) ), m_pPicComponent->childNode(*it) );
+ createConnector( m_pSevenSegment->childNode( TQChar(ssPin) ), m_pPicComponent->childNode(*it) );
ssPin++;
}
@@ -166,13 +166,13 @@ void PinMapDocument::init( const PinMapping & pinMapping, MicroInfo * microInfo
}
case PinMapping::Keypad_4x3:
- m_pKeypad = static_cast<ECKeyPad*>( addItem( "ec/keypad", QPoint( 144, 232 ), true ) );
+ m_pKeypad = static_cast<ECKeyPad*>( addItem( "ec/keypad", TQPoint( 144, 232 ), true ) );
m_pKeypad->property("numCols")->setValue(3);
keypadCols = 3;
break;
case PinMapping::Keypad_4x4:
- m_pKeypad = static_cast<ECKeyPad*>( addItem( "ec/keypad", QPoint( 144, 232 ), true ) );
+ m_pKeypad = static_cast<ECKeyPad*>( addItem( "ec/keypad", TQPoint( 144, 232 ), true ) );
m_pKeypad->property("numCols")->setValue(4);
keypadCols = 4;
break;
@@ -184,12 +184,12 @@ void PinMapDocument::init( const PinMapping & pinMapping, MicroInfo * microInfo
if ( keypadCols != -1 )
{
- QStringList::const_iterator it = pins.begin();
+ TQStringList::const_iterator it = pins.begin();
for ( unsigned row = 0; (row < 4) && (it != end); ++row, ++it )
- createConnector( m_pKeypad->childNode( QString("row_%1").arg( row ) ), m_pPicComponent->childNode( *it ) );
+ createConnector( m_pKeypad->childNode( TQString("row_%1").tqarg( row ) ), m_pPicComponent->childNode( *it ) );
for ( unsigned col = 0; (col < keypadCols) && (it != end); ++col, ++it )
- createConnector( m_pKeypad->childNode( QString("col_%1").arg( col ) ), m_pPicComponent->childNode( *it ) );
+ createConnector( m_pKeypad->childNode( TQString("col_%1").tqarg( col ) ), m_pPicComponent->childNode( *it ) );
}
clearHistory(); // Don't allow undoing of initial creation of stuff
@@ -202,7 +202,7 @@ bool PinMapDocument::isValidItem( Item * item )
}
-bool PinMapDocument::isValidItem( const QString & id )
+bool PinMapDocument::isValidItem( const TQString & id )
{
if ( !m_pPicComponent && id == "PIC_IC" )
return true;
@@ -228,9 +228,9 @@ bool PinMapDocument::isValidItem( const QString & id )
void PinMapDocument::deleteSelection()
{
- m_selectList->removeQCanvasItem( m_pPicComponent );
- m_selectList->removeQCanvasItem( m_pSevenSegment );
- m_selectList->removeQCanvasItem( m_pKeypad );
+ m_selectList->removeTQCanvasItem( m_pPicComponent );
+ m_selectList->removeTQCanvasItem( m_pSevenSegment );
+ m_selectList->removeTQCanvasItem( m_pKeypad );
ICNDocument::deleteSelection();
}
@@ -241,31 +241,31 @@ PinMapping PinMapDocument::pinMapping() const
const NodeMap picNodeMap = m_pPicComponent->nodeMap();
const NodeMap::const_iterator picNodeMapEnd = picNodeMap.end();
- QStringList picPinIDs;
- QStringList attachedIDs;
+ TQStringList picPinIDs;
+ TQStringList attachedIDs;
Component * attached = 0l;
switch ( m_pinMappingType )
{
case PinMapping::SevenSegment:
for ( unsigned i = 0; i < 7; ++i )
- attachedIDs << QChar('a'+i);
+ attachedIDs << TQChar('a'+i);
attached = m_pSevenSegment;
break;
case PinMapping::Keypad_4x3:
for ( unsigned i = 0; i < 4; ++i )
- attachedIDs << QString("row_%1").arg(i);
+ attachedIDs << TQString("row_%1").tqarg(i);
for ( unsigned i = 0; i < 3; ++i )
- attachedIDs << QString("col_%1").arg(i);
+ attachedIDs << TQString("col_%1").tqarg(i);
attached = m_pKeypad;
break;
case PinMapping::Keypad_4x4:
for ( unsigned i = 0; i < 4; ++i )
- attachedIDs << QString("row_%1").arg(i);
+ attachedIDs << TQString("row_%1").tqarg(i);
for ( unsigned i = 0; i < 4; ++i )
- attachedIDs << QString("col_%1").arg(i);
+ attachedIDs << TQString("col_%1").tqarg(i);
attached = m_pKeypad;
break;
@@ -276,11 +276,11 @@ PinMapping PinMapDocument::pinMapping() const
if ( !attached )
return PinMapping();
- QStringList::iterator end = attachedIDs.end();
- for ( QStringList::iterator attachedIt = attachedIDs.begin(); attachedIt != end; ++ attachedIt )
+ TQStringList::iterator end = attachedIDs.end();
+ for ( TQStringList::iterator attachedIt = attachedIDs.begin(); attachedIt != end; ++ attachedIt )
{
Node * node = attached->childNode( *attachedIt );
- QString pinID;
+ TQString pinID;
for ( NodeMap::const_iterator it = picNodeMap.begin(); it != picNodeMapEnd; ++it )
{
@@ -353,14 +353,14 @@ void PIC_IC::initPackage( MicroInfo * microInfo )
return;
//BEGIN Get pin IDs
- QStringList allPinIDs = microPackage->pinIDs();
- QStringList ioPinIDs = microPackage->pinIDs( PicPin::type_bidir | PicPin::type_input | PicPin::type_open );
+ TQStringList allPinIDs = microPackage->pinIDs();
+ TQStringList ioPinIDs = microPackage->pinIDs( PicPin::type_bidir | PicPin::type_input | PicPin::type_open );
// Now, we make the unwanted pin ids blank, so a pin is not created for them
- const QStringList::iterator allPinIDsEnd = allPinIDs.end();
- for ( QStringList::iterator it = allPinIDs.begin(); it != allPinIDsEnd; ++it )
+ const TQStringList::iterator allPinIDsEnd = allPinIDs.end();
+ for ( TQStringList::iterator it = allPinIDs.begin(); it != allPinIDsEnd; ++it )
{
- if ( !ioPinIDs.contains(*it) )
+ if ( !ioPinIDs.tqcontains(*it) )
*it = "";
}
//END Get pin IDs
@@ -378,7 +378,7 @@ void PIC_IC::initPackage( MicroInfo * microInfo )
const NodeMap::iterator nodeMapEnd = nodeMapCopy.end();
for ( NodeMap::iterator it = nodeMapCopy.begin(); it != nodeMapEnd; ++it )
{
- if ( !ioPinIDs.contains(it.key()) )
+ if ( !ioPinIDs.tqcontains(it.key()) )
removeNode( it.key() );
}
//END Remove old stuff
@@ -391,7 +391,7 @@ void PIC_IC::initPackage( MicroInfo * microInfo )
//END Create new stuff
- addDisplayText( "picid", QRect(offsetX(), offsetY()-16, width(), 16), microInfo->id() );
+ addDisplayText( "picid", TQRect(offsetX(), offsetY()-16, width(), 16), microInfo->id() );
}
//END class PIC_IC
diff --git a/src/flowparts/pinmapping.h b/src/flowparts/pinmapping.h
index 6131e45..8cb0747 100644
--- a/src/flowparts/pinmapping.h
+++ b/src/flowparts/pinmapping.h
@@ -42,7 +42,7 @@ class PinMapping
};
/**
- * Creates an invalid PinMapping, required by Qt templates.
+ * Creates an invalid PinMapping, required by TQt templates.
*/
PinMapping();
/**
@@ -53,14 +53,14 @@ class PinMapping
Type type() const { return m_type; }
- QStringList pins() const { return m_pins; }
- void setPins( const QStringList & pins ) { m_pins = pins; }
+ TQStringList pins() const { return m_pins; }
+ void setPins( const TQStringList & pins ) { m_pins = pins; }
protected:
- QStringList m_pins;
+ TQStringList m_pins;
Type m_type;
};
-typedef QMap< QString, PinMapping > PinMappingMap;
+typedef TQMap< TQString, PinMapping > PinMappingMap;
@@ -71,8 +71,9 @@ Dialog for editing a Pin Mapping
class PinMapEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PinMapEditor( PinMapping * PinMapping, MicroInfo * Info, QWidget * parent, const char * name );
+ PinMapEditor( PinMapping * PinMapping, MicroInfo * Info, TQWidget * tqparent, const char * name );
protected:
virtual void slotApply();
@@ -93,6 +94,7 @@ For use with FlowParts that require a pin map (e.g. Keypad and Seven Segment).
class PinMapDocument : public ICNDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
PinMapDocument();
~PinMapDocument();
@@ -100,7 +102,7 @@ class PinMapDocument : public ICNDocument
void init( const PinMapping & PinMapping, MicroInfo * microInfo );
virtual bool isValidItem( Item * item );
- virtual bool isValidItem( const QString &itemId );
+ virtual bool isValidItem( const TQString &itemId );
PinMapping pinMapping() const;
@@ -120,6 +122,7 @@ class PinMapDocument : public ICNDocument
class PinMapView : public ICNView
{
Q_OBJECT
+ TQ_OBJECT
public:
PinMapView( PinMapDocument * pinMapDocument, ViewContainer * viewContainer, uint viewAreaId, const char * name = 0l );
~PinMapView();
diff --git a/src/flowparts/pulse.cpp b/src/flowparts/pulse.cpp
index 2037d2f..4851abe 100644
--- a/src/flowparts/pulse.cpp
+++ b/src/flowparts/pulse.cpp
@@ -22,7 +22,7 @@ Item* Pulse::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* Pulse::libraryItem()
{
return new LibraryItem(
- QString::QString("flow/pulse"),
+ TQString::TQString("flow/pulse"),
i18n("Pulse"),
i18n("Functions"),
"pppulse.png",
@@ -68,7 +68,7 @@ Pulse::~Pulse()
void Pulse::dataChanged()
{
double pulse = dataDouble("0-duration");
- setCaption( i18n("Pulse %1 for %2 sec").arg(dataString("3-pin")).arg(QString::number( pulse / getMultiplier(pulse), 'f', 1 ) + getNumberMag(pulse)) );
+ setCaption( i18n("Pulse %1 for %2 sec").tqarg(dataString("3-pin")).tqarg(TQString::number( pulse / getMultiplier(pulse), 'f', 1 ) + getNumberMag(pulse)) );
}
void Pulse::generateMicrobe( FlowCode *code )
@@ -76,10 +76,10 @@ void Pulse::generateMicrobe( FlowCode *code )
const double duration_ms = dataDouble("0-duration")*1e3;
const double high_ms = dataDouble("1-high")*1e3;
const double low_ms = dataDouble("2-low")*1e3;
- const QString pin = dataString("3-pin");
+ const TQString pin = dataString("3-pin");
// TODO Do we want to change the format for pulsing?
- code->addCode( "pulse "+pin+" "+QString::number(duration_ms)+" "+QString::number(high_ms)+" "+QString::number(low_ms) );
+ code->addCode( "pulse "+pin+" "+TQString::number(duration_ms)+" "+TQString::number(high_ms)+" "+TQString::number(low_ms) );
code->addCodeBranch( outputPart("stdoutput") );
}
diff --git a/src/flowparts/readport.cpp b/src/flowparts/readport.cpp
index d87fe85..45623be 100644
--- a/src/flowparts/readport.cpp
+++ b/src/flowparts/readport.cpp
@@ -23,7 +23,7 @@ Item* ReadPort::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ReadPort::libraryItem()
{
return new LibraryItem(
- QString("flow/readport"),
+ TQString("flow/readport"),
i18n("Read from Port"),
i18n("I\\/O"),
"portread.png",
@@ -58,7 +58,7 @@ ReadPort::~ReadPort()
void ReadPort::dataChanged()
{
- setCaption( i18n("Read %1 to %2").arg(dataString("0-port")).arg(dataString("1-var")) );
+ setCaption( i18n("Read %1 to %2").tqarg(dataString("0-port")).tqarg(dataString("1-var")) );
}
void ReadPort::generateMicrobe( FlowCode *code )
diff --git a/src/flowparts/repeat.cpp b/src/flowparts/repeat.cpp
index 562bb03..53529ac 100644
--- a/src/flowparts/repeat.cpp
+++ b/src/flowparts/repeat.cpp
@@ -23,7 +23,7 @@ Item* Repeat::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* Repeat::libraryItem()
{
return new LibraryItem(
- QString("flow/repeat"),
+ TQString("flow/repeat"),
i18n("Repeat"),
i18n("Loops"),
"repeat.png",
@@ -47,7 +47,7 @@ Repeat::Repeat( ICNDocument *icnDocument, bool newItem, const char *id )
createProperty( "1op", Variant::Type::Select );
property("1op")->setToolbarCaption(" ");
property("1op")->setEditorCaption( i18n("Operation") );
- property("1op")->setAllowed( QStringList::split( ',', "==,<,>,<=,>=,!=" ) );
+ property("1op")->setAllowed( TQStringList::split( ',', "==,<,>,<=,>=,!=" ) );
property("1op")->setValue("==");
createProperty( "2var2", Variant::Type::Combo );
@@ -62,7 +62,7 @@ Repeat::~Repeat()
void Repeat::dataChanged()
{
- setCaption( i18n("repeat until %1 %2 %3").arg(dataString("0var1")).arg(dataString("1op")).arg(dataString("2var2")) );
+ setCaption( i18n("repeat until %1 %2 %3").tqarg(dataString("0var1")).tqarg(dataString("1op")).tqarg(dataString("2var2")) );
}
void Repeat::generateMicrobe( FlowCode *code )
diff --git a/src/flowparts/setpin.cpp b/src/flowparts/setpin.cpp
index b92ac8d..81c29ca 100644
--- a/src/flowparts/setpin.cpp
+++ b/src/flowparts/setpin.cpp
@@ -26,7 +26,7 @@ Item* SetPin::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* SetPin::libraryItem()
{
return new LibraryItem(
- QString("flow/setpin"),
+ TQString("flow/setpin"),
i18n("Set Pin State"),
i18n("I\\/O"),
"pinwrite.png",
@@ -45,7 +45,7 @@ SetPin::SetPin( ICNDocument *icnDocument, bool newItem, const char *id )
createProperty( "state", Variant::Type::Select );
property("state")->setCaption( i18n("State") );
- property("state")->setAllowed( QStringList::split( ',', "high,low" ) );
+ property("state")->setAllowed( TQStringList::split( ',', "high,low" ) );
property("state")->setValue("high");
createProperty( "pin", Variant::Type::Pin );
@@ -59,24 +59,24 @@ SetPin::~SetPin()
void SetPin::dataChanged()
{
- setCaption( i18n("Set %1 %2").arg(dataString("pin")).arg(dataString("state")) );
+ setCaption( i18n("Set %1 %2").tqarg(dataString("pin")).tqarg(dataString("state")) );
}
void SetPin::generateMicrobe( FlowCode *code )
{
- const QString pin = dataString("pin");
- const QString port = "PORT" + QString((QChar)pin[1]);
- const QString bit = (QChar)pin[2];
+ const TQString pin = dataString("pin");
+ const TQString port = "PORT" + TQString((TQChar)pin[1]);
+ const TQString bit = (TQChar)pin[2];
code->addCode( port+"."+bit+" = "+dataString("state") );
code->addCodeBranch( outputPart("stdoutput") );
#if 0
- const QString pin = dataString("pin");
+ const TQString pin = dataString("pin");
const bool isHigh = (dataString("state") == "High");
- const QString port = "PORT" + QString((QChar)pin[1]);
- const QString bit = (QChar)pin[2];
+ const TQString port = "PORT" + TQString((TQChar)pin[1]);
+ const TQString bit = (TQChar)pin[2];
- QString newCode;
+ TQString newCode;
if (isHigh)
{
newCode += "bsf " + port + "," + bit + " ; Set bit high\n";
diff --git a/src/flowparts/sevenseg.cpp b/src/flowparts/sevenseg.cpp
index c376f00..1f85e19 100644
--- a/src/flowparts/sevenseg.cpp
+++ b/src/flowparts/sevenseg.cpp
@@ -59,13 +59,13 @@ SevenSeg::~SevenSeg()
void SevenSeg::dataChanged()
{
- setCaption( i18n("Display %1 on %2").arg( dataString("expression") ).arg( dataString("sevenseg") ) );
+ setCaption( i18n("Display %1 on %2").tqarg( dataString("expression") ).tqarg( dataString("sevenseg") ) );
}
void SevenSeg::generateMicrobe( FlowCode *code )
{
- code->addCode( QString("%1 = %2").arg( dataString("sevenseg") ).arg( dataString("expression") ) );
+ code->addCode( TQString("%1 = %2").tqarg( dataString("sevenseg") ).tqarg( dataString("expression") ) );
code->addCodeBranch( outputPart("stdoutput") );
}
diff --git a/src/flowparts/start.cpp b/src/flowparts/start.cpp
index 6fd8af0..4e88858 100644
--- a/src/flowparts/start.cpp
+++ b/src/flowparts/start.cpp
@@ -23,7 +23,7 @@ Item* Start::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* Start::libraryItem()
{
return new LibraryItem(
- QString::QString("flow/start"),
+ TQString::TQString("flow/start"),
i18n("Start"),
i18n("Common"),
"start.png",
diff --git a/src/flowparts/sub.cpp b/src/flowparts/sub.cpp
index 222b167..6b02944 100644
--- a/src/flowparts/sub.cpp
+++ b/src/flowparts/sub.cpp
@@ -23,7 +23,7 @@ Item* Sub::construct( ItemDocument *itemDocument, bool newItem, const char *id )
LibraryItem* Sub::libraryItem()
{
return new LibraryItem(
- QString("flow/sub"),
+ TQString("flow/sub"),
i18n("Subroutine"),
i18n("Common"),
"sub.png",
diff --git a/src/flowparts/testpin.cpp b/src/flowparts/testpin.cpp
index 85fdb37..05f0a97 100644
--- a/src/flowparts/testpin.cpp
+++ b/src/flowparts/testpin.cpp
@@ -23,7 +23,7 @@ Item* TestPin::construct( ItemDocument *itemDocument, bool newItem, const char *
LibraryItem* TestPin::libraryItem()
{
return new LibraryItem(
- QString("flow/testpin"),
+ TQString("flow/testpin"),
i18n("Test Pin State"),
i18n("I\\/O"),
"pinread.png",
@@ -45,8 +45,8 @@ TestPin::TestPin( ICNDocument *icnDocument, bool newItem, const char *id )
property("pin")->setCaption( i18n("Pin") );
property("pin")->setValue("RA0");
- addDisplayText( "output_false", QRect( offsetX()+width(), 2, 40, 20 ), "Low" );
- addDisplayText( "output_true", QRect( 0, offsetY()+height(), 50, 20 ), "High" );
+ addDisplayText( "output_false", TQRect( offsetX()+width(), 2, 40, 20 ), "Low" );
+ addDisplayText( "output_true", TQRect( 0, offsetY()+height(), 50, 20 ), "High" );
}
@@ -63,14 +63,14 @@ void TestPin::dataChanged()
void TestPin::generateMicrobe( FlowCode *code )
{
- const QString pin = dataString("pin");
- const QString port = "PORT" + QString((QChar)pin[1]);
- const QString bit = (QChar)pin[2];
+ const TQString pin = dataString("pin");
+ const TQString port = "PORT" + TQString((TQChar)pin[1]);
+ const TQString bit = (TQChar)pin[2];
handleIfElse( code, port+"."+bit+" is high", port+"."+bit+" is low", "stdoutput", "altoutput" );
#if 0
- QString newCode;
+ TQString newCode;
newCode += "btfss "+port+","+bit+" ; Check if pin is clear\n";
newCode += gotoCode("altoutput") + " ; Pin is low\n";
diff --git a/src/flowparts/unary.cpp b/src/flowparts/unary.cpp
index fe0b549..077afc7 100644
--- a/src/flowparts/unary.cpp
+++ b/src/flowparts/unary.cpp
@@ -23,7 +23,7 @@ Item* Unary::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* Unary::libraryItem()
{
return new LibraryItem(
- QString("flow/unary"),
+ TQString("flow/unary"),
i18n("Unary"),
i18n("Variables"),
"unary.png",
@@ -46,7 +46,7 @@ Unary::Unary( ICNDocument *icnDocument, bool newItem, const char *id )
createProperty( "1-op", Variant::Type::Select );
property("1-op")->setCaption( i18n("Operation") );
- property("1-op")->setAllowed( QStringList::split( ',', "Rotate Left,Rotate Right,Increment,Decrement" ) );
+ property("1-op")->setAllowed( TQStringList::split( ',', "Rotate Left,Rotate Right,Increment,Decrement" ) );
property("1-op")->setValue("Rotate Left");
}
@@ -61,8 +61,8 @@ void Unary::dataChanged()
void Unary::generateMicrobe( FlowCode *code )
{
- const QString var = dataString("0-var");
- const QString op = dataString("1-op");
+ const TQString var = dataString("0-var");
+ const TQString op = dataString("1-op");
if ( op == "Rotate Left" ) code->addCode( "rotateleft "+var );
else if ( op == "Rotate Right" ) code->addCode( "rotateright "+var );
@@ -72,11 +72,11 @@ void Unary::generateMicrobe( FlowCode *code )
code->addCodeBranch( outputPart("stdoutput") );
#if 0
- QString rot = dataString("1-rot");
+ TQString rot = dataString("1-rot");
if ( FlowCode::isLiteral(var) ) return;
- QString newCode;
+ TQString newCode;
code->addVariable(var);
if ( rot == "Left" ) newCode += "rlf " + var + ",1 ; Unary " + var + " left through Carry, place result back in " + var + "\n";
diff --git a/src/flowparts/varassignment.cpp b/src/flowparts/varassignment.cpp
index 44b76fd..4156779 100644
--- a/src/flowparts/varassignment.cpp
+++ b/src/flowparts/varassignment.cpp
@@ -23,7 +23,7 @@ Item* VarAssignment::construct( ItemDocument *itemDocument, bool newItem, const
LibraryItem* VarAssignment::libraryItem()
{
return new LibraryItem(
- QString::QString("flow/varassignment"),
+ TQString::TQString("flow/varassignment"),
i18n("Assignment"),
i18n("Variables"),
"assignment.png",
@@ -66,14 +66,14 @@ void VarAssignment::generateMicrobe( FlowCode *code )
code->addCodeBranch( outputPart("stdoutput") );
#if 0
- QString var1 = dataString("0-var1");
- QString var2 = dataString("2-var2");
- QString op = dataString("1-op");
+ TQString var1 = dataString("0-var1");
+ TQString var2 = dataString("2-var2");
+ TQString op = dataString("1-op");
if ( FlowCode::isLiteral(var1) ) return;
code->addVariable(var1);
- QString newCode;
+ TQString newCode;
if ( !FlowCode::isLiteral(var1) )
{
diff --git a/src/flowparts/varcomparison.cpp b/src/flowparts/varcomparison.cpp
index e01ebf2..30eff19 100644
--- a/src/flowparts/varcomparison.cpp
+++ b/src/flowparts/varcomparison.cpp
@@ -23,7 +23,7 @@ Item* VarComparison::construct( ItemDocument *itemDocument, bool newItem, const
LibraryItem* VarComparison::libraryItem()
{
return new LibraryItem(
- QString("flow/varcomparison"),
+ TQString("flow/varcomparison"),
i18n("Comparison"),
i18n("Variables"),
"branch.png",
@@ -46,7 +46,7 @@ VarComparison::VarComparison( ICNDocument *icnDocument, bool newItem, const char
property("0var1")->setValue("x");
createProperty( "1op", Variant::Type::Select );
- property("1op")->setAllowed( QStringList::split( ',', "==,<,>,<=,>=,!=" ) );
+ property("1op")->setAllowed( TQStringList::split( ',', "==,<,>,<=,>=,!=" ) );
property("1op")->setValue("==");
property("1op")->setToolbarCaption(" ");
property("1op")->setEditorCaption( i18n("Operation") );
@@ -56,8 +56,8 @@ VarComparison::VarComparison( ICNDocument *icnDocument, bool newItem, const char
property("2var2")->setEditorCaption( i18n("Value") );
property("2var2")->setValue("0");
- addDisplayText( "output_false", QRect( offsetX()+width(), 2, 40, 20 ), "No" );
- addDisplayText( "output_true", QRect( 0, offsetY()+height(), 50, 20 ), "Yes" );
+ addDisplayText( "output_false", TQRect( offsetX()+width(), 2, 40, 20 ), "No" );
+ addDisplayText( "output_true", TQRect( 0, offsetY()+height(), 50, 20 ), "Yes" );
}
VarComparison::~VarComparison()
@@ -69,7 +69,7 @@ void VarComparison::dataChanged()
setCaption( dataString("0var1") + " " + dataString("1op") + " " + dataString("2var2") + " ?" );
}
-QString VarComparison::oppOp( const QString &op )
+TQString VarComparison::oppOp( const TQString &op )
{
if ( op == "==" ) return "!=";
if ( op == "!=" ) return "==";
@@ -82,9 +82,9 @@ QString VarComparison::oppOp( const QString &op )
void VarComparison::generateMicrobe( FlowCode *code )
{
- QString var1 = dataString("0var1");
- QString var2 = dataString("2var2");
- QString test = dataString("1op");
+ TQString var1 = dataString("0var1");
+ TQString var2 = dataString("2var2");
+ TQString test = dataString("1op");
handleIfElse( code, var1+" "+test+" "+var2, var1+" "+oppOp(test)+" "+var2, "stdoutput", "altoutput" );
@@ -101,7 +101,7 @@ void VarComparison::generateMicrobe( FlowCode *code )
#endif
#if 0
- QString newCode;
+ TQString newCode;
if ( FlowCode::isLiteral(var2) ) newCode += "movlw " + var2 + " ; Move literal to register w\n";
else
diff --git a/src/flowparts/varcomparison.h b/src/flowparts/varcomparison.h
index b1220c8..366cb42 100644
--- a/src/flowparts/varcomparison.h
+++ b/src/flowparts/varcomparison.h
@@ -34,7 +34,7 @@ protected:
* Use this to find the logically opposite comparison (e.g. "==" returns "!=",
* ">=" returns "<", etc). Supoorted ops: != == <= >= < >
*/
- QString oppOp( const QString &op );
+ TQString oppOp( const TQString &op );
};
#endif
diff --git a/src/flowparts/while.cpp b/src/flowparts/while.cpp
index b0461df..ddcf981 100644
--- a/src/flowparts/while.cpp
+++ b/src/flowparts/while.cpp
@@ -23,7 +23,7 @@ Item* While::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* While::libraryItem()
{
return new LibraryItem(
- QString("flow/while"),
+ TQString("flow/while"),
i18n("While"),
i18n("Loops"),
"while.png",
@@ -47,7 +47,7 @@ While::While( ICNDocument *icnDocument, bool newItem, const char *id )
createProperty( "1op", Variant::Type::Select );
property("1op")->setToolbarCaption(" ");
property("1op")->setEditorCaption( i18n("Operation") );
- property("1op")->setAllowed( QStringList::split( ',', "==,<,>,<=,>=,!=" ) );
+ property("1op")->setAllowed( TQStringList::split( ',', "==,<,>,<=,>=,!=" ) );
property("1op")->setValue("==");
createProperty( "2var2", Variant::Type::Combo );
@@ -62,7 +62,7 @@ While::~While()
void While::dataChanged()
{
- setCaption( i18n("while %1 %2 %3").arg(dataString("0var1")).arg(dataString("1op")).arg(dataString("2var2")) );
+ setCaption( i18n("while %1 %2 %3").tqarg(dataString("0var1")).tqarg(dataString("1op")).tqarg(dataString("2var2")) );
}
void While::generateMicrobe( FlowCode *code )
diff --git a/src/flowparts/writeport.cpp b/src/flowparts/writeport.cpp
index dede6f1..312ea01 100644
--- a/src/flowparts/writeport.cpp
+++ b/src/flowparts/writeport.cpp
@@ -23,7 +23,7 @@ Item* WritePort::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* WritePort::libraryItem()
{
return new LibraryItem(
- QString("flow/writeport"),
+ TQString("flow/writeport"),
i18n("Write to Port"),
i18n("I\\/O"),
"portwrite.png",
@@ -59,7 +59,7 @@ WritePort::~WritePort()
void WritePort::dataChanged()
{
- setCaption( i18n("Write %1 to %2").arg(dataString("0-var")).arg(dataString("1-port")) );
+ setCaption( i18n("Write %1 to %2").tqarg(dataString("0-var")).tqarg(dataString("1-port")) );
}
@@ -69,12 +69,12 @@ void WritePort::generateMicrobe( FlowCode *code )
code->addCodeBranch( outputPart("stdoutput") );
#if 0
- QString var = dataString("var");
- QString port = dataString("port");
+ TQString var = dataString("var");
+ TQString port = dataString("port");
// WTF? I don't want to do this!
-// QString newCode = "bsf STATUS,5 ; Move to bank 1\n";
- QString newCode;
+// TQString newCode = "bsf STATUS,5 ; Move to bank 1\n";
+ TQString newCode;
if ( FlowCode::isLiteral(var) ) newCode += "movlw " + var + " ; Move " + var + " to working register w\n";
else