summaryrefslogtreecommitdiffstats
path: root/src/flowparts/delay.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/flowparts/delay.cpp
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-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/flowparts/delay.cpp')
-rw-r--r--src/flowparts/delay.cpp14
1 files changed, 7 insertions, 7 deletions
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") );