summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/asmformatter.cpp54
-rw-r--r--src/asmformatter.h30
-rw-r--r--src/canvasitemparts.cpp144
-rw-r--r--src/canvasitemparts.h148
-rw-r--r--src/canvasmanipulator.cpp206
-rw-r--r--src/canvasmanipulator.h115
-rw-r--r--src/circuitdocument.cpp50
-rw-r--r--src/circuitdocument.h39
-rw-r--r--src/circuitview.cpp30
-rw-r--r--src/circuitview.h5
-rw-r--r--src/ciwidgetmgr.cpp56
-rw-r--r--src/ciwidgetmgr.h50
-rw-r--r--src/cnitem.cpp82
-rw-r--r--src/cnitem.h61
-rw-r--r--src/cnitemgroup.cpp46
-rw-r--r--src/cnitemgroup.h27
-rw-r--r--src/connector.cpp132
-rw-r--r--src/connector.h49
-rw-r--r--src/conrouter.cpp108
-rw-r--r--src/conrouter.h22
-rw-r--r--src/debugmanager.cpp10
-rw-r--r--src/debugmanager.h11
-rw-r--r--src/docmanager.cpp54
-rw-r--r--src/docmanager.h19
-rw-r--r--src/docmanageriface.cpp4
-rw-r--r--src/docmanageriface.h4
-rw-r--r--src/document.cpp36
-rw-r--r--src/document.h23
-rw-r--r--src/documentiface.cpp34
-rw-r--r--src/documentiface.h22
-rw-r--r--src/drawparts/dpline.cpp64
-rw-r--r--src/drawparts/dpline.h4
-rw-r--r--src/drawparts/dptext.cpp24
-rw-r--r--src/drawparts/dptext.h12
-rw-r--r--src/drawparts/drawpart.cpp38
-rw-r--r--src/drawparts/drawpart.h26
-rw-r--r--src/drawparts/solidshape.cpp48
-rw-r--r--src/drawparts/solidshape.h8
-rw-r--r--src/electronics/component.cpp114
-rw-r--r--src/electronics/component.h51
-rw-r--r--src/electronics/components/addac.cpp16
-rw-r--r--src/electronics/components/bidirled.cpp24
-rw-r--r--src/electronics/components/bidirled.h2
-rw-r--r--src/electronics/components/binarycounter.cpp14
-rw-r--r--src/electronics/components/bussplitter.cpp12
-rw-r--r--src/electronics/components/bussplitter.h10
-rw-r--r--src/electronics/components/demultiplexer.cpp14
-rw-r--r--src/electronics/components/demultiplexer.h6
-rw-r--r--src/electronics/components/dependentsource.cpp74
-rw-r--r--src/electronics/components/dependentsource.h14
-rw-r--r--src/electronics/components/discretelogic.cpp44
-rw-r--r--src/electronics/components/discretelogic.h10
-rw-r--r--src/electronics/components/ec555.cpp24
-rw-r--r--src/electronics/components/ec555.h2
-rw-r--r--src/electronics/components/ecbcdto7segment.cpp6
-rw-r--r--src/electronics/components/ecbjt.cpp18
-rw-r--r--src/electronics/components/ecbjt.h2
-rw-r--r--src/electronics/components/eccapacitor.cpp10
-rw-r--r--src/electronics/components/eccapacitor.h2
-rw-r--r--src/electronics/components/ecclockinput.cpp10
-rw-r--r--src/electronics/components/ecclockinput.h2
-rw-r--r--src/electronics/components/eccurrentsignal.cpp12
-rw-r--r--src/electronics/components/eccurrentsignal.h2
-rw-r--r--src/electronics/components/eccurrentsource.cpp10
-rw-r--r--src/electronics/components/eccurrentsource.h2
-rw-r--r--src/electronics/components/ecdiode.cpp14
-rw-r--r--src/electronics/components/ecdiode.h2
-rw-r--r--src/electronics/components/ecfixedvoltage.cpp10
-rw-r--r--src/electronics/components/ecfixedvoltage.h2
-rw-r--r--src/electronics/components/ecground.cpp8
-rw-r--r--src/electronics/components/ecground.h2
-rw-r--r--src/electronics/components/eckeypad.cpp28
-rw-r--r--src/electronics/components/eckeypad.h4
-rw-r--r--src/electronics/components/ecled.cpp18
-rw-r--r--src/electronics/components/ecled.h2
-rw-r--r--src/electronics/components/ecopamp.cpp20
-rw-r--r--src/electronics/components/ecopamp.h2
-rw-r--r--src/electronics/components/ecpotentiometer.cpp30
-rw-r--r--src/electronics/components/ecpotentiometer.h8
-rw-r--r--src/electronics/components/ecresistor.cpp10
-rw-r--r--src/electronics/components/ecresistor.h2
-rw-r--r--src/electronics/components/ecsevensegment.cpp38
-rw-r--r--src/electronics/components/ecsevensegment.h2
-rw-r--r--src/electronics/components/ecsignallamp.cpp10
-rw-r--r--src/electronics/components/ecsignallamp.h2
-rw-r--r--src/electronics/components/ecsubcircuit.cpp22
-rw-r--r--src/electronics/components/ecsubcircuit.h9
-rw-r--r--src/electronics/components/ecvoltagesignal.cpp12
-rw-r--r--src/electronics/components/ecvoltagesignal.h2
-rw-r--r--src/electronics/components/ecvoltagesource.cpp10
-rw-r--r--src/electronics/components/ecvoltagesource.h2
-rw-r--r--src/electronics/components/externalconnection.cpp10
-rw-r--r--src/electronics/components/externalconnection.h2
-rw-r--r--src/electronics/components/flipflop.cpp68
-rw-r--r--src/electronics/components/flipflop.h6
-rw-r--r--src/electronics/components/fulladder.cpp4
-rw-r--r--src/electronics/components/inductor.cpp8
-rw-r--r--src/electronics/components/inductor.h2
-rw-r--r--src/electronics/components/magnitudecomparator.cpp24
-rw-r--r--src/electronics/components/magnitudecomparator.h14
-rw-r--r--src/electronics/components/matrixdisplay.cpp22
-rw-r--r--src/electronics/components/matrixdisplay.h14
-rw-r--r--src/electronics/components/matrixdisplaydriver.cpp14
-rw-r--r--src/electronics/components/matrixdisplaydriver.h6
-rw-r--r--src/electronics/components/meter.cpp28
-rw-r--r--src/electronics/components/meter.h6
-rw-r--r--src/electronics/components/multiinputgate.cpp56
-rw-r--r--src/electronics/components/multiinputgate.h12
-rw-r--r--src/electronics/components/multiplexer.cpp16
-rw-r--r--src/electronics/components/multiplexer.h6
-rw-r--r--src/electronics/components/parallelportcomponent.cpp66
-rw-r--r--src/electronics/components/parallelportcomponent.h6
-rw-r--r--src/electronics/components/piccomponent.cpp88
-rw-r--r--src/electronics/components/piccomponent.h17
-rw-r--r--src/electronics/components/piccomponentpin.h4
-rw-r--r--src/electronics/components/probe.cpp26
-rw-r--r--src/electronics/components/probe.h6
-rw-r--r--src/electronics/components/pushswitch.cpp28
-rw-r--r--src/electronics/components/pushswitch.h8
-rw-r--r--src/electronics/components/ram.cpp28
-rw-r--r--src/electronics/components/ram.h12
-rw-r--r--src/electronics/components/resistordip.cpp22
-rw-r--r--src/electronics/components/resistordip.h2
-rw-r--r--src/electronics/components/rotoswitch.cpp20
-rw-r--r--src/electronics/components/rotoswitch.h8
-rw-r--r--src/electronics/components/serialportcomponent.cpp40
-rw-r--r--src/electronics/components/serialportcomponent.h4
-rw-r--r--src/electronics/components/toggleswitch.cpp34
-rw-r--r--src/electronics/components/toggleswitch.h16
-rw-r--r--src/electronics/ecnode.cpp36
-rw-r--r--src/electronics/ecnode.h19
-rw-r--r--src/electronics/gpsimprocessor.cpp154
-rw-r--r--src/electronics/gpsimprocessor.h77
-rw-r--r--src/electronics/pin.cpp20
-rw-r--r--src/electronics/pin.h24
-rw-r--r--src/electronics/port.cpp54
-rw-r--r--src/electronics/port.h20
-rw-r--r--src/electronics/simulation/capacitance.cpp6
-rw-r--r--src/electronics/simulation/capacitance.h2
-rw-r--r--src/electronics/simulation/circuit.cpp12
-rw-r--r--src/electronics/simulation/circuit.h14
-rw-r--r--src/electronics/simulation/element.cpp10
-rw-r--r--src/electronics/simulation/element.h2
-rw-r--r--src/electronics/simulation/elementset.cpp2
-rw-r--r--src/electronics/simulation/elementset.h6
-rw-r--r--src/electronics/simulation/inductance.cpp6
-rw-r--r--src/electronics/simulation/inductance.h2
-rw-r--r--src/electronics/simulation/logic.h6
-rw-r--r--src/electronics/simulation/reactive.cpp6
-rw-r--r--src/electronics/simulation/reactive.h2
-rw-r--r--src/electronics/subcircuits.cpp54
-rw-r--r--src/electronics/subcircuits.h13
-rw-r--r--src/electronics/switch.cpp10
-rw-r--r--src/electronics/switch.h19
-rw-r--r--src/electronics/wire.h10
-rw-r--r--src/eventinfo.cpp76
-rw-r--r--src/eventinfo.h34
-rw-r--r--src/filemetainfo.cpp14
-rw-r--r--src/filemetainfo.h11
-rw-r--r--src/flowcodedocument.cpp26
-rw-r--r--src/flowcodedocument.h19
-rw-r--r--src/flowcodeview.cpp18
-rw-r--r--src/flowcodeview.h3
-rw-r--r--src/flowcontainer.cpp74
-rw-r--r--src/flowcontainer.h15
-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
-rw-r--r--src/fpnode.cpp52
-rw-r--r--src/fpnode.h7
-rw-r--r--src/gui/asmformattingwidget.ui20
-rw-r--r--src/gui/colorcombo.cpp90
-rw-r--r--src/gui/colorcombo.h29
-rw-r--r--src/gui/contexthelp.cpp50
-rw-r--r--src/gui/contexthelp.h23
-rw-r--r--src/gui/createsubprojectwidget.ui14
-rw-r--r--src/gui/doublespinbox.cpp46
-rw-r--r--src/gui/doublespinbox.h21
-rw-r--r--src/gui/generaloptionswidget.ui38
-rw-r--r--src/gui/gpasmsettingswidget.ui24
-rw-r--r--src/gui/itemeditor.cpp54
-rw-r--r--src/gui/itemeditor.h23
-rw-r--r--src/gui/itemselector.cpp154
-rw-r--r--src/gui/itemselector.h66
-rw-r--r--src/gui/linkeroptionswidget.ui18
-rw-r--r--src/gui/logicwidget.ui24
-rw-r--r--src/gui/logview.cpp48
-rw-r--r--src/gui/logview.h23
-rw-r--r--src/gui/microselectwidget.cpp38
-rw-r--r--src/gui/microselectwidget.h31
-rw-r--r--src/gui/microsettingsdlg.cpp142
-rw-r--r--src/gui/microsettingsdlg.h21
-rw-r--r--src/gui/microsettingswidget.ui18
-rw-r--r--src/gui/newfiledlg.cpp62
-rw-r--r--src/gui/newfiledlg.h13
-rw-r--r--src/gui/newfilewidget.ui20
-rw-r--r--src/gui/newpinmappingwidget.ui18
-rw-r--r--src/gui/newprojectwidget.ui16
-rw-r--r--src/gui/orientationwidget.cpp62
-rw-r--r--src/gui/orientationwidget.h15
-rw-r--r--src/gui/oscilloscope.cpp62
-rw-r--r--src/gui/oscilloscope.h17
-rw-r--r--src/gui/oscilloscopeview.cpp78
-rw-r--r--src/gui/oscilloscopeview.h35
-rw-r--r--src/gui/oscilloscopewidget.ui38
-rw-r--r--src/gui/outputmethoddlg.cpp18
-rw-r--r--src/gui/outputmethoddlg.h17
-rw-r--r--src/gui/outputmethodwidget.ui22
-rw-r--r--src/gui/picprogrammerconfigwidget.ui38
-rw-r--r--src/gui/pieditor.cpp118
-rw-r--r--src/gui/pieditor.h56
-rw-r--r--src/gui/plvitem.cpp22
-rw-r--r--src/gui/plvitem.h27
-rw-r--r--src/gui/probepositioner.cpp44
-rw-r--r--src/gui/probepositioner.h23
-rw-r--r--src/gui/processingoptionswidget.ui10
-rw-r--r--src/gui/programmerdlg.cpp6
-rw-r--r--src/gui/programmerdlg.h3
-rw-r--r--src/gui/programmerwidget.ui14
-rw-r--r--src/gui/projectdlgs.cpp56
-rw-r--r--src/gui/projectdlgs.h29
-rw-r--r--src/gui/propertieslistview.cpp48
-rw-r--r--src/gui/propertieslistview.h17
-rw-r--r--src/gui/sdccoptionswidget.ui90
-rw-r--r--src/gui/settingsdlg.cpp96
-rw-r--r--src/gui/settingsdlg.h5
-rw-r--r--src/gui/symbolviewer.cpp40
-rw-r--r--src/gui/symbolviewer.h18
-rw-r--r--src/icndocument.cpp168
-rw-r--r--src/icndocument.h67
-rw-r--r--src/icnview.cpp8
-rw-r--r--src/icnview.h1
-rw-r--r--src/item.cpp148
-rw-r--r--src/item.h111
-rw-r--r--src/itemdocument.cpp294
-rw-r--r--src/itemdocument.h104
-rw-r--r--src/itemdocumentdata.cpp332
-rw-r--r--src/itemdocumentdata.h100
-rw-r--r--src/itemgroup.cpp48
-rw-r--r--src/itemgroup.h25
-rw-r--r--src/iteminterface.cpp112
-rw-r--r--src/iteminterface.h39
-rw-r--r--src/itemlibrary.cpp78
-rw-r--r--src/itemlibrary.h18
-rw-r--r--src/itemview.cpp182
-rw-r--r--src/itemview.h64
-rw-r--r--src/katemdi.cpp144
-rw-r--r--src/katemdi.h78
-rw-r--r--src/ktechlab.cpp252
-rw-r--r--src/ktechlab.h51
-rw-r--r--src/languages/asmparser.cpp42
-rw-r--r--src/languages/asmparser.h10
-rw-r--r--src/languages/externallanguage.cpp44
-rw-r--r--src/languages/externallanguage.h15
-rw-r--r--src/languages/flowcode.cpp78
-rw-r--r--src/languages/flowcode.h28
-rw-r--r--src/languages/gpasm.cpp14
-rw-r--r--src/languages/gpasm.h6
-rw-r--r--src/languages/gpdasm.cpp36
-rw-r--r--src/languages/gpdasm.h12
-rw-r--r--src/languages/gplib.cpp32
-rw-r--r--src/languages/gplib.h8
-rw-r--r--src/languages/gplink.cpp34
-rw-r--r--src/languages/gplink.h8
-rw-r--r--src/languages/language.cpp42
-rw-r--r--src/languages/language.h66
-rw-r--r--src/languages/languagemanager.cpp26
-rw-r--r--src/languages/languagemanager.h21
-rw-r--r--src/languages/microbe.cpp24
-rw-r--r--src/languages/microbe.h10
-rw-r--r--src/languages/picprogrammer.cpp104
-rw-r--r--src/languages/picprogrammer.h34
-rw-r--r--src/languages/processchain.cpp34
-rw-r--r--src/languages/processchain.h16
-rw-r--r--src/languages/sdcc.cpp16
-rw-r--r--src/languages/sdcc.h8
-rw-r--r--src/languages/sourceline.cpp2
-rw-r--r--src/languages/sourceline.h8
-rw-r--r--src/libraryitem.cpp14
-rw-r--r--src/libraryitem.h32
-rw-r--r--src/mechanics/chassiscircular2.cpp34
-rw-r--r--src/mechanics/chassiscircular2.h6
-rw-r--r--src/mechanics/mechanicsdocument.cpp24
-rw-r--r--src/mechanics/mechanicsdocument.h21
-rw-r--r--src/mechanics/mechanicsgroup.cpp48
-rw-r--r--src/mechanics/mechanicsgroup.h13
-rw-r--r--src/mechanics/mechanicsitem.cpp44
-rw-r--r--src/mechanics/mechanicsitem.h25
-rw-r--r--src/mechanics/mechanicssimulation.cpp24
-rw-r--r--src/mechanics/mechanicssimulation.h21
-rw-r--r--src/mechanics/mechanicsview.cpp2
-rw-r--r--src/mechanics/mechanicsview.h3
-rw-r--r--src/micro/asminfo.cpp8
-rw-r--r--src/micro/asminfo.h24
-rw-r--r--src/micro/microinfo.cpp8
-rw-r--r--src/micro/microinfo.h6
-rw-r--r--src/micro/microlibrary.cpp6
-rw-r--r--src/micro/microlibrary.h12
-rw-r--r--src/micro/micropackage.cpp16
-rw-r--r--src/micro/micropackage.h30
-rw-r--r--src/microsettings.cpp66
-rw-r--r--src/microsettings.h64
-rw-r--r--src/node.cpp70
-rw-r--r--src/node.h45
-rw-r--r--src/nodegroup.cpp48
-rw-r--r--src/nodegroup.h23
-rw-r--r--src/oscilloscopedata.cpp4
-rw-r--r--src/oscilloscopedata.h16
-rw-r--r--src/picitem.cpp106
-rw-r--r--src/picitem.h26
-rw-r--r--src/projectmanager.cpp252
-rw-r--r--src/projectmanager.h116
-rw-r--r--src/recentfilesaction.cpp48
-rw-r--r--src/recentfilesaction.h9
-rw-r--r--src/resizeoverlay.cpp122
-rw-r--r--src/resizeoverlay.h47
-rw-r--r--src/simulator.cpp14
-rw-r--r--src/simulator.h9
-rw-r--r--src/textdocument.cpp122
-rw-r--r--src/textdocument.h37
-rw-r--r--src/textview.cpp94
-rw-r--r--src/textview.h32
-rw-r--r--src/variablelabel.cpp24
-rw-r--r--src/variablelabel.h15
-rw-r--r--src/variant.cpp26
-rw-r--r--src/variant.h67
-rw-r--r--src/view.cpp50
-rw-r--r--src/view.h28
-rw-r--r--src/viewcontainer.cpp100
-rw-r--r--src/viewcontainer.h62
354 files changed, 6339 insertions, 6221 deletions
diff --git a/src/asmformatter.cpp b/src/asmformatter.cpp
index fb77789..2dc1c79 100644
--- a/src/asmformatter.cpp
+++ b/src/asmformatter.cpp
@@ -14,9 +14,9 @@
#include "picinfo14bit.h"
#include "picinfo16bit.h"
-static QString extractComment( const QString & line )
+static TQString extractComment( const TQString & line )
{
- int pos = line.find( ';' );
+ int pos = line.tqfind( ';' );
if ( pos == -1 )
return "";
@@ -36,7 +36,7 @@ AsmFormatter::~AsmFormatter()
}
-QString AsmFormatter::tidyAsm( QStringList lines )
+TQString AsmFormatter::tidyAsm( TQStringList lines )
{
// Update our indentation values from config
m_indentAsmName = KTLConfig::indentAsmName();
@@ -45,8 +45,8 @@ QString AsmFormatter::tidyAsm( QStringList lines )
m_indentEquValue = KTLConfig::indentEquValue();
m_indentComment = m_indentEquComment = KTLConfig::indentComment();
- QStringList::iterator end = lines.end();
- for ( QStringList::iterator slit = lines.begin(); slit != end; ++slit )
+ TQStringList::iterator end = lines.end();
+ for ( TQStringList::iterator slit = lines.begin(); slit != end; ++slit )
{
switch ( lineType(*slit) )
{
@@ -63,31 +63,31 @@ QString AsmFormatter::tidyAsm( QStringList lines )
}
}
- QString code;
+ TQString code;
- for ( QStringList::iterator slit = lines.begin(); slit != end; ++slit )
+ for ( TQStringList::iterator slit = lines.begin(); slit != end; ++slit )
code.append( *slit + '\n' );
return code;
}
-void AsmFormatter::pad( QString & text, int length )
+void AsmFormatter::pad( TQString & text, int length )
{
int padLength = length - text.length();
if ( padLength <= 0 )
return;
- QString pad;
+ TQString pad;
pad.fill( ' ', padLength );
text += pad;
}
-QString AsmFormatter::tidyInstruction( const QString & oldLine )
+TQString AsmFormatter::tidyInstruction( const TQString & oldLine )
{
InstructionParts parts( oldLine );
- QString line;
+ TQString line;
if ( !parts.label().isEmpty() )
line = parts.label() + ' ';
@@ -114,16 +114,16 @@ QString AsmFormatter::tidyInstruction( const QString & oldLine )
}
-QString AsmFormatter::tidyEqu( const QString & oldLine )
+TQString AsmFormatter::tidyEqu( const TQString & oldLine )
{
- QString comment = extractComment( oldLine );
- QString code = oldLine;
+ TQString comment = extractComment( oldLine );
+ TQString code = oldLine;
code.remove( comment );
code = code.simplifyWhiteSpace();
- QStringList parts = QStringList::split( ' ', code );
+ TQStringList parts = TQStringList::split( ' ', code );
- QString pad0, pad1, pad2;
+ TQString pad0, pad1, pad2;
pad0.fill( ' ', m_indentEqu - (*parts.at(0)).length() );
pad1.fill( ' ', m_indentEquValue - m_indentEqu - (*parts.at(1)).length() );
pad2.fill( ' ', m_indentEquComment - m_indentEquValue - m_indentEqu - (*parts.at(2)).length() );
@@ -141,15 +141,15 @@ QString AsmFormatter::tidyEqu( const QString & oldLine )
}
-AsmFormatter::LineType AsmFormatter::lineType( QString line )
+AsmFormatter::LineType AsmFormatter::lineType( TQString line )
{
line = line.simplifyWhiteSpace();
line.remove( extractComment( line ) );
- QStringList parts = QStringList::split( ' ', line );
- QStringList::iterator end = parts.end();
- for ( QStringList::iterator it = parts.begin(); it != end; ++it )
+ TQStringList parts = TQStringList::split( ' ', line );
+ TQStringList::iterator end = parts.end();
+ for ( TQStringList::iterator it = parts.begin(); it != end; ++it )
{
if ( (*it).lower() == "equ" )
return Equ;
@@ -166,17 +166,17 @@ AsmFormatter::LineType AsmFormatter::lineType( QString line )
//BEGIN class InstructionParts
-InstructionParts::InstructionParts( QString line )
+InstructionParts::InstructionParts( TQString line )
{
m_comment = extractComment( line );
line.remove( m_comment );
line = line.simplifyWhiteSpace();
- QStringList parts = QStringList::split( ' ', line );
+ TQStringList parts = TQStringList::split( ' ', line );
bool foundOperand = false;
- QStringList::iterator end = parts.end();
- for ( QStringList::iterator it = parts.begin(); it != end; ++it )
+ TQStringList::iterator end = parts.end();
+ for ( TQStringList::iterator it = parts.begin(); it != end; ++it )
{
if ( foundOperand )
{
@@ -191,9 +191,9 @@ InstructionParts::InstructionParts( QString line )
continue;
}
- if ( PicAsm12bit::self()->operandList().contains( (*it).upper() )
- || PicAsm14bit::self()->operandList().contains( (*it).upper() )
- || PicAsm16bit::self()->operandList().contains( (*it).upper() ) )
+ if ( PicAsm12bit::self()->operandList().tqcontains( (*it).upper() )
+ || PicAsm14bit::self()->operandList().tqcontains( (*it).upper() )
+ || PicAsm16bit::self()->operandList().tqcontains( (*it).upper() ) )
{
m_operand = *it;
foundOperand = true;
diff --git a/src/asmformatter.h b/src/asmformatter.h
index a6fa361..f4867cb 100644
--- a/src/asmformatter.h
+++ b/src/asmformatter.h
@@ -11,7 +11,7 @@
#ifndef ASMFORMATTER_H
#define ASMFORMATTER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
@author David Saxton
@@ -22,18 +22,18 @@ class InstructionParts
/**
* Breaks up the line into parts.
*/
- InstructionParts( QString line );
+ InstructionParts( TQString line );
- QString label() const { return m_label; }
- QString operand() const { return m_operand; }
- QString operandData() const { return m_operandData; }
- QString comment() const { return m_comment; }
+ TQString label() const { return m_label; }
+ TQString operand() const { return m_operand; }
+ TQString operandData() const { return m_operandData; }
+ TQString comment() const { return m_comment; }
protected:
- QString m_label;
- QString m_operand;
- QString m_operandData;
- QString m_comment; ///< includes the ";" part
+ TQString m_label;
+ TQString m_operand;
+ TQString m_operandData;
+ TQString m_comment; ///< includes the ";" part
};
/**
@@ -52,18 +52,18 @@ class AsmFormatter
Other, // eg comments, __config
};
- QString tidyAsm( QStringList lines );
+ TQString tidyAsm( TQStringList lines );
- static LineType lineType( QString line );
+ static LineType lineType( TQString line );
protected:
- QString tidyInstruction( const QString & line );
- QString tidyEqu( const QString & line );
+ TQString tidyInstruction( const TQString & line );
+ TQString tidyEqu( const TQString & line );
/**
* Appends spaces to the end of text until it is greater or equakl to
* length.
*/
- static void pad( QString & text, int length );
+ static void pad( TQString & text, int length );
int m_indentAsmName;
int m_indentAsmData;
diff --git a/src/canvasitemparts.cpp b/src/canvasitemparts.cpp
index 7f4b03d..dc98647 100644
--- a/src/canvasitemparts.cpp
+++ b/src/canvasitemparts.cpp
@@ -13,20 +13,20 @@
#include "cnitem.h"
#include "icndocument.h"
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN Class GuiPart
-GuiPart::GuiPart( CNItem *parent, const QRect & r, QCanvas * canvas )
- : QObject(parent),
- QCanvasRectangle( r, canvas ),
+GuiPart::GuiPart( CNItem *tqparent, const TQRect & r, TQCanvas * canvas )
+ : TQObject(tqparent),
+ TQCanvasRectangle( r, canvas ),
m_angleDegrees(0),
- p_parent(parent),
+ p_parent(tqparent),
b_pointsAdded(false),
m_originalRect(r)
{
- connect( parent, SIGNAL(movedBy(double, double )), this, SLOT(slotMoveBy(double, double )) );
- setZ( parent->z() + 0.5 );
+ connect( tqparent, TQT_SIGNAL(movedBy(double, double )), this, TQT_SLOT(slotMoveBy(double, double )) );
+ setZ( tqparent->z() + 0.5 );
}
@@ -53,7 +53,7 @@ void GuiPart::setGuiPartSize( int width, int height )
}
-void GuiPart::initPainter( QPainter &p )
+void GuiPart::initPainter( TQPainter &p )
{
if ( (m_angleDegrees%180) == 0 )
return;
@@ -64,7 +64,7 @@ void GuiPart::initPainter( QPainter &p )
}
-void GuiPart::deinitPainter( QPainter &p )
+void GuiPart::deinitPainter( TQPainter &p )
{
if ( (m_angleDegrees%180) == 0 )
return;
@@ -117,12 +117,12 @@ void GuiPart::updateConnectorPoints( bool add )
}
-QRect GuiPart::drawRect()
+TQRect GuiPart::drawRect()
{
- QRect dr = rect();
+ TQRect dr = rect();
if ( m_angleDegrees%180 != 0 )
{
- QWMatrix m;
+ TQWMatrix m;
m.translate( int(x()+(width()/2)), int(y()+(height()/2)) );
if ( (m_angleDegrees%180) != 0 )
@@ -139,8 +139,8 @@ QRect GuiPart::drawRect()
//BEGIN Class Text
-Text::Text( const QString &text, CNItem *parent, const QRect & r, QCanvas * canvas, int flags )
- : GuiPart( parent, r, canvas )
+Text::Text( const TQString &text, CNItem *tqparent, const TQRect & r, TQCanvas * canvas, int flags )
+ : GuiPart( tqparent, r, canvas )
{
m_flags = flags;
setText(text);
@@ -152,7 +152,7 @@ Text::~Text()
}
-bool Text::setText( const QString & text )
+bool Text::setText( const TQString & text )
{
if ( m_text == text )
return false;
@@ -171,7 +171,7 @@ void Text::setFlags( int flags )
}
-void Text::drawShape( QPainter & p )
+void Text::drawShape( TQPainter & p )
{
initPainter(p);
p.setFont( p_parent->font() );
@@ -180,17 +180,17 @@ void Text::drawShape( QPainter & p )
}
-QRect Text::recommendedRect() const
+TQRect Text::recommendedRect() const
{
- return QFontMetrics( p_parent->font() ).boundingRect( m_originalRect.x(), m_originalRect.y(), m_originalRect.width(), m_originalRect.height(), m_flags, m_text );
+ return TQFontMetrics( p_parent->font() ).boundingRect( m_originalRect.x(), m_originalRect.y(), m_originalRect.width(), m_originalRect.height(), m_flags, m_text );
}
//END Class Text
//BEGIN Class Widget
-Widget::Widget( const QString & id, CNItem * parent, const QRect & r, QCanvas * canvas )
- : GuiPart( parent, r, canvas )
+Widget::Widget( const TQString & id, CNItem * tqparent, const TQRect & r, TQCanvas * canvas )
+ : GuiPart( tqparent, r, canvas )
{
m_id = id;
show();
@@ -217,7 +217,7 @@ void Widget::posChanged()
{
// Swap around the width / height if we are rotated at a non-half way around
if ( m_angleDegrees%90 != 0 )
- widget()->setFixedSize( QSize( height(), width() ) );
+ widget()->setFixedSize( TQSize( height(), width() ) );
else
widget()->setFixedSize( size() );
@@ -225,30 +225,30 @@ void Widget::posChanged()
}
-void Widget::drawShape( QPainter &p )
+void Widget::drawShape( TQPainter &p )
{
// initPainter(p);
- p.drawPixmap( int(x()), int(y()), QPixmap::grabWidget( widget() ) );
+ p.drawPixmap( int(x()), int(y()), TQPixmap::grabWidget( widget() ) );
// deinitPainter(p);
}
//END Class Widget
//BEGIN Class ToolButton
-ToolButton::ToolButton( QWidget *parent )
- : QToolButton(parent)
+ToolButton::ToolButton( TQWidget *tqparent )
+ : TQToolButton(tqparent)
{
m_angleDegrees = 0;
- if ( QFontInfo(m_font).pixelSize() > 11 ) // It has to be > 11, not > 12, as (I think) pixelSize() rounds off the actual size
+ if ( TQFontInfo(m_font).pixelSize() > 11 ) // It has to be > 11, not > 12, as (I think) pixelSize() rounds off the actual size
m_font.setPixelSize(12);
}
-void ToolButton::drawButtonLabel( QPainter * p )
+void ToolButton::drawButtonLabel( TQPainter * p )
{
if ( m_angleDegrees % 180 == 0 || text().isEmpty() )
{
- QToolButton::drawButtonLabel(p);
+ TQToolButton::drawButtonLabel(p);
return;
}
@@ -263,8 +263,8 @@ void ToolButton::drawButtonLabel( QPainter * p )
int m = width() > height() ? width() : height();
- p->setPen( Qt::black );
- p->drawText( isDown()?1:0, isDown()?1:0, m, m, Qt::AlignVCenter | Qt::AlignHCenter, text() );
+ p->setPen( TQt::black );
+ p->drawText( isDown()?1:0, isDown()?1:0, m, m, TQt::AlignVCenter | TQt::AlignHCenter, text() );
p->translate( dy-dx, 0 );
@@ -276,15 +276,15 @@ void ToolButton::drawButtonLabel( QPainter * p )
//BEGIN Class Button
-Button::Button( const QString & id, CNItem * parent, bool isToggle, const QRect & r, QCanvas * canvas )
- : Widget( id, parent, r, canvas )
+Button::Button( const TQString & id, CNItem * tqparent, bool isToggle, const TQRect & r, TQCanvas * canvas )
+ : Widget( id, tqparent, r, canvas )
{
b_isToggle = isToggle;
m_button = new ToolButton(0l);
m_button->setUsesTextLabel(false);
m_button->setToggleButton(b_isToggle);
- connect( m_button, SIGNAL(pressed()), this, SLOT(slotStateChanged()) );
- connect( m_button, SIGNAL(released()), this, SLOT(slotStateChanged()) );
+ connect( m_button, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotStateChanged()) );
+ connect( m_button, TQT_SIGNAL(released()), this, TQT_SLOT(slotStateChanged()) );
posChanged();
}
@@ -319,13 +319,13 @@ void Button::posChanged()
void Button::slotStateChanged()
{
- parent()->buttonStateChanged( id(), m_button->isDown() || m_button->isOn() );
+ tqparent()->buttonStateChanged( id(), m_button->isDown() || m_button->isOn() );
}
-QWidget* Button::widget() const
+TQWidget* Button::widget() const
{
return m_button;
}
-void Button::setPixmap( const QPixmap &p )
+void Button::setPixmap( const TQPixmap &p )
{
m_button->setPixmap(p);
}
@@ -350,23 +350,23 @@ bool Button::state() const
}
-QRect Button::recommendedRect() const
+TQRect Button::recommendedRect() const
{
- QSize sizeHint = m_button->sizeHint();
- if ( sizeHint.width() < m_originalRect.width() )
- sizeHint.setWidth( m_originalRect.width() );
+ TQSize tqsizeHint = m_button->tqsizeHint();
+ if ( tqsizeHint.width() < m_originalRect.width() )
+ tqsizeHint.setWidth( m_originalRect.width() );
// Hmm...for now, lets just keep the recomended rect the same height as the original rect
- sizeHint.setHeight( m_originalRect.height() );
+ tqsizeHint.setHeight( m_originalRect.height() );
- int hdw = (sizeHint.width() - m_originalRect.width())/2;
- int hdh = (sizeHint.height() - m_originalRect.height())/2;
+ int hdw = (tqsizeHint.width() - m_originalRect.width())/2;
+ int hdh = (tqsizeHint.height() - m_originalRect.height())/2;
- return QRect( m_originalRect.x()-hdw, m_originalRect.y()-hdh, sizeHint.width(), sizeHint.height() );
+ return TQRect( m_originalRect.x()-hdw, m_originalRect.y()-hdh, tqsizeHint.width(), tqsizeHint.height() );
}
-void Button::setText( const QString &text )
+void Button::setText( const TQString &text )
{
if ( m_button->text() == text )
return;
@@ -381,12 +381,12 @@ void Button::setText( const QString &text )
}
-void Button::mousePressEvent( QMouseEvent *e )
+void Button::mousePressEvent( TQMouseEvent *e )
{
if ( !m_button->isEnabled() )
return;
- QMouseEvent event( QEvent::MouseButtonPress, e->pos()-QPoint(int(x()),int(y())), e->button(), e->state() );
+ TQMouseEvent event( TQEvent::MouseButtonPress, e->pos()-TQPoint(int(x()),int(y())), e->button(), e->state() );
m_button->mousePressEvent(&event);
if (event.isAccepted())
e->accept();
@@ -394,9 +394,9 @@ void Button::mousePressEvent( QMouseEvent *e )
}
-void Button::mouseReleaseEvent( QMouseEvent *e )
+void Button::mouseReleaseEvent( TQMouseEvent *e )
{
- QMouseEvent event( QEvent::MouseButtonRelease, e->pos()-QPoint(int(x()),int(y())), e->button(), e->state() );
+ TQMouseEvent event( TQEvent::MouseButtonRelease, e->pos()-TQPoint(int(x()),int(y())), e->button(), e->state() );
m_button->mouseReleaseEvent(&event);
if (event.isAccepted())
e->accept();
@@ -425,8 +425,8 @@ void Button::leaveEvent()
//BEGIN Class SliderWidget
-SliderWidget::SliderWidget( QWidget *parent )
- : QSlider(parent)
+SliderWidget::SliderWidget( TQWidget *tqparent )
+ : TQSlider(tqparent)
{
setWFlags(WNoAutoErase|WRepaintNoErase);
}
@@ -434,16 +434,16 @@ SliderWidget::SliderWidget( QWidget *parent )
//BEGIN Class Slider
-Slider::Slider( const QString & id, CNItem * parent, const QRect & r, QCanvas * canvas )
- : Widget( id, parent, r, canvas )
+Slider::Slider( const TQString & id, CNItem * tqparent, const TQRect & r, TQCanvas * canvas )
+ : Widget( id, tqparent, r, canvas )
{
m_orientation = Qt::Vertical;
m_slider = new SliderWidget(0l);
- m_slider->setPaletteBackgroundColor(Qt::white);
- m_slider->setPaletteForegroundColor(Qt::white);
- m_slider->setEraseColor(Qt::white);
- m_slider->setBackgroundMode( Qt::NoBackground );
- connect( m_slider, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)) );
+ m_slider->setPaletteBackgroundColor(TQt::white);
+ m_slider->setPaletteForegroundColor(TQt::white);
+ m_slider->setEraseColor(TQt::white);
+ m_slider->setBackgroundMode( TQt::NoBackground );
+ connect( m_slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int)) );
posChanged();
}
@@ -454,7 +454,7 @@ Slider::~Slider()
}
-QWidget* Slider::widget() const
+TQWidget* Slider::widget() const
{
return m_slider;
}
@@ -471,44 +471,44 @@ void Slider::setValue( int value )
}
-void Slider::mousePressEvent( QMouseEvent *e )
+void Slider::mousePressEvent( TQMouseEvent *e )
{
- QMouseEvent event( QEvent::MouseButtonPress, e->pos()-QPoint(int(x()),int(y())), e->button(), e->state() );
+ TQMouseEvent event( TQEvent::MouseButtonPress, e->pos()-TQPoint(int(x()),int(y())), e->button(), e->state() );
m_slider->mousePressEvent(&event);
if (event.isAccepted())
e->accept();
canvas()->setChanged( rect() );
}
-void Slider::mouseReleaseEvent( QMouseEvent *e )
+void Slider::mouseReleaseEvent( TQMouseEvent *e )
{
- QMouseEvent event( QEvent::MouseButtonRelease, e->pos()-QPoint(int(x()),int(y())), e->button(), e->state() );
+ TQMouseEvent event( TQEvent::MouseButtonRelease, e->pos()-TQPoint(int(x()),int(y())), e->button(), e->state() );
m_slider->mouseReleaseEvent(&event);
if (event.isAccepted())
e->accept();
canvas()->setChanged( rect() );
}
-void Slider::mouseDoubleClickEvent ( QMouseEvent *e )
+void Slider::mouseDoubleClickEvent ( TQMouseEvent *e )
{
- QMouseEvent event( QEvent::MouseButtonDblClick, e->pos()-QPoint(int(x()),int(y())), e->button(), e->state() );
+ TQMouseEvent event( TQEvent::MouseButtonDblClick, e->pos()-TQPoint(int(x()),int(y())), e->button(), e->state() );
m_slider->mouseDoubleClickEvent(&event);
if (event.isAccepted())
e->accept();
canvas()->setChanged( rect() );
}
-void Slider::mouseMoveEvent( QMouseEvent *e )
+void Slider::mouseMoveEvent( TQMouseEvent *e )
{
- QMouseEvent event( QEvent::MouseMove, e->pos()-QPoint(int(x()),int(y())), e->button(), e->state() );
+ TQMouseEvent event( TQEvent::MouseMove, e->pos()-TQPoint(int(x()),int(y())), e->button(), e->state() );
m_slider->mouseMoveEvent(&event);
if (event.isAccepted())
e->accept();
}
-void Slider::wheelEvent( QWheelEvent *e )
+void Slider::wheelEvent( TQWheelEvent *e )
{
- QWheelEvent event( e->pos()-QPoint(int(x()),int(y())), e->delta(), e->state(), e->orientation() );
+ TQWheelEvent event( e->pos()-TQPoint(int(x()),int(y())), e->delta(), e->state(), e->orientation() );
m_slider->wheelEvent(&event);
if (event.isAccepted())
e->accept();
@@ -527,8 +527,8 @@ void Slider::leaveEvent()
void Slider::slotValueChanged( int value )
{
- parent()->itemDocument()->setModified(true);
- parent()->sliderValueChanged(id(),value);
+ tqparent()->itemDocument()->setModified(true);
+ tqparent()->sliderValueChanged(id(),value);
}
void Slider::setOrientation( Qt::Orientation o )
diff --git a/src/canvasitemparts.h b/src/canvasitemparts.h
index 44bd6be..f2fee2b 100644
--- a/src/canvasitemparts.h
+++ b/src/canvasitemparts.h
@@ -11,32 +11,33 @@
#ifndef CANVASITEMPARTS_H
#define CANVASITEMPARTS_H
-#include <qcanvas.h>
-#include <qguardedptr.h>
-#include <qslider.h>
-#include <qtoolbutton.h>
+#include <tqcanvas.h>
+#include <tqguardedptr.h>
+#include <tqslider.h>
+#include <tqtoolbutton.h>
class Cells;
class CIWidgetMgr;
class CNItem;
class SliderWidget;
class ToolButton;
-class QString;
+class TQString;
-class GuiPart : public QObject, public QCanvasRectangle
+class GuiPart : public TQObject, public TQCanvasRectangle
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a GuiPart. Control the position using setGuiPartSize, instead
- * of calling QCanvasRectangle::setSize. This allows GuiPart to know
+ * of calling TQCanvasRectangle::setSize. This allows GuiPart to know
* when its size has been changed
*/
- GuiPart( CNItem *parent, const QRect & r, QCanvas * canvas );
+ GuiPart( CNItem *tqparent, const TQRect & r, TQCanvas * canvas );
virtual ~GuiPart();
- virtual QRect recommendedRect() const { return m_originalRect; }
- void setOriginalRect( const QRect & r ) { m_originalRect = r; }
+ virtual TQRect recommendedRect() const { return m_originalRect; }
+ void setOriginalRect( const TQRect & r ) { m_originalRect = r; }
virtual void updateConnectorPoints( bool add );
@@ -49,18 +50,18 @@ class GuiPart : public QObject, public QCanvasRectangle
*/
void setAngleDegrees( int angleDegrees );
/**
- * Control the size. Call this instead of QCanvasRectangle::setSize. In
+ * Control the size. Call this instead of TQCanvasRectangle::setSize. In
* turn, this function will notify subclasses via posChanged();
*/
void setGuiPartSize( int width, int height );
/**
* Returns the rectangle to draw in to compensate for rotation of
- * the QPainter
+ * the TQPainter
*/
- QRect drawRect();
+ TQRect drawRect();
int angleDegrees() const { return m_angleDegrees; }
- CNItem *parent() const { return p_parent; }
+ CNItem *tqparent() const { return p_parent; }
protected:
/**
@@ -71,16 +72,16 @@ class GuiPart : public QObject, public QCanvasRectangle
* Rotate / etc the painter. You must call deinitPainter after
* calling this function.
*/
- void initPainter( QPainter & p );
+ void initPainter( TQPainter & p );
/**
* Complement function to initPainter - restores painter to normal
* transform
*/
- void deinitPainter( QPainter & p );
+ void deinitPainter( TQPainter & p );
int m_angleDegrees;
CNItem *p_parent;
bool b_pointsAdded;
- QRect m_originalRect;
+ TQRect m_originalRect;
private slots:
void slotMoveBy( double dx, double dy );
@@ -94,20 +95,21 @@ class GuiPart : public QObject, public QCanvasRectangle
class Text : public GuiPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- Text( const QString &text, CNItem *parent, const QRect & r, QCanvas * canvas, int flags = Qt::AlignHCenter | Qt::AlignVCenter );
+ Text( const TQString &text, CNItem *tqparent, const TQRect & r, TQCanvas * canvas, int flags = TQt::AlignHCenter | TQt::AlignVCenter );
~Text();
/**
* Set the text, returning true if the size of this Text on the canvas
* has changed.
*/
- bool setText( const QString & text );
- virtual QRect recommendedRect() const;
- virtual void drawShape ( QPainter & p );
+ bool setText( const TQString & text );
+ virtual TQRect recommendedRect() const;
+ virtual void drawShape ( TQPainter & p );
/**
- * The text flags (see QPainter::drawText) - Qt::AlignmentFlags and
- * Qt::TextFlags OR'd together.
+ * The text flags (see TQPainter::drawText) - TQt::AlignmentFlags and
+ * TQt::TextFlags OR'd together.
*/
int flags() const { return m_flags; }
/**
@@ -116,26 +118,26 @@ class Text : public GuiPart
void setFlags( int flags );
protected:
- QString m_text;
+ TQString m_text;
int m_flags;
};
-typedef QMap<QString, QGuardedPtr<Text> > TextMap;
+typedef TQMap<TQString, TQGuardedPtr<Text> > TextMap;
/**
-@short Base class for embedding Qt Widgets into the canvas
+@short Base class for embedding TQt Widgets into the canvas
@author David Saxton
*/
class Widget : public GuiPart
{
public:
- Widget( const QString & id, CNItem *parent, const QRect & r, QCanvas * canvas );
+ Widget( const TQString & id, CNItem *tqparent, const TQRect & r, TQCanvas * canvas );
~Widget();
virtual int rtti() const;
- virtual QWidget *widget() const = 0;
- QString id() const { return m_id; }
+ virtual TQWidget *widget() const = 0;
+ TQString id() const { return m_id; }
/**
* Set the widget enabled/disabled
@@ -148,52 +150,52 @@ class Widget : public GuiPart
/**
* Mouse was pressed. pos is given relative to CNItem position.
*/
- virtual void mousePressEvent( QMouseEvent *e ) { Q_UNUSED(e); }
+ virtual void mousePressEvent( TQMouseEvent *e ) { Q_UNUSED(e); }
/**
* Mouse was released. pos is given relative to CNItem position.
*/
- virtual void mouseReleaseEvent( QMouseEvent *e ) { Q_UNUSED(e); }
+ virtual void mouseReleaseEvent( TQMouseEvent *e ) { Q_UNUSED(e); }
/**
* Mouse was double clicked. pos is given relative to CNItem position.
*/
- virtual void mouseDoubleClickEvent( QMouseEvent *e ) { Q_UNUSED(e); }
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e ) { Q_UNUSED(e); }
/**
* Mouse was moved. pos is given relative to CNItem position.
*/
- virtual void mouseMoveEvent( QMouseEvent *e ) { Q_UNUSED(e); }
+ virtual void mouseMoveEvent( TQMouseEvent *e ) { Q_UNUSED(e); }
/**
* Mouse was scrolled. pos is given relative to CNItem position.
*/
- virtual void wheelEvent( QWheelEvent *e ) { Q_UNUSED(e); }
+ virtual void wheelEvent( TQWheelEvent *e ) { Q_UNUSED(e); }
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
protected:
virtual void posChanged();
- QString m_id;
+ TQString m_id;
};
-class ToolButton : public QToolButton
+class ToolButton : public TQToolButton
{
public:
- ToolButton( QWidget* parent );
+ ToolButton( TQWidget* tqparent );
- virtual void mousePressEvent( QMouseEvent *e ) { QToolButton::mousePressEvent(e); }
- virtual void mouseReleaseEvent( QMouseEvent *e ) { QToolButton::mouseReleaseEvent(e); }
- virtual void mouseDoubleClickEvent ( QMouseEvent *e ) { QToolButton::mouseDoubleClickEvent(e); }
- virtual void mouseMoveEvent( QMouseEvent *e ) { QToolButton::mouseMoveEvent(e); }
- virtual void wheelEvent( QWheelEvent *e ) { QToolButton::wheelEvent(e); }
- virtual void enterEvent() { QToolButton::enterEvent(0l); }
- virtual void leaveEvent() { QToolButton::leaveEvent(0l); }
+ virtual void mousePressEvent( TQMouseEvent *e ) { TQToolButton::mousePressEvent(e); }
+ virtual void mouseReleaseEvent( TQMouseEvent *e ) { TQToolButton::mouseReleaseEvent(e); }
+ virtual void mouseDoubleClickEvent ( TQMouseEvent *e ) { TQToolButton::mouseDoubleClickEvent(e); }
+ virtual void mouseMoveEvent( TQMouseEvent *e ) { TQToolButton::mouseMoveEvent(e); }
+ virtual void wheelEvent( TQWheelEvent *e ) { TQToolButton::wheelEvent(e); }
+ virtual void enterEvent() { TQToolButton::enterEvent(0l); }
+ virtual void leaveEvent() { TQToolButton::leaveEvent(0l); }
void setAngleDegrees( int angleDegrees ) { m_angleDegrees = angleDegrees; }
protected:
- virtual void drawButtonLabel( QPainter * p );
+ virtual void drawButtonLabel( TQPainter * p );
int m_angleDegrees;
- QFont m_font;
+ TQFont m_font;
};
@@ -204,26 +206,27 @@ class ToolButton : public QToolButton
class Button : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Button( const QString & id, CNItem *parent, bool isToggle, const QRect & r, QCanvas * canvas );
+ Button( const TQString & id, CNItem *tqparent, bool isToggle, const TQRect & r, TQCanvas * canvas );
~Button();
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
virtual void enterEvent();
virtual void leaveEvent();
/**
* Set the text displayed inside the button
*/
- void setText( const QString &text );
+ void setText( const TQString &text );
void setToggle( bool toggle );
bool isToggle() const { return b_isToggle; }
- virtual QWidget *widget() const;
+ virtual TQWidget *widget() const;
bool state() const;
- void setPixmap( const QPixmap & );
+ void setPixmap( const TQPixmap & );
void setState( bool state );
- virtual QRect recommendedRect() const;
+ virtual TQRect recommendedRect() const;
protected:
virtual void posChanged();
@@ -237,41 +240,42 @@ class Button : public Widget
};
-class SliderWidget : public QSlider
+class SliderWidget : public TQSlider
{
public:
- SliderWidget( QWidget* parent );
+ SliderWidget( TQWidget* tqparent );
- virtual void mousePressEvent( QMouseEvent *e ) { QSlider::mousePressEvent(e); }
- virtual void mouseReleaseEvent( QMouseEvent *e ) { QSlider::mouseReleaseEvent(e); }
- virtual void mouseDoubleClickEvent ( QMouseEvent *e ) { QSlider::mouseDoubleClickEvent(e); }
- virtual void mouseMoveEvent( QMouseEvent *e ) { QSlider::mouseMoveEvent(e); }
- virtual void wheelEvent( QWheelEvent *e ) { QSlider::wheelEvent(e); }
- virtual void enterEvent() { QSlider::enterEvent(0l); }
- virtual void leaveEvent() { QSlider::leaveEvent(0l); }
+ virtual void mousePressEvent( TQMouseEvent *e ) { TQSlider::mousePressEvent(e); }
+ virtual void mouseReleaseEvent( TQMouseEvent *e ) { TQSlider::mouseReleaseEvent(e); }
+ virtual void mouseDoubleClickEvent ( TQMouseEvent *e ) { TQSlider::mouseDoubleClickEvent(e); }
+ virtual void mouseMoveEvent( TQMouseEvent *e ) { TQSlider::mouseMoveEvent(e); }
+ virtual void wheelEvent( TQWheelEvent *e ) { TQSlider::wheelEvent(e); }
+ virtual void enterEvent() { TQSlider::enterEvent((TQEvent*)0l); }
+ virtual void leaveEvent() { TQSlider::leaveEvent((TQEvent*)0l); }
};
/**
-@short Stores internal information about a QSlider associated with CNItem
+@short Stores internal information about a TQSlider associated with CNItem
@author David Saxton
*/
class Slider : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Slider( const QString & id, CNItem *parent, const QRect & r, QCanvas * canvas );
+ Slider( const TQString & id, CNItem *tqparent, const TQRect & r, TQCanvas * canvas );
~Slider();
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
- virtual void mouseDoubleClickEvent ( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
+ virtual void mouseDoubleClickEvent ( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
virtual void enterEvent();
virtual void leaveEvent();
- virtual QWidget *widget() const;
+ virtual TQWidget *widget() const;
int value() const;
void setValue( int value );
void setOrientation( Qt::Orientation o );
@@ -284,7 +288,7 @@ class Slider : public Widget
private:
SliderWidget *m_slider;
- Orientation m_orientation;
+ Qt::Orientation m_orientation;
};
#endif
diff --git a/src/canvasmanipulator.cpp b/src/canvasmanipulator.cpp
index 7c3ed17..eb4bd90 100644
--- a/src/canvasmanipulator.cpp
+++ b/src/canvasmanipulator.cpp
@@ -30,12 +30,12 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
CMManager::CMManager( ItemDocument *itemDocument )
- : QObject()
+ : TQObject()
{
b_allowItemScroll = true;
p_lastMouseOverResizeHandle = 0l;
@@ -45,8 +45,8 @@ CMManager::CMManager( ItemDocument *itemDocument )
p_lastMouseOverItem = 0l;
p_lastItemClicked = 0l;
m_drawAction = -1;
- m_allowItemScrollTmr = new QTimer(this);
- connect( m_allowItemScrollTmr, SIGNAL(timeout()), this, SLOT(slotAllowItemScroll()) );
+ m_allowItemScrollTmr = new TQTimer(this);
+ connect( m_allowItemScrollTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAllowItemScroll()) );
KGlobal::config()->setGroup("General");
slotSetManualRoute( KGlobal::config()->readBoolEntry( "ManualRouting", false ) );
@@ -71,7 +71,7 @@ CMManager::~CMManager()
void CMManager::addManipulatorInfo( ManipulatorInfo *eventInfo )
{
- if ( eventInfo && !m_manipulatorInfoList.contains(eventInfo) ) {
+ if ( eventInfo && !m_manipulatorInfoList.tqcontains(eventInfo) ) {
m_manipulatorInfoList.prepend(eventInfo);
}
}
@@ -134,7 +134,7 @@ void CMManager::mousePressEvent( EventInfo eventInfo )
{
Widget *widget = dynamic_cast<Widget*>(eventInfo.qcanvasItemClickedOn);
if (widget)
- eventInfo.qcanvasItemClickedOn = widget->parent();
+ eventInfo.qcanvasItemClickedOn = widget->tqparent();
}
case ItemDocument::RTTI::CNItem:
{
@@ -197,7 +197,7 @@ void CMManager::mouseDoubleClickEvent( const EventInfo &eventInfo )
Widget *widget = dynamic_cast<Widget*>(eventInfo.qcanvasItemClickedOn);
if (widget)
{
- widget->parent()->mouseDoubleClickEvent(eventInfo);
+ widget->tqparent()->mouseDoubleClickEvent(eventInfo);
return;
}
}
@@ -222,17 +222,17 @@ void CMManager::mouseMoveEvent( const EventInfo &eventInfo )
}
//BEGIN
- QCanvasItem *qcnItem = p_itemDocument->itemAtTop(eventInfo.pos);
+ TQCanvasItem *qcnItem = p_itemDocument->itemAtTop(eventInfo.pos);
Item *item;
Widget *widget = dynamic_cast<Widget*>(qcnItem);
if (widget)
- item = widget->parent();
+ item = widget->tqparent();
else
item = dynamic_cast<Item*>(qcnItem);
- if ( p_lastMouseOverItem != (QGuardedPtr<Item>)item )
+ if ( p_lastMouseOverItem != (TQGuardedPtr<Item>)item )
{
- QEvent event(QEvent::Leave);
+ TQEvent event(TQEvent::Leave);
if (p_lastMouseOverItem)
p_lastMouseOverItem->leaveEvent();
@@ -260,7 +260,7 @@ void CMManager::mouseMoveEvent( const EventInfo &eventInfo )
void CMManager::updateCurrentResizeHandle( ResizeHandle * resizeHandle )
{
- if ( p_lastMouseOverResizeHandle != (QGuardedPtr<ResizeHandle>)resizeHandle )
+ if ( p_lastMouseOverResizeHandle != (TQGuardedPtr<ResizeHandle>)resizeHandle )
{
if (p_lastMouseOverResizeHandle)
p_lastMouseOverResizeHandle->setHover(false);
@@ -295,11 +295,11 @@ void CMManager::wheelEvent( const EventInfo &eventInfo )
bool accepted = false;
if (b_allowItemScroll)
{
- QCanvasItem *qcnItem = p_itemDocument->itemAtTop(eventInfo.pos);
+ TQCanvasItem *qcnItem = p_itemDocument->itemAtTop(eventInfo.pos);
Item *item;
Widget *widget = dynamic_cast<Widget*>(qcnItem);
if (widget)
- item = widget->parent();
+ item = widget->tqparent();
else
item = dynamic_cast<Item*>(qcnItem);
@@ -353,7 +353,7 @@ void CMManager::setCMState( CMState type, bool state )
}
-void CMManager::setRepeatedAddId( const QString & repeatedId )
+void CMManager::setRepeatedAddId( const TQString & repeatedId )
{
m_repeatedItemId = repeatedId;
}
@@ -501,13 +501,13 @@ ConnectorDraw::~ConnectorDraw()
}
-QColor ConnectorDraw::validConnectionColor()
+TQColor ConnectorDraw::validConnectionColor()
{
- return QColor( 255, 166, 0 );
+ return TQColor( 255, 166, 0 );
}
-static double qpoint_distance( const QPoint & p1, const QPoint & p2 )
+static double qpoint_distance( const TQPoint & p1, const TQPoint & p2 )
{
double dx = p1.x() - p2.x();
double dy = p1.y() - p2.y();
@@ -516,19 +516,19 @@ static double qpoint_distance( const QPoint & p1, const QPoint & p2 )
}
-QPoint ConnectorDraw::toValidPos( const QPoint & clickPos, Connector * clickedConnector ) const
+TQPoint ConnectorDraw::toValidPos( const TQPoint & clickPos, Connector * clickedConnector ) const
{
if ( !clickedConnector )
return clickPos;
- const QPointList pointList = clickedConnector->connectorPoints();
+ const TQPointList pointList = clickedConnector->connectorPoints();
- QPointList::const_iterator end = pointList.end();
+ TQPointList::const_iterator end = pointList.end();
double dl[] = { 0.5, 8.5, 11.5, 18.0, 23.0 }; // various distances rounded up of (0,0) cells, (0,1), etc
for ( unsigned i = 0; i < 5; ++i )
{
- for ( QPointList::const_iterator it = pointList.begin(); it != end; ++it )
+ for ( TQPointList::const_iterator it = pointList.begin(); it != end; ++it )
{
if ( qpoint_distance( *it, clickPos ) <= dl[i] )
return *it;
@@ -556,7 +556,7 @@ Connector * ConnectorDraw::toConnector( Node * node )
}
-void ConnectorDraw::grabEndStuff( QCanvasItem * endItem, const QPoint & pos, bool posIsExact )
+void ConnectorDraw::grabEndStuff( TQCanvasItem * endItem, const TQPoint & pos, bool posIsExact )
{
if (!endItem)
return;
@@ -621,7 +621,7 @@ bool CMAutoConnector::mousePressedInitial( const EventInfo &eventInfo )
if (p_startNode)
{
- m_eventInfo.pos = m_prevPos = p_icnDocument->gridSnap( QPoint( (int)p_startNode->x(), (int)p_startNode->y() ) );
+ m_eventInfo.pos = m_prevPos = p_icnDocument->gridSnap( TQPoint( (int)p_startNode->x(), (int)p_startNode->y() ) );
if (p_startNode->numCon( true, false ) > 2)
{
p_startConnector = toConnector(p_startNode);
@@ -640,8 +640,8 @@ bool CMAutoConnector::mousePressedInitial( const EventInfo &eventInfo )
p_icnDocument->unselectAll();
delete m_connectorLine;
- m_connectorLine = new QCanvasLine(p_canvas);
- m_connectorLine->setPen( QColor(0,0,0) );
+ m_connectorLine = new TQCanvasLine(p_canvas);
+ m_connectorLine->setPen( TQColor(0,0,0) );
m_connectorLine->setZ( ItemDocument::Z::ConnectorCreateLine );
m_connectorLine->show();
return false;
@@ -650,7 +650,7 @@ bool CMAutoConnector::mousePressedInitial( const EventInfo &eventInfo )
bool CMAutoConnector::mouseMoved( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
int newX = p_icnDocument->gridSnap( pos.x() );
int newY = p_icnDocument->gridSnap( pos.y() );
@@ -673,18 +673,18 @@ bool CMAutoConnector::mouseMoved( const EventInfo &eventInfo )
if (movedFlag)
{
- QCanvasItem *startItem = 0l;
+ TQCanvasItem *startItem = 0l;
if (p_startNode)
startItem = p_startNode;
else if (p_startConnector)
startItem = p_startConnector;
- QCanvasItem *endItem = p_icnDocument->itemAtTop( QPoint( newX, newY ) );
+ TQCanvasItem *endItem = p_icnDocument->itemAtTop( TQPoint( newX, newY ) );
if ( endItem && endItem->rtti() == ItemDocument::RTTI::CNItem )
- endItem = (static_cast<CNItem*>(endItem))->getClosestNode( QPoint( newX, newY ) );
+ endItem = (static_cast<CNItem*>(endItem))->getClosestNode( TQPoint( newX, newY ) );
bool validLine = p_icnDocument->canConnect( startItem, endItem );
- m_connectorLine->setPen( validLine ? validConnectionColor() : Qt::black );
+ m_connectorLine->setPen( validLine ? validConnectionColor() : TQt::black );
}
return false;
}
@@ -692,13 +692,13 @@ bool CMAutoConnector::mouseMoved( const EventInfo &eventInfo )
bool CMAutoConnector::mouseReleased( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
- QPoint end = m_connectorLine->endPoint();
+ TQPoint end = m_connectorLine->endPoint();
delete m_connectorLine;
m_connectorLine = 0l;
- QCanvasItem *qcanvasItem = p_icnDocument->itemAtTop(end);
+ TQCanvasItem *qcanvasItem = p_icnDocument->itemAtTop(end);
if ( !qcanvasItem )
return true;
@@ -782,7 +782,7 @@ bool CMManualConnector::mousePressedInitial( const EventInfo &eventInfo )
p_icnDocument->unselectAll();
- QPoint sp;
+ TQPoint sp;
if ( eventInfo.itemRtti == ItemDocument::RTTI::Node )
{
@@ -825,7 +825,7 @@ bool CMManualConnector::mouseMoved( const EventInfo &eventInfo )
if ( !m_manualConnectorDraw )
return true;
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
int newX = p_icnDocument->gridSnap( pos.x() );
int newY = p_icnDocument->gridSnap( pos.y() );
@@ -846,13 +846,13 @@ bool CMManualConnector::mouseMoved( const EventInfo &eventInfo )
if ( movedFlag )
{
- QCanvasItem *startItem = 0l;
+ TQCanvasItem *startItem = 0l;
if (p_startNode)
startItem = p_startNode;
else if (p_startConnector)
startItem = p_startConnector;
- QCanvasItem * endItem = p_icnDocument->itemAtTop( QPoint( newX, newY ) );
+ TQCanvasItem * endItem = p_icnDocument->itemAtTop( TQPoint( newX, newY ) );
// If the endItem is a node, we have to finish exactly on the end.
if ( Node * node = dynamic_cast<Node*>(endItem) )
@@ -863,8 +863,8 @@ bool CMManualConnector::mouseMoved( const EventInfo &eventInfo )
bool validLine = p_icnDocument->canConnect( startItem, endItem );
- m_manualConnectorDraw->setColor( validLine ? validConnectionColor() : Qt::black );
- m_manualConnectorDraw->mouseMoved( QPoint( newX, newY ) );
+ m_manualConnectorDraw->setColor( validLine ? validConnectionColor() : TQt::black );
+ m_manualConnectorDraw->mouseMoved( TQPoint( newX, newY ) );
}
return false;
@@ -877,7 +877,7 @@ bool CMManualConnector::mouseReleased( const EventInfo &eventInfo )
return true;
}
- QPoint pos = p_icnDocument->gridSnap(eventInfo.pos);
+ TQPoint pos = p_icnDocument->gridSnap(eventInfo.pos);
grabEndStuff( m_manualConnectorDraw->mouseClicked(pos), pos, true );
@@ -885,7 +885,7 @@ bool CMManualConnector::mouseReleased( const EventInfo &eventInfo )
return false;
// Create the points that define the manual route
- QPointList list = m_manualConnectorDraw->pointList();
+ TQPointList list = m_manualConnectorDraw->pointList();
delete m_manualConnectorDraw;
m_manualConnectorDraw = 0l;
@@ -961,7 +961,7 @@ bool CMItemMove::mousePressedInitial( const EventInfo &eventInfo )
return true;
- if ( !p_selectList->contains(item) )
+ if ( !p_selectList->tqcontains(item) )
{
if (!eventInfo.ctrlPressed)
p_itemDocument->unselectAll();
@@ -1014,7 +1014,7 @@ bool CMItemMove::mousePressedInitial( const EventInfo &eventInfo )
bool CMItemMove::mouseMoved( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
int x = pos.x();
int y = pos.y();
@@ -1028,7 +1028,7 @@ bool CMItemMove::mouseMoved( const EventInfo &eventInfo )
if ( !*it || !(*it)->isMovable() )
continue;
- const QRect oldRect = (*it)->boundingRect();
+ const TQRect oldRect = (*it)->boundingRect();
(*it)->setChanged();
if ( CNItem *cnItem = dynamic_cast<CNItem*>((Item*)*it) )
@@ -1042,8 +1042,8 @@ bool CMItemMove::mouseMoved( const EventInfo &eventInfo )
else
(*it)->moveBy( eventInfo.pos.x()-m_prevPos.x(), eventInfo.pos.y()-m_prevPos.y() );
- QRect newRect = (*it)->boundingRect();
- QRect merged = oldRect | newRect;
+ TQRect newRect = (*it)->boundingRect();
+ TQRect merged = oldRect | newRect;
}
if ( (dx != 0) || (dy != 0) )
@@ -1081,7 +1081,7 @@ bool CMItemMove::mouseMoved( const EventInfo &eventInfo )
bool CMItemMove::mouseReleased( const EventInfo &eventInfo )
{
- QStringList itemIDs;
+ TQStringList itemIDs;
const ItemList itemList = p_cnItemSelectList->items();
const ItemList::const_iterator ilEnd = itemList.end();
@@ -1091,7 +1091,7 @@ bool CMItemMove::mouseReleased( const EventInfo &eventInfo )
itemIDs.append( (*it)->id() );
}
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
// And make sure all connectors are properly shown
const ConnectorList &connectorList = p_icnDocument->connectorList();
@@ -1255,7 +1255,7 @@ bool CMMechItemMove::mousePressedInitial( const EventInfo &eventInfo )
mechItem->setParentItem(0l);
}
}
- else if ( !p_selectList->contains(mechItem) )
+ else if ( !p_selectList->tqcontains(mechItem) )
{
if (!eventInfo.ctrlPressed)
p_mechanicsDocument->unselectAll();
@@ -1285,7 +1285,7 @@ bool CMMechItemMove::mousePressedInitial( const EventInfo &eventInfo )
bool CMMechItemMove::mouseMoved( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
int x = pos.x();
int y = pos.y();
@@ -1298,7 +1298,7 @@ bool CMMechItemMove::mouseMoved( const EventInfo &eventInfo )
(*it)->moveBy( x - m_prevPos.x(), y - m_prevPos.y() );
}
- m_prevPos = QPoint( x, y );
+ m_prevPos = TQPoint( x, y );
p_canvas->update();
p_itemDocument->requestEvent( ItemDocument::ItemDocumentEvent::ResizeCanvasToItems );
@@ -1308,7 +1308,7 @@ bool CMMechItemMove::mouseMoved( const EventInfo &eventInfo )
bool CMMechItemMove::mouseReleased( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
int dx = pos.x() - m_eventInfo.pos.x();
int dy = pos.y() - m_eventInfo.pos.y();
@@ -1337,7 +1337,7 @@ bool CMMechItemMove::mouseReleased( const EventInfo &eventInfo )
mechItem->setSelectionMode(MechanicsItem::sm_resize);
}
- QStringList itemIDs;
+ TQStringList itemIDs;
ItemList itemList = p_mechItemSelectList->items();
const ItemList::iterator ilEnd = itemList.end();
@@ -1357,19 +1357,19 @@ bool CMMechItemMove::mouseReleased( const EventInfo &eventInfo )
//BEGIN class SelectRectangle
-SelectRectangle::SelectRectangle( int x, int y, int w, int h, QCanvas *qcanvas )
+SelectRectangle::SelectRectangle( int x, int y, int w, int h, TQCanvas *qcanvas )
: m_x(x), m_y(y)
{
- m_topLine = new QCanvasLine(qcanvas);
- m_rightLine = new QCanvasLine(qcanvas);
- m_bottomLine = new QCanvasLine(qcanvas);
- m_leftLine = new QCanvasLine(qcanvas);
+ m_topLine = new TQCanvasLine(qcanvas);
+ m_rightLine = new TQCanvasLine(qcanvas);
+ m_bottomLine = new TQCanvasLine(qcanvas);
+ m_leftLine = new TQCanvasLine(qcanvas);
setSize( w, h );
- QCanvasLine* lines[] = { m_topLine, m_rightLine, m_bottomLine, m_leftLine };
+ TQCanvasLine* lines[] = { m_topLine, m_rightLine, m_bottomLine, m_leftLine };
for ( int i=0; i<4; ++ i)
{
- lines[i]->setPen( QPen( QColor(190,190,190), 1, Qt::DotLine ) );
+ lines[i]->setPen( TQPen( TQColor(190,190,190), 1, TQt::DotLine ) );
lines[i]->setZ( ICNDocument::Z::Select );
lines[i]->show();
}
@@ -1396,11 +1396,11 @@ void SelectRectangle::setSize( int w, int h )
}
-QCanvasItemList SelectRectangle::collisions()
+TQCanvasItemList SelectRectangle::collisions()
{
- QCanvas *canvas = m_topLine->canvas();
+ TQCanvas *canvas = m_topLine->canvas();
- return canvas->collisions( QRect( m_x, m_y, m_w, m_h ) );
+ return canvas->collisions( TQRect( m_x, m_y, m_w, m_h ) );
}
//END class SelectRectangle
@@ -1449,7 +1449,7 @@ bool CMSelect::mousePressedInitial( const EventInfo &eventInfo )
bool CMSelect::mouseMoved( const EventInfo &eventInfo )
{
- QPoint pos = eventInfo.pos;
+ TQPoint pos = eventInfo.pos;
m_selectRectangle->setSize( pos.x()-m_eventInfo.pos.x(), pos.y()-m_eventInfo.pos.y() );
@@ -1514,7 +1514,7 @@ bool CMItemDrag::mousePressedInitial( const EventInfo &eventInfo )
bool CMItemDrag::mouseMoved( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
if ( b_dragged ||
pos.x() > (m_eventInfo.pos.x()+4 ) ||
@@ -1543,14 +1543,14 @@ bool CMItemDrag::mouseReleased( const EventInfo &/*eventInfo*/ )
//BEGIN class CanvasEllipseDraw
-CanvasEllipseDraw::CanvasEllipseDraw( int x, int y, QCanvas * canvas )
- : QCanvasEllipse( 0, 0, canvas )
+CanvasEllipseDraw::CanvasEllipseDraw( int x, int y, TQCanvas * canvas )
+ : TQCanvasEllipse( 0, 0, canvas )
{
move( x, y );
}
-void CanvasEllipseDraw::drawShape( QPainter & p )
+void CanvasEllipseDraw::drawShape( TQPainter & p )
{
p.drawEllipse( int(x()-width()/2), int(y()-height()/2), width(), height() );
}
@@ -1596,8 +1596,8 @@ bool CMDraw::mousePressedInitial( const EventInfo &eventInfo )
case DrawPart::da_text:
case DrawPart::da_rectangle:
{
- m_pDrawRectangle = new QCanvasRectangle( eventInfo.pos.x(), eventInfo.pos.y(), 0, 0, p_canvas );
- m_pDrawRectangle->setPen( QPen( QColor(0,0,0), 1 ) );
+ m_pDrawRectangle = new TQCanvasRectangle( eventInfo.pos.x(), eventInfo.pos.y(), 0, 0, p_canvas );
+ m_pDrawRectangle->setPen( TQPen( TQColor(0,0,0), 1 ) );
m_pDrawRectangle->setZ( ICNDocument::Z::Select );
m_pDrawRectangle->show();
break;
@@ -1605,7 +1605,7 @@ bool CMDraw::mousePressedInitial( const EventInfo &eventInfo )
case DrawPart::da_ellipse:
{
m_pDrawEllipse = new CanvasEllipseDraw( eventInfo.pos.x(), eventInfo.pos.y(), p_canvas );
- m_pDrawEllipse->setPen( QPen( QColor(0,0,0), 1 ) );
+ m_pDrawEllipse->setPen( TQPen( TQColor(0,0,0), 1 ) );
m_pDrawEllipse->setZ( ICNDocument::Z::Select );
m_pDrawEllipse->show();
break;
@@ -1613,9 +1613,9 @@ bool CMDraw::mousePressedInitial( const EventInfo &eventInfo )
case DrawPart::da_line:
case DrawPart::da_arrow:
{
- m_pDrawLine = new QCanvasLine(p_canvas);
+ m_pDrawLine = new TQCanvasLine(p_canvas);
m_pDrawLine->setPoints( eventInfo.pos.x(), eventInfo.pos.y(), eventInfo.pos.x(), eventInfo.pos.y() );
- m_pDrawLine->setPen( QPen( QColor(0,0,0), 1 ) );
+ m_pDrawLine->setPen( TQPen( TQColor(0,0,0), 1 ) );
m_pDrawLine->setZ( ICNDocument::Z::Select );
m_pDrawLine->show();
break;
@@ -1630,20 +1630,20 @@ bool CMDraw::mousePressedInitial( const EventInfo &eventInfo )
bool CMDraw::mouseMoved( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
if (m_pDrawRectangle)
m_pDrawRectangle->setSize( pos.x()-m_eventInfo.pos.x(), pos.y()-m_eventInfo.pos.y() );
else if (m_pDrawEllipse)
{
-// QRect r( m_eventInfo.pos.x(), m_eventInfo.pos.y(), pos.x()-m_eventInfo.pos.x(), pos.y()-m_eventInfo.pos.y() );
+// TQRect r( m_eventInfo.pos.x(), m_eventInfo.pos.y(), pos.x()-m_eventInfo.pos.x(), pos.y()-m_eventInfo.pos.y() );
// r = r.normalize();
//
// m_pDrawEllipse->setSize( r.width(), r.height() );
// m_pDrawEllipse->move( r.left()+(r.width()/2), r.top()+(r.height()/2) );
- m_pDrawEllipse->setSize( 2*QABS(pos.x()-m_eventInfo.pos.x()), 2*QABS(pos.y()-m_eventInfo.pos.y()) );
+ m_pDrawEllipse->setSize( 2*TQABS(pos.x()-m_eventInfo.pos.x()), 2*TQABS(pos.y()-m_eventInfo.pos.y()) );
}
else if (m_pDrawLine)
@@ -1658,9 +1658,9 @@ bool CMDraw::mouseMoved( const EventInfo &eventInfo )
bool CMDraw::mouseReleased( const EventInfo &eventInfo )
{
- const QPoint pos = eventInfo.pos;
+ const TQPoint pos = eventInfo.pos;
- QRect sizeRect;
+ TQRect sizeRect;
if ( m_pDrawRectangle || m_pDrawEllipse )
{
@@ -1687,7 +1687,7 @@ bool CMDraw::mouseReleased( const EventInfo &eventInfo )
int h = m_pDrawEllipse->height()+1;
int x = int(m_pDrawEllipse->x()-w/2);
int y = int(m_pDrawEllipse->y()-h/2);
- sizeRect = QRect( x, y, w, h ).normalize();
+ sizeRect = TQRect( x, y, w, h ).normalize();
}
delete m_pDrawRectangle;
@@ -1702,7 +1702,7 @@ bool CMDraw::mouseReleased( const EventInfo &eventInfo )
int ex = m_pDrawLine->endPoint().x();
int ey = m_pDrawLine->endPoint().y();
- sizeRect = QRect( ex, ey, sx-ex, sy-ey );
+ sizeRect = TQRect( ex, ey, sx-ex, sy-ey );
delete m_pDrawLine;
m_pDrawLine = 0l;
@@ -1710,7 +1710,7 @@ bool CMDraw::mouseReleased( const EventInfo &eventInfo )
else
return true;
- QString id;
+ TQString id;
switch ( (DrawPart::DrawAction) p_cmManager->drawAction() )
{
case DrawPart::da_rectangle:
@@ -1758,9 +1758,9 @@ bool CMDraw::mouseReleased( const EventInfo &eventInfo )
//BEGIN class ManualConnectorDraw
-ManualConnectorDraw::ManualConnectorDraw( ICNDocument *_icnDocument, const QPoint &initialPos )
+ManualConnectorDraw::ManualConnectorDraw( ICNDocument *_icnDocument, const TQPoint &initialPos )
{
- m_color = Qt::black;
+ m_color = TQt::black;
icnDocument = _icnDocument;
m_currentPos = m_previousPos = m_initialPos = initialPos;
@@ -1769,8 +1769,8 @@ ManualConnectorDraw::ManualConnectorDraw( ICNDocument *_icnDocument, const QPoin
b_currentVertical = false;
b_orientationDefined = false;
- m_connectorLines.append( m_previousCon = new QCanvasLine( icnDocument->canvas() ) );
- m_connectorLines.append( m_currentCon = new QCanvasLine( icnDocument->canvas() ) );
+ m_connectorLines.append( m_previousCon = new TQCanvasLine( icnDocument->canvas() ) );
+ m_connectorLines.append( m_currentCon = new TQCanvasLine( icnDocument->canvas() ) );
m_currentCon->setPoints( initialPos.x(), initialPos.y(), initialPos.x(), initialPos.y() );
m_previousCon->setPoints( initialPos.x(), initialPos.y(), initialPos.x(), initialPos.y() );
@@ -1787,31 +1787,31 @@ ManualConnectorDraw::ManualConnectorDraw( ICNDocument *_icnDocument, const QPoin
ManualConnectorDraw::~ManualConnectorDraw()
{
- const QValueList<QCanvasLine*>::iterator end = m_connectorLines.end();
- for ( QValueList<QCanvasLine*>::iterator it = m_connectorLines.begin(); it != end; ++it )
+ const TQValueList<TQCanvasLine*>::iterator end = m_connectorLines.end();
+ for ( TQValueList<TQCanvasLine*>::iterator it = m_connectorLines.begin(); it != end; ++it )
delete *it;
m_connectorLines.clear();
}
-void ManualConnectorDraw::setColor( const QColor & color )
+void ManualConnectorDraw::setColor( const TQColor & color )
{
m_color = color;
- const QValueList<QCanvasLine*>::iterator end = m_connectorLines.end();
- for ( QValueList<QCanvasLine*>::iterator it = m_connectorLines.begin(); it != end; ++it )
+ const TQValueList<TQCanvasLine*>::iterator end = m_connectorLines.end();
+ for ( TQValueList<TQCanvasLine*>::iterator it = m_connectorLines.begin(); it != end; ++it )
(*it)->setPen( m_color );
}
-void ManualConnectorDraw::mouseMoved( const QPoint &pos )
+void ManualConnectorDraw::mouseMoved( const TQPoint &pos )
{
if ( m_currentPos == pos ) return;
if (!b_orientationDefined)
{
- QPoint previousStart = m_previousCon->startPoint();
+ TQPoint previousStart = m_previousCon->startPoint();
double distance = std::sqrt( std::pow( (double)(m_currentPos.x()-previousStart.x()), 2. ) +
std::pow( (double)(m_currentPos.y()-previousStart.y()), 2. ) );
@@ -1829,7 +1829,7 @@ void ManualConnectorDraw::mouseMoved( const QPoint &pos )
}
-QCanvasItem* ManualConnectorDraw::mouseClicked( const QPoint &pos )
+TQCanvasItem* ManualConnectorDraw::mouseClicked( const TQPoint &pos )
{
if (b_orientationDefined)
b_currentVertical = !b_currentVertical;
@@ -1841,14 +1841,14 @@ QCanvasItem* ManualConnectorDraw::mouseClicked( const QPoint &pos )
m_currentPos = pos;
- QCanvasItem * qcanvasItem = icnDocument->itemAtTop(pos);
+ TQCanvasItem * qcanvasItem = icnDocument->itemAtTop(pos);
if ( qcanvasItem && pos != m_initialPos && qcanvasItem != p_initialItem )
return qcanvasItem;
m_previousCon = m_currentCon;
- m_connectorLines.append( m_currentCon = new QCanvasLine( icnDocument->canvas() ) );
+ m_connectorLines.append( m_currentCon = new TQCanvasLine( icnDocument->canvas() ) );
m_currentCon->setPoints( pos.x(), pos.y(), pos.x(), pos.y() );
m_currentCon->setPen( m_color );
updateConnectorEnds();
@@ -1860,8 +1860,8 @@ QCanvasItem* ManualConnectorDraw::mouseClicked( const QPoint &pos )
void ManualConnectorDraw::updateConnectorEnds()
{
- QPoint pivot = m_currentPos;
- QPoint previousStart = m_previousCon->startPoint();
+ TQPoint pivot = m_currentPos;
+ TQPoint previousStart = m_previousCon->startPoint();
if (b_currentVertical)
{
@@ -1878,13 +1878,13 @@ void ManualConnectorDraw::updateConnectorEnds()
}
-QPointList ManualConnectorDraw::pointList()
+TQPointList ManualConnectorDraw::pointList()
{
- QPointList list;
+ TQPointList list;
list.append(m_initialPos);
- const QValueList<QCanvasLine*>::iterator end = m_connectorLines.end();
- for ( QValueList<QCanvasLine*>::iterator it = m_connectorLines.begin(); it != end; ++it )
+ const TQValueList<TQCanvasLine*>::iterator end = m_connectorLines.end();
+ for ( TQValueList<TQCanvasLine*>::iterator it = m_connectorLines.begin(); it != end; ++it )
{
list.append( (*it)->endPoint() );
}
diff --git a/src/canvasmanipulator.h b/src/canvasmanipulator.h
index 06d463c..8ddc253 100644
--- a/src/canvasmanipulator.h
+++ b/src/canvasmanipulator.h
@@ -13,8 +13,8 @@
#include "eventinfo.h"
-#include <qcanvas.h>
-#include <qguardedptr.h>
+#include <tqcanvas.h>
+#include <tqguardedptr.h>
class CanvasManipulator;
class Connector;
@@ -37,19 +37,19 @@ class Node;
class NodeGroup;
class ResizeHandle;
-class QCanvas;
-class QCanvasItem;
-class QCanvasLine;
-class QCanvasRectangle;
-class QMouseEvent;
-class QTimer;
-class QWheelEvent;
+class TQCanvas;
+class TQCanvasItem;
+class TQCanvasLine;
+class TQCanvasRectangle;
+class TQMouseEvent;
+class TQTimer;
+class TQWheelEvent;
typedef CanvasManipulator*(*CreateManipulatorPtr)( ItemDocument *, CMManager * );
typedef bool(*AcceptManipulationPtr)( uint eventState, uint cmState, uint itemType, uint cnItemType );
-typedef QValueList<NodeGroup*> NodeGroupList;
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
-typedef QValueList<QPoint> QPointList;
+typedef TQValueList<NodeGroup*> NodeGroupList;
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<TQPoint> TQPointList;
class ManipulatorInfo
@@ -59,16 +59,17 @@ public:
AcceptManipulationPtr m_acceptManipulationPtr;
CreateManipulatorPtr m_createManipulatorPtr;
};
-typedef QValueList<ManipulatorInfo*> ManipulatorInfoList;
+typedef TQValueList<ManipulatorInfo*> ManipulatorInfoList;
/**
Handles canvas manipulation, such as moving an item or resizing the canvas
@author David Saxton
*/
-class CMManager : public QObject
+class CMManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum EventState
{
@@ -127,10 +128,10 @@ public:
*/
void cancelCurrentManipulation();
CanvasManipulator * currentManipulator() const { return m_canvasManipulator; }
- void setRepeatedAddId( const QString & repeatedId = QString::null );
+ void setRepeatedAddId( const TQString & repeatedId = TQString() );
uint cmState() const { return m_cmState; }
void addManipulatorInfo( ManipulatorInfo *info );
- QString repeatedItemId() const { return m_repeatedItemId; }
+ TQString repeatedItemId() const { return m_repeatedItemId; }
void setDrawAction( int drawAction );
int drawAction() const { return m_drawAction; }
@@ -149,13 +150,13 @@ protected:
void updateCurrentResizeHandle( ResizeHandle * mouseOver );
CanvasManipulator *m_canvasManipulator;
uint m_cmState;
- QString m_repeatedItemId;
+ TQString m_repeatedItemId;
ItemDocument *p_itemDocument;
ManipulatorInfoList m_manipulatorInfoList;
- QGuardedPtr<Item> p_lastMouseOverItem; // Pointer to the item where the mouse was last over - this is used to determine when mouse
- QGuardedPtr<ResizeHandle> p_lastMouseOverResizeHandle;
- QGuardedPtr<Item> p_lastItemClicked;
- QTimer *m_allowItemScrollTmr; // When a user scrolls on the canvas, we don't want to stop scrolling when the user gets to (e.g.) a scrollable widget. So this timer prevents scrolling a widget for a few hundred milliseconds after a scroll event if it was initiated over the canvas
+ TQGuardedPtr<Item> p_lastMouseOverItem; // Pointer to the item where the mouse was last over - this is used to determine when mouse
+ TQGuardedPtr<ResizeHandle> p_lastMouseOverResizeHandle;
+ TQGuardedPtr<Item> p_lastItemClicked;
+ TQTimer *m_allowItemScrollTmr; // When a user scrolls on the canvas, we don't want to stop scrolling when the user gets to (e.g.) a scrollable widget. So this timer prevents scrolling a widget for a few hundred milliseconds after a scroll event if it was initiated over the canvas
bool b_allowItemScroll; // See above.
int m_drawAction;
@@ -213,11 +214,11 @@ public:
protected:
Type m_type;
EventInfo m_eventInfo;
- QPoint m_prevPos;
+ TQPoint m_prevPos;
ItemDocument *p_itemDocument;
ICNDocument *p_icnDocument;
MechanicsDocument *p_mechanicsDocument;
- QCanvas *p_canvas;
+ TQCanvas *p_canvas;
ItemGroup *p_selectList;
CNItemGroup *p_cnItemSelectList;
MechanicsGroup *p_mechItemSelectList;
@@ -286,7 +287,7 @@ class ConnectorDraw : public CanvasManipulator
* Returns the colour used to indicate that the current connection
* being drawn is valid. Invalid colour is black.
*/
- static QColor validConnectionColor();
+ static TQColor validConnectionColor();
protected:
/**
@@ -301,18 +302,18 @@ class ConnectorDraw : public CanvasManipulator
* with pos (i.e. auto-connector will call this with posIsExact = false,
* and manual-connector will call this with posIsExact = true).
*/
- void grabEndStuff( QCanvasItem * endItem, const QPoint & pos, bool posIsExact );
+ void grabEndStuff( TQCanvasItem * endItem, const TQPoint & pos, bool posIsExact );
/**
* Returns the closest point to the clickPos that is on the given
* connector.
*/
- QPoint toValidPos( const QPoint & clickPos, Connector * clickedConnector ) const;
+ TQPoint toValidPos( const TQPoint & clickPos, Connector * clickedConnector ) const;
- QGuardedPtr<Node> p_startNode;
- QGuardedPtr<Connector> p_startConnector;
+ TQGuardedPtr<Node> p_startNode;
+ TQGuardedPtr<Connector> p_startConnector;
Node * p_endNode;
Connector * p_endConnector;
- QPoint startConnectorPoint;
+ TQPoint startConnectorPoint;
};
@@ -335,7 +336,7 @@ public:
virtual bool mouseReleased( const EventInfo &info );
protected:
- QCanvasLine *m_connectorLine;
+ TQCanvasLine *m_connectorLine;
};
@@ -443,24 +444,24 @@ protected:
class SelectRectangle
{
public:
- SelectRectangle( int x, int y, int w, int h, QCanvas *qcanvas );
+ SelectRectangle( int x, int y, int w, int h, TQCanvas *qcanvas );
~SelectRectangle();
void setSize( int w, int h );
- QCanvasItemList collisions();
+ TQCanvasItemList collisions();
protected:
- QCanvasLine *m_topLine;
- QCanvasLine *m_rightLine;
- QCanvasLine *m_bottomLine;
- QCanvasLine *m_leftLine;
+ TQCanvasLine *m_topLine;
+ TQCanvasLine *m_rightLine;
+ TQCanvasLine *m_bottomLine;
+ TQCanvasLine *m_leftLine;
const int m_x;
const int m_y;
int m_w;
int m_h;
int m_prevCollisions_w;
int m_prevCollisions_h;
- QCanvasItemList m_prevCollisions;
+ TQCanvasItemList m_prevCollisions;
};
@@ -513,15 +514,15 @@ protected:
/**
@author David Saxton
-A QCanvasEllipse that uses a pen (not a brush) to paint
+A TQCanvasEllipse that uses a pen (not a brush) to paint
*/
-class CanvasEllipseDraw : public QCanvasEllipse
+class CanvasEllipseDraw : public TQCanvasEllipse
{
public:
- CanvasEllipseDraw( int x, int y, QCanvas * canvas );
+ CanvasEllipseDraw( int x, int y, TQCanvas * canvas );
protected:
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
};
@@ -544,9 +545,9 @@ class CMDraw : public CanvasManipulator
virtual bool mouseReleased( const EventInfo &info );
protected:
- QCanvasRectangle * m_pDrawRectangle;
+ TQCanvasRectangle * m_pDrawRectangle;
CanvasEllipseDraw * m_pDrawEllipse;
- QCanvasLine * m_pDrawLine;
+ TQCanvasLine * m_pDrawLine;
};
@@ -556,49 +557,49 @@ class CMDraw : public CanvasManipulator
class ManualConnectorDraw
{
public:
- ManualConnectorDraw( ICNDocument *_icnDocument, const QPoint &initialPos );
+ ManualConnectorDraw( ICNDocument *_icnDocument, const TQPoint &initialPos );
virtual ~ManualConnectorDraw();
/**
* Called when the mouse is moved.
* Normally will do something like updating the connector route
*/
- void mouseMoved( const QPoint &pos );
+ void mouseMoved( const TQPoint &pos );
/**
* Called when the user clicks the mouse. If the connector finishes on a
- * valid QCanvasItem (Node or Connetor), then this is returned. Otherwise,
+ * valid TQCanvasItem (Node or Connetor), then this is returned. Otherwise,
* null is returned.
*/
- QCanvasItem * mouseClicked( const QPoint &pos );
+ TQCanvasItem * mouseClicked( const TQPoint &pos );
/**
* Returns the list of points that define the manual connection route
*/
- QPointList pointList();
+ TQPointList pointList();
/**
* Sets the colour used to draw the connection lines.
*/
- void setColor( const QColor & color );
+ void setColor( const TQColor & color );
protected:
void updateConnectorEnds();
- QValueList<QCanvasLine*> m_connectorLines;
+ TQValueList<TQCanvasLine*> m_connectorLines;
ICNDocument *icnDocument;
bool b_currentVertical;
bool b_orientationDefined;
- QPoint m_initialPos;
- QPoint m_previousPos;
- QPoint m_currentPos;
+ TQPoint m_initialPos;
+ TQPoint m_previousPos;
+ TQPoint m_currentPos;
- QCanvasLine *m_currentCon;
- QCanvasLine *m_previousCon;
+ TQCanvasLine *m_currentCon;
+ TQCanvasLine *m_previousCon;
// The first item that we clicked on
- QCanvasItem *p_initialItem;
+ TQCanvasItem *p_initialItem;
- QColor m_color;
+ TQColor m_color;
};
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/");
}
diff --git a/src/circuitdocument.h b/src/circuitdocument.h
index 581438b..76db48c 100644
--- a/src/circuitdocument.h
+++ b/src/circuitdocument.h
@@ -21,31 +21,31 @@ class Element;
class ICNDocument;
class KTechlab;
class Pin;
-class QTimer;
+class TQTimer;
class Switch;
class Wire;
class KActionMenu;
-typedef QValueList<Circuit*> CircuitList;
-typedef QValueList<Component*> ComponentList;
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
-typedef QValueList<ECNode*> ECNodeList;
-typedef QValueList<Element*> ElementList;
-typedef QValueList<QGuardedPtr<Pin> > PinList;
-typedef QValueList<Switch*> SwitchList;
-typedef QValueList<QGuardedPtr<Wire> > WireList;
+typedef TQValueList<Circuit*> CircuitList;
+typedef TQValueList<Component*> ComponentList;
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<ECNode*> ECNodeList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueList<TQGuardedPtr<Pin> > PinList;
+typedef TQValueList<Switch*> SwitchList;
+typedef TQValueList<TQGuardedPtr<Wire> > WireList;
class Circuitoid
{
public:
- bool contains( Pin *node ) { return pinList.contains(node); }
- bool contains( Wire *con ) { return wireList.contains(con); }
- bool contains( Element *ele ) { return elementList.contains(ele); }
+ bool tqcontains( Pin *node ) { return pinList.tqcontains(node); }
+ bool tqcontains( Wire *con ) { return wireList.tqcontains(con); }
+ bool tqcontains( Element *ele ) { return elementList.tqcontains(ele); }
- void addPin( Pin *node ) { if (node && !contains(node)) pinList += node; }
- void addWire( Wire *con ) { if (con && !contains(con)) wireList += con; }
- void addElement( Element *ele ) { if (ele && !contains(ele)) elementList += ele; }
+ void addPin( Pin *node ) { if (node && !tqcontains(node)) pinList += node; }
+ void addWire( Wire *con ) { if (con && !tqcontains(con)) wireList += con; }
+ void addElement( Element *ele ) { if (ele && !tqcontains(ele)) elementList += ele; }
WireList wireList;
PinList pinList;
@@ -62,8 +62,9 @@ information from those simulations back on the ICNDocument
class CircuitDocument : public ICNDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- CircuitDocument( const QString &caption, KTechlab *ktechlab, const char *name = 0L );
+ CircuitDocument( const TQString &caption, KTechlab *ktechlab, const char *name = 0L );
~CircuitDocument();
virtual View *createView( ViewContainer *viewContainer, uint viewAreaId, const char *name = 0l );
@@ -103,9 +104,9 @@ class CircuitDocument : public ICNDocument
protected:
virtual void itemAdded( Item * item );
- virtual void fillContextMenu( const QPoint &pos );
+ virtual void fillContextMenu( const TQPoint &pos );
virtual bool isValidItem( Item *item );
- virtual bool isValidItem( const QString &itemId );
+ virtual bool isValidItem( const TQString &itemId );
KActionMenu * m_pOrientationAction;
@@ -144,7 +145,7 @@ class CircuitDocument : public ICNDocument
void recursivePinAdd( Pin * pin, Circuitoid *circuitoid, PinList * unassignedPins );
void deleteCircuits();
- QTimer *m_updateCircuitsTmr;
+ TQTimer *m_updateCircuitsTmr;
CircuitList m_circuitList;
ComponentList m_toSimulateList;
ComponentList m_componentList; // List is built up during call to assignCircuits
diff --git a/src/circuitview.cpp b/src/circuitview.cpp
index f451c26..d14573c 100644
--- a/src/circuitview.cpp
+++ b/src/circuitview.cpp
@@ -16,7 +16,7 @@
#include "viewiface.h"
#include <klocale.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
CircuitView::CircuitView( CircuitDocument * circuitDocument, ViewContainer *viewContainer, uint viewAreaId, const char *name )
: ICNView( circuitDocument, viewContainer, viewAreaId, name ),
@@ -24,30 +24,30 @@ CircuitView::CircuitView( CircuitDocument * circuitDocument, ViewContainer *view
{
KActionCollection * ac = actionCollection();
- new KAction( "Dump linear equations", Qt::CTRL|Qt::Key_D, circuitDocument, SLOT(displayEquations()), ac, "dump_les" );
+ new KAction( "Dump linear equations", TQt::CTRL|TQt::Key_D, circuitDocument, TQT_SLOT(displayEquations()), ac, "dump_les" );
//BEGIN Item Control Actions
KRadioAction * ra;
- ra = new KRadioAction( i18n("0 Degrees"), "", 0, circuitDocument, SLOT(setOrientation0()), ac, "edit_orientation_0" );
+ ra = new KRadioAction( i18n("0 Degrees"), "", 0, circuitDocument, TQT_SLOT(setOrientation0()), ac, "edit_orientation_0" );
ra->setExclusiveGroup("orientation");
ra->setChecked(true);
- ra = new KRadioAction( i18n("90 Degrees"), "", 0, circuitDocument, SLOT(setOrientation90()), ac, "edit_orientation_90" );
+ ra = new KRadioAction( i18n("90 Degrees"), "", 0, circuitDocument, TQT_SLOT(setOrientation90()), ac, "edit_orientation_90" );
ra->setExclusiveGroup("orientation");
- ra = new KRadioAction( i18n("180 Degrees"), "", 0, circuitDocument, SLOT(setOrientation180()), ac, "edit_orientation_180" );
+ ra = new KRadioAction( i18n("180 Degrees"), "", 0, circuitDocument, TQT_SLOT(setOrientation180()), ac, "edit_orientation_180" );
ra->setExclusiveGroup("orientation");
- ra =new KRadioAction( i18n("270 Degrees"), "", 0, circuitDocument, SLOT(setOrientation270()), ac, "edit_orientation_270" );
+ ra =new KRadioAction( i18n("270 Degrees"), "", 0, circuitDocument, TQT_SLOT(setOrientation270()), ac, "edit_orientation_270" );
ra->setExclusiveGroup("orientation");
- new KAction( i18n("Create Subcircuit"), "", 0, circuitDocument, SLOT(createSubcircuit()), ac, "circuit_create_subcircuit" );
- new KAction( i18n("Rotate Clockwise"), "rotate_cw", "]", circuitDocument, SLOT(rotateClockwise()), ac, "edit_rotate_cw" );
- new KAction( i18n("Rotate Counter-Clockwise"), "rotate_ccw", "[", circuitDocument, SLOT(rotateCounterClockwise()), ac, "edit_rotate_ccw" );
- new KAction( i18n("Flip"), "", 0, circuitDocument, SLOT(itemFlip()), ac, "edit_flip" );
+ new KAction( i18n("Create Subcircuit"), "", 0, circuitDocument, TQT_SLOT(createSubcircuit()), ac, "circuit_create_subcircuit" );
+ new KAction( i18n("Rotate Clockwise"), "rotate_cw", "]", circuitDocument, TQT_SLOT(rotateClockwise()), ac, "edit_rotate_cw" );
+ new KAction( i18n("Rotate Counter-Clockwise"), "rotate_ccw", "[", circuitDocument, TQT_SLOT(rotateCounterClockwise()), ac, "edit_rotate_ccw" );
+ new KAction( i18n("Flip"), "", 0, circuitDocument, TQT_SLOT(itemFlip()), ac, "edit_flip" );
//END Item Control Actions
setXMLFile( "ktechlabcircuitui.rc", true );
- QWhatsThis::add( this, i18n(
+ TQWhatsThis::add( this, i18n(
"Construct a circuit by dragging components from the Component selector from the left. Create the connections by dragging a wire from the component connectors.<br><br>"
"The simulation is running by default, but can be paused and resumed from the Tools menu.<br><br>"
@@ -62,8 +62,8 @@ CircuitView::CircuitView( CircuitDocument * circuitDocument, ViewContainer *view
m_pViewIface = new CircuitViewIface(this);
m_statusBar->insertItem( "", ViewStatusBar::SimulationState );
- connect( Simulator::self(), SIGNAL(simulatingStateChanged(bool )), this, SLOT(slotUpdateRunningStatus(bool )) );
- slotUpdateRunningStatus( Simulator::self()->isSimulating() );
+ connect( Simulator::self(), TQT_SIGNAL(simulatingStateChanged(bool )), this, TQT_SLOT(slotUpdateRunningtqStatus(bool )) );
+ slotUpdateRunningtqStatus( Simulator::self()->isSimulating() );
}
@@ -74,13 +74,13 @@ CircuitView::~CircuitView()
}
-void CircuitView::slotUpdateRunningStatus( bool isRunning )
+void CircuitView::slotUpdateRunningtqStatus( bool isRunning )
{
m_statusBar->changeItem( isRunning ? i18n("Simulation Running") : i18n("Simulation Paused"), ViewStatusBar::SimulationState );
}
-void CircuitView::dragEnterEvent( QDragEnterEvent * e )
+void CircuitView::dragEnterEvent( TQDragEnterEvent * e )
{
ICNView::dragEnterEvent(e);
if ( e->isAccepted() )
diff --git a/src/circuitview.h b/src/circuitview.h
index 8097685..162c79b 100644
--- a/src/circuitview.h
+++ b/src/circuitview.h
@@ -21,15 +21,16 @@ class CircuitDocument;
class CircuitView : public ICNView
{
Q_OBJECT
+ TQ_OBJECT
public:
CircuitView( CircuitDocument *circuitDocument, ViewContainer *viewContainer, uint viewAreaId, const char *name = 0l );
~CircuitView();
public slots:
- virtual void slotUpdateRunningStatus( bool isRunning );
+ virtual void slotUpdateRunningtqStatus( bool isRunning );
protected:
- virtual void dragEnterEvent( QDragEnterEvent * e );
+ virtual void dragEnterEvent( TQDragEnterEvent * e );
CircuitDocument *p_circuitDocument;
};
diff --git a/src/ciwidgetmgr.cpp b/src/ciwidgetmgr.cpp
index 6e32423..e12caac 100644
--- a/src/ciwidgetmgr.cpp
+++ b/src/ciwidgetmgr.cpp
@@ -14,7 +14,7 @@
#include <kdebug.h>
-CIWidgetMgr::CIWidgetMgr( QCanvas *canvas, CNItem *item )
+CIWidgetMgr::CIWidgetMgr( TQCanvas *canvas, CNItem *item )
{
p_cnItem = item;
p_canvas = canvas;
@@ -23,9 +23,9 @@ CIWidgetMgr::CIWidgetMgr( QCanvas *canvas, CNItem *item )
CIWidgetMgr::~CIWidgetMgr()
{
- // QCanvas deletes our items for us. Actually, it pretty much insists on deleting them,
+ // TQCanvas deletes our items for us. Actually, it pretty much insists on deleting them,
// despite me telling it not to, so if I delete them then it gets confused and crashes.
- // Naughty QCanvas!
+ // Naughty TQCanvas!
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
{
@@ -35,7 +35,7 @@ CIWidgetMgr::~CIWidgetMgr()
}
-void CIWidgetMgr::setWidgetsPos( const QPoint &pos )
+void CIWidgetMgr::setWidgetsPos( const TQPoint &pos )
{
m_pos = pos;
}
@@ -51,28 +51,28 @@ void CIWidgetMgr::setDrawWidgets( bool draw )
}
-Widget *CIWidgetMgr::widgetWithID( const QString &id ) const
+Widget *CIWidgetMgr::widgetWithID( const TQString &id ) const
{
- WidgetMap::const_iterator it = m_widgetMap.find(id);
+ WidgetMap::const_iterator it = m_widgetMap.tqfind(id);
if ( it == m_widgetMap.end() )
return 0l;
else return it.data();
}
-Button *CIWidgetMgr::button( const QString &id ) const
+Button *CIWidgetMgr::button( const TQString &id ) const
{
return dynamic_cast<Button*>(widgetWithID(id));
}
-Slider *CIWidgetMgr::slider( const QString &id ) const
+Slider *CIWidgetMgr::slider( const TQString &id ) const
{
return dynamic_cast<Slider*>(widgetWithID(id));
}
-void CIWidgetMgr::setButtonState( const QString &id, int state )
+void CIWidgetMgr::setButtonState( const TQString &id, int state )
{
Button *b = button(id);
if (!b)
@@ -88,7 +88,7 @@ void CIWidgetMgr::setButtonState( const QString &id, int state )
}
-void CIWidgetMgr::drawWidgets( QPainter &p )
+void CIWidgetMgr::drawWidgets( TQPainter &p )
{
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
@@ -98,9 +98,9 @@ void CIWidgetMgr::drawWidgets( QPainter &p )
}
-void CIWidgetMgr::removeWidget( const QString & id )
+void CIWidgetMgr::removeWidget( const TQString & id )
{
- if ( !m_widgetMap.contains(id) )
+ if ( !m_widgetMap.tqcontains(id) )
return;
delete m_widgetMap[id];
@@ -108,14 +108,14 @@ void CIWidgetMgr::removeWidget( const QString & id )
}
-Button* CIWidgetMgr::addButton( const QString &id, const QRect & pos, const QString &display, bool toggle )
+Button* CIWidgetMgr::addButton( const TQString &id, const TQRect & pos, const TQString &display, bool toggle )
{
WidgetMap::iterator it;
Button *button = new Button( id, p_cnItem, toggle, pos, p_canvas );
- (dynamic_cast<QButton*>(button->widget()))->setText(display);
+ (dynamic_cast<TQButton*>(button->widget()))->setText(display);
- it = m_widgetMap.find(id);
+ it = m_widgetMap.tqfind(id);
if ( it == m_widgetMap.end() )
{
m_widgetMap[id] = button;
@@ -132,14 +132,14 @@ Button* CIWidgetMgr::addButton( const QString &id, const QRect & pos, const QStr
}
-Button* CIWidgetMgr::addButton( const QString &id, const QRect & pos, QPixmap pixmap, bool toggle )
+Button* CIWidgetMgr::addButton( const TQString &id, const TQRect & pos, TQPixmap pixmap, bool toggle )
{
WidgetMap::iterator it;
Button *button = new Button( id, p_cnItem, toggle, pos, p_canvas );
button->setPixmap(pixmap);
- it = m_widgetMap.find(id);
+ it = m_widgetMap.tqfind(id);
if ( it == m_widgetMap.end() )
{
m_widgetMap[id] = button;
@@ -156,10 +156,10 @@ Button* CIWidgetMgr::addButton( const QString &id, const QRect & pos, QPixmap pi
}
-Slider* CIWidgetMgr::addSlider( const QString &id, int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, const QRect & pos )
+Slider* CIWidgetMgr::addSlider( const TQString &id, int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, const TQRect & pos )
{
Slider *slider = new Slider( id, p_cnItem, pos, p_canvas );
- QSlider *qslider = dynamic_cast<QSlider*>(slider->widget());
+ TQSlider *qslider = dynamic_cast<TQSlider*>(slider->widget());
qslider->setMinValue(minValue);
qslider->setMaxValue(maxValue);
@@ -167,7 +167,7 @@ Slider* CIWidgetMgr::addSlider( const QString &id, int minValue, int maxValue, i
qslider->setValue(value);
slider->setOrientation(orientation);
- WidgetMap::iterator it = m_widgetMap.find(id);
+ WidgetMap::iterator it = m_widgetMap.tqfind(id);
if ( it == m_widgetMap.end() )
{
m_widgetMap[id] = slider;
@@ -186,12 +186,12 @@ Slider* CIWidgetMgr::addSlider( const QString &id, int minValue, int maxValue, i
bool CIWidgetMgr::mousePressEvent( const EventInfo &info )
{
- QMouseEvent *e = info.mousePressEvent( 0, 0 );
+ TQMouseEvent *e = info.mousePressEvent( 0, 0 );
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
{
- if ( it.data()->rect().contains(info.pos) )
+ if ( it.data()->rect().tqcontains(info.pos) )
{
it.data()->mousePressEvent(e);
if (e->isAccepted())
@@ -208,7 +208,7 @@ bool CIWidgetMgr::mousePressEvent( const EventInfo &info )
bool CIWidgetMgr::mouseReleaseEvent( const EventInfo &info )
{
- QMouseEvent *e = info.mouseReleaseEvent( 0, 0 );
+ TQMouseEvent *e = info.mouseReleaseEvent( 0, 0 );
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
@@ -224,12 +224,12 @@ bool CIWidgetMgr::mouseReleaseEvent( const EventInfo &info )
bool CIWidgetMgr::mouseDoubleClickEvent( const EventInfo &info )
{
- QMouseEvent *e = info.mouseDoubleClickEvent( 0, 0 );
+ TQMouseEvent *e = info.mouseDoubleClickEvent( 0, 0 );
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
{
- if ( it.data()->rect().contains(info.pos) )
+ if ( it.data()->rect().tqcontains(info.pos) )
{
it.data()->mouseDoubleClickEvent(e);
if (e->isAccepted())
@@ -246,7 +246,7 @@ bool CIWidgetMgr::mouseDoubleClickEvent( const EventInfo &info )
bool CIWidgetMgr::mouseMoveEvent( const EventInfo &info )
{
- QMouseEvent *e = info.mouseMoveEvent( 0, 0 );
+ TQMouseEvent *e = info.mouseMoveEvent( 0, 0 );
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
@@ -265,12 +265,12 @@ bool CIWidgetMgr::mouseMoveEvent( const EventInfo &info )
bool CIWidgetMgr::wheelEvent( const EventInfo &info )
{
- QWheelEvent *e = info.wheelEvent( 0, 0 );
+ TQWheelEvent *e = info.wheelEvent( 0, 0 );
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
{
- if ( it.data()->rect().contains(info.pos) )
+ if ( it.data()->rect().tqcontains(info.pos) )
{
it.data()->wheelEvent(e);
if (e->isAccepted())
diff --git a/src/ciwidgetmgr.h b/src/ciwidgetmgr.h
index b79fc06..f92a877 100644
--- a/src/ciwidgetmgr.h
+++ b/src/ciwidgetmgr.h
@@ -11,19 +11,19 @@
#ifndef CIWIDGETMGR_H
#define CIWIDGETMGR_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
class Button;
class CNItem;
class Slider;
-class QCanvas;
+class TQCanvas;
class Widget;
-typedef QMap<QString, Widget*> WidgetMap;
+typedef TQMap<TQString, Widget*> WidgetMap;
/**
-This class handles the widgets (those things associated with CNItems that use QWidgets.
+This class handles the widgets (those things associated with CNItems that use TQWidgets.
This class is pretty much to maintain a tidy interface: the functions could just as well be
all shoved in CNItem, but that gets messy.
@author David Saxton
@@ -31,41 +31,41 @@ all shoved in CNItem, but that gets messy.
class CIWidgetMgr
{
public:
- CIWidgetMgr( QCanvas *canvas, CNItem *item );
+ CIWidgetMgr( TQCanvas *canvas, CNItem *item );
virtual ~CIWidgetMgr();
/**
* Set the top-left position from which mouse events are interpreted and the
* widgets are drawn from.
*/
- void setWidgetsPos( const QPoint &pos );
+ void setWidgetsPos( const TQPoint &pos );
/**
* Returns a pointer to the widget with the given id, or NULL if no such
* widgets are found.
*/
- Widget *widgetWithID( const QString &id ) const;
- Button *button( const QString &id ) const;
- Slider *slider( const QString &id ) const;
- void setButtonState( const QString &id, int state );
+ Widget *widgetWithID( const TQString &id ) const;
+ Button *button( const TQString &id ) const;
+ Slider *slider( const TQString &id ) const;
+ void setButtonState( const TQString &id, int state );
/**
* Adds a slider with the given id and values to the position
*/
- Slider* addSlider( const QString &id, int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, const QRect & pos );
+ Slider* addSlider( const TQString &id, int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, const TQRect & pos );
/**
* Essentially the same as addDisplayText, but displays a button with
- * text on it. The virtual functions buttonPressed( const QString &id ) and
- * buttonReleased( const QString &id ) are called as appropriate with button id
+ * text on it. The virtual functions buttonPressed( const TQString &id ) and
+ * buttonReleased( const TQString &id ) are called as appropriate with button id
*/
- Button* addButton( const QString &id, const QRect & pos, const QString &display, bool toggle = false );
+ Button* addButton( const TQString &id, const TQRect & pos, const TQString &display, bool toggle = false );
/**
- * Adds a button with a QPixmap pixmap on it instead of text
- * @see void addButton( const QString &id, QRect pos, const QString &display )
+ * Adds a button with a TQPixmap pixmap on it instead of text
+ * @see void addButton( const TQString &id, TQRect pos, const TQString &display )
*/
- Button* addButton( const QString &id, const QRect & pos, QPixmap pixmap, bool toggle = false );
+ Button* addButton( const TQString &id, const TQRect & pos, TQPixmap pixmap, bool toggle = false );
/**
* Removes the widget with the given id.
*/
- void removeWidget( const QString & id );
+ void removeWidget( const TQString & id );
/**
* Sets whether or not to draw the widgets (drawing widgets mucks up SVG
* export). This function just calls either hide() or show() in each widget.
@@ -80,23 +80,23 @@ public:
void enterEvent();
void leaveEvent();
- virtual void buttonStateChanged( const QString &/*id*/, bool /*on*/ ) {};
- virtual void sliderValueChanged( const QString &/*id*/, int /*value*/ ) {};
+ virtual void buttonStateChanged( const TQString &/*id*/, bool /*on*/ ) {};
+ virtual void sliderValueChanged( const TQString &/*id*/, int /*value*/ ) {};
int mgrX() const { return m_pos.x(); }
int mgrY() const { return m_pos.y(); }
/**
* Draw the widgets using the given painter. This function isn't actually
- * used to draw the widgets on the canvas, as they are QCanvasItems
+ * used to draw the widgets on the canvas, as they are TQCanvasItems
* themselves, but allows other classes (e.g. ItemLibrary) to draw them
* using a special painter.
*/
- void drawWidgets( QPainter &p );
+ void drawWidgets( TQPainter &p );
protected:
WidgetMap m_widgetMap;
- QPoint m_pos;
- QCanvas *p_canvas;
+ TQPoint m_pos;
+ TQCanvas *p_canvas;
CNItem *p_cnItem;
};
diff --git a/src/cnitem.cpp b/src/cnitem.cpp
index 9d949f0..02e7881 100644
--- a/src/cnitem.cpp
+++ b/src/cnitem.cpp
@@ -17,8 +17,8 @@
#include "itemdocumentdata.h"
#include <kdebug.h>
-#include <qbitarray.h>
-#include <qpainter.h>
+#include <tqbitarray.h>
+#include <tqpainter.h>
#include <cmath>
@@ -26,7 +26,7 @@
const double DPR = 57.29577951308232087665461840231273527024;
-CNItem::CNItem( ICNDocument *icnDocument, bool newItem, const QString &id )
+CNItem::CNItem( ICNDocument *icnDocument, bool newItem, const TQString &id )
: Item( icnDocument, newItem, id ),
CIWidgetMgr( icnDocument->canvas(), this ),
p_icnDocument(icnDocument),
@@ -35,11 +35,11 @@ CNItem::CNItem( ICNDocument *icnDocument, bool newItem, const QString &id )
setZ( ICNDocument::Z::Item );
setSelected(false);
- m_brushCol = QColor( 0xf7, 0xf7, 0xff );
- m_selectedCol = QColor( 101, 134, 192 );
+ m_brushCol = TQColor( 0xf7, 0xf7, 0xff );
+ m_selectedCol = TQColor( 101, 134, 192 );
setBrush(m_brushCol);
- setPen( Qt::black );
+ setPen( TQt::black );
}
CNItem::~CNItem()
@@ -63,10 +63,10 @@ int CNItem::rtti() const
}
-bool CNItem::preResize( QRect sizeRect )
+bool CNItem::preResize( TQRect sizeRect )
{
- if ( (std::abs((double)sizeRect.width()) < minimumSize().width()) ||
- (std::abs((double)sizeRect.height()) < minimumSize().height()) )
+ if ( (std::abs((double)sizeRect.width()) < tqminimumSize().width()) ||
+ (std::abs((double)sizeRect.height()) < tqminimumSize().height()) )
return false;
updateConnectorPoints(false);
@@ -84,16 +84,16 @@ void CNItem::setVisible( bool yes )
{
if (b_deleted)
{
- Item::setVisible(false);
+ Item::tqsetVisible(false);
return;
}
- Item::setVisible(yes);
+ Item::tqsetVisible(yes);
const TextMap::iterator textMapEnd = m_textMap.end();
for ( TextMap::iterator it = m_textMap.begin(); it != textMapEnd; ++it )
{
- it.data()->setVisible(yes);
+ it.data()->tqsetVisible(yes);
}
const NodeMap::iterator nodeMapEnd = m_nodeMap.end();
@@ -109,9 +109,9 @@ void CNItem::setVisible( bool yes )
}
-void CNItem::setInitialPos( const QPoint &pos )
+void CNItem::setInitialPos( const TQPoint &pos )
{
- m_offset = pos - QPoint( (int)x(), (int)y() );
+ m_offset = pos - TQPoint( (int)x(), (int)y() );
}
@@ -133,8 +133,8 @@ void CNItem::updateNodeLevels()
it.data().node->setLevel(l);
}
- const ItemList::iterator end = m_children.end();
- for ( ItemList::iterator it = m_children.begin(); it != end; ++it )
+ const ItemList::iterator end = m_tqchildren.end();
+ for ( ItemList::iterator it = m_tqchildren.begin(); it != end; ++it )
{
if ( CNItem *cnItem = dynamic_cast<CNItem*>((Item*)*it) )
cnItem->updateNodeLevels();
@@ -156,7 +156,7 @@ ConnectorList CNItem::connectorList()
ConnectorList::iterator end = nodeList.end();
for ( ConnectorList::iterator it = nodeList.begin(); it != end; ++it )
{
- if ( *it && !list.contains(*it) )
+ if ( *it && !list.tqcontains(*it) )
{
list.append(*it);
}
@@ -165,7 +165,7 @@ ConnectorList CNItem::connectorList()
end = nodeList.end();
for ( ConnectorList::iterator it = nodeList.begin(); it != end; ++it )
{
- if ( *it && !list.contains(*it) )
+ if ( *it && !list.tqcontains(*it) )
{
list.append(*it);
}
@@ -237,7 +237,7 @@ ItemData CNItem::itemData() const
}
-Node* CNItem::createNode( double _x, double _y, int orientation, const QString &name, uint type )
+Node* CNItem::createNode( double _x, double _y, int orientation, const TQString &name, uint type )
{
orientation %= 360;
if ( orientation < 0 )
@@ -258,11 +258,11 @@ Node* CNItem::createNode( double _x, double _y, int orientation, const QString &
Node *node;
if ( (type == Node::ec_pin) || (type == Node::ec_junction) )
{
- node = new ECNode( p_icnDocument, Node::node_type(type), dir, QPoint( 0, 0 ) );
+ node = new ECNode( p_icnDocument, Node::node_type(type), dir, TQPoint( 0, 0 ) );
}
else
{
- node = new FPNode( p_icnDocument, Node::node_type(type), dir, QPoint( 0, 0 ) );
+ node = new FPNode( p_icnDocument, Node::node_type(type), dir, TQPoint( 0, 0 ) );
}
node->setLevel( level() );
@@ -284,9 +284,9 @@ Node* CNItem::createNode( double _x, double _y, int orientation, const QString &
}
-bool CNItem::removeNode( const QString &name )
+bool CNItem::removeNode( const TQString &name )
{
- NodeMap::iterator it = m_nodeMap.find(name);
+ NodeMap::iterator it = m_nodeMap.tqfind(name);
if ( it == m_nodeMap.end() ) {
return false;
}
@@ -297,7 +297,7 @@ bool CNItem::removeNode( const QString &name )
}
-Node *CNItem::getClosestNode( const QPoint &pos )
+Node *CNItem::getClosestNode( const TQPoint &pos )
{
// Work through the nodes, finding the one closest to the (x, y) position
Node *shortestNode = 0L;
@@ -368,7 +368,7 @@ void CNItem::moveBy( double dx, double dy )
updateConnectorPoints(false);
Item::moveBy( dx, dy );
- setWidgetsPos( QPoint( int(x()), int(y()) ) );
+ setWidgetsPos( TQPoint( int(x()), int(y()) ) );
}
@@ -443,7 +443,7 @@ void CNItem::leaveEvent()
}
-void CNItem::drawShape( QPainter &p )
+void CNItem::drawShape( TQPainter &p )
{
if (!isVisible())
return;
@@ -458,7 +458,7 @@ void CNItem::drawShape( QPainter &p )
}
-void CNItem::initPainter( QPainter &p )
+void CNItem::initPainter( TQPainter &p )
{
if ( isSelected() )
p.setPen(m_selectedCol);
@@ -487,17 +487,17 @@ void CNItem::updateConnectorPoints( bool add )
// Get translation matrix
// Hackish...
- QWMatrix m;
+ TQWMatrix m;
if ( Component *c = dynamic_cast<Component*>(this) )
m = c->transMatrix( c->angleDegrees(), c->flipped(), int(x()), int(y()), false );
// Convention used here: _UM = unmapped by both matrix and cell reference, _M = mapped
- const QPoint start_UM = QPoint( int(x()+offsetX())-cellSize, int(y()+offsetY())-cellSize );
- const QPoint end_UM = start_UM + QPoint( width()+2*cellSize, height()+2*cellSize );
+ const TQPoint start_UM = TQPoint( int(x()+offsetX())-cellSize, int(y()+offsetY())-cellSize );
+ const TQPoint end_UM = start_UM + TQPoint( width()+2*cellSize, height()+2*cellSize );
- const QPoint start_M = m.map(start_UM)/cellSize;
- const QPoint end_M = m.map(end_UM)/cellSize;
+ const TQPoint start_M = m.map(start_UM)/cellSize;
+ const TQPoint end_M = m.map(end_UM)/cellSize;
int sx_M = start_M.x();
@@ -571,10 +571,10 @@ void CNItem::updateConnectorPoints( bool add )
}
-Text* CNItem::addDisplayText( const QString &id, const QRect & pos, const QString &display, bool internal, int flags )
+Text* CNItem::addDisplayText( const TQString &id, const TQRect & pos, const TQString &display, bool internal, int flags )
{
Text *text = 0l;
- TextMap::iterator it = m_textMap.find(id);
+ TextMap::iterator it = m_textMap.tqfind(id);
if ( it != m_textMap.end() )
{
// kdWarning() << "CNItem::addDisplayText: removing old text"<<endl;
@@ -594,9 +594,9 @@ Text* CNItem::addDisplayText( const QString &id, const QRect & pos, const QStrin
}
-void CNItem::setDisplayText( const QString &id, const QString &display )
+void CNItem::setDisplayText( const TQString &id, const TQString &display )
{
- TextMap::iterator it = m_textMap.find(id);
+ TextMap::iterator it = m_textMap.tqfind(id);
if ( it == m_textMap.end() )
{
kdError() << "CNItem::setDisplayText: Could not find text with id \""<<id<<"\""<<endl;
@@ -607,9 +607,9 @@ void CNItem::setDisplayText( const QString &id, const QString &display )
}
-void CNItem::removeDisplayText( const QString &id )
+void CNItem::removeDisplayText( const TQString &id )
{
- TextMap::iterator it = m_textMap.find(id);
+ TextMap::iterator it = m_textMap.tqfind(id);
if ( it == m_textMap.end() )
{
// kdError() << "CNItem::removeDisplayText: Could not find text with id \""<<id<<"\""<<endl;
@@ -621,15 +621,15 @@ void CNItem::removeDisplayText( const QString &id )
}
-QString CNItem::nodeId( const QString &internalNodeId )
+TQString CNItem::nodeId( const TQString &internalNodeId )
{
- NodeMap::iterator it = m_nodeMap.find(internalNodeId);
+ NodeMap::iterator it = m_nodeMap.tqfind(internalNodeId);
if ( it == m_nodeMap.end() ) return "";
else return it.data().id;
}
-Node *CNItem::childNode( const QString &childId )
+Node *CNItem::childNode( const TQString &childId )
{
return p_icnDocument->nodeWithID( nodeId(childId) );
}
diff --git a/src/cnitem.h b/src/cnitem.h
index 7a5f55a..eb8f80a 100644
--- a/src/cnitem.h
+++ b/src/cnitem.h
@@ -22,10 +22,10 @@ class Connector;
class DoubleSpinBox;
class LibraryItem;
class Node;
-class QSlider;
-class QString;
-class QToolButton;
-class QWMatrix;
+class TQSlider;
+class TQString;
+class TQToolButton;
+class TQWMatrix;
class Slider;
class Text;
@@ -35,17 +35,17 @@ class NodeInfo
public:
NodeInfo();
- QString id; // External id (ICNDocument scope)
+ TQString id; // External id (ICNDocument scope)
Node *node; //Pointer to the node
double x; // X position relative to item
double y; // Y position relative to item
- int orientation; // Orientation relative to item
+ int orientation; // Qt::Orientation relative to item
};
-typedef QMap<QString, QString> StringMap;
-typedef QMap<QString, NodeInfo> NodeMap; // Internal id, node info
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
-typedef QMap<QString, QGuardedPtr<Text> > TextMap;
+typedef TQMap<TQString, TQString> StringMap;
+typedef TQMap<TQString, NodeInfo> NodeMap; // Internal id, node info
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
+typedef TQMap<TQString, TQGuardedPtr<Text> > TextMap;
/**
Essentially, all items that live on ICNDocument should inherit from this class.
@@ -58,8 +58,9 @@ saving and editing of associated data, cutting / copying, etc)
class CNItem : public Item, public CIWidgetMgr
{
Q_OBJECT
+ TQ_OBJECT
public:
- CNItem( ICNDocument *_icnView, bool newItem, const QString &id );
+ CNItem( ICNDocument *_icnView, bool newItem, const TQString &id );
virtual ~CNItem();
/**
@@ -72,16 +73,16 @@ public:
* coordinates of the node are relative to the upper left corner of the item.
* @param type See Node::node_type
*/
- Node* createNode( double _x, double _y, int orientation, const QString &name, uint type );
+ Node* createNode( double _x, double _y, int orientation, const TQString &name, uint type );
/**
* Removes a child node. You should use this function if you want to remove
* any nodes during the lifetime of the CNItem.
*/
- bool removeNode( const QString &name );
+ bool removeNode( const TQString &name );
/**
* Sets the mouse click point when moving this item
*/
- void setInitialPos( const QPoint &pos );
+ void setInitialPos( const TQPoint &pos );
/**
* Snaps the component to the grid.
*/
@@ -89,12 +90,12 @@ public:
/**
* Returns the closest node that is associated with the CNItem
*/
- Node *getClosestNode( const QPoint &pos );
+ Node *getClosestNode( const TQPoint &pos );
/**
* Returns a list of connectors associated with the CNItem
*/
ConnectorList connectorList();
- virtual bool preResize( QRect sizeRect );
+ virtual bool preResize( TQRect sizeRect );
virtual bool mousePressEvent( const EventInfo &eventInfo );
virtual bool mouseReleaseEvent( const EventInfo &eventInfo );
virtual bool mouseDoubleClickEvent ( const EventInfo &eventInfo );
@@ -113,14 +114,14 @@ public:
* Converts the id used to internally identify a node to the global
* ICNDocument node id. eg "vss" might return "node__13".
*/
- QString nodeId( const QString &internalNodeId );
+ TQString nodeId( const TQString &internalNodeId );
/**
* Returns a pointer to the node with the given internal (child) id
*/
- Node *childNode( const QString &childId );
+ Node *childNode( const TQString &childId );
/**
* Returns the node map used:
- * QMap<QString, NodeInfo> NodeMap
+ * TQMap<TQString, NodeInfo> NodeMap
* It's probably best to cache this data
*/
NodeMap nodeMap() const { return m_nodeMap; }
@@ -156,7 +157,7 @@ public slots:
protected:
virtual void reparented( Item *oldParent, Item *newParent );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
virtual void postResize();
/**
* CNItem handles drawing of text associated with the CNItem.
@@ -164,28 +165,28 @@ protected:
* @param pos is the position that the text occupies relative to the top left corner of the CNItem.
* @param display is the actual text to be displayed.
* @param internal is used to determine the z-level of the text - whether it should be below or above the item
- * @param flags Text alignment flags - Qt::AlignmentFlags and Qt::TextFlags OR'd together.
+ * @param flags Text tqalignment flags - TQt::AlignmentFlags and TQt::TextFlags OR'd together.
*/
- Text* addDisplayText( const QString &id, const QRect & pos, const QString &display, bool internal = true, int flags = Qt::AlignHCenter | Qt::AlignVCenter );
- void setDisplayText( const QString &id, const QString &display );
+ Text* addDisplayText( const TQString &id, const TQRect & pos, const TQString &display, bool internal = true, int flags = TQt::AlignHCenter | TQt::AlignVCenter );
+ void setDisplayText( const TQString &id, const TQString &display );
/**
* Remove the display text with the given id
*/
- void removeDisplayText( const QString &id );
+ void removeDisplayText( const TQString &id );
/**
* Sets the right colour if selected, transforms the matrix of the painter
*/
- virtual void initPainter( QPainter &p );
+ virtual void initPainter( TQPainter &p );
- QPoint m_offset;
- QGuardedPtr<ICNDocument> p_icnDocument;
+ TQPoint m_offset;
+ TQGuardedPtr<ICNDocument> p_icnDocument;
TextMap m_textMap;
NodeMap m_nodeMap;
- QColor m_selectedCol;
- QColor m_brushCol;
+ TQColor m_selectedCol;
+ TQColor m_brushCol;
bool b_pointsAdded;
};
-typedef QValueList<CNItem*> CNItemList;
+typedef TQValueList<CNItem*> CNItemList;
#endif
diff --git a/src/cnitemgroup.cpp b/src/cnitemgroup.cpp
index 21a9878..9d8030f 100644
--- a/src/cnitemgroup.cpp
+++ b/src/cnitemgroup.cpp
@@ -38,7 +38,7 @@ bool CNItemGroup::addItem( Item *item )
// of the list as the most recently added item if some
// the previous activeCNItem is removed
- if ( !item || !item->canvas() || m_itemList.contains(item) || !item->isMovable() )
+ if ( !item || !item->canvas() || m_itemList.tqcontains(item) || !item->isMovable() )
return false;
if ( m_currentLevel != -1 && item->level() > m_currentLevel )
@@ -59,7 +59,7 @@ bool CNItemGroup::addItem( Item *item )
bool CNItemGroup::addNode( Node *node )
{
- if ( !node || m_nodeList.contains(node) || node->isChildNode() )
+ if ( !node || m_nodeList.tqcontains(node) || node->isChildNode() )
return false;
m_nodeList.prepend(node);
node->setSelected(true);
@@ -71,7 +71,7 @@ bool CNItemGroup::addNode( Node *node )
bool CNItemGroup::addConnector( Connector *con )
{
- if ( !con || m_connectorList.contains(con) )
+ if ( !con || m_connectorList.tqcontains(con) )
return false;
m_connectorList.prepend(con);
con->setSelected(true);
@@ -81,7 +81,7 @@ bool CNItemGroup::addConnector( Connector *con )
}
-bool CNItemGroup::addQCanvasItem( QCanvasItem *qcanvasItem )
+bool CNItemGroup::addTQCanvasItem( TQCanvasItem *qcanvasItem )
{
if (!qcanvasItem) return false;
@@ -98,7 +98,7 @@ bool CNItemGroup::addQCanvasItem( QCanvasItem *qcanvasItem )
{
ConnectorLine *connectorLine = dynamic_cast<ConnectorLine*>(qcanvasItem);
if (connectorLine)
- connector = connectorLine->parent();
+ connector = connectorLine->tqparent();
}
if (connector)
return addConnector(connector);
@@ -106,14 +106,14 @@ bool CNItemGroup::addQCanvasItem( QCanvasItem *qcanvasItem )
return false;
}
-void CNItemGroup::setItems( QCanvasItemList list )
+void CNItemGroup::setItems( TQCanvasItemList list )
{
ItemList itemRemoveList = m_itemList;
ConnectorList connectorRemoveList = m_connectorList;
NodeList nodeRemoveList = m_nodeList;
- const QCanvasItemList::const_iterator end = list.end();
- for ( QCanvasItemList::const_iterator it = list.begin(); it != end; ++it )
+ const TQCanvasItemList::const_iterator end = list.end();
+ for ( TQCanvasItemList::const_iterator it = list.begin(); it != end; ++it )
{
switch ( *it ? (*it)->rtti() : 0 )
{
@@ -135,7 +135,7 @@ void CNItemGroup::setItems( QCanvasItemList list )
}
case ItemDocument::RTTI::ConnectorLine:
{
- connectorRemoveList.remove( (dynamic_cast<ConnectorLine*>(*it))->parent() );
+ connectorRemoveList.remove( (dynamic_cast<ConnectorLine*>(*it))->tqparent() );
break;
}
default:
@@ -171,12 +171,12 @@ void CNItemGroup::setItems( QCanvasItemList list )
}
{
- const QCanvasItemList::const_iterator end = list.end();
- for ( QCanvasItemList::const_iterator it = list.begin(); it != end; ++it )
+ const TQCanvasItemList::const_iterator end = list.end();
+ for ( TQCanvasItemList::const_iterator it = list.begin(); it != end; ++it )
{
// We don't need to check that we've already got the item as it will
// be checked in the function call
- addQCanvasItem(*it);
+ addTQCanvasItem(*it);
}
}
}
@@ -184,7 +184,7 @@ void CNItemGroup::setItems( QCanvasItemList list )
void CNItemGroup::removeItem( Item *item )
{
- if ( !item || !m_itemList.contains(item) )
+ if ( !item || !m_itemList.tqcontains(item) )
return;
unregisterItem(item);
if ( m_activeItem == item )
@@ -198,7 +198,7 @@ void CNItemGroup::removeItem( Item *item )
void CNItemGroup::removeNode( Node *node )
{
- if ( !node || !m_nodeList.contains(node) )
+ if ( !node || !m_nodeList.tqcontains(node) )
return;
m_nodeList.remove(node);
node->setSelected(false);
@@ -209,7 +209,7 @@ void CNItemGroup::removeNode( Node *node )
void CNItemGroup::removeConnector( Connector *con )
{
- if ( !con || !m_connectorList.contains(con) ) return;
+ if ( !con || !m_connectorList.tqcontains(con) ) return;
m_connectorList.remove(con);
con->setSelected(false);
updateInfo();
@@ -217,7 +217,7 @@ void CNItemGroup::removeConnector( Connector *con )
}
-void CNItemGroup::removeQCanvasItem( QCanvasItem *qcanvasItem )
+void CNItemGroup::removeTQCanvasItem( TQCanvasItem *qcanvasItem )
{
if (!qcanvasItem) return;
@@ -234,7 +234,7 @@ void CNItemGroup::removeQCanvasItem( QCanvasItem *qcanvasItem )
{
ConnectorLine *connectorLine = dynamic_cast<ConnectorLine*>(qcanvasItem);
if (connectorLine)
- connector = connectorLine->parent();
+ connector = connectorLine->tqparent();
}
if (connector)
return removeConnector(connector);
@@ -257,7 +257,7 @@ NodeList CNItemGroup::nodes( bool excludeParented ) const
NodeList::const_iterator internalEnd = internal.end();
for ( NodeList::const_iterator intIt = internal.begin(); intIt != internalEnd; ++intIt )
{
- if ( *intIt && !nodeList.contains(*intIt) )
+ if ( *intIt && !nodeList.tqcontains(*intIt) )
nodeList << *intIt;
}
}
@@ -279,7 +279,7 @@ ConnectorList CNItemGroup::connectors( bool excludeParented ) const
ConnectorList::iterator tcEnd = translatableConnectors.end();
for ( ConnectorList::iterator it = translatableConnectors.begin(); it != tcEnd; ++it )
{
- if ( *it && !connectorList.contains(*it) )
+ if ( *it && !connectorList.tqcontains(*it) )
connectorList << *it;
}
@@ -294,7 +294,7 @@ ConnectorList CNItemGroup::connectors( bool excludeParented ) const
ConnectorList::const_iterator connectedEnd = connected.end();
for ( ConnectorList::const_iterator conIt = connected.begin(); conIt != connectedEnd; ++conIt )
{
- if ( *conIt && !connectorList.contains(*conIt) )
+ if ( *conIt && !connectorList.tqcontains(*conIt) )
connectorList << *conIt;
}
}
@@ -304,7 +304,7 @@ ConnectorList CNItemGroup::connectors( bool excludeParented ) const
}
-bool CNItemGroup::contains( QCanvasItem *qcanvasItem ) const
+bool CNItemGroup::tqcontains( TQCanvasItem *qcanvasItem ) const
{
if (!qcanvasItem)
return false;
@@ -582,9 +582,9 @@ void CNItemGroup::setActiveItem( Item *item )
}
-QStringList CNItemGroup::itemIDs()
+TQStringList CNItemGroup::itemIDs()
{
- QStringList list;
+ TQStringList list;
ItemList::iterator end = m_itemList.end();
for ( ItemList::iterator it = m_itemList.begin(); it != end; ++it )
{
diff --git a/src/cnitemgroup.h b/src/cnitemgroup.h
index fe2c064..397b637 100644
--- a/src/cnitemgroup.h
+++ b/src/cnitemgroup.h
@@ -24,12 +24,12 @@ class Node;
class ECNode;
class FPNode;
class ICNDocument;
-class QCanvasItem;
-class QCanvasItemList;
+class TQCanvasItem;
+class TQCanvasItemList;
-typedef QValueList<QGuardedPtr<Item> > ItemList;
-typedef QValueList<QGuardedPtr<Node> > NodeList;
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<TQGuardedPtr<Item> > ItemList;
+typedef TQValueList<TQGuardedPtr<Node> > NodeList;
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
/**
@author David Saxton
@@ -37,6 +37,7 @@ typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
class CNItemGroup : public ItemGroup
{
Q_OBJECT
+ TQ_OBJECT
public:
CNItemGroup( ICNDocument *icnDocument, const char *name = 0 );
~CNItemGroup();
@@ -61,11 +62,11 @@ public:
* If the item is a a CNItem, Node or Connector, returns the status
* for that particular add function, else returns false
*/
- virtual bool addQCanvasItem( QCanvasItem *qcanvasItem );
+ virtual bool addTQCanvasItem( TQCanvasItem *qcanvasItem );
/**
* Sets the contained items to those in this list
*/
- virtual void setItems( QCanvasItemList list );
+ virtual void setItems( TQCanvasItemList list );
/**
* Removes the CNItem from the group
*/
@@ -81,11 +82,11 @@ public:
/**
* If the item is a a CNItem, Node or Connector, then attempts to remove it
*/
- virtual void removeQCanvasItem( QCanvasItem *qcanvasItem );
+ virtual void removeTQCanvasItem( TQCanvasItem *qcanvasItem );
/**
- * Returns true if the QCanvasItem passed is contained in the group
+ * Returns true if the TQCanvasItem passed is contained in the group
*/
- virtual bool contains( QCanvasItem *qcanvasItem ) const;
+ virtual bool tqcontains( TQCanvasItem *qcanvasItem ) const;
/**
* Returns the number of Nodes in the CanvasGroup
*/
@@ -137,19 +138,19 @@ public:
/**
* Returns a list of all the Nodes in the group.
* @param excludeParented if false, then nodes that are fully contained
- * within item children will also be returned.
+ * within item tqchildren will also be returned.
*/
NodeList nodes( bool excludeParented = true ) const;
/**
* Returns a list of all the Connectors in the group.
* @param excludeParented if false, then connectors that are fully contained
- * within item children will also be returned.
+ * within item tqchildren will also be returned.
*/
ConnectorList connectors( bool excludeParented = true ) const;
/**
* Returns a list of the ids of all the CNItems in the group.
*/
- QStringList itemIDs();
+ TQStringList itemIDs();
/**
* Returns true if at least some of the CNItems in this group can be
* rotated. Returns false if no items present.
diff --git a/src/connector.cpp b/src/connector.cpp
index 03a304c..febb20c 100644
--- a/src/connector.cpp
+++ b/src/connector.cpp
@@ -31,29 +31,29 @@ inline static int fromCanvas( int pos )
// return (pos>0) ? int((pos-3)/8) : int((pos-5)/8);
}
-inline static QPoint toCanvas( const QPoint * const pos )
+inline static TQPoint toCanvas( const TQPoint * const pos )
{
- return QPoint( toCanvas(pos->x()), toCanvas(pos->y()) );
+ return TQPoint( toCanvas(pos->x()), toCanvas(pos->y()) );
}
-inline static QPoint fromCanvas( const QPoint * const pos )
+inline static TQPoint fromCanvas( const TQPoint * const pos )
{
- return QPoint( fromCanvas(pos->x()), fromCanvas(pos->y()) );
+ return TQPoint( fromCanvas(pos->x()), fromCanvas(pos->y()) );
}
-inline static QPoint toCanvas( const QPoint &pos )
+inline static TQPoint toCanvas( const TQPoint &pos )
{
- return QPoint( toCanvas(pos.x()), toCanvas(pos.y()) );
+ return TQPoint( toCanvas(pos.x()), toCanvas(pos.y()) );
}
-inline static QPoint fromCanvas( const QPoint &pos )
+inline static TQPoint fromCanvas( const TQPoint &pos )
{
- return QPoint( fromCanvas(pos.x()), fromCanvas(pos.y()) );
+ return TQPoint( fromCanvas(pos.x()), fromCanvas(pos.y()) );
}
//BEGIN class Connector
-Connector::Connector( Node * startNode, Node * endNode, ICNDocument *icnDocument, QString *id )
- : QObject(icnDocument),
- QCanvasPolygon( icnDocument->canvas() )
+Connector::Connector( Node * startNode, Node * endNode, ICNDocument *icnDocument, TQString *id )
+ : TQObject(icnDocument),
+ TQCanvasPolygon( icnDocument->canvas() )
{
p_icnDocument = icnDocument;
m_conRouter = new ConRouter(p_icnDocument);
@@ -87,8 +87,8 @@ Connector::Connector( Node * startNode, Node * endNode, ICNDocument *icnDocument
ECNode * endECNode = dynamic_cast<ECNode*>(endNode);
if ( startECNode && endECNode )
{
- connect( startECNode, SIGNAL(numPinsChanged(unsigned)), this, SLOT(syncWiresWithNodes()) );
- connect( endECNode, SIGNAL(numPinsChanged(unsigned)), this, SLOT(syncWiresWithNodes()) );
+ connect( startECNode, TQT_SIGNAL(numPinsChanged(unsigned)), this, TQT_SLOT(syncWiresWithNodes()) );
+ connect( endECNode, TQT_SIGNAL(numPinsChanged(unsigned)), this, TQT_SLOT(syncWiresWithNodes()) );
syncWiresWithNodes();
}
}
@@ -125,10 +125,10 @@ void Connector::syncWiresWithNodes()
if ( startECNode->type() == Node::ec_junction ||
endECNode->type() == Node::ec_junction )
- newNumWires = QMAX( startECNode->numPins(), endECNode->numPins() );
+ newNumWires = TQMAX( startECNode->numPins(), endECNode->numPins() );
else
- newNumWires = QMIN( startECNode->numPins(), endECNode->numPins() );
+ newNumWires = TQMIN( startECNode->numPins(), endECNode->numPins() );
unsigned oldNumWires = m_wires.size();
@@ -163,9 +163,9 @@ void Connector::syncWiresWithNodes()
}
-void Connector::setParentContainer( const QString &cnItemId )
+void Connector::setParentContainer( const TQString &cnItemId )
{
-// // We only allow the node to be parented once
+// // We only allow the node to be tqparented once
// if ( p_parentContainer || !ICNDocument->itemWithID(cnItemId) ) return;
p_parentContainer = p_icnDocument->cnItemWithID(cnItemId);
}
@@ -227,7 +227,7 @@ void Connector::updateDrawList()
return;
}
- QPointList drawLineList;
+ TQPointList drawLineList;
int prevX = (*m_conRouter->cellPointList()->begin()).x();
int prevY = (*m_conRouter->cellPointList()->begin()).y();
@@ -238,8 +238,8 @@ void Connector::updateDrawList()
Cells *cells = p_icnDocument->cells();
bool bumpNow = false;
- const QPointList::const_iterator cplEnd = m_conRouter->cellPointList()->end();
- for ( QPointList::const_iterator it = m_conRouter->cellPointList()->begin(); it != cplEnd; ++it )
+ const TQPointList::const_iterator cplEnd = m_conRouter->cellPointList()->end();
+ for ( TQPointList::const_iterator it = m_conRouter->cellPointList()->begin(); it != cplEnd; ++it )
{
const int x = (*it).x();
const int y = (*it).y();
@@ -267,27 +267,27 @@ void Connector::updateDrawList()
if ( !bumpNow && !bumpNext )
{
- drawLineList += QPoint( x0, y0 );
- drawLineList += QPoint( x2, y3 );
+ drawLineList += TQPoint( x0, y0 );
+ drawLineList += TQPoint( x2, y3 );
}
else if (bumpNow)
{
- drawLineList += QPoint( x0, y0 );
- drawLineList += QPoint( x1, y1 );
- drawLineList += QPoint( x2, y3 );
+ drawLineList += TQPoint( x0, y0 );
+ drawLineList += TQPoint( x1, y1 );
+ drawLineList += TQPoint( x2, y3 );
}
else if (bumpNext)
{
- drawLineList += QPoint( x0, y0 );
- drawLineList += QPoint( x1, y2 );
- drawLineList += QPoint( x2, y3 );
+ drawLineList += TQPoint( x0, y0 );
+ drawLineList += TQPoint( x1, y2 );
+ drawLineList += TQPoint( x2, y3 );
}
else
{
- drawLineList += QPoint( x0, y0 );
- drawLineList += QPoint( x1, y1 );
- drawLineList += QPoint( x1, y2 );
- drawLineList += QPoint( x2, y3 );
+ drawLineList += TQPoint( x0, y0 );
+ drawLineList += TQPoint( x1, y1 );
+ drawLineList += TQPoint( x1, y2 );
+ drawLineList += TQPoint( x2, y3 );
}
prevX = x;
@@ -304,14 +304,14 @@ void Connector::updateDrawList()
return;
}
- const QPointList::iterator dllEnd = drawLineList.end();
+ const TQPointList::iterator dllEnd = drawLineList.end();
- QPointList::iterator previous = drawLineList.begin();
+ TQPointList::iterator previous = drawLineList.begin();
- QPointList::iterator current = previous;
+ TQPointList::iterator current = previous;
current++;
- QPointList::const_iterator next = current;
+ TQPointList::const_iterator next = current;
next++;
while ( previous != dllEnd && current != dllEnd && next != dllEnd )
@@ -321,7 +321,7 @@ void Connector::updateDrawList()
if ( slope1 == slope2 || slope1 == 0 || slope2 == 0 )
{
- *current = QPoint( -1, -1 );
+ *current = TQPoint( -1, -1 );
}
else
{
@@ -332,15 +332,15 @@ void Connector::updateDrawList()
next++;
}
- drawLineList.remove( QPoint( -1, -1 ) );
+ drawLineList.remove( TQPoint( -1, -1 ) );
// Find the bounding rect
{
int x1=-1, y1=-1, x2=-1, y2=-1;
- const QPointList::iterator end = drawLineList.end();
- for ( QPointList::iterator it = drawLineList.begin(); it != end; ++it )
+ const TQPointList::iterator end = drawLineList.end();
+ for ( TQPointList::iterator it = drawLineList.begin(); it != end; ++it )
{
- const QPoint p = *it;
+ const TQPoint p = *it;
if ( p.x() < x1 || x1 == -1 ) {
x1 = p.x();
}
@@ -355,7 +355,7 @@ void Connector::updateDrawList()
}
}
- QRect boundRect( x1, y1, x2-x1, y2-y1 );
+ TQRect boundRect( x1, y1, x2-x1, y2-y1 );
if ( boundRect != m_oldBoundRect )
{
canvas()->setChanged( boundRect | m_oldBoundRect );
@@ -371,11 +371,11 @@ void Connector::updateDrawList()
if ( drawLineList.size() > 1 )
{
- QPoint prev = drawLineList.first();
- const QPointList::iterator end = drawLineList.end();
- for ( QPointList::iterator it = ++drawLineList.begin(); it != end; ++it )
+ TQPoint prev = drawLineList.first();
+ const TQPointList::iterator end = drawLineList.end();
+ for ( TQPointList::iterator it = ++drawLineList.begin(); it != end; ++it )
{
- const QPoint next = *it;
+ const TQPoint next = *it;
ConnectorLine *line = new ConnectorLine(this);
line->setPoints( prev.x(), prev.y(), next.x(), next.y() );
m_connectorLineList.append(line);
@@ -418,8 +418,8 @@ void Connector::updateConnectorPoints( bool add )
}
const int mult = (add)?1:-1;
- const QPointList::iterator end = --m_conRouter->cellPointList()->end();
- for ( QPointList::iterator it = ++m_conRouter->cellPointList()->begin(); it != end; ++it )
+ const TQPointList::iterator end = --m_conRouter->cellPointList()->end();
+ for ( TQPointList::iterator it = ++m_conRouter->cellPointList()->begin(); it != end; ++it )
{
int x = (*it).x();
int y = (*it).y();
@@ -443,7 +443,7 @@ void Connector::updateConnectorPoints( bool add )
}
-void Connector::setRoutePoints( QPointList pointList, bool setManual, bool checkEndPoints )
+void Connector::setRoutePoints( TQPointList pointList, bool setManual, bool checkEndPoints )
{
if (!canvas()) {
return;
@@ -455,13 +455,13 @@ void Connector::setRoutePoints( QPointList pointList, bool setManual, bool check
{
if (reversed)
{
- pointList.prepend( QPoint( int(m_endNode->x()), int(m_endNode->y()) ) );
- pointList.append( QPoint( int(m_startNode->x()), int(m_startNode->y()) ) );
+ pointList.prepend( TQPoint( int(m_endNode->x()), int(m_endNode->y()) ) );
+ pointList.append( TQPoint( int(m_startNode->x()), int(m_startNode->y()) ) );
}
else
{
- pointList.prepend( QPoint( int(m_startNode->x()), int(m_startNode->y()) ) );
- pointList.append( QPoint( int(m_endNode->x()), int(m_endNode->y()) ) );
+ pointList.prepend( TQPoint( int(m_startNode->x()), int(m_startNode->y()) ) );
+ pointList.append( TQPoint( int(m_endNode->x()), int(m_endNode->y()) ) );
}
}
@@ -471,7 +471,7 @@ void Connector::setRoutePoints( QPointList pointList, bool setManual, bool check
}
-bool Connector::pointsAreReverse( const QPointList &pointList ) const
+bool Connector::pointsAreReverse( const TQPointList &pointList ) const
{
if ( !m_startNode || !m_endNode )
{
@@ -556,7 +556,7 @@ ConnectorData Connector::connectorData() const
{
connectorData.startNodeIsChild = true;
connectorData.startNodeCId = m_startNode->childId();
- connectorData.startNodeParent = m_startNode->parentItem()->id();
+ connectorData.startNodeParent = m_startNode->tqparentItem()->id();
}
else
{
@@ -568,7 +568,7 @@ ConnectorData Connector::connectorData() const
{
connectorData.endNodeIsChild = true;
connectorData.endNodeCId = m_endNode->childId();
- connectorData.endNodeParent = m_endNode->parentItem()->id();
+ connectorData.endNodeParent = m_endNode->tqparentItem()->id();
}
else
{
@@ -585,7 +585,7 @@ void Connector::setVisible( bool yes )
if ( !canvas() || isVisible() == yes )
return;
- QCanvasPolygon::setVisible(yes);
+ TQCanvasPolygon::tqsetVisible(yes);
updateConnectorLines();
}
@@ -595,7 +595,7 @@ void Connector::setSelected( bool yes )
if ( !canvas() || isSelected() == yes )
return;
- QCanvasPolygon::setSelected(yes);
+ TQCanvasPolygon::setSelected(yes);
updateConnectorLines();
emit selected(yes);
}
@@ -603,31 +603,31 @@ void Connector::setSelected( bool yes )
void Connector::updateConnectorLines()
{
- const QColor color = b_semiHidden ? Qt::gray : (isSelected() ? QColor( 101, 134, 192 ) : Qt::black);
-// const QColor color = b_semiHidden ? Qt::gray : (isSelected() ? QColor( 0x7f, 0x7f, 0xff ) : Qt::black);
+ const TQColor color = b_semiHidden ? TQt::gray : (isSelected() ? TQColor( 101, 134, 192 ) : TQt::black);
+// const TQColor color = b_semiHidden ? TQt::gray : (isSelected() ? TQColor( 0x7f, 0x7f, 0xff ) : TQt::black);
const int z = ICNDocument::Z::Connector + (isSelected() ? 5 : 0);
- QPen pen( color, (numWires() > 1) ? 2 : 1 );
+ TQPen pen( color, (numWires() > 1) ? 2 : 1 );
const ConnectorLineList::iterator end = m_connectorLineList.end();
for ( ConnectorLineList::iterator it = m_connectorLineList.begin(); it != end; ++it )
{
- QCanvasPolygonalItem *item = static_cast<QCanvasPolygonalItem*>(*it);
+ TQCanvasPolygonalItem *item = static_cast<TQCanvasPolygonalItem*>(*it);
item->setZ(z);
item->setPen(pen);
item->setBrush(color);
- item->setVisible( isVisible() );
+ item->tqsetVisible( isVisible() );
}
}
-QValueList<QPointList> Connector::splitConnectorPoints( const QPoint & pos ) const
+TQValueList<TQPointList> Connector::splitConnectorPoints( const TQPoint & pos ) const
{
return m_conRouter->splitPoints(pos);
}
-QPointList Connector::connectorPoints( bool reverse ) const
+TQPointList Connector::connectorPoints( bool reverse ) const
{
bool doReverse = (reverse != pointsAreReverse( m_conRouter->pointList(false) ));
return m_conRouter->pointList(doReverse);
@@ -637,7 +637,7 @@ QPointList Connector::connectorPoints( bool reverse ) const
//BEGIN class ConnectorLine
ConnectorLine::ConnectorLine( Connector *connector )
- : QObject(connector), QCanvasLine( connector->canvas() )
+ : TQObject(connector), TQCanvasLine( connector->canvas() )
{
p_connector = connector;
}
diff --git a/src/connector.h b/src/connector.h
index 357fde9..57fc378 100644
--- a/src/connector.h
+++ b/src/connector.h
@@ -11,9 +11,9 @@
#ifndef CONNECTOR_H
#define CONNECTOR_H
-#include <qcanvas.h>
-#include <qguardedptr.h>
-#include <qvaluevector.h>
+#include <tqcanvas.h>
+#include <tqguardedptr.h>
+#include <tqvaluevector.h>
class Cell;
class ConnectorData;
@@ -25,20 +25,21 @@ class Node;
class NodeGroup;
class Wire;
-typedef QValueList<ConnectorLine*> ConnectorLineList;
-typedef QValueList<QPoint> QPointList;
-typedef QValueVector<QGuardedPtr<Wire> > WireVector;
+typedef TQValueList<ConnectorLine*> ConnectorLineList;
+typedef TQValueList<TQPoint> TQPointList;
+typedef TQValueVector<TQGuardedPtr<Wire> > WireVector;
/**
@short Represents a connection between two Nodes on a ICNDocument
@author David Saxton
*/
-class Connector : public QObject, public QCanvasPolygon
+class Connector : public TQObject, public TQCanvasPolygon
{
Q_OBJECT
+ TQ_OBJECT
public:
- Connector( Node * startNode, Node * endNode, ICNDocument *_ICNDocument, QString *id = 0L );
+ Connector( Node * startNode, Node * endNode, ICNDocument *_ICNDocument, TQString *id = 0L );
~Connector();
virtual int rtti() const;
@@ -65,7 +66,7 @@ public:
/**
* Connected id
*/
- QString id() const { return m_id; }
+ TQString id() const { return m_id; }
/**
* Update the list of lines and connetion-points that the connector uses for
* drawing.
@@ -95,7 +96,7 @@ public:
* @param setManual if true then the connector will change to a manual route one
* @param checkEndPoints if true then will check to see if the end points are at the nodes, and adds them if not
*/
- void setRoutePoints( QPointList pointList, bool setManual, bool checkEndPoints = false );
+ void setRoutePoints( TQPointList pointList, bool setManual, bool checkEndPoints = false );
/**
* Call this function (e.g. when moving a CNItem connected to the connector)
* to make the connector partially hidden - probably grayed out - if semiHidden
@@ -103,13 +104,13 @@ public:
*/
void setSemiHidden( bool semiHidden );
/**
- * Sets the container parent (i.e. the container of the parent item)
+ * Sets the container tqparent (i.e. the container of the tqparent item)
*/
- void setParentContainer( const QString &cnItemId );
+ void setParentContainer( const TQString &cnItemId );
/**
- * Returns a pointer to the parent item container
+ * Returns a pointer to the tqparent item container
*/
- CNItem *parentContainer() const { return p_parentContainer; }
+ CNItem *tqparentContainer() const { return p_parentContainer; }
/**
* @returns whether the points have been set by the user manually defining them
*/
@@ -118,7 +119,7 @@ public:
* Returns two sets of points (in canvas-reference) that define the connector
* from start to finish, when it is split at the given point (in canvas-reference)
*/
- QValueList<QPointList> splitConnectorPoints( const QPoint &pos ) const;
+ TQValueList<TQPointList> splitConnectorPoints( const TQPoint &pos ) const;
/**
* @returns pointer to ICNDocument that this connector is a member of
*/
@@ -127,13 +128,13 @@ public:
* Looks at the set of canvas points and tries to determine whether they are
* in the reverse order from start to end node
*/
- bool pointsAreReverse( const QPointList &pointList ) const;
+ bool pointsAreReverse( const TQPointList &pointList ) const;
/**
* Returns the points, given in canvas-reference, in order of start node to
* end node if reverse is false
* @param reverse whether or not to reverse the points from start node to end node
*/
- QPointList connectorPoints( bool reverse = false ) const;
+ TQPointList connectorPoints( bool reverse = false ) const;
/**
* Reroute the connector. Note that if this connector is controlled by a
* NodeGroup, it will do nothing (other than print out a warning)
@@ -167,29 +168,29 @@ protected:
bool m_bIsSyncingWires;
bool b_semiHidden;
- QGuardedPtr<Node> m_startNode;
- QGuardedPtr<Node> m_endNode;
+ TQGuardedPtr<Node> m_startNode;
+ TQGuardedPtr<Node> m_endNode;
NodeGroup *p_nodeGroup;
CNItem *p_parentContainer;
ICNDocument *p_icnDocument;
ConRouter *m_conRouter;
- QString m_id;
+ TQString m_id;
ConnectorLineList m_connectorLineList;
- QRect m_oldBoundRect;
+ TQRect m_oldBoundRect;
WireVector m_wires;
bool b_deleted;
bool b_manualPoints;
bool b_pointsAdded;
};
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
//BEGIN ConnectorLine things
-class ConnectorLine : public QObject, public QCanvasLine
+class ConnectorLine : public TQObject, public TQCanvasLine
{
public:
ConnectorLine( Connector *connector );
- Connector *parent() const { return p_connector; }
+ Connector *tqparent() const { return p_connector; }
virtual int rtti() const;
protected:
diff --git a/src/conrouter.cpp b/src/conrouter.cpp
index 2c2d6da..d09bb81 100644
--- a/src/conrouter.cpp
+++ b/src/conrouter.cpp
@@ -25,22 +25,22 @@ inline static int fromCanvas( int pos )
return (pos-4)/8;
}
-inline static QPoint toCanvas( const QPoint * const pos )
+inline static TQPoint toCanvas( const TQPoint * const pos )
{
- return QPoint( toCanvas(pos->x()), toCanvas(pos->y()) );
+ return TQPoint( toCanvas(pos->x()), toCanvas(pos->y()) );
}
-inline static QPoint fromCanvas( const QPoint * const pos )
+inline static TQPoint fromCanvas( const TQPoint * const pos )
{
- return QPoint( fromCanvas(pos->x()), fromCanvas(pos->y()) );
+ return TQPoint( fromCanvas(pos->x()), fromCanvas(pos->y()) );
}
-inline static QPoint toCanvas( const QPoint &pos )
+inline static TQPoint toCanvas( const TQPoint &pos )
{
- return QPoint( toCanvas(pos.x()), toCanvas(pos.y()) );
+ return TQPoint( toCanvas(pos.x()), toCanvas(pos.y()) );
}
-inline static QPoint fromCanvas( const QPoint &pos )
+inline static TQPoint fromCanvas( const TQPoint &pos )
{
- return QPoint( fromCanvas(pos.x()), fromCanvas(pos.y()) );
+ return TQPoint( fromCanvas(pos.x()), fromCanvas(pos.y()) );
}
static inline int roundDouble( const double x )
@@ -60,14 +60,14 @@ ConRouter::~ConRouter()
}
-QPointList ConRouter::pointList( bool reverse ) const
+TQPointList ConRouter::pointList( bool reverse ) const
{
- QPointList pointList;
+ TQPointList pointList;
if (reverse)
{
bool notDone = m_cellPointList.size() > 0;
- for ( QPointList::const_iterator it = m_cellPointList.fromLast(); notDone; --it )
+ for ( TQPointList::const_iterator it = m_cellPointList.fromLast(); notDone; --it )
{
pointList.append( toCanvas(&*it) );
if ( it == m_cellPointList.begin() ) notDone = false;
@@ -75,8 +75,8 @@ QPointList ConRouter::pointList( bool reverse ) const
}
else
{
- const QPointList::const_iterator end = m_cellPointList.end();
- for ( QPointList::const_iterator it = m_cellPointList.begin(); it != end; ++it )
+ const TQPointList::const_iterator end = m_cellPointList.end();
+ for ( TQPointList::const_iterator it = m_cellPointList.begin(); it != end; ++it )
{
pointList.append( toCanvas(&*it) );
}
@@ -86,7 +86,7 @@ QPointList ConRouter::pointList( bool reverse ) const
}
-static double qpoint_distance( const QPoint & p1, const QPoint & p2 )
+static double qpoint_distance( const TQPoint & p1, const TQPoint & p2 )
{
double dx = p1.x() - p2.x();
double dy = p1.y() - p2.y();
@@ -95,28 +95,28 @@ static double qpoint_distance( const QPoint & p1, const QPoint & p2 )
}
-QPointListList ConRouter::splitPoints( const QPoint &pos ) const
+TQPointListList ConRouter::splitPoints( const TQPoint &pos ) const
{
- const QPoint split = fromCanvas(&pos);
+ const TQPoint split = fromCanvas(&pos);
- QValueList<QPointList> list;
+ TQValueList<TQPointList> list;
// Check that the point is in the connector points, and not at the start or end
bool found = false;
- QPointList::const_iterator end = m_cellPointList.end();
+ TQPointList::const_iterator end = m_cellPointList.end();
double dl[] = { 0.0, 1.1, 1.5 }; // sqrt(2) < 1.5 < sqrt(5)
for ( unsigned i = 0; (i < 3) && !found; ++i )
{
- for ( QPointList::const_iterator it = m_cellPointList.begin(); it != end && !found; ++it )
+ for ( TQPointList::const_iterator it = m_cellPointList.begin(); it != end && !found; ++it )
{
if ( qpoint_distance( *it, split ) <= dl[i] && it != m_cellPointList.begin() && it != m_cellPointList.fromLast() )
found = true;
}
}
- QPointList first;
- QPointList second;
+ TQPointList first;
+ TQPointList second;
if (!found)
{
@@ -136,9 +136,9 @@ QPointListList ConRouter::splitPoints( const QPoint &pos ) const
// Now add the points to the two lists
bool gotToSplit = false;
- for ( QPointList::const_iterator it = m_cellPointList.begin(); it != end; ++it )
+ for ( TQPointList::const_iterator it = m_cellPointList.begin(); it != end; ++it )
{
- QPoint canvasPoint = toCanvas(&*it);
+ TQPoint canvasPoint = toCanvas(&*it);
if ( *it == split )
{
gotToSplit = true;
@@ -162,27 +162,27 @@ QPointListList ConRouter::splitPoints( const QPoint &pos ) const
}
-QPointListList ConRouter::dividePoints( uint n ) const
+TQPointListList ConRouter::dividePoints( uint n ) const
{
// Divide the points up into n pieces...
- QPointList points = m_cellPointList;
+ TQPointList points = m_cellPointList;
assert( n != 0 );
if ( points.size() == 0 ) {
- points += QPoint( toCanvas(m_lcx), toCanvas(m_lcy) );
+ points += TQPoint( toCanvas(m_lcx), toCanvas(m_lcy) );
}
const float avgLength = float(points.size()-1)/float(n);
- QPointListList pll;
+ TQPointListList pll;
for ( uint i=0; i<n; ++i )
{
- QPointList pl;
+ TQPointList pl;
// Get the points between (pos) and (pos+avgLength)
const int endPos = roundDouble( avgLength*(i+1) );
const int startPos = roundDouble( avgLength*i );
- const QPointList::iterator end = ++points.at(endPos);
- for ( QPointList::iterator it = points.at(startPos); it != end; ++it )
+ const TQPointList::iterator end = ++points.at(endPos);
+ for ( TQPointList::iterator it = points.at(startPos); it != end; ++it )
{
pl += toCanvas(*it);
}
@@ -273,26 +273,26 @@ bool ConRouter::needsRouting( int sx, int sy, int ex, int ey ) const
}
-void ConRouter::setRoutePoints( const QPointList &pointList )
+void ConRouter::setRoutePoints( const TQPointList &pointList )
{
m_cellPointList = pointList;
removeDuplicatePoints();
}
-void ConRouter::setPoints( const QPointList &pointList, bool reverse )
+void ConRouter::setPoints( const TQPointList &pointList, bool reverse )
{
if ( pointList.size() == 0 )
return;
- QPointList cellPointList;
+ TQPointList cellPointList;
- QPoint prevCellPoint = fromCanvas(*pointList.begin());
+ TQPoint prevCellPoint = fromCanvas(*pointList.begin());
cellPointList.append(prevCellPoint);
- const QPointList::const_iterator end = pointList.end();
- for ( QPointList::const_iterator it = pointList.begin(); it != end; ++it )
+ const TQPointList::const_iterator end = pointList.end();
+ for ( TQPointList::const_iterator it = pointList.begin(); it != end; ++it )
{
- QPoint cellPoint = fromCanvas(*it);
+ TQPoint cellPoint = fromCanvas(*it);
while ( prevCellPoint != cellPoint )
{
@@ -311,8 +311,8 @@ void ConRouter::setPoints( const QPointList &pointList, bool reverse )
if (reverse)
{
m_cellPointList.clear();
- const QPointList::iterator begin = cellPointList.begin();
- for ( QPointList::iterator it = cellPointList.fromLast(); it != begin; --it )
+ const TQPointList::iterator begin = cellPointList.begin();
+ for ( TQPointList::iterator it = cellPointList.fromLast(); it != begin; --it )
{
m_cellPointList += *it;
}
@@ -335,11 +335,11 @@ void ConRouter::translateRoute( int dx, int dy )
m_lcx += dx;
m_lcy += dy;
-// const QPoint ds = QPoint( fromCanvas(dx), fromCanvas(dy) );
- const QPoint ds = QPoint( dx/8, dy/8 );
+// const TQPoint ds = TQPoint( fromCanvas(dx), fromCanvas(dy) );
+ const TQPoint ds = TQPoint( dx/8, dy/8 );
- QPointList::iterator end = m_cellPointList.end();
- for ( QPointList::iterator it = m_cellPointList.begin(); it != end; ++it )
+ TQPointList::iterator end = m_cellPointList.end();
+ for ( TQPointList::iterator it = m_cellPointList.begin(); it != end; ++it )
{
(*it) += ds;
}
@@ -443,7 +443,7 @@ void ConRouter::mapRoute( int sx, int sy, int ex, int ey )
bool ok = true;
do
{
- m_cellPointList.append( QPoint( x, y ) );
+ m_cellPointList.append( TQPoint( x, y ) );
int newx = (*cellsPtr)[x][y].prevX;
int newy = (*cellsPtr)[x][y].prevY;
if ( newx == x && newy == y ) {
@@ -455,7 +455,7 @@ void ConRouter::mapRoute( int sx, int sy, int ex, int ey )
while ( p_icnDocument->isValidCellReference(x,y) && x != -1 && y != -1 && ok );
// And append the last point...
- m_cellPointList.append( QPoint( ecx, ecy ) );
+ m_cellPointList.append( TQPoint( ecx, ecy ) );
}
removeDuplicatePoints();
@@ -496,7 +496,7 @@ bool ConRouter::checkLineRoute( int scx, int scy, int ecx, int ecy, int maxConSc
{
return false;
} else {
- m_cellPointList.append( QPoint( x, y ) );
+ m_cellPointList.append( TQPoint( x, y ) );
}
}
}
@@ -508,13 +508,13 @@ bool ConRouter::checkLineRoute( int scx, int scy, int ecx, int ecy, int maxConSc
{
return false;
} else {
- m_cellPointList.append( QPoint( x, y ) );
+ m_cellPointList.append( TQPoint( x, y ) );
}
}
}
- m_cellPointList.prepend( QPoint( scx, scy ) );
- m_cellPointList.append( QPoint( ecx, ecy ) );
+ m_cellPointList.prepend( TQPoint( scx, scy ) );
+ m_cellPointList.append( TQPoint( ecx, ecy ) );
removeDuplicatePoints();
return true;
}
@@ -522,16 +522,16 @@ bool ConRouter::checkLineRoute( int scx, int scy, int ecx, int ecy, int maxConSc
void ConRouter::removeDuplicatePoints()
{
- QPoint prev(-1,-1);
+ TQPoint prev(-1,-1);
- const QPointList::iterator end = m_cellPointList.end();
- for ( QPointList::iterator it = m_cellPointList.begin(); it != end; ++it )
+ const TQPointList::iterator end = m_cellPointList.end();
+ for ( TQPointList::iterator it = m_cellPointList.begin(); it != end; ++it )
{
if ( *it == prev ) {
- *it = QPoint(-1,-1);
+ *it = TQPoint(-1,-1);
} else {
prev = *it;
}
}
- m_cellPointList.remove( QPoint(-1,-1) );
+ m_cellPointList.remove( TQPoint(-1,-1) );
}
diff --git a/src/conrouter.h b/src/conrouter.h
index 2a522b7..eae4051 100644
--- a/src/conrouter.h
+++ b/src/conrouter.h
@@ -13,14 +13,14 @@
#include "cells.h"
-#include <qpoint.h>
-#include <qvaluelist.h>
+#include <tqpoint.h>
+#include <tqvaluelist.h>
class ICNDocument;
class Cell;
-typedef QValueList<QPoint> QPointList;
-typedef QValueList<QPointList> QPointListList;
+typedef TQValueList<TQPoint> TQPointList;
+typedef TQValueList<TQPointList> TQPointListList;
/**
Abstraction for the routing of a connector.
@@ -50,11 +50,11 @@ public:
* Sets the route to the given canvas points
* @param reverse if true, the points in pointList will be reversed
*/
- void setPoints( const QPointList &pointList, bool reverse = false );
+ void setPoints( const TQPointList &pointList, bool reverse = false );
/**
* Sets the route to the given route points
*/
- void setRoutePoints( const QPointList &pointList );
+ void setRoutePoints( const TQPointList &pointList );
/**
* @returns true if the start or end points differ from that of the current route
*/
@@ -62,22 +62,22 @@ public:
/**
* Returns the list of canvas points
*/
- QPointList pointList( bool reverse ) const;
+ TQPointList pointList( bool reverse ) const;
/**
* Returns a pointer to the internall cellPointList
*/
- QPointList *cellPointList() { return &m_cellPointList; }
+ TQPointList *cellPointList() { return &m_cellPointList; }
/**
* This will return two lists of Canvas points from the splitting of the
* route at the Canvas point "pos". The internall stored points are not
* affected.
*/
- QPointListList splitPoints( const QPoint &pos ) const;
+ TQPointListList splitPoints( const TQPoint &pos ) const;
/**
* This will return a list of Canvas pointLists from the route, divided
* into n parts (at n-1 equally spaced places).
*/
- QPointListList dividePoints( uint n ) const;
+ TQPointListList dividePoints( uint n ) const;
protected:
/**
@@ -96,7 +96,7 @@ protected:
Cells *cellsPtr;
TempLabelMap tempLabels;
ICNDocument *p_icnDocument;
- QPointList m_cellPointList;
+ TQPointList m_cellPointList;
};
#endif
diff --git a/src/debugmanager.cpp b/src/debugmanager.cpp
index 425232c..f33c6dc 100644
--- a/src/debugmanager.cpp
+++ b/src/debugmanager.cpp
@@ -33,7 +33,7 @@ DebugManager * DebugManager::self()
DebugManager::DebugManager()
- : QObject()
+ : TQObject()
{
}
@@ -50,9 +50,9 @@ void DebugManager::registerGpsim( GpsimProcessor * gpsim )
m_processors << gpsim;
- const QStringList files = gpsim->sourceFileList();
- QStringList::const_iterator end = files.end();
- for ( QStringList::const_iterator it = files.begin(); it != end; ++it )
+ const TQStringList files = gpsim->sourceFileList();
+ TQStringList::const_iterator end = files.end();
+ for ( TQStringList::const_iterator it = files.begin(); it != end; ++it )
{
if ( TextDocument * doc = dynamic_cast<TextDocument*>(DocManager::self()->findDocument(*it)) )
{
@@ -72,7 +72,7 @@ void DebugManager::urlOpened( TextDocument * td )
GpsimProcessorList::iterator end = m_processors.end();
for ( GpsimProcessorList::iterator it = m_processors.begin(); it != end; ++it )
{
- if ( !(*it)->sourceFileList().contains( td->url().path() ) )
+ if ( !(*it)->sourceFileList().tqcontains( td->url().path() ) )
continue;
(*it)->setDebugMode( (td->guessedCodeType() == TextDocument::ct_asm) ? GpsimDebugger::AsmDebugger : GpsimDebugger::HLLDebugger );
diff --git a/src/debugmanager.h b/src/debugmanager.h
index 2d48eac..208d9d3 100644
--- a/src/debugmanager.h
+++ b/src/debugmanager.h
@@ -14,21 +14,22 @@
#ifndef DEBUGMANAGER_H
#define DEBUGMANAGER_H
-#include <qguardedptr.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
+#include <tqobject.h>
class GpsimProcessor;
class TextDocument;
-typedef QValueList< QGuardedPtr<GpsimProcessor> > GpsimProcessorList;
+typedef TQValueList< TQGuardedPtr<GpsimProcessor> > GpsimProcessorList;
/**
@author David Saxton
*/
-class DebugManager : public QObject
+class DebugManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
static DebugManager * self();
~DebugManager();
diff --git a/src/docmanager.cpp b/src/docmanager.cpp
index bf49985..facedac 100644
--- a/src/docmanager.cpp
+++ b/src/docmanager.cpp
@@ -24,7 +24,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <ktabwidget.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <assert.h>
@@ -42,7 +42,7 @@ DocManager * DocManager::self( KTechlab * ktechlab )
DocManager::DocManager( KTechlab * ktechlab )
- : QObject( ktechlab ),
+ : TQObject( ktechlab ),
p_ktechlab(ktechlab)
{
p_focusedView = 0l;
@@ -96,10 +96,10 @@ Document* DocManager::openURL( const KURL &url, ViewArea *viewArea )
if ( url.isLocalFile() )
{
- QFile file(url.path());
+ TQFile file(url.path());
if ( file.open(IO_ReadOnly) == false )
{
- KMessageBox::sorry( 0l, i18n("Could not open '%1'").arg( url.prettyURL() ) );
+ KMessageBox::sorry( 0l, i18n("Could not open '%1'").tqarg( url.prettyURL() ) );
return 0l;
}
file.close();
@@ -118,8 +118,8 @@ Document* DocManager::openURL( const KURL &url, ViewArea *viewArea )
return document;
}
- QString fileName = url.fileName();
- QString extension = fileName.right( fileName.length() - fileName.findRev('.') );
+ TQString fileName = url.fileName();
+ TQString extension = fileName.right( fileName.length() - fileName.tqfindRev('.') );
if ( extension == ".circuit" )
return openCircuitFile( url, viewArea );
@@ -158,15 +158,15 @@ void DocManager::giveDocumentFocus( Document * toFocus, ViewArea * viewAreaForNe
}
-QString DocManager::untitledName( int type )
+TQString DocManager::untitledName( int type )
{
- QString name;
+ TQString name;
switch(type)
{
case Document::dt_circuit:
{
if ( m_countCircuit>1 )
- name = i18n("Untitled (Circuit %1)").arg(QString::number(m_countCircuit));
+ name = i18n("Untitled (Circuit %1)").tqarg(TQString::number(m_countCircuit));
else
name = i18n("Untitled (Circuit)");
m_countCircuit++;
@@ -175,7 +175,7 @@ QString DocManager::untitledName( int type )
case Document::dt_flowcode:
{
if ( m_countFlowCode>1 )
- name = i18n("Untitled (FlowCode %1)").arg(QString::number(m_countFlowCode));
+ name = i18n("Untitled (FlowCode %1)").tqarg(TQString::number(m_countFlowCode));
else
name = i18n("Untitled (FlowCode)");
m_countFlowCode++;
@@ -184,7 +184,7 @@ QString DocManager::untitledName( int type )
case Document::dt_mechanics:
{
if ( m_countMechanics>1 )
- name = i18n("Untitled (Mechanics %1)").arg(QString::number(m_countMechanics));
+ name = i18n("Untitled (Mechanics %1)").tqarg(TQString::number(m_countMechanics));
else
name = i18n("Untitled (Mechanics)");
m_countMechanics++;
@@ -193,7 +193,7 @@ QString DocManager::untitledName( int type )
default:
{
if ( m_countOther>1 )
- name = i18n("Untitled (%1)").arg(QString::number(m_countOther));
+ name = i18n("Untitled (%1)").tqarg(TQString::number(m_countOther));
else
name = i18n("Untitled");
m_countOther++;
@@ -207,7 +207,7 @@ QString DocManager::untitledName( int type )
Document *DocManager::findDocument( const KURL &url ) const
{
// First, look in the associated documents
- if ( m_associatedDocuments.contains(url) )
+ if ( m_associatedDocuments.tqcontains(url) )
return m_associatedDocuments[url];
// Not found, so look in the known documents
@@ -254,18 +254,18 @@ void DocManager::removeDocumentAssociations( Document *document )
void DocManager::handleNewDocument( Document *document, ViewArea *viewArea )
{
- if ( !document || m_documentList.contains(document) )
+ if ( !document || m_documentList.tqcontains(document) )
return;
m_documentList.append(document);
document->setDCOPID(m_nextDocumentID++);
- connect( document, SIGNAL(modifiedStateChanged()), p_ktechlab, SLOT(slotDocModifiedChanged()) );
- connect( document, SIGNAL(fileNameChanged(const KURL&)), p_ktechlab, SLOT(slotDocModifiedChanged()) );
- connect( document, SIGNAL(fileNameChanged(const KURL&)), p_ktechlab, SLOT(addRecentFile(const KURL&)) );
- connect( document, SIGNAL(destroyed(QObject* )), this, SLOT(documentDestroyed(QObject* )) );
- connect( document, SIGNAL(viewFocused(View* )), this, SLOT(slotViewFocused(View* )) );
- connect( document, SIGNAL(viewUnfocused()), this, SLOT(slotViewUnfocused()) );
+ connect( document, TQT_SIGNAL(modifiedStateChanged()), p_ktechlab, TQT_SLOT(slotDocModifiedChanged()) );
+ connect( document, TQT_SIGNAL(fileNameChanged(const KURL&)), p_ktechlab, TQT_SLOT(slotDocModifiedChanged()) );
+ connect( document, TQT_SIGNAL(fileNameChanged(const KURL&)), p_ktechlab, TQT_SLOT(addRecentFile(const KURL&)) );
+ connect( document, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(documentDestroyed(TQObject* )) );
+ connect( document, TQT_SIGNAL(viewFocused(View* )), this, TQT_SLOT(slotViewFocused(View* )) );
+ connect( document, TQT_SIGNAL(viewUnfocused()), this, TQT_SLOT(slotViewUnfocused()) );
createNewView( document, viewArea );
}
@@ -293,7 +293,7 @@ View *DocManager::createNewView( Document *document, ViewArea *viewArea )
}
-void DocManager::documentDestroyed( QObject *obj )
+void DocManager::documentDestroyed( TQObject *obj )
{
Document *doc = static_cast<Document*>(obj);
m_documentList.remove(doc);
@@ -332,7 +332,7 @@ void DocManager::slotViewFocused( View *view )
Document *document = view->document();
- connect( document, SIGNAL(undoRedoStateChanged()), p_ktechlab, SLOT(slotDocUndoRedoChanged()) );
+ connect( document, TQT_SIGNAL(undoRedoStateChanged()), p_ktechlab, TQT_SLOT(slotDocUndoRedoChanged()) );
p_connectedDocument = document;
if ( document->type() == Document::dt_circuit ||
@@ -359,7 +359,7 @@ void DocManager::slotViewUnfocused()
if (p_connectedDocument)
{
- disconnect( p_connectedDocument, SIGNAL(undoRedoStateChanged()), p_ktechlab, SLOT(slotDocUndoRedoChanged()) );
+ disconnect( p_connectedDocument, TQT_SIGNAL(undoRedoStateChanged()), p_ktechlab, TQT_SLOT(slotDocUndoRedoChanged()) );
p_connectedDocument = 0l;
}
@@ -431,7 +431,7 @@ CircuitDocument *DocManager::openCircuitFile( const KURL &url, ViewArea *viewAre
if ( !document->openURL(url) )
{
- KMessageBox::sorry( 0l, i18n("Could not open Circuit file \"%1\"").arg(url.prettyURL()) );
+ KMessageBox::sorry( 0l, i18n("Could not open Circuit file \"%1\"").tqarg(url.prettyURL()) );
document->deleteLater();
return 0l;
}
@@ -448,7 +448,7 @@ FlowCodeDocument *DocManager::openFlowCodeFile( const KURL &url, ViewArea *viewA
if ( !document->openURL(url) )
{
- KMessageBox::sorry( 0l, i18n("Could not open FlowCode file \"%1\"").arg(url.prettyURL()) );
+ KMessageBox::sorry( 0l, i18n("Could not open FlowCode file \"%1\"").tqarg(url.prettyURL()) );
document->deleteLater();
return 0l;
}
@@ -465,7 +465,7 @@ MechanicsDocument *DocManager::openMechanicsFile( const KURL &url, ViewArea *vie
if ( !document->openURL(url) )
{
- KMessageBox::sorry( 0l, i18n("Could not open Mechanics file \"%1\"").arg(url.prettyURL()) );
+ KMessageBox::sorry( 0l, i18n("Could not open Mechanics file \"%1\"").tqarg(url.prettyURL()) );
document->deleteLater();
return 0l;
}
@@ -486,7 +486,7 @@ TextDocument *DocManager::openTextFile( const KURL &url, ViewArea *viewArea )
if ( !document->openURL(url) )
{
- KMessageBox::sorry( 0l, i18n("Could not open text file \"%1\"").arg(url.prettyURL()) );
+ KMessageBox::sorry( 0l, i18n("Could not open text file \"%1\"").tqarg(url.prettyURL()) );
document->deleteLater();
return 0l;
}
diff --git a/src/docmanager.h b/src/docmanager.h
index 0ba300e..36f7196 100644
--- a/src/docmanager.h
+++ b/src/docmanager.h
@@ -12,7 +12,7 @@
#define DOCMANAGER_H
#include <kurl.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class CircuitDocument;
class DocManager;
@@ -27,16 +27,17 @@ class ViewArea;
class KAction;
-typedef QValueList<Document*> DocumentList;
-typedef QMap< KURL, Document* > URLDocumentMap;
-typedef QValueList<KAction*> KActionList;
+typedef TQValueList<Document*> DocumentList;
+typedef TQMap< KURL, Document* > URLDocumentMap;
+typedef TQValueList<KAction*> KActionList;
/**
@author David Saxton
*/
-class DocManager : public QObject
+class DocManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
static DocManager * self( KTechlab * ktechlab = 0l );
~DocManager();
@@ -67,7 +68,7 @@ public:
* of Document and whether it is the first one or not
* @param type Document::DocumentType - type of Document
*/
- QString untitledName( int type );
+ TQString untitledName( int type );
/**
* Checks to see if a document with the given URL is already open, and
* returns a pointer to that Document if so - otherwises returns null
@@ -125,7 +126,7 @@ protected slots:
* Does the appropriate enabling / disabling of actions, connections, etc
*/
void slotViewUnfocused();
- void documentDestroyed( QObject *obj );
+ void documentDestroyed( TQObject *obj );
protected:
/**
@@ -156,8 +157,8 @@ protected:
int m_countOther;
KTechlab * const p_ktechlab;
- QGuardedPtr<View> p_focusedView;
- QGuardedPtr<Document> p_connectedDocument;
+ TQGuardedPtr<View> p_focusedView;
+ TQGuardedPtr<Document> p_connectedDocument;
DocManagerIface *m_pIface;
unsigned m_nextDocumentID;
diff --git a/src/docmanageriface.cpp b/src/docmanageriface.cpp
index 2f19511..260383e 100644
--- a/src/docmanageriface.cpp
+++ b/src/docmanageriface.cpp
@@ -29,12 +29,12 @@ bool DocManagerIface::closeAll( )
return m_pDocManager->closeAll();
}
-DCOPRef DocManagerIface::openURL( const QString & url )
+DCOPRef DocManagerIface::openURL( const TQString & url )
{
return docToRef( m_pDocManager->openURL(url) );
}
-void DocManagerIface::gotoTextLine( const QString & url, int line )
+void DocManagerIface::gotoTextLine( const TQString & url, int line )
{
m_pDocManager->gotoTextLine( url, line );
}
diff --git a/src/docmanageriface.h b/src/docmanageriface.h
index f788dc2..8aa5c9f 100644
--- a/src/docmanageriface.h
+++ b/src/docmanageriface.h
@@ -36,12 +36,12 @@ class DocManagerIface : public DCOPObject
/**
* Attempt to open the given URL.
*/
- DCOPRef openURL( const QString & url );
+ DCOPRef openURL( const TQString & url );
/**
* Attempt to open the text file at the given url (if it isn't already
* open), and then go to that line in the text file.
*/
- void gotoTextLine( const QString & url, int line );
+ void gotoTextLine( const TQString & url, int line );
/**
* Creates a new Text document.
*/
diff --git a/src/document.cpp b/src/document.cpp
index cc43f00..0610af1 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -20,8 +20,8 @@
#include <kmessagebox.h>
#include <ktabwidget.h>
-Document::Document( const QString &caption, KTechlab *ktechlab, const char *name )
- : QObject( ktechlab, name ),
+Document::Document( const TQString &caption, KTechlab *ktechlab, const char *name )
+ : TQObject( ktechlab, name ),
b_modified(false),
p_ktechlab(ktechlab),
p_activeView(0l),
@@ -33,7 +33,7 @@ Document::Document( const QString &caption, KTechlab *ktechlab, const char *name
m_bDeleted(false)
{
if (p_ktechlab)
- connect( p_ktechlab, SIGNAL(configurationChanged()), this, SLOT(slotUpdateConfiguration()) );
+ connect( p_ktechlab, TQT_SIGNAL(configurationChanged()), this, TQT_SLOT(slotUpdateConfiguration()) );
}
@@ -50,27 +50,27 @@ Document::~Document()
void Document::handleNewView( View *view )
{
- if ( !view || m_viewList.contains(view) )
+ if ( !view || m_viewList.tqcontains(view) )
return;
m_viewList.append(view);
view->setDCOPID(m_nextViewID++);
view->setCaption(m_caption);
- connect( view, SIGNAL(destroyed(QObject* )), this, SLOT(slotViewDestroyed(QObject* )) );
- connect( view, SIGNAL(viewFocused(View* )), this, SLOT(slotViewFocused(View* )) );
- connect( view, SIGNAL(viewUnfocused()), this, SIGNAL(viewUnfocused()) );
+ connect( view, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(slotViewDestroyed(TQObject* )) );
+ connect( view, TQT_SIGNAL(viewFocused(View* )), this, TQT_SLOT(slotViewFocused(View* )) );
+ connect( view, TQT_SIGNAL(viewUnfocused()), this, TQT_SIGNAL(viewUnfocused()) );
view->show();
view->setFocused();
}
-void Document::slotViewDestroyed( QObject *obj )
+void Document::slotViewDestroyed( TQObject *obj )
{
- View *view = static_cast<View*>(obj);
+ View *view = static_cast<View*>(TQT_TQWIDGET(obj));
m_viewList.remove(view);
- if ( p_activeView == (QGuardedPtr<View>)view )
+ if ( p_activeView == (TQGuardedPtr<View>)view )
{
p_activeView = 0l;
emit viewUnfocused();
@@ -91,7 +91,7 @@ void Document::slotViewFocused(View *view)
}
-void Document::setCaption( const QString &caption )
+void Document::setCaption( const TQString &caption )
{
m_caption = caption;
const ViewList::iterator end = m_viewList.end();
@@ -100,17 +100,17 @@ void Document::setCaption( const QString &caption )
}
-bool Document::getURL( const QString &types )
+bool Document::getURL( const TQString &types )
{
- KURL url = KFileDialog::getSaveURL( QString::null, types, p_ktechlab, i18n("Save Location"));
+ KURL url = KFileDialog::getSaveURL( TQString(), types, p_ktechlab, i18n("Save Location"));
if ( url.isEmpty() )
return false;
- if ( QFile::exists( url.path() ) )
+ if ( TQFile::exists( url.path() ) )
{
int query = KMessageBox::warningYesNo( p_ktechlab,
- i18n( "A file named \"%1\" already exists. Are you sure you want to overwrite it?" ).arg( url.fileName() ),
+ i18n( "A file named \"%1\" already exists. Are you sure you want to overwrite it?" ).tqarg( url.fileName() ),
i18n( "Overwrite File?" ),
i18n( "Overwrite" ),
KStdGuiItem::cancel() );
@@ -129,13 +129,13 @@ bool Document::fileClose()
if ( isModified() )
{
// If the filename is empty then it must be an untitled file.
- QString name = m_url.fileName().isEmpty() ? caption() : m_url.fileName();
+ TQString name = m_url.fileName().isEmpty() ? caption() : m_url.fileName();
if ( ViewContainer * viewContainer = (activeView() ? activeView()->viewContainer() : 0l) )
p_ktechlab->tabWidget()->setCurrentPage( p_ktechlab->tabWidget()->indexOf(viewContainer) );
int choice = KMessageBox::warningYesNoCancel( p_ktechlab,
- i18n("The document \'%1\' has been modified.\nDo you want to save it?").arg(name),
+ i18n("The document \'%1\' has been modified.\nDo you want to save it?").tqarg(name),
i18n("Save Document?"),
i18n("Save"),
i18n("Discard") );
@@ -196,7 +196,7 @@ void Document::setDCOPID( unsigned id )
m_dcopID = id;
if ( m_pDocumentIface )
{
- QCString docID;
+ TQCString docID;
docID.setNum( dcopID() );
m_pDocumentIface->setObjId( "Document#" + docID );
}
diff --git a/src/document.h b/src/document.h
index eb465ad..b9bc65f 100644
--- a/src/document.h
+++ b/src/document.h
@@ -12,7 +12,7 @@
#define DOCUMENT_H
#include <kurl.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class DCOPObject;
class Document;
@@ -21,14 +21,15 @@ class KTechlab;
class View;
class ViewContainer;
-typedef QValueList<QGuardedPtr<View> > ViewList;
+typedef TQValueList<TQGuardedPtr<View> > ViewList;
/**
@author David Saxton
*/
-class Document : public QObject
+class Document : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum DocumentType
{
@@ -39,7 +40,7 @@ public:
dt_text,
dt_pinMapEditor
};
- Document( const QString &caption, KTechlab *ktechlab, const char *name = 0 );
+ Document( const TQString &caption, KTechlab *ktechlab, const char *name = 0 );
virtual ~Document();
/**
* If the user has created a new document from the new file dialog, and
@@ -51,12 +52,12 @@ public:
/**
* Caption of document, e.g. "Untitled 2"
*/
- QString caption() const { return m_caption; }
+ TQString caption() const { return m_caption; }
/**
* Set the caption of the document, to be displayed in the tab bar when
* active
*/
- void setCaption( const QString &caption );
+ void setCaption( const TQString &caption );
/**
* Return the dcop object for this document
*/
@@ -99,7 +100,7 @@ public:
* Prompts the user for a url, with the given types for the filter.
* If user accepts, returns true, and set the url to the new url.
*/
- bool getURL( const QString &types );
+ bool getURL( const TQString &types );
/**
* Attempts to open a url, and returns true if succesful.
* You must reinherit this function.
@@ -132,7 +133,7 @@ public:
virtual void fileSaveAs() = 0;
/**
* Attempts to close the file without saving, prompting the user if the
- * file has been modified. If succesful, calls QObject::deleteLater(), and
+ * file has been modified. If succesful, calls TQObject::deleteLater(), and
* returns true (otherwise returns false).
*/
virtual bool fileClose();
@@ -212,7 +213,7 @@ signals:
void viewUnfocused();
private slots:
- void slotViewDestroyed( QObject *obj );
+ void slotViewDestroyed( TQObject *obj );
void slotViewFocused( View *view );
protected:
@@ -223,10 +224,10 @@ protected:
bool b_modified;
KTechlab *p_ktechlab;
- QGuardedPtr<View> p_activeView;
+ TQGuardedPtr<View> p_activeView;
DocumentType m_type;
ViewList m_viewList;
- QString m_caption;
+ TQString m_caption;
bool m_bAddToProjectOnSave;
DocumentIface * m_pDocumentIface;
unsigned m_dcopID;
diff --git a/src/documentiface.cpp b/src/documentiface.cpp
index dd7e0eb..294ff32 100644
--- a/src/documentiface.cpp
+++ b/src/documentiface.cpp
@@ -98,12 +98,12 @@ bool DocumentIface::isModified( )
return m_pDocument->isModified();
}
-bool DocumentIface::openURL( const QString & url )
+bool DocumentIface::openURL( const TQString & url )
{
return m_pDocument->openURL(url);
}
-QString DocumentIface::url( )
+TQString DocumentIface::url( )
{
return m_pDocument->url().url();
}
@@ -118,7 +118,7 @@ DCOPRef DocumentIface::activeView( )
return viewToRef( m_pDocument->activeView() );
}
-QString DocumentIface::caption( ) const
+TQString DocumentIface::caption( ) const
{
return m_pDocument->caption();
}
@@ -138,7 +138,7 @@ FlowCodeDocumentIface::FlowCodeDocumentIface( FlowCodeDocument * document )
m_pFlowCodeDocument = document;
}
-void FlowCodeDocumentIface::setPicType( const QString & id )
+void FlowCodeDocumentIface::setPicType( const TQString & id )
{
m_pFlowCodeDocument->setPicType(id);
}
@@ -233,7 +233,7 @@ void ICNDocumentIface::exportToImage( )
m_pICNDocument->exportToImage();
}
-QCStringList ICNDocumentIface::nodeIDs( const QString & id )
+QCStringList ICNDocumentIface::nodeIDs( const TQString & id )
{
CNItem * item = m_pICNDocument->cnItemWithID(id);
@@ -249,30 +249,30 @@ QCStringList ICNDocumentIface::nodeIDs( const QString & id )
return ids;
}
-QString ICNDocumentIface::makeConnection( const QString & item1, const QString & node1, const QString & item2, const QString & node2 )
+TQString ICNDocumentIface::makeConnection( const TQString & item1, const TQString & node1, const TQString & item2, const TQString & node2 )
{
CNItem * i1 = m_pICNDocument->cnItemWithID(item1);
CNItem * i2 = m_pICNDocument->cnItemWithID(item2);
if ( !i1 || !i2 )
- return QString::null;
+ return TQString();
Node * n1 = m_pICNDocument->nodeWithID( i1->nodeId(node1) );
Node * n2 = m_pICNDocument->nodeWithID( i2->nodeId(node2) );
if ( !n1 || !n2 )
- return QString::null;
+ return TQString();
Connector * connector = m_pICNDocument->createConnector( n1, n2 );
- return connector ? connector->id() : QString::null;
+ return connector ? connector->id() : TQString();
}
-void ICNDocumentIface::selectConnector( const QString & id )
+void ICNDocumentIface::selectConnector( const TQString & id )
{
m_pICNDocument->select( m_pICNDocument->connectorWithID(id) );
}
-void ICNDocumentIface::unselectConnector( const QString & id )
+void ICNDocumentIface::unselectConnector( const TQString & id )
{
m_pItemDocument->unselect( m_pICNDocument->connectorWithID(id) );
}
@@ -295,25 +295,25 @@ QCStringList ItemDocumentIface::validItemIDs( )
const LibraryItemList::iterator end = allItems->end();
for ( LibraryItemList::iterator it = allItems->begin(); it != end; ++it )
{
- QString id = (*it)->activeID();
+ TQString id = (*it)->activeID();
if ( m_pItemDocument->isValidItem(id) )
validIDs << id.utf8();
}
return validIDs;
}
-QString ItemDocumentIface::addItem( const QString & id, int x, int y )
+TQString ItemDocumentIface::addItem( const TQString & id, int x, int y )
{
- Item * item = m_pItemDocument->addItem( id, QPoint( x, y ), true );
- return item ? item->id() : QString::null;
+ Item * item = m_pItemDocument->addItem( id, TQPoint( x, y ), true );
+ return item ? item->id() : TQString();
}
-void ItemDocumentIface::selectItem( const QString & id )
+void ItemDocumentIface::selectItem( const TQString & id )
{
m_pItemDocument->select( m_pItemDocument->itemWithID(id) );
}
-void ItemDocumentIface::unselectItem( const QString & id )
+void ItemDocumentIface::unselectItem( const TQString & id )
{
m_pItemDocument->unselect( m_pItemDocument->itemWithID(id) );
}
diff --git a/src/documentiface.h b/src/documentiface.h
index 5f32cfe..ff41edd 100644
--- a/src/documentiface.h
+++ b/src/documentiface.h
@@ -37,12 +37,12 @@ class DocumentIface : public DCOPObject
virtual ~DocumentIface();
k_dcop:
- QString caption() const;
+ TQString caption() const;
DCOPRef activeView();
uint numberOfViews();
// View *createView( ViewContainer *viewContainer, uint viewAreaId, const char *name = 0l );
- QString url();
- bool openURL( const QString & url );
+ TQString url();
+ bool openURL( const TQString & url );
bool isModified();
bool isUndoAvailable();
bool isRedoAvailable();
@@ -103,9 +103,9 @@ class ItemDocumentIface : public DocumentIface
* position.
* @return name of item (assigned to it by KTechlab)
*/
- QString addItem( const QString & id, int x, int y );
- void selectItem( const QString & id );
- void unselectItem( const QString & id );
+ TQString addItem( const TQString & id, int x, int y );
+ void selectItem( const TQString & id );
+ void unselectItem( const TQString & id );
void clearHistory();
void unselectAll();
void alignHorizontally();
@@ -138,13 +138,13 @@ class ICNDocumentIface : public ItemDocumentIface
k_dcop:
void exportToImage();
- QCStringList nodeIDs( const QString & id );
+ QCStringList nodeIDs( const TQString & id );
/**
* Makes a connection from node1 on item1 to node2 on item2
*/
- QString makeConnection( const QString & item1, const QString & node1, const QString & item2, const QString & node2 );
- void selectConnector( const QString & id );
- void unselectConnector( const QString & id );
+ TQString makeConnection( const TQString & item1, const TQString & node1, const TQString & item2, const TQString & node2 );
+ void selectConnector( const TQString & id );
+ void unselectConnector( const TQString & id );
protected:
ICNDocument * m_pICNDocument;
@@ -184,7 +184,7 @@ class FlowCodeDocumentIface : public ICNDocumentIface
void convertToAssembly();
k_dcop:
- void setPicType( const QString & id );
+ void setPicType( const TQString & id );
protected:
FlowCodeDocument * m_pFlowCodeDocument;
diff --git a/src/drawparts/dpline.cpp b/src/drawparts/dpline.cpp
index 59fa789..4d17b01 100644
--- a/src/drawparts/dpline.cpp
+++ b/src/drawparts/dpline.cpp
@@ -16,7 +16,7 @@
#include <cmath>
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class DPLine
@@ -28,7 +28,7 @@ Item* DPLine::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* DPLine::libraryItem()
{
return new LibraryItem(
- QString("dp/line"),
+ TQString("dp/line"),
i18n("Line"),
i18n("Other"),
KGlobal::iconLoader()->loadIcon( "text", KIcon::Small ),
@@ -45,7 +45,7 @@ DPLine::DPLine( ItemDocument *itemDocument, bool newItem, const char *id )
createProperty( "line-color", Variant::Type::Color );
property("line-color")->setCaption( i18n("Line Color") );
- property("line-color")->setValue(Qt::black);
+ property("line-color")->setValue(TQt::black);
createProperty( "line-width", Variant::Type::Int );
property("line-width")->setCaption( i18n("Line Width") );
@@ -80,7 +80,7 @@ void DPLine::setSelected( bool yes )
void DPLine::dataChanged()
{
- setPen( QPen( dataColor("line-color"),
+ setPen( TQPen( dataColor("line-color"),
unsigned( dataInt("line-width") ),
getDataPenStyle("line-style"),
getDataPenCapStyle("cap-style"),
@@ -98,44 +98,44 @@ void DPLine::postResize()
int x2 = x1+width();
int y2 = y1+height();
- QPointArray p(4);
+ TQPointArray p(4);
int pw = pen().width();
- int dx = QABS(x1-x2);
- int dy = QABS(y1-y2);
+ int dx = TQABS(x1-x2);
+ int dy = TQABS(y1-y2);
pw = pw*4/3+2; // approx pw*sqrt(2)
int px = x1<x2 ? -pw : pw ;
int py = y1<y2 ? -pw : pw ;
if ( dx && dy && (dx > dy ? (dx*2/dy <= 2) : (dy*2/dx <= 2)) ) {
// steep
if ( px == py ) {
- p[0] = QPoint(x1 ,y1+py);
- p[1] = QPoint(x2-px,y2 );
- p[2] = QPoint(x2 ,y2-py);
- p[3] = QPoint(x1+px,y1 );
+ p[0] = TQPoint(x1 ,y1+py);
+ p[1] = TQPoint(x2-px,y2 );
+ p[2] = TQPoint(x2 ,y2-py);
+ p[3] = TQPoint(x1+px,y1 );
} else {
- p[0] = QPoint(x1+px,y1 );
- p[1] = QPoint(x2 ,y2-py);
- p[2] = QPoint(x2-px,y2 );
- p[3] = QPoint(x1 ,y1+py);
+ p[0] = TQPoint(x1+px,y1 );
+ p[1] = TQPoint(x2 ,y2-py);
+ p[2] = TQPoint(x2-px,y2 );
+ p[3] = TQPoint(x1 ,y1+py);
}
} else if ( dx > dy ) {
// horizontal
- p[0] = QPoint(x1+px,y1+py);
- p[1] = QPoint(x2-px,y2+py);
- p[2] = QPoint(x2-px,y2-py);
- p[3] = QPoint(x1+px,y1-py);
+ p[0] = TQPoint(x1+px,y1+py);
+ p[1] = TQPoint(x2-px,y2+py);
+ p[2] = TQPoint(x2-px,y2-py);
+ p[3] = TQPoint(x1+px,y1-py);
} else {
// vertical
- p[0] = QPoint(x1+px,y1+py);
- p[1] = QPoint(x2+px,y2-py);
- p[2] = QPoint(x2-px,y2-py);
- p[3] = QPoint(x1-px,y1+py);
+ p[0] = TQPoint(x1+px,y1+py);
+ p[1] = TQPoint(x2+px,y2-py);
+ p[2] = TQPoint(x2-px,y2-py);
+ p[3] = TQPoint(x1-px,y1+py);
}
setItemPoints( p, false );
}
-void DPLine::drawShape( QPainter & p )
+void DPLine::drawShape( TQPainter & p )
{
int x1 = int(x()+offsetX());
int y1 = int(y()+offsetY());
@@ -156,7 +156,7 @@ Item* DPArrow::construct( ItemDocument *itemDocument, bool newItem, const char *
LibraryItem* DPArrow::libraryItem()
{
return new LibraryItem(
- QString("dp/arrow"),
+ TQString("dp/arrow"),
i18n("Arrow"),
i18n("Other"),
KGlobal::iconLoader()->loadIcon( "text", KIcon::Small ),
@@ -170,7 +170,7 @@ DPArrow::DPArrow( ItemDocument *itemDocument, bool newItem, const char *id )
m_name = i18n("Arrow");
// We don't want to use the square cap style as it screws up drawing our arrow head
- QStringList allowed = property("cap-style")->allowed();
+ TQStringList allowed = property("cap-style")->allowed();
allowed.remove( DrawPart::penCapStyleToName( Qt::SquareCap ) );
property("cap-style")->setAllowed(allowed);
}
@@ -180,7 +180,7 @@ DPArrow::~DPArrow()
}
-void DPArrow::drawShape( QPainter & p )
+void DPArrow::drawShape( TQPainter & p )
{
int x1 = int(x()+offsetX());
int y1 = int(y()+offsetY());
@@ -210,14 +210,14 @@ void DPArrow::drawShape( QPainter & p )
int y4 = int( y2 + head_length*std::sin( pi + arrow_angle + head_angle ) );
// Draw arrowhead
- QPen pen = p.pen();
+ TQPen pen = p.pen();
pen.setCapStyle( Qt::RoundCap );
p.setPen(pen);
p.setBrush(pen.color());
- QPointArray pa(3);
- pa[0] = QPoint( x2, y2 );
- pa[1] = QPoint( x3, y3 );
- pa[2] = QPoint( x4, y4 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( x2, y2 );
+ pa[1] = TQPoint( x3, y3 );
+ pa[2] = TQPoint( x4, y4 );
p.drawPolygon(pa);
p.drawPolyline(pa);
// p.drawLine( x2, y2, x3, y3 );
diff --git a/src/drawparts/dpline.h b/src/drawparts/dpline.h
index e47aca8..20e3f9e 100644
--- a/src/drawparts/dpline.h
+++ b/src/drawparts/dpline.h
@@ -32,7 +32,7 @@ class DPLine : public DrawPart
protected:
virtual void postResize();
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LineOverlay * m_pLineOverlay;
};
@@ -50,7 +50,7 @@ class DPArrow : public DPLine
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
#endif
diff --git a/src/drawparts/dptext.cpp b/src/drawparts/dptext.cpp
index ebb239a..e2d1060 100644
--- a/src/drawparts/dptext.cpp
+++ b/src/drawparts/dptext.cpp
@@ -15,7 +15,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* DPText::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -24,7 +24,7 @@ Item* DPText::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* DPText::libraryItem()
{
- QStringList idList;
+ TQStringList idList;
idList << "dp/text" << "dp/canvas_text" << "canvas_text";
return new LibraryItem(
@@ -52,17 +52,17 @@ DPText::DPText( ItemDocument *itemDocument, bool newItem, const char *id )
property("background")->setAdvanced(true);
createProperty( "background-color", Variant::Type::Color );
- property("background-color")->setValue(Qt::white);
+ property("background-color")->setValue(TQt::white);
property("background-color")->setCaption( i18n("Background Color") );
property("background-color")->setAdvanced(true);
createProperty( "frame-color", Variant::Type::Color );
- property("frame-color")->setValue(Qt::black);
+ property("frame-color")->setValue(TQt::black);
property("frame-color")->setCaption( i18n("Frame Color") );
property("frame-color")->setAdvanced(true);
createProperty( "text-color", Variant::Type::Color );
- property("text-color")->setValue(Qt::black);
+ property("text-color")->setValue(TQt::black);
property("text-color")->setCaption( i18n("Text Color") );
}
@@ -93,19 +93,19 @@ void DPText::dataChanged()
void DPText::postResize()
{
- setItemPoints( QPointArray(m_sizeRect), false );
+ setItemPoints( TQPointArray(m_sizeRect), false );
}
-QSize DPText::minimumSize() const
+TQSize DPText::tqminimumSize() const
{
- return QSize( 48, 24 );
+ return TQSize( 48, 24 );
}
-void DPText::drawShape( QPainter &p )
+void DPText::drawShape( TQPainter &p )
{
- QRect bound = m_sizeRect;
+ TQRect bound = m_sizeRect;
bound.setWidth( bound.width()-2 );
bound.setHeight( bound.height()-2 );
bound.moveBy( int(x()+1), int(y()+1) );
@@ -113,7 +113,7 @@ void DPText::drawShape( QPainter &p )
if (b_displayBackground)
{
p.save();
- p.setPen( QPen( m_frameColor, 1, Qt::DotLine) );
+ p.setPen( TQPen( m_frameColor, 1, TQt::DotLine) );
p.setBrush(m_backgroundColor);
p.drawRect(bound);
p.restore();
@@ -128,6 +128,6 @@ void DPText::drawShape( QPainter &p )
p.setPen(m_textColor);
p.setFont( font() );
- p.drawText( bound, (Qt::WordBreak | Qt::AlignHCenter | Qt::AlignVCenter), m_caption );
+ p.drawText( bound, (TQt::WordBreak | TQt::AlignHCenter | TQt::AlignVCenter), m_caption );
}
diff --git a/src/drawparts/dptext.h b/src/drawparts/dptext.h
index a6f5a4a..4cbc821 100644
--- a/src/drawparts/dptext.h
+++ b/src/drawparts/dptext.h
@@ -29,19 +29,19 @@ public:
virtual void setSelected( bool yes );
- virtual QSize minimumSize() const;
+ virtual TQSize tqminimumSize() const;
protected:
virtual void postResize();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
- QString m_caption;
+ TQString m_caption;
bool b_displayBackground;
- QColor m_textColor;
- QColor m_backgroundColor;
- QColor m_frameColor;
+ TQColor m_textColor;
+ TQColor m_backgroundColor;
+ TQColor m_frameColor;
RectangularOverlay *m_rectangularOverlay;
};
diff --git a/src/drawparts/drawpart.cpp b/src/drawparts/drawpart.cpp
index 6d9708d..d16e669 100644
--- a/src/drawparts/drawpart.cpp
+++ b/src/drawparts/drawpart.cpp
@@ -14,7 +14,7 @@
#include "variant.h"
#include <klocale.h>
-#include <qbitarray.h>
+#include <tqbitarray.h>
DrawPart::DrawPart( ItemDocument *itemDocument, bool newItem, const char *id )
: Item( itemDocument, newItem, id )
@@ -34,11 +34,11 @@ int DrawPart::rtti() const
}
-Variant * DrawPart::createProperty( const QString & id, Variant::Type::Value type )
+Variant * DrawPart::createProperty( const TQString & id, Variant::Type::Value type )
{
if ( type == Variant::Type::PenStyle )
{
- QStringList penStyles;
+ TQStringList penStyles;
penStyles << DrawPart::penStyleToName(Qt::SolidLine) << DrawPart::penStyleToName(Qt::DashLine)
<< DrawPart::penStyleToName(Qt::DotLine) << DrawPart::penStyleToName(Qt::DashDotLine)
<< DrawPart::penStyleToName(Qt::DashDotDotLine);
@@ -51,7 +51,7 @@ Variant * DrawPart::createProperty( const QString & id, Variant::Type::Value typ
if ( type == Variant::Type::PenCapStyle )
{
- QStringList penCapStyles;
+ TQStringList penCapStyles;
penCapStyles << DrawPart::penCapStyleToName(Qt::FlatCap) << DrawPart::penCapStyleToName(Qt::SquareCap)
<< DrawPart::penCapStyleToName(Qt::RoundCap);
@@ -65,19 +65,19 @@ Variant * DrawPart::createProperty( const QString & id, Variant::Type::Value typ
}
-Qt::PenStyle DrawPart::getDataPenStyle( const QString & id )
+Qt::PenStyle DrawPart::getDataPenStyle( const TQString & id )
{
return nameToPenStyle( dataString(id) );
}
-Qt::PenCapStyle DrawPart::getDataPenCapStyle( const QString & id )
+Qt::PenCapStyle DrawPart::getDataPenCapStyle( const TQString & id )
{
return nameToPenCapStyle( dataString(id) );
}
-void DrawPart::setDataPenStyle( const QString & id, Qt::PenStyle value )
+void DrawPart::setDataPenStyle( const TQString & id, Qt::PenStyle value )
{
property(id)->setValue( penStyleToName(value) );
}
-void DrawPart::setDataPenCapStyle( const QString & id, Qt::PenCapStyle value )
+void DrawPart::setDataPenCapStyle( const TQString & id, Qt::PenCapStyle value )
{
property(id)->setValue( penCapStyleToName(value) );
}
@@ -127,10 +127,10 @@ void DrawPart::restoreFromItemData( const ItemData &itemData )
{
Item::restoreFromItemData(itemData);
- const QStringMap::const_iterator stringEnd = itemData.dataString.end();
- for ( QStringMap::const_iterator it = itemData.dataString.begin(); it != stringEnd; ++it )
+ const TQStringMap::const_iterator stringEnd = itemData.dataString.end();
+ for ( TQStringMap::const_iterator it = itemData.dataString.begin(); it != stringEnd; ++it )
{
- VariantDataMap::iterator vit = m_variantData.find(it.key());
+ VariantDataMap::iterator vit = m_variantData.tqfind(it.key());
if ( vit == m_variantData.end() )
continue;
@@ -144,7 +144,7 @@ void DrawPart::restoreFromItemData( const ItemData &itemData )
-QString DrawPart::penStyleToID( Qt::PenStyle style )
+TQString DrawPart::penStyleToID( Qt::PenStyle style )
{
switch (style)
{
@@ -165,7 +165,7 @@ QString DrawPart::penStyleToID( Qt::PenStyle style )
return ""; // ?!
}
}
-Qt::PenStyle DrawPart::idToPenStyle( const QString & id )
+Qt::PenStyle DrawPart::idToPenStyle( const TQString & id )
{
if ( id == "NoPen" )
return Qt::NoPen;
@@ -179,7 +179,7 @@ Qt::PenStyle DrawPart::idToPenStyle( const QString & id )
return Qt::DashDotDotLine;
return Qt::SolidLine;
}
-QString DrawPart::penCapStyleToID( Qt::PenCapStyle style )
+TQString DrawPart::penCapStyleToID( Qt::PenCapStyle style )
{
switch (style)
{
@@ -194,7 +194,7 @@ QString DrawPart::penCapStyleToID( Qt::PenCapStyle style )
return ""; // ?!
}
}
-Qt::PenCapStyle DrawPart::idToPenCapStyle( const QString & id )
+Qt::PenCapStyle DrawPart::idToPenCapStyle( const TQString & id )
{
if ( id == "SquareCap" )
return Qt::SquareCap;
@@ -203,7 +203,7 @@ Qt::PenCapStyle DrawPart::idToPenCapStyle( const QString & id )
return Qt::FlatCap;
}
-QString DrawPart::penStyleToName( Qt::PenStyle style )
+TQString DrawPart::penStyleToName( Qt::PenStyle style )
{
switch (style)
{
@@ -224,7 +224,7 @@ QString DrawPart::penStyleToName( Qt::PenStyle style )
return ""; // ?!
}
}
-Qt::PenStyle DrawPart::nameToPenStyle( const QString & name )
+Qt::PenStyle DrawPart::nameToPenStyle( const TQString & name )
{
if ( name == i18n("None") )
return Qt::NoPen;
@@ -238,7 +238,7 @@ Qt::PenStyle DrawPart::nameToPenStyle( const QString & name )
return Qt::DashDotDotLine;
return Qt::SolidLine;
}
-QString DrawPart::penCapStyleToName( Qt::PenCapStyle style )
+TQString DrawPart::penCapStyleToName( Qt::PenCapStyle style )
{
switch (style)
{
@@ -253,7 +253,7 @@ QString DrawPart::penCapStyleToName( Qt::PenCapStyle style )
return ""; // ?!
}
}
-Qt::PenCapStyle DrawPart::nameToPenCapStyle( const QString & name )
+Qt::PenCapStyle DrawPart::nameToPenCapStyle( const TQString & name )
{
if ( name == i18n("Square") )
return Qt::SquareCap;
diff --git a/src/drawparts/drawpart.h b/src/drawparts/drawpart.h
index 8dc9f50..e2b046e 100644
--- a/src/drawparts/drawpart.h
+++ b/src/drawparts/drawpart.h
@@ -41,28 +41,28 @@ class DrawPart : public Item
virtual bool canResize() const { return true; }
- virtual Variant * createProperty( const QString & id, Variant::Type::Value type );
+ virtual Variant * createProperty( const TQString & id, Variant::Type::Value type );
- Qt::PenStyle getDataPenStyle( const QString & id );
- Qt::PenCapStyle getDataPenCapStyle( const QString & id );
+ Qt::PenStyle getDataPenStyle( const TQString & id );
+ Qt::PenCapStyle getDataPenCapStyle( const TQString & id );
- void setDataPenStyle( const QString & id, Qt::PenStyle value );
- void setDataPenCapStyle( const QString & id, Qt::PenCapStyle value );
+ void setDataPenStyle( const TQString & id, Qt::PenStyle value );
+ void setDataPenCapStyle( const TQString & id, Qt::PenCapStyle value );
virtual ItemData itemData() const;
virtual void restoreFromItemData( const ItemData &itemData );
// Convention for following functions: name is i18n'd name of style, id is the english one
- static QString penStyleToID( Qt::PenStyle style );
- static Qt::PenStyle idToPenStyle( const QString & id );
- static QString penCapStyleToID( Qt::PenCapStyle style );
- static Qt::PenCapStyle idToPenCapStyle( const QString & id );
+ static TQString penStyleToID( Qt::PenStyle style );
+ static Qt::PenStyle idToPenStyle( const TQString & id );
+ static TQString penCapStyleToID( Qt::PenCapStyle style );
+ static Qt::PenCapStyle idToPenCapStyle( const TQString & id );
- static QString penStyleToName( Qt::PenStyle style );
- static Qt::PenStyle nameToPenStyle( const QString & name );
- static QString penCapStyleToName( Qt::PenCapStyle style );
- static Qt::PenCapStyle nameToPenCapStyle( const QString & name );
+ static TQString penStyleToName( Qt::PenStyle style );
+ static Qt::PenStyle nameToPenStyle( const TQString & name );
+ static TQString penCapStyleToName( Qt::PenCapStyle style );
+ static Qt::PenCapStyle nameToPenCapStyle( const TQString & name );
};
#endif
diff --git a/src/drawparts/solidshape.cpp b/src/drawparts/solidshape.cpp
index e60efef..1760db9 100644
--- a/src/drawparts/solidshape.cpp
+++ b/src/drawparts/solidshape.cpp
@@ -15,7 +15,7 @@
#include <cmath>
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class DPRectangle
@@ -27,7 +27,7 @@ Item * DPRectangle::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* DPRectangle::libraryItem()
{
return new LibraryItem(
- QString("dp/rectangle"),
+ TQString("dp/rectangle"),
i18n("Rectangle"),
i18n("Other"),
KGlobal::iconLoader()->loadIcon( "text", KIcon::Small ),
@@ -47,12 +47,12 @@ DPRectangle::DPRectangle( ItemDocument *itemDocument, bool newItem, const char *
property("background")->setAdvanced(true);
createProperty( "background-color", Variant::Type::Color );
- property("background-color")->setValue(Qt::white);
+ property("background-color")->setValue(TQt::white);
property("background-color")->setCaption( i18n("Background Color") );
property("background-color")->setAdvanced(true);
createProperty( "line-color", Variant::Type::Color );
- property("line-color")->setValue(Qt::black);
+ property("line-color")->setValue(TQt::black);
property("line-color")->setCaption( i18n("Line Color") );
property("line-color")->setAdvanced(true);
@@ -85,11 +85,11 @@ void DPRectangle::setSelected( bool yes )
void DPRectangle::dataChanged()
{
bool displayBackground = dataBool("background");
- QColor line_color = dataColor("line-color");
+ TQColor line_color = dataColor("line-color");
unsigned width = unsigned( dataInt("line-width") );
Qt::PenStyle style = getDataPenStyle("line-style");
- setPen( QPen( line_color, width, style ) );
+ setPen( TQPen( line_color, width, style ) );
if (displayBackground)
setBrush( dataColor("background-color") );
@@ -101,10 +101,10 @@ void DPRectangle::dataChanged()
}
-QSize DPRectangle::minimumSize() const
+TQSize DPRectangle::tqminimumSize() const
{
- int side = QMAX(16, pen().width()+2);
- return QSize( side, side );
+ int side = TQMAX(16, pen().width()+2);
+ return TQSize( side, side );
}
@@ -114,7 +114,7 @@ void DPRectangle::postResize()
}
-QRect DPRectangle::drawRect() const
+TQRect DPRectangle::drawRect() const
{
int lw = pen().width();
@@ -124,12 +124,12 @@ QRect DPRectangle::drawRect() const
if ( lw > m_sizeRect.height() )
lw = m_sizeRect.height();
- return QRect( int(x() + m_sizeRect.x()+lw/2), int(y() + m_sizeRect.y()+lw/2),
+ return TQRect( int(x() + m_sizeRect.x()+lw/2), int(y() + m_sizeRect.y()+lw/2),
m_sizeRect.width()-lw, m_sizeRect.height()-lw );
}
-void DPRectangle::drawShape( QPainter & p )
+void DPRectangle::drawShape( TQPainter & p )
{
p.drawRect(drawRect());
}
@@ -145,7 +145,7 @@ Item * DPEllipse::construct( ItemDocument *itemDocument, bool newItem, const cha
LibraryItem* DPEllipse::libraryItem()
{
return new LibraryItem(
- QString("dp/ellipse"),
+ TQString("dp/ellipse"),
i18n("Ellipse"),
i18n("Other"),
KGlobal::iconLoader()->loadIcon( "text", KIcon::Small ),
@@ -166,24 +166,24 @@ DPEllipse::~DPEllipse()
void DPEllipse::postResize()
{
- QRect br = m_sizeRect;
+ TQRect br = m_sizeRect;
// Make octagon that roughly covers ellipse
- QPointArray pa(8);
- pa[0] = QPoint( br.x() + br.width()/4, br.y() );
- pa[1] = QPoint( br.x() + 3*br.width()/4, br.y() );
- pa[2] = QPoint( br.x() + br.width(), br.y() + br.height()/4 );
- pa[3] = QPoint( br.x() + br.width(), br.y() + 3*br.height()/4 );
- pa[4] = QPoint( br.x() + 3*br.width()/4, br.y() + br.height() );
- pa[5] = QPoint( br.x() + br.width()/4, br.y() + br.height() );
- pa[6] = QPoint( br.x(), br.y() + 3*br.height()/4 );
- pa[7] = QPoint( br.x(), br.y() + br.height()/4 );
+ TQPointArray pa(8);
+ pa[0] = TQPoint( br.x() + br.width()/4, br.y() );
+ pa[1] = TQPoint( br.x() + 3*br.width()/4, br.y() );
+ pa[2] = TQPoint( br.x() + br.width(), br.y() + br.height()/4 );
+ pa[3] = TQPoint( br.x() + br.width(), br.y() + 3*br.height()/4 );
+ pa[4] = TQPoint( br.x() + 3*br.width()/4, br.y() + br.height() );
+ pa[5] = TQPoint( br.x() + br.width()/4, br.y() + br.height() );
+ pa[6] = TQPoint( br.x(), br.y() + 3*br.height()/4 );
+ pa[7] = TQPoint( br.x(), br.y() + br.height()/4 );
setItemPoints( pa, false );
}
-void DPEllipse::drawShape( QPainter & p )
+void DPEllipse::drawShape( TQPainter & p )
{
p.drawEllipse(drawRect());
}
diff --git a/src/drawparts/solidshape.h b/src/drawparts/solidshape.h
index 317f417..02bb49e 100644
--- a/src/drawparts/solidshape.h
+++ b/src/drawparts/solidshape.h
@@ -30,16 +30,16 @@ class DPRectangle : public DrawPart
virtual void setSelected( bool yes );
- virtual QSize minimumSize() const;
+ virtual TQSize tqminimumSize() const;
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
virtual void postResize();
/** Returns the rectangle to draw in, taking into account the line
* width */
- QRect drawRect() const;
+ TQRect drawRect() const;
private:
RectangularOverlay *m_pRectangularOverlay;
@@ -62,7 +62,7 @@ class DPEllipse : public DPRectangle
virtual void postResize();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
#endif
diff --git a/src/electronics/component.cpp b/src/electronics/component.cpp
index f9f3c12..c05993d 100644
--- a/src/electronics/component.cpp
+++ b/src/electronics/component.cpp
@@ -38,10 +38,10 @@
#include <cmath>
#include <kdebug.h>
-#include <qbitarray.h>
-#include <qpainter.h>
-#include <qwidget.h>
-#include <qwmatrix.h>
+#include <tqbitarray.h>
+#include <tqpainter.h>
+#include <tqwidget.h>
+#include <tqwmatrix.h>
const int dipWidth = 112;
const int pairSep = 32;
@@ -49,7 +49,7 @@ const int pairSep = 32;
// Degrees per radian
static const double DPR = 57.29577951308232087665461840231273527024;
-Component::Component( ICNDocument *icnDocument, bool newItem, const QString &id )
+Component::Component( ICNDocument *icnDocument, bool newItem, const TQString &id )
: CNItem( icnDocument, newItem, id ),
m_angleDegrees(0),
b_flipped(false)
@@ -167,7 +167,7 @@ void Component::setNodalCurrents()
}
-void Component::initPainter( QPainter &p )
+void Component::initPainter( TQPainter &p )
{
CNItem::initPainter(p);
@@ -185,7 +185,7 @@ void Component::initPainter( QPainter &p )
}
-void Component::deinitPainter( QPainter &p )
+void Component::deinitPainter( TQPainter &p )
{
if ( !b_flipped && (m_angleDegrees%360 == 0) )
return;
@@ -216,7 +216,7 @@ void Component::setFlipped( bool flipped )
void Component::itemPointsChanged()
{
- QPointArray transformedPoints = transMatrix( m_angleDegrees, b_flipped, 0, 0, false ).map(m_itemPoints);
+ TQPointArray transformedPoints = transMatrix( m_angleDegrees, b_flipped, 0, 0, false ).map(m_itemPoints);
// transformedPoints.translate( int(x()), int(y()) );
setPoints(transformedPoints);
}
@@ -240,9 +240,9 @@ ItemData Component::itemData() const
}
-QWMatrix Component::transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse )
+TQWMatrix Component::transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse )
{
- QWMatrix m;
+ TQWMatrix m;
m.translate( x, y );
if (inverse)
{
@@ -257,7 +257,7 @@ QWMatrix Component::transMatrix( int angleDegrees, bool flipped, int x, int y, b
m.rotate(angleDegrees);
}
m.translate( -x, -y );
- m.setTransformationMode( QWMatrix::Areas );
+ m.setTransformationMode( TQWMatrix::Areas );
return m;
}
@@ -305,17 +305,17 @@ void Component::updateAttachedPositioning()
//BEGIN Transform the GuiParts
- QWMatrix m;
+ TQWMatrix m;
if (b_flipped)
m.scale( -1, 1 );
m.rotate(m_angleDegrees);
- m.setTransformationMode( QWMatrix::Areas );
+ m.setTransformationMode( TQWMatrix::Areas );
const TextMap::iterator textMapEnd = m_textMap.end();
for ( TextMap::iterator it = m_textMap.begin(); it != textMapEnd; ++it )
{
- QRect newPos = m.mapRect( it.data()->recommendedRect() );
+ TQRect newPos = m.mapRect( it.data()->recommendedRect() );
it.data()->move( newPos.x() + x(), newPos.y() + y() );
it.data()->setGuiPartSize( newPos.width(), newPos.height() );
it.data()->setAngleDegrees(m_angleDegrees);
@@ -323,7 +323,7 @@ void Component::updateAttachedPositioning()
const WidgetMap::iterator widgetMapEnd = m_widgetMap.end();
for ( WidgetMap::iterator it = m_widgetMap.begin(); it != widgetMapEnd; ++it )
{
- QRect newPos = m.mapRect( it.data()->recommendedRect() );
+ TQRect newPos = m.mapRect( it.data()->recommendedRect() );
it.data()->move( newPos.x() + x(), newPos.y() + y() );
it.data()->setGuiPartSize( newPos.width(), newPos.height() );
it.data()->setAngleDegrees(m_angleDegrees);
@@ -332,7 +332,7 @@ void Component::updateAttachedPositioning()
}
-void Component::drawPortShape( QPainter & p )
+void Component::drawPortShape( TQPainter & p )
{
int h = height();
int w = width() - 1;
@@ -351,7 +351,7 @@ void Component::drawPortShape( QPainter & p )
int outer16 = int(16*outer*DPR);
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawPolygon( areaPoints() );
p.restore();
@@ -388,7 +388,7 @@ void Component::drawPortShape( QPainter & p )
}
-void Component::initDIP( const QStringList & pins )
+void Component::initDIP( const TQStringList & pins )
{
const int numPins = pins.size();
const int numSide = numPins/2 + numPins%2;
@@ -433,15 +433,15 @@ void Component::initDIP( const QStringList & pins )
updateAttachedPositioning();
}
-void Component::initDIPSymbol( const QStringList & pins, int _width )
+void Component::initDIPSymbol( const TQStringList & pins, int _width )
{
const int numPins = pins.size();
const int numSide = numPins/2 + numPins%2;
setSize( -(_width-(_width%16))/2, -(numSide+1)*8, _width, (numSide+1)*16, true );
- QWidget tmpWidget;
- QPainter p(&tmpWidget);
+ TQWidget tmpWidget;
+ TQPainter p(&tmpWidget);
p.setFont(m_font);
@@ -450,14 +450,14 @@ void Component::initDIPSymbol( const QStringList & pins, int _width )
{
if ( !pins[i].isEmpty() )
{
- const QString text = *pins.at(i);
+ const TQString text = *pins.at(i);
const int _top = (i+1)*16-8 + offsetY();
const int _width = width()/2 - 6;
const int _left = 6 + offsetX();
const int _height = 16;
- QRect br = p.boundingRect( QRect( _left, _top, _width, _height ), Qt::AlignLeft, text );
+ TQRect br = p.boundingRect( TQRect( _left, _top, _width, _height ), TQt::AlignLeft, text );
addDisplayText( text, br, text );
}
}
@@ -466,14 +466,14 @@ void Component::initDIPSymbol( const QStringList & pins, int _width )
{
if ( !pins[i].isEmpty() )
{
- const QString text = *pins.at(i);
+ const TQString text = *pins.at(i);
const int _top = (2*numSide-i)*16 - 8 + offsetY();
const int _width = width()/2 - 6;
const int _left = (width()/2) + offsetX();
const int _height = 16;
- QRect br = p.boundingRect( QRect( _left, _top, _width, _height ), Qt::AlignRight, text );
+ TQRect br = p.boundingRect( TQRect( _left, _top, _width, _height ), TQt::AlignRight, text );
addDisplayText( text, br, text );
}
}
@@ -482,7 +482,7 @@ void Component::initDIPSymbol( const QStringList & pins, int _width )
}
-// QString createNode( double _x, double _y, int shape, int orientation, const QString &name, int type, bool isInput = true );
+// TQString createNode( double _x, double _y, int tqshape, int orientation, const TQString &name, int type, bool isInput = true );
void Component::init1PinLeft( int h1 )
{
@@ -566,7 +566,7 @@ void Component::init4PinRight( int h1, int h2, int h3, int h4 )
}
-ECNode* Component::ecNodeWithID( const QString &ecNodeId )
+ECNode* Component::ecNodeWithID( const TQString &ecNodeId )
{
return dynamic_cast<ECNode*>( p_icnDocument->nodeWithID( nodeId(ecNodeId) ) );
}
@@ -627,7 +627,7 @@ BJT* Component::createBJT( Pin *cN, Pin *bN, Pin *eN, bool isNPN )
{
BJT *e = new BJT(isNPN);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << bN << cN << eN;
ElementMapList::iterator it = handleElement( e, pins );
@@ -639,7 +639,7 @@ Capacitance* Component::createCapacitance( Pin *n0, Pin *n1, double capacitance
{
Capacitance *e = new Capacitance( capacitance, 1./LINEAR_UPDATE_RATE );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -651,7 +651,7 @@ CCCS* Component::createCCCS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
CCCS *e = new CCCS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -663,7 +663,7 @@ CCVS* Component::createCCVS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
CCVS *e = new CCVS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -684,7 +684,7 @@ CurrentSignal* Component::createCurrentSignal( Pin *n0, Pin *n1, double current
{
CurrentSignal *e = new CurrentSignal( 1./LINEAR_UPDATE_RATE, current );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -696,7 +696,7 @@ CurrentSource* Component::createCurrentSource( Pin *n0, Pin *n1, double current
{
CurrentSource *e = new CurrentSource(current);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -708,7 +708,7 @@ Diode* Component::createDiode( Pin *n0, Pin *n1 )
{
Diode *e = new Diode();
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -720,7 +720,7 @@ Inductance* Component::createInductance( Pin *n0, Pin *n1, double inductance )
{
Inductance *e = new Inductance( inductance, 1./LINEAR_UPDATE_RATE );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -732,7 +732,7 @@ LogicIn *Component::createLogicIn( Pin *node )
{
LogicIn *e = new LogicIn(LogicIn::getConfig());
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << node;
ElementMapList::iterator it = handleElement( e, pins );
@@ -743,7 +743,7 @@ LogicOut *Component::createLogicOut( Pin *node, bool isHigh )
{
LogicOut *e = new LogicOut( LogicIn::getConfig(), isHigh);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << node;
ElementMapList::iterator it = handleElement( e, pins );
@@ -755,7 +755,7 @@ OpAmp * Component::createOpAmp( Pin * nonInverting, Pin * inverting, Pin * out )
{
OpAmp * e = new OpAmp();
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << nonInverting << inverting << out;
ElementMapList::iterator it = handleElement( e, pins );
@@ -767,7 +767,7 @@ Resistance* Component::createResistance( Pin *n0, Pin *n1, double resistance )
{
Resistance *e = new Resistance(resistance);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -792,7 +792,7 @@ VCCS* Component::createVCCS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
VCCS *e = new VCCS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -804,7 +804,7 @@ VCVS* Component::createVCVS( Pin *n0, Pin *n1, Pin *n2, Pin *n3, double gain )
{
VCVS *e = new VCVS(gain);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1 << n2 << n3;
ElementMapList::iterator it = handleElement( e, pins );
@@ -824,7 +824,7 @@ VoltagePoint* Component::createVoltagePoint( Pin *n0, double voltage )
{
VoltagePoint *e = new VoltagePoint(voltage);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0;
ElementMapList::iterator it = handleElement( e, pins );
@@ -836,7 +836,7 @@ VoltageSignal* Component::createVoltageSignal( Pin *n0, Pin *n1, double voltage
{
VoltageSignal *e = new VoltageSignal( 1./LINEAR_UPDATE_RATE, voltage );
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -848,7 +848,7 @@ VoltageSource* Component::createVoltageSource( Pin *n0, Pin *n1, double voltage
{
VoltageSource *e = new VoltageSource(voltage);
- QValueList<Pin*> pins;
+ TQValueList<Pin*> pins;
pins << n0 << n1;
ElementMapList::iterator it = handleElement( e, pins );
@@ -857,7 +857,7 @@ VoltageSource* Component::createVoltageSource( Pin *n0, Pin *n1, double voltage
}
-ElementMapList::iterator Component::handleElement( Element *e, const QValueList<Pin*> & pins )
+ElementMapList::iterator Component::handleElement( Element *e, const TQValueList<Pin*> & pins )
{
if (!e)
return m_elementMapList.end();
@@ -865,8 +865,8 @@ ElementMapList::iterator Component::handleElement( Element *e, const QValueList<
ElementMap em;
em.e = e;
int at = 0;
- QValueList<Pin*>::ConstIterator end = pins.end();
- for ( QValueList<Pin*>::ConstIterator it = pins.begin(); it != end; ++it )
+ TQValueList<Pin*>::ConstIterator end = pins.end();
+ for ( TQValueList<Pin*>::ConstIterator it = pins.begin(); it != end; ++it )
{
(*it)->addElement(e);
em.n[at++] = *it;
@@ -879,19 +879,19 @@ ElementMapList::iterator Component::handleElement( Element *e, const QValueList<
}
-void Component::setInterDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins )
+void Component::setInterDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins )
{
setInterCircuitDependent( it, pins );
setInterGroundDependent( it, pins );
}
-void Component::setInterCircuitDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins )
+void Component::setInterCircuitDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins )
{
- QValueList<Pin*>::ConstIterator end = pins.end();
- for ( QValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
+ TQValueList<Pin*>::ConstIterator end = pins.end();
+ for ( TQValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
{
- for ( QValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
+ for ( TQValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
{
(*it1)->addCircuitDependentPin( *it2 );
}
@@ -901,12 +901,12 @@ void Component::setInterCircuitDependent( ElementMapList::iterator it, const QVa
}
-void Component::setInterGroundDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins )
+void Component::setInterGroundDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins )
{
- QValueList<Pin*>::ConstIterator end = pins.end();
- for ( QValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
+ TQValueList<Pin*>::ConstIterator end = pins.end();
+ for ( TQValueList<Pin*>::ConstIterator it1 = pins.begin(); it1 != end; ++it1 )
{
- for ( QValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
+ for ( TQValueList<Pin*>::ConstIterator it2 = pins.begin(); it2 != end; ++it2 )
{
(*it1)->addGroundDependentPin( *it2 );
}
@@ -996,7 +996,7 @@ void Component::initElements( const uint stage )
}
-ECNode * Component::createPin( double x, double y, int orientation, const QString & name )
+ECNode * Component::createPin( double x, double y, int orientation, const TQString & name )
{
return dynamic_cast<ECNode*>( createNode( x, y, orientation, name, Node::ec_pin ) );
}
diff --git a/src/electronics/component.h b/src/electronics/component.h
index d45d835..8a30315 100644
--- a/src/electronics/component.h
+++ b/src/electronics/component.h
@@ -13,7 +13,7 @@
#include "cnitem.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class ICNDocument;
class CircuitDocument;
@@ -43,11 +43,11 @@ class VoltagePoint;
class VoltageSignal;
class VoltageSource;
-typedef QValueList<ECNode*> ECNodeList;
-typedef QValueList<Element*> ElementList;
-typedef QValueList<Switch*> SwitchList;
+typedef TQValueList<ECNode*> ECNodeList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueList<Switch*> SwitchList;
-typedef QValueList< QValueList<Pin*> > PinListList;
+typedef TQValueList< TQValueList<Pin*> > PinListList;
/**
Contains vital information about the elements in the component.
@@ -67,7 +67,7 @@ class ElementMap
PinListList interGroundDependent;
};
-typedef QValueList<ElementMap> ElementMapList;
+typedef TQValueList<ElementMap> ElementMapList;
/**
@short Bass class for all electrical components
@@ -76,11 +76,12 @@ typedef QValueList<ElementMap> ElementMapList;
class Component : public CNItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- Component( ICNDocument *icnDocument, bool newItem, const QString &id );
+ Component( ICNDocument *icnDocument, bool newItem, const TQString &id );
virtual ~Component();
- ECNode* createPin( double _x, double _y, int orientation, const QString &name );
+ ECNode* createPin( double _x, double _y, int orientation, const TQString &name );
/**
* Reinherit this function to disallow rotation of the component.
*/
@@ -127,7 +128,7 @@ class Component : public CNItem
* @param y y co-ordinate of the center of the object to be mapped
* @param inverse If false, maps the unrotated item to a rotated one, else mapped->unmapped
*/
- static QWMatrix transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse = false );
+ static TQWMatrix transMatrix( int angleDegrees, bool flipped, int x, int y, bool inverse = false );
/**
* @return Information about the component in an ItemData struct.
*/
@@ -192,7 +193,7 @@ class Component : public CNItem
VoltageSource * createVoltageSource( ECNode *n0, ECNode *n1, double voltage );
- ECNode* ecNodeWithID( const QString &ecNodeId );
+ ECNode* ecNodeWithID( const TQString &ecNodeId );
/**
* Safely delete an element - in this case, calls element->componentDeleted,
@@ -243,29 +244,29 @@ class Component : public CNItem
protected:
/**
- * Convenience functionality provided for components in a port shape
+ * Convenience functionality provided for components in a port tqshape
* (such as ParallelPortComponent and SerialPortComponent).
*/
- void drawPortShape( QPainter & p );
+ void drawPortShape( TQPainter & p );
virtual void itemPointsChanged();
virtual void updateAttachedPositioning();
- virtual void initPainter( QPainter &p );
+ virtual void initPainter( TQPainter &p );
/**
* Untranforms the painter from the matrix. This *must* be called after doing
- * initPainter( QPainter &p );
+ * initPainter( TQPainter &p );
*/
- virtual void deinitPainter( QPainter &p );
+ virtual void deinitPainter( TQPainter &p );
/**
- * This creates a set of nodes with their internal IDs set to those in QStringList pins.
+ * This creates a set of nodes with their internal IDs set to those in TQStringList pins.
* The pins are in a DIP arrangement, and are spaced width() apart.
*/
- void initDIP( const QStringList & pins );
+ void initDIP( const TQStringList & pins );
/**
* Creates the DIP symbol:
- * @li constructs rectangular shape
- * @li puts on text labels in appropriate positions from QStringList pins
+ * @li constructs rectangular tqshape
+ * @li puts on text labels in appropriate positions from TQStringList pins
*/
- void initDIPSymbol( const QStringList & pins, int width );
+ void initDIPSymbol( const TQStringList & pins, int width );
/**
* Create 1 pin on the left of the component, placed half way down if h1 is
* -1 - else at the position of h1.
@@ -316,7 +317,7 @@ class Component : public CNItem
ECNode * m_pPNode[4];
ECNode * m_pNNode[4];
- QGuardedPtr<CircuitDocument> m_pCircuitDocument;
+ TQGuardedPtr<CircuitDocument> m_pCircuitDocument;
int m_angleDegrees;
bool b_flipped;
@@ -327,7 +328,7 @@ class Component : public CNItem
* @param it Which pins are inter-dependent needs to be recorded in case
* this information is later needed in rebuildPinInterDependence.
*/
- void setInterDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins );
+ void setInterDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins );
/**
* Sets all pins independent of each other.
*/
@@ -336,12 +337,12 @@ class Component : public CNItem
* The given pins will affect the simulation of each other. Therefore, they
* will need to be simulated in the same circuit.
*/
- void setInterCircuitDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins );
+ void setInterCircuitDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins );
/**
* If any of the given pins are ground, then that will affect whether
* any of the other pins can be ground.
*/
- void setInterGroundDependent( ElementMapList::iterator it, const QValueList<Pin*> & pins );
+ void setInterGroundDependent( ElementMapList::iterator it, const TQValueList<Pin*> & pins );
/**
* List of ElementMaps; which contain information on the pins associated
* with the element as well as the dependence between the pins for that
@@ -356,7 +357,7 @@ class Component : public CNItem
/**
* @return an iterator to the element in m_elementMapList
*/
- ElementMapList::iterator handleElement( Element *e, const QValueList<Pin*> & pins );
+ ElementMapList::iterator handleElement( Element *e, const TQValueList<Pin*> & pins );
};
#endif
diff --git a/src/electronics/components/addac.cpp b/src/electronics/components/addac.cpp
index a58e2d8..f1f7a92 100644
--- a/src/electronics/components/addac.cpp
+++ b/src/electronics/components/addac.cpp
@@ -143,7 +143,7 @@ void ADC::initPins()
if ( numBits == m_numBits )
return;
- QStringList pins;
+ TQStringList pins;
int inPos = (numBits-1+(numBits%2))/2;
for ( int i=0; i<inPos; ++i )
@@ -155,7 +155,7 @@ void ADC::initPins()
pins += "";
for ( int i=numBits-1; i>=0; --i )
- pins += QString::number(i);
+ pins += TQString::number(i);
initDIPSymbol( pins, 64 );
initDIP(pins);
@@ -168,7 +168,7 @@ void ADC::initPins()
{
for ( int i=m_numBits; i<numBits; ++i )
{
- ECNode *node = ecNodeWithID( QString::number(i) );
+ ECNode *node = ecNodeWithID( TQString::number(i) );
m_logic[i] = createLogicOut( node, false );
}
}
@@ -176,7 +176,7 @@ void ADC::initPins()
{
for ( int i=numBits; i<m_numBits; ++i )
{
- QString id = QString::number(i);
+ TQString id = TQString::number(i);
removeDisplayText(id);
removeElement( m_logic[i], false );
removeNode(id);
@@ -235,10 +235,10 @@ void DAC::initPins()
if ( numBits == m_numBits )
return;
- QStringList pins;
+ TQStringList pins;
for ( int i=0; i<numBits; ++i )
- pins += QString::number(i);
+ pins += TQString::number(i);
int inPos = (numBits+1+(numBits%2))/2;
for ( int i=numBits-1; i>=inPos; --i )
@@ -259,7 +259,7 @@ void DAC::initPins()
{
for ( int i=m_numBits; i<numBits; ++i )
{
- ECNode *node = ecNodeWithID( QString::number(i) );
+ ECNode *node = ecNodeWithID( TQString::number(i) );
m_logic[i] = createLogicIn(node);
}
}
@@ -267,7 +267,7 @@ void DAC::initPins()
{
for ( int i=numBits; i<m_numBits; ++i )
{
- QString id = QString::number(i);
+ TQString id = TQString::number(i);
removeDisplayText(id);
removeElement( m_logic[i], false );
removeNode(id);
diff --git a/src/electronics/components/bidirled.cpp b/src/electronics/components/bidirled.cpp
index 92e242d..50e7052 100644
--- a/src/electronics/components/bidirled.cpp
+++ b/src/electronics/components/bidirled.cpp
@@ -17,7 +17,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* BiDirLED::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -71,10 +71,10 @@ BiDirLED::~BiDirLED()
void BiDirLED::dataChanged()
{
- QString colors[] = { "0-color1", "0-color2" };
+ TQString colors[] = { "0-color1", "0-color2" };
for ( unsigned i = 0; i < 2; i++ )
{
- QColor color = dataColor(colors[i]);
+ TQColor color = dataColor(colors[i]);
r[i] = color.red();
g[i] = color.green();
b[i] = color.blue();
@@ -93,7 +93,7 @@ void BiDirLED::stepNonLogic()
avg_brightness[i] += ECLed::brightness(m_pDiode[i]->current())*interval;
}
-void BiDirLED::drawShape( QPainter &p )
+void BiDirLED::drawShape( TQPainter &p )
{
initPainter(p);
@@ -110,21 +110,21 @@ void BiDirLED::drawShape( QPainter &p )
}
avg_brightness[i] = 0.;
- p.setBrush( QColor( uint(255-(255-_b)*(1-r[i])), uint(255-(255-_b)*(1-g[i])), uint(255-(255-_b)*(1-b[i])) ) );
+ p.setBrush( TQColor( uint(255-(255-_b)*(1-r[i])), uint(255-(255-_b)*(1-g[i])), uint(255-(255-_b)*(1-b[i])) ) );
- QPointArray pa(3);
+ TQPointArray pa(3);
if ( i == 0 )
{
- pa[0] = QPoint( 8, -8 );
- pa[1] = QPoint( -8, -16 );
- pa[2] = QPoint( -8, 0 );
+ pa[0] = TQPoint( 8, -8 );
+ pa[1] = TQPoint( -8, -16 );
+ pa[2] = TQPoint( -8, 0 );
}
else
{
- pa[0] = QPoint( -8, 8 );
- pa[1] = QPoint( 8, 0 );
- pa[2] = QPoint( 8, 16 );
+ pa[0] = TQPoint( -8, 8 );
+ pa[1] = TQPoint( 8, 0 );
+ pa[2] = TQPoint( 8, 16 );
}
pa.translate( int(x()), int(y()) );
diff --git a/src/electronics/components/bidirled.h b/src/electronics/components/bidirled.h
index e80f4e0..9165063 100644
--- a/src/electronics/components/bidirled.h
+++ b/src/electronics/components/bidirled.h
@@ -30,7 +30,7 @@ class BiDirLED : public Component
virtual bool doesStepNonLogic() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
double r[2];
double g[2];
diff --git a/src/electronics/components/binarycounter.cpp b/src/electronics/components/binarycounter.cpp
index f278104..a93a1b2 100644
--- a/src/electronics/components/binarycounter.cpp
+++ b/src/electronics/components/binarycounter.cpp
@@ -23,7 +23,7 @@ Item* BinaryCounter::construct( ItemDocument *itemDocument, bool newItem, const
LibraryItem* BinaryCounter::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/binary_counter" << "ec/4_bit_binary_counter";
return new LibraryItem(
ids,
@@ -56,7 +56,7 @@ BinaryCounter::BinaryCounter( ICNDocument *icnDocument, bool newItem, const char
createProperty( "trig", Variant::Type::Select );
property("trig")->setCaption( i18n("Trigger Edge") );
- property("trig")->setAllowed( QStringList::split( ',', "Rising,Falling" ) );
+ property("trig")->setAllowed( TQStringList::split( ',', "Rising,Falling" ) );
property("trig")->setValue("Rising");
createProperty( "bitcount", Variant::Type::Int );
@@ -86,14 +86,14 @@ void BinaryCounter::initPins( unsigned numBits )
if ( m_numBits == numBits )
return;
- QStringList pins;
+ TQStringList pins;
pins << "en" << ">" << "u/d" << "r";
- for ( int i = 0; i < QABS(4-int(numBits)); i++ )
+ for ( int i = 0; i < TQABS(4-int(numBits)); i++ )
pins << "";
for ( int i = numBits-1; i >= 0; i-- )
- pins << QChar('A'+i);
+ pins << TQChar('A'+i);
initDIPSymbol( pins, 64 );
initDIP(pins);
@@ -101,13 +101,13 @@ void BinaryCounter::initPins( unsigned numBits )
if ( m_numBits < numBits )
{
for ( unsigned i = m_numBits; i < numBits; i++ )
- m_pLogicOut[i] = createLogicOut( ecNodeWithID( QChar('A'+i) ), false );
+ m_pLogicOut[i] = createLogicOut( ecNodeWithID( TQChar('A'+i) ), false );
}
else
{
for ( unsigned i = numBits; i < m_numBits; i++ )
{
- QString id = QChar('A'+i);
+ TQString id = TQChar('A'+i);
removeElement( m_pLogicOut[i], false );
removeDisplayText(id);
removeNode(id);
diff --git a/src/electronics/components/bussplitter.cpp b/src/electronics/components/bussplitter.cpp
index 62fbb39..85619a4 100644
--- a/src/electronics/components/bussplitter.cpp
+++ b/src/electronics/components/bussplitter.cpp
@@ -14,7 +14,7 @@
#include "wire.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* BusSplitter::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -105,24 +105,24 @@ void BusSplitter::dataChanged()
}
-QString BusSplitter::outNodeID( unsigned node ) const
+TQString BusSplitter::outNodeID( unsigned node ) const
{
- return QString("out_%1").arg(QString::number(node));
+ return TQString("out_%1").tqarg(TQString::number(node));
}
-void BusSplitter::drawShape( QPainter &p )
+void BusSplitter::drawShape( TQPainter &p )
{
initPainter(p);
-// QPen pen(p.pen());
+// TQPen pen(p.pen());
// pen.setWidth();
// p.setPen(pen);
int _x = int(x());
int _y = int(y());
- QRect r = m_sizeRect;
+ TQRect r = m_sizeRect;
r.moveBy( _x, _y );
p.drawRect(r);
diff --git a/src/electronics/components/bussplitter.h b/src/electronics/components/bussplitter.h
index ccd1994..22b3054 100644
--- a/src/electronics/components/bussplitter.h
+++ b/src/electronics/components/bussplitter.h
@@ -13,8 +13,8 @@
#include <component.h>
-#include <qguardedptr.h>
-#include <qvaluevector.h>
+#include <tqguardedptr.h>
+#include <tqvaluevector.h>
class Wire;
@@ -33,12 +33,12 @@ class BusSplitter : public Component
virtual bool canFlip() const { return true; }
protected:
- QString outNodeID( unsigned node ) const;
+ TQString outNodeID( unsigned node ) const;
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
unsigned m_busSize;
- QValueVector<QGuardedPtr<Wire> > m_pWires;
+ TQValueVector<TQGuardedPtr<Wire> > m_pWires;
ECNode * m_pInNode;
};
diff --git a/src/electronics/components/demultiplexer.cpp b/src/electronics/components/demultiplexer.cpp
index 8a01808..7124c89 100644
--- a/src/electronics/components/demultiplexer.cpp
+++ b/src/electronics/components/demultiplexer.cpp
@@ -110,17 +110,17 @@ void Demultiplexer::initPins( unsigned newAddressSize )
if ( newXLogicCount == oldXLogicCount )
return;
- QStringList pins;
+ TQStringList pins;
for ( unsigned i=0; i<newAddressSize; ++i )
- pins += "A"+QString::number(i);
+ pins += "A"+TQString::number(i);
for ( unsigned i=newAddressSize; i<(newXLogicCount+(newXLogicCount%2))/2; ++i )
pins += "";
pins += "X";
for ( unsigned i=(newXLogicCount+(newXLogicCount%2))/2+1; i<newXLogicCount; ++i )
pins += "";
for ( int i=newXLogicCount-1; i>=0; --i )
- pins += "X"+QString::number(i);
+ pins += "X"+TQString::number(i);
initDIPSymbol( pins, 64 );
initDIP(pins);
@@ -139,14 +139,14 @@ void Demultiplexer::initPins( unsigned newAddressSize )
m_xLogic.resize(newXLogicCount);
for ( unsigned i = oldXLogicCount; i < newXLogicCount; ++i )
{
- node = ecNodeWithID("X"+QString::number(i));
+ node = ecNodeWithID("X"+TQString::number(i));
m_xLogic.insert( i, createLogicOut(node,false) );
}
m_aLogic.resize(newAddressSize);
for ( unsigned i = oldAddressSize; i < newAddressSize; ++i )
{
- node = ecNodeWithID("A"+QString::number(i));
+ node = ecNodeWithID("A"+TQString::number(i));
m_aLogic.insert( i, createLogicIn(node) );
m_aLogic[i]->setCallback( this, (CallbackPtr)(&Demultiplexer::inStateChanged) );
}
@@ -155,7 +155,7 @@ void Demultiplexer::initPins( unsigned newAddressSize )
{
for ( unsigned i = newXLogicCount; i < oldXLogicCount; ++i )
{
- QString id = "X"+QString::number(i);
+ TQString id = "X"+TQString::number(i);
removeDisplayText(id);
removeElement( m_xLogic[i], false );
removeNode(id);
@@ -164,7 +164,7 @@ void Demultiplexer::initPins( unsigned newAddressSize )
for ( unsigned i = newAddressSize; i < oldAddressSize; ++i )
{
- QString id = "A"+QString::number(i);
+ TQString id = "A"+TQString::number(i);
removeDisplayText(id);
removeElement( m_aLogic[i], false );
removeNode(id);
diff --git a/src/electronics/components/demultiplexer.h b/src/electronics/components/demultiplexer.h
index a2b52dd..eabcc2c 100644
--- a/src/electronics/components/demultiplexer.h
+++ b/src/electronics/components/demultiplexer.h
@@ -14,7 +14,7 @@
#include "component.h"
#include "logic.h"
-#include <qptrvector.h>
+#include <tqptrvector.h>
/**
@author David Saxton
@@ -38,8 +38,8 @@ protected:
void inStateChanged( bool newState );
- QPtrVector<LogicIn> m_aLogic;
- QPtrVector<LogicOut> m_xLogic;
+ TQPtrVector<LogicIn> m_aLogic;
+ TQPtrVector<LogicOut> m_xLogic;
LogicIn * m_input;
};
diff --git a/src/electronics/components/dependentsource.cpp b/src/electronics/components/dependentsource.cpp
index 764cc53..1808c86 100644
--- a/src/electronics/components/dependentsource.cpp
+++ b/src/electronics/components/dependentsource.cpp
@@ -19,7 +19,7 @@
#include "vcvs.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class DependentSource
DependentSource::DependentSource( ICNDocument *icnDocument, bool newItem, const char *id )
@@ -34,7 +34,7 @@ DependentSource::DependentSource( ICNDocument *icnDocument, bool newItem, const
property("gain")->setCaption( i18n("Gain") );
property("gain")->setValue(1.0);
- addDisplayText( "gain", QRect( -16, -32, 32, 16 ), "" );
+ addDisplayText( "gain", TQRect( -16, -32, 32, 16 ), "" );
}
@@ -43,7 +43,7 @@ DependentSource::~DependentSource()
}
-void DependentSource::drawOutline( QPainter & p )
+void DependentSource::drawOutline( TQPainter & p )
{
const int _x = (int)x()-16;
const int _y = (int)y()-32;
@@ -52,67 +52,67 @@ void DependentSource::drawOutline( QPainter & p )
p.drawRect( _x, _y+19, width(), 11 );
p.save();
- bool canSetCol = (p.pen().color() != Qt::color0) && (p.pen().color() != Qt::color1);
+ bool canSetCol = (p.pen().color() != TQt::color0) && (p.pen().color() != TQt::color1);
// Bottom lines
if (canSetCol)
- p.setPen( m_pNNode[1]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( m_pNNode[1]->isSelected() ? m_selectedCol : TQt::black );
p.drawLine( _x, _y+40, _x+8, _y+40 ); // Left inny
if (canSetCol)
- p.setPen( m_pPNode[1]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( m_pPNode[1]->isSelected() ? m_selectedCol : TQt::black );
p.drawLine( _x+width(), _y+40, _x+24, _y+40 ); // Right inny
p.restore();
// Bottom diamond
- QPointArray pa4(4);
- pa4[0] = QPoint( _x+6, _y+40 );
- pa4[1] = QPoint( _x+16, _y+32 );
- pa4[2] = QPoint( _x+26, _y+40 );
- pa4[3] = QPoint( _x+16, _y+48 );
+ TQPointArray pa4(4);
+ pa4[0] = TQPoint( _x+6, _y+40 );
+ pa4[1] = TQPoint( _x+16, _y+32 );
+ pa4[2] = TQPoint( _x+26, _y+40 );
+ pa4[3] = TQPoint( _x+16, _y+48 );
p.drawPolygon(pa4);
}
-void DependentSource::drawTopArrow( QPainter & p )
+void DependentSource::drawTopArrow( TQPainter & p )
{
const int _x = (int)x()-16;
const int _y = (int)y()-32;
if ( p.pen().color() == m_selectedCol )
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
if ( p.brush().color() == m_brushCol )
- p.setBrush(Qt::black);
+ p.setBrush(TQt::black);
p.drawLine( _x+8, _y+24, _x+24, _y+24 );
- QPointArray pa3(3);
- pa3[0] = QPoint( _x+24, _y+24 );
- pa3[1] = QPoint( _x+19, _y+21 );
- pa3[2] = QPoint( _x+19, _y+27 );
+ TQPointArray pa3(3);
+ pa3[0] = TQPoint( _x+24, _y+24 );
+ pa3[1] = TQPoint( _x+19, _y+21 );
+ pa3[2] = TQPoint( _x+19, _y+27 );
p.drawPolygon(pa3);
}
-void DependentSource::drawBottomArrow( QPainter & p )
+void DependentSource::drawBottomArrow( TQPainter & p )
{
const int _x = (int)x()-16;
const int _y = (int)y()-32;
if ( p.pen().color() == m_selectedCol )
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
if ( p.brush().color() == m_brushCol )
- p.setBrush(Qt::black);
+ p.setBrush(TQt::black);
p.drawLine( _x+11, _y+40, _x+21, _y+40 );
- QPointArray pa3(3);
- pa3[0] = QPoint( _x+21, _y+40 );
- pa3[1] = QPoint( _x+16, _y+37 );
- pa3[2] = QPoint( _x+16, _y+43 );
+ TQPointArray pa3(3);
+ pa3[0] = TQPoint( _x+21, _y+40 );
+ pa3[1] = TQPoint( _x+16, _y+37 );
+ pa3[2] = TQPoint( _x+16, _y+43 );
p.drawPolygon(pa3);
}
//END class DependentSource
@@ -127,7 +127,7 @@ Item* ECCCCS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECCCCS::libraryItem()
{
return new LibraryItem(
- QString("ec/cccs"),
+ TQString("ec/cccs"),
i18n("CCCS"),
i18n("Sources"),
"cccs.png",
@@ -151,13 +151,13 @@ void ECCCCS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_cccs->setGain(gain);
}
-void ECCCCS::drawShape( QPainter &p )
+void ECCCCS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
@@ -177,7 +177,7 @@ Item* ECCCVS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECCCVS::libraryItem()
{
return new LibraryItem(
- QString("ec/ccvs"),
+ TQString("ec/ccvs"),
i18n("CCVS"),
i18n("Sources"),
"ccvs.png",
@@ -201,13 +201,13 @@ void ECCCVS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_ccvs->setGain(gain);
}
-void ECCCVS::drawShape( QPainter &p )
+void ECCCVS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
@@ -226,7 +226,7 @@ Item* ECVCCS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECVCCS::libraryItem()
{
return new LibraryItem(
- QString("ec/vccs"),
+ TQString("ec/vccs"),
i18n("VCCS"),
i18n("Sources"),
"vccs.png",
@@ -250,13 +250,13 @@ void ECVCCS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_vccs->setGain(gain);
}
-void ECVCCS::drawShape( QPainter &p )
+void ECVCCS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
@@ -275,7 +275,7 @@ Item* ECVCVS::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECVCVS::libraryItem()
{
return new LibraryItem(
- QString("ec/vcvs"),
+ TQString("ec/vcvs"),
i18n("VCVS"),
i18n("Sources"),
"vcvs.png",
@@ -299,13 +299,13 @@ void ECVCVS::dataChanged()
{
double gain = dataDouble("gain");
- QString display = QString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + QChar(' ');
+ TQString display = TQString::number( gain / getMultiplier(gain), 'g', 3 ) + getNumberMag(gain) + TQChar(' ');
setDisplayText( "gain", display );
m_vcvs->setGain(gain);
}
-void ECVCVS::drawShape( QPainter &p )
+void ECVCVS::drawShape( TQPainter &p )
{
initPainter(p);
drawOutline(p);
diff --git a/src/electronics/components/dependentsource.h b/src/electronics/components/dependentsource.h
index 2bccbb7..8b9e264 100644
--- a/src/electronics/components/dependentsource.h
+++ b/src/electronics/components/dependentsource.h
@@ -24,9 +24,9 @@ class DependentSource : public Component
virtual bool canFlip() const { return true; }
protected:
- void drawOutline( QPainter & p );
- void drawTopArrow( QPainter & p );
- void drawBottomArrow( QPainter & p );
+ void drawOutline( TQPainter & p );
+ void drawTopArrow( TQPainter & p );
+ void drawBottomArrow( TQPainter & p );
};
/**
@@ -44,7 +44,7 @@ class ECCCCS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
CCCS *m_cccs;
};
@@ -64,7 +64,7 @@ class ECCCVS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
CCVS *m_ccvs;
};
@@ -84,7 +84,7 @@ class ECVCCS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
VCCS *m_vccs;
};
@@ -104,7 +104,7 @@ class ECVCVS : public DependentSource
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
VCVS *m_vcvs;
};
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);
diff --git a/src/electronics/components/discretelogic.h b/src/electronics/components/discretelogic.h
index 82775bf..c8a5778 100644
--- a/src/electronics/components/discretelogic.h
+++ b/src/electronics/components/discretelogic.h
@@ -31,7 +31,7 @@ class Inverter : public CallbackClass, public Component
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicIn * m_pIn;
LogicOut * m_pOut;
@@ -52,7 +52,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicIn * m_pIn;
LogicOut * m_pOut;
@@ -71,11 +71,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
private:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicOut * m_pOut;
bool b_state;
};
@@ -95,7 +95,7 @@ class ECLogicOutput : public CallbackClass, public Component
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
unsigned long long m_lastDrawTime;
unsigned long long m_lastSwitchTime;
diff --git a/src/electronics/components/ec555.cpp b/src/electronics/components/ec555.cpp
index eccf2bd..3f43cb3 100644
--- a/src/electronics/components/ec555.cpp
+++ b/src/electronics/components/ec555.cpp
@@ -17,7 +17,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* EC555::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -27,7 +27,7 @@ Item* EC555::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* EC555::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/555"),
+ TQString::TQString("ec/555"),
i18n("555"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -41,8 +41,8 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
{
m_name = i18n("555");
m_desc = i18n("Common timer IC");
-// m_pins = QStringList::split( ',', "Gnd,Trg,Out,Res,CV,Th,Dis,Vcc" );
-// m_pins = QStringList::split( ',', "Dis,Th,Trg,Gnd,CV,Out,Res,Vcc" );
+// m_pins = TQStringList::split( ',', "Gnd,Trg,Out,Res,CV,Th,Dis,Vcc" );
+// m_pins = TQStringList::split( ',', "Dis,Th,Trg,Gnd,CV,Out,Res,Vcc" );
old_com1 = false;
old_com2 = false;
@@ -55,15 +55,15 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 7
discharge = createPin( -40, -16, 0, "Dis" )->pin();
- addDisplayText( "dis", QRect( -32, -24, 24, 16 ), "Dis" );
+ addDisplayText( "dis", TQRect( -32, -24, 24, 16 ), "Dis" );
// Pin 6
threshold = createPin( -40, 0, 0, "Th" )->pin();
- addDisplayText( "th", QRect( -32, -8, 24, 16 ), "Th" );
+ addDisplayText( "th", TQRect( -32, -8, 24, 16 ), "Th" );
// Pin 2
trigger = createPin( -40, 16, 0, "Trg" )->pin();
- addDisplayText( "trg", QRect( -32, 8, 24, 16 ), "Trg" );
+ addDisplayText( "trg", TQRect( -32, 8, 24, 16 ), "Trg" );
@@ -71,11 +71,11 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 8
vcc = createPin( -16, -40, 90, "Vcc" )->pin();
- addDisplayText( "vcc", QRect( -24, -32, 16, 8 ), "+" );
+ addDisplayText( "vcc", TQRect( -24, -32, 16, 8 ), "+" );
// Pin 4
reset = createPin( 16, -40, 90, "Res" )->pin();
- addDisplayText( "res", QRect( 8, -28, 16, 16 ), "Res" );
+ addDisplayText( "res", TQRect( 8, -28, 16, 16 ), "Res" );
@@ -83,11 +83,11 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 1
ground = createPin( -16, 40, 270, "Gnd" )->pin();
- addDisplayText( "gnd", QRect( -24, 20, 16, 8 ), "-" );
+ addDisplayText( "gnd", TQRect( -24, 20, 16, 8 ), "-" );
// Pin 5
control = createPin( 16, 40, 270, "CV" )->pin();
- addDisplayText( "cv", QRect( 8, 12, 16, 16 ), "CV" );
+ addDisplayText( "cv", TQRect( 8, 12, 16, 16 ), "CV" );
@@ -95,7 +95,7 @@ EC555::EC555( ICNDocument *icnDocument, bool newItem, const char *id )
// Pin 3
output = createPin( 40, 0, 180, "Out" )->pin();
- addDisplayText( "out", QRect( 8, -8, 16, 16 ), "Out" );
+ addDisplayText( "out", TQRect( 8, -8, 16, 16 ), "Out" );
diff --git a/src/electronics/components/ec555.h b/src/electronics/components/ec555.h
index edeb2a5..79b121f 100644
--- a/src/electronics/components/ec555.h
+++ b/src/electronics/components/ec555.h
@@ -13,7 +13,7 @@
#include "component.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
@short 555 IC
diff --git a/src/electronics/components/ecbcdto7segment.cpp b/src/electronics/components/ecbcdto7segment.cpp
index fb210ea..b6a7dd8 100644
--- a/src/electronics/components/ecbcdto7segment.cpp
+++ b/src/electronics/components/ecbcdto7segment.cpp
@@ -43,7 +43,7 @@ Item* ECBCDTo7Segment::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECBCDTo7Segment::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/bcd_to_seven_segment"),
+ TQString::TQString("ec/bcd_to_seven_segment"),
i18n("BCD to 7 Segment"),
i18n("Integrated Circuits"),
"ic2.png",
@@ -68,7 +68,7 @@ ECBCDTo7Segment::ECBCDTo7Segment( ICNDocument *icnDocument, bool newItem, const
oldOut[i] = false;
}
- QStringList pins = QStringList::split( ',', "A,B,C,D,,lt,rb,en,d,e,f,g,,a,b,c", true );
+ TQStringList pins = TQStringList::split( ',', "A,B,C,D,,lt,rb,en,d,e,f,g,,a,b,c", true );
initDIPSymbol( pins, 48 );
initDIP(pins);
@@ -90,7 +90,7 @@ ECBCDTo7Segment::ECBCDTo7Segment( ICNDocument *icnDocument, bool newItem, const
for ( uint i=0; i<7; ++i )
{
- outLogic[i] = createLogicOut( ecNodeWithID( QChar('a'+i) ), false );
+ outLogic[i] = createLogicOut( ecNodeWithID( TQChar('a'+i) ), false );
outLogic[i]->setCallback( this, (CallbackPtr)(&ECBCDTo7Segment::inStateChanged) );
}
inStateChanged(false);
diff --git a/src/electronics/components/ecbjt.cpp b/src/electronics/components/ecbjt.cpp
index b4b59f2..aed928e 100644
--- a/src/electronics/components/ecbjt.cpp
+++ b/src/electronics/components/ecbjt.cpp
@@ -15,7 +15,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item * ECBJT::constructNPN( ItemDocument * itemDocument, bool newItem, const char * id )
{
@@ -122,7 +122,7 @@ void ECBJT::dataChanged()
}
-void ECBJT::drawShape( QPainter &p )
+void ECBJT::drawShape( TQPainter &p )
{
const int _x = int(x());
const int _y = int(y());
@@ -133,18 +133,18 @@ void ECBJT::drawShape( QPainter &p )
p.drawLine( _x+8, _y-8, _x-8, _y );
p.drawLine( _x+8, _y+8, _x-8, _y );
- QPointArray pa(3);
+ TQPointArray pa(3);
if ( m_bIsNPN )
{
- pa[0] = QPoint( _x+6, _y+7 );
- pa[1] = QPoint( _x+2, _y+8 );
- pa[2] = QPoint( _x+6, _y+3 );
+ pa[0] = TQPoint( _x+6, _y+7 );
+ pa[1] = TQPoint( _x+2, _y+8 );
+ pa[2] = TQPoint( _x+6, _y+3 );
}
else
{
- pa[0] = QPoint( _x-7, _y+1 );
- pa[1] = QPoint( _x-4, _y+5 );
- pa[2] = QPoint( _x-2, _y );
+ pa[0] = TQPoint( _x-7, _y+1 );
+ pa[1] = TQPoint( _x-4, _y+5 );
+ pa[2] = TQPoint( _x-2, _y );
}
p.setBrush( p.pen().color() );
p.drawPolygon(pa);
diff --git a/src/electronics/components/ecbjt.h b/src/electronics/components/ecbjt.h
index 17a63e9..9a6d6dd 100644
--- a/src/electronics/components/ecbjt.h
+++ b/src/electronics/components/ecbjt.h
@@ -33,7 +33,7 @@ class ECBJT : public Component
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
bool m_bIsNPN;
BJT * m_pBJT;
diff --git a/src/electronics/components/eccapacitor.cpp b/src/electronics/components/eccapacitor.cpp
index 76a09b0..c951291 100644
--- a/src/electronics/components/eccapacitor.cpp
+++ b/src/electronics/components/eccapacitor.cpp
@@ -14,7 +14,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECCapacitor::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -53,7 +53,7 @@ ECCapacitor::ECCapacitor( ICNDocument *icnDocument, bool newItem, const char *id
property("Capacitance")->setMaxValue(1e12);
property("Capacitance")->setValue(1e-3);
- addDisplayText( "capacitance", QRect( -8, -24, 16, 16 ), "", false );
+ addDisplayText( "capacitance", TQRect( -8, -24, 16, 16 ), "", false );
}
ECCapacitor::~ECCapacitor()
@@ -64,20 +64,20 @@ void ECCapacitor::dataChanged()
{
double capacitance = dataDouble("Capacitance");
- QString display = QString::number( capacitance / getMultiplier(capacitance), 'g', 3 ) + getNumberMag(capacitance) + "F";
+ TQString display = TQString::number( capacitance / getMultiplier(capacitance), 'g', 3 ) + getNumberMag(capacitance) + "F";
setDisplayText( "capacitance", display );
m_capacitance->setCapacitance(capacitance);
}
-void ECCapacitor::drawShape( QPainter &p )
+void ECCapacitor::drawShape( TQPainter &p )
{
initPainter(p);
int _y = (int)y()-8;
int _x = (int)x()-8;
- QPen pen;
+ TQPen pen;
pen.setWidth(1);
pen.setColor( p.pen().color() );
p.setPen(pen);
diff --git a/src/electronics/components/eccapacitor.h b/src/electronics/components/eccapacitor.h
index 4dd0ee6..891ec14 100644
--- a/src/electronics/components/eccapacitor.h
+++ b/src/electronics/components/eccapacitor.h
@@ -32,7 +32,7 @@ public:
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Capacitance * m_capacitance;
};
diff --git a/src/electronics/components/ecclockinput.cpp b/src/electronics/components/ecclockinput.cpp
index 7f1ec9c..7d3d608 100644
--- a/src/electronics/components/ecclockinput.cpp
+++ b/src/electronics/components/ecclockinput.cpp
@@ -15,7 +15,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
@@ -32,7 +32,7 @@ Item* ECClockInput::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECClockInput::libraryItem()
{
return new LibraryItem(
- QString("ec/clock_input"),
+ TQString("ec/clock_input"),
i18n("Clock Input"),
i18n("Logic"),
"clockinput.png",
@@ -76,7 +76,7 @@ ECClockInput::ECClockInput( ICNDocument *icnDocument, bool newItem, const char *
property("high-time")->setMinValue(1.0/LOGIC_UPDATE_RATE);
property("high-time")->setValue(0.5);
- addDisplayText( "freq", QRect( -16, -24, 32, 14 ), "", false );
+ addDisplayText( "freq", TQRect( -16, -24, 32, 14 ), "", false );
}
@@ -97,7 +97,7 @@ void ECClockInput::dataChanged()
m_period = m_low_time+m_high_time;
const double frequency = 1./(dataDouble("high-time")+dataDouble("low-time"));
- QString display = QString::number( frequency / getMultiplier(frequency), 'g', 3 ) + getNumberMag(frequency) + "Hz";
+ TQString display = TQString::number( frequency / getMultiplier(frequency), 'g', 3 ) + getNumberMag(frequency) + "Hz";
setDisplayText( "freq", display );
bool setStepCallbacks = m_period > 100;
@@ -159,7 +159,7 @@ void ECClockInput::stepNonLogic()
}
-void ECClockInput::drawShape( QPainter &p )
+void ECClockInput::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/ecclockinput.h b/src/electronics/components/ecclockinput.h
index c7f7d14..db5f7bc 100644
--- a/src/electronics/components/ecclockinput.h
+++ b/src/electronics/components/ecclockinput.h
@@ -38,7 +38,7 @@ public:
virtual bool doesStepNonLogic() const { return true; }
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
uint m_time;
diff --git a/src/electronics/components/eccurrentsignal.cpp b/src/electronics/components/eccurrentsignal.cpp
index e6dc351..14c632b 100644
--- a/src/electronics/components/eccurrentsignal.cpp
+++ b/src/electronics/components/eccurrentsignal.cpp
@@ -16,7 +16,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECCurrentSignal::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECCurrentSignal::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECCurrentSignal::libraryItem()
{
return new LibraryItem(
- QString("ec/ac_current"),
+ TQString("ec/ac_current"),
i18n("Current Signal"),
i18n("Sources"),
"currentsignal.png",
@@ -62,8 +62,8 @@ ECCurrentSignal::ECCurrentSignal( ICNDocument *icnDocument, bool newItem, const
property("1-current")->setMaxValue(1e12);
property("1-current")->setValue(0.02);
- addDisplayText( "~", QRect( -8, -8, 16, 16 ), "~" );
- addDisplayText( "current", QRect( -16, -24, 32, 16 ), "" );
+ addDisplayText( "~", TQRect( -8, -8, 16, 16 ), "~" );
+ addDisplayText( "current", TQRect( -16, -24, 32, 16 ), "" );
}
@@ -76,14 +76,14 @@ void ECCurrentSignal::dataChanged()
const double current = dataDouble("1-current");
const double frequency = dataDouble("1-frequency");
- QString display = QString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
+ TQString display = TQString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
setDisplayText( "current", display );
m_currentSignal->setStep( 1./LINEAR_UPDATE_RATE, ElementSignal::st_sinusoidal, frequency );
m_currentSignal->setCurrent(current);
}
-void ECCurrentSignal::drawShape( QPainter &p )
+void ECCurrentSignal::drawShape( TQPainter &p )
{
initPainter(p);
p.drawEllipse( (int)x()-8, (int)y()-8, width(), height() );
diff --git a/src/electronics/components/eccurrentsignal.h b/src/electronics/components/eccurrentsignal.h
index 88dd276..802221d 100644
--- a/src/electronics/components/eccurrentsignal.h
+++ b/src/electronics/components/eccurrentsignal.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
CurrentSignal *m_currentSignal;
diff --git a/src/electronics/components/eccurrentsource.cpp b/src/electronics/components/eccurrentsource.cpp
index 76ecf3e..6184ef1 100644
--- a/src/electronics/components/eccurrentsource.cpp
+++ b/src/electronics/components/eccurrentsource.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECCurrentSource::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECCurrentSource::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECCurrentSource::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/current_source"),
+ TQString::TQString("ec/current_source"),
i18n("Current Source"),
i18n("Sources"),
"current_source.png",
@@ -54,7 +54,7 @@ ECCurrentSource::ECCurrentSource( ICNDocument *icnDocument, bool newItem, const
property("current")->setMaxValue(1e12);
property("current")->setValue(0.02);
- addDisplayText("current", QRect( -16, -16, 24, 0 ), "" );
+ addDisplayText("current", TQRect( -16, -16, 24, 0 ), "" );
}
@@ -67,11 +67,11 @@ void ECCurrentSource::dataChanged()
double current = dataDouble("current");
m_currentSource->setCurrent(current);
- QString display = QString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
+ TQString display = TQString::number( current / getMultiplier(current), 'g', 3 ) + getNumberMag(current) + "A";
setDisplayText("current", display );
}
-void ECCurrentSource::drawShape( QPainter &p )
+void ECCurrentSource::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/eccurrentsource.h b/src/electronics/components/eccurrentsource.h
index 6332eba..36a98b5 100644
--- a/src/electronics/components/eccurrentsource.h
+++ b/src/electronics/components/eccurrentsource.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
CurrentSource *m_currentSource;
diff --git a/src/electronics/components/ecdiode.cpp b/src/electronics/components/ecdiode.cpp
index 1d63bce..744f27e 100644
--- a/src/electronics/components/ecdiode.cpp
+++ b/src/electronics/components/ecdiode.cpp
@@ -14,7 +14,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECDiode::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -72,7 +72,7 @@ ECDiode::ECDiode( ICNDocument *icnDocument, bool newItem, const char *id )
// createProperty( "R", Variant::Type::Double );
// property("R")->setCaption( i18n("Series Resistance") );
-// property("R")->setUnit( QChar(0x3a9) );
+// property("R")->setUnit( TQChar(0x3a9) );
// property("R")->setMinValue(1e-5);
// property("R")->setMaxValue(1e0);
// property("R")->setValue( ds.R );
@@ -98,17 +98,17 @@ void ECDiode::dataChanged()
}
-void ECDiode::drawShape( QPainter & p )
+void ECDiode::drawShape( TQPainter & p )
{
initPainter(p);
int _x = int(x());
int _y = int(y());
- QPointArray pa(3);
- pa[0] = QPoint( 8, 0 );
- pa[1] = QPoint( -8, -8 );
- pa[2] = QPoint( -8, 8 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( 8, 0 );
+ pa[1] = TQPoint( -8, -8 );
+ pa[2] = TQPoint( -8, 8 );
pa.translate( _x, _y );
p.drawPolygon(pa);
p.drawPolyline(pa);
diff --git a/src/electronics/components/ecdiode.h b/src/electronics/components/ecdiode.h
index fa8d034..a44a950 100644
--- a/src/electronics/components/ecdiode.h
+++ b/src/electronics/components/ecdiode.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
protected:
- void drawShape( QPainter & p );
+ void drawShape( TQPainter & p );
void dataChanged();
Diode *m_diode;
};
diff --git a/src/electronics/components/ecfixedvoltage.cpp b/src/electronics/components/ecfixedvoltage.cpp
index 06eb707..fa21dfe 100644
--- a/src/electronics/components/ecfixedvoltage.cpp
+++ b/src/electronics/components/ecfixedvoltage.cpp
@@ -15,7 +15,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECFixedVoltage::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -42,7 +42,7 @@ ECFixedVoltage::ECFixedVoltage( ICNDocument *icnDocument, bool newItem, const ch
init1PinRight();
m_voltagePoint = createVoltagePoint( m_pPNode[0], 5.0 );
- addDisplayText( "voltage", QRect( -24, -20, width()+32, 12 ), "" );
+ addDisplayText( "voltage", TQRect( -24, -20, width()+32, 12 ), "" );
createProperty( "voltage", Variant::Type::Double );
property("voltage")->setUnit("V");
@@ -59,18 +59,18 @@ ECFixedVoltage::~ECFixedVoltage()
void ECFixedVoltage::dataChanged()
{
const double voltage = dataDouble("voltage");
- QString display = QString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
+ TQString display = TQString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
setDisplayText( "voltage", display );
m_voltagePoint->setVoltage(voltage);
}
-void ECFixedVoltage::drawShape( QPainter &p )
+void ECFixedVoltage::drawShape( TQPainter &p )
{
initPainter(p);
int _x = int(x());
int _y = int(y());
p.drawEllipse( _x-4, _y-4, 8, 8 );
- p.setPen( m_pPNode[0]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( m_pPNode[0]->isSelected() ? m_selectedCol : TQt::black );
p.drawLine( _x+4, _y, _x+8, _y );
deinitPainter(p);
}
diff --git a/src/electronics/components/ecfixedvoltage.h b/src/electronics/components/ecfixedvoltage.h
index ba20358..c2a632d 100644
--- a/src/electronics/components/ecfixedvoltage.h
+++ b/src/electronics/components/ecfixedvoltage.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
VoltagePoint *m_voltagePoint;
};
diff --git a/src/electronics/components/ecground.cpp b/src/electronics/components/ecground.cpp
index efbfc41..2e98cfa 100644
--- a/src/electronics/components/ecground.cpp
+++ b/src/electronics/components/ecground.cpp
@@ -15,7 +15,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECGround::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -24,7 +24,7 @@ Item* ECGround::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ECGround::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/ground"),
+ TQString::TQString("ec/ground"),
i18n("Ground (0V)"),
i18n("Sources"),
"ground.png",
@@ -47,12 +47,12 @@ ECGround::~ECGround()
{
}
-void ECGround::drawShape( QPainter &p )
+void ECGround::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()-8;
int _y = (int)y()-8;
- QPen pen;
+ TQPen pen;
pen.setWidth(2);
pen.setColor( p.pen().color() );
p.setPen(pen);
diff --git a/src/electronics/components/ecground.h b/src/electronics/components/ecground.h
index 0cf97bc..9740fd9 100644
--- a/src/electronics/components/ecground.h
+++ b/src/electronics/components/ecground.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
#endif
diff --git a/src/electronics/components/eckeypad.cpp b/src/electronics/components/eckeypad.cpp
index 89d2659..c92a562 100644
--- a/src/electronics/components/eckeypad.cpp
+++ b/src/electronics/components/eckeypad.cpp
@@ -24,7 +24,7 @@ Item* ECKeyPad::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ECKeyPad::libraryItem()
{
return new LibraryItem(
- QString("ec/keypad"),
+ TQString("ec/keypad"),
i18n("Keypad"),
i18n("Switches"),
"keypad.png",
@@ -32,7 +32,7 @@ LibraryItem* ECKeyPad::libraryItem()
ECKeyPad::construct );
}
-const QString text[4][9] =
+const TQString text[4][9] =
{ { "1","2","3","A","E","I","M","Q","U" },
{ "4","5","6","B","F","J","N","R","V" },
{ "7","8","9","C","G","K","O","S","W" },
@@ -66,7 +66,7 @@ ECKeyPad::ECKeyPad( ICNDocument *icnDocument, bool newItem, const char *id )
v->setValue(5e-3);
for ( int i = 0; i < 4; i++ )
- createPin( 0, -32+i*24, 0, QString("row_%1").arg(QString::number(i)) );
+ createPin( 0, -32+i*24, 0, TQString("row_%1").tqarg(TQString::number(i)) );
m_numCols = 0;
}
@@ -77,9 +77,9 @@ ECKeyPad::~ECKeyPad()
}
-QString ECKeyPad::buttonID( int row, int col ) const
+TQString ECKeyPad::buttonID( int row, int col ) const
{
- return QString("b_%1_%2").arg(QString::number(row)).arg(QString::number(col));
+ return TQString("b_%1_%2").tqarg(TQString::number(row)).tqarg(TQString::number(col));
}
@@ -129,17 +129,17 @@ void ECKeyPad::initPins( unsigned numCols )
for ( unsigned i = 0; i < 4; i++ )
{
for ( unsigned j = m_numCols; j < numCols; j++ )
- addButton( buttonID(i,j), QRect( 0, 0, 20, 20 ), text[i][j] );
+ addButton( buttonID(i,j), TQRect( 0, 0, 20, 20 ), text[i][j] );
}
ECNode * cols[numCols];
for ( unsigned j = m_numCols; j < numCols; j++ )
- cols[j] = createPin( 0, 64, 270, "col_" + QString::number(j) );
+ cols[j] = createPin( 0, 64, 270, "col_" + TQString::number(j) );
for ( unsigned i = 0; i < 4; i++ )
{
- ECNode * row = ecNodeWithID("row_"+QString::number(i));
+ ECNode * row = ecNodeWithID("row_"+TQString::number(i));
for ( unsigned j = m_numCols; j < numCols; j++ )
m_switch[i][j] = createSwitch( cols[j], row, true );
}
@@ -155,7 +155,7 @@ void ECKeyPad::initPins( unsigned numCols )
}
for ( unsigned j = numCols; j < m_numCols; j++ )
- removeNode( "col_" + QString::number(j) );
+ removeNode( "col_" + TQString::number(j) );
for ( unsigned i = 0; i < 4; i++ )
{
@@ -172,27 +172,27 @@ void ECKeyPad::initPins( unsigned numCols )
for ( int j = 0; j < int(m_numCols); j++ )
{
widgetWithID( buttonID(i,j) )->setOriginalRect(
- QRect( offsetX() + 6 + 24*j, offsetY() + 6 + 24*i, 20, 20 ) );
+ TQRect( offsetX() + 6 + 24*j, offsetY() + 6 + 24*i, 20, 20 ) );
}
}
for ( int i = 0; i < 4; i++ )
- m_nodeMap["row_" + QString::number(i)].x = width()+offsetX();
+ m_nodeMap["row_" + TQString::number(i)].x = width()+offsetX();
for ( int j = 0; j < int(m_numCols); j++ )
- m_nodeMap["col_" + QString::number(j)].x = 24*j+offsetX()+16;
+ m_nodeMap["col_" + TQString::number(j)].x = 24*j+offsetX()+16;
updateAttachedPositioning();
//END Update Positions
}
-void ECKeyPad::buttonStateChanged( const QString &id, bool state )
+void ECKeyPad::buttonStateChanged( const TQString &id, bool state )
{
if ( !id.startsWith("b_") )
return;
- QStringList tags = QStringList::split( '_', id );
+ TQStringList tags = TQStringList::split( '_', id );
const int i = tags[1].toInt();
const int j = tags[2].toInt();
m_switch[i][j]->setState( state ? Switch::Closed : Switch::Open );
diff --git a/src/electronics/components/eckeypad.h b/src/electronics/components/eckeypad.h
index 18a497c..c2794e5 100644
--- a/src/electronics/components/eckeypad.h
+++ b/src/electronics/components/eckeypad.h
@@ -26,13 +26,13 @@ class ECKeyPad : public Component
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual bool canFlip() const { return true; }
protected:
virtual void dataChanged();
void initPins( unsigned numCols);
- QString buttonID( int row, int col ) const;
+ TQString buttonID( int row, int col ) const;
int sideLength( unsigned numButtons ) const;
Switch *m_switch[4][11];
diff --git a/src/electronics/components/ecled.cpp b/src/electronics/components/ecled.cpp
index c865de6..f7c5cca 100644
--- a/src/electronics/components/ecled.cpp
+++ b/src/electronics/components/ecled.cpp
@@ -16,7 +16,7 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECLed::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECLed::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECLed::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/led"),
+ TQString::TQString("ec/led"),
i18n("LED"),
i18n("Outputs"),
"led.png",
@@ -58,7 +58,7 @@ ECLed::~ECLed()
void ECLed::dataChanged()
{
- QColor color = dataColor("0-color");
+ TQColor color = dataColor("0-color");
r = color.red();
g = color.green();
b = color.blue();
@@ -74,7 +74,7 @@ void ECLed::stepNonLogic()
lastUpdatePeriod += interval;
}
-void ECLed::drawShape( QPainter &p )
+void ECLed::drawShape( TQPainter &p )
{
int _x = int(x());
int _y = int(y());
@@ -93,12 +93,12 @@ void ECLed::drawShape( QPainter &p )
avg_brightness = 0.;
lastUpdatePeriod = 0.;
- p.setBrush( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) );
+ p.setBrush( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) );
- QPointArray pa(3);
- pa[0] = QPoint( 8, 0 );
- pa[1] = QPoint( -8, -8 );
- pa[2] = QPoint( -8, 8 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( 8, 0 );
+ pa[1] = TQPoint( -8, -8 );
+ pa[2] = TQPoint( -8, 8 );
pa.translate( _x, _y );
p.drawPolygon(pa);
p.drawPolyline(pa);
diff --git a/src/electronics/components/ecled.h b/src/electronics/components/ecled.h
index ce24598..0d0d3c5 100644
--- a/src/electronics/components/ecled.h
+++ b/src/electronics/components/ecled.h
@@ -36,7 +36,7 @@ public:
virtual bool doesStepNonLogic() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
double r, g, b;
diff --git a/src/electronics/components/ecopamp.cpp b/src/electronics/components/ecopamp.cpp
index dbb7457..04ed81f 100644
--- a/src/electronics/components/ecopamp.cpp
+++ b/src/electronics/components/ecopamp.cpp
@@ -14,7 +14,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECOpAmp::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -40,10 +40,10 @@ ECOpAmp::ECOpAmp( ICNDocument *icnDocument, bool newItem, const char *id )
m_name = i18n("Operational Amplifier");
m_desc = i18n("Ideal amplifier");
- QPointArray pa(3);
- pa[0] = QPoint( -16, -16 );
- pa[1] = QPoint( 16, 0 );
- pa[2] = QPoint( -16, 16 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( -16, -16 );
+ pa[1] = TQPoint( 16, 0 );
+ pa[2] = TQPoint( -16, 16 );
setItemPoints( pa, true );
init2PinLeft( -8, 8 );
@@ -57,17 +57,17 @@ ECOpAmp::~ECOpAmp()
}
-void ECOpAmp::drawShape( QPainter & p )
+void ECOpAmp::drawShape( TQPainter & p )
{
initPainter(p);
int _x = int(x());
int _y = int(y());
- QPointArray pa(3);
- pa[0] = QPoint( _x-16, _y-16 );
- pa[1] = QPoint( _x+16, _y );
- pa[2] = QPoint( _x-16, _y+16 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( _x-16, _y-16 );
+ pa[1] = TQPoint( _x+16, _y );
+ pa[2] = TQPoint( _x-16, _y+16 );
p.drawPolygon(pa);
p.drawPolyline(pa);
diff --git a/src/electronics/components/ecopamp.h b/src/electronics/components/ecopamp.h
index 6b6b147..ceb5010 100644
--- a/src/electronics/components/ecopamp.h
+++ b/src/electronics/components/ecopamp.h
@@ -29,7 +29,7 @@ class ECOpAmp : public Component
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
};
#endif
diff --git a/src/electronics/components/ecpotentiometer.cpp b/src/electronics/components/ecpotentiometer.cpp
index db0fedd..8f55ff5 100644
--- a/src/electronics/components/ecpotentiometer.cpp
+++ b/src/electronics/components/ecpotentiometer.cpp
@@ -15,8 +15,8 @@
#include "resistance.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
Item* ECPotentiometer::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -48,16 +48,16 @@ ECPotentiometer::ECPotentiometer( ICNDocument *icnDocument, bool newItem, const
m_r1 = createResistance( createPin( -8, -24, 90, "n1" ), m_p1, 1. );
m_r2 = createResistance( createPin( -8, 24, 270, "n2" ), m_p1, 1. );
- Slider * s = addSlider( "slider", 0, 100, 5, 50, Qt::Vertical, QRect( 0, -16, 16, 32 ) );
- m_pSlider = static_cast<QSlider*>(s->widget());
+ Slider * s = addSlider( "slider", 0, 100, 5, 50, Qt::Vertical, TQRect( 0, -16, 16, 32 ) );
+ m_pSlider = static_cast<TQSlider*>(s->widget());
createProperty( "resistance", Variant::Type::Double );
property("resistance")->setCaption( i18n("Resistance") );
- property("resistance")->setUnit( QChar(0x3a9) );
+ property("resistance")->setUnit( TQChar(0x3a9) );
property("resistance")->setMinValue(1e-6);
property("resistance")->setValue(1e5);
- addDisplayText( "res", QRect( -56, -8, 40, 16 ), "" );
+ addDisplayText( "res", TQRect( -56, -8, 40, 16 ), "" );
}
ECPotentiometer::~ECPotentiometer()
@@ -68,13 +68,13 @@ void ECPotentiometer::dataChanged()
{
m_resistance = dataDouble("resistance");
- QString display = QString::number( m_resistance / getMultiplier(m_resistance), 'g', 3 ) + getNumberMag(m_resistance) + QChar(0x3a9);
+ TQString display = TQString::number( m_resistance / getMultiplier(m_resistance), 'g', 3 ) + getNumberMag(m_resistance) + TQChar(0x3a9);
setDisplayText( "res", display );
sliderValueChanged( "slider", slider("slider")->value() );
}
-void ECPotentiometer::sliderValueChanged( const QString &id, int newValue )
+void ECPotentiometer::sliderValueChanged( const TQString &id, int newValue )
{
if ( id != "slider" )
return;
@@ -85,7 +85,7 @@ void ECPotentiometer::sliderValueChanged( const QString &id, int newValue )
m_r2->setResistance( m_resistance*(double)(100.-newValue)/100. );
}
-void ECPotentiometer::drawShape( QPainter &p )
+void ECPotentiometer::drawShape( TQPainter &p )
{
initPainter(p);
int _x = int(x());
@@ -93,17 +93,17 @@ void ECPotentiometer::drawShape( QPainter &p )
p.drawRect( _x-14, _y-16, 12, 32 );
- QPointArray pa(3);
- pa[0] = QPoint( 0, 0 );
- pa[1] = QPoint( 4, -3 );
- pa[2] = QPoint( 4, 3 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( 0, 0 );
+ pa[1] = TQPoint( 4, -3 );
+ pa[2] = TQPoint( 4, 3 );
- int space = m_pSlider->style().pixelMetric( QStyle::PM_SliderSpaceAvailable, m_pSlider );
+ int space = m_pSlider->tqstyle().tqpixelMetric( TQStyle::PM_SliderSpaceAvailable, m_pSlider );
int base_y = _y + (( angleDegrees() == 0 || angleDegrees() == 270 ) ? 1 : -1) * int( space * m_sliderProp );
pa.translate( _x+16, base_y );
- QColor c = m_p1->isSelected() ? m_selectedCol : black;
+ TQColor c = m_p1->isSelected() ? m_selectedCol : black;
p.setPen(c);
p.setBrush(c);
diff --git a/src/electronics/components/ecpotentiometer.h b/src/electronics/components/ecpotentiometer.h
index e7ca83b..0ecf362 100644
--- a/src/electronics/components/ecpotentiometer.h
+++ b/src/electronics/components/ecpotentiometer.h
@@ -13,7 +13,7 @@
#include "component.h"
-class QSlider;
+class TQSlider;
/**
@short Potentiometer
@@ -28,16 +28,16 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void sliderValueChanged( const QString &id, int newValue );
+ virtual void sliderValueChanged( const TQString &id, int newValue );
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
ECNode * m_p1;
Resistance *m_r1, *m_r2;
double m_resistance;
double m_sliderProp;
- QSlider * m_pSlider;
+ TQSlider * m_pSlider;
};
#endif
diff --git a/src/electronics/components/ecresistor.cpp b/src/electronics/components/ecresistor.cpp
index e4ee7a3..e03be7b 100644
--- a/src/electronics/components/ecresistor.cpp
+++ b/src/electronics/components/ecresistor.cpp
@@ -14,7 +14,7 @@
#include "resistance.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECResistor::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -45,11 +45,11 @@ ECResistor::ECResistor( ICNDocument *icnDocument, bool newItem, const char *id )
createProperty( "resistance", Variant::Type::Double );
property("resistance")->setCaption( i18n("Resistance") );
- property("resistance")->setUnit( QChar(0x3a9) );
+ property("resistance")->setUnit( TQChar(0x3a9) );
property("resistance")->setValue(1e4);
property("resistance")->setMinValue(1e-6);
- addDisplayText( "res", QRect( -16, -22, 32, 12 ), "", false );
+ addDisplayText( "res", TQRect( -16, -22, 32, 12 ), "", false );
}
ECResistor::~ECResistor()
@@ -60,13 +60,13 @@ void ECResistor::dataChanged()
{
double resistance = dataDouble("resistance");
- QString display = QString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + QChar(0x3a9);
+ TQString display = TQString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + TQChar(0x3a9);
setDisplayText( "res", display );
m_resistance->setResistance(resistance);
}
-void ECResistor::drawShape( QPainter &p )
+void ECResistor::drawShape( TQPainter &p )
{
initPainter(p);
p.drawRect( (int)x()-16, (int)y()-6, width(), 12 );
diff --git a/src/electronics/components/ecresistor.h b/src/electronics/components/ecresistor.h
index 17e799e..d9e756d 100644
--- a/src/electronics/components/ecresistor.h
+++ b/src/electronics/components/ecresistor.h
@@ -28,7 +28,7 @@ class ECResistor : public Component
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
Resistance * m_resistance;
};
diff --git a/src/electronics/components/ecsevensegment.cpp b/src/electronics/components/ecsevensegment.cpp
index ec35776..e68bf7c 100644
--- a/src/electronics/components/ecsevensegment.cpp
+++ b/src/electronics/components/ecsevensegment.cpp
@@ -17,8 +17,8 @@
#include "simulator.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqstring.h>
Item* ECSevenSegment::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -43,7 +43,7 @@ ECSevenSegment::ECSevenSegment( ICNDocument *icnDocument, bool newItem, const ch
m_desc = i18n("A seven segment display with a decimal point. This can be configured to either have a common cathode or a common anode.");
m_bDynamicContent = true;
- QStringList pins = QStringList::split( ',', "g,f,e,d,"+QString(QChar(0xB7))+",c,b,a" );
+ TQStringList pins = TQStringList::split( ',', "g,f,e,d,"+TQString(TQChar(0xB7))+",c,b,a" );
createProperty( "0-color", Variant::Type::Color );
property("0-color")->setCaption( i18n("Color") );
@@ -51,7 +51,7 @@ ECSevenSegment::ECSevenSegment( ICNDocument *icnDocument, bool newItem, const ch
createProperty( "diode-polarity", Variant::Type::Select );
property("diode-polarity")->setCaption( i18n("Configuration") );
- property("diode-polarity")->setAllowed( QStringList::split(',',"Common Cathode,Common Anode") );
+ property("diode-polarity")->setAllowed( TQStringList::split(',',"Common Cathode,Common Anode") );
property("diode-polarity")->setValue("Common Cathode");
for ( int i=0; i<8; i++ )
@@ -71,9 +71,9 @@ ECSevenSegment::ECSevenSegment( ICNDocument *icnDocument, bool newItem, const ch
m_nNode = createPin( width()/2+offsetX(), height()+8+offsetY(), 270, "-v" );
for ( int i=0; i<7; i++ )
- m_nodes[i] = ecNodeWithID( QChar('a'+i) );
+ m_nodes[i] = ecNodeWithID( TQChar('a'+i) );
- m_nodes[7] = ecNodeWithID(QChar(0xB7));
+ m_nodes[7] = ecNodeWithID(TQChar(0xB7));
m_bCommonCathode = false; // Force update
}
@@ -86,7 +86,7 @@ ECSevenSegment::~ECSevenSegment()
void ECSevenSegment::dataChanged()
{
- QColor color = dataColor("0-color");
+ TQColor color = dataColor("0-color");
r = color.red();
g = color.green();
b = color.blue();
@@ -129,7 +129,7 @@ void ECSevenSegment::stepNonLogic()
lastUpdatePeriod += interval;
}
-void ECSevenSegment::drawShape( QPainter &p )
+void ECSevenSegment::drawShape( TQPainter &p )
{
CNItem::drawShape(p);
@@ -145,9 +145,9 @@ void ECSevenSegment::drawShape( QPainter &p )
const int y3 = y1 + _height;
const int ds = 2; // "Slope"
-// QPen pen;
+// TQPen pen;
// pen.setWidth(2);
-// pen.setCapStyle(Qt::RoundCap);
+// pen.setCapStyle(TQt::RoundCap);
// p.setPen(pen);
if ( lastUpdatePeriod != 0. )
@@ -162,43 +162,43 @@ void ECSevenSegment::drawShape( QPainter &p )
// Top
_b = last_brightness[0];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+3+ds, y1+0, x2-3+ds, y1+0 );
// Top right
_b = last_brightness[1];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x2+0+ds, y1+3, x2+0, y2-3 );
// Bottom right
_b = last_brightness[2];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x2+0, y2+3, x2+0-ds, y3-3 );
// Bottom
_b = last_brightness[3];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x2-3-ds, y3+0, x1+3-ds, y3+0 );
// Bottom left
_b = last_brightness[4];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+0-ds, y3-3, x1+0, y2+3 );
// Top left
_b = last_brightness[5];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+0, y2-3, x1+0+ds, y1+3 );
// Middle
_b = last_brightness[6];
- p.setPen( QPen( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
+ p.setPen( TQPen( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ), 2 ) );
p.drawLine( x1+3, y2+0, x2-3, y2+0 );
// Decimal point
_b = last_brightness[7];
- p.setBrush( QBrush( QColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) ) );
- p.setPen( Qt::NoPen );
+ p.setBrush( TQBrush( TQColor( uint(255-(255-_b)*(1-r)), uint(255-(255-_b)*(1-g)), uint(255-(255-_b)*(1-b)) ) ) );
+ p.setPen( TQt::NoPen );
p.drawPie( x2+3, y3-2, 3, 3, 0, 16*360 );
lastUpdatePeriod = 0.;
diff --git a/src/electronics/components/ecsevensegment.h b/src/electronics/components/ecsevensegment.h
index 7041c9a..0ec9923 100644
--- a/src/electronics/components/ecsevensegment.h
+++ b/src/electronics/components/ecsevensegment.h
@@ -35,7 +35,7 @@ public:
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
bool m_bCommonCathode;
double lastUpdatePeriod;
diff --git a/src/electronics/components/ecsignallamp.cpp b/src/electronics/components/ecsignallamp.cpp
index c7034f7..0a25c39 100644
--- a/src/electronics/components/ecsignallamp.cpp
+++ b/src/electronics/components/ecsignallamp.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ECSignalLamp::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -26,7 +26,7 @@ Item* ECSignalLamp::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECSignalLamp::libraryItem()
{
return new LibraryItem(
- QString("ec/signal_lamp"),
+ TQString("ec/signal_lamp"),
i18n("Signal Lamp"),
i18n("Outputs"),
"signal_lamp.png",
@@ -58,10 +58,10 @@ ECSignalLamp::~ECSignalLamp()
void ECSignalLamp::stepNonLogic()
{
const double voltage = m_pPNode[0]->pin()->voltage()-m_pNNode[0]->pin()->voltage();
- avgPower = QABS(avgPower*advanceSinceUpdate + (voltage*voltage/100))/++advanceSinceUpdate;
+ avgPower = TQABS(avgPower*advanceSinceUpdate + (voltage*voltage/100))/++advanceSinceUpdate;
}
-void ECSignalLamp::drawShape( QPainter &p )
+void ECSignalLamp::drawShape( TQPainter &p )
{
initPainter(p);
@@ -73,7 +73,7 @@ void ECSignalLamp::drawShape( QPainter &p )
int brightness = (avgPower<0.025) ? 255 : ((avgPower>0.5) ? 0 : (int)(255*(1-((avgPower-0.025)/0.475))));
advanceSinceUpdate = 0;
- p.setBrush( QColor( 255, 255, brightness ) );
+ p.setBrush( TQColor( 255, 255, brightness ) );
p.drawEllipse( _x-8, _y-8, 16, 16 );
// 2*sqrt(2) = 2.828427125...
diff --git a/src/electronics/components/ecsignallamp.h b/src/electronics/components/ecsignallamp.h
index e56d724..fdc67c1 100644
--- a/src/electronics/components/ecsignallamp.h
+++ b/src/electronics/components/ecsignallamp.h
@@ -32,7 +32,7 @@ public:
virtual bool doesStepNonLogic() const { return true; }
private:
- void drawShape( QPainter &p );
+ void drawShape( TQPainter &p );
double avgPower;
uint advanceSinceUpdate;
};
diff --git a/src/electronics/components/ecsubcircuit.cpp b/src/electronics/components/ecsubcircuit.cpp
index a69e720..8ae898c 100644
--- a/src/electronics/components/ecsubcircuit.cpp
+++ b/src/electronics/components/ecsubcircuit.cpp
@@ -17,7 +17,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
Item* ECSubcircuit::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -27,10 +27,10 @@ Item* ECSubcircuit::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECSubcircuit::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/subcircuit"),
- QString::null,
- QString::null,
- QString::null,
+ TQString::TQString("ec/subcircuit"),
+ TQString(),
+ TQString(),
+ TQString(),
LibraryItem::lit_subcircuit,
ECSubcircuit::construct );
}
@@ -73,17 +73,17 @@ void ECSubcircuit::setNumExtCon( unsigned numExtCon )
p_icnDocument->flushDeleteList();
m_nodeMap.clear();
- QStringList pins;
+ TQStringList pins;
for ( unsigned i=0; i<numExtCon; ++i )
{
- pins += QString::number(i);
+ pins += TQString::number(i);
}
initDIPSymbol( pins, 80 );
// We don't want the text that the dip symbol gave us as we initialize it later...
for ( unsigned i = 0; i < numExtCon; ++i )
- removeDisplayText( QString::number(i) );
+ removeDisplayText( TQString::number(i) );
initDIP(pins);
}
@@ -100,7 +100,7 @@ void ECSubcircuit::dataChanged()
}
-void ECSubcircuit::setExtConName( unsigned numId, const QString & name )
+void ECSubcircuit::setExtConName( unsigned numId, const TQString & name )
{
if ( numId > m_conNames.size() )
return;
@@ -111,14 +111,14 @@ void ECSubcircuit::setExtConName( unsigned numId, const QString & name )
void ECSubcircuit::doneSCInit()
{
- QStringList pins;
+ TQStringList pins;
for ( unsigned i = 0; i < m_conNames.size(); ++i )
pins << m_conNames[i];
initDIPSymbol( pins, 80 );
}
-void ECSubcircuit::drawShape( QPainter &p )
+void ECSubcircuit::drawShape( TQPainter &p )
{
Component::drawShape(p);
}
diff --git a/src/electronics/components/ecsubcircuit.h b/src/electronics/components/ecsubcircuit.h
index eaf21ec..7bc9655 100644
--- a/src/electronics/components/ecsubcircuit.h
+++ b/src/electronics/components/ecsubcircuit.h
@@ -13,7 +13,7 @@
#include <component.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
/**
"Container" component for subcircuits
@@ -22,6 +22,7 @@
class ECSubcircuit : public Component
{
Q_OBJECT
+ TQ_OBJECT
public:
ECSubcircuit( ICNDocument *icnDocument, bool newItem, const char *id = 0L );
~ECSubcircuit();
@@ -37,7 +38,7 @@ public:
/**
* Give the connecting node at position numId the given name
*/
- void setExtConName( unsigned numId, const QString & name );
+ void setExtConName( unsigned numId, const TQString & name );
/**
* Called from SubcircuitData once the subcircuit has been fully attached
*/
@@ -54,8 +55,8 @@ signals:
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
- QValueVector<QString> m_conNames;
+ virtual void drawShape( TQPainter &p );
+ TQValueVector<TQString> m_conNames;
};
#endif
diff --git a/src/electronics/components/ecvoltagesignal.cpp b/src/electronics/components/ecvoltagesignal.cpp
index c338f36..1590766 100644
--- a/src/electronics/components/ecvoltagesignal.cpp
+++ b/src/electronics/components/ecvoltagesignal.cpp
@@ -16,7 +16,7 @@
#include "voltagesignal.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
const double conductance = 1e5; // Internal resistance
@@ -28,7 +28,7 @@ Item* ECVoltageSignal::construct( ItemDocument *itemDocument, bool newItem, cons
LibraryItem* ECVoltageSignal::libraryItem()
{
return new LibraryItem(
- QString("ec/voltage_signal"),
+ TQString("ec/voltage_signal"),
i18n("Voltage Signal"),
i18n("Sources"),
"voltagesignal.png",
@@ -64,8 +64,8 @@ ECVoltageSignal::ECVoltageSignal( ICNDocument *icnDocument, bool newItem, const
property("voltage")->setMaxValue(1e12);
property("voltage")->setValue(5.0);
- addDisplayText( "~", QRect( -8, -8, 16, 16 ), "~" );
- addDisplayText( "voltage", QRect( -16, -24, 32, 16 ), "" );
+ addDisplayText( "~", TQRect( -8, -8, 16, 16 ), "~" );
+ addDisplayText( "voltage", TQRect( -16, -24, 32, 16 ), "" );
}
@@ -78,7 +78,7 @@ void ECVoltageSignal::dataChanged()
const double voltage = dataDouble("voltage");
const double frequency = dataDouble("frequency");
- QString display = QString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
+ TQString display = TQString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
setDisplayText( "voltage", display );
m_voltageSignal->setStep( 1./LINEAR_UPDATE_RATE, ElementSignal::st_sinusoidal, frequency );
@@ -86,7 +86,7 @@ void ECVoltageSignal::dataChanged()
}
-void ECVoltageSignal::drawShape( QPainter &p )
+void ECVoltageSignal::drawShape( TQPainter &p )
{
initPainter(p);
p.drawEllipse( (int)x()-8, (int)y()-8, width(), height() );
diff --git a/src/electronics/components/ecvoltagesignal.h b/src/electronics/components/ecvoltagesignal.h
index 7102132..de23be9 100644
--- a/src/electronics/components/ecvoltagesignal.h
+++ b/src/electronics/components/ecvoltagesignal.h
@@ -27,7 +27,7 @@ public:
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void dataChanged();
VoltageSignal *m_voltageSignal;
diff --git a/src/electronics/components/ecvoltagesource.cpp b/src/electronics/components/ecvoltagesource.cpp
index 4b8c543..9090b3b 100644
--- a/src/electronics/components/ecvoltagesource.cpp
+++ b/src/electronics/components/ecvoltagesource.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
const double conductance = 1e5; // Internal resistance
@@ -27,7 +27,7 @@ Item* ECCell::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECCell::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/battery" << "ec/cell";
return new LibraryItem(
ids,
@@ -59,7 +59,7 @@ ECCell::ECCell( ICNDocument *icnDocument, bool newItem, const char *id )
property("voltage")->setMaxValue(1e12);
property("voltage")->setValue(5.0);
- addDisplayText( "voltage", QRect( -16, -24, 32, 16 ), "" );
+ addDisplayText( "voltage", TQRect( -16, -24, 32, 16 ), "" );
}
ECCell::~ECCell()
@@ -71,11 +71,11 @@ void ECCell::dataChanged()
voltage = dataDouble("voltage");
m_voltageSource->setVoltage(voltage);
- QString display = QString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
+ TQString display = TQString::number( voltage / getMultiplier(voltage), 'g', 3 ) + getNumberMag(voltage) + "V";
setDisplayText( "voltage", display );
}
-void ECCell::drawShape( QPainter &p )
+void ECCell::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/ecvoltagesource.h b/src/electronics/components/ecvoltagesource.h
index 4ba87ef..9b252e1 100644
--- a/src/electronics/components/ecvoltagesource.h
+++ b/src/electronics/components/ecvoltagesource.h
@@ -29,7 +29,7 @@ public:
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
VoltageSource *m_voltageSource;
double voltage;
};
diff --git a/src/electronics/components/externalconnection.cpp b/src/electronics/components/externalconnection.cpp
index 596727a..ca89240 100644
--- a/src/electronics/components/externalconnection.cpp
+++ b/src/electronics/components/externalconnection.cpp
@@ -12,7 +12,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ExternalConnection::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -43,7 +43,7 @@ ExternalConnection::ExternalConnection( ICNDocument *icnDocument, bool newItem,
init1PinLeft();
- addDisplayText( "name", QRect( -24, 8, 3*width(), 16 ), "ExtCon" );
+ addDisplayText( "name", TQRect( -24, 8, 3*width(), 16 ), "ExtCon" );
}
ExternalConnection::~ExternalConnection()
@@ -53,14 +53,14 @@ ExternalConnection::~ExternalConnection()
void ExternalConnection::dataChanged()
{
- QString name = dataString("name");
+ TQString name = dataString("name");
- QRect r( -width(), 16, 3*width(), 16 );
+ TQRect r( -width(), 16, 3*width(), 16 );
setDisplayText( "name", name );
}
-void ExternalConnection::drawShape( QPainter &p )
+void ExternalConnection::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()-8;
diff --git a/src/electronics/components/externalconnection.h b/src/electronics/components/externalconnection.h
index 9b733fc..914c774 100644
--- a/src/electronics/components/externalconnection.h
+++ b/src/electronics/components/externalconnection.h
@@ -29,7 +29,7 @@ public:
private:
void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
#endif
diff --git a/src/electronics/components/flipflop.cpp b/src/electronics/components/flipflop.cpp
index 5c55baf..69d983d 100644
--- a/src/electronics/components/flipflop.cpp
+++ b/src/electronics/components/flipflop.cpp
@@ -17,7 +17,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class ECDFlipFlop
@@ -57,17 +57,17 @@ ECDFlipFlop::ECDFlipFlop( ICNDocument *icnDocument, bool newItem, const char *id
m_pD = createLogicIn( m_pNNode[0] );
m_pClock = createLogicIn( m_pNNode[1] );
m_pQ = createLogicOut( m_pPNode[0], false );
- m_pQBar = createLogicOut( m_pPNode[1], false );
+ m_pTQBar = createLogicOut( m_pPNode[1], false );
setp = createLogicIn( createPin( 0, -32, 90, "set" ) );
rstp = createLogicIn( createPin( 0, 32, 270, "rst" ) );
- addDisplayText( "D", QRect( -32, -16, 20, 16 ), "D" );
- addDisplayText( ">", QRect( -32, 0, 20, 16 ), ">" );
- addDisplayText( "Q", QRect( 12, -16, 20, 16 ), "Q" );
- addDisplayText( "Q'", QRect( 12, 0, 20, 16 ), "Q'" );
- addDisplayText( "Set", QRect( -16, -20, 32, 16 ), "Set" );
- addDisplayText( "Rst", QRect( -16, 4, 32, 16 ), "Rst" );
+ addDisplayText( "D", TQRect( -32, -16, 20, 16 ), "D" );
+ addDisplayText( ">", TQRect( -32, 0, 20, 16 ), ">" );
+ addDisplayText( "Q", TQRect( 12, -16, 20, 16 ), "Q" );
+ addDisplayText( "Q'", TQRect( 12, 0, 20, 16 ), "Q'" );
+ addDisplayText( "Set", TQRect( -16, -20, 32, 16 ), "Set" );
+ addDisplayText( "Rst", TQRect( -16, 4, 32, 16 ), "Rst" );
m_pD->setCallback( this, (CallbackPtr)(&ECDFlipFlop::inputChanged) );
m_pClock->setCallback( this, (CallbackPtr)(&ECDFlipFlop::clockChanged) );
@@ -88,7 +88,7 @@ void ECDFlipFlop::asyncChanged(bool)
if(set || rst)
{
m_pQ->setHigh(set);
- m_pQBar->setHigh(rst);
+ m_pTQBar->setHigh(rst);
}
}
@@ -119,7 +119,7 @@ void ECDFlipFlop::clockChanged( bool newState )
bool d = ( simTime == m_prevDSimTime ) ? m_prevD[1-m_whichPrevD] : m_prevD[m_whichPrevD];
m_pQ->setHigh(d);
- m_pQBar->setHigh(!d);
+ m_pTQBar->setHigh(!d);
}
}
@@ -127,7 +127,7 @@ void ECDFlipFlop::inStateChanged(bool)
{
// Only called when the flipflop is created.
m_pQ->setHigh(false);
- m_pQBar->setHigh(true);
+ m_pTQBar->setHigh(true);
}
//END class ECDFlipFlop
@@ -141,7 +141,7 @@ Item* ECJKFlipFlop::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECJKFlipFlop::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/jk_flipflop"),
+ TQString::TQString("ec/jk_flipflop"),
i18n("JK Flip-Flop"),
i18n("Integrated Circuits"),
"ic3.png",
@@ -165,18 +165,18 @@ ECJKFlipFlop::ECJKFlipFlop( ICNDocument *icnDocument, bool newItem, const char *
m_pK = createLogicIn( m_pNNode[2] );
m_pQ = createLogicOut( m_pPNode[0], false );
- m_pQBar = createLogicOut( m_pPNode[1], false );
+ m_pTQBar = createLogicOut( m_pPNode[1], false );
setp = createLogicIn( createPin( 0, -40, 90, "set" ) );
rstp = createLogicIn( createPin( 0, 40, 270, "rst" ) );
- addDisplayText( "J", QRect( -32, -24, 20, 16 ), "J" );
- addDisplayText( ">", QRect( -32, -8, 20, 16 ), ">" );
- addDisplayText( "K", QRect( -32, 8, 20, 16 ), "K" );
- addDisplayText( "Q", QRect( 12, -24, 20, 16 ), "Q" );
- addDisplayText( "Q'", QRect( 12, 8, 20, 16 ), "Q'" );
- addDisplayText( "Set", QRect( -16, -28, 32, 16 ), "Set" );
- addDisplayText( "Rst", QRect( -16, 12, 32, 16 ), "Rst" );
+ addDisplayText( "J", TQRect( -32, -24, 20, 16 ), "J" );
+ addDisplayText( ">", TQRect( -32, -8, 20, 16 ), ">" );
+ addDisplayText( "K", TQRect( -32, 8, 20, 16 ), "K" );
+ addDisplayText( "Q", TQRect( 12, -24, 20, 16 ), "Q" );
+ addDisplayText( "Q'", TQRect( 12, 8, 20, 16 ), "Q'" );
+ addDisplayText( "Set", TQRect( -16, -28, 32, 16 ), "Set" );
+ addDisplayText( "Rst", TQRect( -16, 12, 32, 16 ), "Rst" );
m_pClock->setCallback( this, (CallbackPtr)(&ECJKFlipFlop::clockChanged) );
setp->setCallback( this, (CallbackPtr)(&ECJKFlipFlop::asyncChanged) );
@@ -202,12 +202,12 @@ void ECJKFlipFlop::clockChanged(bool newvalue)
if (!newvalue && (j || k)) {
if ( j && k ) {
m_pQ->setHigh(!prev_state);
- m_pQBar->setHigh(prev_state);
+ m_pTQBar->setHigh(prev_state);
prev_state = !prev_state;
} else {
// (J=1 && K=0) || (J=0 && K=1)
m_pQ->setHigh(j);
- m_pQBar->setHigh(k);
+ m_pTQBar->setHigh(k);
prev_state = j;
}
}
@@ -220,14 +220,14 @@ void ECJKFlipFlop::asyncChanged(bool)
if (set || rst) {
m_pQ->setHigh(set);
- m_pQBar->setHigh(rst);
+ m_pTQBar->setHigh(rst);
prev_state = set;
}
}
void ECJKFlipFlop::inStateChanged(bool)
{
- m_pQBar->setHigh(true);
+ m_pTQBar->setHigh(true);
m_pQ->setHigh(false);
prev_state = false;
}
@@ -243,7 +243,7 @@ Item* ECSRFlipFlop::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECSRFlipFlop::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/sr_flipflop"),
+ TQString::TQString("ec/sr_flipflop"),
i18n("SR Flip-Flop"),
i18n("Integrated Circuits"),
"ic3.png",
@@ -265,22 +265,22 @@ ECSRFlipFlop::ECSRFlipFlop( ICNDocument *icnDocument, bool newItem, const char *
m_pS = createLogicIn( m_pNNode[0] );
m_pR = createLogicIn( m_pNNode[1] );
m_pQ = createLogicOut( m_pPNode[0], true );
- m_pQBar = createLogicOut( m_pPNode[1], false );
+ m_pTQBar = createLogicOut( m_pPNode[1], false );
old_q1 = true;
old_q2 = false;
m_pQ->setHigh(old_q1);
- m_pQBar->setHigh(old_q2);
+ m_pTQBar->setHigh(old_q2);
- addDisplayText( "S", QRect( -24, -16, 20, 16 ), "S" );
- addDisplayText( "R", QRect( -24, 0, 20, 16 ), "R" );
- addDisplayText( "Q", QRect( 4, -16, 20, 16 ), "Q" );
- addDisplayText( "Q'", QRect( 4, 0, 20, 16 ), "Q'" );
+ addDisplayText( "S", TQRect( -24, -16, 20, 16 ), "S" );
+ addDisplayText( "R", TQRect( -24, 0, 20, 16 ), "R" );
+ addDisplayText( "Q", TQRect( 4, -16, 20, 16 ), "Q" );
+ addDisplayText( "Q'", TQRect( 4, 0, 20, 16 ), "Q'" );
m_pS->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
m_pR->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
m_pQ->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
- m_pQBar->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
+ m_pTQBar->setCallback( this, (CallbackPtr)(&ECSRFlipFlop::inStateChanged) );
}
ECSRFlipFlop::~ECSRFlipFlop()
@@ -296,7 +296,7 @@ void ECSRFlipFlop::inStateChanged(bool)
bool s = m_pS->isHigh();
bool r = m_pR->isHigh();
bool q1 = m_pQ->isHigh();
- bool q2 = m_pQBar->isHigh();
+ bool q2 = m_pTQBar->isHigh();
// Easy ones to do :-)
if (!q1) new_q2 = true;
@@ -342,6 +342,6 @@ void ECSRFlipFlop::inStateChanged(bool)
old_q2 = new_q2;
m_pQ->setHigh(new_q1);
- m_pQBar->setHigh(new_q2);
+ m_pTQBar->setHigh(new_q2);
}
//END class ECSRFlipFlop
diff --git a/src/electronics/components/flipflop.h b/src/electronics/components/flipflop.h
index 7b9d5b7..744be38 100644
--- a/src/electronics/components/flipflop.h
+++ b/src/electronics/components/flipflop.h
@@ -39,7 +39,7 @@ private:
LogicIn *m_pD;
LogicIn *m_pClock;
LogicOut *m_pQ;
- LogicOut *m_pQBar;
+ LogicOut *m_pTQBar;
LogicIn *setp;
LogicIn *rstp;
bool m_bPrevClock;
@@ -76,7 +76,7 @@ private:
LogicIn *setp;
LogicIn *rstp;
LogicOut *m_pQ;
- LogicOut *m_pQBar;
+ LogicOut *m_pTQBar;
};
@@ -99,7 +99,7 @@ protected:
LogicIn * m_pS;
LogicIn * m_pR;
LogicOut * m_pQ;
- LogicOut * m_pQBar;
+ LogicOut * m_pTQBar;
bool old_q1;
bool old_q2;
};
diff --git a/src/electronics/components/fulladder.cpp b/src/electronics/components/fulladder.cpp
index ad5e40c..3c71210 100644
--- a/src/electronics/components/fulladder.cpp
+++ b/src/electronics/components/fulladder.cpp
@@ -25,7 +25,7 @@ Item* FullAdder::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* FullAdder::libraryItem()
{
return new LibraryItem(
- QString("ec/adder"),
+ TQString("ec/adder"),
i18n("Adder"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -43,7 +43,7 @@ FullAdder::FullAdder( ICNDocument *icnDocument, bool newItem, const char *id )
ALogic = BLogic = inLogic = 0l;
outLogic = SLogic = 0l;
- QStringList pins = QStringList::split( ',', "A,B,>,,S,C", true );
+ TQStringList pins = TQStringList::split( ',', "A,B,>,,S,C", true );
initDIPSymbol( pins, 48 );
initDIP(pins);
diff --git a/src/electronics/components/inductor.cpp b/src/electronics/components/inductor.cpp
index 9e30b34..5949a3b 100644
--- a/src/electronics/components/inductor.cpp
+++ b/src/electronics/components/inductor.cpp
@@ -13,7 +13,7 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* Inductor::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -52,7 +52,7 @@ Inductor::Inductor( ICNDocument *icnDocument, bool newItem, const char *id )
property("Inductance")->setMaxValue(1e12);
property("Inductance")->setValue(1e-3);
- addDisplayText( "inductance", QRect( -8, -24, 16, 16 ), "", false );
+ addDisplayText( "inductance", TQRect( -8, -24, 16, 16 ), "", false );
}
Inductor::~Inductor()
@@ -63,13 +63,13 @@ void Inductor::dataChanged()
{
double inductance = dataDouble("Inductance");
- QString display = QString::number( inductance / getMultiplier(inductance), 'g', 3 ) + getNumberMag(inductance) + "H";
+ TQString display = TQString::number( inductance / getMultiplier(inductance), 'g', 3 ) + getNumberMag(inductance) + "H";
setDisplayText( "inductance", display );
m_pInductance->setInductance(inductance);
}
-void Inductor::drawShape( QPainter &p )
+void Inductor::drawShape( TQPainter &p )
{
initPainter(p);
int _y = int(y());
diff --git a/src/electronics/components/inductor.h b/src/electronics/components/inductor.h
index abb4eec..285c54c 100644
--- a/src/electronics/components/inductor.h
+++ b/src/electronics/components/inductor.h
@@ -27,7 +27,7 @@ class Inductor : public Component
private:
void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
Inductance * m_pInductance;
};
diff --git a/src/electronics/components/magnitudecomparator.cpp b/src/electronics/components/magnitudecomparator.cpp
index 2659122..3e1f8f9 100644
--- a/src/electronics/components/magnitudecomparator.cpp
+++ b/src/electronics/components/magnitudecomparator.cpp
@@ -23,7 +23,7 @@ Item* MagnitudeComparator::construct( ItemDocument *itemDocument, bool newItem,
LibraryItem* MagnitudeComparator::libraryItem()
{
return new LibraryItem(
- QString("ec/magnitudecomparator"),
+ TQString("ec/magnitudecomparator"),
i18n("Magnitude Comparator"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -114,29 +114,29 @@ void MagnitudeComparator::initPins()
if ( newABLogicCount == m_oldABLogicCount )
return;
- QStringList leftPins;
+ TQStringList leftPins;
int space = 3 - newABLogicCount;
for ( int i = 0; i < space; i++ )
leftPins << "";
for ( int i = 0; i < newABLogicCount; i++ )
- leftPins << QString("A%1").arg( QString::number(i) );
+ leftPins << TQString("A%1").tqarg( TQString::number(i) );
for ( int i = 0; i < newABLogicCount; i++ )
- leftPins << QString("B%1").arg( QString::number(i) );
+ leftPins << TQString("B%1").tqarg( TQString::number(i) );
for ( int i = 0; i < space; i++ )
leftPins << "";
- QStringList rightPins;
+ TQStringList rightPins;
space = -space;
for ( int i = 0; i < space; i++ )
rightPins << "";
- QString inNames[] = { "I: A>B", "I: A<B", "I: A=B" };
+ TQString inNames[] = { "I: A>B", "I: A<B", "I: A=B" };
rightPins << inNames[2] << inNames[1] << inNames[0];
- QString outNames[] = { "O: A>B", "O: A<B", "O: A=B" };
+ TQString outNames[] = { "O: A>B", "O: A<B", "O: A=B" };
rightPins << outNames[2] << outNames[1] << outNames[0];
for ( int i = 0; i < space; i++ )
rightPins << "";
- QStringList pins = leftPins + rightPins;
+ TQStringList pins = leftPins + rightPins;
initDIPSymbol( pins, 88 );
initDIP(pins);
@@ -166,7 +166,7 @@ void MagnitudeComparator::initPins()
m_aLogic.resize(newABLogicCount);
for ( int i=m_oldABLogicCount; i<newABLogicCount; ++i )
{
- node = ecNodeWithID("A"+QString::number(i));
+ node = ecNodeWithID("A"+TQString::number(i));
m_aLogic.insert( i, createLogicIn(node) );
m_aLogic[i]->setCallback( this, (CallbackPtr)(&MagnitudeComparator::inStateChanged) );
}
@@ -174,7 +174,7 @@ void MagnitudeComparator::initPins()
m_bLogic.resize(newABLogicCount);
for ( int i=m_oldABLogicCount; i<newABLogicCount; ++i )
{
- node = ecNodeWithID("B"+QString::number(i));
+ node = ecNodeWithID("B"+TQString::number(i));
m_bLogic.insert( i, createLogicIn(node) );
m_bLogic[i]->setCallback( this, (CallbackPtr)(&MagnitudeComparator::inStateChanged) );
}
@@ -183,7 +183,7 @@ void MagnitudeComparator::initPins()
{
for ( int i=newABLogicCount; i<m_oldABLogicCount; ++i )
{
- QString id = "A"+QString::number(i);
+ TQString id = "A"+TQString::number(i);
removeDisplayText(id);
removeElement( m_aLogic[i], false );
removeNode(id);
@@ -191,7 +191,7 @@ void MagnitudeComparator::initPins()
m_aLogic.resize(newABLogicCount);
for ( int i=newABLogicCount; i<m_oldABLogicCount; ++i )
{
- QString id = "B"+QString::number(i);
+ TQString id = "B"+TQString::number(i);
removeDisplayText(id);
removeElement( m_bLogic[i], false );
removeNode(id);
diff --git a/src/electronics/components/magnitudecomparator.h b/src/electronics/components/magnitudecomparator.h
index 57dc748..ef8cf12 100644
--- a/src/electronics/components/magnitudecomparator.h
+++ b/src/electronics/components/magnitudecomparator.h
@@ -13,8 +13,8 @@
#include "component.h"
#include "logic.h"
-#include <qbitarray.h>
-#include <qptrvector.h>
+#include <tqbitarray.h>
+#include <tqptrvector.h>
/**
@author Fredy Yanardi
@@ -39,12 +39,12 @@ class MagnitudeComparator : public CallbackClass, public Component
int outputs;
bool firstTime;
- QBitArray m_data;
+ TQBitArray m_data;
- QPtrVector<LogicIn> m_aLogic;
- QPtrVector<LogicIn> m_bLogic;
- QPtrVector<LogicIn> m_cLogic;
- QPtrVector<LogicOut> m_output;
+ TQPtrVector<LogicIn> m_aLogic;
+ TQPtrVector<LogicIn> m_bLogic;
+ TQPtrVector<LogicIn> m_cLogic;
+ TQPtrVector<LogicOut> m_output;
};
#endif
diff --git a/src/electronics/components/matrixdisplay.cpp b/src/electronics/components/matrixdisplay.cpp
index dd40b6a..c2a271d 100644
--- a/src/electronics/components/matrixdisplay.cpp
+++ b/src/electronics/components/matrixdisplay.cpp
@@ -18,8 +18,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqstring.h>
Item* MatrixDisplay::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -77,7 +77,7 @@ MatrixDisplay::MatrixDisplay( ICNDocument *icnDocument, bool newItem, const char
createProperty( "diode-configuration", Variant::Type::Select );
property("diode-configuration")->setCaption( i18n("Configuration") );
- property("diode-configuration")->setAllowed( QStringList::split(',',"Row Cathode,Column Cathode") );
+ property("diode-configuration")->setAllowed( TQStringList::split(',',"Row Cathode,Column Cathode") );
property("diode-configuration")->setValue("Row Cathode");
property("diode-configuration")->setAdvanced(true);
}
@@ -90,7 +90,7 @@ MatrixDisplay::~MatrixDisplay()
void MatrixDisplay::dataChanged()
{
- QColor color = dataColor("color");
+ TQColor color = dataColor("color");
m_r = double(color.red()) / double(0x100);
m_g = double(color.green()) / double(0x100);
m_b = double(color.blue()) / double(0x100);
@@ -221,13 +221,13 @@ void MatrixDisplay::initPins( unsigned numRows, unsigned numCols )
}
-QString MatrixDisplay::colPinID( int col ) const
+TQString MatrixDisplay::colPinID( int col ) const
{
- return QString("col_%1").arg(QString::number(col));
+ return TQString("col_%1").tqarg(TQString::number(col));
}
-QString MatrixDisplay::rowPinID( int row ) const
+TQString MatrixDisplay::rowPinID( int row ) const
{
- return QString("row_%1").arg(QString::number(row));
+ return TQString("row_%1").tqarg(TQString::number(row));
}
@@ -245,7 +245,7 @@ void MatrixDisplay::stepNonLogic()
}
-void MatrixDisplay::drawShape( QPainter &p )
+void MatrixDisplay::drawShape( TQPainter &p )
{
if ( isSelected() )
p.setPen(m_selectedCol);
@@ -269,9 +269,9 @@ void MatrixDisplay::drawShape( QPainter &p )
double _b = m_lastBrightness[i][j];
- QColor brush = QColor( uint(255-(255-_b)*(1-m_r)), uint(255-(255-_b)*(1-m_g)), uint(255-(255-_b)*(1-m_b)) );
+ TQColor brush = TQColor( uint(255-(255-_b)*(1-m_r)), uint(255-(255-_b)*(1-m_g)), uint(255-(255-_b)*(1-m_b)) );
p.setBrush(brush);
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawEllipse( _x+10+i*16, _y+10+j*16, 12, 12 );
}
}
diff --git a/src/electronics/components/matrixdisplay.h b/src/electronics/components/matrixdisplay.h
index 4851817..e36564a 100644
--- a/src/electronics/components/matrixdisplay.h
+++ b/src/electronics/components/matrixdisplay.h
@@ -12,7 +12,7 @@
#define MATRIXDISPLAY_H
#include <component.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
const unsigned max_md_width = 100;
const unsigned max_md_height = 20;
@@ -34,16 +34,16 @@ class MatrixDisplay : public Component
virtual bool doesStepNonLogic() const { return true; }
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
virtual void dataChanged();
void initPins( unsigned numRows, unsigned numCols );
- QString colPinID( int col ) const;
- QString rowPinID( int row ) const;
+ TQString colPinID( int col ) const;
+ TQString rowPinID( int row ) const;
- QValueVector< QValueVector<double> > m_avgBrightness;
- QValueVector< QValueVector<unsigned> > m_lastBrightness;
- QValueVector< QValueVector<Diode*> > m_pDiodes;
+ TQValueVector< TQValueVector<double> > m_avgBrightness;
+ TQValueVector< TQValueVector<unsigned> > m_lastBrightness;
+ TQValueVector< TQValueVector<Diode*> > m_pDiodes;
ECNode * m_pRowNodes[max_md_height];
ECNode * m_pColNodes[max_md_width];
diff --git a/src/electronics/components/matrixdisplaydriver.cpp b/src/electronics/components/matrixdisplaydriver.cpp
index da00bb7..a25bb7a 100644
--- a/src/electronics/components/matrixdisplaydriver.cpp
+++ b/src/electronics/components/matrixdisplaydriver.cpp
@@ -13,8 +13,8 @@
#include "matrixdisplaydriver.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqpainter.h>
+#include <tqstring.h>
#include <assert.h>
@@ -319,22 +319,22 @@ MatrixDisplayDriver::MatrixDisplayDriver( ICNDocument *icnDocument, bool newItem
createProperty( "diode-configuration", Variant::Type::Select );
property("diode-configuration")->setCaption( i18n("Configuration") );
- property("diode-configuration")->setAllowed( QStringList::split(',',"Row Cathode,Column Cathode") );
+ property("diode-configuration")->setAllowed( TQStringList::split(',',"Row Cathode,Column Cathode") );
property("diode-configuration")->setValue("Row Cathode");
property("diode-configuration")->setAdvanced(true);
- QStringList pins = QStringList::split( ',', "D0,D1,D2,D3,D4,D5,D6,D7,,,,,,C4,C3,C2,C1,C0,,R0,R1,R2,R3,R4,R5,R6", true );
+ TQStringList pins = TQStringList::split( ',', "D0,D1,D2,D3,D4,D5,D6,D7,,,,,,C4,C3,C2,C1,C0,,R0,R1,R2,R3,R4,R5,R6", true );
initDIPSymbol( pins, 64 );
initDIP(pins);
m_pValueLogic.resize( 8, 0l );
for ( unsigned i = 0; i < 8; ++i )
- m_pValueLogic[i] = createLogicIn( ecNodeWithID("D"+QString::number(i)) );
+ m_pValueLogic[i] = createLogicIn( ecNodeWithID("D"+TQString::number(i)) );
m_pRowLogic.resize( 7, 0l );
for ( unsigned i = 0; i < 7; ++i )
{
- m_pRowLogic[i] = createLogicOut( ecNodeWithID("R"+QString::number(i)), false );
+ m_pRowLogic[i] = createLogicOut( ecNodeWithID("R"+TQString::number(i)), false );
m_pRowLogic[i]->setOutputLowConductance( 1.0 );
m_pRowLogic[i]->setOutputHighVoltage(5.0);
}
@@ -342,7 +342,7 @@ MatrixDisplayDriver::MatrixDisplayDriver( ICNDocument *icnDocument, bool newItem
m_pColLogic.resize( 5, 0l );
for ( unsigned i = 0; i < 5; ++i )
{
- m_pColLogic[i] = createLogicOut( ecNodeWithID("C"+QString::number(i)), false );
+ m_pColLogic[i] = createLogicOut( ecNodeWithID("C"+TQString::number(i)), false );
m_pColLogic[i]->setOutputHighVoltage(5.0);
}
}
diff --git a/src/electronics/components/matrixdisplaydriver.h b/src/electronics/components/matrixdisplaydriver.h
index e6b01cc..f6b3f91 100644
--- a/src/electronics/components/matrixdisplaydriver.h
+++ b/src/electronics/components/matrixdisplaydriver.h
@@ -30,9 +30,9 @@ class MatrixDisplayDriver : public Component
virtual bool doesStepNonLogic() const { return true; }
protected:
- QValueVector<LogicIn*> m_pValueLogic;
- QValueVector<LogicOut*> m_pRowLogic;
- QValueVector<LogicOut*> m_pColLogic;
+ TQValueVector<LogicIn*> m_pValueLogic;
+ TQValueVector<LogicOut*> m_pRowLogic;
+ TQValueVector<LogicOut*> m_pColLogic;
unsigned m_prevCol;
unsigned m_nextCol;
diff --git a/src/electronics/components/meter.cpp b/src/electronics/components/meter.cpp
index 4437794..fc021a6 100644
--- a/src/electronics/components/meter.cpp
+++ b/src/electronics/components/meter.cpp
@@ -20,7 +20,7 @@
#include <cmath>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class Meter
@@ -35,7 +35,7 @@ Meter::Meter( ICNDocument *icnDocument, bool newItem, const char *id )
b_firstRun = true;
setSize( -16, -16, 32, 32 );
- p_displayText = addDisplayText( "meter", QRect( -16, 16, 32, 16 ), displayText() );
+ p_displayText = addDisplayText( "meter", TQRect( -16, 16, 32, 16 ), displayText() );
createProperty( "0-minValue", Variant::Type::Double );
property("0-minValue")->setCaption( i18n("Minimum Value") );
@@ -93,12 +93,12 @@ void Meter::stepNonLogic()
}
}
-void Meter::drawShape( QPainter &p )
+void Meter::drawShape( TQPainter &p )
{
initPainter(p);
p.drawEllipse( (int)x()-16, (int)y()-16, width(), width() );
- p.setPen(QPen(Qt::black,2));
- p.setBrush(Qt::black);
+ p.setPen(TQPen(TQt::black,2));
+ p.setBrush(TQt::black);
// The proportion between 0.1mV and 10KV, on a logarithmic scale
double prop;
@@ -118,17 +118,17 @@ void Meter::drawShape( QPainter &p )
int cy = int(y()-16+(height()/2));
p.drawLine( int(cx-sin_prop), int(cy-cos_prop), int(cx+sin_prop), int(cy+cos_prop) );
- QPointArray pa(3);
- pa[0] = QPoint( int(cx-sin_prop), int(cy-cos_prop) ); // Arrow head
- pa[1] = QPoint( int(cx-sin_prop + 8*std::sin(1.571*(-0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(-0.3+prop))) );
- pa[2] = QPoint( int(cx-sin_prop + 8*std::sin(1.571*(0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(0.3+prop))) );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( int(cx-sin_prop), int(cy-cos_prop) ); // Arrow head
+ pa[1] = TQPoint( int(cx-sin_prop + 8*std::sin(1.571*(-0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(-0.3+prop))) );
+ pa[2] = TQPoint( int(cx-sin_prop + 8*std::sin(1.571*(0.3+prop))), int(cy-cos_prop + 8*std::cos(1.571*(0.3+prop))) );
p.drawPolygon(pa);
deinitPainter(p);
}
-QString Meter::displayText()
+TQString Meter::displayText()
{
double value = m_avgValue/m_timeSinceUpdate;
if ( !std::isfinite(value) ) value = m_old_value;
@@ -137,7 +137,7 @@ QString Meter::displayText()
m_avgValue = 0.;
m_timeSinceUpdate = 0.;
b_timerStarted = false;
- return QString::number( value/CNItem::getMultiplier(value), 'g', 3 ) + CNItem::getNumberMag(value) + m_unit;
+ return TQString::number( value/CNItem::getMultiplier(value), 'g', 3 ) + CNItem::getNumberMag(value) + m_unit;
}
//END class Meter
@@ -151,7 +151,7 @@ Item* FrequencyMeter::construct( ItemDocument *itemDocument, bool newItem, const
LibraryItem* FrequencyMeter::libraryItem()
{
return new LibraryItem(
- QString("ec/frequencymeter"),
+ TQString("ec/frequencymeter"),
i18n("Frequency Meter (TODO)"),
i18n("Outputs"),
"frequencymeter.png",
@@ -188,7 +188,7 @@ Item* ECAmmeter::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ECAmmeter::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/ammeter" << "ec/ammmeter";
return new LibraryItem(
ids,
@@ -234,7 +234,7 @@ Item* ECVoltMeter::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECVoltMeter::libraryItem()
{
return new LibraryItem(
- QString("ec/voltmeter"),
+ TQString("ec/voltmeter"),
i18n("Voltmeter"),
i18n("Outputs"),
"voltmeter.png",
diff --git a/src/electronics/components/meter.h b/src/electronics/components/meter.h
index fa52e95..8a70cdc 100644
--- a/src/electronics/components/meter.h
+++ b/src/electronics/components/meter.h
@@ -24,10 +24,10 @@ public:
virtual void stepNonLogic();
virtual bool doesStepNonLogic() const { return true; }
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
protected:
- QString displayText();
+ TQString displayText();
virtual void dataChanged();
/**
* Return the value / current, or whatever the meter is measuring
@@ -42,7 +42,7 @@ protected:
double m_minValue;
double m_maxValue;
Text *p_displayText;
- QString m_unit;
+ TQString m_unit;
};
/**
diff --git a/src/electronics/components/multiinputgate.cpp b/src/electronics/components/multiinputgate.cpp
index 7453845..6b76bde 100644
--- a/src/electronics/components/multiinputgate.cpp
+++ b/src/electronics/components/multiinputgate.cpp
@@ -16,7 +16,7 @@
#include <cmath>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class MultiInputGate
MultiInputGate::MultiInputGate( ICNDocument *icnDocument, bool newItem, const char *id, int baseWidth )
@@ -58,7 +58,7 @@ MultiInputGate::~MultiInputGate()
void MultiInputGate::dataChanged()
{
- updateInputs( QMIN( maxGateInput, dataInt("numInput") ) );
+ updateInputs( TQMIN( maxGateInput, dataInt("numInput") ) );
}
@@ -84,7 +84,7 @@ void MultiInputGate::updateInputs( int newNum )
{
for ( int i = m_numInputs; i<newNum; ++i )
{
- ECNode *node = createPin( 0, 0, 0, "in"+QString::number(i) );
+ ECNode *node = createPin( 0, 0, 0, "in"+TQString::number(i) );
inNode[i] = node;
inLogic[i] = createLogicIn(node);
inLogic[i]->setCallback( this, (CallbackPtr)(&MultiInputGate::inStateChanged) );
@@ -94,7 +94,7 @@ void MultiInputGate::updateInputs( int newNum )
{
for ( int i=newNum; i<m_numInputs; ++i )
{
- removeNode("in"+QString::number(i));
+ removeNode("in"+TQString::number(i));
removeElement( inLogic[i], false );
inNode[i] = 0l;
inLogic[i] = 0l;
@@ -114,7 +114,7 @@ void MultiInputGate::updateInputs( int newNum )
void MultiInputGate::updateAttachedPositioning()
{
// Check that our ndoes have been created before we attempt to use them
- if ( !m_nodeMap.contains("p1") || !m_nodeMap.contains("in"+QString::number(m_numInputs-1)) )
+ if ( !m_nodeMap.tqcontains("p1") || !m_nodeMap.tqcontains("in"+TQString::number(m_numInputs-1)) )
return;
int _x = offsetX()+8;
@@ -125,8 +125,8 @@ void MultiInputGate::updateAttachedPositioning()
for ( int i=0; i< m_numInputs; ++i )
{
- m_nodeMap["in"+QString::number(i)].x = _x - 16;
- m_nodeMap["in"+QString::number(i)].y = _y + 16*i;
+ m_nodeMap["in"+TQString::number(i)].x = _x - 16;
+ m_nodeMap["in"+TQString::number(i)].y = _y + 16*i;
}
if (b_doneInit)
@@ -144,7 +144,7 @@ Item* ECXnor::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECXnor::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/xnor"),
+ TQString::TQString("ec/xnor"),
i18n("XNOR gate"),
i18n("Logic"),
"xnor.png",
@@ -177,14 +177,14 @@ void ECXnor::inStateChanged(bool)
m_pOut->setHigh( highCount != 1 );
}
-void ECXnor::drawShape( QPainter &p )
+void ECXnor::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawChord( _x-width()+22, _y, 2*width()-28, height(), -16*81, 16*162 );
p.restore();
@@ -197,7 +197,7 @@ void ECXnor::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -216,7 +216,7 @@ Item* ECXor::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECXor::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/xor"),
+ TQString::TQString("ec/xor"),
i18n("XOR gate"),
i18n("Logic"),
"xor.png",
@@ -249,14 +249,14 @@ void ECXor::inStateChanged(bool)
m_pOut->setHigh( highCount == 1 );
}
-void ECXor::drawShape( QPainter &p )
+void ECXor::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawChord( _x-width()+16, _y, 2*width()-16, height(), -16*81, 16*162 );
p.restore();
@@ -267,7 +267,7 @@ void ECXor::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -286,7 +286,7 @@ Item* ECOr::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECOr::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/or"),
+ TQString::TQString("ec/or"),
i18n("OR gate"),
i18n("Logic"),
"or.png",
@@ -319,15 +319,15 @@ void ECOr::inStateChanged(bool)
m_pOut->setHigh(!allLow);
}
-void ECOr::drawShape( QPainter &p )
+void ECOr::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
-// p.setBrush( Qt::red );
+ p.setPen( TQt::NoPen );
+// p.setBrush( TQt::red );
p.drawChord( _x-width(), _y, 2*width(), height(), -16*81, 16*162 );
// p.drawPie( _x-width()+16, _y, 2*width()-16, height(), -16*100, 16*200 );
p.restore();
@@ -338,7 +338,7 @@ void ECOr::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -357,7 +357,7 @@ Item* ECNor::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECNor::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/nor"),
+ TQString::TQString("ec/nor"),
i18n("NOR gate"),
i18n("Logic"),
"nor.png",
@@ -390,14 +390,14 @@ void ECNor::inStateChanged(bool)
m_pOut->setHigh(allLow);
}
-void ECNor::drawShape( QPainter &p )
+void ECNor::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
int _y = (int)y()+offsetY();
p.save();
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
p.drawChord( _x-width()+6, _y, 2*width()-12, height(), -16*81, 16*162 );
p.restore();
@@ -409,7 +409,7 @@ void ECNor::drawShape( QPainter &p )
const int n = m_numInputs;
for ( int i=0; i<n; ++i )
{
- p.setPen( inNode[i]->isSelected() ? m_selectedCol : Qt::black );
+ p.setPen( inNode[i]->isSelected() ? m_selectedCol : TQt::black );
int pin_x = (int)std::sqrt((double)(64*n*n - (8*n-8-16*i)*(8*n-8-16*i)))/n;
p.drawLine( _x, _y+16*i+8, _x+pin_x, _y+16*i+8 );
}
@@ -428,7 +428,7 @@ Item* ECNand::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECNand::libraryItem()
{
return new LibraryItem(
- QString::QString("ec/nand"),
+ TQString::TQString("ec/nand"),
i18n("NAND gate"),
i18n("Logic"),
"nand.png",
@@ -461,7 +461,7 @@ void ECNand::inStateChanged(bool)
m_pOut->setHigh(!allHigh);
}
-void ECNand::drawShape( QPainter &p )
+void ECNand::drawShape( TQPainter &p )
{
initPainter(p);
int _x = (int)x()+offsetX();
@@ -481,7 +481,7 @@ Item* ECAnd::construct( ItemDocument *itemDocument, bool newItem, const char *id
LibraryItem* ECAnd::libraryItem()
{
- QStringList idList;
+ TQStringList idList;
idList << "ec/and" << "ec/and_2";
return new LibraryItem(
idList,
@@ -517,7 +517,7 @@ void ECAnd::inStateChanged(bool)
m_pOut->setHigh(allHigh);
}
-void ECAnd::drawShape( QPainter &p )
+void ECAnd::drawShape( TQPainter &p )
{
initPainter(p);
diff --git a/src/electronics/components/multiinputgate.h b/src/electronics/components/multiinputgate.h
index 1981217..4ebc9cc 100644
--- a/src/electronics/components/multiinputgate.h
+++ b/src/electronics/components/multiinputgate.h
@@ -60,7 +60,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
@@ -79,7 +79,7 @@ public:
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
@@ -98,7 +98,7 @@ public:
protected:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
/**
@@ -116,7 +116,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
/**
@@ -134,7 +134,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
/**
@@ -152,7 +152,7 @@ public:
private:
void inStateChanged( bool newState );
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
};
diff --git a/src/electronics/components/multiplexer.cpp b/src/electronics/components/multiplexer.cpp
index e421fee..a8770e4 100644
--- a/src/electronics/components/multiplexer.cpp
+++ b/src/electronics/components/multiplexer.cpp
@@ -26,7 +26,7 @@ Item* Multiplexer::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* Multiplexer::libraryItem()
{
return new LibraryItem(
- QString("ec/multiplexer"),
+ TQString("ec/multiplexer"),
i18n("Multiplexer"),
i18n("Integrated Circuits"),
"ic1.png",
@@ -109,14 +109,14 @@ void Multiplexer::initPins( unsigned newAddressSize )
if ( newXLogicCount == oldXLogicCount )
return;
- QStringList pins;
+ TQStringList pins;
const int length = newAddressSize + newXLogicCount;
for ( unsigned i=0; i<newAddressSize; ++i )
- pins += "A"+QString::number(i);
+ pins += "A"+TQString::number(i);
for ( unsigned i=0; i<newXLogicCount; ++i )
- pins += "X"+QString::number(i);
+ pins += "X"+TQString::number(i);
for ( int i=0; i<(length-(length%2))/2; ++i )
pins += "";
pins += "X";
@@ -139,7 +139,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
m_xLogic.resize(newXLogicCount);
for ( unsigned i=oldXLogicCount; i<newXLogicCount; ++i )
{
- node = ecNodeWithID("X"+QString::number(i));
+ node = ecNodeWithID("X"+TQString::number(i));
m_xLogic.insert( i, createLogicIn(node) );
m_xLogic[i]->setCallback( this, (CallbackPtr)(&Multiplexer::inStateChanged) );
}
@@ -147,7 +147,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
m_aLogic.resize(newAddressSize);
for ( unsigned i=oldAddressSize; i<newAddressSize; ++i )
{
- node = ecNodeWithID("A"+QString::number(i));
+ node = ecNodeWithID("A"+TQString::number(i));
m_aLogic.insert( i, createLogicIn(node) );
m_aLogic[i]->setCallback( this, (CallbackPtr)(&Multiplexer::inStateChanged) );
}
@@ -156,7 +156,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
{
for ( unsigned i = newXLogicCount; i < oldXLogicCount; ++i )
{
- QString id = "X"+QString::number(i);
+ TQString id = "X"+TQString::number(i);
removeDisplayText(id);
removeElement( m_xLogic[i], false );
removeNode(id);
@@ -165,7 +165,7 @@ void Multiplexer::initPins( unsigned newAddressSize )
for ( unsigned i = newAddressSize; i < oldAddressSize; ++i )
{
- QString id = "A"+QString::number(i);
+ TQString id = "A"+TQString::number(i);
removeDisplayText(id);
removeElement( m_aLogic[i], false );
removeNode(id);
diff --git a/src/electronics/components/multiplexer.h b/src/electronics/components/multiplexer.h
index 42bcfc1..8e86bab 100644
--- a/src/electronics/components/multiplexer.h
+++ b/src/electronics/components/multiplexer.h
@@ -14,7 +14,7 @@
#include "component.h"
#include "logic.h"
-#include <qptrvector.h>
+#include <tqptrvector.h>
/**
@author David Saxton
@@ -38,8 +38,8 @@ protected:
void inStateChanged( bool newState );
- QPtrVector<LogicIn> m_aLogic;
- QPtrVector<LogicIn> m_xLogic;
+ TQPtrVector<LogicIn> m_aLogic;
+ TQPtrVector<LogicIn> m_xLogic;
LogicOut * m_output;
};
diff --git a/src/electronics/components/parallelportcomponent.cpp b/src/electronics/components/parallelportcomponent.cpp
index 9bc17b4..577253f 100644
--- a/src/electronics/components/parallelportcomponent.cpp
+++ b/src/electronics/components/parallelportcomponent.cpp
@@ -19,7 +19,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
#include <termios.h>
@@ -51,7 +51,7 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
"<ul>"
"<li><b>D<i>[0..7]</i></b></li>"
"</ul><br>"
- "<b>Status Pins</b><br><br>"
+ "<b>tqStatus Pins</b><br><br>"
"The status pins are read-only. They area:"
"<ul>"
"<li><b>ERR</b> - Error</li>"
@@ -70,11 +70,11 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
"The remaining pins are all ground."
);
- QPointArray pa( 4 );
- pa[0] = QPoint( -32, -112 );
- pa[1] = QPoint( 32, -104 );
- pa[2] = QPoint( 32, 104 );
- pa[3] = QPoint( -32, 112 );
+ TQPointArray pa( 4 );
+ pa[0] = TQPoint( -32, -112 );
+ pa[1] = TQPoint( 32, -104 );
+ pa[2] = TQPoint( 32, 104 );
+ pa[3] = TQPoint( -32, 112 );
setItemPoints( pa );
m_pParallelPort = new ParallelPort();
@@ -87,11 +87,11 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
//BEGIN Data register
for ( int i = 0; i < 8; ++i )
{
- QString id = QString("D%1").arg(i);
- QString name = id;
+ TQString id = TQString("D%1").tqarg(i);
+ TQString name = id;
pin = createPin( -40, -80 + 16*i, 0, id );
- addDisplayText( id, QRect( -28, -88 + 16*i, 28, 16 ), name, true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( -28, -88 + 16*i, 28, 16 ), name, true, TQt::AlignLeft | TQt::AlignVCenter );
m_pLogic[i] = createLogicOut( pin, false );
m_pLogic[i]->setCallback( this, (CallbackPtr)(&ParallelPortComponent::dataCallback) );
@@ -99,62 +99,62 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
//END Data register
- //BEGIN Status register
- QString statusNames[] = { "ERR", "ON", "PE", "ACK", "BUSY" };
+ //BEGIN tqStatus register
+ TQString statusNames[] = { "ERR", "ON", "PE", "ACK", "BUSY" };
// The statusIDs are referenced in the save file and must not change
- QString statusIDs[] = { "ERROR", "ONLINE", "PE", "ACK", "BUSY" };
+ TQString statusIDs[] = { "ERROR", "ONLINE", "PE", "ACK", "BUSY" };
- // Bits 0...2 in the Status register are not used
+ // Bits 0...2 in the tqStatus register are not used
for ( int i = 3; i < 8; ++i )
{
- QString id = statusIDs[i-3];
- QString name = statusNames[i-3];
+ TQString id = statusIDs[i-3];
+ TQString name = statusNames[i-3];
// Bit 3 (pin 15) doesn't not follow the same positioning pattern as
- // the other pins in the Status register.
+ // the other pins in the tqStatus register.
if ( i == 3 )
{
pin = createPin( 40, -72, 180, id );
- addDisplayText( id, QRect( 0, -80, 28, 16 ), name, true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( 0, -80, 28, 16 ), name, true, TQt::AlignRight | TQt::AlignVCenter );
}
else
{
pin = createPin( -40, -16 + 16*i, 0, id );
- addDisplayText( id, QRect( -28, -24 + 16*i, 28, 16 ), name, true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( -28, -24 + 16*i, 28, 16 ), name, true, TQt::AlignLeft | TQt::AlignVCenter );
}
m_pLogic[i+8] = createLogicOut( pin, false );
}
- //END Status register
+ //END tqStatus register
//BEGIN Control register
- QString controlNames[] = { "STR", "AUT", "INIT", "SEL" };
+ TQString controlNames[] = { "STR", "AUT", "INIT", "SEL" };
// The controlIDs are referenced in the save file and must not change
- QString controlIDs[] = { "STROBE", "AUTO", "INIT", "SELECT" };
+ TQString controlIDs[] = { "STROBE", "AUTO", "INIT", "SELECT" };
// Bits 4..7 are not used (well; bit 5 is, but not as a pin)
for ( int i = 0; i < 4; ++i )
{
- QString id = controlIDs[i];
- QString name = controlNames[i];
+ TQString id = controlIDs[i];
+ TQString name = controlNames[i];
if ( i == 0 )
{
pin = createPin( -40, -96, 0, id );
- addDisplayText( id, QRect( -28, -104, 28, 16 ), name, true, Qt::AlignLeft | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( -28, -104, 28, 16 ), name, true, TQt::AlignLeft | TQt::AlignVCenter );
}
else if ( i == 1 )
{
pin = createPin( 40, -88, 180, id );
- addDisplayText( id, QRect( 0, -96, 28, 16 ), name, true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( 0, -96, 28, 16 ), name, true, TQt::AlignRight | TQt::AlignVCenter );
}
else
{
pin = createPin( 40, -88 + i*16, 180, id );
- addDisplayText( id, QRect( 0, -96 + i*16, 28, 16 ), name, true, Qt::AlignRight | Qt::AlignVCenter );
+ addDisplayText( id, TQRect( 0, -96 + i*16, 28, 16 ), name, true, TQt::AlignRight | TQt::AlignVCenter );
}
m_pLogic[i+16] = createLogicOut( pin, false );
@@ -167,7 +167,7 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
// And make the rest of the pins ground
for ( int i = 0; i < 8; ++i )
{
- pin = createPin( 40, -24 + i*16, 180, QString("GND%1").arg( i ) );
+ pin = createPin( 40, -24 + i*16, 180, TQString("GND%1").tqarg( i ) );
pin->pin()->setGroundType( Pin::gt_always );
}
#endif
@@ -190,7 +190,7 @@ void ParallelPortComponent::dataChanged()
}
-void ParallelPortComponent::initPort( const QString & port )
+void ParallelPortComponent::initPort( const TQString & port )
{
if ( port.isEmpty() )
{
@@ -200,7 +200,7 @@ void ParallelPortComponent::initPort( const QString & port )
if ( ! m_pParallelPort->openPort( port ) )
{
- 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;
}
}
@@ -228,14 +228,14 @@ void ParallelPortComponent::controlCallback( bool )
void ParallelPortComponent::stepNonLogic()
{
- uchar status = m_pParallelPort->readFromRegister( ParallelPort::Status );
- // Bits 0...2 in the Status register are not used
+ uchar status = m_pParallelPort->readFromRegister( ParallelPort::tqStatus );
+ // Bits 0...2 in the tqStatus register are not used
for ( int i = 3; i < 8; ++i )
m_pLogic[i + 8]->setHigh( status | (1 << i) );
}
-void ParallelPortComponent::drawShape( QPainter & p )
+void ParallelPortComponent::drawShape( TQPainter & p )
{
drawPortShape( p );
}
diff --git a/src/electronics/components/parallelportcomponent.h b/src/electronics/components/parallelportcomponent.h
index 89ead80..eebc12b 100644
--- a/src/electronics/components/parallelportcomponent.h
+++ b/src/electronics/components/parallelportcomponent.h
@@ -33,14 +33,14 @@ class ParallelPortComponent : public CallbackClass, public Component
virtual bool doesStepNonLogic() const { return true; }
protected:
- void initPort( const QString & port );
+ void initPort( const TQString & port );
virtual void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
void dataCallback( bool );
void controlCallback( bool );
- /// Registers: { Data[0...7], Status[0...5], 0[6...7], Control[0...4], 0[5...7] }
+ /// Registers: { Data[0...7], tqStatus[0...5], 0[6...7], Control[0...4], 0[5...7] }
LogicOut * m_pLogic[24];
ParallelPort * m_pParallelPort;
diff --git a/src/electronics/components/piccomponent.cpp b/src/electronics/components/piccomponent.cpp
index 47320bb..5bfda22 100644
--- a/src/electronics/components/piccomponent.cpp
+++ b/src/electronics/components/piccomponent.cpp
@@ -29,13 +29,13 @@
#include <kiconloader.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
+#include <tqguardedptr.h>
+#include <tqstringlist.h>
#include "gpsim/ioports.h"
#include "gpsim/pic-processor.h"
-const QString _def_PICComponent_fileName = i18n("<Enter location of PIC Program>");
+const TQString _def_PICComponent_fileName = i18n("<Enter location of PIC Program>");
Item* PICComponent::construct( ItemDocument *itemDocument, bool newItem, const char *id )
@@ -46,7 +46,7 @@ Item* PICComponent::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* PICComponent::libraryItem()
{
- QStringList IDs;
+ TQStringList IDs;
IDs << "ec/pic" << "ec/picitem" << "ec/picitem_18pin";
return new LibraryItem(
@@ -82,20 +82,20 @@ PICComponent::PICComponent( ICNDocument *icnDocument, bool newItem, const char *
m_bLoadingProgram = false;
m_pGpsim = 0L;
- addButton( "run", QRect(), KGlobal::iconLoader()->loadIcon( "player_play", KIcon::Small ) );
- addButton( "pause", QRect(), KGlobal::iconLoader()->loadIcon( "player_pause", KIcon::Small ) );
- addButton( "reset", QRect(), KGlobal::iconLoader()->loadIcon( "stop", KIcon::Small ) );
- addButton( "reload", QRect(), KGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) );
+ addButton( "run", TQRect(), KGlobal::iconLoader()->loadIcon( "player_play", KIcon::Small ) );
+ addButton( "pause", TQRect(), KGlobal::iconLoader()->loadIcon( "player_pause", KIcon::Small ) );
+ addButton( "reset", TQRect(), KGlobal::iconLoader()->loadIcon( "stop", KIcon::Small ) );
+ addButton( "reload", TQRect(), KGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) );
if ( icnDocument->ktechlab() )
- connect( icnDocument->ktechlab(), SIGNAL(recentFileAdded(const KURL &)), this, SLOT(slotUpdateFileList()) );
+ connect( icnDocument->ktechlab(), TQT_SIGNAL(recentFileAdded(const KURL &)), this, TQT_SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(projectOpened()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(projectClosed()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(projectCreated()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(subprojectCreated()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(filesAdded()), this, SLOT(slotUpdateFileList()) );
- connect( ProjectManager::self(), SIGNAL(filesRemoved()), this, SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(projectCreated()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(subprojectCreated()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(filesAdded()), this, TQT_SLOT(slotUpdateFileList()) );
+ connect( ProjectManager::self(), TQT_SIGNAL(filesRemoved()), this, TQT_SLOT(slotUpdateFileList()) );
createProperty( "program", Variant::Type::FileName );
property("program")->setCaption( i18n("Program") );
@@ -146,7 +146,7 @@ void PICComponent::initPIC( bool forceReload )
initPackage( microInfo );
}
- QString newProgram = KURL( dataString("program") ).path();
+ TQString newProgram = KURL( dataString("program") ).path();
bool newFile = (m_picFile != newProgram);
if ( !newFile && !forceReload )
return;
@@ -159,15 +159,15 @@ void PICComponent::initPIC( bool forceReload )
case GpsimProcessor::DoesntExist:
if ( newProgram == _def_PICComponent_fileName && !newProgram.isEmpty() )
break;
- KMessageBox::sorry( 0l, i18n("The file \"%1\" does not exist.").arg( newProgram ) );
- m_picFile = QString::null;
+ KMessageBox::sorry( 0l, i18n("The file \"%1\" does not exist.").tqarg( newProgram ) );
+ m_picFile = TQString();
break;
case GpsimProcessor::IncorrectType:
if ( newProgram == _def_PICComponent_fileName && !newProgram.isEmpty() )
break;
- KMessageBox::sorry( 0L, i18n("\"%1\" is not a valid PIC program.\nThe file must exist, and the extension should be \".cod\", \".asm\", \".flowcode\", \".basic\", \".microbe\" or \".c\".\n\".hex\" is allowed, provided that there is a corresponding \".cod\" file.").arg(newProgram) );
- m_picFile = QString::null;
+ KMessageBox::sorry( 0L, i18n("\"%1\" is not a valid PIC program.\nThe file must exist, and the extension should be \".cod\", \".asm\", \".flowcode\", \".basic\", \".microbe\" or \".c\".\n\".hex\" is allowed, provided that there is a corresponding \".cod\" file.").tqarg(newProgram) );
+ m_picFile = TQString();
break;
case GpsimProcessor::Valid:
@@ -198,14 +198,14 @@ void PICComponent::initPackage( MicroInfo * microInfo )
m_bCreatedInitialPackage = true;
//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
@@ -226,7 +226,7 @@ void PICComponent::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() );
}
@@ -247,7 +247,7 @@ void PICComponent::initPackage( MicroInfo * microInfo )
removeDisplayText( "no_file" );
- addDisplayText( "picid", QRect(offsetX(), offsetY()-16, width(), 16), microInfo->id() );
+ addDisplayText( "picid", TQRect(offsetX(), offsetY()-16, width(), 16), microInfo->id() );
}
else
{
@@ -259,10 +259,10 @@ void PICComponent::initPackage( MicroInfo * microInfo )
//BEGIN Update button positions
int leftpos = (width()-88)/2+offsetX();
- button("run")->setOriginalRect( QRect( leftpos, height()+4+offsetY(), 20, 20 ) );
- button("pause")->setOriginalRect( QRect( leftpos+23, height()+4+offsetY(), 20, 20 ) );
- button("reset")->setOriginalRect( QRect( leftpos+46, height()+4+offsetY(), 20, 20 ) );
- button("reload")->setOriginalRect( QRect( leftpos+69, height()+4+offsetY(), 20, 20 ) );
+ button("run")->setOriginalRect( TQRect( leftpos, height()+4+offsetY(), 20, 20 ) );
+ button("pause")->setOriginalRect( TQRect( leftpos+23, height()+4+offsetY(), 20, 20 ) );
+ button("reset")->setOriginalRect( TQRect( leftpos+46, height()+4+offsetY(), 20, 20 ) );
+ button("reload")->setOriginalRect( TQRect( leftpos+69, height()+4+offsetY(), 20, 20 ) );
updateAttachedPositioning();
//END Update button positions
}
@@ -283,11 +283,11 @@ void PICComponent::attachPICComponentPins()
void PICComponent::slotUpdateFileList()
{
- QStringList preFileList;
+ TQStringList preFileList;
if ( p_icnDocument && p_icnDocument->ktechlab() )
preFileList += p_icnDocument->ktechlab()->recentFiles();
- QStringList fileList;
+ TQStringList fileList;
if ( ProjectInfo * info = ProjectManager::self()->currentProject() )
{
@@ -297,23 +297,23 @@ void PICComponent::slotUpdateFileList()
fileList << (*it).path();
}
- const QStringList::iterator end = preFileList.end();
- for ( QStringList::iterator it = preFileList.begin(); it != end; ++it )
+ const TQStringList::iterator end = preFileList.end();
+ for ( TQStringList::iterator it = preFileList.begin(); it != end; ++it )
{
- QString file = KURL(*it).path();
- if ( (file.endsWith(".flowcode") || file.endsWith(".asm") || file.endsWith(".cod") || file.endsWith(".basic") || file.endsWith(".microbe") ) && !fileList.contains(file) ) {
+ TQString file = KURL(*it).path();
+ if ( (file.endsWith(".flowcode") || file.endsWith(".asm") || file.endsWith(".cod") || file.endsWith(".basic") || file.endsWith(".microbe") ) && !fileList.tqcontains(file) ) {
fileList.append(file);
}
}
- QString fileName = dataString("program");
+ TQString fileName = dataString("program");
property("program")->setAllowed(fileList);
property("program")->setValue( fileName.isEmpty() ? _def_PICComponent_fileName : fileName );
}
-void PICComponent::buttonStateChanged( const QString &id, bool state )
+void PICComponent::buttonStateChanged( const TQString &id, bool state )
{
if (!state)
return;
@@ -359,12 +359,12 @@ bool PICComponent::mouseDoubleClickEvent ( const EventInfo &eventInfo )
}
-QString PICComponent::createSymbolFile()
+TQString PICComponent::createSymbolFile()
{
m_bLoadingProgram = true;
slotUpdateBtns();
- return GpsimProcessor::generateSymbolFile( dataString("program"), this, SLOT(slotCODCreationSucceeded()), SLOT(slotCODCreationFailed()) );
+ return GpsimProcessor::generateSymbolFile( dataString("program"), this, TQT_SLOT(slotCODCreationSucceeded()), TQT_SLOT(slotCODCreationFailed()) );
}
@@ -375,19 +375,19 @@ void PICComponent::slotCODCreationSucceeded()
delete m_pGpsim;
m_pGpsim = new GpsimProcessor(m_symbolFile);
- if ( m_pGpsim->codLoadStatus() == GpsimProcessor::CodSuccess )
+ if ( m_pGpsim->codLoadtqStatus() == GpsimProcessor::CodSuccess )
{
MicroInfo * microInfo = m_pGpsim->microInfo();
property("lastPackage")->setValue( microInfo->id() );
initPackage( microInfo );
- connect( m_pGpsim, SIGNAL(runningStatusChanged(bool )), this, SLOT(slotUpdateBtns()) );
+ connect( m_pGpsim, TQT_SIGNAL(runningStatusChanged(bool )), this, TQT_SLOT(slotUpdateBtns()) );
attachPICComponentPins();
}
else
{
- m_pGpsim->displayCodLoadStatus();
+ m_pGpsim->displayCodLoadtqStatus();
delete m_pGpsim;
m_pGpsim = 0l;
}
diff --git a/src/electronics/components/piccomponent.h b/src/electronics/components/piccomponent.h
index 165fbf6..d5e668d 100644
--- a/src/electronics/components/piccomponent.h
+++ b/src/electronics/components/piccomponent.h
@@ -16,8 +16,8 @@
#include "component.h"
-#include <qguardedptr.h>
-#include <qmap.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
class Document;
class ECNode;
@@ -32,7 +32,7 @@ class PICComponentPin;
class PicPin;
class TextDocument;
-typedef QMap< int, PICComponentPin * > PICComponentPinMap;
+typedef TQMap< int, PICComponentPin * > PICComponentPinMap;
/**
@short Electronic PIC device
@@ -41,6 +41,7 @@ typedef QMap< int, PICComponentPin * > PICComponentPinMap;
class PICComponent : public Component
{
Q_OBJECT
+ TQ_OBJECT
public:
PICComponent( ICNDocument * icnDocument, bool newItem, const char *id = 0L );
~PICComponent();
@@ -49,7 +50,7 @@ class PICComponent : public Component
static Item * construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem * libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual bool mouseDoubleClickEvent( const EventInfo &eventInfo );
void programReload();
@@ -78,16 +79,16 @@ class PICComponent : public Component
* Attempts to compile the program to a symbol file, and connects the assembly
* finish signal to loadGpsim
*/
- QString createSymbolFile();
+ TQString createSymbolFile();
virtual void dataChanged();
/**
* Initializes the PIC from the options the user has selected.
*/
void initPIC( bool forceReload );
- QGuardedPtr<GpsimProcessor> m_pGpsim;
- QString m_picFile; ///< The input program that the user selected
- QString m_symbolFile; ///< The symbol file that was generated from m_picFile
+ TQGuardedPtr<GpsimProcessor> m_pGpsim;
+ TQString m_picFile; ///< The input program that the user selected
+ TQString m_symbolFile; ///< The symbol file that was generated from m_picFile
bool m_bLoadingProgram; ///< True between createSymbolFile being called and the file being created
PICComponentPinMap m_picComponentPinMap;
bool m_bCreatedInitialPackage; ///< Set true once the initial package is loaded; until then, will load a package from the lastPackage data
diff --git a/src/electronics/components/piccomponentpin.h b/src/electronics/components/piccomponentpin.h
index 0fc433d..cd41db9 100644
--- a/src/electronics/components/piccomponentpin.h
+++ b/src/electronics/components/piccomponentpin.h
@@ -17,7 +17,7 @@
#include "logic.h"
#include "gpsim/stimuli.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
@short Controls a pin on the PIC component
@@ -61,7 +61,7 @@ class PICComponentPin : public CallbackClass, public stimulus
LogicIn * m_pLogicIn;
PICComponent * m_pPICComponent;
Stimulus_Node * m_pStimulusNode;
- const QString m_id;
+ const TQString m_id;
};
#endif
diff --git a/src/electronics/components/probe.cpp b/src/electronics/components/probe.cpp
index db6725e..1915d51 100644
--- a/src/electronics/components/probe.cpp
+++ b/src/electronics/components/probe.cpp
@@ -19,7 +19,7 @@
#include "voltagesource.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class Probe
Probe::Probe( ICNDocument *icnDocument, bool newItem, const char *id )
@@ -30,7 +30,7 @@ Probe::Probe( ICNDocument *icnDocument, bool newItem, const char *id )
createProperty( "color", Variant::Type::Color );
property("color")->setCaption( i18n("Color") );
- property("color")->setValue( Qt::black );
+ property("color")->setValue( TQt::black );
}
@@ -60,7 +60,7 @@ FloatingProbe::FloatingProbe( ICNDocument *icnDocument, bool newItem, const char
createProperty( "scaling", Variant::Type::Select );
property("scaling")->setCaption( i18n("Scaling") );
- property("scaling")->setAllowed( QStringList::split( ',', "Linear,Logarithmic") );
+ property("scaling")->setAllowed( TQStringList::split( ',', "Linear,Logarithmic") );
property("scaling")->setValue("Linear");
property("scaling")->setAdvanced( true );
@@ -99,7 +99,7 @@ void FloatingProbe::dataChanged()
}
-void FloatingProbe::drawShape( QPainter &p )
+void FloatingProbe::drawShape( TQPainter &p )
{
initPainter(p);
@@ -108,14 +108,14 @@ void FloatingProbe::drawShape( QPainter &p )
p.drawRect( _x, _y, 32, 16 );
- QPointArray bezier(4);
+ TQPointArray bezier(4);
- bezier[0] = QPoint( _x+4, _y+10 );
- bezier[1] = QPoint( _x+12, _y-6 );
- bezier[2] = QPoint( _x+20, _y+24 );
- bezier[3] = QPoint( _x+28, _y+4 );
+ bezier[0] = TQPoint( _x+4, _y+10 );
+ bezier[1] = TQPoint( _x+12, _y-6 );
+ bezier[2] = TQPoint( _x+20, _y+24 );
+ bezier[3] = TQPoint( _x+28, _y+4 );
- p.setPen( QPen( m_color, 2 ) );
+ p.setPen( TQPen( m_color, 2 ) );
p.drawCubicBezier(bezier);
deinitPainter(p);
@@ -220,7 +220,7 @@ Item* LogicProbe::construct( ItemDocument *itemDocument, bool newItem, const cha
LibraryItem* LogicProbe::libraryItem()
{
- QStringList ids;
+ TQStringList ids;
ids << "ec/probe" << "ec/logicprobe";
return new LibraryItem(
ids,
@@ -260,7 +260,7 @@ void LogicProbe::logicCallback( bool value )
}
-void LogicProbe::drawShape( QPainter &p )
+void LogicProbe::drawShape( TQPainter &p )
{
initPainter(p);
@@ -269,7 +269,7 @@ void LogicProbe::drawShape( QPainter &p )
p.drawRect( _x, _y, 32, 16 );
- p.setPen( QPen( m_color, 2 ) );
+ p.setPen( TQPen( m_color, 2 ) );
p.drawLine( _x+4, _y+11, _x+6, _y+11 );
p.drawLine( _x+6, _y+11, _x+6, _y+4 );
diff --git a/src/electronics/components/probe.h b/src/electronics/components/probe.h
index 9beb62e..ab5040f 100644
--- a/src/electronics/components/probe.h
+++ b/src/electronics/components/probe.h
@@ -30,7 +30,7 @@ class Probe : public Component
virtual void dataChanged();
ProbeData * p_probeData; // As obtained via registering with the oscilloscope
- QColor m_color;
+ TQColor m_color;
};
/**
@@ -46,7 +46,7 @@ class FloatingProbe : public Probe
protected:
virtual void dataChanged();
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
FloatingProbeData * m_pFloatingProbeData;
};
@@ -103,7 +103,7 @@ class LogicProbe : public CallbackClass, public Probe
void logicCallback( bool value );
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
LogicProbeData * p_logicProbeData;
LogicIn * m_pIn;
diff --git a/src/electronics/components/pushswitch.cpp b/src/electronics/components/pushswitch.cpp
index b7b38b7..8257440 100644
--- a/src/electronics/components/pushswitch.cpp
+++ b/src/electronics/components/pushswitch.cpp
@@ -14,10 +14,10 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
//BEGIN class ECPTBSwitch
Item* ECPTBSwitch::construct( ItemDocument *itemDocument, bool newItem, const char *id )
@@ -28,7 +28,7 @@ Item* ECPTBSwitch::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECPTBSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/ptb_switch"),
+ TQString("ec/ptb_switch"),
i18n("Push-to-Break"),
i18n("Switches"),
"ptb.png",
@@ -42,7 +42,7 @@ ECPTBSwitch::ECPTBSwitch( ICNDocument *icnDocument, bool newItem, const char *id
m_name = i18n("Push to Break");
setSize( -16, -16, 32, 24 );
- addButton( "button", QRect( -16, 8, 32, 20 ), "" );
+ addButton( "button", TQRect( -16, 8, 32, 20 ), "" );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -80,7 +80,7 @@ void ECPTBSwitch::dataChanged()
}
-void ECPTBSwitch::drawShape( QPainter &p )
+void ECPTBSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -93,7 +93,7 @@ void ECPTBSwitch::drawShape( QPainter &p )
p.drawLine( _x+width()/4, _y+dy, _x+(3*width())/4, _y+dy ); // Top horizontal line
p.drawLine( _x, _y+(_height/2)-radius+dy, _x+width(), _y+(_height/2)-radius+dy ); // Bottom horizontal line
- p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); // Vertical line
+ p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); //Qt::Vertical line
p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle
p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle
@@ -101,7 +101,7 @@ void ECPTBSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECPTBSwitch::buttonStateChanged( const QString &id, bool state )
+void ECPTBSwitch::buttonStateChanged( const TQString &id, bool state )
{
if ( id != "button" )
return;
@@ -120,7 +120,7 @@ Item* ECPTMSwitch::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECPTMSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/ptm_switch"),
+ TQString("ec/ptm_switch"),
i18n("Push-to-Make"),
i18n("Switches"),
"ptm.png",
@@ -134,7 +134,7 @@ ECPTMSwitch::ECPTMSwitch( ICNDocument *icnDocument, bool newItem, const char *id
m_name = i18n("Push to Make");
setSize( -16, -16, 32, 24 );
- addButton( "button", QRect( -16, 8, 32, 20 ), "" );
+ addButton( "button", TQRect( -16, 8, 32, 20 ), "" );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -173,7 +173,7 @@ void ECPTMSwitch::dataChanged()
}
-void ECPTMSwitch::drawShape( QPainter &p )
+void ECPTMSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -186,7 +186,7 @@ void ECPTMSwitch::drawShape( QPainter &p )
p.drawLine( _x+width()/4, _y-dy, _x+(3*width())/4, _y-dy ); // Top horizontal line
p.drawLine( _x, _y+(_height/2)-radius-dy, _x+width(), _y+(_height/2)-radius-dy ); // Bottom horizontal line
- p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); // Vertical line
+ p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); //Qt::Vertical line
p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle
p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle
@@ -194,7 +194,7 @@ void ECPTMSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECPTMSwitch::buttonStateChanged( const QString &id, bool state )
+void ECPTMSwitch::buttonStateChanged( const TQString &id, bool state )
{
if ( id != "button" ) return;
m_switch->setState( state ? Switch::Closed : Switch::Open );
diff --git a/src/electronics/components/pushswitch.h b/src/electronics/components/pushswitch.h
index c22ea93..1854eb2 100644
--- a/src/electronics/components/pushswitch.h
+++ b/src/electronics/components/pushswitch.h
@@ -26,11 +26,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch;
bool pressed;
};
@@ -49,11 +49,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch;
bool pressed;
};
diff --git a/src/electronics/components/ram.cpp b/src/electronics/components/ram.cpp
index add745a..8c20736 100644
--- a/src/electronics/components/ram.cpp
+++ b/src/electronics/components/ram.cpp
@@ -24,7 +24,7 @@ Item* RAM::construct( ItemDocument *itemDocument, bool newItem, const char *id )
LibraryItem* RAM::libraryItem()
{
return new LibraryItem(
- QString("ec/ram"),
+ TQString("ec/ram"),
i18n("RAM"),
i18n("Integrated Circuits"),
"ic2.png",
@@ -37,7 +37,7 @@ RAM::RAM( ICNDocument *icnDocument, bool newItem, const char *id )
: Component( icnDocument, newItem, id ? id : "ram" )
{
m_name = i18n("RAM");
- m_desc = i18n("This RAM stores data as a collection of words; each of which contains <i>word size</i> bits of data.<br><br>To read data, set the CS (<i>chip select</i>) and the OE (<i>output enable</i>) pins high, and select the word using the address pins <i>A*</i>. The word is outputted on the data-out pins: <i>DO*</i>.<br><br>To write data, set the CS (<i>chip select</i>) and the WE (<i>write enable</i>) pins high, and select the address to write to with the <i>A*</i> pins. Write to the selected word using the data-in pins: <i>DI*</i>.<br><br>The <i>Address Size</i> is the number of bits that determine an address; so the total number of words stored will be 2^<sup><i>Address Size</i></sup>.");
+ m_desc = i18n("This RAM stores data as a collection of words; each of which tqcontains <i>word size</i> bits of data.<br><br>To read data, set the CS (<i>chip select</i>) and the OE (<i>output enable</i>) pins high, and select the word using the address pins <i>A*</i>. The word is outputted on the data-out pins: <i>DO*</i>.<br><br>To write data, set the CS (<i>chip select</i>) and the WE (<i>write enable</i>) pins high, and select the address to write to with the <i>A*</i> pins. Write to the selected word using the data-in pins: <i>DI*</i>.<br><br>The <i>Address Size</i> is the number of bits that determine an address; so the total number of words stored will be 2^<sup><i>Address Size</i></sup>.");
m_data = 0l;
m_pCS = 0l;
@@ -125,16 +125,16 @@ void RAM::initPins()
newWordSize == oldWordSize )
return;
- QStringList leftPins; // Pins on left of IC
+ TQStringList leftPins; // Pins on left of IC
leftPins << "CS" << "OE" << "WE";
for ( int i = 0; i < newAddressSize; ++i )
- leftPins << QString("A%1").arg( QString::number(i) );
+ leftPins << TQString("A%1").tqarg( TQString::number(i) );
- QStringList rightPins; // Pins on right of IC
+ TQStringList rightPins; // Pins on right of IC
for ( unsigned i = newWordSize; i > 0; --i )
- rightPins << QString("DI%1").arg( QString::number(i-1) );
+ rightPins << TQString("DI%1").tqarg( TQString::number(i-1) );
for ( unsigned i = newWordSize; i > 0; --i )
- rightPins << QString("DO%1").arg( QString::number(i-1) );
+ rightPins << TQString("DO%1").tqarg( TQString::number(i-1) );
// Make pin lists of consistent sizes
for ( unsigned i = leftPins.size(); i < rightPins.size(); ++i )
@@ -142,7 +142,7 @@ void RAM::initPins()
for ( unsigned i = rightPins.size(); i < leftPins.size(); ++i )
rightPins.prepend("");
- QStringList pins = leftPins + rightPins;
+ TQStringList pins = leftPins + rightPins;
initDIPSymbol( pins, 72 );
initDIP(pins);
@@ -177,11 +177,11 @@ void RAM::initPins()
for ( int i = oldWordSize; i < newWordSize; ++i )
{
- node = ecNodeWithID( QString("DI%1").arg( QString::number(i) ) );
+ node = ecNodeWithID( TQString("DI%1").tqarg( TQString::number(i) ) );
m_dataIn.insert( i, createLogicIn(node) );
m_dataIn[i]->setCallback( this, (CallbackPtr)(&RAM::inStateChanged) );
- node = ecNodeWithID( QString("DO%1").arg( QString::number(i) ) );
+ node = ecNodeWithID( TQString("DO%1").tqarg( TQString::number(i) ) );
m_dataOut.insert( i, createLogicOut(node, false) );
}
}
@@ -189,12 +189,12 @@ void RAM::initPins()
{
for ( int i = newWordSize; i < oldWordSize; ++i )
{
- QString id = QString("DO%1").arg( QString::number(i) );
+ TQString id = TQString("DO%1").tqarg( TQString::number(i) );
removeDisplayText(id);
removeElement( m_dataIn[i], false );
removeNode(id);
- id = QString("DI%1").arg( QString::number(i) );
+ id = TQString("DI%1").tqarg( TQString::number(i) );
removeDisplayText(id);
removeElement( m_dataOut[i], false );
removeNode(id);
@@ -210,7 +210,7 @@ void RAM::initPins()
for ( int i = oldAddressSize; i < newAddressSize; ++i )
{
- node = ecNodeWithID( QString("A%1").arg( QString::number(i) ) );
+ node = ecNodeWithID( TQString("A%1").tqarg( TQString::number(i) ) );
m_address.insert( i, createLogicIn(node) );
m_address[i]->setCallback( this, (CallbackPtr)(&RAM::inStateChanged) );
}
@@ -219,7 +219,7 @@ void RAM::initPins()
{
for ( int i = newAddressSize; i < oldAddressSize; ++i )
{
- QString id = QString("A%1").arg( QString::number(i) );
+ TQString id = TQString("A%1").tqarg( TQString::number(i) );
removeDisplayText(id);
removeElement( m_address[i], false );
removeNode(id);
diff --git a/src/electronics/components/ram.h b/src/electronics/components/ram.h
index 7b78ee9..b520969 100644
--- a/src/electronics/components/ram.h
+++ b/src/electronics/components/ram.h
@@ -14,8 +14,8 @@
#include "component.h"
#include "logic.h"
-#include <qbitarray.h>
-#include <qptrvector.h>
+#include <tqbitarray.h>
+#include <tqptrvector.h>
/**
@author David Saxton
@@ -35,7 +35,7 @@ class RAM : public CallbackClass, public Component
virtual void dataChanged();
void inStateChanged( bool newState );
- QBitArray m_data;
+ TQBitArray m_data;
LogicIn * m_pCS; // Chip select
LogicIn * m_pOE; // Output enable
LogicIn * m_pWE; // Write enable
@@ -43,9 +43,9 @@ class RAM : public CallbackClass, public Component
int m_wordSize;
int m_addressSize;
- QPtrVector<LogicIn> m_address;
- QPtrVector<LogicIn> m_dataIn;
- QPtrVector<LogicOut> m_dataOut;
+ TQPtrVector<LogicIn> m_address;
+ TQPtrVector<LogicIn> m_dataIn;
+ TQPtrVector<LogicOut> m_dataOut;
};
#endif
diff --git a/src/electronics/components/resistordip.cpp b/src/electronics/components/resistordip.cpp
index d2c5bdb..3ff030c 100644
--- a/src/electronics/components/resistordip.cpp
+++ b/src/electronics/components/resistordip.cpp
@@ -15,7 +15,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* ResistorDIP::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -46,7 +46,7 @@ ResistorDIP::ResistorDIP( ICNDocument *icnDocument, bool newItem, const char *id
createProperty( "resistance", Variant::Type::Double );
property("resistance")->setCaption( i18n("Resistance") );
- property("resistance")->setUnit( QChar(0x3a9) );
+ property("resistance")->setUnit( TQChar(0x3a9) );
property("resistance")->setValue(1e4);
property("resistance")->setMinValue(1e-6);
@@ -69,8 +69,8 @@ void ResistorDIP::dataChanged()
for ( int i=0; i<m_resistorCount; ++i )
m_resistance[i]->setResistance(resistance);
- const QString display = QString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + QChar(0x3a9);
- addDisplayText( "res", QRect( offsetX(), offsetY()-16, 32, 12 ), display );
+ const TQString display = TQString::number( resistance / getMultiplier(resistance), 'g', 3 ) + getNumberMag(resistance) + TQChar(0x3a9);
+ addDisplayText( "res", TQRect( offsetX(), offsetY()-16, 32, 12 ), display );
}
@@ -88,16 +88,16 @@ void ResistorDIP::initPins()
{
removeElement( m_resistance[i], false );
m_resistance[i] = 0l;
- removeNode( "n"+QString::number(i) );
- removeNode( "p"+QString::number(i) );
+ removeNode( "n"+TQString::number(i) );
+ removeNode( "p"+TQString::number(i) );
}
}
else
{
for ( int i=m_resistorCount; i<count; ++i )
{
- const QString nid = "n"+QString::number(i);
- const QString pid = "p"+QString::number(i);
+ const TQString nid = "n"+TQString::number(i);
+ const TQString pid = "p"+TQString::number(i);
m_resistance[i] = createResistance( createPin( -24, 0, 0, nid ), createPin( 24, 0, 180, pid ), resistance );
}
}
@@ -112,14 +112,14 @@ void ResistorDIP::updateDIPNodePositions()
{
for ( int i=0; i<m_resistorCount; ++i )
{
- m_nodeMap["n"+QString::number(i)].y = offsetY() + 8 + 16*i;
- m_nodeMap["p"+QString::number(i)].y = offsetY() + 8 + 16*i;
+ m_nodeMap["n"+TQString::number(i)].y = offsetY() + 8 + 16*i;
+ m_nodeMap["p"+TQString::number(i)].y = offsetY() + 8 + 16*i;
}
updateAttachedPositioning();
}
-void ResistorDIP::drawShape( QPainter &p )
+void ResistorDIP::drawShape( TQPainter &p )
{
int _x = int(x()+offsetX());
int _y = int(y()+offsetY());
diff --git a/src/electronics/components/resistordip.h b/src/electronics/components/resistordip.h
index ce1d03a..e3996a8 100644
--- a/src/electronics/components/resistordip.h
+++ b/src/electronics/components/resistordip.h
@@ -28,7 +28,7 @@ public:
static LibraryItem *libraryItem();
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
void updateDIPNodePositions();
virtual void dataChanged();
/**
diff --git a/src/electronics/components/rotoswitch.cpp b/src/electronics/components/rotoswitch.cpp
index 872714c..ac7f1a0 100644
--- a/src/electronics/components/rotoswitch.cpp
+++ b/src/electronics/components/rotoswitch.cpp
@@ -16,7 +16,7 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
#include <assert.h>
@@ -31,7 +31,7 @@ Item* ECRotoSwitch::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECRotoSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/roto_switch"),
+ TQString("ec/roto_switch"),
i18n("Rotary"),
i18n("Switches"),
"rotary.png",
@@ -47,20 +47,20 @@ m_numPositions(0)
// m_name = i18n("Rotary Switch(WIP)");
m_name = i18n("Rotary Switch");
m_desc = i18n("Rotary Switch"); ///< \todo better description for rotoswitch
- QPointArray pa;
+ TQPointArray pa;
pa.makeArc( -_pinInnerRadius, -_pinInnerRadius, 2*_pinInnerRadius, 2*_pinInnerRadius , 0, 16*360 );
setItemPoints( pa );
//setSize( -64, -64, 128, 128 );
//half the side length of the buttons
int buttonRadius = 10;
- addButton( "go_left", QRect( -_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), "<", false );
- addButton( "go_right", QRect(_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), ">", false );
+ addButton( "go_left", TQRect( -_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), "<", false );
+ addButton( "go_right", TQRect(_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), ">", false );
/*Variant * v = createProperty( "button_map", Variant::Type::String );
v->setCaption( i18n("Button Map") );
v->setAdvanced(true);
- const QString defButtonMap("SSSSSSSSSSSM");
+ const TQString defButtonMap("SSSSSSSSSSSM");
v->setValue(defButtonMap);
*/
Variant * v = createProperty( "num_positions", Variant::Type::Int );
@@ -115,7 +115,7 @@ void ECRotoSwitch::dataChanged()
}
inline int roundTo10(int a){return ((a/10)+(a%10<5?0:1))*10;}
-void ECRotoSwitch::drawShape( QPainter &p )
+void ECRotoSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -178,7 +178,7 @@ void ECRotoSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECRotoSwitch::buttonStateChanged( const QString & id, bool state )
+void ECRotoSwitch::buttonStateChanged( const TQString & id, bool state )
{
SwitchPosition& curSP = m_positions[m_curPosition];
int nextPos = m_curPosition;
@@ -245,7 +245,7 @@ void ECRotoSwitch::setUpSwitches()
for(int i=0; i<m_numPositions; i++)
{
SwitchPosition& sp = m_positions[i];
- QString pinName = QString("pin_%1").arg(i);
+ TQString pinName = TQString("pin_%1").tqarg(i);
removeNode(pinName);
removeSwitch(sp.posSwitch);
}
@@ -284,7 +284,7 @@ void ECRotoSwitch::setUpSwitches()
// kdDebug() << contactX <<", "<< contactY <<endl;
- sp.node = createPin(contactX,-contactY,sp.pinAngle,QString("pin_%1").arg(i));
+ sp.node = createPin(contactX,-contactY,sp.pinAngle,TQString("pin_%1").tqarg(i));
sp.posSwitch = createSwitch(m_inNode, sp.node, true);
sp.isMomentary = false;//(map[i] == 'M');
m_positions.push_back(sp);
diff --git a/src/electronics/components/rotoswitch.h b/src/electronics/components/rotoswitch.h
index 909c0ea..8a4c802 100644
--- a/src/electronics/components/rotoswitch.h
+++ b/src/electronics/components/rotoswitch.h
@@ -12,7 +12,7 @@
#define ROTOSWITCH_H
#include "component.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
struct SwitchPosition
{
@@ -35,11 +35,11 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
int m_numPositions;
int m_curPosition;
@@ -59,7 +59,7 @@ private:
///The radius of the ring of positions
static const int _contactRingRadius = _contactOuterRadius - _contactRadius;
- QValueVector<SwitchPosition> m_positions;
+ TQValueVector<SwitchPosition> m_positions;
ECNode* m_inNode;
protected:
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 );
}
diff --git a/src/electronics/components/serialportcomponent.h b/src/electronics/components/serialportcomponent.h
index 4f9bc9a..21f2387 100644
--- a/src/electronics/components/serialportcomponent.h
+++ b/src/electronics/components/serialportcomponent.h
@@ -36,9 +36,9 @@ class SerialPortComponent : public CallbackClass, public Component
/**
* @param baudRate as defined in <bits/termios.h>
*/
- void initPort( const QString & port, unsigned baudRate );
+ void initPort( const TQString & port, unsigned baudRate );
virtual void dataChanged();
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
void tdCallback( bool isHigh );
void dtrCallback( bool isHigh );
diff --git a/src/electronics/components/toggleswitch.cpp b/src/electronics/components/toggleswitch.cpp
index 4efe9ab..7c877f9 100644
--- a/src/electronics/components/toggleswitch.cpp
+++ b/src/electronics/components/toggleswitch.cpp
@@ -16,7 +16,7 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class ECDPDT
Item* ECDPDT::construct( ItemDocument *itemDocument, bool newItem, const char *id )
@@ -27,7 +27,7 @@ Item* ECDPDT::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECDPDT::libraryItem()
{
return new LibraryItem(
- QString("ec/dpdt_toggle"),
+ TQString("ec/dpdt_toggle"),
i18n("DPDT"),
i18n("Switches"),
"dpdt.png",
@@ -43,7 +43,7 @@ ECDPDT::ECDPDT( ICNDocument *icnDocument, bool newItem, const char *id )
m_desc = i18n("Double-Pole Double-Throw switch.");
setSize( -16, -32, 32, 64 );
- addButton( "button", QRect( -16, 32, 32, 20 ), "", true );
+ addButton( "button", TQRect( -16, 32, 32, 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -90,7 +90,7 @@ void ECDPDT::dataChanged()
}
-void ECDPDT::drawShape( QPainter &p )
+void ECDPDT::drawShape( TQPainter &p )
{
initPainter(p);
@@ -113,7 +113,7 @@ void ECDPDT::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECDPDT::buttonStateChanged( const QString &, bool state )
+void ECDPDT::buttonStateChanged( const TQString &, bool state )
{
pressed = state;
m_switch1->setState( state ? Switch::Open : Switch::Closed );
@@ -133,7 +133,7 @@ Item* ECDPST::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECDPST::libraryItem()
{
return new LibraryItem(
- QString("ec/dpst_toggle"),
+ TQString("ec/dpst_toggle"),
i18n("DPST"),
i18n("Switches"),
"dpst.png",
@@ -148,7 +148,7 @@ ECDPST::ECDPST( ICNDocument *icnDocument, bool newItem, const char *id )
m_desc = i18n("Double-Pole Single-Throw switch.");
setSize( -16, -16, 32, 32 );
- addButton( "button", QRect( -16, 16, 32, 20 ), "", true );
+ addButton( "button", TQRect( -16, 16, 32, 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -190,7 +190,7 @@ void ECDPST::dataChanged()
}
-void ECDPST::drawShape( QPainter &p )
+void ECDPST::drawShape( TQPainter &p )
{
initPainter(p);
@@ -211,7 +211,7 @@ void ECDPST::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECDPST::buttonStateChanged( const QString &, bool state )
+void ECDPST::buttonStateChanged( const TQString &, bool state )
{
m_switch1->setState( state ? Switch::Closed : Switch::Open );
m_switch2->setState( state ? Switch::Closed : Switch::Open );
@@ -229,7 +229,7 @@ Item* ECSPDT::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECSPDT::libraryItem()
{
return new LibraryItem(
- QString("ec/spdt_toggle"),
+ TQString("ec/spdt_toggle"),
i18n("SPDT"),
i18n("Switches"),
"spdt.png",
@@ -245,7 +245,7 @@ ECSPDT::ECSPDT( ICNDocument *icnDocument, bool newItem, const char *id )
m_desc = i18n("Single-Pole Double-Throw switch.");
setSize( -16, -16, 32, 32 );
- addButton( "button", QRect( -16, 16, width(), 20 ), "", true );
+ addButton( "button", TQRect( -16, 16, width(), 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -288,7 +288,7 @@ void ECSPDT::dataChanged()
}
-void ECSPDT::drawShape( QPainter &p )
+void ECSPDT::drawShape( TQPainter &p )
{
initPainter(p);
@@ -306,7 +306,7 @@ void ECSPDT::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECSPDT::buttonStateChanged( const QString &, bool state )
+void ECSPDT::buttonStateChanged( const TQString &, bool state )
{
pressed = state;
m_switch1->setState( state ? Switch::Open : Switch::Closed );
@@ -324,7 +324,7 @@ Item* ECSPST::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* ECSPST::libraryItem()
{
return new LibraryItem(
- QString("ec/spst_toggle"),
+ TQString("ec/spst_toggle"),
i18n("SPST"),
i18n("Switches"),
"spst.png",
@@ -342,7 +342,7 @@ ECSPST::ECSPST( ICNDocument *icnDocument, bool newItem, const char *id )
setSize( -16, -8, 32, 16 );
pressed = false;
- addButton( "button", QRect( -16, 8, width(), 20 ), "", true );
+ addButton( "button", TQRect( -16, 8, width(), 20 ), "", true );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -382,7 +382,7 @@ void ECSPST::dataChanged()
}
-void ECSPST::drawShape( QPainter &p )
+void ECSPST::drawShape( TQPainter &p )
{
initPainter(p);
@@ -398,7 +398,7 @@ void ECSPST::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECSPST::buttonStateChanged( const QString &, bool state )
+void ECSPST::buttonStateChanged( const TQString &, bool state )
{
pressed = state;
m_switch->setState( state ? Switch::Closed : Switch::Open );
diff --git a/src/electronics/components/toggleswitch.h b/src/electronics/components/toggleswitch.h
index 80fd064..f6947b0 100644
--- a/src/electronics/components/toggleswitch.h
+++ b/src/electronics/components/toggleswitch.h
@@ -26,12 +26,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch1;
Switch *m_switch2;
Switch *m_switch3;
@@ -53,12 +53,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch1;
Switch *m_switch2;
bool pressed;
@@ -78,12 +78,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch1;
Switch *m_switch2;
bool pressed;
@@ -103,12 +103,12 @@ public:
static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
static LibraryItem *libraryItem();
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual void dataChanged();
virtual bool canFlip() const { return true; }
private:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
Switch *m_switch;
bool pressed;
};
diff --git a/src/electronics/ecnode.cpp b/src/electronics/ecnode.cpp
index 0fb2801..b4079e8 100644
--- a/src/electronics/ecnode.cpp
+++ b/src/electronics/ecnode.cpp
@@ -16,7 +16,7 @@
#include "pin.h"
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
@@ -52,7 +52,7 @@ inline int calcLength( const double prop, const double v )
return (v>0) ? -int(vLength*prop) : int(vLength*prop);
}
-ECNode::ECNode( ICNDocument *icnDocument, Node::node_type _type, node_dir dir, const QPoint &pos, QString *_id )
+ECNode::ECNode( ICNDocument *icnDocument, Node::node_type _type, node_dir dir, const TQPoint &pos, TQString *_id )
: Node( icnDocument, _type, dir, pos, _id )
{
m_prevV = 0;
@@ -64,9 +64,9 @@ ECNode::ECNode( ICNDocument *icnDocument, Node::node_type _type, node_dir dir, c
if ( type() == ec_pin )
{
- m_pinPoint = new QCanvasRectangle( 0, 0, 3, 3, canvas() );
- m_pinPoint->setBrush(Qt::black);
- m_pinPoint->setPen(Qt::black);
+ m_pinPoint = new TQCanvasRectangle( 0, 0, 3, 3, canvas() );
+ m_pinPoint->setBrush(TQt::black);
+ m_pinPoint->setPen(TQt::black);
}
m_pins.resize(1);
@@ -123,7 +123,7 @@ void ECNode::setNodeChanged()
if ( v != m_prevV || i != m_prevI )
{
- QRect r = boundingRect();
+ TQRect r = boundingRect();
r.setCoords( r.left()+(r.width()/2)-1, r.top()+(r.height()/2)-1, r.right()-(r.width()/2)+1, r.bottom()-(r.height()/2)+1 );
canvas()->setChanged(r);
m_prevV = v;
@@ -132,14 +132,14 @@ void ECNode::setNodeChanged()
}
-void ECNode::setParentItem( CNItem * parentItem )
+void ECNode::setParentItem( CNItem * tqparentItem )
{
- Node::setParentItem(parentItem);
+ Node::setParentItem(tqparentItem);
- if ( Component * component = dynamic_cast<Component*>(parentItem) )
+ if ( Component * component = dynamic_cast<Component*>(tqparentItem) )
{
- connect( component, SIGNAL(elementDestroyed(Element* )), this, SLOT(removeElement(Element* )) );
- connect( component, SIGNAL(switchDestroyed( Switch* )), this, SLOT(removeSwitch( Switch* )) );
+ connect( component, TQT_SIGNAL(elementDestroyed(Element* )), this, TQT_SLOT(removeElement(Element* )) );
+ connect( component, TQT_SIGNAL(switchDestroyed( Switch* )), this, TQT_SLOT(removeSwitch( Switch* )) );
}
}
@@ -158,7 +158,7 @@ void ECNode::removeSwitch( Switch * sw )
}
-void ECNode::drawShape( QPainter &p )
+void ECNode::drawShape( TQPainter &p )
{
const int _x = int(x());
const int _y = int(y());
@@ -174,8 +174,8 @@ void ECNode::drawShape( QPainter &p )
if (m_pinPoint)
{
bool drawDivPoint;
- QPoint divPoint = findConnectorDivergePoint(&drawDivPoint);
- m_pinPoint->setVisible(drawDivPoint);
+ TQPoint divPoint = findConnectorDivergePoint(&drawDivPoint);
+ m_pinPoint->tqsetVisible(drawDivPoint);
m_pinPoint->move( divPoint.x()-1, divPoint.y()-1 );
}
@@ -191,17 +191,17 @@ void ECNode::drawShape( QPainter &p )
{
// we can assume that v != 0 as length != 0
- QPen oldPen = p.pen();
+ TQPen oldPen = p.pen();
double i = pin()->current();
double iProp = calcIProp(i);
int thickness = calcThickness(iProp);
if ( v > 0 )
- p.setPen( QPen( QColor( 255, 166, 0 ), thickness ) );
+ p.setPen( TQPen( TQColor( 255, 166, 0 ), thickness ) );
else
- p.setPen( QPen( QColor( 0, 136, 255 ), thickness ) );
+ p.setPen( TQPen( TQColor( 0, 136, 255 ), thickness ) );
// The node line (drawn at the end of this function) will overdraw
// some of the voltage bar, so we need to adapt the length
@@ -226,7 +226,7 @@ void ECNode::drawShape( QPainter &p )
}
}
- QPen pen( p.pen() );
+ TQPen pen( p.pen() );
pen.setWidth( (numPins() > 1) ? 2 : 1 );
p.setPen(pen);
diff --git a/src/electronics/ecnode.h b/src/electronics/ecnode.h
index 6f8f36e..24d34e4 100644
--- a/src/electronics/ecnode.h
+++ b/src/electronics/ecnode.h
@@ -13,17 +13,17 @@
#include "node.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class ECNode;
class Element;
class Pin;
class Switch;
-class QTimer;
+class TQTimer;
-typedef QValueList<ECNode*> ECNodeList;
-typedef QValueList<Element*> ElementList;
-typedef QValueVector<Pin*> PinVector;
+typedef TQValueList<ECNode*> ECNodeList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueVector<Pin*> PinVector;
/**
@short Electrical node with voltage / current / etc properties
@@ -32,12 +32,13 @@ typedef QValueVector<Pin*> PinVector;
class ECNode : public Node
{
Q_OBJECT
+ TQ_OBJECT
public:
- ECNode( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const QPoint &pos, QString *id = 0L );
+ ECNode( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const TQPoint &pos, TQString *id = 0L );
~ECNode();
- virtual void setParentItem( CNItem *parentItem );
- virtual void drawShape( QPainter &p );
+ virtual void setParentItem( CNItem *tqparentItem );
+ virtual void drawShape( TQPainter &p );
/**
* Set the number of pins "contained" in this node.
*/
@@ -64,7 +65,7 @@ class ECNode : public Node
bool m_bShowVoltageBars;
double m_prevV;
double m_prevI;
- QCanvasRectangle * m_pinPoint;
+ TQCanvasRectangle * m_pinPoint;
PinVector m_pins;
};
diff --git a/src/electronics/gpsimprocessor.cpp b/src/electronics/gpsimprocessor.cpp
index 1a3b862..efa3d88 100644
--- a/src/electronics/gpsimprocessor.cpp
+++ b/src/electronics/gpsimprocessor.cpp
@@ -28,9 +28,9 @@
#include <kmessagebox.h>
#include <ktempfile.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "gpsim/cod.h"
#include "gpsim/interface.h"
@@ -60,9 +60,9 @@ Work around a bug in gpsim: the directory in a filename is recorded twice, e.g.
"/home/david/afile.asm" is recorded as "/home/david//home/david/afile.asm". This
function will remove the duplicated directory path (by searching for a "//").
*/
-QString sanitizeGpsimFile( QString file )
+TQString sanitizeGpsimFile( TQString file )
{
- int pos = file.find("//");
+ int pos = file.tqfind("//");
if ( pos != -1 )
{
file.remove( 0, pos + 1 );
@@ -71,8 +71,8 @@ QString sanitizeGpsimFile( QString file )
}
-GpsimProcessor::GpsimProcessor( QString symbolFile, QObject *parent )
- : QObject(parent),
+GpsimProcessor::GpsimProcessor( TQString symbolFile, TQObject *tqparent )
+ : TQObject(tqparent),
m_symbolFile(symbolFile)
{
if (!bDoneGpsimInit)
@@ -89,7 +89,7 @@ GpsimProcessor::GpsimProcessor( QString symbolFile, QObject *parent )
m_bCanExecuteNextCycle = true;
m_bIsRunning = false;
m_pPicProcessor = 0l;
- m_codLoadStatus = CodUnknown;
+ m_codLoadtqStatus = CodUnknown;
m_pRegisterMemory = 0l;
m_debugMode = GpsimDebugger::AsmDebugger;
m_pDebugger[0] = m_pDebugger[1] = 0l;
@@ -101,37 +101,37 @@ GpsimProcessor::GpsimProcessor( QString symbolFile, QObject *parent )
switch ( (cod_errors)load_symbol_file( &tempProcessor, fileName ) )
{
case COD_SUCCESS:
- m_codLoadStatus = CodSuccess;
+ m_codLoadtqStatus = CodSuccess;
break;
case COD_FILE_NOT_FOUND:
- m_codLoadStatus = CodFileNotFound;
+ m_codLoadtqStatus = CodFileNotFound;
break;
case COD_UNRECOGNIZED_PROCESSOR:
- m_codLoadStatus = CodUnrecognizedProcessor;
+ m_codLoadtqStatus = CodUnrecognizedProcessor;
break;
case COD_FILE_NAME_TOO_LONG:
- m_codLoadStatus = CodFileNameTooLong;
+ m_codLoadtqStatus = CodFileNameTooLong;
break;
case COD_LST_NOT_FOUND:
- m_codLoadStatus = CodLstNotFound;
+ m_codLoadtqStatus = CodLstNotFound;
break;
case COD_BAD_FILE:
- m_codLoadStatus = CodBadFile;
+ m_codLoadtqStatus = CodBadFile;
break;
default:
- m_codLoadStatus = CodUnknown;
+ m_codLoadtqStatus = CodUnknown;
}
#else // GPSIM_0_21_11+
FILE * pFile = fopen( fileName, "r" );
if ( !pFile )
- m_codLoadStatus = CodFileUnreadable;
+ m_codLoadtqStatus = CodFileUnreadable;
else
- m_codLoadStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure;
+ m_codLoadtqStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure;
#endif
m_pPicProcessor = dynamic_cast<pic_processor*>(tempProcessor);
- if ( codLoadStatus() == CodSuccess )
+ if ( codLoadtqStatus() == CodSuccess )
{
m_pRegisterMemory = new RegisterSet( m_pPicProcessor );
m_pDebugger[0] = new GpsimDebugger( GpsimDebugger::AsmDebugger, this );
@@ -154,33 +154,33 @@ GpsimProcessor::~GpsimProcessor()
}
-void GpsimProcessor::displayCodLoadStatus( )
+void GpsimProcessor::displayCodLoadtqStatus( )
{
- switch (m_codLoadStatus)
+ switch (m_codLoadtqStatus)
{
case CodSuccess:
break;
case CodFileNotFound:
- KMessageBox::sorry( 0l, i18n("The cod file \"%1\" was not found.").arg(m_symbolFile), i18n("File Not Found") );
+ KMessageBox::sorry( 0l, i18n("The cod file \"%1\" was not found.").tqarg(m_symbolFile), i18n("File Not Found") );
break;
case CodUnrecognizedProcessor:
- KMessageBox::sorry( 0l, i18n("The processor for cod file \"%1\" is unrecognized.").arg(m_symbolFile), i18n("Unrecognized Processor") );
+ KMessageBox::sorry( 0l, i18n("The processor for cod file \"%1\" is unrecognized.").tqarg(m_symbolFile), i18n("Unrecognized Processor") );
break;
case CodFileNameTooLong:
- KMessageBox::sorry( 0l, i18n("The file name \"%1\" is too long.").arg(m_symbolFile), i18n("Filename Too Long") );
+ KMessageBox::sorry( 0l, i18n("The file name \"%1\" is too long.").tqarg(m_symbolFile), i18n("Filename Too Long") );
break;
case CodLstNotFound:
- KMessageBox::sorry( 0l, i18n("The lst file associated with the cod file \"%1\" was not found.").arg(m_symbolFile), i18n("LST File Not Found") );
+ KMessageBox::sorry( 0l, i18n("The lst file associated with the cod file \"%1\" was not found.").tqarg(m_symbolFile), i18n("LST File Not Found") );
break;
case CodBadFile:
- KMessageBox::sorry( 0l, i18n("The cod file \"%1\" is bad.").arg(m_symbolFile), i18n("Bad File") );
+ KMessageBox::sorry( 0l, i18n("The cod file \"%1\" is bad.").tqarg(m_symbolFile), i18n("Bad File") );
break;
case CodFileUnreadable:
- KMessageBox::sorry( 0l, i18n("The cod file \"%1\" could not be read from.").arg(m_symbolFile), i18n("Unreadable File") );
+ KMessageBox::sorry( 0l, i18n("The cod file \"%1\" could not be read from.").tqarg(m_symbolFile), i18n("Unreadable File") );
break;
case CodFailure:
case CodUnknown:
- KMessageBox::sorry( 0l, i18n("An error occured with the cod file \"%1\".").arg(m_symbolFile), i18n("Error") );
+ KMessageBox::sorry( 0l, i18n("An error occured with the cod file \"%1\".").tqarg(m_symbolFile), i18n("Error") );
break;
}
}
@@ -192,9 +192,9 @@ unsigned GpsimProcessor::programMemorySize() const
}
-QStringList GpsimProcessor::sourceFileList()
+TQStringList GpsimProcessor::sourceFileList()
{
- QStringList files;
+ TQStringList files;
// Work around nasty bug in gpsim 0.21.4 where nsrc_files value might be used uninitiazed
int max = m_pPicProcessor->files.nsrc_files();
@@ -299,12 +299,12 @@ int GpsimProcessor::operandLiteral( unsigned address )
}
-GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const QString & programFile )
+GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const TQString & programFile )
{
if ( !KStandardDirs::exists(programFile) )
return DoesntExist;
- QString extension = programFile.right( programFile.length() - programFile.findRev('.') - 1 ).lower();
+ TQString extension = programFile.right( programFile.length() - programFile.tqfindRev('.') - 1 ).lower();
if ( extension == "flowcode" ||
extension == "asm" ||
@@ -313,40 +313,40 @@ GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const QS
extension == "c" )
return Valid;
- if ( extension == "hex" && QFile::exists( QString(programFile).replace(".hex",".cod") ) )
+ if ( extension == "hex" && TQFile::exists( TQString(programFile).tqreplace(".hex",".cod") ) )
return Valid;
return IncorrectType;
}
-QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *receiver, const char *successMember, const char * failMember )
+TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject *receiver, const char *successMember, const char * failMember )
{
if ( !isValidProgramFile(fileName) )
- return QString::null;
+ return TQString();
- QString extension = fileName.right( fileName.length() - fileName.findRev('.') - 1 ).lower();
+ TQString extension = fileName.right( fileName.length() - fileName.tqfindRev('.') - 1 ).lower();
if ( extension == "cod" )
{
- QTimer::singleShot( 0, receiver, successMember );
+ TQTimer::singleShot( 0, receiver, successMember );
return fileName;
}
if ( extension == "hex" )
{
- QTimer::singleShot( 0, receiver, successMember );
+ TQTimer::singleShot( 0, receiver, successMember );
// We've already checked for the existance of the ".cod" file in GpsimProcessor::isValidProgramFile
- return QString(fileName).replace(".hex",".cod");
+ return TQString(fileName).tqreplace(".hex",".cod");
}
else if ( extension == "basic" || extension == "microbe" )
{
compileMicrobe( fileName, receiver, successMember, failMember );
- return QString(fileName).replace( "."+extension, ".cod" );
+ return TQString(fileName).tqreplace( "."+extension, ".cod" );
}
else if ( extension == "flowcode" )
{
- const QString hexFile = KTempFile( QString::null, ".hex" ).name();
+ const TQString hexFile = KTempFile( TQString(), ".hex" ).name();
ProcessOptions o;
o.b_addToProject = false;
@@ -359,18 +359,18 @@ QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *re
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
- return QString(hexFile).replace( ".hex", ".cod" );
+ return TQString(hexFile).tqreplace( ".hex", ".cod" );
}
else if ( extension == "asm" )
{
ProcessOptions o;
o.b_addToProject = false;
- o.setTargetFile( QString(fileName).replace(".asm",".hex"));
+ o.setTargetFile( TQString(fileName).tqreplace(".asm",".hex"));
o.setInputFiles(fileName);
o.setMethod( ProcessOptions::Method::Forget );
o.setProcessPath( ProcessOptions::ProcessPath::path( ProcessOptions::guessMediaType(fileName), ProcessOptions::ProcessPath::Program ) );
@@ -379,18 +379,18 @@ QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *re
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
- return QString(fileName).replace(".asm",".cod");
+ return TQString(fileName).tqreplace(".asm",".cod");
}
else if ( extension == "c" )
{
ProcessOptions o;
o.b_addToProject = false;
- o.setTargetFile( QString(fileName).replace(".c",".hex"));
+ o.setTargetFile( TQString(fileName).tqreplace(".c",".hex"));
o.setInputFiles(fileName);
o.setMethod( ProcessOptions::Method::Forget );
o.setProcessPath( ProcessOptions::ProcessPath::C_Program );
@@ -399,25 +399,25 @@ QString GpsimProcessor::generateSymbolFile( const QString &fileName, QObject *re
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
- return QString(fileName).replace(".c",".cod");
+ return TQString(fileName).tqreplace(".c",".cod");
}
if ( failMember )
- QTimer::singleShot( 0, receiver, failMember );
- return QString::null;
+ TQTimer::singleShot( 0, receiver, failMember );
+ return TQString();
}
-void GpsimProcessor::compileMicrobe( const QString &filename, QObject *receiver, const char * successMember, const char * failMember )
+void GpsimProcessor::compileMicrobe( const TQString &filename, TQObject *receiver, const char * successMember, const char * failMember )
{
ProcessOptions o;
o.b_addToProject = false;
- o.setTargetFile( QString(filename).replace(".microbe",".hex") );
+ o.setTargetFile( TQString(filename).tqreplace(".microbe",".hex") );
o.setInputFiles(filename);
o.setMethod( ProcessOptions::Method::Forget );
o.setProcessPath( ProcessOptions::ProcessPath::Microbe_Program );
@@ -425,9 +425,9 @@ void GpsimProcessor::compileMicrobe( const QString &filename, QObject *receiver,
if (receiver)
{
if (successMember)
- connect( pc, SIGNAL(successful()), receiver, successMember );
+ connect( pc, TQT_SIGNAL(successful()), receiver, successMember );
if (failMember)
- connect( pc, SIGNAL(failed()), receiver, failMember );
+ connect( pc, TQT_SIGNAL(failed()), receiver, failMember );
}
}
//END class GpsimProcessor
@@ -436,7 +436,7 @@ void GpsimProcessor::compileMicrobe( const QString &filename, QObject *receiver,
//BEGIN class GpsimDebugger
GpsimDebugger::GpsimDebugger( Type type, GpsimProcessor * gpsim )
- : QObject()
+ : TQObject()
{
m_pGpsim = gpsim;
m_type = type;
@@ -445,13 +445,13 @@ GpsimDebugger::GpsimDebugger( Type type, GpsimProcessor * gpsim )
m_stackLevelLowerBreak = -1;
m_addressSize = 0;
- connect( m_pGpsim, SIGNAL(runningStatusChanged(bool )), this, SLOT(gpsimRunningStatusChanged(bool )) );
+ connect( m_pGpsim, TQT_SIGNAL(runningStatusChanged(bool )), this, TQT_SLOT(gpsimRunningStatusChanged(bool )) );
if ( type == HLLDebugger )
{
- const QStringList sourceFileList = m_pGpsim->sourceFileList();
- QStringList::const_iterator sflEnd = sourceFileList.end();
- for ( QStringList::const_iterator it = sourceFileList.begin(); it != sflEnd; ++it )
+ const TQStringList sourceFileList = m_pGpsim->sourceFileList();
+ TQStringList::const_iterator sflEnd = sourceFileList.end();
+ for ( TQStringList::const_iterator it = sourceFileList.begin(); it != sflEnd; ++it )
{
AsmParser p(*it);
p.parse(this);
@@ -464,7 +464,7 @@ GpsimDebugger::GpsimDebugger( Type type, GpsimProcessor * gpsim )
GpsimDebugger::~GpsimDebugger()
{
- QValueList<DebugLine*> debugLinesToDelete;
+ TQValueList<DebugLine*> debugLinesToDelete;
for ( unsigned i = 0; i < m_addressSize; ++i )
{
@@ -476,8 +476,8 @@ GpsimDebugger::~GpsimDebugger()
debugLinesToDelete += dl;
}
- const QValueList<DebugLine*>::iterator end = debugLinesToDelete.end();
- for ( QValueList<DebugLine*>::iterator it = debugLinesToDelete.begin(); it != end; ++it )
+ const TQValueList<DebugLine*>::iterator end = debugLinesToDelete.end();
+ for ( TQValueList<DebugLine*>::iterator it = debugLinesToDelete.begin(); it != end; ++it )
delete *it;
delete [] m_addressToLineMap;
@@ -495,7 +495,7 @@ void GpsimDebugger::gpsimRunningStatusChanged( bool isRunning )
}
-void GpsimDebugger::associateLine( const QString & sourceFile, int sourceLine, const QString & assemblyFile, int assemblyLine )
+void GpsimDebugger::associateLine( const TQString & sourceFile, int sourceLine, const TQString & assemblyFile, int assemblyLine )
{
if ( assemblyLine < 0 || sourceLine < 0 )
{
@@ -506,7 +506,7 @@ void GpsimDebugger::associateLine( const QString & sourceFile, int sourceLine, c
SourceLine hllSource = SourceLine( sourceFile, sourceLine );
SourceLine asmSource = SourceLine( assemblyFile, assemblyLine );
- if ( m_sourceLineMap.contains(asmSource) )
+ if ( m_sourceLineMap.tqcontains(asmSource) )
{
kdWarning() << k_funcinfo << "Already have an association for assembly (\""<<assemblyFile<<"\","<<assemblyLine<<")"<<endl;
return;
@@ -546,7 +546,7 @@ void GpsimDebugger::initAddressToLineMap()
int asmToLine = ((next == slmEnd) || (next.key().fileName() != it.key().fileName())) ? -1 : next.key().line() - 1;
- QString asmFile = it.key().fileName();
+ TQString asmFile = it.key().fileName();
int asmFromLine = it.key().line();
SourceLine sourceLine = it.data();
@@ -592,7 +592,7 @@ void GpsimDebugger::initAddressToLineMap()
}
-void GpsimDebugger::setBreakpoints( const QString & path, const IntList & lines )
+void GpsimDebugger::setBreakpoints( const TQString & path, const IntList & lines )
{
for ( unsigned i = 0; i < m_addressSize; i++ )
{
@@ -600,12 +600,12 @@ void GpsimDebugger::setBreakpoints( const QString & path, const IntList & lines
if ( !dl || dl->fileName() != path )
continue;
- dl->setBreakpoint( lines.contains( dl->line() ) );
+ dl->setBreakpoint( lines.tqcontains( dl->line() ) );
}
}
-void GpsimDebugger::setBreakpoint( const QString & path, int line, bool isBreakpoint )
+void GpsimDebugger::setBreakpoint( const TQString & path, int line, bool isBreakpoint )
{
for ( unsigned i = 0; i < m_addressSize; i++ )
{
@@ -659,7 +659,7 @@ void GpsimDebugger::checkForBreak()
}
-int GpsimDebugger::programAddress( const QString & path, int line )
+int GpsimDebugger::programAddress( const TQString & path, int line )
{
for ( unsigned i = 0; i < m_addressSize; ++i )
{
@@ -755,13 +755,13 @@ RegisterInfo * RegisterSet::fromAddress( unsigned address )
}
-RegisterInfo * RegisterSet::fromName( const QString & name )
+RegisterInfo * RegisterSet::fromName( const TQString & name )
{
// First try the name as case sensitive, then as case insensitive.
- if ( m_nameToRegisterMap.contains( name ) )
+ if ( m_nameToRegisterMap.tqcontains( name ) )
return m_nameToRegisterMap[ name ];
- QString nameLower = name.lower();
+ TQString nameLower = name.lower();
RegisterInfoMap::iterator end = m_nameToRegisterMap.end();
for ( RegisterInfoMap::iterator it = m_nameToRegisterMap.begin(); it != end; ++ it )
@@ -831,7 +831,7 @@ void RegisterInfo::update()
}
-QString RegisterInfo::toString( RegisterType type )
+TQString RegisterInfo::toString( RegisterType type )
{
switch ( type )
{
@@ -858,7 +858,7 @@ QString RegisterInfo::toString( RegisterType type )
//BEGIN class DebugLine
-DebugLine::DebugLine( const QString & fileName, int line )
+DebugLine::DebugLine( const TQString & fileName, int line )
: SourceLine( fileName, line )
{
m_bIsBreakpoint = false;
diff --git a/src/electronics/gpsimprocessor.h b/src/electronics/gpsimprocessor.h
index 0650fd9..0259889 100644
--- a/src/electronics/gpsimprocessor.h
+++ b/src/electronics/gpsimprocessor.h
@@ -16,10 +16,10 @@
#include "sourceline.h"
-#include <qmap.h>
-#include <qvaluevector.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class DebugLine;
class GpsimProcessor;
@@ -28,16 +28,16 @@ class pic_processor; // from gpsim
class Register;
class RegisterMemoryAccess;
-typedef QMap<SourceLine, SourceLine> SourceLineMap;
-typedef QMap<int, QString> QStringMap;
-typedef QValueList<int> IntList;
+typedef TQMap<SourceLine, SourceLine> SourceLineMap;
+typedef TQMap<int, TQString> TQStringMap;
+typedef TQValueList<int> IntList;
class DebugLine : public SourceLine
{
public:
DebugLine();
- DebugLine( const QString & fileName, int line );
+ DebugLine( const TQString & fileName, int line );
/**
* Whether or not to break when we reach this line.
*/
@@ -69,9 +69,10 @@ class DebugLine : public SourceLine
@short Stores info from gpsim register, used to hide gpsim interface
@author David Saxton
*/
-class RegisterInfo : public QObject
+class RegisterInfo : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
RegisterInfo( Register * reg );
@@ -85,9 +86,9 @@ class RegisterInfo : public QObject
};
RegisterType type() const { return m_type; }
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
unsigned value() const;
- static QString toString( RegisterType type );
+ static TQString toString( RegisterType type );
/**
* Checks to see if the value has changed; if so, emit new value.
@@ -98,7 +99,7 @@ class RegisterInfo : public QObject
void valueChanged( unsigned newValue );
protected:
- QString m_name;
+ TQString m_name;
RegisterType m_type;
Register * m_pRegister;
unsigned m_prevEmitValue;
@@ -125,22 +126,23 @@ class RegisterSet
unsigned size() const { return m_registers.size(); }
RegisterInfo * fromAddress( unsigned address );
- RegisterInfo * fromName( const QString & name );
+ RegisterInfo * fromName( const TQString & name );
protected:
- typedef QMap< QString, RegisterInfo * > RegisterInfoMap;
+ typedef TQMap< TQString, RegisterInfo * > RegisterInfoMap;
RegisterInfoMap m_nameToRegisterMap;
- QValueVector< RegisterInfo * > m_registers;
+ TQValueVector< RegisterInfo * > m_registers;
};
/**
@author David Saxton
*/
-class GpsimDebugger : public QObject
+class GpsimDebugger : public TQObject
{
friend class GpsimProcessor;
Q_OBJECT
+ TQ_OBJECT
public:
enum Type
@@ -161,7 +163,7 @@ class GpsimDebugger : public QObject
* matches up the assembly file lines with the associated source file
* lines.
*/
- void associateLine( const QString & sourceFile, int sourceLine, const QString & assemblyFile, int assemblyLine );
+ void associateLine( const TQString & sourceFile, int sourceLine, const TQString & assemblyFile, int assemblyLine );
/**
* Check to see if we've hit a breakpoint or similar; if so, this
* function will stop the execution of the PIC program.
@@ -173,11 +175,11 @@ class GpsimDebugger : public QObject
* affected.
* @param path the location of the file (which gpsim must recognise).
*/
- void setBreakpoints( const QString & path, const IntList & lines );
+ void setBreakpoints( const TQString & path, const IntList & lines );
/**
* Sets / removes the breakpoint at the given line
*/
- void setBreakpoint( const QString & path, int line, bool isBreakpoint );
+ void setBreakpoint( const TQString & path, int line, bool isBreakpoint );
/**
* Returns the current source line that gpsim is at. By default, this
* will be the corresponding assembly line. That can be overwritten
@@ -192,7 +194,7 @@ class GpsimDebugger : public QObject
* @return the program address for the given line (or -1 if no such
* line).
*/
- int programAddress( const QString & path, int line );
+ int programAddress( const TQString & path, int line );
/**
* Step into the next program line.
*/
@@ -241,24 +243,25 @@ class GpsimDebugger : public QObject
/**
@author David Saxton
*/
-class GpsimProcessor : public QObject
+class GpsimProcessor : public TQObject
{
friend class GpsimDebugger;
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a new gpsim processor. After calling this constructor, you
- * should always call codLoadStatus() to ensure that the cod file was
+ * should always call codLoadtqStatus() to ensure that the cod file was
* loaded successfully.
*/
- GpsimProcessor( QString symbolFile, QObject *parent = 0 );
+ GpsimProcessor( TQString symbolFile, TQObject *tqparent = 0 );
~GpsimProcessor();
void setDebugMode( GpsimDebugger::Type mode ) { m_debugMode = mode; }
GpsimDebugger * currentDebugger() const { return m_pDebugger[m_debugMode]; }
- enum CodLoadStatus
+ enum CodLoadtqStatus
{
CodSuccess,
CodFileNotFound,
@@ -281,18 +284,18 @@ class GpsimProcessor : public QObject
/**
* @return status of opening the COD file
- * @see displayCodLoadStatus
+ * @see displayCodLoadtqStatus
*/
- CodLoadStatus codLoadStatus() const { return m_codLoadStatus; }
+ CodLoadtqStatus codLoadtqStatus() const { return m_codLoadtqStatus; }
/**
- * Popups a messagebox to the user according to the CodLoadStatus. Will
- * only popup a messagebox if the CodLoadStatus wasn't CodSuccess.
+ * Popups a messagebox to the user according to the CodLoadtqStatus. Will
+ * only popup a messagebox if the CodLoadtqStatus wasn't CodSuccess.
*/
- void displayCodLoadStatus();
+ void displayCodLoadtqStatus();
/**
* Returns a list of source files for the currently running program.
*/
- QStringList sourceFileList();
+ TQStringList sourceFileList();
/**
* Set whether or not to run gpsim. (i.e. whether or not the step
* function should do anything when called with force=false).
@@ -340,21 +343,21 @@ class GpsimProcessor : public QObject
/**
* @return information on the validity of the given program file (either
* DoesntExist, IncorrectType, or Valid).
- * @see static QString generateSymbolFile
+ * @see static TQString generateSymbolFile
*/
- static ProgramFileValidity isValidProgramFile( const QString & programFile );
+ static ProgramFileValidity isValidProgramFile( const TQString & programFile );
/**
* Converts the file at programFile to a Symbol file for emulation,
* and returns that symbol file's path
* @param programFile The full url to the file
* @param assembled The slot to connect the assembled signal to
- * @see static bool isValidProgramFile( const QString &programFile )
+ * @see static bool isValidProgramFile( const TQString &programFile )
*/
- static QString generateSymbolFile( const QString &fileName, QObject *receiver, const char *successMember, const char * failMember = 0l );
+ static TQString generateSymbolFile( const TQString &fileName, TQObject *receiver, const char *successMember, const char * failMember = 0l );
/**
*Compile microbe to output to the given filename
*/
- static void compileMicrobe( const QString &filename, QObject *receiver, const char * successMember, const char * failMember = 0l );
+ static void compileMicrobe( const TQString &filename, TQObject *receiver, const char * successMember, const char * failMember = 0l );
//END convenience functions for PIC files
signals:
@@ -370,8 +373,8 @@ class GpsimProcessor : public QObject
void emitLineReached();
pic_processor * m_pPicProcessor;
- CodLoadStatus m_codLoadStatus;
- const QString m_symbolFile;
+ CodLoadtqStatus m_codLoadtqStatus;
+ const TQString m_symbolFile;
RegisterSet * m_pRegisterMemory;
GpsimDebugger::Type m_debugMode;
GpsimDebugger * m_pDebugger[2]; // Asm, HLL
diff --git a/src/electronics/pin.cpp b/src/electronics/pin.cpp
index 56848fc..f9a08d8 100644
--- a/src/electronics/pin.cpp
+++ b/src/electronics/pin.cpp
@@ -13,10 +13,10 @@
#include <assert.h>
#include <kdebug.h>
-Pin::Pin( ECNode * parent )
+Pin::Pin( ECNode * tqparent )
{
- assert(parent);
- m_pECNode = parent;
+ assert(tqparent);
+ m_pECNode = tqparent;
m_voltage = 0.;
m_current = 0.;
m_eqId = -2;
@@ -70,7 +70,7 @@ void Pin::setSwitchConnected( Pin * pin, bool isConnected )
if (isConnected)
{
- if ( !m_switchConnectedPins.contains(pin) )
+ if ( !m_switchConnectedPins.tqcontains(pin) )
m_switchConnectedPins.append(pin);
}
else
@@ -80,14 +80,14 @@ void Pin::setSwitchConnected( Pin * pin, bool isConnected )
void Pin::addCircuitDependentPin( Pin * pin )
{
- if ( pin && !m_circuitDependentPins.contains(pin) )
+ if ( pin && !m_circuitDependentPins.tqcontains(pin) )
m_circuitDependentPins.append(pin);
}
void Pin::addGroundDependentPin( Pin * pin )
{
- if ( pin && !m_groundDependentPins.contains(pin) )
+ if ( pin && !m_groundDependentPins.tqcontains(pin) )
m_groundDependentPins.append(pin);
}
@@ -101,7 +101,7 @@ void Pin::removeDependentPins()
void Pin::addElement( Element * e )
{
- if ( !e || m_elementList.contains(e) )
+ if ( !e || m_elementList.tqcontains(e) )
return;
m_elementList.append(e);
}
@@ -115,7 +115,7 @@ void Pin::removeElement( Element * e )
void Pin::addSwitch( Switch * sw )
{
- if ( !sw || m_switchList.contains( sw ) )
+ if ( !sw || m_switchList.tqcontains( sw ) )
return;
m_switchList << sw;
}
@@ -129,14 +129,14 @@ void Pin::removeSwitch( Switch * sw )
void Pin::addInputWire( Wire * wire )
{
- if ( wire && !m_inputWireList.contains(wire) )
+ if ( wire && !m_inputWireList.tqcontains(wire) )
m_inputWireList << wire;
}
void Pin::addOutputWire( Wire * wire )
{
- if ( wire && !m_outputWireList.contains(wire) )
+ if ( wire && !m_outputWireList.tqcontains(wire) )
m_outputWireList << wire;
}
diff --git a/src/electronics/pin.h b/src/electronics/pin.h
index 1e10663..95aad7c 100644
--- a/src/electronics/pin.h
+++ b/src/electronics/pin.h
@@ -13,9 +13,9 @@
#include "wire.h"
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class ECNode;
class Element;
@@ -23,16 +23,16 @@ class Pin;
class Switch;
class Wire;
-typedef QValueList<Element*> ElementList;
-typedef QValueList<QGuardedPtr<Pin> > PinList;
-typedef QValueList<Switch*> SwitchList;
-typedef QValueList<QGuardedPtr<Wire> > WireList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueList<TQGuardedPtr<Pin> > PinList;
+typedef TQValueList<Switch*> SwitchList;
+typedef TQValueList<TQGuardedPtr<Wire> > WireList;
/**
@author David Saxton
*/
-class Pin : public QObject
+class Pin : public TQObject
{
public:
/**
@@ -53,10 +53,10 @@ class Pin : public QObject
gt_low = 15, // current sources
gt_never = 20 // everything else
};
- Pin( ECNode * parent );
+ Pin( ECNode * tqparent );
~Pin();
- ECNode * parentECNode() const { return m_pECNode; }
+ ECNode * tqparentECNode() const { return m_pECNode; }
/**
* This function returns the pins that are directly connected to this pins:
* either at the ends of connected wires, or via switches.
@@ -143,12 +143,12 @@ class Pin : public QObject
void removeDependentPins();
/**
* Returns the ids of the pins whose voltages will affect this pin.
- * @see void setDependentPins( QStringList ids )
+ * @see void setDependentPins( TQStringList ids )
*/
PinList circuitDependentPins() const { return m_circuitDependentPins; }
/**
* Returns the ids of the pins whose voltages will affect this pin.
- * @see void setDependentPins( QStringList ids )
+ * @see void setDependentPins( TQStringList ids )
*/
PinList groundDependentPins() const { return m_groundDependentPins; }
/**
diff --git a/src/electronics/port.cpp b/src/electronics/port.cpp
index 541195b..cb7f4fb 100644
--- a/src/electronics/port.cpp
+++ b/src/electronics/port.cpp
@@ -29,7 +29,7 @@ Port::~Port()
}
-QStringList Port::ports( unsigned probeResult )
+TQStringList Port::ports( unsigned probeResult )
{
return SerialPort::ports(probeResult) + ParallelPort::ports(probeResult);
}
@@ -99,24 +99,24 @@ bool SerialPort::pinState( Pin pin )
if ( m_file == -1 )
return false;
- int mask = 0;
+ int tqmask = 0;
switch ( pin )
{
case CD:
- mask = TIOCM_CD;
+ tqmask = TIOCM_CD;
break;
case RD:
- mask = TIOCM_SR;
+ tqmask = TIOCM_SR;
break;
case CTS:
- mask = TIOCM_CTS;
+ tqmask = TIOCM_CTS;
break;
case RI:
- mask = TIOCM_RI;
+ tqmask = TIOCM_RI;
break;
case TD:
@@ -127,7 +127,7 @@ bool SerialPort::pinState( Pin pin )
break;
}
- if ( mask == 0 )
+ if ( tqmask == 0 )
{
kdError() << k_funcinfo << "Bad pin " << pin << endl;
return false;
@@ -140,11 +140,11 @@ bool SerialPort::pinState( Pin pin )
return false;
}
- return bits & mask;
+ return bits & tqmask;
}
-Port::ProbeResult SerialPort::probe( const QString & port )
+Port::ProbeResult SerialPort::probe( const TQString & port )
{
int file = open( port.ascii(), O_NOCTTY | O_NONBLOCK | O_RDONLY );
if ( file == -1 )
@@ -161,7 +161,7 @@ Port::ProbeResult SerialPort::probe( const QString & port )
}
-bool SerialPort::openPort( const QString & port, speed_t baudRate )
+bool SerialPort::openPort( const TQString & port, speed_t baudRate )
{
closePort();
@@ -201,34 +201,34 @@ void SerialPort::closePort()
}
-QStringList SerialPort::ports( unsigned probeResult )
+TQStringList SerialPort::ports( unsigned probeResult )
{
- QStringList list;
+ TQStringList list;
for ( int i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/ttyS%1").arg(i);
+ TQString dev = TQString("/dev/ttyS%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/tts/%1").arg(i);
+ TQString dev = TQString("/dev/tts/%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/ttyUSB%1").arg(i);
+ TQString dev = TQString("/dev/ttyUSB%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/usb/tts/%1").arg(i);
+ TQString dev = TQString("/dev/usb/tts/%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
@@ -240,7 +240,7 @@ QStringList SerialPort::ports( unsigned probeResult )
//BEGIN class ParallelPort
-const int IRQ_MODE_BIT = 1 << 20; // Controls if pin 10 (Ack) causes interrupts
+const int IRTQ_MODE_BIT = 1 << 20; // Controls if pin 10 (Ack) causes interrupts
const int INPUT_MODE_BIT = 1 << 21; // Controls if the data pins are input or output
const int ALWAYS_INPUT_PINS = ParallelPort::STATUS_PINS;
@@ -277,10 +277,10 @@ void ParallelPort::reset()
{
m_file = -1;
m_reg[Data] = 0;
- m_reg[Status] = 0;
+ m_reg[tqStatus] = 0;
m_reg[Control] = 0;
- m_outputPins = INPUT_MODE_BIT | IRQ_MODE_BIT;
- m_inputPins = ALWAYS_INPUT_PINS | INPUT_MODE_BIT | IRQ_MODE_BIT;
+ m_outputPins = INPUT_MODE_BIT | IRTQ_MODE_BIT;
+ m_inputPins = ALWAYS_INPUT_PINS | INPUT_MODE_BIT | IRTQ_MODE_BIT;
}
@@ -309,7 +309,7 @@ int ParallelPort::pinState( int pins )
value |= ((readFromRegister( Data ) & ((pins & DATA_PINS) >> 0)) << 0);
if ( pins & STATUS_PINS )
- value |= ((readFromRegister( Status ) & ((pins & STATUS_PINS) >> 8)) << 8);
+ value |= ((readFromRegister( tqStatus ) & ((pins & STATUS_PINS) >> 8)) << 8);
if ( pins & CONTROL_PINS )
value |= ((readFromRegister( Control ) & ((pins & CONTROL_PINS) >> 16)) << 16);
@@ -429,7 +429,7 @@ void ParallelPort::setControlDirection( int pins, Direction dir )
//END Changing pin directions
-Port::ProbeResult ParallelPort::probe( const QString & port )
+Port::ProbeResult ParallelPort::probe( const TQString & port )
{
int file = open( port.ascii(), O_RDWR );
if ( file == -1 )
@@ -447,20 +447,20 @@ Port::ProbeResult ParallelPort::probe( const QString & port )
}
-QStringList ParallelPort::ports( unsigned probeResult )
+TQStringList ParallelPort::ports( unsigned probeResult )
{
- QStringList list;
+ TQStringList list;
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/parport%1").arg(i);
+ TQString dev = TQString("/dev/parport%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
for ( unsigned i = 0; i < 8; ++i )
{
- QString dev = QString("/dev/parports/%1").arg(i);
+ TQString dev = TQString("/dev/parports/%1").tqarg(i);
if ( probe(dev) & probeResult )
list << dev;
}
@@ -469,7 +469,7 @@ QStringList ParallelPort::ports( unsigned probeResult )
}
-bool ParallelPort::openPort( const QString & port )
+bool ParallelPort::openPort( const TQString & port )
{
if ( m_file != -1 )
{
diff --git a/src/electronics/port.h b/src/electronics/port.h
index 53182bc..d51cf5d 100644
--- a/src/electronics/port.h
+++ b/src/electronics/port.h
@@ -11,7 +11,7 @@
#ifndef PORT_H
#define PORT_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <termios.h>
@@ -36,7 +36,7 @@ class Port
* This function just returns the combination of the lists for
* SerialPort::ports and ParallelPort::ports.
*/
- static QStringList ports( unsigned probeResult );
+ static TQStringList ports( unsigned probeResult );
};
@@ -70,17 +70,17 @@ class SerialPort : public Port
void setPinState( Pin pin, bool state );
bool pinState( Pin pin );
- static ProbeResult probe( const QString & port );
+ static ProbeResult probe( const TQString & port );
/**
* @see Port::ports
*/
- static QStringList ports( unsigned probeResult );
+ static TQStringList ports( unsigned probeResult );
/**
* Opens the given port.
* @return if the port could be opened.
* @param baudRate The baud rate as defined in bits/termios.h
*/
- bool openPort( const QString & port, speed_t baudRate );
+ bool openPort( const TQString & port, speed_t baudRate );
/**
* Closes any currently open port.
*/
@@ -120,7 +120,7 @@ class ParallelPort : public Port
DATA_PINS = PIN02 | PIN03 | PIN04 | PIN05 | PIN06
| PIN07 | PIN08 | PIN09,
- // Status Register
+ // tqStatus Register
// Offset: Base + 1
// Read only
PIN15 = 1 << 11, // Error
@@ -146,7 +146,7 @@ class ParallelPort : public Port
enum Register
{
Data = 0,
- Status = 1,
+ tqStatus = 1,
Control = 2,
};
@@ -166,7 +166,7 @@ class ParallelPort : public Port
* Opens the given port.
* @return if the port could be opened.
*/
- bool openPort( const QString & port );
+ bool openPort( const TQString & port );
/**
* Closes any currently open port.
*/
@@ -220,11 +220,11 @@ class ParallelPort : public Port
void setControlDirection( int pins, Direction dir );
//END Changing pin directions
- static ProbeResult probe( const QString & port );
+ static ProbeResult probe( const TQString & port );
/**
* @see Port::ports
*/
- static QStringList ports( unsigned probeResult );
+ static TQStringList ports( unsigned probeResult );
protected:
/**
diff --git a/src/electronics/simulation/capacitance.cpp b/src/electronics/simulation/capacitance.cpp
index 9087c7f..c289f90 100644
--- a/src/electronics/simulation/capacitance.cpp
+++ b/src/electronics/simulation/capacitance.cpp
@@ -101,9 +101,9 @@ void Capacitance::time_step()
i_eq_old = i_eq_new;
}
-bool Capacitance::updateStatus()
+bool Capacitance::updatetqStatus()
{
- b_status = Reactive::updateStatus();
+ b_status = Reactive::updatetqStatus();
if ( m_method == Capacitance::m_none ) b_status = false;
return b_status;
}
@@ -111,7 +111,7 @@ bool Capacitance::updateStatus()
void Capacitance::setMethod( Method m )
{
m_method = m;
- updateStatus();
+ updatetqStatus();
}
diff --git a/src/electronics/simulation/capacitance.h b/src/electronics/simulation/capacitance.h
index ccc083d..b26899c 100644
--- a/src/electronics/simulation/capacitance.h
+++ b/src/electronics/simulation/capacitance.h
@@ -42,7 +42,7 @@ public:
protected:
virtual void updateCurrents();
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
private:
double m_cap; // Capacitance
diff --git a/src/electronics/simulation/circuit.cpp b/src/electronics/simulation/circuit.cpp
index c152756..c138a7a 100644
--- a/src/electronics/simulation/circuit.cpp
+++ b/src/electronics/simulation/circuit.cpp
@@ -50,19 +50,19 @@ Circuit::~Circuit()
void Circuit::addPin( Pin *node )
{
- if ( m_pinList.contains(node) ) return;
+ if ( m_pinList.tqcontains(node) ) return;
m_pinList.append(node);
}
void Circuit::addElement( Element *element )
{
- if ( m_elementList.contains(element) ) return;
+ if ( m_elementList.tqcontains(element) ) return;
m_elementList.append(element);
}
-bool Circuit::contains( Pin *node )
+bool Circuit::tqcontains( Pin *node )
{
- return m_pinList.contains(node);
+ return m_pinList.tqcontains(node);
}
@@ -427,7 +427,7 @@ void Circuit::createMatrixMap()
bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *associated, PinList *nodes )
{
- if ( !unassignedNodes->contains(node) )
+ if ( !unassignedNodes->tqcontains(node) )
return false;
unassignedNodes->remove(node);
@@ -437,7 +437,7 @@ bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *ass
const PinList::const_iterator dEnd = circuitDependentPins.end();
for ( PinList::const_iterator it = circuitDependentPins.begin(); it != dEnd; ++it )
{
- if ( !associated->contains(*it) )
+ if ( !associated->tqcontains(*it) )
associated->append(*it);
}
diff --git a/src/electronics/simulation/circuit.h b/src/electronics/simulation/circuit.h
index 2455edc..c8c53cd 100644
--- a/src/electronics/simulation/circuit.h
+++ b/src/electronics/simulation/circuit.h
@@ -11,9 +11,9 @@
#ifndef CIRCUIT_H
#define CIRCUIT_H
-#include <qguardedptr.h>
-#include "qstringlist.h"
-#include "qvaluelist.h"
+#include <tqguardedptr.h>
+#include "tqstringlist.h"
+#include "tqvaluelist.h"
#include "elementset.h"
@@ -23,8 +23,8 @@ class Pin;
class Element;
class LogicOut;
-typedef QValueList<QGuardedPtr<Pin> > PinList;
-typedef QValueList<Element*> ElementList;
+typedef TQValueList<TQGuardedPtr<Pin> > PinList;
+typedef TQValueList<Element*> ElementList;
class LogicCacheNode
@@ -60,7 +60,7 @@ class Circuit
void addPin( Pin *node );
void addElement( Element *element );
- bool contains( Pin *node );
+ bool tqcontains( Pin *node );
bool containsNonLinear() const { return m_elementSet->containsNonLinear(); }
void init();
@@ -70,7 +70,7 @@ class Circuit
*/
void initCache();
/**
- * Marks all cached results as invalidated and removes them.
+ * Marks all cached results as tqinvalidated and removes them.
*/
void setCacheInvalidated();
/**
diff --git a/src/electronics/simulation/element.cpp b/src/electronics/simulation/element.cpp
index 2411897..46f0442 100644
--- a/src/electronics/simulation/element.cpp
+++ b/src/electronics/simulation/element.cpp
@@ -55,7 +55,7 @@ void Element::setElementSet( ElementSet *c )
p_eSet = c;
p_A = p_eSet->matrix();
p_b = p_eSet->b();
- updateStatus();
+ updatetqStatus();
}
void Element::componentDeleted()
@@ -113,7 +113,7 @@ void Element::setCNodes( const int n0, const int n1, const int n2, const int n3
p_cnode[1] = (n1>-1)?p_eSet->cnodes()[n1]:(n1==-1?p_eSet->ground():0l);
p_cnode[2] = (n2>-1)?p_eSet->cnodes()[n2]:(n2==-1?p_eSet->ground():0l);
p_cnode[3] = (n3>-1)?p_eSet->cnodes()[n3]:(n3==-1?p_eSet->ground():0l);
- updateStatus();
+ updatetqStatus();
}
void Element::setCBranches( const int b0, const int b1, const int b2, const int b3 )
@@ -128,10 +128,10 @@ void Element::setCBranches( const int b0, const int b1, const int b2, const int
p_cbranch[1] = (b1>-1)?p_eSet->cbranches()[b1]:0l;
p_cbranch[2] = (b2>-1)?p_eSet->cbranches()[b2]:0l;
p_cbranch[3] = (b3>-1)?p_eSet->cbranches()[b3]:0l;
- updateStatus();
+ updatetqStatus();
}
-bool Element::updateStatus()
+bool Element::updatetqStatus()
{
// First, set status to false if all nodes in use are ground
b_status = false;
@@ -160,7 +160,7 @@ bool Element::updateStatus()
resetCurrents();
}
// And return the status :-)
-// kdDebug() << "Element::updateStatus(): Setting b_status to "<<(b_status?"true":"false")<<" this="<<this<<endl;
+// kdDebug() << "Element::updatetqStatus(): Setting b_status to "<<(b_status?"true":"false")<<" this="<<this<<endl;
return b_status;
}
diff --git a/src/electronics/simulation/element.h b/src/electronics/simulation/element.h
index e05de46..7b219c9 100644
--- a/src/electronics/simulation/element.h
+++ b/src/electronics/simulation/element.h
@@ -188,7 +188,7 @@ protected:
/**
* Update the status, returning b_status
*/
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
/**
* Set by child class - the number of branches that the element uses
* Typically, this is 0, but could be 1 (e.g. independent voltage source)
diff --git a/src/electronics/simulation/elementset.cpp b/src/electronics/simulation/elementset.cpp
index 25057c2..8a0adc9 100644
--- a/src/electronics/simulation/elementset.cpp
+++ b/src/electronics/simulation/elementset.cpp
@@ -87,7 +87,7 @@ void ElementSet::setCacheInvalidated()
void ElementSet::addElement( Element *e )
{
- if ( !e || m_elementList.contains(e) ) return;
+ if ( !e || m_elementList.tqcontains(e) ) return;
e->setElementSet(this);
m_elementList.append(e);
if ( e->isNonLinear() )
diff --git a/src/electronics/simulation/elementset.h b/src/electronics/simulation/elementset.h
index c7ef7ca..317d8be 100644
--- a/src/electronics/simulation/elementset.h
+++ b/src/electronics/simulation/elementset.h
@@ -13,7 +13,7 @@
#include <vector>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class CBranch;
class Circuit;
@@ -25,8 +25,8 @@ class Matrix;
class NonLinear;
class Vector;
-typedef QValueList<Element*> ElementList;
-typedef QValueList<NonLinear*> NonLinearList;
+typedef TQValueList<Element*> ElementList;
+typedef TQValueList<NonLinear*> NonLinearList;
/**
Steps in simulation of a set of elements:
diff --git a/src/electronics/simulation/inductance.cpp b/src/electronics/simulation/inductance.cpp
index 22c5f9e..6737ab6 100644
--- a/src/electronics/simulation/inductance.cpp
+++ b/src/electronics/simulation/inductance.cpp
@@ -109,9 +109,9 @@ void Inductance::time_step()
}
-bool Inductance::updateStatus()
+bool Inductance::updatetqStatus()
{
- b_status = Reactive::updateStatus();
+ b_status = Reactive::updatetqStatus();
if ( m_method == Inductance::m_none )
b_status = false;
return b_status;
@@ -121,6 +121,6 @@ bool Inductance::updateStatus()
void Inductance::setMethod( Method m )
{
m_method = m;
- updateStatus();
+ updatetqStatus();
}
diff --git a/src/electronics/simulation/inductance.h b/src/electronics/simulation/inductance.h
index 46ccb09..e4bd119 100644
--- a/src/electronics/simulation/inductance.h
+++ b/src/electronics/simulation/inductance.h
@@ -42,7 +42,7 @@ class Inductance : public Reactive
protected:
virtual void updateCurrents();
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
private:
double m_inductance; // Inductance
diff --git a/src/electronics/simulation/logic.h b/src/electronics/simulation/logic.h
index be8374f..40ab498 100644
--- a/src/electronics/simulation/logic.h
+++ b/src/electronics/simulation/logic.h
@@ -13,14 +13,14 @@
#include "element.h"
-#include <qguardedptr.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
class Component;
class Pin;
class Simulator;
-typedef QValueList<QGuardedPtr<Pin> > PinList;
+typedef TQValueList<TQGuardedPtr<Pin> > PinList;
typedef struct
{
diff --git a/src/electronics/simulation/reactive.cpp b/src/electronics/simulation/reactive.cpp
index 83fcfd4..c753f42 100644
--- a/src/electronics/simulation/reactive.cpp
+++ b/src/electronics/simulation/reactive.cpp
@@ -26,11 +26,11 @@ Reactive::~Reactive()
void Reactive::setDelta( double delta )
{
m_delta = delta;
- updateStatus();
+ updatetqStatus();
}
-bool Reactive::updateStatus()
+bool Reactive::updatetqStatus()
{
- return Element::updateStatus();
+ return Element::updatetqStatus();
}
diff --git a/src/electronics/simulation/reactive.h b/src/electronics/simulation/reactive.h
index 1142b34..a93459b 100644
--- a/src/electronics/simulation/reactive.h
+++ b/src/electronics/simulation/reactive.h
@@ -34,7 +34,7 @@ public:
virtual void time_step() = 0;
protected:
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
double m_delta; // Delta time interval
};
diff --git a/src/electronics/subcircuits.cpp b/src/electronics/subcircuits.cpp
index 65ae8e3..18ff615 100644
--- a/src/electronics/subcircuits.cpp
+++ b/src/electronics/subcircuits.cpp
@@ -20,13 +20,13 @@
#include <kdebug.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
Subcircuits::Subcircuits()
- : QObject()
+ : TQObject()
{
- connect( ComponentSelector::self(), SIGNAL(itemRemoved(const QString& )), this, SLOT(slotItemRemoved(const QString& )) );
+ connect( ComponentSelector::self(), TQT_SIGNAL(itemRemoved(const TQString& )), this, TQT_SLOT(slotItemRemoved(const TQString& )) );
}
@@ -37,8 +37,8 @@ Subcircuits::~Subcircuits()
void Subcircuits::initECSubcircuit( int subcircuitId, ECSubcircuit *ecSubcircuit )
{
- const QString fileName = genFileName(subcircuitId);
- if ( !QFile::exists(fileName) )
+ const TQString fileName = genFileName(subcircuitId);
+ if ( !TQFile::exists(fileName) )
{
kdDebug() << "Subcircuits::createSubcircuit: Subcircuit \""<<fileName<<"\" was not found."<<endl;
return;
@@ -68,11 +68,11 @@ void Subcircuits::loadSubcircuits()
KConfig *config = kapp->config();
config->setGroup("Subcircuits");
- QValueList<int> idList = config->readIntListEntry("Ids");
- const QValueList<int>::iterator idListEnd = idList.end();
- for ( QValueList<int>::iterator it = idList.begin(); it != idListEnd; ++it )
+ TQValueList<int> idList = config->readIntListEntry("Ids");
+ const TQValueList<int>::iterator idListEnd = idList.end();
+ for ( TQValueList<int>::iterator it = idList.begin(); it != idListEnd; ++it )
{
- QFile file( genFileName(*it) );
+ TQFile file( genFileName(*it) );
if ( file.open(IO_ReadOnly) == false )
{
// File has mysteriously disappeared....
@@ -80,7 +80,7 @@ void Subcircuits::loadSubcircuits()
}
else
{
- config->setGroup("Subcircuit_"+QString::number(*it));
+ config->setGroup("Subcircuit_"+TQString::number(*it));
updateComponentSelector( *it, config->readEntry("Name") );
}
file.close();
@@ -93,36 +93,36 @@ void Subcircuits::loadSubcircuits()
}
-QString Subcircuits::genFileName( const int nextId )
+TQString Subcircuits::genFileName( const int nextId )
{
- return locateLocal( "appdata", "subcircuit_"+QString::number(nextId)+".circuit" );
+ return locateLocal( "appdata", "subcircuit_"+TQString::number(nextId)+".circuit" );
}
-void Subcircuits::updateComponentSelector( int id, const QString &name )
+void Subcircuits::updateComponentSelector( int id, const TQString &name )
{
if ( name.isEmpty() )
return;
- ComponentSelector::self()->addItem( name, "sc/"+QString::number(id), "Subcircuits", KGlobal::iconLoader()->loadIcon( "ktechlab_circuit", KIcon::Small ), true );
+ ComponentSelector::self()->addItem( name, "sc/"+TQString::number(id), "Subcircuits", KGlobal::iconLoader()->loadIcon( "ktechlab_circuit", KIcon::Small ), true );
}
-void Subcircuits::addSubcircuit( const QString &name, const QString &subcircuitXml )
+void Subcircuits::addSubcircuit( const TQString &name, const TQString &subcircuitXml )
{
KConfig *config = kapp->config();
config->setGroup("Subcircuits");
int nextId = config->readNumEntry( "NextId", 0 );
- while ( QFile::exists( genFileName(nextId) ) ) {
+ while ( TQFile::exists( genFileName(nextId) ) ) {
nextId++;
}
const int id = nextId;
- const QString fileName = genFileName(id);
- QFile file(fileName);
+ const TQString fileName = genFileName(id);
+ TQFile file(fileName);
if ( file.open(IO_WriteOnly) == false )
{
@@ -130,16 +130,16 @@ void Subcircuits::addSubcircuit( const QString &name, const QString &subcircuitX
return;
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << subcircuitXml;
file.close();
- QValueList<int> idList = config->readIntListEntry("Ids");
+ TQValueList<int> idList = config->readIntListEntry("Ids");
idList += id;
config->writeEntry( "Ids", idList );
config->writeEntry( "NextId", ++nextId );
- config->setGroup("Subcircuit_"+QString::number(id));
+ config->setGroup("Subcircuit_"+TQString::number(id));
config->writeEntry( "Name", name );
// It's important that we write the configuration *now*, lest the subcircuits be lost
@@ -149,22 +149,22 @@ void Subcircuits::addSubcircuit( const QString &name, const QString &subcircuitX
}
-void Subcircuits::slotItemRemoved( const QString &id )
+void Subcircuits::slotItemRemoved( const TQString &id )
{
if ( !id.startsWith("sc/") ) {
return;
}
- QString temp = id;
+ TQString temp = id;
temp.remove("sc/");
const int id_num = temp.toInt();
- const QString fileName = genFileName(id_num);
- QFile file(fileName);
+ const TQString fileName = genFileName(id_num);
+ TQFile file(fileName);
file.remove();
KConfig *config = kapp->config();
config->setGroup("Subcircuits");
- QValueList<int> idList = config->readIntListEntry("Ids");
+ TQValueList<int> idList = config->readIntListEntry("Ids");
idList.remove(id_num);
config->writeEntry( "Ids", idList );
}
diff --git a/src/electronics/subcircuits.h b/src/electronics/subcircuits.h
index 3f08dd9..af56b00 100644
--- a/src/electronics/subcircuits.h
+++ b/src/electronics/subcircuits.h
@@ -11,7 +11,7 @@
#ifndef SUBCIRCUITS_H
#define SUBCIRCUITS_H
-#include <qobject.h>
+#include <tqobject.h>
class CircuitDocument;
class ECSubcircuit;
@@ -22,9 +22,10 @@ inline Subcircuits *subcircuits();
Interface for dealing with loading / saving / etc of subcircuits
@author David Saxton
*/
-class Subcircuits : public QObject
+class Subcircuits : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
~Subcircuits();
/**
@@ -46,19 +47,19 @@ public:
* Saves the given subcircuit to the appdata dir, updates the appropriate
* config entries, and adds the subcircuit to the component selector.
*/
- static void addSubcircuit( const QString &name, const QString &subcircuitXml );
+ static void addSubcircuit( const TQString &name, const TQString &subcircuitXml );
/**
* returns a path to the appdata dir, e.g. genFileName(2) might return
* ~/.kde/share/apps/ktechlab/subcircuit_2.circuit
*/
- static QString genFileName( const int nextId );
+ static TQString genFileName( const int nextId );
/**
* Adds the given entry to the component selector
*/
- static void updateComponentSelector( int id, const QString &name );
+ static void updateComponentSelector( int id, const TQString &name );
protected slots:
- void slotItemRemoved( const QString &id );
+ void slotItemRemoved( const TQString &id );
private:
Subcircuits();
diff --git a/src/electronics/switch.cpp b/src/electronics/switch.cpp
index 7cbda70..f91095a 100644
--- a/src/electronics/switch.cpp
+++ b/src/electronics/switch.cpp
@@ -17,13 +17,13 @@
#include "switch.h"
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <cmath>
#include <stdlib.h> // for rand
#include <time.h>
-Switch::Switch( Component * parent, Pin * p1, Pin * p2, State state )
+Switch::Switch( Component * tqparent, Pin * p1, Pin * p2, State state )
{
m_bouncePeriod_ms = 5;
m_bBounce = false;
@@ -31,9 +31,9 @@ Switch::Switch( Component * parent, Pin * p1, Pin * p2, State state )
m_pBounceResistance = 0l;
m_pP1 = p1;
m_pP2 = p2;
- m_pComponent = parent;
- m_pStopBouncingTimer = new QTimer( this );
- connect( m_pStopBouncingTimer, SIGNAL(timeout()), this, SLOT(stopBouncing()) );
+ m_pComponent = tqparent;
+ m_pStopBouncingTimer = new TQTimer( this );
+ connect( m_pStopBouncingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(stopBouncing()) );
// Force update
m_state = (state == Open) ? Closed : Open;
diff --git a/src/electronics/switch.h b/src/electronics/switch.h
index 40247c9..17fd493 100644
--- a/src/electronics/switch.h
+++ b/src/electronics/switch.h
@@ -11,21 +11,22 @@
#ifndef SWITCH_H
#define SWITCH_H
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class CircuitDocument;
class Component;
class Pin;
class Resistance;
-class QTimer;
+class TQTimer;
/**
@author David Saxton
*/
-class Switch : public QObject
+class Switch : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum State
@@ -34,7 +35,7 @@ class Switch : public QObject
Closed,
};
- Switch( Component * parent, Pin * p1, Pin * p2, State state );
+ Switch( Component * tqparent, Pin * p1, Pin * p2, State state );
~Switch();
/**
* If bouncing has been set to true, then the state will not switch
@@ -63,7 +64,7 @@ class Switch : public QObject
protected slots:
/**
- * Called from a QTimer timeout - our bouncing period has come to an
+ * Called from a TQTimer timeout - our bouncing period has come to an
* end. This will then fully disconnect or connect the pins depending
* on the current state.
*/
@@ -78,9 +79,9 @@ class Switch : public QObject
Resistance * m_pBounceResistance;
State m_state;
Component * m_pComponent;
- QGuardedPtr<Pin> m_pP1;
- QGuardedPtr<Pin> m_pP2;
- QTimer * m_pStopBouncingTimer;
+ TQGuardedPtr<Pin> m_pP1;
+ TQGuardedPtr<Pin> m_pP2;
+ TQTimer * m_pStopBouncingTimer;
};
#endif
diff --git a/src/electronics/wire.h b/src/electronics/wire.h
index 368004c..97115df 100644
--- a/src/electronics/wire.h
+++ b/src/electronics/wire.h
@@ -11,15 +11,15 @@
#ifndef WIRE_H
#define WIRE_H
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class Pin;
/**
@author David Saxton
*/
-class Wire : public QObject
+class Wire : public TQObject
{
public:
Wire( Pin * startPin, Pin * endPin );
@@ -57,8 +57,8 @@ class Wire : public QObject
protected:
double m_current;
bool m_bCurrentIsKnown;
- QGuardedPtr<Pin> m_pStartPin;
- QGuardedPtr<Pin> m_pEndPin;
+ TQGuardedPtr<Pin> m_pStartPin;
+ TQGuardedPtr<Pin> m_pEndPin;
};
#endif
diff --git a/src/eventinfo.cpp b/src/eventinfo.cpp
index f6c0746..3a63c30 100644
--- a/src/eventinfo.cpp
+++ b/src/eventinfo.cpp
@@ -19,21 +19,21 @@ EventInfo::EventInfo()
}
-EventInfo::EventInfo( ItemView *itemView, QEvent *e )
+EventInfo::EventInfo( ItemView *itemView, TQEvent *e )
{
Q_UNUSED(itemView);
Q_UNUSED(e);
reset();
}
-EventInfo::EventInfo( ItemView *itemView, QMouseEvent *e )
+EventInfo::EventInfo( ItemView *itemView, TQMouseEvent *e )
{
pos = e->pos()/itemView->zoomLevel();
globalPos = e->globalPos();
isRightClick = e->button() == Qt::RightButton;
- ctrlPressed = e->state() & QMouseEvent::ControlButton;
- shiftPressed = e->state() & QMouseEvent::ShiftButton;
- altPressed = e->state() & QMouseEvent::AltButton;
+ ctrlPressed = e->state() & TQt::ControlButton;
+ shiftPressed = e->state() & TQt::ShiftButton;
+ altPressed = e->state() & TQt::AltButton;
if ( ItemDocument * id = dynamic_cast<ItemDocument*>(itemView->document()) )
qcanvasItemClickedOn = id->itemAtTop(pos);
itemRtti = qcanvasItemClickedOn ? qcanvasItemClickedOn->rtti() : ItemDocument::RTTI::None;
@@ -42,14 +42,14 @@ EventInfo::EventInfo( ItemView *itemView, QMouseEvent *e )
}
-EventInfo::EventInfo( ItemView *itemView, QWheelEvent *e )
+EventInfo::EventInfo( ItemView *itemView, TQWheelEvent *e )
{
pos = e->pos()/itemView->zoomLevel();
globalPos = e->globalPos();
isRightClick = false;
- ctrlPressed = e->state() & QMouseEvent::ControlButton;
- shiftPressed = e->state() & QMouseEvent::ShiftButton;
- altPressed = e->state() & QMouseEvent::AltButton;
+ ctrlPressed = e->state() & TQt::ControlButton;
+ shiftPressed = e->state() & TQt::ShiftButton;
+ altPressed = e->state() & TQt::AltButton;
if ( ItemDocument * id = dynamic_cast<ItemDocument*>(itemView->document()) )
qcanvasItemClickedOn = id->itemAtTop(pos);
itemRtti = qcanvasItemClickedOn ? qcanvasItemClickedOn->rtti() : ItemDocument::RTTI::None;
@@ -73,60 +73,60 @@ void EventInfo::reset()
}
-QMouseEvent *EventInfo::mousePressEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mousePressEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseButtonPress,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseButtonPress,
+ pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) |
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QMouseEvent *EventInfo::mouseReleaseEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mouseReleaseEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseButtonRelease,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseButtonRelease,
+ pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) |
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QMouseEvent *EventInfo::mouseDoubleClickEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mouseDoubleClickEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseButtonDblClick,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseButtonDblClick,
+ pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) |
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QMouseEvent *EventInfo::mouseMoveEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mouseMoveEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseMove,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseMove,
+ pos + TQPoint( dx, dy ),
Qt::NoButton,
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QWheelEvent *EventInfo::wheelEvent( int dx, int dy ) const
+TQWheelEvent *EventInfo::wheelEvent( int dx, int dy ) const
{
- return new QWheelEvent( pos + QPoint( dx, dy ),
+ return new TQWheelEvent( pos + TQPoint( dx, dy ),
scrollDelta,
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ),
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ),
scrollOrientation );
}
diff --git a/src/eventinfo.h b/src/eventinfo.h
index ddea10c..35d31d9 100644
--- a/src/eventinfo.h
+++ b/src/eventinfo.h
@@ -11,18 +11,18 @@
#ifndef EVENTINFO_H
#define EVENTINFO_H
-#include <qpoint.h>
+#include <tqpoint.h>
class ItemView;
-class QCanvasItem;
-class QEvent;
-class QMouseEvent;
-class QWheelEvent;
+class TQCanvasItem;
+class TQEvent;
+class TQMouseEvent;
+class TQWheelEvent;
/**
Contains information from for a mouse event that occured on a canvas. Like a
-QMouseEvent / QEvent / QWheelEvent, but abstracted to the canvas coordinate
+TQMouseEvent / TQEvent / TQWheelEvent, but abstracted to the canvas coordinate
system, as well as holding lots of useful information.
@author David Saxton
*/
@@ -30,19 +30,19 @@ class EventInfo
{
public:
EventInfo();
- EventInfo( ItemView *itemView, QMouseEvent *e );
- EventInfo( ItemView *itemView, QWheelEvent *e );
- EventInfo( ItemView *itemView, QEvent *e );
+ EventInfo( ItemView *itemView, TQMouseEvent *e );
+ EventInfo( ItemView *itemView, TQWheelEvent *e );
+ EventInfo( ItemView *itemView, TQEvent *e );
- QMouseEvent *mousePressEvent( int dx, int dy ) const;
- QMouseEvent *mouseReleaseEvent( int dx, int dy ) const;
- QMouseEvent *mouseDoubleClickEvent( int dx, int dy ) const;
- QMouseEvent *mouseMoveEvent( int dx, int dy ) const;
- QWheelEvent *wheelEvent( int dx, int dy ) const;
+ TQMouseEvent *mousePressEvent( int dx, int dy ) const;
+ TQMouseEvent *mouseReleaseEvent( int dx, int dy ) const;
+ TQMouseEvent *mouseDoubleClickEvent( int dx, int dy ) const;
+ TQMouseEvent *mouseMoveEvent( int dx, int dy ) const;
+ TQWheelEvent *wheelEvent( int dx, int dy ) const;
- QPoint pos;
- QPoint globalPos;
- QCanvasItem *qcanvasItemClickedOn;
+ TQPoint pos;
+ TQPoint globalPos;
+ TQCanvasItem *qcanvasItemClickedOn;
int itemRtti;
short scrollDelta;
Qt::Orientation scrollOrientation;
diff --git a/src/filemetainfo.cpp b/src/filemetainfo.cpp
index 34baccd..7c3c630 100644
--- a/src/filemetainfo.cpp
+++ b/src/filemetainfo.cpp
@@ -57,7 +57,7 @@ void MetaInfo::load( KConfig * conf )
}
-OutputMethodInfo::Method::Type MetaInfo::toMethod( const QString & id )
+OutputMethodInfo::Method::Type MetaInfo::toMethod( const TQString & id )
{
if ( id == "SaveAndLoad" )
return OutputMethodInfo::Method::SaveAndLoad;
@@ -69,7 +69,7 @@ OutputMethodInfo::Method::Type MetaInfo::toMethod( const QString & id )
}
-QString MetaInfo::toID( OutputMethodInfo::Method::Type method )
+TQString MetaInfo::toID( OutputMethodInfo::Method::Type method )
{
switch (method)
{
@@ -89,7 +89,7 @@ QString MetaInfo::toID( OutputMethodInfo::Method::Type method )
//BEGIN class FileMetaInfo
FileMetaInfo::FileMetaInfo()
- : QObject()
+ : TQObject()
{
m_metaInfoConfig = new KConfig( "metainfo", false, false, "appdata" );
loadAllMetaInfo();
@@ -153,7 +153,7 @@ void FileMetaInfo::grabMetaInfo( const KURL & url, OutputMethodDlg * dlg )
void FileMetaInfo::initializeFromMetaInfo( const KURL & url, OutputMethodDlg * dlg )
{
- if ( !dlg || url.isEmpty() || !m_metaInfoMap.contains(url) )
+ if ( !dlg || url.isEmpty() || !m_metaInfoMap.tqcontains(url) )
return;
OutputMethodInfo::Method::Type method = m_metaInfoMap[url].outputMethodInfo().method();
@@ -185,9 +185,9 @@ void FileMetaInfo::saveAllMetaInfo()
void FileMetaInfo::loadAllMetaInfo()
{
- QStringList urlList = m_metaInfoConfig->groupList();
- const QStringList::iterator end = urlList.end();
- for ( QStringList::iterator it = urlList.begin(); it != end; ++it )
+ TQStringList urlList = m_metaInfoConfig->groupList();
+ const TQStringList::iterator end = urlList.end();
+ for ( TQStringList::iterator it = urlList.begin(); it != end; ++it )
{
m_metaInfoConfig->setGroup(*it);
m_metaInfoMap[*it].load(m_metaInfoConfig);
diff --git a/src/filemetainfo.h b/src/filemetainfo.h
index 9004217..45d85de 100644
--- a/src/filemetainfo.h
+++ b/src/filemetainfo.h
@@ -17,7 +17,7 @@
class TextDocument;
class TextView;
class KConfig;
-typedef QValueList<int> IntList;
+typedef TQValueList<int> IntList;
class MetaInfo
{
@@ -59,12 +59,12 @@ class MetaInfo
* Convert the id (e.g. "Direct") to a method, used when reading in the
* config file.
*/
- OutputMethodInfo::Method::Type toMethod( const QString & id );
+ OutputMethodInfo::Method::Type toMethod( const TQString & id );
/**
* Conver the method (e.g. OutputMethodInfo::Method::Direct) to an id
* that can be saved in the config file.
*/
- QString toID( OutputMethodInfo::Method::Type method );
+ TQString toID( OutputMethodInfo::Method::Type method );
IntList m_bookmarks;
IntList m_breakpoints;
@@ -72,16 +72,17 @@ class MetaInfo
unsigned m_cursorLine;
unsigned m_cursorColumn;
};
-typedef QMap<KURL,MetaInfo> MetaInfoMap;
+typedef TQMap<KURL,MetaInfo> MetaInfoMap;
/**
Looks after per-file metainfo; e.g. bookmarks, breakpoints, compiling options, etc
@author David Saxton
*/
-class FileMetaInfo : public QObject
+class FileMetaInfo : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
~FileMetaInfo();
diff --git a/src/flowcodedocument.cpp b/src/flowcodedocument.cpp
index ad2c346..e8d7512 100644
--- a/src/flowcodedocument.cpp
+++ b/src/flowcodedocument.cpp
@@ -27,7 +27,7 @@
#include <klocale.h>
#include <kmessagebox.h>
-FlowCodeDocument::FlowCodeDocument( const QString &caption, KTechlab *ktechlab, const char *name )
+FlowCodeDocument::FlowCodeDocument( const TQString &caption, KTechlab *ktechlab, const char *name )
: ICNDocument( caption, ktechlab, name )
{
m_pDocumentIface = new FlowCodeDocumentIface(this);
@@ -71,7 +71,7 @@ View *FlowCodeDocument::createView( ViewContainer *viewContainer, uint viewAreaI
}
-void FlowCodeDocument::setPicType( const QString &id )
+void FlowCodeDocument::setPicType( const TQString &id )
{
if ( m_microSettings && m_microSettings->microInfo() && m_microSettings->microInfo()->id() == id )
return;
@@ -93,7 +93,7 @@ void FlowCodeDocument::setPicType( const QString &id )
}
m_microSettings = new MicroSettings(m_microInfo);
- connect( m_microSettings, SIGNAL(pinMappingsChanged()), this, SIGNAL(pinMappingsChanged()) );
+ connect( m_microSettings, TQT_SIGNAL(pinMappingsChanged()), this, TQT_SIGNAL(pinMappingsChanged()) );
//TODO restore pic settings from temporary location if appropriate
delete m_picItem;
@@ -104,7 +104,7 @@ void FlowCodeDocument::setPicType( const QString &id )
}
-bool FlowCodeDocument::isValidItem( const QString &itemId )
+bool FlowCodeDocument::isValidItem( const TQString &itemId )
{
return itemId.startsWith("flow/") || itemId.startsWith("dp/");
}
@@ -191,7 +191,7 @@ void FlowCodeDocument::convertToMicrobe()
}
ProcessOptions o( dlg->info() );
- o.setTextOutputTarget( m_pLastTextOutputTarget, this, SLOT(setLastTextOutputTarget( TextDocument* )) );
+ o.setTextOutputTarget( m_pLastTextOutputTarget, this, TQT_SLOT(setLastTextOutputTarget( TextDocument* )) );
o.p_flowCodeDocument = this;
o.setProcessPath( ProcessOptions::ProcessPath::FlowCode_Microbe );
LanguageManager::self()->compile(o);
@@ -213,7 +213,7 @@ void FlowCodeDocument::convertToAssembly()
}
ProcessOptions o( dlg->info() );
- o.setTextOutputTarget( m_pLastTextOutputTarget, this, SLOT(setLastTextOutputTarget( TextDocument* )) );
+ o.setTextOutputTarget( m_pLastTextOutputTarget, this, TQT_SLOT(setLastTextOutputTarget( TextDocument* )) );
o.p_flowCodeDocument = this;
o.setProcessPath( ProcessOptions::ProcessPath::FlowCode_AssemblyAbsolute );
LanguageManager::self()->compile(o);
@@ -224,7 +224,7 @@ void FlowCodeDocument::convertToAssembly()
void FlowCodeDocument::convertToHex()
{
- OutputMethodDlg *dlg = new OutputMethodDlg( i18n("Hex Code Output"), url(), false, (QWidget*)p_ktechlab );
+ OutputMethodDlg *dlg = new OutputMethodDlg( i18n("Hex Code Output"), url(), false, (TQWidget*)p_ktechlab );
dlg->setOutputExtension(".hex");
dlg->setFilter("*.hex|Hex (*.hex)\n*|All Files");
dlg->exec();
@@ -235,7 +235,7 @@ void FlowCodeDocument::convertToHex()
}
ProcessOptions o( dlg->info() );
- o.setTextOutputTarget( m_pLastTextOutputTarget, this, SLOT(setLastTextOutputTarget( TextDocument* )) );
+ o.setTextOutputTarget( m_pLastTextOutputTarget, this, TQT_SLOT(setLastTextOutputTarget( TextDocument* )) );
o.p_flowCodeDocument = this;
o.setProcessPath( ProcessOptions::ProcessPath::FlowCode_Program );
LanguageManager::self()->compile(o);
@@ -246,7 +246,7 @@ void FlowCodeDocument::convertToHex()
void FlowCodeDocument::convertToPIC()
{
- ProgrammerDlg * dlg = new ProgrammerDlg( microSettings()->microInfo()->id(), (QWidget*)p_ktechlab, "Programmer Dlg" );
+ ProgrammerDlg * dlg = new ProgrammerDlg( microSettings()->microInfo()->id(), (TQWidget*)p_ktechlab, "Programmer Dlg" );
dlg->exec();
if ( !dlg->isAccepted() )
{
@@ -264,14 +264,14 @@ void FlowCodeDocument::convertToPIC()
}
-void FlowCodeDocument::varNameChanged( const QString &newValue, const QString &oldValue )
+void FlowCodeDocument::varNameChanged( const TQString &newValue, const TQString &oldValue )
{
if (m_bDeleted)
return;
// Decrease the old variable count
// If none are left after, remove it from microsettings
- StringIntMap::iterator it = m_varNames.find(oldValue);
+ StringIntMap::iterator it = m_varNames.tqfind(oldValue);
if ( it != m_varNames.end() )
{
--(it.data());
@@ -286,12 +286,12 @@ void FlowCodeDocument::varNameChanged( const QString &newValue, const QString &o
// Add the new variable to a count, tell microsettings about it if it is new
if ( !newValue.isEmpty() )
{
- it = m_varNames.find(newValue);
+ it = m_varNames.tqfind(newValue);
if ( it != m_varNames.end() ) {
++it.data();
} else {
m_varNames[newValue] = 1;
- microSettings()->setVariable( newValue, QVariant(), false );
+ microSettings()->setVariable( newValue, TQVariant(), false );
}
}
diff --git a/src/flowcodedocument.h b/src/flowcodedocument.h
index bb28ae4..5b2596d 100644
--- a/src/flowcodedocument.h
+++ b/src/flowcodedocument.h
@@ -13,7 +13,7 @@
#include "icndocument.h"
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KTechlab;
class FlowCode;
@@ -22,10 +22,10 @@ class PicItem;
class FlowPart;
class MicroSettings;
class TextDocument;
-class QString;
+class TQString;
-typedef QValueList<FlowPart*> FlowPartList;
-typedef QMap<QString, int > StringIntMap;
+typedef TQValueList<FlowPart*> FlowPartList;
+typedef TQMap<TQString, int > StringIntMap;
/**
@short View for editing FlowCode
@@ -34,8 +34,9 @@ typedef QMap<QString, int > StringIntMap;
class FlowCodeDocument : public ICNDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- FlowCodeDocument( const QString &caption, KTechlab *ktechlab, const char *name = 0L);
+ FlowCodeDocument( const TQString &caption, KTechlab *ktechlab, const char *name = 0L);
~FlowCodeDocument();
virtual View *createView( ViewContainer *viewContainer, uint viewAreaId, const char *name = 0l );
@@ -50,7 +51,7 @@ class FlowCodeDocument : public ICNDocument
* returned by MicroLibrary for the given id. The pic type must be set before anything useful
* (such as compilage) can be done.
*/
- void setPicType( const QString &id );
+ void setPicType( const TQString &id );
enum ConvertToTarget
{
@@ -80,17 +81,17 @@ class FlowCodeDocument : public ICNDocument
/**
* Called when a variable name has changed (from an entry box)
*/
- void varNameChanged( const QString &newValue, const QString &oldValue );
+ void varNameChanged( const TQString &newValue, const TQString &oldValue );
protected:
virtual bool isValidItem( Item *item );
- virtual bool isValidItem( const QString &itemId );
+ virtual bool isValidItem( const TQString &itemId );
private slots:
void setLastTextOutputTarget( TextDocument * target );
private:
- QGuardedPtr<TextDocument> m_pLastTextOutputTarget;
+ TQGuardedPtr<TextDocument> m_pLastTextOutputTarget;
MicroInfo *m_microInfo; // Stores information about the PIC
MicroSettings *m_microSettings; // Stores initial settings of the PIC
PicItem *m_picItem; // Allows the user to change the PIC settings
diff --git a/src/flowcodeview.cpp b/src/flowcodeview.cpp
index 8f3cfd1..0fa5b4d 100644
--- a/src/flowcodeview.cpp
+++ b/src/flowcodeview.cpp
@@ -16,7 +16,7 @@
#include <kiconloader.h>
#include <klocale.h>
#include <kpopupmenu.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
FlowCodeView::FlowCodeView( FlowCodeDocument * flowCodeDocument, ViewContainer *viewContainer, uint viewAreaId, const char *name )
: ICNView( flowCodeDocument, viewContainer, viewAreaId, name )
@@ -34,26 +34,26 @@ FlowCodeView::FlowCodeView( FlowCodeDocument * flowCodeDocument, ViewContainer *
m->insertItem( KGlobal::iconLoader()->loadIcon( "convert_to_assembly", KIcon::Small ), i18n("Assembly"), FlowCodeDocument::AssemblyOutput );
m->insertItem( KGlobal::iconLoader()->loadIcon( "convert_to_hex", KIcon::Small ), i18n("Hex"), FlowCodeDocument::HexOutput );
m->insertItem( KGlobal::iconLoader()->loadIcon( "convert_to_pic", KIcon::Small ), i18n("PIC (upload)"), FlowCodeDocument::PICOutput );
- connect( m, SIGNAL(activated(int)), flowCodeDocument, SLOT(slotConvertTo(int)) );
+ connect( m, TQT_SIGNAL(activated(int)), flowCodeDocument, TQT_SLOT(slotConvertTo(int)) );
//END Convert To * Actions
-// new KAction( i18n("Convert to Microbe"), "convert_to_microbe", Qt::Key_F7, flowCodeDocument, SLOT(convertToMicrobe()), ac, "tools_to_microbe" );
-// new KAction( i18n("Convert to Assembly"), "convert_to_assembly", Qt::Key_F8, flowCodeDocument, SLOT(convertToAssembly()), ac, "tools_to_assembly" );
-// new KAction( i18n("Convert to Hex"), "convert_to_hex", Qt::Key_F9, flowCodeDocument, SLOT(convertToHex()), ac, "tools_to_hex" );
-// new KAction( i18n("Upload PIC Program"), "convert_to_pic", 0, flowCodeDocument, SLOT(convertToPIC()), ac, "tools_to_pic" );
+// new KAction( i18n("Convert to Microbe"), "convert_to_microbe", TQt::Key_F7, flowCodeDocument, TQT_SLOT(convertToMicrobe()), ac, "tools_to_microbe" );
+// new KAction( i18n("Convert to Assembly"), "convert_to_assembly", TQt::Key_F8, flowCodeDocument, TQT_SLOT(convertToAssembly()), ac, "tools_to_assembly" );
+// new KAction( i18n("Convert to Hex"), "convert_to_hex", TQt::Key_F9, flowCodeDocument, TQT_SLOT(convertToHex()), ac, "tools_to_hex" );
+// new KAction( i18n("Upload PIC Program"), "convert_to_pic", 0, flowCodeDocument, TQT_SLOT(convertToPIC()), ac, "tools_to_pic" );
setXMLFile( "ktechlabflowcodeui.rc", true );
- QWhatsThis::add( this, i18n(
+ TQWhatsThis::add( this, i18n(
"Construct a FlowCode document by dragging FlowParts from the list on the left. All FlowCharts require an initial \"Start\" part, of which there can only be one.<br><br>"
- "Some FlowParts, such as Subroutines, act as a container element for other FlowParts. Drag the items in or out of a container as appropritate. The container that will become the parent of the part being dragged is indicated by being selected.<br><br>"
+ "Some FlowParts, such as Subroutines, act as a container element for other FlowParts. Drag the items in or out of a container as appropritate. The container that will become the tqparent of the part being dragged is indicated by being selected.<br><br>"
"Note that connections cannot be made between FlowParts in different containers, or at different levels."
) );
@@ -70,7 +70,7 @@ FlowCodeView::~FlowCodeView()
-void FlowCodeView::dragEnterEvent( QDragEnterEvent * e )
+void FlowCodeView::dragEnterEvent( TQDragEnterEvent * e )
{
ICNView::dragEnterEvent(e);
if ( e->isAccepted() )
diff --git a/src/flowcodeview.h b/src/flowcodeview.h
index 7641e2a..ab87507 100644
--- a/src/flowcodeview.h
+++ b/src/flowcodeview.h
@@ -21,12 +21,13 @@ class FlowCodeDocument;
class FlowCodeView : public ICNView
{
Q_OBJECT
+ TQ_OBJECT
public:
FlowCodeView( FlowCodeDocument *flowCodeDocument, ViewContainer *viewContainer, uint viewAreaId, const char *name = 0l );
~FlowCodeView();
protected:
- virtual void dragEnterEvent( QDragEnterEvent * e );
+ virtual void dragEnterEvent( TQDragEnterEvent * e );
FlowCodeDocument *p_flowCodeDocument;
};
diff --git a/src/flowcontainer.cpp b/src/flowcontainer.cpp
index 32eb20e..817627a 100644
--- a/src/flowcontainer.cpp
+++ b/src/flowcontainer.cpp
@@ -17,20 +17,20 @@
#include "resizeoverlay.h"
#include <kiconloader.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
const int topStrip = 24;
const int botStrip = 16;
-FlowContainer::FlowContainer( ICNDocument *_icnDocument, bool newItem, const QString &id )
+FlowContainer::FlowContainer( ICNDocument *_icnDocument, bool newItem, const TQString &id )
: FlowPart( _icnDocument, newItem, id )
{
m_ext_in = m_int_in = m_int_out = m_ext_out = 0l;
b_expanded = true;
- addButton( "expandBtn", QRect( offsetX(), offsetY()+24 - 11, 22, 22 ), KGlobal::iconLoader()->loadIcon( "down", KIcon::Small ), true );
+ addButton( "expandBtn", TQRect( offsetX(), offsetY()+24 - 11, 22, 22 ), KGlobal::iconLoader()->loadIcon( "down", KIcon::Small ), true );
m_rectangularOverlay = new RectangularOverlay( this, 8, 8 );
setSize( -160, -120, 320, 240 );
@@ -68,7 +68,7 @@ void FlowContainer::updateNodeLevels()
}
-void FlowContainer::filterEndPartIDs( QStringList *ids )
+void FlowContainer::filterEndPartIDs( TQStringList *ids )
{
// Remove *all* nodes except for very bottom one
if (m_int_out) {
@@ -101,13 +101,13 @@ void FlowContainer::createBotContainerNode()
}
-QSize FlowContainer::minimumSize() const
+TQSize FlowContainer::tqminimumSize() const
{
- return QSize( 160, 64 );
+ return TQSize( 160, 64 );
}
-void FlowContainer::drawShape( QPainter &p )
+void FlowContainer::drawShape( TQPainter &p )
{
if (b_deleted)
return;
@@ -120,27 +120,27 @@ void FlowContainer::drawShape( QPainter &p )
int col = 0xef + level()*0x6;
if ( col > 0xff ) col = 0xff;
- p.setBrush( QColor( col, 0xff, col ) );
+ p.setBrush( TQColor( col, 0xff, col ) );
if( b_expanded )
{
- p.setPen(Qt::DotLine);
+ p.setPen(TQt::DotLine);
p.drawRoundRect( _x, _y, width(), topStrip, 1500/width(), 1500/topStrip );
p.drawRoundRect( _x, _y+height()-botStrip, width(), botStrip, 1500/width(), 1500/botStrip );
}
else
{
- p.setPen(QPen((isSelected()?m_selectedCol:Qt::black),1,Qt::SolidLine));
+ p.setPen(TQPen((isSelected()?m_selectedCol:TQt::black),1,TQt::SolidLine));
p.drawRoundRect( _x, _y, width(), topStrip, 1500/width(), 1500/topStrip );
}
- p.setPen( Qt::black );
+ p.setPen( TQt::black );
p.setFont( font() );
- p.drawText( QRect( 22 + _x+8, _y, width()-8, topStrip ), Qt::AlignLeft | Qt::AlignVCenter, m_caption );
+ p.drawText( TQRect( 22 + _x+8, _y, width()-8, topStrip ), TQt::AlignLeft | TQt::AlignVCenter, m_caption );
if( b_expanded )
{
- p.setPen(Qt::SolidLine);
- p.setBrush( Qt::NoBrush );
+ p.setPen(TQt::SolidLine);
+ p.setBrush( TQt::NoBrush );
p.drawRoundRect( _x, _y, width(), height(), 1500/width(), 1500/height() );
}
}
@@ -153,7 +153,7 @@ void FlowContainer::childAdded( Item *child )
FlowPart::childAdded(child);
- connect( this, SIGNAL(movedBy(double, double )), child, SLOT(moveBy(double, double )) );
+ connect( this, TQT_SIGNAL(movedBy(double, double )), child, TQT_SLOT(moveBy(double, double )) );
child->setZ( ICNDocument::Z::Item + child->level() );
updateContainedVisibility();
@@ -165,9 +165,9 @@ void FlowContainer::childRemoved( Item *child )
FlowPart::childRemoved(child);
if (!b_expanded)
- child->setVisible(true);
+ child->tqsetVisible(true);
- disconnect( this, SIGNAL(movedBy(double, double )), child, SLOT(moveBy(double, double )) );
+ disconnect( this, TQT_SIGNAL(movedBy(double, double )), child, TQT_SLOT(moveBy(double, double )) );
}
@@ -241,42 +241,42 @@ void FlowContainer::setFullBounds( bool full )
{
if ( full || !b_expanded )
{
- QRect bounds = b_expanded ? m_sizeRect : QRect( m_sizeRect.x(), m_sizeRect.y(), m_sizeRect.width(), topStrip );
- setPoints( QPointArray(bounds) );
+ TQRect bounds = b_expanded ? m_sizeRect : TQRect( m_sizeRect.x(), m_sizeRect.y(), m_sizeRect.width(), topStrip );
+ setPoints( TQPointArray(bounds) );
return;
}
// kdDebug() << k_funcinfo << "width="<<width()<<" height="<<height()<<endl;
- QPointArray pa(10);
- pa[0] = QPoint( 0, 0 );
- pa[1] = QPoint( width(), 0 );
- pa[2] = QPoint( width(), height() );
- pa[3] = QPoint( 0, height() );
- pa[4] = QPoint( 0, 0 );
- pa[5] = QPoint( 8, topStrip );
- pa[6] = QPoint( 8, height()-botStrip );
- pa[7] = QPoint( width()-8, height()-botStrip );
- pa[8] = QPoint( width()-8, topStrip );
- pa[9] = QPoint( 8, topStrip );
+ TQPointArray pa(10);
+ pa[0] = TQPoint( 0, 0 );
+ pa[1] = TQPoint( width(), 0 );
+ pa[2] = TQPoint( width(), height() );
+ pa[3] = TQPoint( 0, height() );
+ pa[4] = TQPoint( 0, 0 );
+ pa[5] = TQPoint( 8, topStrip );
+ pa[6] = TQPoint( 8, height()-botStrip );
+ pa[7] = TQPoint( width()-8, height()-botStrip );
+ pa[8] = TQPoint( width()-8, topStrip );
+ pa[9] = TQPoint( 8, topStrip );
pa.translate( offsetX(), offsetY() );
setPoints(pa);
}
-void FlowContainer::buttonStateChanged(const QString &/*id*/, bool state)
+void FlowContainer::buttonStateChanged(const TQString &/*id*/, bool state)
{
setExpanded(state);
}
-bool FlowContainer::parentIsCollapsed() const
+bool FlowContainer::tqparentIsCollapsed() const
{
if ( !p_parentItem )
return false;
FlowContainer *fc = dynamic_cast<FlowContainer*>((Item*)(p_parentItem));
- return !fc->isExpanded() || fc->parentIsCollapsed();
+ return !fc->isExpanded() || fc->tqparentIsCollapsed();
}
@@ -374,17 +374,17 @@ void FlowContainer::updateContainedVisibility()
if (m_ext_out)
m_ext_out->setVisible( isVisible() );
- const ItemList::iterator cEnd = m_children.end();
- for ( ItemList::iterator it = m_children.begin(); it != cEnd; ++it )
+ const ItemList::iterator cEnd = m_tqchildren.end();
+ for ( ItemList::iterator it = m_tqchildren.begin(); it != cEnd; ++it )
{
if (*it)
- (*it)->setVisible( isVisible() && b_expanded );
+ (*it)->tqsetVisible( isVisible() && b_expanded );
}
m_rectangularOverlay->setVisible( isVisible() && b_expanded );
NodeGroupList hidableNodeGroups;
- p_icnDocument->getTranslatable( children(true) += GuardedItem(this), 0, 0, &hidableNodeGroups );
+ p_icnDocument->getTranslatable( tqchildren(true) += GuardedItem(this), 0, 0, &hidableNodeGroups );
NodeGroupList::iterator hngEnd = hidableNodeGroups.end();
for ( NodeGroupList::iterator it = hidableNodeGroups.begin(); it != hngEnd; ++it )
diff --git a/src/flowcontainer.h b/src/flowcontainer.h
index 9afa401..a3dbecb 100644
--- a/src/flowcontainer.h
+++ b/src/flowcontainer.h
@@ -21,8 +21,9 @@ class RectangularOverlay;
class FlowContainer : public FlowPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- FlowContainer( ICNDocument *_icnView, bool newItem, const QString &id );
+ FlowContainer( ICNDocument *_icnView, bool newItem, const TQString &id );
virtual ~FlowContainer();
virtual bool canResize() const { return true; }
@@ -38,15 +39,15 @@ public:
*/
bool isExpanded() const { return b_expanded; }
/**
- * Returns true if one of this parents is collapsed.
+ * Returns true if one of this tqparents is collapsed.
*/
- bool parentIsCollapsed() const;
+ bool tqparentIsCollapsed() const;
void setExpanded( bool expanded );
virtual void setSelected( bool yes );
virtual void setVisible( bool yes );
- virtual QSize minimumSize() const;
+ virtual TQSize tqminimumSize() const;
/**
* Update the visibility of items, connectors, nodes in the flowcontainer
*/
@@ -59,12 +60,12 @@ protected:
virtual void childRemoved( Item *child );
virtual void updateAttachedPositioning();
virtual void postResize();
- virtual void filterEndPartIDs( QStringList *ids );
- virtual void drawShape( QPainter &p );
+ virtual void filterEndPartIDs( TQStringList *ids );
+ virtual void drawShape( TQPainter &p );
void createTopContainerNode();
void createBotContainerNode();
- virtual void buttonStateChanged(const QString &id, bool state);
+ virtual void buttonStateChanged(const TQString &id, bool state);
FPNode *m_ext_in;
FPNode *m_int_in;
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
diff --git a/src/fpnode.cpp b/src/fpnode.cpp
index 39901c6..5663bfb 100644
--- a/src/fpnode.cpp
+++ b/src/fpnode.cpp
@@ -14,9 +14,9 @@
#include "fpnode.h"
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
-FPNode::FPNode( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const QPoint &pos, QString *id )
+FPNode::FPNode( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const TQPoint &pos, TQString *id )
: Node( icnDocument, type, dir, pos, id )
{
icnDocument->registerItem(this);
@@ -30,7 +30,7 @@ FPNode::~FPNode()
FlowPart *FPNode::outputFlowPart() const
{
- FlowPart *flowPart = dynamic_cast<FlowPart*>(parentItem());
+ FlowPart *flowPart = dynamic_cast<FlowPart*>(tqparentItem());
if ( type() == fp_in )
return flowPart;
@@ -52,7 +52,7 @@ FlowPart *FPNode::outputFlowPart() const
FlowPartList FPNode::inputFlowParts() const
{
FlowPartList list;
- FlowPart *flowPart = dynamic_cast<FlowPart*>(parentItem());
+ FlowPart *flowPart = dynamic_cast<FlowPart*>(tqparentItem());
if ( type() != fp_in && flowPart )
{
list.append(flowPart);
@@ -64,7 +64,7 @@ FlowPartList FPNode::inputFlowParts() const
if (*it)
{
Node *startNode = (*it)->startNode();
- FlowPart *flowPart = startNode ? dynamic_cast<FlowPart*>(startNode->parentItem()) : 0l;
+ FlowPart *flowPart = startNode ? dynamic_cast<FlowPart*>(startNode->tqparentItem()) : 0l;
if (flowPart)
list.append(flowPart);
}
@@ -73,37 +73,37 @@ FlowPartList FPNode::inputFlowParts() const
}
-inline QPointArray arrowPoints( Node::node_dir dir )
+inline TQPointArray arrowPoints( Node::node_dir dir )
{
- QPointArray pa(3);
+ TQPointArray pa(3);
switch (dir)
{
case Node::dir_right:
- pa[0] = QPoint( 3, 0 );
- pa[1] = QPoint( 0, 2 );
- pa[2] = QPoint( 0, -2 );
+ pa[0] = TQPoint( 3, 0 );
+ pa[1] = TQPoint( 0, 2 );
+ pa[2] = TQPoint( 0, -2 );
break;
case Node::dir_left:
- pa[0] = QPoint( -3, 0 );
- pa[1] = QPoint( 0, 2 );
- pa[2] = QPoint( 0, -2 );
+ pa[0] = TQPoint( -3, 0 );
+ pa[1] = TQPoint( 0, 2 );
+ pa[2] = TQPoint( 0, -2 );
break;
case Node::dir_down:
- pa[0] = QPoint( 2, 0 );
- pa[1] = QPoint( -2, 0 );
- pa[2] = QPoint( 0, 3 );
+ pa[0] = TQPoint( 2, 0 );
+ pa[1] = TQPoint( -2, 0 );
+ pa[2] = TQPoint( 0, 3 );
break;
case Node::dir_up:
- pa[0] = QPoint( 2, 0 );
- pa[1] = QPoint( -2, 0 );
- pa[2] = QPoint( 0, -3 );
+ pa[0] = TQPoint( 2, 0 );
+ pa[1] = TQPoint( -2, 0 );
+ pa[2] = TQPoint( 0, -3 );
break;
};
return pa;
}
-void FPNode::drawShape( QPainter &p )
+void FPNode::drawShape( TQPainter &p )
{
const int _x = (int)x();
const int _y = (int)y();
@@ -118,16 +118,16 @@ void FPNode::drawShape( QPainter &p )
continue;
// Work out the direction of the connector
- const QPointList points = connector->connectorPoints(false);
+ const TQPointList points = connector->connectorPoints(false);
const int count = points.size();
if ( count < 2 )
continue;
- QPoint end_0 = points[count-1];
- QPoint end_1 = points[count-2];
+ TQPoint end_0 = points[count-1];
+ TQPoint end_1 = points[count-2];
- QPointArray pa;
+ TQPointArray pa;
if ( end_0.x() < end_1.x() )
{
pa = arrowPoints( Node::dir_left );
@@ -152,7 +152,7 @@ void FPNode::drawShape( QPainter &p )
continue;
pa.translate( _x, _y );
- p.setPen( connector->isSelected() ? m_selectedColor : Qt::black );
+ p.setPen( connector->isSelected() ? m_selectedColor : TQt::black );
p.drawPolygon(pa);
}
return;
@@ -163,7 +163,7 @@ void FPNode::drawShape( QPainter &p )
else if ( m_dir == Node::dir_left ) p.drawLine( _x, _y, _x+8, _y );
else if ( m_dir == Node::dir_up ) p.drawLine( _x, _y, _x, _y+8 );
- QPointArray pa(3);
+ TQPointArray pa(3);
// Right facing arrow
if ( (type() == fp_out && m_dir == Node::dir_right) ||
diff --git a/src/fpnode.h b/src/fpnode.h
index 43d1834..2082a40 100644
--- a/src/fpnode.h
+++ b/src/fpnode.h
@@ -15,7 +15,7 @@
class FlowPart;
-typedef QValueList<FlowPart*> FlowPartList;
+typedef TQValueList<FlowPart*> FlowPartList;
/**
You should use this node for all FlowParts. It ensures that connections between FlowParts are
@@ -26,8 +26,9 @@ always valid (eg not more than two outputs from one node, which makes no sense)
class FPNode : public Node
{
Q_OBJECT
+ TQ_OBJECT
public:
- FPNode( ICNDocument *_icnView, Node::node_type type, node_dir dir, const QPoint &pos, QString *id = 0L );
+ FPNode( ICNDocument *_icnView, Node::node_type type, node_dir dir, const TQPoint &pos, TQString *id = 0L );
~FPNode();
/**
@@ -43,7 +44,7 @@ public:
FlowPartList inputFlowParts() const;
protected:
- virtual void drawShape( QPainter & p );
+ virtual void drawShape( TQPainter & p );
private:
bool m_isInput;
diff --git a/src/gui/asmformattingwidget.ui b/src/gui/asmformattingwidget.ui
index ecfa529..a246581 100644
--- a/src/gui/asmformattingwidget.ui
+++ b/src/gui/asmformattingwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AsmFormattingWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>AsmFormattingWidget</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox64</cstring>
</property>
@@ -36,7 +36,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel11</cstring>
</property>
@@ -44,7 +44,7 @@
<string>'equ' Value</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel8</cstring>
</property>
@@ -52,7 +52,7 @@
<string>Instruction Data</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel9</cstring>
</property>
@@ -60,7 +60,7 @@
<string>Comment</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -68,7 +68,7 @@
<string>'equ'</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel7</cstring>
</property>
@@ -164,7 +164,7 @@
</widget>
</grid>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_AutoFormatMBOutput</cstring>
</property>
@@ -185,7 +185,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>484</height>
@@ -202,7 +202,7 @@
<tabstop>kcfg_IndentComment</tabstop>
<tabstop>kcfg_AutoFormatMBOutput</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/src/gui/colorcombo.cpp b/src/gui/colorcombo.cpp
index aec39ae..786ef98 100644
--- a/src/gui/colorcombo.cpp
+++ b/src/gui/colorcombo.cpp
@@ -12,14 +12,14 @@
#include <kcolordialog.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
bool ColorCombo::createdPalettes = false;
-QColor * ColorCombo::palette[ NumberOfSchemes ];
+TQColor * ColorCombo::palette[ NumberOfSchemes ];
int ColorCombo::paletteSize[ NumberOfSchemes ];
-ColorCombo::ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *name )
- : QComboBox( parent, name )
+ColorCombo::ColorCombo( ColorScheme colorScheme, TQWidget *tqparent, const char *name )
+ : TQComboBox( tqparent, name )
{
m_colorScheme = colorScheme;
@@ -30,8 +30,8 @@ ColorCombo::ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *na
addColors();
- connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) );
- connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) );
+ connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) );
+ connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) );
}
@@ -46,32 +46,32 @@ void ColorCombo::createPalettes()
return;
createdPalettes = true;
- paletteSize[ QtStandard ] = 17;
- palette[ QtStandard ] = new QColor[ paletteSize[ QtStandard ] ];
+ paletteSize[ TQtStandard ] = 17;
+ palette[ TQtStandard ] = new TQColor[ paletteSize[ TQtStandard ] ];
int i = 0;
- palette[ QtStandard ][i++] = Qt::red;
- palette[ QtStandard ][i++] = Qt::green;
- palette[ QtStandard ][i++] = Qt::blue;
- palette[ QtStandard ][i++] = Qt::cyan;
- palette[ QtStandard ][i++] = Qt::magenta;
- palette[ QtStandard ][i++] = Qt::yellow;
- palette[ QtStandard ][i++] = Qt::darkRed;
- palette[ QtStandard ][i++] = Qt::darkGreen;
- palette[ QtStandard ][i++] = Qt::darkBlue;
- palette[ QtStandard ][i++] = Qt::darkCyan;
- palette[ QtStandard ][i++] = Qt::darkMagenta;
- palette[ QtStandard ][i++] = Qt::darkYellow;
- palette[ QtStandard ][i++] = Qt::white;
- palette[ QtStandard ][i++] = Qt::lightGray;
- palette[ QtStandard ][i++] = Qt::gray;
- palette[ QtStandard ][i++] = Qt::darkGray;
- palette[ QtStandard ][i++] = Qt::black;
+ palette[ TQtStandard ][i++] = TQt::red;
+ palette[ TQtStandard ][i++] = TQt::green;
+ palette[ TQtStandard ][i++] = TQt::blue;
+ palette[ TQtStandard ][i++] = TQt::cyan;
+ palette[ TQtStandard ][i++] = TQt::magenta;
+ palette[ TQtStandard ][i++] = TQt::yellow;
+ palette[ TQtStandard ][i++] = TQt::darkRed;
+ palette[ TQtStandard ][i++] = TQt::darkGreen;
+ palette[ TQtStandard ][i++] = TQt::darkBlue;
+ palette[ TQtStandard ][i++] = TQt::darkCyan;
+ palette[ TQtStandard ][i++] = TQt::darkMagenta;
+ palette[ TQtStandard ][i++] = TQt::darkYellow;
+ palette[ TQtStandard ][i++] = TQt::white;
+ palette[ TQtStandard ][i++] = TQt::lightGray;
+ palette[ TQtStandard ][i++] = TQt::gray;
+ palette[ TQtStandard ][i++] = TQt::darkGray;
+ palette[ TQtStandard ][i++] = TQt::black;
paletteSize[ LED ] = 6;
- palette[ LED ] = new QColor[ paletteSize[ LED ] ];
+ palette[ LED ] = new TQColor[ paletteSize[ LED ] ];
i = 0;
palette[ LED ][i++] = "#f62a2a";
@@ -83,16 +83,16 @@ void ColorCombo::createPalettes()
}
-void ColorCombo::setColor( const QColor &col )
+void ColorCombo::setColor( const TQColor &col )
{
internalColor = col;
addColors();
}
-void ColorCombo::resizeEvent( QResizeEvent *re )
+void ColorCombo::resizeEvent( TQResizeEvent *re )
{
- QComboBox::resizeEvent( re );
+ TQComboBox::resizeEvent( re );
addColors();
}
@@ -101,23 +101,23 @@ void ColorCombo::slotActivated( int index )
{
if ( index == 0 )
{
- if ( KColorDialog::getColor( customColor, this ) == QDialog::Accepted )
+ if ( KColorDialog::getColor( customColor, this ) == TQDialog::Accepted )
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4);
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4);
+ TQPixmap pixmap( rect.width(), rect.height() );
- if ( qGray( customColor.rgb() ) < 128 )
+ if ( tqGray( customColor.rgb() ) < 128 )
pen.setColor( white );
else
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
changeItem( pixmap, 0 );
@@ -144,10 +144,10 @@ void ColorCombo::slotHighlighted( int index )
void ColorCombo::addColors()
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4 );
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4 );
+ TQPixmap pixmap( rect.width(), rect.height() );
int i;
clear();
@@ -160,16 +160,16 @@ void ColorCombo::addColors()
if ( i == paletteSize[ m_colorScheme ] )
customColor = internalColor;
- if ( qGray( customColor.rgb() ) < 128 )
+ if ( tqGray( customColor.rgb() ) < 128 )
pen.setColor( white );
else
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
insertItem( pixmap );
@@ -178,7 +178,7 @@ void ColorCombo::addColors()
for ( i = 0; i < paletteSize[ m_colorScheme ]; i++ )
{
painter.begin( &pixmap );
- QBrush brush( palette[ m_colorScheme ][i] );
+ TQBrush brush( palette[ m_colorScheme ][i] );
painter.fillRect( rect, brush );
painter.end();
diff --git a/src/gui/colorcombo.h b/src/gui/colorcombo.h
index 65b2714..0fb6071 100644
--- a/src/gui/colorcombo.h
+++ b/src/gui/colorcombo.h
@@ -11,8 +11,8 @@
#ifndef COLORCOMBO_H
#define COLORCOMBO_H
-#include <qcolor.h>
-#include <qcombobox.h>
+#include <tqcolor.h>
+#include <tqcombobox.h>
/**
Based on KColorCombo, Copyright (C) 1997 Martin Jones (mjones@kde.org). Allows
@@ -20,15 +20,16 @@ which colours are displayed to be changed.
@author David Saxton
*/
-class ColorCombo : public QComboBox
+class ColorCombo : public TQComboBox
{
Q_OBJECT
- Q_PROPERTY( QColor color READ color WRITE setColor )
+ TQ_OBJECT
+ TQ_PROPERTY( TQColor color READ color WRITE setColor )
public:
enum ColorScheme
{
- QtStandard = 0,
+ TQtStandard = 0,
LED = 1,
NumberOfSchemes = 2, ///< for internal usage; this should be one less than the number of items in the enum
};
@@ -36,43 +37,43 @@ class ColorCombo : public QComboBox
/**
* Constructs a color combo box.
*/
- ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *name = 0L );
+ ColorCombo( ColorScheme colorScheme, TQWidget *tqparent, const char *name = 0L );
~ColorCombo();
/**
* Selects the color @p col.
*/
- void setColor( const QColor & col );
+ void setColor( const TQColor & col );
/**
* Returns the currently selected color.
**/
- QColor color() const { return internalColor; }
+ TQColor color() const { return internalColor; }
signals:
/**
* Emitted when a new color box has been selected.
*/
- void activated( const QColor &col );
+ void activated( const TQColor &col );
/**
* Emitted when a new item has been highlighted.
*/
- void highlighted( const QColor &col );
+ void highlighted( const TQColor &col );
protected slots:
void slotActivated( int index );
void slotHighlighted( int index );
protected:
- virtual void resizeEvent( QResizeEvent *re );
+ virtual void resizeEvent( TQResizeEvent *re );
void addColors();
void createPalettes();
- QColor customColor;
- QColor internalColor;
+ TQColor customColor;
+ TQColor internalColor;
ColorScheme m_colorScheme;
static bool createdPalettes;
- static QColor * palette[ NumberOfSchemes ];
+ static TQColor * palette[ NumberOfSchemes ];
static int paletteSize[ NumberOfSchemes ];
};
diff --git a/src/gui/contexthelp.cpp b/src/gui/contexthelp.cpp
index 3444737..dacd1b9 100644
--- a/src/gui/contexthelp.cpp
+++ b/src/gui/contexthelp.cpp
@@ -16,44 +16,44 @@
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qtextbrowser.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqtextbrowser.h>
+#include <tqwhatsthis.h>
#include <assert.h>
ContextHelp * ContextHelp::m_pSelf = 0l;
-ContextHelp * ContextHelp::self( KateMDI::ToolView * parent )
+ContextHelp * ContextHelp::self( KateMDI::ToolView * tqparent )
{
if (!m_pSelf)
{
- assert(parent);
- m_pSelf = new ContextHelp(parent);
+ assert(tqparent);
+ m_pSelf = new ContextHelp(tqparent);
}
return m_pSelf;
}
-ContextHelp::ContextHelp( KateMDI::ToolView * parent )
- : QWidget( parent, "Context Help" )
+ContextHelp::ContextHelp( KateMDI::ToolView * tqparent )
+ : TQWidget( tqparent, "Context Help" )
{
- QWhatsThis::add( this, i18n("Provides context-sensitive help relevant to the current editing being performed.") );
+ TQWhatsThis::add( this, i18n("Provides context-sensitive help relevant to the current editing being performed.") );
- QVBoxLayout *vlayout = new QVBoxLayout( this, 0, 6 );
+ TQVBoxLayout *vtqlayout = new TQVBoxLayout( this, 0, 6 );
- m_nameLbl = new QLabel( this, "" );
- vlayout->addWidget(m_nameLbl);
- vlayout->addSpacing(8);
+ m_nameLbl = new TQLabel( this, "" );
+ vtqlayout->addWidget(m_nameLbl);
+ vtqlayout->addSpacing(8);
- m_info = new QTextBrowser( this, "" );
- vlayout->addWidget(m_info);
- m_info->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
+ m_info = new TQTextBrowser( this, "" );
+ vtqlayout->addWidget(m_info);
+ m_info->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding );
- QSpacerItem *spacer3 = new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Preferred );
- vlayout->addItem(spacer3);
+ TQSpacerItem *spacer3 = new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Preferred );
+ vtqlayout->addItem(spacer3);
slotClear();
}
@@ -90,18 +90,18 @@ void ContextHelp::slotMultipleSelected()
}
-void ContextHelp::setContextHelp(const QString& name, const QString& help)
+void ContextHelp::setContextHelp(const TQString& name, const TQString& help)
{
m_nameLbl->setText("<h2>"+name+"</h2>");
- QString parsed = help;
+ TQString parsed = help;
parseInfo(parsed);
m_info->setText( "<b></b>"+parsed );
}
-void ContextHelp::parseInfo( QString &info )
+void ContextHelp::parseInfo( TQString &info )
{
- info.replace("<example>","<br><br><b>Example:</b><blockquote>");
- info.replace("</example>","</blockquote>");
+ info.tqreplace("<example>","<br><br><b>Example:</b><blockquote>");
+ info.tqreplace("</example>","</blockquote>");
}
#include "contexthelp.moc"
diff --git a/src/gui/contexthelp.h b/src/gui/contexthelp.h
index 90159b7..c363e39 100644
--- a/src/gui/contexthelp.h
+++ b/src/gui/contexthelp.h
@@ -11,12 +11,12 @@
#ifndef CONTEXTHELP_H
#define CONTEXTHELP_H
-#include <qwidget.h>
+#include <tqwidget.h>
class Item;
class ContextHelp;
-class QLabel;
-class QTextBrowser;
+class TQLabel;
+class TQTextBrowser;
namespace KateMDI { class ToolView; }
/**
@@ -27,30 +27,31 @@ in a ICNDocument.
@author David Saxton
*/
-class ContextHelp : public QWidget
+class ContextHelp : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- static ContextHelp * self( KateMDI::ToolView * parent = 0l );
- static QString toolViewIdentifier() { return "ContextHelp"; }
+ static ContextHelp * self( KateMDI::ToolView * tqparent = 0l );
+ static TQString toolViewIdentifier() { return "ContextHelp"; }
~ContextHelp();
/**
* Replace special tags with appropriate html formatting code.
*/
- void parseInfo( QString &info );
+ void parseInfo( TQString &info );
public slots:
void slotClear();
void slotMultipleSelected();
void slotUpdate( Item *item );
- void setContextHelp(const QString& name, const QString &help);
+ void setContextHelp(const TQString& name, const TQString &help);
private:
- ContextHelp( KateMDI::ToolView * parent );
+ ContextHelp( KateMDI::ToolView * tqparent );
- QLabel *m_nameLbl;
- QTextBrowser *m_info;
+ TQLabel *m_nameLbl;
+ TQTextBrowser *m_info;
static ContextHelp * m_pSelf;
};
diff --git a/src/gui/createsubprojectwidget.ui b/src/gui/createsubprojectwidget.ui
index 267739e..bf3efde 100644
--- a/src/gui/createsubprojectwidget.ui
+++ b/src/gui/createsubprojectwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>CreateSubprojectWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>CreateSubprojectWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -35,7 +35,7 @@
<string>Subproject Details</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -43,7 +43,7 @@
<string>Target File:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -51,7 +51,7 @@
<string>Type:</string>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<item>
<property name="text">
<string>Program</string>
@@ -81,7 +81,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -90,7 +90,7 @@
</spacer>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/src/gui/doublespinbox.cpp b/src/gui/doublespinbox.cpp
index b8672b5..fb5efa4 100644
--- a/src/gui/doublespinbox.cpp
+++ b/src/gui/doublespinbox.cpp
@@ -15,9 +15,9 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <algorithm>
#include <cmath>
@@ -30,21 +30,21 @@ inline int roundDouble( double val )
}
-DoubleSpinBox::DoubleSpinBox( double lower, double upper, double minAbs, double value, const QString &unit, QWidget * parent )
- : QSpinBox( parent )
+DoubleSpinBox::DoubleSpinBox( double lower, double upper, double minAbs, double value, const TQString &unit, TQWidget * tqparent )
+ : TQSpinBox( tqparent )
{
m_lastEmittedValue = value;
m_unit = unit;
m_minValue = lower;
m_maxValue = upper;
m_minAbsValue = minAbs;
- m_queuedSuffix = QString::null;
+ m_queuedSuffix = TQString();
- editor()->setAlignment( Qt::AlignRight );
+ editor()->tqsetAlignment( TQt::AlignRight );
- connect( this, SIGNAL(valueChanged(int)), this, SLOT(checkIfChanged()) );
- QSpinBox::setMinValue( -(1<<30) );
- QSpinBox::setMaxValue( +(1<<30) );
+ connect( this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(checkIfChanged()) );
+ TQSpinBox::setMinValue( -(1<<30) );
+ TQSpinBox::setMaxValue( +(1<<30) );
setValue( value );
setValidator( 0 );
@@ -75,11 +75,11 @@ void DoubleSpinBox::setValue( double value )
updateSuffix( value );
- QSpinBox::setValue( roundDouble( (value / Item::getMultiplier( value )) * 100 ) );
+ TQSpinBox::setValue( roundDouble( (value / Item::getMultiplier( value )) * 100 ) );
}
-void DoubleSpinBox::setUnit( const QString & unit )
+void DoubleSpinBox::setUnit( const TQString & unit )
{
updateSuffix( value() );
m_unit = unit;
@@ -94,7 +94,7 @@ void DoubleSpinBox::updateSuffix( double value )
if ( m_queuedSuffix.stripWhiteSpace().isEmpty() )
m_queuedSuffix = "";
- QTimer::singleShot( 0, this, SLOT(setQueuedSuffix()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(setQueuedSuffix()) );
}
@@ -106,7 +106,7 @@ void DoubleSpinBox::setQueuedSuffix()
setSuffix( m_queuedSuffix );
changed = true;
}
- m_queuedSuffix = QString::null;
+ m_queuedSuffix = TQString();
if ( changed )
emit valueChanged( value() );
@@ -115,29 +115,29 @@ void DoubleSpinBox::setQueuedSuffix()
double DoubleSpinBox::getMult()
{
- QString text = this->text().stripWhiteSpace();
+ TQString text = this->text().stripWhiteSpace();
if ( !m_queuedSuffix.isNull() )
{
- QString nsSuffix = suffix().stripWhiteSpace();
+ TQString nsSuffix = suffix().stripWhiteSpace();
if ( nsSuffix.isEmpty() )
text.append( m_queuedSuffix );
else
- text.replace( nsSuffix, m_queuedSuffix );
+ text.tqreplace( nsSuffix, m_queuedSuffix );
}
if ( text.length() == 0 )
return 1.0;
- if ( text.endsWith( m_unit, false ) )
+ if ( text.tqendsWith( m_unit, false ) )
text = text.remove( text.length() - m_unit.length(), m_unit.length() );
text.stripWhiteSpace();
- QChar siExp = text[ text.length()-1 ];
+ TQChar siExp = text[ text.length()-1 ];
if ( siExp.isLetter() || siExp.isSymbol() )
- return CNItem::getMultiplier((QString)siExp);
+ return CNItem::getMultiplier((TQString)siExp);
else
return 1;
@@ -149,12 +149,12 @@ double DoubleSpinBox::getDisplayedNumber( bool * ok )
KLocale * locale = KGlobal::locale();
// Fetch the characters that we don't want to discard
- const QString exclude = locale->decimalSymbol()
+ const TQString exclude = locale->decimalSymbol()
+ locale->thousandsSeparator()
+ locale->positiveSign()
+ locale->negativeSign();
- QString number = cleanText().remove( QRegExp("[^"+exclude+"\\d]") );
+ TQString number = cleanText().remove( TQRegExp("[^"+exclude+"\\d]") );
return locale->readNumber( number, ok );
}
@@ -184,7 +184,7 @@ int DoubleSpinBox::mapTextToValue( bool * ok )
}
-QString DoubleSpinBox::mapValueToText( int v )
+TQString DoubleSpinBox::mapValueToText( int v )
{
double val = double(v)/100.0;
diff --git a/src/gui/doublespinbox.h b/src/gui/doublespinbox.h
index 75f6c90..6df8f76 100644
--- a/src/gui/doublespinbox.h
+++ b/src/gui/doublespinbox.h
@@ -11,7 +11,7 @@
#ifndef DOUBLESPINBOX_H
#define DOUBLESPINBOX_H
-#include <qspinbox.h>
+#include <tqspinbox.h>
/**
Where appropriate, function names with value in them should
@@ -20,11 +20,12 @@ spin box plus the SI magnitude symbol it is showing
@author David Saxton
*/
-class DoubleSpinBox : public QSpinBox
+class DoubleSpinBox : public TQSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- DoubleSpinBox( double lower, double upper, double minAbs, double value, const QString & unit, QWidget * parent = 0 );
+ DoubleSpinBox( double lower, double upper, double minAbs, double value, const TQString & unit, TQWidget * tqparent = 0 );
virtual ~DoubleSpinBox();
/**
@@ -69,7 +70,7 @@ class DoubleSpinBox : public QSpinBox
/**
* Sets the unit used, e.g. "F"
*/
- void setUnit( const QString & unit );
+ void setUnit( const TQString & unit );
public slots:
virtual void stepUp();
@@ -88,7 +89,7 @@ class DoubleSpinBox : public QSpinBox
*/
void checkIfChanged();
/**
- * Sets the suffix from m_queuedSuffix. Called from QTimer::singleShot
+ * Sets the suffix from m_queuedSuffix. Called from TQTimer::singleShot
* to avoid strange recursion problems.
*/
void setQueuedSuffix();
@@ -108,20 +109,20 @@ class DoubleSpinBox : public QSpinBox
*/
double getDisplayedNumber( bool * ok );
/**
- * Overloaded the method in QSpinxBox to allow SI prefixes to be entered
+ * Overloaded the method in TQSpinxBox to allow SI prefixes to be entered
*/
virtual int mapTextToValue( bool * ok );
/**
- * Overloaded the method in QSpinxBox to allow SI prefixes to be entered
+ * Overloaded the method in TQSpinxBox to allow SI prefixes to be entered
*/
- virtual QString mapValueToText( int v );
+ virtual TQString mapValueToText( int v );
/**
* Returns value rounded off to one significant figure.
*/
double roundToOneSF( double value );
- QString m_queuedSuffix; ///< Used
- QString m_unit;
+ TQString m_queuedSuffix; ///< Used
+ TQString m_unit;
double m_minValue;
double m_maxValue;
double m_minAbsValue;
diff --git a/src/gui/generaloptionswidget.ui b/src/gui/generaloptionswidget.ui
index 0f3ee2a..d98b794 100644
--- a/src/gui/generaloptionswidget.ui
+++ b/src/gui/generaloptionswidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>GeneralOptionsWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>GeneralOptionsWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>kcfg_ReuseSameViewForOutput</cstring>
</property>
@@ -33,7 +33,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>kcfg_ShowVoltageBars</cstring>
</property>
@@ -55,7 +55,7 @@
<string>The grid color in the work area.</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>kcfg_ShowGrid</cstring>
</property>
@@ -82,7 +82,7 @@
<number>100000</number>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -93,7 +93,7 @@
<string>Maximum undo steps for work area. This doesn't apply to text documents - that is configurable seperately under Configure Editor.</string>
</property>
</widget>
- <widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="4" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox4</cstring>
</property>
@@ -104,7 +104,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RestoreDocumentsOnStartup</cstring>
</property>
@@ -115,7 +115,7 @@
<string>Alt+U</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RaiseItemSelectors</cstring>
</property>
@@ -126,7 +126,7 @@
<string>Alt+A</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RaiseMessagesLog</cstring>
</property>
@@ -139,7 +139,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="5" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox21</cstring>
</property>
@@ -150,15 +150,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8_2</cstring>
+ <cstring>tqlayout8_2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSlider" row="0" column="1">
+ <widget class="TQSlider" row="0" column="1">
<property name="name">
<cstring>refreshRateSlider</cstring>
</property>
@@ -178,7 +178,7 @@
<enum>Below</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -186,7 +186,7 @@
<string>Refresh rate:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>refreshRateLabel</cstring>
</property>
@@ -196,7 +196,7 @@
</widget>
</grid>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel9_2</cstring>
</property>
@@ -217,7 +217,7 @@
<property name="scaledContents">
<bool>false</bool>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -233,7 +233,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -261,7 +261,7 @@
<tabstop>kcfg_RaiseMessagesLog</tabstop>
<tabstop>refreshRateSlider</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcolorbutton.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/src/gui/gpasmsettingswidget.ui b/src/gui/gpasmsettingswidget.ui
index 069711f..9cf9be0 100644
--- a/src/gui/gpasmsettingswidget.ui
+++ b/src/gui/gpasmsettingswidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>GpasmSettingsWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>GpasmSettingsWidget</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -33,7 +33,7 @@
<string>Radix (-r):</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -41,7 +41,7 @@
<string>Warning level (-w):</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -49,7 +49,7 @@
<string>Hex Format (-a):</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="4">
+ <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>kcfg_IgnoreCase</cstring>
</property>
@@ -63,7 +63,7 @@
<string>All user defined symbols and macros are case sensitive. This option makes them case insensitive.</string>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="4">
+ <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>kcfg_DosFormat</cstring>
</property>
@@ -87,7 +87,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -207,7 +207,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -224,7 +224,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -241,14 +241,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -278,7 +278,7 @@
<tabstop>kcfg_IgnoreCase</tabstop>
<tabstop>kcfg_DosFormat</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
diff --git a/src/gui/itemeditor.cpp b/src/gui/itemeditor.cpp
index bdfe539..3e8a30e 100644
--- a/src/gui/itemeditor.cpp
+++ b/src/gui/itemeditor.cpp
@@ -17,63 +17,63 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <assert.h>
ItemEditor * ItemEditor::m_pSelf = 0l;
-ItemEditor * ItemEditor::self( KateMDI::ToolView * parent )
+ItemEditor * ItemEditor::self( KateMDI::ToolView * tqparent )
{
if (!m_pSelf)
{
- assert(parent);
- m_pSelf = new ItemEditor(parent);
+ assert(tqparent);
+ m_pSelf = new ItemEditor(tqparent);
}
return m_pSelf;
}
-ItemEditor::ItemEditor( KateMDI::ToolView * parent )
- : QWidget( (QWidget*)parent, "Item Editor" )
+ItemEditor::ItemEditor( KateMDI::ToolView * tqparent )
+ : TQWidget( (TQWidget*)tqparent, "Item Editor" )
{
- QWhatsThis::add( this, i18n("This allows editing of advanced properties of the selected item(s). Right click on the picture of the item to set the orientation.") );
+ TQWhatsThis::add( this, i18n("This allows editing of advanced properties of the selected item(s). Right click on the picture of the item to set the orientation.") );
- QVBoxLayout *vlayout = new QVBoxLayout( this, 0, 6 );
+ TQVBoxLayout *vtqlayout = new TQVBoxLayout( this, 0, 6 );
- m_nameLbl = new QLabel( this, "" );
- vlayout->addWidget(m_nameLbl);
- vlayout->addSpacing(8);
+ m_nameLbl = new TQLabel( this, "" );
+ vtqlayout->addWidget(m_nameLbl);
+ vtqlayout->addSpacing(8);
propList = new PropertiesListView(this);
- vlayout->addWidget(propList);
- QWhatsThis::add(propList,i18n("<qt>Shows properties associated with the currently selected item(s).<p>Select a property to change its value. If multiple items are selected with different values then the property will appear greyed out, use ""Merge Properties"" to make them the same.<p>Select ""Defaults to set all properties to their default values"""));
+ vtqlayout->addWidget(propList);
+ TQWhatsThis::add(propList,i18n("<qt>Shows properties associated with the currently selected item(s).<p>Select a property to change its value. If multiple items are selected with different values then the property will appear greyed out, use ""Merge Properties"" to make them the same.<p>Select ""Defaults to set all properties to their default values"""));
- QHBoxLayout *h1Layout = new QHBoxLayout( vlayout, 4 );
- QSpacerItem *spacer1 = new QSpacerItem( 1, 1 );
+ TQHBoxLayout *h1Layout = new TQHBoxLayout( vtqlayout, 4 );
+ TQSpacerItem *spacer1 = new TQSpacerItem( 1, 1 );
h1Layout->addItem(spacer1);
- m_defaultsBtn = new QPushButton( i18n("Defaults"), this);
+ m_defaultsBtn = new TQPushButton( i18n("Defaults"), this);
m_defaultsBtn->setEnabled(false);
- connect(m_defaultsBtn,SIGNAL(clicked()),propList,SLOT(slotSetDefaults()));
+ connect(m_defaultsBtn,TQT_SIGNAL(clicked()),propList,TQT_SLOT(slotSetDefaults()));
h1Layout->addWidget(m_defaultsBtn);
- m_mergeBtn = new QPushButton( i18n("Merge properties"), this );
+ m_mergeBtn = new TQPushButton( i18n("Merge properties"), this );
m_mergeBtn->setEnabled(false);
- connect(m_mergeBtn,SIGNAL(clicked()),this,SLOT(mergeProperties()));
+ connect(m_mergeBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(mergeProperties()));
h1Layout->addWidget(m_mergeBtn);
- // Orientation widget stuff
- QHBoxLayout *h2Layout = new QHBoxLayout( vlayout, 6 );
- QSpacerItem *spacer2 = new QSpacerItem( 1, 1 );
+ // Qt::Orientation widget stuff
+ TQHBoxLayout *h2Layout = new TQHBoxLayout( vtqlayout, 6 );
+ TQSpacerItem *spacer2 = new TQSpacerItem( 1, 1 );
h2Layout->addItem(spacer2);
m_orientationWidget = new OrientationWidget(this);
h2Layout->addWidget(m_orientationWidget);
- QWhatsThis::add(m_orientationWidget,i18n("Change the orientation of the selected item by selecting the appropriate button"));
- QSpacerItem *spacer3 = new QSpacerItem( 1, 1 );
+ TQWhatsThis::add(m_orientationWidget,i18n("Change the orientation of the selected item by selecting the appropriate button"));
+ TQSpacerItem *spacer3 = new TQSpacerItem( 1, 1 );
h2Layout->addItem(spacer3);
slotClear();
diff --git a/src/gui/itemeditor.h b/src/gui/itemeditor.h
index 8c21e49..38ed260 100644
--- a/src/gui/itemeditor.h
+++ b/src/gui/itemeditor.h
@@ -11,8 +11,8 @@
#ifndef ITEMEDITOR_H
#define ITEMEDITOR_H
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
class ItemEditor;
@@ -24,8 +24,8 @@ class ICNDocument;
class ItemGroup;
class OrientationWidget;
class PropertiesListView;
-class QPushButton;
-class QLabel;
+class TQPushButton;
+class TQLabel;
namespace KateMDI { class ToolView; }
@@ -33,13 +33,14 @@ namespace KateMDI { class ToolView; }
@author Daniel Clarke
@author David Saxton
*/
-class ItemEditor : public QWidget
+class ItemEditor : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- static ItemEditor * self( KateMDI::ToolView * parent = 0l );
+ static ItemEditor * self( KateMDI::ToolView * tqparent = 0l );
~ItemEditor();
- static QString toolViewIdentifier() { return "ItemEditor"; }
+ static TQString toolViewIdentifier() { return "ItemEditor"; }
public slots:
/**
@@ -70,11 +71,11 @@ class ItemEditor : public QWidget
void mergeProperties();
private:
- ItemEditor( KateMDI::ToolView * parent );
+ ItemEditor( KateMDI::ToolView * tqparent );
- QLabel *m_nameLbl;
- QPushButton *m_defaultsBtn;
- QPushButton *m_mergeBtn;
+ TQLabel *m_nameLbl;
+ TQPushButton *m_defaultsBtn;
+ TQPushButton *m_mergeBtn;
OrientationWidget *m_orientationWidget;
};
diff --git a/src/gui/itemselector.cpp b/src/gui/itemselector.cpp
index f85756e..c02fffd 100644
--- a/src/gui/itemselector.cpp
+++ b/src/gui/itemselector.cpp
@@ -23,23 +23,23 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qwhatsthis.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqwhatsthis.h>
#include <assert.h>
-ILVItem::ILVItem( QListView* parent, const QString &id )
- : KListViewItem( parent, 0 )
+ILVItem::ILVItem( TQListView* tqparent, const TQString &id )
+ : KListViewItem( tqparent, 0 )
{
m_id = id;
b_isRemovable = false;
m_pProjectItem = 0l;
}
-ILVItem::ILVItem( QListViewItem* parent, const QString &id )
- : KListViewItem( parent, 0 )
+ILVItem::ILVItem( TQListViewItem* tqparent, const TQString &id )
+ : KListViewItem( tqparent, 0 )
{
m_id = id;
b_isRemovable = false;
@@ -47,8 +47,8 @@ ILVItem::ILVItem( QListViewItem* parent, const QString &id )
}
-ItemSelector::ItemSelector( QWidget *parent, const char *name )
- : KListView( parent, name )
+ItemSelector::ItemSelector( TQWidget *tqparent, const char *name )
+ : KListView( tqparent, name )
{
addColumn( i18n( "Component" ) );
setFullWidth(true);
@@ -56,10 +56,10 @@ ItemSelector::ItemSelector( QWidget *parent, const char *name )
setRootIsDecorated(true);
setDragEnabled(true);
-// connect( this, SIGNAL(executed(QListViewItem*) ), this, SLOT(slotItemExecuted(QListViewItem*)) );
- connect( this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotItemClicked(QListViewItem*)) );
- connect( this, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(slotItemDoubleClicked(QListViewItem*)) );
- connect( this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int )), this, SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&, int )) );
+// connect( this, TQT_SIGNAL(executed(TQListViewItem*) ), this, TQT_SLOT(slotItemExecuted(TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotItemClicked(TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(slotItemDoubleClicked(TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int )), this, TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int )) );
}
ItemSelector::~ItemSelector()
@@ -75,11 +75,11 @@ void ItemSelector::clear()
}
-void ItemSelector::addItem( const QString & caption, const QString & id, const QString & _category, const QPixmap & icon, bool removable )
+void ItemSelector::addItem( const TQString & caption, const TQString & id, const TQString & _category, const TQPixmap & icon, bool removable )
{
- ILVItem *parentItem = 0L;
+ ILVItem *tqparentItem = 0L;
- QString category = _category;
+ TQString category = _category;
if ( !category.startsWith("/") ) {
category.prepend('/');
}
@@ -87,44 +87,44 @@ void ItemSelector::addItem( const QString & caption, const QString & id, const Q
do
{
category.remove(0,1);
- QString cat;
- category.replace( "\\/", "|" );
- int pos = category.find('/');
+ TQString cat;
+ category.tqreplace( "\\/", "|" );
+ int pos = category.tqfind('/');
if ( pos == -1 ) cat = category;
else cat = category.left( pos );
- cat.replace( "|", "/" );
+ cat.tqreplace( "|", "/" );
- if ( m_categories.findIndex(cat) == -1 )
+ if ( m_categories.tqfindIndex(cat) == -1 )
{
m_categories.append(cat);
- if (parentItem) {
- parentItem = new ILVItem( parentItem, "" );
+ if (tqparentItem) {
+ tqparentItem = new ILVItem( tqparentItem, "" );
}
else {
- parentItem = new ILVItem( this, "" );
+ tqparentItem = new ILVItem( this, "" );
}
- parentItem->setOpen( readOpenState(cat) );
+ tqparentItem->setOpen( readOpenState(cat) );
- parentItem->setExpandable(true);
- parentItem->setText( 0, cat );
+ tqparentItem->setExpandable(true);
+ tqparentItem->setText( 0, cat );
}
else
{
- parentItem = (ILVItem*)findItem( cat, 0 );
+ tqparentItem = (ILVItem*)tqfindItem( cat, 0 );
}
category.remove( 0, pos );
- } while ( category.contains('/') );
+ } while ( category.tqcontains('/') );
- if ( !parentItem )
+ if ( !tqparentItem )
{
- kdError() << "Unexpected error in finding parent item for category list"<<endl;
+ kdError() << "Unexpected error in finding tqparent item for category list"<<endl;
return;
}
- ILVItem *item = new ILVItem( parentItem, id );
+ ILVItem *item = new ILVItem( tqparentItem, id );
item->setPixmap( 0, icon );
item->setText( 0, caption );
item->setRemovable(removable);
@@ -136,10 +136,10 @@ void ItemSelector::writeOpenStates()
KConfig *config = kapp->config();
config->setGroup( name() );
- const QStringList::iterator end = m_categories.end();
- for ( QStringList::iterator it = m_categories.begin(); it != end; ++it )
+ const TQStringList::iterator end = m_categories.end();
+ for ( TQStringList::iterator it = m_categories.begin(); it != end; ++it )
{
- QListViewItem *item = findItem( *it, 0 );
+ TQListViewItem *item = tqfindItem( *it, 0 );
if (item) {
config->writeEntry( *it+"IsOpen", item->isOpen() );
}
@@ -147,7 +147,7 @@ void ItemSelector::writeOpenStates()
}
-bool ItemSelector::readOpenState( const QString &id )
+bool ItemSelector::readOpenState( const TQString &id )
{
KConfig *config = kapp->config();
config->setGroup( name() );
@@ -156,14 +156,14 @@ bool ItemSelector::readOpenState( const QString &id )
}
-void ItemSelector::slotContextMenuRequested( QListViewItem* item, const QPoint& pos, int /*col*/ )
+void ItemSelector::slotContextMenuRequested( TQListViewItem* item, const TQPoint& pos, int /*col*/ )
{
if ( !item || !(static_cast<ILVItem*>(item))->isRemovable() ) {
return;
}
- QPopupMenu *menu = new QPopupMenu(this);
- menu->insertItem( i18n("Remove %1").arg(item->text(0)), this, SLOT(slotRemoveSelectedItem()), Qt::Key_Delete );
+ TQPopupMenu *menu = new TQPopupMenu(this);
+ menu->insertItem( i18n("Remove %1").tqarg(item->text(0)), this, TQT_SLOT(slotRemoveSelectedItem()), TQt::Key_Delete );
menu->popup(pos);
}
@@ -175,25 +175,25 @@ void ItemSelector::slotRemoveSelectedItem()
return;
emit itemRemoved( item->key( 0, 0 ) );
- ILVItem *parent = dynamic_cast<ILVItem*>(item->QListViewItem::parent());
+ ILVItem *tqparent = dynamic_cast<ILVItem*>(item->TQListViewItem::tqparent());
delete item;
- // Get rid of the category as well if it has no children
- if ( parent && !parent->firstChild() )
+ // Get rid of the category as well if it has no tqchildren
+ if ( tqparent && !tqparent->firstChild() )
{
- m_categories.remove(parent->text(0));
- delete parent;
+ m_categories.remove(tqparent->text(0));
+ delete tqparent;
}
}
-void ItemSelector::setListCaption( const QString &caption )
+void ItemSelector::setListCaption( const TQString &caption )
{
setColumnText( 0, caption );
}
-void ItemSelector::slotItemClicked( QListViewItem *item )
+void ItemSelector::slotItemClicked( TQListViewItem *item )
{
if (!item)
return;
@@ -205,12 +205,12 @@ void ItemSelector::slotItemClicked( QListViewItem *item )
}
-void ItemSelector::slotItemDoubleClicked( QListViewItem *item )
+void ItemSelector::slotItemDoubleClicked( TQListViewItem *item )
{
if (!item)
return;
- QString id = item->key( 0, 0 );
+ TQString id = item->key( 0, 0 );
if ( Document * doc = DocManager::self()->getFocusedDocument() )
{
@@ -228,34 +228,34 @@ void ItemSelector::slotItemDoubleClicked( QListViewItem *item )
}
-QDragObject* ItemSelector::dragObject()
+TQDragObject* ItemSelector::dragObject()
{
- const QString id = currentItem()->key(0,0);
+ const TQString id = currentItem()->key(0,0);
- QStoredDrag * d = 0l;
+ TQStoredDrag * d = 0l;
if ( id.startsWith("flow/") )
- d = new QStoredDrag( "ktechlab/flowpart", this );
+ d = new TQStoredDrag( "ktechlab/flowpart", this );
else if ( id.startsWith("ec/") )
- d = new QStoredDrag( "ktechlab/component", this );
+ d = new TQStoredDrag( "ktechlab/component", this );
else if ( id.startsWith("sc/") )
- d = new QStoredDrag( "ktechlab/subcircuit", this );
+ d = new TQStoredDrag( "ktechlab/subcircuit", this );
else if ( id.startsWith("mech/") )
- d = new QStoredDrag( "ktechlab/mechanical", this );
+ d = new TQStoredDrag( "ktechlab/mechanical", this );
if (d)
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << id;
d->setEncodedData(data);
}
// A pixmap cursor is often hard to make out
-// QPixmap *pixmap = const_cast<QPixmap*>(currentItem()->pixmap(0));
+// TQPixmap *pixmap = const_cast<TQPixmap*>(currentItem()->pixmap(0));
// if (pixmap) d->setPixmap(*pixmap);
return d;
@@ -267,21 +267,21 @@ QDragObject* ItemSelector::dragObject()
ComponentSelector * ComponentSelector::m_pSelf = 0l;
-ComponentSelector * ComponentSelector::self( KateMDI::ToolView * parent )
+ComponentSelector * ComponentSelector::self( KateMDI::ToolView * tqparent )
{
if (!m_pSelf)
{
- assert(parent);
- m_pSelf = new ComponentSelector(parent);
+ assert(tqparent);
+ m_pSelf = new ComponentSelector(tqparent);
}
return m_pSelf;
}
-ComponentSelector::ComponentSelector( KateMDI::ToolView * parent )
- : ItemSelector( (QWidget*)parent, "Component Selector" )
+ComponentSelector::ComponentSelector( KateMDI::ToolView * tqparent )
+ : ItemSelector( (TQWidget*)tqparent, "Component Selector" )
{
- QWhatsThis::add( this, i18n(
+ TQWhatsThis::add( this, i18n(
"Add components to the circuit diagram by dragging them into the circuit.<br><br>"
"To add more than one component of the same type, doubleclick on a component, and click repeatedly in the circuit to place the component. Right click to stop placement.<br><br>"
@@ -307,21 +307,21 @@ ComponentSelector::ComponentSelector( KateMDI::ToolView * parent )
FlowPartSelector * FlowPartSelector::m_pSelf = 0l;
-FlowPartSelector * FlowPartSelector::self( KateMDI::ToolView * parent )
+FlowPartSelector * FlowPartSelector::self( KateMDI::ToolView * tqparent )
{
if (!m_pSelf)
{
- assert(parent);
- m_pSelf = new FlowPartSelector(parent);
+ assert(tqparent);
+ m_pSelf = new FlowPartSelector(tqparent);
}
return m_pSelf;
}
-FlowPartSelector::FlowPartSelector( KateMDI::ToolView * parent )
- : ItemSelector( (QWidget*)parent, "Part Selector" )
+FlowPartSelector::FlowPartSelector( KateMDI::ToolView * tqparent )
+ : ItemSelector( (TQWidget*)tqparent, "Part Selector" )
{
- QWhatsThis::add( this, i18n("Add FlowPart to the FlowCode document by dragging them there.<br><br>To add more than one FlowPart of the same type, doubleclick on a FlowPart, and click repeatedly in the FlowChart to place the component. Right click to stop placement.") );
+ TQWhatsThis::add( this, i18n("Add FlowPart to the FlowCode document by dragging them there.<br><br>To add more than one FlowPart of the same type, doubleclick on a FlowPart, and click repeatedly in the FlowChart to place the component. Right click to stop placement.") );
setListCaption( i18n("Flow Part") );
@@ -340,21 +340,21 @@ FlowPartSelector::FlowPartSelector( KateMDI::ToolView * parent )
MechanicsSelector * MechanicsSelector::m_pSelf = 0l;
-MechanicsSelector * MechanicsSelector::self( KateMDI::ToolView * parent )
+MechanicsSelector * MechanicsSelector::self( KateMDI::ToolView * tqparent )
{
if (!m_pSelf)
{
- assert(parent);
- m_pSelf = new MechanicsSelector( (QWidget*)parent );
+ assert(tqparent);
+ m_pSelf = new MechanicsSelector( (TQWidget*)tqparent );
}
return m_pSelf;
}
-MechanicsSelector::MechanicsSelector( QWidget *parent )
- : ItemSelector( (QWidget*)parent, "Mechanics Selector" )
+MechanicsSelector::MechanicsSelector( TQWidget *tqparent )
+ : ItemSelector( (TQWidget*)tqparent, "Mechanics Selector" )
{
- QWhatsThis::add( this, i18n("Add mechanical parts to the mechanics work area by dragging them there.") );
+ TQWhatsThis::add( this, i18n("Add mechanical parts to the mechanics work area by dragging them there.") );
LibraryItemList *items = itemLibrary()->items();
const LibraryItemList::iterator end = items->end();
diff --git a/src/gui/itemselector.h b/src/gui/itemselector.h
index ab9c11c..28f31b2 100644
--- a/src/gui/itemselector.h
+++ b/src/gui/itemselector.h
@@ -13,29 +13,29 @@
#include <klistview.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
class ProjectItem;
-class QStoredDrag;
+class TQStoredDrag;
namespace KateMDI { class ToolView; }
/**
@short Contains info about item for ItemSelector
@author David Saxton
*/
-class ILVItem : public QObject, public KListViewItem
+class ILVItem : public TQObject, public KListViewItem
{
public:
- ILVItem( QListView *parent, const QString &id );
- ILVItem( QListViewItem *parent, const QString &id );
+ ILVItem( TQListView *tqparent, const TQString &id );
+ ILVItem( TQListViewItem *tqparent, const TQString &id );
void setProjectItem( ProjectItem * projectItem ) { m_pProjectItem = projectItem; }
ProjectItem * projectItem() const { return m_pProjectItem; }
- QString id() const { return m_id; }
+ TQString id() const { return m_id; }
- QString key( int, bool ) const { return m_id; }
+ TQString key( int, bool ) const { return m_id; }
/**
* Set whether the item can be removed from the listview by the user
*/
@@ -46,7 +46,7 @@ class ILVItem : public QObject, public KListViewItem
bool isRemovable() const { return b_isRemovable; }
protected:
- QString m_id;
+ TQString m_id;
bool b_isRemovable;
ProjectItem * m_pProjectItem;
};
@@ -58,8 +58,9 @@ class ILVItem : public QObject, public KListViewItem
class ItemSelector : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- ItemSelector( QWidget *parent, const char *name );
+ ItemSelector( TQWidget *tqparent, const char *name );
~ItemSelector();
/**
* Adds a listview item to the ListView
@@ -69,10 +70,10 @@ class ItemSelector : public KListView
* @param icon The icon to be displayed to the left of the text
* @param removable Whether the user can right-click on the item and select Remove
*/
- void addItem( const QString & caption, const QString & id, const QString & category, const QPixmap & icon = QPixmap(), bool removable = false );
+ void addItem( const TQString & caption, const TQString & id, const TQString & category, const TQPixmap & icon = TQPixmap(), bool removable = false );
public slots:
- virtual void slotContextMenuRequested( QListViewItem *item, const QPoint &pos, int col );
+ virtual void slotContextMenuRequested( TQListViewItem *item, const TQPoint &pos, int col );
virtual void clear();
void slotRemoveSelectedItem();
@@ -80,17 +81,17 @@ class ItemSelector : public KListView
/**
* Emitted when a user selects an item and removes it
*/
- void itemRemoved( const QString &id );
- void itemDoubleClicked( const QString &id );
- void itemClicked( const QString &id );
+ void itemRemoved( const TQString &id );
+ void itemDoubleClicked( const TQString &id );
+ void itemClicked( const TQString &id );
protected:
/**
* Sets the caption of the ListView (eg 'Components' or 'Files')
*/
- void setListCaption( const QString &caption );
+ void setListCaption( const TQString &caption );
/**
- * Writes the open status (folded or unfolded) of "parent" items in the view
+ * Writes the open status (folded or unfolded) of "tqparent" items in the view
* to the config file.
*/
void writeOpenStates();
@@ -98,19 +99,19 @@ class ItemSelector : public KListView
* Reads the open status (folded or unfolded) of the given item. The default
* status for non-existant items is true.
*/
- bool readOpenState( const QString &id );
+ bool readOpenState( const TQString &id );
private slots:
- void slotItemClicked( QListViewItem *item );
- void slotItemDoubleClicked( QListViewItem *item );
+ void slotItemClicked( TQListViewItem *item );
+ void slotItemDoubleClicked( TQListViewItem *item );
private:
/**
* @return a dragobject encoding the currently selected component item.
*/
- QDragObject * dragObject();
+ TQDragObject * dragObject();
- QStringList m_categories;
+ TQStringList m_categories;
};
@@ -121,12 +122,13 @@ class ItemSelector : public KListView
class ComponentSelector : public ItemSelector
{
Q_OBJECT
+ TQ_OBJECT
public:
- static ComponentSelector * self( KateMDI::ToolView * parent = 0l );
- static QString toolViewIdentifier() { return "ComponentSelector"; }
+ static ComponentSelector * self( KateMDI::ToolView * tqparent = 0l );
+ static TQString toolViewIdentifier() { return "ComponentSelector"; }
private:
- ComponentSelector( KateMDI::ToolView * parent );
+ ComponentSelector( KateMDI::ToolView * tqparent );
static ComponentSelector * m_pSelf;
};
@@ -138,12 +140,13 @@ class ComponentSelector : public ItemSelector
class FlowPartSelector : public ItemSelector
{
Q_OBJECT
+ TQ_OBJECT
public:
- static FlowPartSelector * self( KateMDI::ToolView * parent = 0l );
- static QString toolViewIdentifier() { return "FlowPartSelector"; }
+ static FlowPartSelector * self( KateMDI::ToolView * tqparent = 0l );
+ static TQString toolViewIdentifier() { return "FlowPartSelector"; }
private:
- FlowPartSelector( KateMDI::ToolView * parent );
+ FlowPartSelector( KateMDI::ToolView * tqparent );
static FlowPartSelector * m_pSelf;
};
@@ -154,12 +157,13 @@ class FlowPartSelector : public ItemSelector
class MechanicsSelector : public ItemSelector
{
Q_OBJECT
+ TQ_OBJECT
public:
- static MechanicsSelector * self( KateMDI::ToolView * parent = 0l );
- static QString toolViewIdentifier() { return "MechanicsSelector"; }
+ static MechanicsSelector * self( KateMDI::ToolView * tqparent = 0l );
+ static TQString toolViewIdentifier() { return "MechanicsSelector"; }
private:
- MechanicsSelector( QWidget *parent = 0L );
+ MechanicsSelector( TQWidget *tqparent = 0L );
static MechanicsSelector * m_pSelf;
};
diff --git a/src/gui/linkeroptionswidget.ui b/src/gui/linkeroptionswidget.ui
index e2c48d8..4674641 100644
--- a/src/gui/linkeroptionswidget.ui
+++ b/src/gui/linkeroptionswidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LinkerOptionsWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>LinkerOptionsWidget</cstring>
</property>
@@ -53,7 +53,7 @@
<string>GPASM supports inhx8m, inhx8s, inhx16, and inhx32 hex file formats. This option controls which hex file format is used.</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -66,7 +66,7 @@
<cstring>m_pLibraryDir</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -74,7 +74,7 @@
<string>Hex Format (-a):</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_pOutputMap</cstring>
</property>
@@ -85,7 +85,7 @@
<string>Alt+O</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel8</cstring>
</property>
@@ -93,7 +93,7 @@
<string>Linker Script (-s):</string>
</property>
</widget>
- <widget class="QLineEdit" row="4" column="1">
+ <widget class="TQLineEdit" row="4" column="1">
<property name="name">
<cstring>m_pLinkerScript</cstring>
</property>
@@ -103,7 +103,7 @@
<cstring>m_pOther</cstring>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -111,7 +111,7 @@
<string>Other:</string>
</property>
</widget>
- <widget class="QGroupBox" row="6" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="6" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -167,7 +167,7 @@
<tabstop>m_pOther</tabstop>
<tabstop>m_pInternalLibraries</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/src/gui/logicwidget.ui b/src/gui/logicwidget.ui
index 18c1860..a931dc5 100644
--- a/src/gui/logicwidget.ui
+++ b/src/gui/logicwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LogicWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>LogicWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -59,7 +59,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -96,7 +96,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -109,7 +109,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox4</cstring>
</property>
@@ -120,7 +120,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -157,7 +157,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -168,7 +168,7 @@
<string>This is the output impedance when the output is high.</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -230,7 +230,7 @@
</widget>
</grid>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
@@ -239,7 +239,7 @@
These values will apply to all components, apart from the PIC, whose pins' impedances depend on the pin in use.</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -253,7 +253,7 @@ These values will apply to all components, apart from the PIC, whose pins' imped
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -262,7 +262,7 @@ These values will apply to all components, apart from the PIC, whose pins' imped
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/src/gui/logview.cpp b/src/gui/logview.cpp
index fcb8caf..690b593 100644
--- a/src/gui/logview.cpp
+++ b/src/gui/logview.cpp
@@ -14,20 +14,20 @@
#include <kiconloader.h>
#include <katemdi.h>
#include <klocale.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
//BEGIN class LogView
-LogView::LogView( KateMDI::ToolView * parent, const char *name )
- : KTextEdit( parent, name )
+LogView::LogView( KateMDI::ToolView * tqparent, const char *name )
+ : KTextEdit( tqparent, name )
{
setReadOnly(true);
- setPaper( Qt::white );
+ setPaper( TQt::white );
setTextFormat( LogText );
setWordWrap( WidgetWidth );
// Connect up signal emitted when the user doubleclicks on a paragraph in the log view
- connect( this, SIGNAL(clicked(int,int)), this, SLOT(slotParaClicked(int,int)) );
+ connect( this, TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(slotParaClicked(int,int)) );
}
@@ -43,29 +43,29 @@ void LogView::clear()
}
-void LogView::addOutput( QString text, OutputType outputType, MessageInfo messageInfo )
+void LogView::addOutput( TQString text, OutputType outputType, MessageInfo messageInfo )
{
tidyText(text);
switch(outputType)
{
case LogView::ot_important:
- append( QString("<font color=\"#000000\"><b>%1</b></font>").arg(text) );
+ append( TQString("<font color=\"#000000\"><b>%1</b></font>").tqarg(text) );
break;
case LogView::ot_info:
- append( QString("<font color=\"#000000\"><i>%1</i></font>").arg(text) );
+ append( TQString("<font color=\"#000000\"><i>%1</i></font>").tqarg(text) );
break;
case LogView::ot_message:
- append( QString("<font color=\"#000000\">%1</font>").arg(text) );
+ append( TQString("<font color=\"#000000\">%1</font>").tqarg(text) );
break;
case LogView::ot_warning:
- append( QString("<font color=\"#666666\">%1</font>").arg(text) );
+ append( TQString("<font color=\"#666666\">%1</font>").tqarg(text) );
break;
case LogView::ot_error:
- append( QString("<font color=\"#800000\">%1</font>").arg(text) );
+ append( TQString("<font color=\"#800000\">%1</font>").tqarg(text) );
break;
}
@@ -75,34 +75,34 @@ void LogView::addOutput( QString text, OutputType outputType, MessageInfo messag
void LogView::slotParaClicked( int para, int /*pos*/ )
{
- QString t = text(para);
+ TQString t = text(para);
untidyText(t);
emit paraClicked( t, m_messageInfoMap[para] );
}
-void LogView::tidyText( QString &t )
+void LogView::tidyText( TQString &t )
{
- t.replace( "&", "&amp;" );
- t.replace( "<", "&lt;" );
- t.replace( ">", "&gt;" );
+ t.tqreplace( "&", "&amp;" );
+ t.tqreplace( "<", "&lt;" );
+ t.tqreplace( ">", "&gt;" );
}
-void LogView::untidyText( QString &t )
+void LogView::untidyText( TQString &t )
{
- t.replace( "&lt;", "<" );
- t.replace( "&gt;", ">" );
- t.replace( "&amp;", "&" );
+ t.tqreplace( "&lt;", "<" );
+ t.tqreplace( "&gt;", ">" );
+ t.tqreplace( "&amp;", "&" );
}
-QPopupMenu * LogView::createPopupMenu( const QPoint & pos )
+TQPopupMenu * LogView::createPopupMenu( const TQPoint & pos )
{
- QPopupMenu * menu = KTextEdit::createPopupMenu( pos );
+ TQPopupMenu * menu = KTextEdit::createPopupMenu( pos );
menu->insertSeparator();
- int id = menu->insertItem( i18n("Clear All"), this, SLOT(clear()) );
+ int id = menu->insertItem( i18n("Clear All"), this, TQT_SLOT(clear()) );
// "an empty textedit is always considered to have one paragraph" - qt documentation
// although this does not always seem to be the case, so I don't know...
@@ -121,7 +121,7 @@ MessageInfo::MessageInfo()
}
-MessageInfo::MessageInfo( QString fileURL, int fileLine )
+MessageInfo::MessageInfo( TQString fileURL, int fileLine )
{
m_fileURL = fileURL;
m_fileLine = fileLine;
diff --git a/src/gui/logview.h b/src/gui/logview.h
index c568da8..a2b9487 100644
--- a/src/gui/logview.h
+++ b/src/gui/logview.h
@@ -14,7 +14,7 @@
class KTechlab;
#include <ktextedit.h>
-#include <qmap.h>
+#include <tqmap.h>
namespace KateMDI { class ToolView; }
@@ -22,16 +22,16 @@ class MessageInfo
{
public:
MessageInfo();
- MessageInfo( QString fileURL, int fileLine );
+ MessageInfo( TQString fileURL, int fileLine );
- QString fileURL() const { return m_fileURL; }
+ TQString fileURL() const { return m_fileURL; }
int fileLine() const { return m_fileLine; }
protected:
- QString m_fileURL;
+ TQString m_fileURL;
int m_fileLine;
};
-typedef QMap<int,MessageInfo> MessageInfoMap;
+typedef TQMap<int,MessageInfo> MessageInfoMap;
/**
@@ -42,8 +42,9 @@ Base class for logviews (eg GpasmInterface) which output information, warnings,
class LogView : public KTextEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- LogView( KateMDI::ToolView * parent, const char *name = 0 );
+ LogView( KateMDI::ToolView * tqparent, const char *name = 0 );
~LogView();
enum OutputType
@@ -59,22 +60,22 @@ class LogView : public KTextEdit
/**
* Emitted when the user clicks on a paragraph in the log view
*/
- void paraClicked( const QString &text, MessageInfo messageInfo );
+ void paraClicked( const TQString &text, MessageInfo messageInfo );
public slots:
virtual void clear();
- void addOutput( QString text, OutputType outputType, MessageInfo messageInfo = MessageInfo() );
+ void addOutput( TQString text, OutputType outputType, MessageInfo messageInfo = MessageInfo() );
protected:
- virtual QPopupMenu * createPopupMenu( const QPoint & pos );
+ virtual TQPopupMenu * createPopupMenu( const TQPoint & pos );
/**
* Replaces "&" with &amp;, "<" with &lt;, etc
*/
- void tidyText( QString &t );
+ void tidyText( TQString &t );
/**
* Replaces "&lt;" with "<", "&amp;" with "&", etc
*/
- void untidyText( QString &t );
+ void untidyText( TQString &t );
MessageInfoMap m_messageInfoMap;
diff --git a/src/gui/microselectwidget.cpp b/src/gui/microselectwidget.cpp
index 1c4150b..a1af719 100644
--- a/src/gui/microselectwidget.cpp
+++ b/src/gui/microselectwidget.cpp
@@ -15,15 +15,15 @@
#include <kcombobox.h>
#include <klocale.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
-
-MicroSelectWidget::MicroSelectWidget( QWidget* parent, const char* name, WFlags )
- : QGroupBox( 4, Qt::Horizontal, i18n("Microprocessor"), parent, name )
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
+
+MicroSelectWidget::MicroSelectWidget( TQWidget* tqparent, const char* name, WFlags )
+ : TQGroupBox( 4, Qt::Horizontal, i18n("Microprocessor"), tqparent, name )
{
m_allowedAsmSet = AsmInfo::AsmSetAll;
m_allowedGpsimSupport = m_allowedFlowCodeSupport = m_allowedMicrobeSupport = MicroInfo::AllSupport;
@@ -31,22 +31,22 @@ MicroSelectWidget::MicroSelectWidget( QWidget* parent, const char* name, WFlags
if ( !name )
setName( "MicroSelectWidget" );
- m_pMicroFamilyLabel = new QLabel( this, "m_pMicroFamilyLabel" );
+ m_pMicroFamilyLabel = new TQLabel( this, "m_pMicroFamilyLabel" );
m_pMicroFamilyLabel->setText( i18n("Family") );
m_pMicroFamily = new KComboBox( FALSE, this, "m_pMicroFamily" );
- m_pMicroFamily->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
+ m_pMicroFamily->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
- m_pMicroLabel = new QLabel( this, "m_pMicroLabel" );
+ m_pMicroLabel = new TQLabel( this, "m_pMicroLabel" );
m_pMicroLabel->setText( i18n("Micro") );
m_pMicro = new KComboBox( FALSE, this, "m_pMicro" );
- m_pMicro->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
+ m_pMicro->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
m_pMicro->setEditable( TRUE );
m_pMicro->setAutoCompletion(true);
updateFromAllowed();
setMicro("P16F84");
- connect( m_pMicroFamily, SIGNAL(activated(const QString & )), this, SLOT(microFamilyChanged(const QString& )) );
+ connect( m_pMicroFamily, TQT_SIGNAL(activated(const TQString & )), this, TQT_SLOT(microFamilyChanged(const TQString& )) );
}
@@ -78,7 +78,7 @@ void MicroSelectWidget::setAllowedMicrobeSupport( unsigned allowed )
void MicroSelectWidget::updateFromAllowed()
{
- QString oldFamily = m_pMicroFamily->currentText();
+ TQString oldFamily = m_pMicroFamily->currentText();
m_pMicroFamily->clear();
@@ -95,7 +95,7 @@ void MicroSelectWidget::updateFromAllowed()
}
-void MicroSelectWidget::setMicro( const QString & id )
+void MicroSelectWidget::setMicro( const TQString & id )
{
MicroInfo * info = MicroLibrary::self()->microInfoWithID(id);
if (!info)
@@ -109,15 +109,15 @@ void MicroSelectWidget::setMicro( const QString & id )
}
-QString MicroSelectWidget::micro() const
+TQString MicroSelectWidget::micro() const
{
return m_pMicro->currentText();
}
-void MicroSelectWidget::microFamilyChanged( const QString & family )
+void MicroSelectWidget::microFamilyChanged( const TQString & family )
{
- QString oldID = m_pMicro->currentText();
+ TQString oldID = m_pMicro->currentText();
m_pMicro->clear();
m_pMicro->insertStringList( MicroLibrary::self()->microIDs( AsmInfo::stringToSet(family), m_allowedGpsimSupport, m_allowedFlowCodeSupport, m_allowedMicrobeSupport ) );
diff --git a/src/gui/microselectwidget.h b/src/gui/microselectwidget.h
index 3730c8f..6555a1e 100644
--- a/src/gui/microselectwidget.h
+++ b/src/gui/microselectwidget.h
@@ -11,29 +11,30 @@
#ifndef MICROSELECTWIDGET_H
#define MICROSELECTWIDGET_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QSpacerItem;
-class QGroupBox;
-class QLabel;
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQSpacerItem;
+class TQGroupBox;
+class TQLabel;
class KComboBox;
/**
@author David Saxton
*/
-class MicroSelectWidget : public QGroupBox
+class MicroSelectWidget : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- MicroSelectWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ MicroSelectWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~MicroSelectWidget();
- void setMicro( const QString & id );
- QString micro() const;
+ void setMicro( const TQString & id );
+ TQString micro() const;
/**
* @see MicroLibrary::microIDs
@@ -53,7 +54,7 @@ class MicroSelectWidget : public QGroupBox
void setAllowedMicrobeSupport( unsigned allowed );
protected slots:
- void microFamilyChanged( const QString & family );
+ void microFamilyChanged( const TQString & family );
protected:
void updateFromAllowed();
@@ -63,10 +64,10 @@ class MicroSelectWidget : public QGroupBox
unsigned int m_allowedFlowCodeSupport;
unsigned int m_allowedMicrobeSupport;
- QHBoxLayout * m_pWidgetLayout;
- QLabel * m_pMicroFamilyLabel;
+ TQHBoxLayout * m_pWidgetLayout;
+ TQLabel * m_pMicroFamilyLabel;
KComboBox * m_pMicroFamily;
- QLabel * m_pMicroLabel;
+ TQLabel * m_pMicroLabel;
KComboBox * m_pMicro;
};
diff --git a/src/gui/microsettingsdlg.cpp b/src/gui/microsettingsdlg.cpp
index c3915e8..78b585d 100644
--- a/src/gui/microsettingsdlg.cpp
+++ b/src/gui/microsettingsdlg.cpp
@@ -24,24 +24,24 @@
#include <kmessagebox.h>
#include <kpushbutton.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qtable.h>
-#include <qwhatsthis.h>
-
-MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *parent, const char *name )
- : KDialogBase( parent, name, true, i18n("PIC Settings"), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, KDialogBase::Ok, true )
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqtable.h>
+#include <tqwhatsthis.h>
+
+MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name, true, i18n("PIC Settings"), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_pMicroSettings = microSettings;
m_pNewPinMappingWidget = 0l;
m_pNewPinMappingDlg = 0l;
m_pWidget = new MicroSettingsWidget(this);
- QWhatsThis::add( this, i18n("This dialog allows editing of the initial properties of the PIC") );
- QWhatsThis::add( m_pWidget->portsGroupBox, i18n("Edit the initial value of the ports here. For each binary number, the order from right-to-left is pins 0 through 7.<br><br>The \"Type (TRIS)\" edit shows the initial input/output state of the ports; 1 represents an input, and 0 an output.<br><br>The \"State (PORT)\" edit shows the initial high/low state of the ports; 1 represents a high, and 0 a low.") );
- QWhatsThis::add( m_pWidget->variables, i18n("Edit the initial value of the variables here.<br><br>Note that the value of the variable can only be in the range 0->255. These variables will be initialized before any other code is executed.") );
+ TQWhatsThis::add( this, i18n("This dialog allows editing of the initial properties of the PIC") );
+ TQWhatsThis::add( m_pWidget->portsGroupBox, i18n("Edit the initial value of the ports here. For each binary number, the order from right-to-left is pins 0 through 7.<br><br>The \"Type (TRIS)\" edit shows the initial input/output state of the ports; 1 represents an input, and 0 an output.<br><br>The \"State (PORT)\" edit shows the initial high/low state of the ports; 1 represents a high, and 0 a low.") );
+ TQWhatsThis::add( m_pWidget->variables, i18n("Edit the initial value of the variables here.<br><br>Note that the value of the variable can only be in the range 0->255. These variables will be initialized before any other code is executed.") );
//BEGIN Initialize initial port settings
@@ -51,14 +51,14 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare
m_portStateEdit.resize( m_portNames.size(), 0 );
uint row = 0;
- QStringList::iterator end = m_portNames.end();
- for ( QStringList::iterator it = m_portNames.begin(); it != end; ++it, ++row )
+ TQStringList::iterator end = m_portNames.end();
+ for ( TQStringList::iterator it = m_portNames.begin(); it != end; ++it, ++row )
{
//BEGIN Get current Type / State text
- QString portType = QString::number( microSettings->portType(*it), 2 );
- QString portState = QString::number( microSettings->portState(*it), 2 );
+ TQString portType = TQString::number( microSettings->portType(*it), 2 );
+ TQString portState = TQString::number( microSettings->portState(*it), 2 );
- QString fill;
+ TQString fill;
fill.fill( '0', 8-portType.length() );
portType.prepend(fill);
fill.fill( '0', 8-portState.length() );
@@ -66,17 +66,17 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare
//END Get current Type / State text
- QGroupBox * groupBox = new QGroupBox( *it, m_pWidget->portsGroupBox );
+ TQGroupBox * groupBox = new TQGroupBox( *it, m_pWidget->portsGroupBox );
groupBox->setColumnLayout(0, Qt::Vertical );
- groupBox->layout()->setSpacing( 6 );
- groupBox->layout()->setMargin( 11 );
- QGridLayout * groupBoxLayout = new QGridLayout( groupBox->layout() );
- groupBoxLayout->setAlignment( Qt::AlignTop );
+ groupBox->tqlayout()->setSpacing( 6 );
+ groupBox->tqlayout()->setMargin( 11 );
+ TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->tqlayout() );
+ groupBoxLayout->tqsetAlignment( TQt::AlignTop );
// TODO: replace this with i18n( "the type", "Type (TRIS register):" );
- groupBoxLayout->addWidget( new QLabel( i18n("Type (TRIS register):"), groupBox ), 0, 0 );
- groupBoxLayout->addWidget( new QLabel( i18n("State (PORT register):"), groupBox ), 1, 0 );
+ groupBoxLayout->addWidget( new TQLabel( i18n("Type (TRIS register):"), groupBox ), 0, 0 );
+ groupBoxLayout->addWidget( new TQLabel( i18n("State (PORT register):"), groupBox ), 1, 0 );
m_portTypeEdit[row] = new KLineEdit( portType, groupBox );
groupBoxLayout->addWidget( m_portTypeEdit[row], 0, 1 );
@@ -84,8 +84,8 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare
m_portStateEdit[row] = new KLineEdit( portState, groupBox );
groupBoxLayout->addWidget( m_portStateEdit[row], 1, 1 );
-// (dynamic_cast<QVBoxLayout*>(m_pWidget->portsGroupBox->layout()))->insertWidget( row, groupBox );
- (dynamic_cast<QVBoxLayout*>(m_pWidget->portsGroupBox->layout()))->addWidget( groupBox );
+// (dynamic_cast<TQVBoxLayout*>(m_pWidget->portsGroupBox->tqlayout()))->insertWidget( row, groupBox );
+ (dynamic_cast<TQVBoxLayout*>(m_pWidget->portsGroupBox->tqlayout()))->addWidget( groupBox );
}
//END Initialize initial port settings
@@ -99,10 +99,10 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare
m_pWidget->variables->setColumnStretchable( 0, true );
m_pWidget->variables->setColumnStretchable( 1, true );
- QStringList variables = microSettings->variableNames();
+ TQStringList variables = microSettings->variableNames();
row = 0;
end = variables.end();
- for ( QStringList::iterator it = variables.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = variables.begin(); it != end; ++it )
{
VariableInfo *info = microSettings->variableInfo(*it);
if (info)
@@ -115,16 +115,16 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare
}
m_pWidget->variables->insertRows( row, 1 );
- connect( m_pWidget->variables, SIGNAL(valueChanged(int,int)), this, SLOT(checkAddVariableRow()) );
+ connect( m_pWidget->variables, TQT_SIGNAL(valueChanged(int,int)), this, TQT_SLOT(checkAddVariableRow()) );
//END Initialize initial variable settings
//BEGIN Initialize pin maps
- connect( m_pWidget->pinMapAdd, SIGNAL(clicked()), this, SLOT(slotCreatePinMap()) );
- connect( m_pWidget->pinMapModify, SIGNAL(clicked()), this, SLOT(slotModifyPinMap()) );
- connect( m_pWidget->pinMapRename, SIGNAL(clicked()), this, SLOT(slotRenamePinMap()) );
- connect( m_pWidget->pinMapRemove, SIGNAL(clicked()), this, SLOT(slotRemovePinMap()) );
+ connect( m_pWidget->pinMapAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreatePinMap()) );
+ connect( m_pWidget->pinMapModify, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModifyPinMap()) );
+ connect( m_pWidget->pinMapRename, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRenamePinMap()) );
+ connect( m_pWidget->pinMapRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemovePinMap()) );
m_pinMappings = microSettings->pinMappings();
m_pWidget->pinMapCombo->insertStringList( m_pinMappings.keys() );
@@ -138,7 +138,7 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare
m_pWidget->adjustSize();
adjustSize();
- connect( this, SIGNAL(applyClicked()), this, SLOT(slotSaveStuff()) );
+ connect( this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotSaveStuff()) );
}
@@ -174,64 +174,64 @@ void MicroSettingsDlg::reject()
}
-QValidator::State MicroSettingsDlg::validatePinMapName( QString & name ) const
+TQValidator::State MicroSettingsDlg::validatePinMapName( TQString & name ) const
{
- name.replace( ' ', '_' );
+ name.tqreplace( ' ', '_' );
if ( name.isEmpty() )
- return QValidator::Intermediate;
+ return TQValidator::Intermediate;
for ( unsigned i = 0; i < name.length(); ++i )
{
if ( !name[i].isLetterOrNumber() && name[i] != '_' )
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
if ( name[0].isNumber() )
- return QValidator::Intermediate;
+ return TQValidator::Intermediate;
if ( m_pWidget->pinMapCombo->contains( name ) )
- return QValidator::Intermediate;
+ return TQValidator::Intermediate;
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
}
-class PinMappingNameValidator : public QValidator
+class PinMappingNameValidator : public TQValidator
{
public:
/**
* Create a validator. If oldName is not empty, then the input is
* allowed to be oldName.
*/
- PinMappingNameValidator( MicroSettingsDlg * dlg, const QString & oldName = 0 )
- : QValidator(0)
+ PinMappingNameValidator( MicroSettingsDlg * dlg, const TQString & oldName = 0 )
+ : TQValidator(0)
{
m_pDlg = dlg;
m_oldName = oldName;
}
- virtual State validate( QString & input, int & ) const
+ virtual State validate( TQString & input, int & ) const
{
if ( (!m_oldName.isEmpty()) && (input == m_oldName) )
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
return m_pDlg->validatePinMapName( input );
}
protected:
MicroSettingsDlg * m_pDlg;
- QString m_oldName;
+ TQString m_oldName;
};
-void MicroSettingsDlg::slotCheckNewPinMappingName( const QString & name )
+void MicroSettingsDlg::slotCheckNewPinMappingName( const TQString & name )
{
// Validate name might change the name so that it is valid
- QString newName = name;
+ TQString newName = name;
if ( m_pNewPinMappingWidget )
- m_pNewPinMappingDlg->enableButtonOK( validatePinMapName( newName ) == QValidator::Acceptable );
+ m_pNewPinMappingDlg->enableButtonOK( validatePinMapName( newName ) == TQValidator::Acceptable );
if ( newName != name )
m_pNewPinMappingWidget->nameEdit->setText( newName );
@@ -248,18 +248,18 @@ void MicroSettingsDlg::slotCreatePinMap()
PinMappingNameValidator * validator = new PinMappingNameValidator( this );
m_pNewPinMappingWidget->nameEdit->setValidator( validator );
- connect( m_pNewPinMappingWidget->nameEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckNewPinMappingName(const QString &)) );
+ connect( m_pNewPinMappingWidget->nameEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotCheckNewPinMappingName(const TQString &)) );
slotCheckNewPinMappingName( 0 );
int accepted = m_pNewPinMappingDlg->exec();
unsigned selectedType = m_pNewPinMappingWidget->typeCombo->currentItem();
- QString name = m_pNewPinMappingWidget->nameEdit->text();
+ TQString name = m_pNewPinMappingWidget->nameEdit->text();
delete m_pNewPinMappingDlg;
delete validator;
m_pNewPinMappingDlg = 0l;
m_pNewPinMappingWidget = 0l;
- if ( accepted != QDialog::Accepted )
+ if ( accepted != TQDialog::Accepted )
return;
PinMapping::Type type = PinMapping::Invalid;
@@ -296,14 +296,14 @@ void MicroSettingsDlg::slotRenamePinMap()
{
KComboBox * combo = m_pWidget->pinMapCombo;
- QString oldName = combo->currentText();
+ TQString oldName = combo->currentText();
if ( oldName.isEmpty() )
return;
PinMappingNameValidator * validator = new PinMappingNameValidator( this, oldName );
bool ok = false;
- QString newName = KInputDialog::getText( i18n("New Pin Map Name"), i18n("Name"), oldName, & ok, this, 0, validator );
+ TQString newName = KInputDialog::getText( i18n("New Pin Map Name"), i18n("Name"), oldName, & ok, this, 0, validator );
delete validator;
@@ -322,7 +322,7 @@ void MicroSettingsDlg::slotRenamePinMap()
void MicroSettingsDlg::slotModifyPinMap()
{
- QString name = m_pWidget->pinMapCombo->currentText();
+ TQString name = m_pWidget->pinMapCombo->currentText();
PinMapping pinMapping = m_pinMappings[ name ];
PinMapEditor * pinMapEditor = new PinMapEditor( & pinMapping, m_pMicroSettings->microInfo(), this, "PinMapEditor" );
@@ -330,7 +330,7 @@ void MicroSettingsDlg::slotModifyPinMap()
delete pinMapEditor;
- if ( accepted != QDialog::Accepted )
+ if ( accepted != TQDialog::Accepted )
return;
m_pinMappings[ name ] = pinMapping;
@@ -341,7 +341,7 @@ void MicroSettingsDlg::slotRemovePinMap()
{
KComboBox * combo = m_pWidget->pinMapCombo;
- QString pinMapID = combo->currentText();
+ TQString pinMapID = combo->currentText();
if ( pinMapID.isEmpty() )
return;
@@ -364,32 +364,32 @@ void MicroSettingsDlg::updatePinMapButtons()
void MicroSettingsDlg::savePort( int row )
{
- QString port = m_portNames[row];
+ TQString port = m_portNames[row];
int type, state;
- QString typeText = m_portTypeEdit[row]->text();
+ TQString typeText = m_portTypeEdit[row]->text();
bool typeOk = true;
- if ( typeText.startsWith( "0x", false ) ) type = typeText.remove(0,2).toInt( &typeOk, 16 );
- else if ( typeText.contains( QRegExp("[^01]") ) ) type = typeText.toInt( &typeOk, 10 );
+ if ( typeText.tqstartsWith( "0x", false ) ) type = typeText.remove(0,2).toInt( &typeOk, 16 );
+ else if ( typeText.tqcontains( TQRegExp("[^01]") ) ) type = typeText.toInt( &typeOk, 10 );
else type = typeText.toInt( &typeOk, 2 );
if ( !typeOk )
{
-// KMessageBox::sorry( this, i18n("Unregnised Port Type: %1").arg(typeText) );
+// KMessageBox::sorry( this, i18n("Unregnised Port Type: %1").tqarg(typeText) );
return;
}
- QString stateText = m_portStateEdit[row]->text();
+ TQString stateText = m_portStateEdit[row]->text();
bool stateOk = true;
- if ( stateText.startsWith( "0x", false ) ) state = stateText.remove(0,2).toInt( &stateOk, 16 );
- else if ( stateText.contains( QRegExp("[^01]") ) ) state = stateText.toInt( &stateOk, 10 );
+ if ( stateText.tqstartsWith( "0x", false ) ) state = stateText.remove(0,2).toInt( &stateOk, 16 );
+ else if ( stateText.tqcontains( TQRegExp("[^01]") ) ) state = stateText.toInt( &stateOk, 10 );
else state = stateText.toInt( &stateOk, 2 );
if ( !stateOk )
{
-// KMessageBox::sorry( this, i18n("Unregnised Port State: %1").arg(stateText) );
+// KMessageBox::sorry( this, i18n("Unregnised Port State: %1").tqarg(stateText) );
return;
}
@@ -400,18 +400,18 @@ void MicroSettingsDlg::savePort( int row )
void MicroSettingsDlg::saveVariable( int row )
{
- QString name = m_pWidget->variables->text( row, 0 );
+ TQString name = m_pWidget->variables->text( row, 0 );
if ( name.isEmpty() ) return;
- QString valueText = m_pWidget->variables->text( row, 1 );
+ TQString valueText = m_pWidget->variables->text( row, 1 );
int value;
bool ok = true;
- if ( valueText.startsWith( "0x", false ) ) value = valueText.remove(0,2).toInt( &ok, 16 );
+ if ( valueText.tqstartsWith( "0x", false ) ) value = valueText.remove(0,2).toInt( &ok, 16 );
else value = valueText.toInt( &ok, 10 );
if (!ok)
{
- KMessageBox::sorry( this, i18n("Invalid variable value: %1").arg(valueText) );
+ KMessageBox::sorry( this, i18n("Invalid variable value: %1").tqarg(valueText) );
return;
}
diff --git a/src/gui/microsettingsdlg.h b/src/gui/microsettingsdlg.h
index 54582dd..3e47bfb 100644
--- a/src/gui/microsettingsdlg.h
+++ b/src/gui/microsettingsdlg.h
@@ -13,9 +13,9 @@
#include <kdialogbase.h>
-#include <qmap.h>
-#include <qvalidator.h>
-#include <qvaluevector.h>
+#include <tqmap.h>
+#include <tqvalidator.h>
+#include <tqvaluevector.h>
class KLineEdit;
class MicroSettings;
@@ -23,7 +23,7 @@ class MicroSettingsWidget;
class NewPinMappingWidget;
class PinMapping;
-typedef QMap< QString, PinMapping > PinMappingMap;
+typedef TQMap< TQString, PinMapping > PinMappingMap;
/**
@author David Saxton
@@ -31,8 +31,9 @@ typedef QMap< QString, PinMapping > PinMappingMap;
class MicroSettingsDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- MicroSettingsDlg( MicroSettings *_microSettings, QWidget *parent = 0L, const char *name = 0L );
+ MicroSettingsDlg( MicroSettings *_microSettings, TQWidget *tqparent = 0L, const char *name = 0L );
~MicroSettingsDlg();
void reject();
@@ -45,7 +46,7 @@ class MicroSettingsDlg : public KDialogBase
* Intermediate for a pinMapName that starts with a number or is already
* in use, and Acceptable otherwise.
*/
- QValidator::State validatePinMapName( QString & pinMapName ) const;
+ TQValidator::State validatePinMapName( TQString & pinMapName ) const;
public slots:
/**
@@ -84,7 +85,7 @@ class MicroSettingsDlg : public KDialogBase
void slotSaveStuff();
protected slots:
- void slotCheckNewPinMappingName( const QString & name );
+ void slotCheckNewPinMappingName( const TQString & name );
protected:
/**
@@ -97,9 +98,9 @@ class MicroSettingsDlg : public KDialogBase
MicroSettingsWidget * m_pWidget;
MicroSettings * m_pMicroSettings;
PinMappingMap m_pinMappings;
- QValueVector< KLineEdit * > m_portTypeEdit;
- QValueVector< KLineEdit * > m_portStateEdit;
- QStringList m_portNames;
+ TQValueVector< KLineEdit * > m_portTypeEdit;
+ TQValueVector< KLineEdit * > m_portStateEdit;
+ TQStringList m_portNames;
};
#endif
diff --git a/src/gui/microsettingswidget.ui b/src/gui/microsettingswidget.ui
index 5c63a1b..417275d 100644
--- a/src/gui/microsettingswidget.ui
+++ b/src/gui/microsettingswidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>MicroSettingsWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>MicroSettingsWidget</cstring>
</property>
@@ -30,7 +30,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>portsGroupBox</cstring>
</property>
@@ -41,7 +41,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -63,7 +63,7 @@ Drag it to set the type (input/output).</string>
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox6</cstring>
</property>
@@ -82,7 +82,7 @@ Drag it to set the type (input/output).</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTable">
+ <widget class="TQTable">
<column>
<property name="text">
<string>Variable</string>
@@ -96,7 +96,7 @@ Drag it to set the type (input/output).</string>
<property name="name">
<cstring>variables</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>64</height>
@@ -111,7 +111,7 @@ Drag it to set the type (input/output).</string>
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -145,7 +145,7 @@ Drag it to set the type (input/output).</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>60</width>
<height>20</height>
@@ -186,7 +186,7 @@ Drag it to set the type (input/output).</string>
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/src/gui/newfiledlg.cpp b/src/gui/newfiledlg.cpp
index 485b3bf..8342976 100644
--- a/src/gui/newfiledlg.cpp
+++ b/src/gui/newfiledlg.cpp
@@ -25,46 +25,46 @@
#include <klocale.h>
#include <kiconloader.h>
-#include <qcanvas.h>
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qpaintdevicemetrics.h>
+#include <tqcanvas.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqpaintdevicemetrics.h>
-NewFileDlg::NewFileDlg( QWidget *parent )
- : KDialogBase( parent, "newfiledlg", true, "New File", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
+NewFileDlg::NewFileDlg( TQWidget *tqparent )
+ : KDialogBase( tqparent, "newfiledlg", true, "New File", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
- m_pMainParent = parent;
+ m_pMainParent = tqparent;
m_bAccepted = false;
m_pNewFileWidget = new NewFileWidget(this);
- m_pNewFileWidget->typeIconView->setSelectionMode(QIconView::Single);
+ m_pNewFileWidget->typeIconView->setSelectionMode(TQIconView::Single);
m_pNewFileWidget->typeIconView->setMode(KIconView::Select);
KIconLoader *loader = KGlobal::iconLoader();
- QValueList<QIconViewItem*> items;
+ TQValueList<TQIconViewItem*> items;
- items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Assembly Code (.asm)", loader->loadIcon( "source", KIcon::NoGroup, KIcon::SizeHuge ) );
- items << new QIconViewItem(m_pNewFileWidget->typeIconView,"C (.c)", loader->loadIcon( "source_c", KIcon::NoGroup, KIcon::SizeHuge ) );
- items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Circuit (.circuit)", loader->loadIcon( "ktechlab_circuit", KIcon::NoGroup, KIcon::SizeHuge ) );
- items << new QIconViewItem(m_pNewFileWidget->typeIconView,"FlowCode (.flowcode)", loader->loadIcon( "ktechlab_flowcode", KIcon::NoGroup, KIcon::SizeHuge ) );
+ items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Assembly Code (.asm)", loader->loadIcon( "source", KIcon::NoGroup, KIcon::SizeHuge ) );
+ items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"C (.c)", loader->loadIcon( "source_c", KIcon::NoGroup, KIcon::SizeHuge ) );
+ items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Circuit (.circuit)", loader->loadIcon( "ktechlab_circuit", KIcon::NoGroup, KIcon::SizeHuge ) );
+ items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"FlowCode (.flowcode)", loader->loadIcon( "ktechlab_flowcode", KIcon::NoGroup, KIcon::SizeHuge ) );
#ifdef MECHANICS
- items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Mechanics (.mechanics)", loader->loadIcon( "exec", KIcon::NoGroup, KIcon::SizeHuge ) );
+ items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Mechanics (.mechanics)", loader->loadIcon( "exec", KIcon::NoGroup, KIcon::SizeHuge ) );
#endif
- items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Microbe (.microbe)", loader->loadIcon( "ktechlab_microbe", KIcon::NoGroup, KIcon::SizeHuge ) );
+ items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Microbe (.microbe)", loader->loadIcon( "ktechlab_microbe", KIcon::NoGroup, KIcon::SizeHuge ) );
unsigned minWidth = 20 + m_pNewFileWidget->typeIconView->spacing() * items.size();
int minHeight = 0;
- const QValueList<QIconViewItem*>::iterator end = items.end();
- for ( QValueList<QIconViewItem*>::iterator it = items.begin(); it != end; ++it )
+ const TQValueList<TQIconViewItem*>::iterator end = items.end();
+ for ( TQValueList<TQIconViewItem*>::iterator it = items.begin(); it != end; ++it )
{
(*it)->setDragEnabled(false);
minWidth += (*it)->width();
- minHeight = QMAX( minHeight, (*it)->height()+20 );
+ minHeight = TQMAX( minHeight, (*it)->height()+20 );
}
m_pNewFileWidget->typeIconView->setMinimumSize( minWidth, minHeight );
@@ -76,8 +76,8 @@ NewFileDlg::NewFileDlg( QWidget *parent )
setMainWidget(m_pNewFileWidget);
// Our behaviour is to have single click selects and double click accepts the dialog
- connect( m_pNewFileWidget->typeIconView, SIGNAL(selectionChanged(QIconViewItem*)), this, SLOT(fileTypeChanged(QIconViewItem*)) );
- connect( m_pNewFileWidget->typeIconView, SIGNAL(doubleClicked(QIconViewItem*)), this, SLOT(accept()));
+ connect( m_pNewFileWidget->typeIconView, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(fileTypeChanged(TQIconViewItem*)) );
+ connect( m_pNewFileWidget->typeIconView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)), this, TQT_SLOT(accept()));
setAcceptDrops(true);
@@ -91,30 +91,30 @@ void NewFileDlg::accept()
hide();
m_bAccepted = true;
- const QString fileText = m_pNewFileWidget->typeIconView->currentItem()->text();
+ const TQString fileText = m_pNewFileWidget->typeIconView->currentItem()->text();
- if ( fileText.contains(".flowcode") )
+ if ( fileText.tqcontains(".flowcode") )
m_fileType = Document::dt_flowcode;
- else if ( fileText.contains(".circuit") )
+ else if ( fileText.tqcontains(".circuit") )
m_fileType = Document::dt_circuit;
- else if ( fileText.contains(".mechanics") )
+ else if ( fileText.tqcontains(".mechanics") )
m_fileType = Document::dt_mechanics;
- else if ( fileText.contains(".asm") )
+ else if ( fileText.tqcontains(".asm") )
{
m_fileType = Document::dt_text;
m_codeType = TextDocument::ct_asm;
}
- else if ( fileText.contains(".basic") || fileText.contains(".microbe") )
+ else if ( fileText.tqcontains(".basic") || fileText.tqcontains(".microbe") )
{
m_fileType = Document::dt_text;
m_codeType = TextDocument::ct_microbe;
}
- else if (fileText.contains(".c") )
+ else if (fileText.tqcontains(".c") )
{
m_fileType = Document::dt_text;
m_codeType = TextDocument::ct_c;
@@ -135,10 +135,10 @@ void NewFileDlg::reject()
}
-void NewFileDlg::fileTypeChanged( QIconViewItem *item )
+void NewFileDlg::fileTypeChanged( TQIconViewItem *item )
{
m_pNewFileWidget->m_pMicroSelect->setEnabled(
- item->text().contains(".flowcode") );
+ item->text().tqcontains(".flowcode") );
}
diff --git a/src/gui/newfiledlg.h b/src/gui/newfiledlg.h
index fc20800..28d3959 100644
--- a/src/gui/newfiledlg.h
+++ b/src/gui/newfiledlg.h
@@ -15,7 +15,7 @@
class MicroSelectWidget;
class NewFileWidget;
-class QIconViewItem;
+class TQIconViewItem;
/**
A standard dialog for getting file details from the user for a new project
@@ -25,8 +25,9 @@ A standard dialog for getting file details from the user for a new project
class NewFileDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NewFileDlg( QWidget *parent );
+ NewFileDlg( TQWidget *tqparent );
void reject();
void accept();
@@ -35,21 +36,21 @@ class NewFileDlg : public KDialogBase
int fileType() const { return m_fileType; }
int codeType() const { return m_codeType; }
bool addToProject() const { return m_bAddToProject; }
- QString microID() const { return m_microID; }
+ TQString microID() const { return m_microID; }
MicroSelectWidget * microSelectWidget() const;
public slots:
- void fileTypeChanged( QIconViewItem *item );
+ void fileTypeChanged( TQIconViewItem *item );
protected:
bool m_bAccepted;
int m_fileType;
int m_codeType;
bool m_bAddToProject;
- QString m_microID;
+ TQString m_microID;
NewFileWidget * m_pNewFileWidget;
- QWidget * m_pMainParent;
+ TQWidget * m_pMainParent;
};
#endif
diff --git a/src/gui/newfilewidget.ui b/src/gui/newfilewidget.ui
index 0e02524..4925106 100644
--- a/src/gui/newfilewidget.ui
+++ b/src/gui/newfilewidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>NewFileWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>NewFileWidget</cstring>
</property>
@@ -31,7 +31,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -52,14 +52,14 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<string>New File Details</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2_2</cstring>
</property>
<property name="text">
<string>File Type:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter</set>
</property>
</widget>
@@ -75,7 +75,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>500</width>
<height>150</height>
@@ -94,7 +94,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="1">
+ <widget class="TQCheckBox" row="3" column="1">
<property name="name">
<cstring>addToProjectCheck</cstring>
</property>
@@ -128,13 +128,13 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -151,7 +151,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>0</height>
@@ -187,7 +187,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<tabstop>typeIconView</tabstop>
<tabstop>addToProjectCheck</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kiconview.h</includehint>
<includehint>microselectwidget.h</includehint>
diff --git a/src/gui/newpinmappingwidget.ui b/src/gui/newpinmappingwidget.ui
index 4ac5932..3ea01e7 100644
--- a/src/gui/newpinmappingwidget.ui
+++ b/src/gui/newpinmappingwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>NewPinMappingWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>NewPinMappingWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -30,7 +30,7 @@
<string>Type:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -38,7 +38,7 @@
<string>Name:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -64,7 +64,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
@@ -83,7 +83,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>300</width>
<height>0</height>
@@ -93,7 +93,7 @@
<string>The variable name of the pin mapping - this must be a valid Microbe variable name.</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<item>
<property name="text">
<string>Seven Segment</string>
@@ -112,7 +112,7 @@
<property name="name">
<cstring>typeCombo</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>200</width>
<height>0</height>
@@ -123,7 +123,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/src/gui/newprojectwidget.ui b/src/gui/newprojectwidget.ui
index 9d8648f..efcebad 100644
--- a/src/gui/newprojectwidget.ui
+++ b/src/gui/newprojectwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>NewProjectWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>NewProjectWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel8</cstring>
</property>
@@ -30,7 +30,7 @@
<string>Final location:</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="1" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="4" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>locationLabel</cstring>
</property>
@@ -48,14 +48,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -63,7 +63,7 @@
<string>Location:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -76,7 +76,7 @@
<string>New Project Details</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -100,7 +100,7 @@
<tabstop>projectNameEdit</tabstop>
<tabstop>projectLocationURL</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>kurlrequester.h</includehint>
diff --git a/src/gui/orientationwidget.cpp b/src/gui/orientationwidget.cpp
index 28e10c7..49137c2 100644
--- a/src/gui/orientationwidget.cpp
+++ b/src/gui/orientationwidget.cpp
@@ -18,42 +18,42 @@
#include "node.h"
#include <kstandarddirs.h>
-#include <qbitmap.h>
-#include <qlayout.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
+#include <tqbitmap.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
const int _size = 44;
-OrientationWidget::OrientationWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+OrientationWidget::OrientationWidget(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
- QGridLayout *layout = new QGridLayout( this, 2, 4, 0, 4 );
+ TQGridLayout *tqlayout = new TQGridLayout( this, 2, 4, 0, 4 );
p_activeFlowPart = 0l;
for ( int row=0; row<2; ++row )
{
for ( int col=0; col<4; ++col )
{
- QPushButton *btn = new QPushButton(this);
+ TQPushButton *btn = new TQPushButton(this);
m_toolBtn[row][col] = btn;
- layout->addWidget( btn, row, col );
+ tqlayout->addWidget( btn, row, col );
btn->setFixedSize( _size+6, _size+6 );
// btn->setFlat(true);
btn->setEnabled(false);
}
}
- connect( m_toolBtn[0][0], SIGNAL(clicked()), this, SLOT(set_cio_noflip_0()) );
- connect( m_toolBtn[0][1], SIGNAL(clicked()), this, SLOT(set_cio_noflip_90()) );
- connect( m_toolBtn[0][2], SIGNAL(clicked()), this, SLOT(set_cio_noflip_180()) );
- connect( m_toolBtn[0][3], SIGNAL(clicked()), this, SLOT(set_cio_noflip_270()) );
- connect( m_toolBtn[1][0], SIGNAL(clicked()), this, SLOT(set_cio_flip_0()) );
- connect( m_toolBtn[1][1], SIGNAL(clicked()), this, SLOT(set_cio_flip_90()) );
- connect( m_toolBtn[1][2], SIGNAL(clicked()), this, SLOT(set_cio_flip_180()) );
- connect( m_toolBtn[1][3], SIGNAL(clicked()), this, SLOT(set_cio_flip_270()) );
+ connect( m_toolBtn[0][0], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_0()) );
+ connect( m_toolBtn[0][1], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_90()) );
+ connect( m_toolBtn[0][2], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_180()) );
+ connect( m_toolBtn[0][3], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_270()) );
+ connect( m_toolBtn[1][0], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_0()) );
+ connect( m_toolBtn[1][1], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_90()) );
+ connect( m_toolBtn[1][2], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_180()) );
+ connect( m_toolBtn[1][3], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_270()) );
}
@@ -98,7 +98,7 @@ void OrientationWidget::initFromFlowPart( FlowPart *flowPart )
if ( valid & (1<<o) )
{
m_toolBtn[i][j]->setEnabled(true);
- QPixmap pm( 50, 50 );
+ TQPixmap pm( 50, 50 );
flowPart->orientationPixmap( o, pm );
m_toolBtn[i][j]->setPixmap(pm);
}
@@ -109,9 +109,9 @@ void OrientationWidget::initFromFlowPart( FlowPart *flowPart )
void OrientationWidget::initFromComponent( Component *component )
{
- const QImage im = itemLibrary()->itemImage(component);
+ const TQImage im = itemLibrary()->itemImage(component);
- QRect bound = component->boundingRect();
+ TQRect bound = component->boundingRect();
// We want a nice square bounding rect
const int dy = bound.width() - bound.height();
@@ -127,24 +127,24 @@ void OrientationWidget::initFromComponent( Component *component )
}
- QPixmap tbPm;
+ TQPixmap tbPm;
tbPm.convertFromImage(im);
m_toolBtn[0][0]->setPixmap(tbPm);
m_toolBtn[0][0]->setEnabled(true);
if ( component->canRotate() )
{
-// QPixmap tbPm;
+// TQPixmap tbPm;
tbPm.convertFromImage( im.xForm( Component::transMatrix( 90, false, bound.width()/2, bound.height()/2 ) ) );
m_toolBtn[0][1]->setPixmap(tbPm);
m_toolBtn[0][1]->setEnabled(true);
-// QPixmap tbPm;
+// TQPixmap tbPm;
tbPm.convertFromImage( im.xForm( Component::transMatrix( 180, false, bound.width()/2, bound.height()/2 ) ) );
m_toolBtn[0][2]->setPixmap(tbPm);
m_toolBtn[0][2]->setEnabled(true);
-// QPixmap tbPm;
+// TQPixmap tbPm;
tbPm.convertFromImage( im.xForm( Component::transMatrix( 270, false, bound.width()/2, bound.height()/2 ) ) );
m_toolBtn[0][3]->setPixmap(tbPm);
m_toolBtn[0][3]->setEnabled(true);
@@ -152,24 +152,24 @@ void OrientationWidget::initFromComponent( Component *component )
if ( component->canFlip() )
{
-// QPixmap tbPm;
+// TQPixmap tbPm;
tbPm.convertFromImage( im.xForm( Component::transMatrix( 0, true, bound.width()/2, bound.height()/2 ) ) );
m_toolBtn[1][0]->setPixmap(tbPm);
m_toolBtn[1][0]->setEnabled(true);
if ( component->canRotate() )
{
-// QPixmap tbPm;
+// TQPixmap tbPm;
tbPm.convertFromImage( im.xForm( Component::transMatrix( 90, true, bound.width()/2, bound.height()/2 ) ) );
m_toolBtn[1][1]->setPixmap(tbPm);
m_toolBtn[1][1]->setEnabled(true);
-// QPixmap tbPm;
+// TQPixmap tbPm;
tbPm.convertFromImage( im.xForm( Component::transMatrix( 180, true, bound.width()/2, bound.height()/2 ) ) );
m_toolBtn[1][2]->setPixmap(tbPm);
m_toolBtn[1][2]->setEnabled(true);
-// QPixmap tbPm;
+// TQPixmap tbPm;
tbPm.convertFromImage( im.xForm( Component::transMatrix( 270, true, bound.width()/2, bound.height()/2 ) ) );
m_toolBtn[1][3]->setPixmap(tbPm);
m_toolBtn[1][3]->setEnabled(true);
@@ -185,7 +185,7 @@ void OrientationWidget::slotClear()
for ( int col=0; col<4; ++col )
{
// Hmm...this line has crashed before
- m_toolBtn[row][col]->setPixmap( QPixmap::QPixmap() );
+ m_toolBtn[row][col]->setPixmap( TQPixmap::TQPixmap() );
m_toolBtn[row][col]->setEnabled(false);
}
}
diff --git a/src/gui/orientationwidget.h b/src/gui/orientationwidget.h
index 6a6b6ce..84d2071 100644
--- a/src/gui/orientationwidget.h
+++ b/src/gui/orientationwidget.h
@@ -11,22 +11,23 @@
#ifndef ORIENTATIONWIDGET_H
#define ORIENTATIONWIDGET_H
-#include <qguardedptr.h>
-#include <qwidget.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
class CNItem;
class CNItemGroup;
class FlowPart;
-class QPushButton;
+class TQPushButton;
/**
@author David Saxton
*/
-class OrientationWidget : public QWidget
+class OrientationWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- OrientationWidget( QWidget *parent = 0l, const char *name = 0l );
+ OrientationWidget( TQWidget *tqparent = 0l, const char *name = 0l );
~OrientationWidget();
public slots:
@@ -49,8 +50,8 @@ protected:
void initFromComponent( Component *component );
void initFromFlowPart( FlowPart *flowPart );
- QPushButton *m_toolBtn[2][4];
- QGuardedPtr<FlowPart> p_activeFlowPart;
+ TQPushButton *m_toolBtn[2][4];
+ TQGuardedPtr<FlowPart> p_activeFlowPart;
};
#endif
diff --git a/src/gui/oscilloscope.cpp b/src/gui/oscilloscope.cpp
index e969f72..50d1346 100644
--- a/src/gui/oscilloscope.cpp
+++ b/src/gui/oscilloscope.cpp
@@ -24,42 +24,42 @@
#include <kiconloader.h>
#include <klocale.h>
#include <knuminput.h>
-#include <qbutton.h>
-#include <qlabel.h>
-#include <qscrollbar.h>
-#include <qslider.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
+#include <tqbutton.h>
+#include <tqlabel.h>
+#include <tqscrollbar.h>
+#include <tqslider.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
#include <assert.h>
//BEGIN Oscilloscope Class
-QColor probeColors[9] = {
- QColor( 0x52, 0x22, 0x00 ),
- QColor( 0xB5, 0x00, 0x2F ),
- QColor( 0xF9, 0xBA, 0x07 ),
- QColor( 0x53, 0x93, 0x16 ),
- QColor( 0x00, 0x66, 0x2F ),
- QColor( 0x00, 0x41, 0x88 ),
- QColor( 0x1B, 0x2D, 0x83 ),
- QColor( 0x55, 0x12, 0x7B ),
- QColor( 0x7B, 0x0C, 0x82 ) };
+TQColor probeColors[9] = {
+ TQColor( 0x52, 0x22, 0x00 ),
+ TQColor( 0xB5, 0x00, 0x2F ),
+ TQColor( 0xF9, 0xBA, 0x07 ),
+ TQColor( 0x53, 0x93, 0x16 ),
+ TQColor( 0x00, 0x66, 0x2F ),
+ TQColor( 0x00, 0x41, 0x88 ),
+ TQColor( 0x1B, 0x2D, 0x83 ),
+ TQColor( 0x55, 0x12, 0x7B ),
+ TQColor( 0x7B, 0x0C, 0x82 ) };
Oscilloscope * Oscilloscope::m_pSelf = 0l;
-Oscilloscope * Oscilloscope::self( KateMDI::ToolView * parent )
+Oscilloscope * Oscilloscope::self( KateMDI::ToolView * tqparent )
{
if ( !m_pSelf )
{
- assert(parent);
- m_pSelf = new Oscilloscope(parent);
+ assert(tqparent);
+ m_pSelf = new Oscilloscope(tqparent);
}
return m_pSelf;
}
-Oscilloscope::Oscilloscope( KateMDI::ToolView * parent )
- : OscilloscopeWidget(parent)
+Oscilloscope::Oscilloscope( KateMDI::ToolView * tqparent )
+ : OscilloscopeWidget(tqparent)
{
m_nextColor = 0;
m_nextId = 1;
@@ -72,21 +72,21 @@ Oscilloscope::Oscilloscope( KateMDI::ToolView * parent )
horizontalScroll->setLineStep(32);
horizontalScroll->setPageStep( oscilloscopeView->width() );
- connect( resetBtn, SIGNAL(clicked()), this, SLOT(reset()) );
- connect( zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(slotZoomSliderChanged(int)) );
- connect( horizontalScroll, SIGNAL(valueChanged(int )), this, SLOT(slotSliderValueChanged(int )) );
+ connect( resetBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset()) );
+ connect( zoomSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotZoomSliderChanged(int)) );
+ connect( horizontalScroll, TQT_SIGNAL(valueChanged(int )), this, TQT_SLOT(slotSliderValueChanged(int )) );
-// connect( pauseBtn, SIGNAL(clicked()), this, SLOT(slotTogglePause()) );
+// connect( pauseBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTogglePause()) );
- QTimer * updateScrollTmr = new QTimer(this);
- connect( updateScrollTmr, SIGNAL(timeout()), this, SLOT(updateScrollbars()) );
+ TQTimer * updateScrollTmr = new TQTimer(this);
+ connect( updateScrollTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollbars()) );
updateScrollTmr->start(20);
KGlobal::config()->setGroup("Oscilloscope");
setZoomLevel( KGlobal::config()->readDoubleNumEntry( "ZoomLevel", 0.5 ) );
- connect( this, SIGNAL(probeRegistered(int, ProbeData *)), probePositioner, SLOT(slotProbeDataRegistered(int, ProbeData *)) );
- connect( this, SIGNAL(probeUnregistered(int )), probePositioner, SLOT(slotProbeDataUnregistered(int )) );
+ connect( this, TQT_SIGNAL(probeRegistered(int, ProbeData *)), probePositioner, TQT_SLOT(slotProbeDataRegistered(int, ProbeData *)) );
+ connect( this, TQT_SIGNAL(probeUnregistered(int )), probePositioner, TQT_SLOT(slotProbeDataUnregistered(int )) );
}
@@ -189,7 +189,7 @@ ProbeData * Oscilloscope::registerProbe( Probe * probe )
void Oscilloscope::unregisterProbe( int id )
{
- ProbeDataMap::iterator it = m_probeDataMap.find(id);
+ ProbeDataMap::iterator it = m_probeDataMap.tqfind(id);
if ( it == m_probeDataMap.end() )
return;
@@ -211,7 +211,7 @@ void Oscilloscope::unregisterProbe( int id )
ProbeData * Oscilloscope::probeData( int id ) const
{
- const ProbeDataMap::const_iterator bit = m_probeDataMap.find(id);
+ const ProbeDataMap::const_iterator bit = m_probeDataMap.tqfind(id);
if ( bit != m_probeDataMap.end() )
return bit.data();
diff --git a/src/gui/oscilloscope.h b/src/gui/oscilloscope.h
index 79e0dbd..1d1503e 100644
--- a/src/gui/oscilloscope.h
+++ b/src/gui/oscilloscope.h
@@ -20,7 +20,7 @@
#endif
#include "simulator.h"
-#include <qmap.h>
+#include <tqmap.h>
class FloatingProbeData;
class LogicProbe;
@@ -30,12 +30,12 @@ class Oscilloscope;
class Probe;
class ProbeData;
class VoltageProbe;
-class QTimer;
+class TQTimer;
namespace KateMDI { class ToolView; }
-typedef QMap< int, ProbeData * > ProbeDataMap;
-typedef QMap< int, LogicProbeData * > LogicProbeDataMap;
-typedef QMap< int, FloatingProbeData * > FloatingProbeDataMap;
+typedef TQMap< int, ProbeData * > ProbeDataMap;
+typedef TQMap< int, LogicProbeData * > LogicProbeDataMap;
+typedef TQMap< int, FloatingProbeData * > FloatingProbeDataMap;
typedef unsigned long long ullong;
typedef long long llong;
@@ -76,9 +76,10 @@ void addOscilloscopeAsToolView( KTechlab *ktechlab );
class Oscilloscope : public OscilloscopeWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- static Oscilloscope * self( KateMDI::ToolView * parent = 0l );
- static QString toolViewIdentifier() { return "Oscilloscope"; }
+ static Oscilloscope * self( KateMDI::ToolView * tqparent = 0l );
+ static TQString toolViewIdentifier() { return "Oscilloscope"; }
virtual ~Oscilloscope();
/**
@@ -176,7 +177,7 @@ class Oscilloscope : public OscilloscopeWidget
void updateScrollbars();
private:
- Oscilloscope( KateMDI::ToolView * parent );
+ Oscilloscope( KateMDI::ToolView * tqparent );
static Oscilloscope * m_pSelf;
double m_zoomLevel;
diff --git a/src/gui/oscilloscopeview.cpp b/src/gui/oscilloscopeview.cpp
index 3d2a40a..aa05311 100644
--- a/src/gui/oscilloscopeview.cpp
+++ b/src/gui/oscilloscopeview.cpp
@@ -19,14 +19,14 @@
#include <klocale.h>
#include <kglobal.h>
#include <kpopupmenu.h>
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qscrollbar.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqscrollbar.h>
+#include <tqtimer.h>
#include <algorithm>
#include <cmath>
@@ -37,8 +37,8 @@ inline ullong min( ullong a, ullong b )
}
-OscilloscopeView::OscilloscopeView( QWidget *parent, const char *name )
- : QFrame( parent, name, WNoAutoErase ),
+OscilloscopeView::OscilloscopeView( TQWidget *tqparent, const char *name )
+ : TQFrame( tqparent, name, WNoAutoErase ),
b_needRedraw(true),
m_pixmap(0l),
m_fps(10),
@@ -53,8 +53,8 @@ OscilloscopeView::OscilloscopeView( QWidget *parent, const char *name )
setBackgroundMode(NoBackground);
setMouseTracking(true);
- m_updateViewTmr = new QTimer(this);
- connect( m_updateViewTmr, SIGNAL(timeout()), this, SLOT(updateViewTimeout()) );
+ m_updateViewTmr = new TQTimer(this);
+ connect( m_updateViewTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateViewTimeout()) );
}
@@ -77,7 +77,7 @@ void OscilloscopeView::updateView()
void OscilloscopeView::updateViewTimeout()
{
b_needRedraw = true;
- repaint(false);
+ tqrepaint(false);
updateTimeLabel();
}
@@ -86,26 +86,26 @@ void OscilloscopeView::updateTimeLabel()
{
if ( hasMouse() )
{
- int x = mapFromGlobal( QCursor::pos() ).x();
+ int x = mapFromGlobal( TQCursor::pos() ).x();
double time = (double(Oscilloscope::self()->scrollTime()) / LOGIC_UPDATE_RATE) + (x / Oscilloscope::self()->pixelsPerSecond());
- Oscilloscope::self()->timeLabel->setText( QString::number( time, 'f', 6 ) );
+ Oscilloscope::self()->timeLabel->setText( TQString::number( time, 'f', 6 ) );
}
else
- Oscilloscope::self()->timeLabel->setText( QString::null );
+ Oscilloscope::self()->timeLabel->setText( TQString() );
}
-void OscilloscopeView::resizeEvent( QResizeEvent *e )
+void OscilloscopeView::resizeEvent( TQResizeEvent *e )
{
delete m_pixmap;
- m_pixmap = new QPixmap( e->size() );
+ m_pixmap = new TQPixmap( e->size() );
b_needRedraw = true;
- QFrame::resizeEvent(e);
+ TQFrame::resizeEvent(e);
}
-void OscilloscopeView::mousePressEvent( QMouseEvent *event )
+void OscilloscopeView::mousePressEvent( TQMouseEvent *event )
{
switch ( event->button() )
{
@@ -114,7 +114,7 @@ void OscilloscopeView::mousePressEvent( QMouseEvent *event )
event->accept();
m_clickOffsetPos = event->pos().x();
m_sliderValueAtClick = Oscilloscope::self()->horizontalScroll->value();
- setCursor( Qt::SizeAllCursor );
+ setCursor( TQt::SizeAllCursor );
return;
}
@@ -130,25 +130,25 @@ void OscilloscopeView::mousePressEvent( QMouseEvent *event )
for ( uint i=0; i<5; ++i )
{
const int num = fps[i];
- fpsMenu.insertItem( i18n("%1 fps").arg(num), num );
+ fpsMenu.insertItem( i18n("%1 fps").tqarg(num), num );
fpsMenu.setItemChecked( num, num == m_fps );
}
- connect( &fpsMenu, SIGNAL(activated(int )), this, SLOT(slotSetFrameRate(int )) );
+ connect( &fpsMenu, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotSetFrameRate(int )) );
fpsMenu.exec( event->globalPos() );
return;
}
default:
{
- QFrame::mousePressEvent(event);
+ TQFrame::mousePressEvent(event);
return;
}
}
}
-void OscilloscopeView::mouseMoveEvent( QMouseEvent *event )
+void OscilloscopeView::mouseMoveEvent( TQMouseEvent *event )
{
event->accept();
updateTimeLabel();
@@ -162,14 +162,14 @@ void OscilloscopeView::mouseMoveEvent( QMouseEvent *event )
}
-void OscilloscopeView::mouseReleaseEvent( QMouseEvent *event )
+void OscilloscopeView::mouseReleaseEvent( TQMouseEvent *event )
{
if ( m_sliderValueAtClick == -1 )
- return QFrame::mouseReleaseEvent(event);
+ return TQFrame::mouseReleaseEvent(event);
event->accept();
m_sliderValueAtClick = -1;
- setCursor( Qt::ArrowCursor );
+ setCursor( TQt::ArrowCursor );
}
@@ -188,16 +188,16 @@ static double lld_modulus( llong a, double b )
}
-void OscilloscopeView::paintEvent( QPaintEvent *e )
+void OscilloscopeView::paintEvent( TQPaintEvent *e )
{
- QRect r = e->rect();
+ TQRect r = e->rect();
if (b_needRedraw)
{
updateOutputHeight();
const double pixelsPerSecond = Oscilloscope::self()->pixelsPerSecond();
- QPainter p;
+ TQPainter p;
m_pixmap->fill( paletteBackgroundColor() );
p.begin(m_pixmap);
p.setClipRegion(e->region());
@@ -213,7 +213,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e )
double linesOffset = - lld_modulus( pixelsOffset, spacing );
int blackness = 256 - int(184.0 * spacing / (min_sep*divisions*divisions));
- p.setPen( QColor( blackness, blackness, blackness ) );
+ p.setPen( TQColor( blackness, blackness, blackness ) );
for ( double i = linesOffset; i <= frameRect().width(); i += spacing )
p.drawLine( int(i), 1, int(i), frameRect().height()-2 );
@@ -224,7 +224,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e )
linesOffset = - lld_modulus( pixelsOffset, spacing );
blackness = 256 - int(184.0 * spacing / (min_sep*divisions*divisions));
- p.setPen( QColor( blackness, blackness, blackness ) );
+ p.setPen( TQColor( blackness, blackness, blackness ) );
for ( double i = linesOffset; i <= frameRect().width(); i += spacing )
p.drawLine( int(i), 1, int(i), frameRect().height()-2 );
@@ -235,7 +235,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e )
linesOffset = - lld_modulus( pixelsOffset, spacing );
blackness = 256 - int(184.0);
- p.setPen( QColor( blackness, blackness, blackness ) );
+ p.setPen( TQColor( blackness, blackness, blackness ) );
for ( double i = linesOffset; i <= frameRect().width(); i += spacing )
p.drawLine( int(i), 1, int(i), frameRect().height()-2 );
@@ -244,7 +244,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e )
drawLogicData(p);
drawFloatingData(p);
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
p.drawRect( frameRect() );
b_needRedraw = false;
@@ -260,7 +260,7 @@ void OscilloscopeView::updateOutputHeight()
}
-void OscilloscopeView::drawLogicData( QPainter & p )
+void OscilloscopeView::drawLogicData( TQPainter & p )
{
const double pixelsPerSecond = Oscilloscope::self()->pixelsPerSecond();
@@ -286,7 +286,7 @@ void OscilloscopeView::drawLogicData( QPainter & p )
const llong timeOffset = Oscilloscope::self()->scrollTime();
// Draw the horizontal line indicating the midpoint of our output
- p.setPen( QColor( 228, 228, 228 ) );
+ p.setPen( TQColor( 228, 228, 228 ) );
p.drawLine( 0, midHeight, width(), midHeight );
// Set the pen colour according to the colour the user has selected for the probe
@@ -365,7 +365,7 @@ void OscilloscopeView::drawLogicData( QPainter & p )
#define v_to_y int(midHeight - (logarithmic ? ( (v>0) ? log(v/lowerAbsValue) : -log(-v/lowerAbsValue) ) : v) * sf)
-void OscilloscopeView::drawFloatingData( QPainter & p )
+void OscilloscopeView::drawFloatingData( TQPainter & p )
{
const double pixelsPerSecond = Oscilloscope::self()->pixelsPerSecond();
@@ -386,7 +386,7 @@ void OscilloscopeView::drawFloatingData( QPainter & p )
const llong timeOffset = Oscilloscope::self()->scrollTime();
// Draw the horizontal line indicating the midpoint of our output
- p.setPen( QColor( 228, 228, 228 ) );
+ p.setPen( TQColor( 228, 228, 228 ) );
p.drawLine( 0, midHeight, width(), midHeight );
// Set the pen colour according to the colour the user has selected for the probe
diff --git a/src/gui/oscilloscopeview.h b/src/gui/oscilloscopeview.h
index 97cb595..d9daaa0 100644
--- a/src/gui/oscilloscopeview.h
+++ b/src/gui/oscilloscopeview.h
@@ -11,28 +11,29 @@
#ifndef OSCILLOSCOPEVIEW_H
#define OSCILLOSCOPEVIEW_H
-#include <qframe.h>
+#include <tqframe.h>
class Oscilloscope;
class Simulator;
-class QMouseEvent;
-class QPaintEvent;
-class QPixmap;
-class QTimer;
+class TQMouseEvent;
+class TQPaintEvent;
+class TQPixmap;
+class TQTimer;
/**
@author David Saxton
*/
-class OscilloscopeView : public QFrame
+class OscilloscopeView : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- OscilloscopeView( QWidget *parent, const char *name = 0 );
+ OscilloscopeView( TQWidget *tqparent, const char *name = 0 );
virtual ~OscilloscopeView();
public slots:
/**
- * Sets the needRedraw flag to true, and then class repaint
+ * Sets the needRedraw flag to true, and then class tqrepaint
*/
void updateView();
void slotSetFrameRate( int fps );
@@ -41,20 +42,20 @@ class OscilloscopeView : public QFrame
void updateViewTimeout();
protected:
- virtual void mousePressEvent( QMouseEvent *event );
- virtual void mouseMoveEvent( QMouseEvent *event );
- virtual void mouseReleaseEvent( QMouseEvent *event );
- virtual void paintEvent( QPaintEvent *event );
- virtual void resizeEvent( QResizeEvent *event );
+ virtual void mousePressEvent( TQMouseEvent *event );
+ virtual void mouseMoveEvent( TQMouseEvent *event );
+ virtual void mouseReleaseEvent( TQMouseEvent *event );
+ virtual void paintEvent( TQPaintEvent *event );
+ virtual void resizeEvent( TQResizeEvent *event );
- void drawLogicData( QPainter & p );
- void drawFloatingData( QPainter & p );
+ void drawLogicData( TQPainter & p );
+ void drawFloatingData( TQPainter & p );
void updateOutputHeight();
void updateTimeLabel();
bool b_needRedraw;
- QPixmap *m_pixmap;
- QTimer *m_updateViewTmr;
+ TQPixmap *m_pixmap;
+ TQTimer *m_updateViewTmr;
int m_fps;
int m_sliderValueAtClick;
int m_clickOffsetPos;
diff --git a/src/gui/oscilloscopewidget.ui b/src/gui/oscilloscopewidget.ui
index eb8002b..1d128ba 100644
--- a/src/gui/oscilloscopewidget.ui
+++ b/src/gui/oscilloscopewidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>OscilloscopeWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>OscilloscopeWidget</cstring>
</property>
@@ -25,9 +25,9 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QLayoutWidget" row="0" column="3" rowspan="2" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="3" rowspan="2" colspan="1">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<grid>
<property name="name">
@@ -67,20 +67,20 @@
<property name="name">
<cstring>probePositioner</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>16</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>16</width>
<height>32767</height>
</size>
</property>
</widget>
- <widget class="QScrollBar" row="1" column="1">
+ <widget class="TQScrollBar" row="1" column="1">
<property name="name">
<cstring>horizontalScroll</cstring>
</property>
@@ -90,9 +90,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="0" column="1" rowspan="2" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="1" rowspan="2" colspan="1">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<vbox>
<property name="name">
@@ -104,18 +104,18 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Zoom</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>zoomSlider</cstring>
</property>
@@ -150,21 +150,21 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>timeLabel</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -178,14 +178,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>resetBtn</cstring>
</property>
@@ -216,7 +216,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>6</width>
<height>6</height>
@@ -233,7 +233,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>6</width>
<height>6</height>
@@ -281,7 +281,7 @@
<data format="PNG" length="1125">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042c49444154388db5954f6c14551cc73fefcd7476b65bdaae4bb78bb5502a14d404e4801c88182d1c4c2c693da847400f9c24c68b878684238660e2b1e01f12c19493012ef2478c814412d354a46017a8a564bb6da5bbedccee767776e63d0ffb073751d483bfe49799974c3eeffb7ebf37df9fd05a530b2184040cc0042420aaf9a4d0d554800f045a6b256ae0e1e1e1d6bebebe838ee31c48a7d39b5cd7fd075e251cc7617272f2ded8d8d819cff33e0316819259537aead4a9839d5dd6d1784f91f55b0a94830242088404d304292bef68a89f520802a598fecddaa04f1a876f5c250c7c0a64cdeac686e33807e23d45e6b297c8b877f1831542614550b6599835c83c2a81b6786a75134faf2f1169f12997350881d9021d0903e06de0745d3160a6d3e94dbd5b0a64dcbb94b5831d0e3375ab892b1772dcf9790528543f8dd0d367b36768153b5e31503a0f1aecb004580b44ffac58baae8b1714f0833c7638cc8dab303a320f4822ab4c7a37c69196203de3319d5ce1c4d13c733331dedc67a129a154fd128401ab0616d55a130ac3d42d93d1913940d13fd0c9ee0183685c60da01c5421bd72f7a8c8efccef9afd374267ad93d642365be0636a0d28ec7600941d9e6f23917f0e97f23ce5bef35d19ec863da0ed9059b2be70bec196c66dfa10ec0e49b338f7017258651bf95021035c595429bb0903248fe52a2b5b595dd7b4d945cc2340cdca536be389ee3f67886c5798f773fe8e0dac508c989659277a2180da4ca4ff07821058b8b251445d63d6b13ed1098a6417e39cac85197dbe31962ab9bd9f1f22a226d45366f6d0620fdb08c900d281af6110284b20085b414861d905d88f2e52739ee8cbb8022143259d3dd84691730aa2d52da441a8de0c6958068870022a41e9629ad3473fd3b8fdbe319dadb9b4924da994d2d716c7896fbe35152f78b48245d6b2da4507faf582be8eaf159b721cc837b05ae7debb1f79d08cb8b515edad942a22bc4b1c33eb3d34b1c797f06af90a72d16e2f96d9a74aa11dca8586b222d01af0fb60070f6c402d72f15d97f28c6f6d7027a5f5ce6c3233dc4e2ede496b278be4fff608cee8d3e1add806aeca51094cbb06397c1ecc328e746537c7e3ccdb5cb1136bf60635882d4d41c6ec6836ab37efa214f72208ed9f4d7cdd38ee310280542e38b1c43fb6de26b3672e1ec3cc99bcb246f66a938a3241ab3e91f7c861fbf77710b1e5e49915bae974203ba0e9e9c9cbc373d6d6d305a040a89c2a77f50b27d5782bbbf7acccf28349235dd16cf6dd374f7295e1de8a45c02d37499182b01cc0201a085d61a2144d8b2ac8fb6ed340e77240c4261890e04c250185262546d534a032154b59e0ad394e41c98182bf268ce6721ed9f064e0253356f6da2e24c1f030f783c15fe6da680af8021602bd051532ca9b8521488559f61aa86c29343578fbf0264a94c906c7d3409214c20043457a116ff6de6795578012889ff6b98fe016ea0ce1c6a2573410000000049454e44ae426082</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>oscilloscopeview.h</includehint>
<includehint>probepositioner.h</includehint>
diff --git a/src/gui/outputmethoddlg.cpp b/src/gui/outputmethoddlg.cpp
index bcb189e..32349e6 100644
--- a/src/gui/outputmethoddlg.cpp
+++ b/src/gui/outputmethoddlg.cpp
@@ -23,9 +23,9 @@
#include <ktempfile.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
//BEGIN class OutputMethodInfo
@@ -41,7 +41,7 @@ void OutputMethodInfo::initialize( OutputMethodDlg * dlg )
if ( dlg->m_widget->displayDirectCheck->isChecked() )
{
m_method = Method::Direct;
- KTempFile f( QString::null, dlg->m_outputExtension );
+ KTempFile f( TQString(), dlg->m_outputExtension );
f.close();
m_outputFile = f.name();
m_bAddToProject = false;
@@ -66,8 +66,8 @@ void OutputMethodInfo::initialize( OutputMethodDlg * dlg )
//BEGIN class OutputMethodDlg
-OutputMethodDlg::OutputMethodDlg( const QString &caption, const KURL & inputURL, bool showPICSelect, QWidget *parent, const char *name )
- : KDialogBase( parent, name, true, caption, Ok|Cancel )
+OutputMethodDlg::OutputMethodDlg( const TQString &caption, const KURL & inputURL, bool showPICSelect, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name, true, caption, Ok|Cancel )
{
m_inputURL = inputURL;
m_bAccepted = false;
@@ -92,13 +92,13 @@ OutputMethodDlg::~OutputMethodDlg()
}
-void OutputMethodDlg::setOutputExtension( const QString & extension )
+void OutputMethodDlg::setOutputExtension( const TQString & extension )
{
m_outputExtension = extension;
}
-void OutputMethodDlg::setFilter( const QString &filter )
+void OutputMethodDlg::setFilter( const TQString &filter )
{
m_widget->outputFileURL->setFilter(filter);
}
@@ -125,7 +125,7 @@ void OutputMethodDlg::setMethod( OutputMethodInfo::Method::Type m )
}
-void OutputMethodDlg::setPicID( const QString & id )
+void OutputMethodDlg::setPicID( const TQString & id )
{
m_widget->m_pMicroSelect->setMicro(id);
}
diff --git a/src/gui/outputmethoddlg.h b/src/gui/outputmethoddlg.h
index 14dff25..1bf4879 100644
--- a/src/gui/outputmethoddlg.h
+++ b/src/gui/outputmethoddlg.h
@@ -43,8 +43,8 @@ class OutputMethodInfo
bool addToProject() const { return m_bAddToProject; }
void setAddToProject( bool add ) { m_bAddToProject = add; }
- QString picID() const { return m_picID; }
- void setPicID( const QString & id ) { m_picID = id; }
+ TQString picID() const { return m_picID; }
+ void setPicID( const TQString & id ) { m_picID = id; }
KURL outputFile() const { return m_outputFile; }
void setOutputFile( const KURL & outputFile ) { m_outputFile = outputFile; }
@@ -52,7 +52,7 @@ class OutputMethodInfo
protected:
Method::Type m_method;
bool m_bAddToProject;
- QString m_picID;
+ TQString m_picID;
KURL m_outputFile;
};
@@ -62,20 +62,21 @@ class OutputMethodInfo
class OutputMethodDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* @param Caption The caption of the dialog window
* @param inputURL Used for saving/restoring previous options the user has selected for this file; set this to null if temporary file
* @param showPICSelect Whether to show the combo boxes for selecting a PIC
*/
- OutputMethodDlg( const QString & caption, const KURL & inputURL, bool showPICSelect = false, QWidget *parent = 0, const char *name = 0);
+ OutputMethodDlg( const TQString & caption, const KURL & inputURL, bool showPICSelect = false, TQWidget *tqparent = 0, const char *name = 0);
~OutputMethodDlg();
- void setOutputExtension( const QString & outputExtension );
- void setFilter( const QString &filter );
+ void setOutputExtension( const TQString & outputExtension );
+ void setFilter( const TQString &filter );
void setMethod( OutputMethodInfo::Method::Type m );
void setOutputFile( const KURL & out );
- void setPicID( const QString & id );
+ void setPicID( const TQString & id );
virtual void reject();
virtual void accept();
@@ -87,7 +88,7 @@ class OutputMethodDlg : public KDialogBase
protected:
OutputMethodWidget *m_widget;
- QString m_outputExtension;
+ TQString m_outputExtension;
KURL m_inputURL;
OutputMethodInfo m_outputMethodInfo;
bool m_bAccepted;
diff --git a/src/gui/outputmethodwidget.ui b/src/gui/outputmethodwidget.ui
index 0182105..26b76f4 100644
--- a/src/gui/outputmethodwidget.ui
+++ b/src/gui/outputmethodwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>OutputMethodWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>OutputMethodWidget</cstring>
</property>
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>450</width>
<height>0</height>
@@ -36,7 +36,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup2</cstring>
</property>
@@ -50,7 +50,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>displayDirectCheck</cstring>
</property>
@@ -61,7 +61,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>saveFileCheck</cstring>
</property>
@@ -72,7 +72,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox16</cstring>
</property>
@@ -91,7 +91,7 @@
<cstring>outputFileURL</cstring>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>loadFileCheck</cstring>
</property>
@@ -99,7 +99,7 @@
<string>Load File in &amp;New View</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>addToProjectCheck</cstring>
</property>
@@ -115,7 +115,7 @@
<property name="name">
<cstring>m_pMicroSelect</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -132,7 +132,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>0</height>
@@ -172,7 +172,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/src/gui/picprogrammerconfigwidget.ui b/src/gui/picprogrammerconfigwidget.ui
index 64c5ac8..520e9d4 100644
--- a/src/gui/picprogrammerconfigwidget.ui
+++ b/src/gui/picprogrammerconfigwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PicProgrammerConfigWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PicProgrammerConfigWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -43,7 +43,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>295</width>
<height>20</height>
@@ -72,7 +72,7 @@
<string>Alt+M</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -96,7 +96,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="4">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>m_pProgrammerDescription</cstring>
</property>
@@ -106,7 +106,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>commandsGroupBox</cstring>
</property>
@@ -117,7 +117,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -145,7 +145,7 @@
<cstring>initCommand</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -153,7 +153,7 @@
<string>Read:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -171,7 +171,7 @@
<cstring>eraseCommand</cstring>
</property>
</widget>
- <widget class="QLabel" row="6" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="6" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -187,7 +187,7 @@
<enum>RichText</enum>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -195,7 +195,7 @@
<string>Erase:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
@@ -203,7 +203,7 @@
<string>Verify:</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -213,15 +213,15 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -229,7 +229,7 @@
<string>Default port:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>kcfg_PicProgrammerPort</cstring>
</property>
@@ -249,7 +249,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -270,7 +270,7 @@
<tabstop>eraseCommand</tabstop>
<tabstop>kcfg_PicProgrammerPort</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/src/gui/pieditor.cpp b/src/gui/pieditor.cpp
index b7ca0e5..7ca2663 100644
--- a/src/gui/pieditor.cpp
+++ b/src/gui/pieditor.cpp
@@ -18,15 +18,15 @@
#include <klocale.h>
#include <knuminput.h>
#include <kurlrequester.h>
-#include <qlayout.h>
+#include <tqlayout.h>
//BEGIN class PIEditor
-PIEditor::PIEditor(QString id, Variant *data, QWidget *parent, const char *name)
- : QWidget(parent, name)
+PIEditor::PIEditor(TQString id, Variant *data, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
m_id = id;
m_data = data;
- connect(m_data,SIGNAL(valueChanged(QVariant, QVariant )),this,SLOT(valueChanged(QVariant)));
+ connect(m_data,TQT_SIGNAL(valueChanged(TQVariant, TQVariant )),this,TQT_SLOT(valueChanged(TQVariant)));
setFocus();
update();
//show();
@@ -36,25 +36,25 @@ PIEditor::~PIEditor()
{
}
-void PIEditor::valueChanged( QVariant /*variant*/ )
+void PIEditor::valueChanged( TQVariant /*variant*/ )
{
}
//END class PIEditor
//BEGIN class PIBool
-PIBool::PIBool(QString id, Variant *data, QWidget *parent, const char *name )
- : PIEditor( id, data, parent, name )
+PIBool::PIBool(TQString id, Variant *data, TQWidget *tqparent, const char *name )
+ : PIEditor( id, data, tqparent, name )
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
+ tqlayout->setAutoAdd(true);
m_comboBox = new KComboBox(this);
m_comboBox->insertItem( i18n("True"), 0 );
m_comboBox->insertItem( i18n("False"), 1 );
m_comboBox->setCurrentItem( m_data->value().toBool() ? 0 : 1 );
- connect( m_comboBox, SIGNAL(activated(int )), this, SLOT(selectChanged(int )) );
+ connect( m_comboBox, TQT_SIGNAL(activated(int )), this, TQT_SLOT(selectChanged(int )) );
}
PIBool::~PIBool()
@@ -68,10 +68,10 @@ void PIBool::popup()
void PIBool::selectChanged( int index )
{
- emit editorDataChanged( m_id, QVariant( index == 0 ) );
+ emit editorDataChanged( m_id, TQVariant( index == 0 ) );
}
-void PIBool::valueChanged( QVariant /*variant*/ )
+void PIBool::valueChanged( TQVariant /*variant*/ )
{
m_comboBox->setCurrentItem( m_data->value().toBool() ? 0 : 1 );
}
@@ -79,17 +79,17 @@ void PIBool::valueChanged( QVariant /*variant*/ )
//BEGIN class PIColor
-PIColor::PIColor(QString id, Variant *data, QWidget *parent, const char *name )
- : PIEditor(id,data,parent, name)
+PIColor::PIColor(TQString id, Variant *data, TQWidget *tqparent, const char *name )
+ : PIEditor(id,data,tqparent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
+ tqlayout->setAutoAdd(true);
m_combo = new ColorCombo( (ColorCombo::ColorScheme)m_data->colorScheme(), this );
m_combo->setColor(m_data->value().toColor());
- connect(m_combo,SIGNAL(activated(const QColor&)),this,SLOT(colorChanged(const QColor&)));
-// connect(m_combo,SIGNAL(highlighted(const QColor&)),this,SLOT(colorChanged(const QColor&)));
+ connect(m_combo,TQT_SIGNAL(activated(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&)));
+// connect(m_combo,TQT_SIGNAL(highlighted(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&)));
}
PIColor::~PIColor()
@@ -101,12 +101,12 @@ void PIColor::popup()
m_combo->popup();
}
-void PIColor::colorChanged(const QColor &col)
+void PIColor::colorChanged(const TQColor &col)
{
- emit editorDataChanged(m_id,QVariant(col));
+ emit editorDataChanged(m_id,TQVariant(col));
}
-void PIColor::valueChanged( QVariant /*variant*/ )
+void PIColor::valueChanged( TQVariant /*variant*/ )
{
m_combo->setColor(m_data->value().toColor());
}
@@ -114,15 +114,15 @@ void PIColor::valueChanged( QVariant /*variant*/ )
//BEGIN class PIDouble
-PIDouble::PIDouble(QString id, Variant *data, QWidget *parent, const char *name )
- : PIEditor(id,data,parent, name)
+PIDouble::PIDouble(TQString id, Variant *data, TQWidget *tqparent, const char *name )
+ : PIEditor(id,data,tqparent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
+ tqlayout->setAutoAdd(true);
spin = new DoubleSpinBox(m_data->minValue(),m_data->maxValue(),m_data->minAbsValue(),m_data->value().toDouble(),m_data->unit(),this);
- connect(spin,SIGNAL(valueChanged(double)),this,SLOT(spinValueChanged(double)));
+ connect(spin,TQT_SIGNAL(valueChanged(double)),this,TQT_SLOT(spinValueChanged(double)));
}
PIDouble::~PIDouble()
@@ -131,10 +131,10 @@ PIDouble::~PIDouble()
void PIDouble::spinValueChanged(double value)
{
- emit editorDataChanged(m_id,QVariant(value));
+ emit editorDataChanged(m_id,TQVariant(value));
}
-void PIDouble::valueChanged( QVariant /*variant*/ )
+void PIDouble::valueChanged( TQVariant /*variant*/ )
{
spin->setValue(m_data->value().toDouble());
}
@@ -142,11 +142,11 @@ void PIDouble::valueChanged( QVariant /*variant*/ )
//BEGIN class PIFileName
-PIFilename::PIFilename(QString id, Variant *data, QWidget *parent, const char *name )
- : PIEditor(id,data,parent, name)
+PIFilename::PIFilename(TQString id, Variant *data, TQWidget *tqparent, const char *name )
+ : PIEditor(id,data,tqparent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
+ tqlayout->setAutoAdd(true);
m_combo = 0L;
if( m_data->allowed().count() == 0 )
@@ -160,20 +160,20 @@ PIFilename::PIFilename(QString id, Variant *data, QWidget *parent, const char *n
m_urlreq->setURL( m_data->value().toString() );
m_urlreq->setFilter( m_data->filter() );
- connect(m_urlreq,SIGNAL(urlSelected(const QString&)),this,SLOT(slotURLChanged(const QString&)));
- //connect(m_urlreq,SIGNAL(openFileDialog(KURLRequester*)),this,SLOT(slotOpenFileDialog(KURLRequester* )));
+ connect(m_urlreq,TQT_SIGNAL(urlSelected(const TQString&)),this,TQT_SLOT(slotURLChanged(const TQString&)));
+ //connect(m_urlreq,TQT_SIGNAL(openFileDialog(KURLRequester*)),this,TQT_SLOT(slotOpenFileDialog(KURLRequester* )));
}
PIFilename::~PIFilename()
{
}
-void PIFilename::slotURLChanged(const QString &url)
+void PIFilename::slotURLChanged(const TQString &url)
{
- emit editorDataChanged(m_id,QVariant(url));
+ emit editorDataChanged(m_id,TQVariant(url));
}
-void PIFilename::valueChanged( QVariant /*variant*/ )
+void PIFilename::valueChanged( TQVariant /*variant*/ )
{
if(m_combo) m_combo->setCurrentItem( m_data->value().toString() );
m_urlreq->setURL( m_data->value().toString() );
@@ -193,15 +193,15 @@ void PIFilename::valueChanged( QVariant /*variant*/ )
//BEGIN class PIInt
-PIInt::PIInt( const QString &id, Variant *data, QWidget *parent, const char *name )
- : PIEditor( id, data, parent, name )
+PIInt::PIInt( const TQString &id, Variant *data, TQWidget *tqparent, const char *name )
+ : PIEditor( id, data, tqparent, name )
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
+ tqlayout->setAutoAdd(true);
spin = new KIntSpinBox( (int)m_data->minValue(), (int)m_data->maxValue(), 1, m_data->value().toInt(), 10, this );
- connect( spin, SIGNAL(valueChanged(int)), this, SLOT(spinValueChanged(int)));
+ connect( spin, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(spinValueChanged(int)));
}
PIInt::~PIInt()
@@ -210,10 +210,10 @@ PIInt::~PIInt()
void PIInt::spinValueChanged( int value )
{
- emit editorDataChanged( m_id, QVariant(value) );
+ emit editorDataChanged( m_id, TQVariant(value) );
}
-void PIInt::valueChanged( QVariant /*variant*/ )
+void PIInt::valueChanged( TQVariant /*variant*/ )
{
spin->setValue( m_data->value().toInt() );
}
@@ -221,13 +221,13 @@ void PIInt::valueChanged( QVariant /*variant*/ )
//BEGIN class PILineEdit
-PILineEdit::PILineEdit(QString id, Variant *data, QWidget *parent, const char *name)
- : PIEditor( id, data, parent, name)
+PILineEdit::PILineEdit(TQString id, Variant *data, TQWidget *tqparent, const char *name)
+ : PIEditor( id, data, tqparent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
+ tqlayout->setAutoAdd(true);
m_edit = new KLineEdit( m_data->value().toString() , this );
- connect(m_edit,SIGNAL(textChanged(const QString&)),this,SLOT(slotEditTextChanged()));
+ connect(m_edit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(slotEditTextChanged()));
}
@@ -237,10 +237,10 @@ PILineEdit::~PILineEdit()
void PILineEdit::slotEditTextChanged()
{
- emit editorDataChanged(m_id,QVariant(m_edit->text()));
+ emit editorDataChanged(m_id,TQVariant(m_edit->text()));
}
-void PILineEdit::valueChanged( QVariant /*variant*/ )
+void PILineEdit::valueChanged( TQVariant /*variant*/ )
{
m_edit->setText(m_data->value().toString());
}
@@ -248,11 +248,11 @@ void PILineEdit::valueChanged( QVariant /*variant*/ )
//BEGIN class PIStringCombo
-PIStringCombo::PIStringCombo(QString id, Variant *data, QWidget *parent, const char *name)
- : PIEditor( id, data, parent, name)
+PIStringCombo::PIStringCombo(TQString id, Variant *data, TQWidget *tqparent, const char *name)
+ : PIEditor( id, data, tqparent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setAutoAdd(true);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
+ tqlayout->setAutoAdd(true);
m_combo = new KComboBox( this );
m_combo->insertStringList(m_data->allowed());
@@ -262,8 +262,8 @@ PIStringCombo::PIStringCombo(QString id, Variant *data, QWidget *parent, const c
type == Variant::Type::FileName ||
type == Variant::Type::VarName );
- connect(m_combo,SIGNAL(highlighted(const QString&)),this,SLOT(slotComboChanged()));
- connect(m_combo,SIGNAL(activated(const QString&)),this,SLOT(slotComboChanged()));
+ connect(m_combo,TQT_SIGNAL(highlighted(const TQString&)),this,TQT_SLOT(slotComboChanged()));
+ connect(m_combo,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(slotComboChanged()));
}
@@ -278,10 +278,10 @@ void PIStringCombo::popup()
void PIStringCombo::slotComboChanged()
{
- emit editorDataChanged(m_id,QVariant(m_combo->currentText()));
+ emit editorDataChanged(m_id,TQVariant(m_combo->currentText()));
}
-void PIStringCombo::valueChanged( QVariant /*variant*/ )
+void PIStringCombo::valueChanged( TQVariant /*variant*/ )
{
m_combo->setCurrentItem(m_data->value().toString());
}
diff --git a/src/gui/pieditor.h b/src/gui/pieditor.h
index 8423c7d..bc3c7fb 100644
--- a/src/gui/pieditor.h
+++ b/src/gui/pieditor.h
@@ -11,9 +11,9 @@
#ifndef PIEDITOR_H
#define PIEDITOR_H
-#include <qwidget.h>
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqvariant.h>
class DoubleSpinBox;
class ColorCombo;
@@ -27,21 +27,22 @@ class Variant;
/**
@author Daniel Clarke
*/
-class PIEditor : public QWidget
+class PIEditor : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PIEditor(QString id, Variant *data, QWidget *parent = 0, const char *name = 0);
+ PIEditor(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0);
~PIEditor();
public slots:
- virtual void valueChanged( QVariant variant );
+ virtual void valueChanged( TQVariant variant );
signals:
- void editorDataChanged(const QString &id, QVariant data);
+ void editorDataChanged(const TQString &id, TQVariant data);
protected:
- QString m_id;
+ TQString m_id;
Variant *m_data;
};
@@ -52,15 +53,16 @@ class PIEditor : public QWidget
class PIBool : public PIEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- PIBool( QString id, Variant *data, QWidget *parent = 0, const char *name = 0 );
+ PIBool( TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0 );
~PIBool();
void popup();
protected slots:
void selectChanged( int index );
- virtual void valueChanged( QVariant variant );
+ virtual void valueChanged( TQVariant variant );
protected:
KComboBox *m_comboBox;
@@ -72,14 +74,15 @@ class PIBool : public PIEditor
class PIColor : public PIEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- PIColor(QString id, Variant *data, QWidget *parent = 0, const char *name = 0);
+ PIColor(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0);
~PIColor();
void popup();
protected slots:
- void colorChanged(const QColor &col);
- virtual void valueChanged( QVariant variant );
+ void colorChanged(const TQColor &col);
+ virtual void valueChanged( TQVariant variant );
protected:
ColorCombo *m_combo;
@@ -93,13 +96,14 @@ Allows the editing of double precision numerical values, using the DoubleNum wid
class PIDouble : public PIEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- PIDouble(QString id, Variant *data, QWidget *parent = 0, const char *name = 0);
+ PIDouble(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0);
~PIDouble();
protected slots:
void spinValueChanged(double value);
- virtual void valueChanged( QVariant variant );
+ virtual void valueChanged( TQVariant variant );
protected:
DoubleSpinBox *spin;
@@ -112,13 +116,14 @@ class PIDouble : public PIEditor
class PIFilename : public PIEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- PIFilename(QString id, Variant *data, QWidget *parent = 0, const char *name = 0);
+ PIFilename(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0);
~PIFilename();
protected slots:
- void slotURLChanged(const QString &url);
- virtual void valueChanged( QVariant variant );
+ void slotURLChanged(const TQString &url);
+ virtual void valueChanged( TQVariant variant );
// see comments in implementation.
//void slotOpenFileDialog(KURLRequester *kurlreq);
@@ -133,13 +138,14 @@ class PIFilename : public PIEditor
class PIInt : public PIEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- PIInt( const QString &id, Variant *data, QWidget *parent = 0, const char *name = 0);
+ PIInt( const TQString &id, Variant *data, TQWidget *tqparent = 0, const char *name = 0);
~PIInt();
protected slots:
void spinValueChanged( int value );
- virtual void valueChanged( QVariant variant );
+ virtual void valueChanged( TQVariant variant );
protected:
KIntSpinBox *spin;
@@ -152,13 +158,14 @@ class PIInt : public PIEditor
class PILineEdit : public PIEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- PILineEdit(QString id, Variant *data, QWidget *parent = 0, const char *name = 0);
+ PILineEdit(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0);
~PILineEdit();
protected slots:
void slotEditTextChanged();
- virtual void valueChanged( QVariant variant );
+ virtual void valueChanged( TQVariant variant );
protected:
KLineEdit *m_edit;
@@ -171,13 +178,14 @@ class PILineEdit : public PIEditor
class PIStringCombo : public PIEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- PIStringCombo(QString id, Variant *data, QWidget *parent, const char *name = 0);
+ PIStringCombo(TQString id, Variant *data, TQWidget *tqparent, const char *name = 0);
~PIStringCombo();
void popup();
public slots:
- virtual void valueChanged( QVariant variant );
+ virtual void valueChanged( TQVariant variant );
void slotComboChanged();
protected:
diff --git a/src/gui/plvitem.cpp b/src/gui/plvitem.cpp
index 420259b..55f6f6a 100644
--- a/src/gui/plvitem.cpp
+++ b/src/gui/plvitem.cpp
@@ -12,18 +12,18 @@
#include "variant.h"
#include <klistview.h>
-#include <qpainter.h>
-#include <qvariant.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
//BEGIN class PLVItem
-PLVItem::PLVItem(KListView *listview, const QString &id, Variant *data)
+PLVItem::PLVItem(KListView *listview, const TQString &id, Variant *data)
: KListViewItem(listview, data->editorCaption())
{
p_data = data;
m_id = id;
setText(1,p_data->displayString() );
- connect(data,SIGNAL(valueChanged(QVariant, QVariant )),this,SLOT(updateData(QVariant )));
+ connect(data,TQT_SIGNAL(valueChanged(TQVariant, TQVariant )),this,TQT_SLOT(updateData(TQVariant )));
//setHeight(100);
}
@@ -33,7 +33,7 @@ PLVItem::~PLVItem()
{
}
-void PLVItem::updateData(QVariant /*value*/)
+void PLVItem::updateData(TQVariant /*value*/)
{
if (!p_data)
return;
@@ -41,7 +41,7 @@ void PLVItem::updateData(QVariant /*value*/)
}
-int PLVItem::width ( const QFontMetrics & fm, const QListView * lv, int c ) const
+int PLVItem::width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const
{
if ( c == 0 )
return 100;
@@ -54,7 +54,7 @@ int PLVItem::width ( const QFontMetrics & fm, const QListView * lv, int c ) cons
//BEGIN class PLVColorItem
-PLVColorItem::PLVColorItem(KListView *listview, const QString &id, Variant *data)
+PLVColorItem::PLVColorItem(KListView *listview, const TQString &id, Variant *data)
: PLVItem(listview,id,data)
{
}
@@ -64,7 +64,7 @@ PLVColorItem::~PLVColorItem()
{
}
-void PLVColorItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void PLVColorItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
if (!p_data)
return;
@@ -73,14 +73,14 @@ void PLVColorItem::paintCell ( QPainter * p, const QColorGroup & cg, int column,
if (column == 1)
{
p->setBackgroundColor( p_data->value().toColor() );
- QBrush brush( p_data->value().toColor() );
- p->fillRect(QRect(0,0,listView()->columnWidth(1),KListViewItem::height()),brush);
+ TQBrush brush( p_data->value().toColor() );
+ p->fillRect(TQRect(0,0,listView()->columnWidth(1),KListViewItem::height()),brush);
}
else
KListViewItem::paintCell(p,cg,column,width,align);
}
-void PLVColorItem::updateData(QVariant value)
+void PLVColorItem::updateData(TQVariant value)
{
listView()->triggerUpdate();
PLVItem::updateData(value);
diff --git a/src/gui/plvitem.h b/src/gui/plvitem.h
index fd48845..9dc1763 100644
--- a/src/gui/plvitem.h
+++ b/src/gui/plvitem.h
@@ -12,9 +12,9 @@
#define PLVITEM_H
#include <klistview.h>
-#include <qstring.h>
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class Variant;
@@ -24,28 +24,29 @@ class Variant;
PropertiesListView Item
Basic item, which holds the Variant data and Id for an item
*/
-class PLVItem : public QObject, public KListViewItem
+class PLVItem : public TQObject, public KListViewItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- PLVItem( KListView *listview, const QString &id, Variant * data );
+ PLVItem( KListView *listview, const TQString &id, Variant * data );
~PLVItem();
- QString id() const { return m_id; }
+ TQString id() const { return m_id; }
Variant * data() const { return p_data; }
- virtual int width ( const QFontMetrics & fm, const QListView * lv, int c ) const;
+ virtual int width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const;
public slots:
/**
* Call to change the data held by an item, and update the display
* accordingly.
*/
- virtual void updateData(QVariant value);
+ virtual void updateData(TQVariant value);
protected:
- QString m_id;
- QGuardedPtr<Variant> p_data;
+ TQString m_id;
+ TQGuardedPtr<Variant> p_data;
};
/**
@@ -54,13 +55,13 @@ class PLVItem : public QObject, public KListViewItem
class PLVColorItem : public PLVItem
{
public:
- PLVColorItem( KListView *listview, const QString &id, Variant *data );
+ PLVColorItem( KListView *listview, const TQString &id, Variant *data );
~PLVColorItem();
- void updateData(QVariant value);
+ void updateData(TQVariant value);
protected:
- virtual void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align );
+ virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
};
#endif
diff --git a/src/gui/probepositioner.cpp b/src/gui/probepositioner.cpp
index 1ea2606..5cf8ee2 100644
--- a/src/gui/probepositioner.cpp
+++ b/src/gui/probepositioner.cpp
@@ -13,15 +13,15 @@
#include "oscilloscopeview.h"
#include "probepositioner.h"
-#include <qevent.h>
-#include <qpainter.h>
-#include <qpointarray.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
#include <algorithm>
#include <cmath>
-ProbePositioner::ProbePositioner(QWidget *parent, const char *name)
- : QWidget( parent, name, WNoAutoErase )
+ProbePositioner::ProbePositioner(TQWidget *tqparent, const char *name)
+ : TQWidget( tqparent, name, WNoAutoErase )
{
m_probePosOffset = 0;
p_draggedProbe = 0l;
@@ -41,7 +41,7 @@ ProbePositioner::~ProbePositioner()
void ProbePositioner::forceRepaint()
{
b_needRedraw = true;
- repaint(false);
+ tqrepaint(false);
}
@@ -91,7 +91,7 @@ void ProbePositioner::setProbePosition( ProbeData *probeData, int position )
}
-ProbeData* ProbePositioner::probeAtPosition( const QPoint &pos )
+ProbeData* ProbePositioner::probeAtPosition( const TQPoint &pos )
{
int relativeArrowHeight = int( probeArrowHeight * ( 1. - float(pos.x()/probeArrowWidth) ) );
@@ -112,9 +112,9 @@ ProbeData* ProbePositioner::probeAtPosition( const QPoint &pos )
void ProbePositioner::slotProbeDataRegistered( int id, ProbeData *probe )
{
m_probeDataMap[id] = probe;
- connect( probe, SIGNAL(displayAttributeChanged()), this, SLOT(forceRepaint()) );
+ connect( probe, TQT_SIGNAL(displayAttributeChanged()), this, TQT_SLOT(forceRepaint()) );
// This connect doesn't really belong here, but it save a lot of code
- connect( probe, SIGNAL(displayAttributeChanged()), Oscilloscope::self()->oscilloscopeView, SLOT(updateView()) );
+ connect( probe, TQT_SIGNAL(displayAttributeChanged()), Oscilloscope::self()->oscilloscopeView, TQT_SLOT(updateView()) );
forceRepaint();
Oscilloscope::self()->oscilloscopeView->updateView();
}
@@ -133,16 +133,16 @@ void ProbePositioner::slotProbeDataUnregistered( int id )
}
-void ProbePositioner::resizeEvent( QResizeEvent *e )
+void ProbePositioner::resizeEvent( TQResizeEvent *e )
{
delete m_pixmap;
- m_pixmap = new QPixmap( e->size() );
- QWidget::resizeEvent(e);
+ m_pixmap = new TQPixmap( e->size() );
+ TQWidget::resizeEvent(e);
forceRepaint();
}
-void ProbePositioner::mousePressEvent( QMouseEvent * e )
+void ProbePositioner::mousePressEvent( TQMouseEvent * e )
{
p_draggedProbe = probeAtPosition(e->pos());
if (p_draggedProbe)
@@ -152,7 +152,7 @@ void ProbePositioner::mousePressEvent( QMouseEvent * e )
}
-void ProbePositioner::mouseReleaseEvent( QMouseEvent * e )
+void ProbePositioner::mouseReleaseEvent( TQMouseEvent * e )
{
if (p_draggedProbe)
e->accept();
@@ -161,7 +161,7 @@ void ProbePositioner::mouseReleaseEvent( QMouseEvent * e )
}
-void ProbePositioner::mouseMoveEvent( QMouseEvent * e )
+void ProbePositioner::mouseMoveEvent( TQMouseEvent * e )
{
if (!p_draggedProbe)
{
@@ -175,13 +175,13 @@ void ProbePositioner::mouseMoveEvent( QMouseEvent * e )
}
-void ProbePositioner::paintEvent( QPaintEvent *e )
+void ProbePositioner::paintEvent( TQPaintEvent *e )
{
- QRect r = e->rect();
+ TQRect r = e->rect();
if (b_needRedraw)
{
- QPainter p;
+ TQPainter p;
m_pixmap->fill( paletteBackgroundColor() );
p.begin(m_pixmap);
p.setClipRegion(e->region());
@@ -193,10 +193,10 @@ void ProbePositioner::paintEvent( QPaintEvent *e )
p.setBrush( probeData->color() );
int currentPos = probePosition(probeData);
- QPointArray pa(3);
- pa[0] = QPoint( 0, int(currentPos-(probeArrowHeight/2)) );
- pa[1] = QPoint( int(probeArrowWidth), currentPos );
- pa[2] = QPoint( 0, int(currentPos+(probeArrowHeight/2)) );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( 0, int(currentPos-(probeArrowHeight/2)) );
+ pa[1] = TQPoint( int(probeArrowWidth), currentPos );
+ pa[2] = TQPoint( 0, int(currentPos+(probeArrowHeight/2)) );
p.drawPolygon(pa);
}
diff --git a/src/gui/probepositioner.h b/src/gui/probepositioner.h
index d106b40..c99c0ab 100644
--- a/src/gui/probepositioner.h
+++ b/src/gui/probepositioner.h
@@ -11,10 +11,10 @@
#ifndef PROBEPOSITIONER_H
#define PROBEPOSITIONER_H
-#include <qwidget.h>
+#include <tqwidget.h>
class ProbeData;
-typedef QMap< int, ProbeData* > ProbeDataMap;
+typedef TQMap< int, ProbeData* > ProbeDataMap;
const float probeArrowWidth = 9;
const float probeArrowHeight = 12;
@@ -23,11 +23,12 @@ const float probeArrowHeight = 12;
Widget for positioning the output of Probes in the OscilloscopeView
@author David Saxton
*/
-class ProbePositioner : public QWidget
+class ProbePositioner : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProbePositioner(QWidget *parent = 0, const char *name = 0);
+ ProbePositioner(TQWidget *tqparent = 0, const char *name = 0);
~ProbePositioner();
/**
* Returns the amount of space (height in pixels) that a probe output
@@ -50,7 +51,7 @@ class ProbePositioner : public QWidget
* or NULL if none. Records the offset of the position from the mouse
* in m_probePosOffset.
*/
- ProbeData* probeAtPosition( const QPoint &pos );
+ ProbeData* probeAtPosition( const TQPoint &pos );
public slots:
void forceRepaint();
@@ -60,18 +61,18 @@ class ProbePositioner : public QWidget
void slotProbeDataUnregistered( int id );
protected:
- virtual void mousePressEvent( QMouseEvent * e );
- virtual void mouseReleaseEvent( QMouseEvent * e );
- virtual void mouseMoveEvent( QMouseEvent * e );
- virtual void paintEvent( QPaintEvent *e );
- virtual void resizeEvent( QResizeEvent *event );
+ virtual void mousePressEvent( TQMouseEvent * e );
+ virtual void mouseReleaseEvent( TQMouseEvent * e );
+ virtual void mouseMoveEvent( TQMouseEvent * e );
+ virtual void paintEvent( TQPaintEvent *e );
+ virtual void resizeEvent( TQResizeEvent *event );
ProbeDataMap m_probeDataMap;
ProbeData *p_draggedProbe;
int m_probePosOffset;
bool b_needRedraw;
- QPixmap *m_pixmap;
+ TQPixmap *m_pixmap;
};
#endif
diff --git a/src/gui/processingoptionswidget.ui b/src/gui/processingoptionswidget.ui
index 683092a..be18723 100644
--- a/src/gui/processingoptionswidget.ui
+++ b/src/gui/processingoptionswidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProcessingOptionsWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ProcessingOptionsWidget</cstring>
</property>
@@ -26,7 +26,7 @@
<property name="name">
<cstring>m_pMicroSelect</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -43,14 +43,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -88,7 +88,7 @@
<data format="PNG" length="1122">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042949444154388db5954d6c545514c77ff7de37eff1a6a550da994e5ba798868f948fc847a2a2911816c436b0a02ed0083161a1981877ee10d90aa94656063491882c5cd4c4b8103f20cd806909a98604da8482341de80cb69de9bcd799799d79efba980f1da3a80b4f727273939bdff99f9b93f3175a6b6a21849080020c4002a29a8f0a5dcd002803bed63a1035f0d0d0504b6f6fef51d7758fa4d3e98d8ee3fc03af128ee3303939399548242eb8aefb09300f78464de9f0f0f0d148cc7caf3d5424de97a7ec17104220242805520a44557bbd4b21f083801d33e63a6d1bc7bf19c6064e0319a35a58b9ae7ba43d54e4d7c54b64dc097c7f09d30ef04b36736983cc7c11b4456b9b492c5e20dc54a6540e00896a8268a7017010f8bcae1830d2e9f4c69ebe3c197782b2ce60d94ddc9b30f9feeb45ae5d7181c5ead35636ef08d3ffe26a76ee3208b4031a56d80aa00768fda362e9380e25bf80ef3b587613d7afc099533380a4b5dda46fcb5aa42998b9eb7173dce5e6788e434763ec7fc942532008ea436003660d2caa7f8d69c3bd8910674e4d033e83877ad8d36fb0aa4d6058658ac5358c5df6383bf480f31fdda5a3632bbbfb6da4ccd5c00a10b2012cc12fd97cfb5516f0187c25cee0619396480ec3ca909d0f3372d1e5f9fe66de3ad605587c712ec55256a2540d5519d19ae24a29057329839f7ecc138944d833102290f3184ae1e6d6f0e98739c61229e6d21eafbed1c9c8c5558c8f3ee4ceed76946a1c43d97091828585223e2eebfbc295f60d45de89707628cb58224577bc85a79e5d4d786581cddb9b0148259711b20145836221400416e0232d1f6595c9ce4538773ac7b54406f0b15784e8e80aa1ac2594190220d021e49f2437960156b70ba095e95f96f18acd8c263cc6122962b1167a7ba34cdd7ec8c977a699bed546722a8fc2a02b6e2185fff78ab586ce78894ddb9ab9f5738ed14b1e030756929d8ff2e4ae5544632b38f96e89a99b298ebd6950cc2d12ed0eb3618b26f520788462ad09877df60db600f0f1fb49c646f21c7ebd836dcf94e9d9b4c0db27d6d3bd36c6426a96bce731703046d7da129a4670836284a054869d4f1b1c7e2dca67676ef3c1898091ef5ad8bc358c3205c93bf7c9a40ad4c660f4728edd7bbb3142ea2fc1da711cfc200011e08b45f6bd1c261adbce9717928c5f9d63fc6a19f0014567773303073790f8214bd6f5282dfbb8b9fa1f6b40d7c1939393533b92e63ad9240990484aec7e41b27d579cbb531e0f67023492d86316ebb768ba1e0f786e6f37e56550c62237aee7011e54abd7c1412291b8a06de378b4d3c0b215da9708e5a3a442192085404a83d4accfecac067c0c43e13a70e3fa12e96409e0325000966bbb354465339d04a6f9dd15fe6dde07ce030780278088d05ad72cc9a6b2f2daaaa74d75a1f0e8d0d5f60b40868a8364ead6248430000b0857a126ffcdf396abf03ce089ffcb4c7f033046c6b4a995e7a00000000049454e44ae426082</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>microselectwidget.h</includehint>
<includehint>kurlrequester.h</includehint>
diff --git a/src/gui/programmerdlg.cpp b/src/gui/programmerdlg.cpp
index a2186b4..9473720 100644
--- a/src/gui/programmerdlg.cpp
+++ b/src/gui/programmerdlg.cpp
@@ -21,8 +21,8 @@
#include <klocale.h>
#include <kstdguiitem.h>
-ProgrammerDlg::ProgrammerDlg( const QString & picID, QWidget *parent, const char *name )
- : KDialogBase( parent, name, true, i18n("PIC Programmer"), Ok|Cancel )
+ProgrammerDlg::ProgrammerDlg( const TQString & picID, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name, true, i18n("PIC Programmer"), Ok|Cancel )
{
// Change the "Ok" button to a "Burn" button
KGuiItem burnItem = KStdGuiItem::ok();
@@ -35,7 +35,7 @@ ProgrammerDlg::ProgrammerDlg( const QString & picID, QWidget *parent, const char
// Setup the list of programmers
KComboBox * programmerCombo = m_pProgrammerWidget->m_pProgrammerProgram;
- QStringList programmerNames = m_pProgrammerSettings->configNames( false );
+ TQStringList programmerNames = m_pProgrammerSettings->configNames( false );
programmerCombo->insertStringList( programmerNames );
programmerCombo->setSizeLimit( programmerNames.size() );
programmerCombo->setCurrentText( KTLConfig::picProgrammerProgram() );
diff --git a/src/gui/programmerdlg.h b/src/gui/programmerdlg.h
index ab64e5a..1c3fa63 100644
--- a/src/gui/programmerdlg.h
+++ b/src/gui/programmerdlg.h
@@ -25,13 +25,14 @@ class ProgrammerWidget;
class ProgrammerDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a new ProgrammerDlg with the PIC type set to picID. Other
* options (such as the program to use) will be read in from the
* settings.
*/
- ProgrammerDlg( const QString & picID, QWidget * parent = 0, const char * name = 0 );
+ ProgrammerDlg( const TQString & picID, TQWidget * tqparent = 0, const char * name = 0 );
~ProgrammerDlg();
virtual void reject();
diff --git a/src/gui/programmerwidget.ui b/src/gui/programmerwidget.ui
index 3436ac1..73c651a 100644
--- a/src/gui/programmerwidget.ui
+++ b/src/gui/programmerwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProgrammerWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ProgrammerWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -50,14 +50,14 @@
<property name="name">
<cstring>m_pMicroSelect</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -65,7 +65,7 @@
<string>Port</string>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<property name="name">
<cstring>m_pPicProgrammerPort</cstring>
</property>
@@ -83,7 +83,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>0</height>
@@ -115,7 +115,7 @@
<data format="PNG" length="1122">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042949444154388db5954d6c545514c77ff7de37eff1a6a550da994e5ba798868f948fc847a2a2911816c436b0a02ed0083161a1981877ee10d90aa94656063491882c5cd4c4b8103f20cd806909a98604da8482341de80cb69de9bcd799799d79efba980f1da3a80b4f727273939bdff99f9b93f3175a6b6a21849080020c4002a29a8f0a5dcd002803bed63a1035f0d0d0504b6f6fef51d7758fa4d3e98d8ee3fc03af128ee3303939399548242eb8aefb09300f78464de9f0f0f0d148cc7caf3d5424de97a7ec17104220242805520a44557bbd4b21f083801d33e63a6d1bc7bf19c6064e0319a35a58b9ae7ba43d54e4d7c54b64dc097c7f09d30ef04b36736983cc7c11b4456b9b492c5e20dc54a6540e00896a8268a7017010f8bcae1830d2e9f4c69ebe3c197782b2ce60d94ddc9b30f9feeb45ae5d7181c5ead35636ef08d3ffe26a76ee3208b4031a56d80aa00768fda362e9380e25bf80ef3b587613d7afc099533380a4b5dda46fcb5aa42998b9eb7173dce5e6788e434763ec7fc942532008ea436003660d2caa7f8d69c3bd8910674e4d033e83877ad8d36fb0aa4d6058658ac5358c5df6383bf480f31fdda5a3632bbbfb6da4ccd5c00a10b2012cc12fd97cfb5516f0187c25cee0619396480ec3ca909d0f3372d1e5f9fe66de3ad605587c712ec55256a2540d5519d19ae24a29057329839f7ecc138944d833102290f3184ae1e6d6f0e98739c61229e6d21eafbed1c9c8c5558c8f3ee4ceed76946a1c43d97091828585223e2eebfbc295f60d45de89707628cb58224577bc85a79e5d4d786581cddb9b0148259711b20145836221400416e0232d1f6595c9ce4538773ac7b54406f0b15784e8e80aa1ac2594190220d021e49f2437960156b70ba095e95f96f18acd8c263cc6122962b1167a7ba34cdd7ec8c977a699bed546722a8fc2a02b6e2185fff78ab586ce78894ddb9ab9f5738ed14b1e030756929d8ff2e4ae5544632b38f96e89a99b298ebd6950cc2d12ed0eb3618b26f520788462ad09877df60db600f0f1fb49c646f21c7ebd836dcf94e9d9b4c0db27d6d3bd36c6426a96bce731703046d7da129a4670836284a054869d4f1b1c7e2dca67676ef3c1898091ef5ad8bc358c3205c93bf7c9a40ad4c660f4728edd7bbb3142ea2fc1da711cfc200011e08b45f6bd1c261adbce9717928c5f9d63fc6a19f0014567773303073790f8214bd6f5282dfbb8b9fa1f6b40d7c1939393533b92e63ad9240990484aec7e41b27d579cbb531e0f67023492d86316ebb768ba1e0f786e6f37e56550c62237aee7011e54abd7c1412291b8a06de378b4d3c0b215da9708e5a3a442192085404a83d4accfecac067c0c43e13a70e3fa12e96409e0325000966bbb354465339d04a6f9dd15fe6dde07ce030780278088d05ad72cc9a6b2f2daaaa74d75a1f0e8d0d5f60b40868a8364ead6248430000b0857a126ffcdf396abf03ce089ffcb4c7f033046c6b4a995e7a00000000049454e44ae426082</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>microselectwidget.h</includehint>
diff --git a/src/gui/projectdlgs.cpp b/src/gui/projectdlgs.cpp
index 4ea18c0..1cb560f 100644
--- a/src/gui/projectdlgs.cpp
+++ b/src/gui/projectdlgs.cpp
@@ -24,23 +24,23 @@
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
//BEGIN class NewProjectDlg
-NewProjectDlg::NewProjectDlg( QWidget * parent )
- : KDialogBase( parent, "newprojectdlg", true, "New Project", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
+NewProjectDlg::NewProjectDlg( TQWidget * tqparent )
+ : KDialogBase( tqparent, "newprojectdlg", true, "New Project", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_pWidget = new NewProjectWidget(this);
- connect( m_pWidget->projectNameEdit, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) );
- connect( m_pWidget->projectLocationURL, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) );
+ connect( m_pWidget->projectNameEdit, TQT_SIGNAL(textChanged(const TQString & )), this, TQT_SLOT(locationChanged(const TQString& )) );
+ connect( m_pWidget->projectLocationURL, TQT_SIGNAL(textChanged(const TQString & )), this, TQT_SLOT(locationChanged(const TQString& )) );
// Check if already valid dir
- locationChanged( QString::null );
+ locationChanged( TQString() );
- m_pWidget->projectLocationURL->setURL( QDir::homeDirPath() );
+ m_pWidget->projectLocationURL->setURL( TQDir::homeDirPath() );
m_pWidget->projectLocationURL->setMode( KFile::Directory );
setMainWidget( m_pWidget );
@@ -62,10 +62,10 @@ void NewProjectDlg::reject()
m_bAccepted = false;
}
-void NewProjectDlg::locationChanged( const QString & )
+void NewProjectDlg::locationChanged( const TQString & )
{
m_location = m_pWidget->projectLocationURL->url();
- QDir subDir(m_location);
+ TQDir subDir(m_location);
if ( !m_location.endsWith("/") )
m_location.append("/");
@@ -75,7 +75,7 @@ void NewProjectDlg::locationChanged( const QString & )
m_pWidget->locationLabel->setText( m_location );
- QDir dir(m_location);
+ TQDir dir(m_location);
if ( dir.exists() || !subDir.exists() )
enableButtonOK(false);
@@ -88,8 +88,8 @@ void NewProjectDlg::locationChanged( const QString & )
//BEGIN class CreateSubprojectDlg
-CreateSubprojectDlg::CreateSubprojectDlg( QWidget * parent )
- : KDialogBase( parent, "Create Subproject Dialog", true, "Create Subproject", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
+CreateSubprojectDlg::CreateSubprojectDlg( TQWidget * tqparent )
+ : KDialogBase( tqparent, "Create Subproject Dialog", true, "Create Subproject", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_pWidget = new CreateSubprojectWidget(this);
@@ -128,8 +128,8 @@ void CreateSubprojectDlg::reject()
//BEGIN class LinkerOptionsDlg
-LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *parent )
- : KDialogBase( parent, "Linker Options Dialog", true, "Linker Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
+LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, TQWidget *tqparent )
+ : KDialogBase( tqparent, "Linker Options Dialog", true, "Linker Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_pLinkerOptions = linkingOptions;
m_pWidget = new LinkerOptionsWidget(this);
@@ -150,14 +150,14 @@ LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *par
//BEGIN Update library widgets
const KURL::List availableInternal = pi->childOutputURLs( ProjectItem::LibraryType );
- const QStringList linkedInternal = m_pLinkerOptions->linkedInternal();
+ const TQStringList linkedInternal = m_pLinkerOptions->linkedInternal();
KURL::List::const_iterator end = availableInternal.end();
for ( KURL::List::const_iterator it = availableInternal.begin(); it != end; ++it )
{
- QString relativeURL = KURL::relativeURL( pi->url(), *it );
- QCheckListItem * item = new QCheckListItem( m_pWidget->m_pInternalLibraries, relativeURL, QCheckListItem::CheckBox );
- item->setOn( linkedInternal.contains(relativeURL) );
+ TQString relativeURL = KURL::relativeURL( pi->url(), *it );
+ TQCheckListItem * item = new TQCheckListItem( m_pWidget->m_pInternalLibraries, relativeURL, TQCheckListItem::CheckBox );
+ item->setOn( linkedInternal.tqcontains(relativeURL) );
}
m_pExternalLibraryRequester = new KURLRequester( 0l );
@@ -165,8 +165,8 @@ LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *par
delete m_pWidget->m_pExternalLibraries;
m_pWidget->m_pExternalLibraries = new KEditListBox( i18n("Link libraries outside project"), m_pExternalLibraryRequester->customEditor(), m_pWidget );
- m_pWidget->m_pExternalLibraries->layout()->setMargin(11);
- (dynamic_cast<QGridLayout*>(m_pWidget->layout()))->addMultiCellWidget( m_pWidget->m_pExternalLibraries, 7, 7, 0, 1 );
+ m_pWidget->m_pExternalLibraries->tqlayout()->setMargin(11);
+ (dynamic_cast<TQGridLayout*>(m_pWidget->tqlayout()))->addMultiCellWidget( m_pWidget->m_pExternalLibraries, 7, 7, 0, 1 );
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
@@ -192,10 +192,10 @@ void LinkerOptionsDlg::accept()
{
hide();
- QStringList linkedInternal;
- for ( QListViewItemIterator internalIt( m_pWidget->m_pInternalLibraries ); internalIt.current(); ++internalIt )
+ TQStringList linkedInternal;
+ for ( TQListViewItemIterator internalIt( m_pWidget->m_pInternalLibraries ); internalIt.current(); ++internalIt )
{
- QCheckListItem * item = static_cast<QCheckListItem*>(internalIt.current());
+ TQCheckListItem * item = static_cast<TQCheckListItem*>(internalIt.current());
if ( item->isOn() )
linkedInternal << item->text();
}
@@ -218,8 +218,8 @@ void LinkerOptionsDlg::reject()
//BEGIN class ProcessingOptionsDlg
-ProcessingOptionsDlg::ProcessingOptionsDlg( ProjectItem * projectItem, QWidget *parent )
- : KDialogBase( parent, "Processing Options Dialog", true, "Processing Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
+ProcessingOptionsDlg::ProcessingOptionsDlg( ProjectItem * projectItem, TQWidget *tqparent )
+ : KDialogBase( tqparent, "Processing Options Dialog", true, "Processing Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_pProjectItem = projectItem;
m_pWidget = new ProcessingOptionsWidget(this);
diff --git a/src/gui/projectdlgs.h b/src/gui/projectdlgs.h
index fe50361..5219072 100644
--- a/src/gui/projectdlgs.h
+++ b/src/gui/projectdlgs.h
@@ -30,8 +30,9 @@ A standard dialog for getting project details from the user for a new project
class NewProjectDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NewProjectDlg( QWidget * parent );
+ NewProjectDlg( TQWidget * tqparent );
/**
* Called when the 'Cancel' button is pressed.
@@ -45,9 +46,9 @@ class NewProjectDlg : public KDialogBase
void accept();
bool accepted() const { return m_bAccepted; }
- QString projectName() const { return m_projectName; }
- QString projectLocation() const { return m_projectLocation; }
- QString location() const { return m_location; }
+ TQString projectName() const { return m_projectName; }
+ TQString projectLocation() const { return m_projectLocation; }
+ TQString location() const { return m_location; }
public slots:
/**
@@ -55,14 +56,14 @@ class NewProjectDlg : public KDialogBase
* Checks whether the resultant location combination is a valid path -
* if so, enabels the OK button; otherwise disables it.
*/
- void locationChanged( const QString & );
+ void locationChanged( const TQString & );
protected:
NewProjectWidget * m_pWidget;
bool m_bAccepted;
- QString m_projectName;
- QString m_projectLocation;
- QString m_location;
+ TQString m_projectName;
+ TQString m_projectLocation;
+ TQString m_location;
};
@@ -72,8 +73,9 @@ class NewProjectDlg : public KDialogBase
class CreateSubprojectDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CreateSubprojectDlg( QWidget *parent = 0 );
+ CreateSubprojectDlg( TQWidget *tqparent = 0 );
~CreateSubprojectDlg();
// The following values should agree with the positions in the combo box
@@ -95,13 +97,13 @@ class CreateSubprojectDlg : public KDialogBase
bool accepted() const { return m_bAccepted; }
Type type() const { return m_type; }
- QString targetFile() const { return m_targetFile; }
+ TQString targetFile() const { return m_targetFile; }
protected:
CreateSubprojectWidget * m_pWidget;
bool m_bAccepted;
Type m_type;
- QString m_targetFile;
+ TQString m_targetFile;
};
@@ -111,8 +113,9 @@ class CreateSubprojectDlg : public KDialogBase
class LinkerOptionsDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *parent = 0 );
+ LinkerOptionsDlg( LinkerOptions * linkingOptions, TQWidget *tqparent = 0 );
virtual ~LinkerOptionsDlg();
/**
@@ -138,7 +141,7 @@ class LinkerOptionsDlg : public KDialogBase
class ProcessingOptionsDlg : public KDialogBase
{
public:
- ProcessingOptionsDlg( ProjectItem * projectItem, QWidget *parent = 0 );
+ ProcessingOptionsDlg( ProjectItem * projectItem, TQWidget *tqparent = 0 );
virtual ~ProcessingOptionsDlg();
/**
diff --git a/src/gui/propertieslistview.cpp b/src/gui/propertieslistview.cpp
index 5f57aa3..7e55ed0 100644
--- a/src/gui/propertieslistview.cpp
+++ b/src/gui/propertieslistview.cpp
@@ -20,25 +20,25 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qevent.h>
-#include <qheader.h>
-#include <qpushbutton.h>
-#include <qvariant.h>
+#include <tqevent.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
+#include <tqvariant.h>
-PropertiesListView::PropertiesListView(QWidget *parent, const char *name)
- : KListView(parent, name)
+PropertiesListView::PropertiesListView(TQWidget *tqparent, const char *name)
+ : KListView(tqparent, name)
{
addColumn(i18n("Property"));
addColumn(i18n("Data"));
setFullWidth(true);
- setColumnAlignment(1,Qt::AlignRight);
+ setColumnAlignment(1,TQt::AlignRight);
p_lastItem = 0l;
m_diffBt = 0L;
- connect(this,SIGNAL(selectionChanged(QListViewItem*)),this,SLOT(slotSelectionChanged(QListViewItem*)));
+ connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem*)),this,TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
m_editor = 0L;
- connect(header(),SIGNAL(sizeChange(int,int,int)),this,SLOT(headerSizeChanged(int,int,int)));
+ connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(headerSizeChanged(int,int,int)));
}
PropertiesListView::~PropertiesListView()
@@ -124,7 +124,7 @@ void PropertiesListView::slotUpdate( ItemGroup * itemGroup )
}
}
-void PropertiesListView::slotSelectionChanged(QListViewItem *item)
+void PropertiesListView::slotSelectionChanged(TQListViewItem *item)
{
if (!item) return;
destroyEditor();
@@ -185,24 +185,24 @@ void PropertiesListView::slotSelectionChanged(QListViewItem *item)
}
}
- connect(p_lastItem->data(),SIGNAL(destroyed()),this,SLOT(destroyEditor()));
+ connect(p_lastItem->data(),TQT_SIGNAL(destroyed()),this,TQT_SLOT(destroyEditor()));
// Connect so that changes in the editor change the canvas item data.
- connect(m_editor,SIGNAL(editorDataChanged(const QString&,QVariant)),ItemInterface::self(),SLOT(slotSetData(const QString&,QVariant)));
- connect(m_editor,SIGNAL(editorDataChanged(const QString&,QVariant)),this,SLOT(slotDataChanged(const QString&,QVariant)));
+ connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),ItemInterface::self(),TQT_SLOT(slotSetData(const TQString&,TQVariant)));
+ connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),this,TQT_SLOT(slotDataChanged(const TQString&,TQVariant)));
int x = columnWidth(0);
- int y = viewportToContents(QPoint(0,itemRect(p_lastItem).y())).y();
+ int y = viewportToContents(TQPoint(0,tqitemRect(p_lastItem).y())).y();
addChild(m_editor,x,y);
m_editor->setFocus();
m_editor->show();
- m_editor->setGeometry(QRect(x,y,columnWidth(1),itemRect(p_lastItem).height()));
+ m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height()));
if(p_lastItem->data()->type() == Variant::Type::FileName)
{
// The folder button in the KURLComboBox has a minimum size taller than
// the height of the ListViewItems so this is a temporary kludge to
// make it look slightly acceptable.
- m_editor->setGeometry(QRect(x,y,columnWidth(1),itemRect(p_lastItem).height()+7));
+ m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height()+7));
}
// Active the editor as appropriate
@@ -271,13 +271,13 @@ void PropertiesListView::headerSizeChanged(int section, int /*oldSize*/, int new
// Resize the editor to the new column width
// and move it to the right place.
- QRect rect = m_editor->geometry();
+ TQRect rect = m_editor->tqgeometry();
rect.setWidth(newSize);
rect.setX( columnWidth(0) );
m_editor->setGeometry(rect);
}
-void PropertiesListView::slotDataChanged(const QString &/*id*/, QVariant data)
+void PropertiesListView::slotDataChanged(const TQString &/*id*/, TQVariant data)
{
PLVItem *pItem = static_cast<PLVItem*>(currentItem());
pItem->updateData(data);
@@ -285,7 +285,7 @@ void PropertiesListView::slotDataChanged(const QString &/*id*/, QVariant data)
void PropertiesListView::slotMergeProperties()
{
- for( QListViewItemIterator it( this ); it.current(); ++it )
+ for( TQListViewItemIterator it( this ); it.current(); ++it )
{
PLVItem * pItem = static_cast<PLVItem*>(it.current());
if (pItem->isEnabled())
@@ -302,7 +302,7 @@ void PropertiesListView::slotMergeProperties()
void PropertiesListView::slotSetDefaults()
{
- for( QListViewItemIterator it( this ); it.current(); ++it )
+ for( TQListViewItemIterator it( this ); it.current(); ++it )
{
PLVItem *pItem = static_cast<PLVItem*>(it.current());
ItemInterface::self()->slotSetData(pItem->id(),pItem->data()->defaultValue());
@@ -310,13 +310,13 @@ void PropertiesListView::slotSetDefaults()
}
-void PropertiesListView::wheelEvent( QWheelEvent *e )
+void PropertiesListView::wheelEvent( TQWheelEvent *e )
{
- QPoint _pos = contentsToViewport(e->pos());
+ TQPoint _pos = contentsToViewport(e->pos());
_pos -= pos();
_pos.setY( _pos.y()+header()->height() );
- QListViewItem *item = itemAt(_pos);
- if ( item && item != dynamic_cast<QListViewItem*>(p_lastItem) )
+ TQListViewItem *item = itemAt(_pos);
+ if ( item && item != dynamic_cast<TQListViewItem*>(p_lastItem) )
{
e->accept();
if(!item->isSelected()) slotSelectionChanged(item);
diff --git a/src/gui/propertieslistview.h b/src/gui/propertieslistview.h
index c6ad8f7..a879ae7 100644
--- a/src/gui/propertieslistview.h
+++ b/src/gui/propertieslistview.h
@@ -12,15 +12,15 @@
#define PROPERTIESLISTVIEW_H
#include <klistview.h>
-#include <qmap.h>
+#include <tqmap.h>
class CNItemGroup;
class ItemGroup;
class PIEditor;
class PLVItem;
-class QPushButton;
+class TQPushButton;
-typedef QMap< QString, PLVItem * > PLVItemMap;
+typedef TQMap< TQString, PLVItem * > PLVItemMap;
/**
@author Daniel Clarke
@@ -29,8 +29,9 @@ typedef QMap< QString, PLVItem * > PLVItemMap;
class PropertiesListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- PropertiesListView( QWidget *parent = 0l, const char *name = 0l );
+ PropertiesListView( TQWidget *tqparent = 0l, const char *name = 0l );
~PropertiesListView();
public slots:
@@ -48,7 +49,7 @@ public slots:
* Removes all property items from the widget.
*/
void slotClear();
- void slotSelectionChanged(QListViewItem *item);
+ void slotSelectionChanged(TQListViewItem *item);
/**
* Whenthe selected items have different values, then the property editor
* for the disagreeing property will have a value taken from one of the
@@ -60,14 +61,14 @@ public slots:
protected slots:
void headerSizeChanged(int section, int oldSize, int newSize);
- void slotDataChanged(const QString &id, QVariant data);
+ void slotDataChanged(const TQString &id, TQVariant data);
void destroyEditor();
protected:
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
PIEditor *m_editor;
- QPushButton *m_diffBt;
+ TQPushButton *m_diffBt;
PLVItem *p_lastItem;
PLVItemMap m_plvItemMap;
};
diff --git a/src/gui/sdccoptionswidget.ui b/src/gui/sdccoptionswidget.ui
index 218f796..3f73699 100644
--- a/src/gui/sdccoptionswidget.ui
+++ b/src/gui/sdccoptionswidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SDCCOptionsWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SDCCOptionsWidget</cstring>
</property>
@@ -22,11 +22,11 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQTabWidget" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>tabWidget12</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>general</cstring>
</property>
@@ -37,7 +37,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_nostdlib</cstring>
</property>
@@ -48,7 +48,7 @@
<string>Alt+Y</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_nostdinc</cstring>
</property>
@@ -59,7 +59,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_less_pedantic</cstring>
</property>
@@ -70,7 +70,7 @@
<string>Alt+B</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_std_c89</cstring>
</property>
@@ -84,7 +84,7 @@
<string>Follow the C89 standard and disable SDCC features that conflict with the standard.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_std_c99</cstring>
</property>
@@ -111,7 +111,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -120,7 +120,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>code_generation</cstring>
</property>
@@ -131,7 +131,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_stack_auto</cstring>
</property>
@@ -148,7 +148,7 @@
<string>All functions in the source file will be compiled as reentrant, i.e. the parameters and local variables will be allocated on the stack. If this option is used all source files in the project should be compiled with this option. It automatically implies -int-long-reent and -float-reent.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_int_long_reent</cstring>
</property>
@@ -165,7 +165,7 @@
<string>Integer (16 bit) and long (32 bit) libraries have been compiled as reentrant. Note by default these libraries are compiled as non-reentrant.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_float_reent</cstring>
</property>
@@ -179,7 +179,7 @@
<string>Floating point library is compiled as reentrant.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_fommit_frame_pointer</cstring>
</property>
@@ -190,7 +190,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_no_xinit_opt</cstring>
</property>
@@ -204,7 +204,7 @@
<string>Will not memcpy initialized data from code space into xdata space. This saves a few bytes in code space if you don't have initialized data.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_all_callee_saves</cstring>
</property>
@@ -225,7 +225,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -234,7 +234,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>optimization</cstring>
</property>
@@ -245,7 +245,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_nooverlay</cstring>
</property>
@@ -259,7 +259,7 @@
<string>The compiler will not overlay parameters and local variables of any function, see section Parameters and local variables for more details.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_nogcse</cstring>
</property>
@@ -270,7 +270,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_nolabelopt</cstring>
</property>
@@ -284,7 +284,7 @@
<string>Will not optimize labels (makes the dumpfiles more readable).</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_noinvariant</cstring>
</property>
@@ -295,7 +295,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_noinduction</cstring>
</property>
@@ -306,7 +306,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_no_peep</cstring>
</property>
@@ -320,7 +320,7 @@
<string>Disable peep-hole optimization.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_noloopreverse</cstring>
</property>
@@ -334,7 +334,7 @@
<string>Will not do loop reversal optimization.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_opt_code_size</cstring>
</property>
@@ -348,7 +348,7 @@
<string>The compiler will optimize code generation towards compact code, possibly at the expense of code speed.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_opt_code_speed</cstring>
</property>
@@ -362,7 +362,7 @@
<string>The compiler will optimize code generation towards fast code, possibly at the expense of code size.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_peep_asm</cstring>
</property>
@@ -376,7 +376,7 @@
<string>Pass the inline assembler code through the peep hole optimizer. This can cause unexpected changes to inline assembler code, please go through the peephole optimizer rules defined in the source file tree '&lt;target&gt;/peeph.def' before using this option.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_nojtbound</cstring>
</property>
@@ -397,7 +397,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -406,7 +406,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>pic16_specific</cstring>
</property>
@@ -417,7 +417,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_nodefaultlibs</cstring>
</property>
@@ -428,7 +428,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_pno_banksel</cstring>
</property>
@@ -439,7 +439,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_pstack_model_large</cstring>
</property>
@@ -450,7 +450,7 @@
<string>Alt+K</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_debug_xtra</cstring>
</property>
@@ -461,7 +461,7 @@
<string>Alt+Y</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_denable_peeps</cstring>
</property>
@@ -472,7 +472,7 @@
<string>Alt+X</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_calltree</cstring>
</property>
@@ -483,7 +483,7 @@
<string>Alt+M</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_fstack</cstring>
</property>
@@ -494,7 +494,7 @@
<string>Alt+B</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_optimize_goto</cstring>
</property>
@@ -505,7 +505,7 @@
<string>Alt+Z</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_optimize_cmp</cstring>
</property>
@@ -516,7 +516,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SDCC_optimize_df</cstring>
</property>
@@ -537,7 +537,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -552,7 +552,7 @@
<cstring>kcfg_MiscSDCCOptions</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -570,7 +570,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -579,7 +579,7 @@
</spacer>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/src/gui/settingsdlg.cpp b/src/gui/settingsdlg.cpp
index 3b42027..641a9d2 100644
--- a/src/gui/settingsdlg.cpp
+++ b/src/gui/settingsdlg.cpp
@@ -30,18 +30,18 @@
#include <knuminput.h>
#include <kpushbutton.h>
#include <kstandarddirs.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qslider.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qvalidator.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqslider.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqvalidator.h>
// Make sure that this value is the same as that in ktechlab.kcfg
const int defaultRefreshRate = 50;
-SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *config )
- : KConfigDialog( parent, name, config )
+SettingsDlg::SettingsDlg( TQWidget *tqparent, const char *name, KConfigSkeleton *config )
+ : KConfigDialog( tqparent, name, config )
{
m_generalOptionsWidget = new GeneralOptionsWidget( this, "generalOptionsWidget" );
m_gpasmSettingsWidget = new GpasmSettingsWidget( this, "gpasmSettingsWidget" );
@@ -52,8 +52,8 @@ SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *co
m_pPicProgrammerSettings = new PicProgrammerSettings;
- m_logicWidget->kcfg_LogicOutputHighImpedance->setSuffix( QString(" ") + QChar(0x3a9) );
- m_logicWidget->kcfg_LogicOutputLowImpedance->setSuffix( QString(" ") + QChar(0x3a9) );
+ m_logicWidget->kcfg_LogicOutputHighImpedance->setSuffix( TQString(" ") + TQChar(0x3a9) );
+ m_logicWidget->kcfg_LogicOutputLowImpedance->setSuffix( TQString(" ") + TQChar(0x3a9) );
addPage( m_generalOptionsWidget, i18n("General"), "misc", i18n("General Options") );
addPage( m_picProgrammerConfigWidget, i18n("Programmer"), "memory", i18n("PIC Programmer") );
@@ -62,18 +62,18 @@ SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *co
addPage( m_gpasmSettingsWidget, "Gpasm", "convert_to_hex", "gpasm" );
addPage( m_sdccOptionsWidget, "SDCC", "source_c", "SDCC" );
- connect( m_generalOptionsWidget->refreshRateSlider, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateRefreshRateLabel(int)) );
- connect( m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram, SIGNAL(activated(const QString &)), this, SLOT(slotUpdatePicProgrammerDescription()) );
- connect( m_picProgrammerConfigWidget->removeButton, SIGNAL(clicked()), this, SLOT(slotRemoveProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->addButton, SIGNAL(clicked()), this, SLOT(slotAddProgrammerConfig()) );
+ connect( m_generalOptionsWidget->refreshRateSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotUpdateRefreshRateLabel(int)) );
+ connect( m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotUpdatePicProgrammerDescription()) );
+ connect( m_picProgrammerConfigWidget->removeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->initCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->readCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->writeCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->verifyCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->blankCheckCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
- connect( m_picProgrammerConfigWidget->eraseCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->initCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->readCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->writeCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->verifyCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->blankCheckCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
+ connect( m_picProgrammerConfigWidget->eraseCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) );
m_generalOptionsWidget->kcfg_GridColor->setEnabled( KTLConfig::showGrid() );
@@ -100,23 +100,23 @@ void SettingsDlg::show()
void SettingsDlg::slotUpdateRefreshRateLabel( int sliderValue )
{
- const QString number = QString::number( sliderValueToRefreshRate(sliderValue) );
+ const TQString number = TQString::number( sliderValueToRefreshRate(sliderValue) );
switch(sliderValue)
{
case 0:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Lowest (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Lowest (%1 FPS)").tqarg(number) );
break;
case 1:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Low (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Low (%1 FPS)").tqarg(number) );
break;
case 2:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Medium (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Medium (%1 FPS)").tqarg(number) );
break;
case 3:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("High (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("High (%1 FPS)").tqarg(number) );
break;
case 4:
- m_generalOptionsWidget->refreshRateLabel->setText( i18n("Highest (%1 FPS)").arg(number) );
+ m_generalOptionsWidget->refreshRateLabel->setText( i18n("Highest (%1 FPS)").tqarg(number) );
break;
default:
m_generalOptionsWidget->refreshRateLabel->setText( i18n("Unknown value") );
@@ -128,22 +128,22 @@ void SettingsDlg::slotUpdateRefreshRateLabel( int sliderValue )
void SettingsDlg::slotUpdatePicProgrammerDescription()
{
- QString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
+ TQString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
ProgrammerConfig config = m_pPicProgrammerSettings->config( program );
- QString description = config.description;
+ TQString description = config.description;
bool customProgrammer = ! m_pPicProgrammerSettings->isPredefined( program );
- QString executable = config.executable;
+ TQString executable = config.executable;
if ( executable.isEmpty() )
executable = program.lower();
- QString programLocation = KStandardDirs::findExe( executable );
+ TQString programLocation = KStandardDirs::findExe( executable );
if ( programLocation.isNull() )
- description.prepend( i18n("<b>%1</b> cannot be found.<br>").arg( executable ) );
+ description.prepend( i18n("<b>%1</b> cannot be found.<br>").tqarg( executable ) );
else
- description.prepend( i18n("<b>%1</b> found: %2<br>").arg( executable ).arg(programLocation) );
+ description.prepend( i18n("<b>%1</b> found: %2<br>").tqarg( executable ).tqarg(programLocation) );
m_picProgrammerConfigWidget->m_pProgrammerDescription->setText( description );
m_picProgrammerConfigWidget->removeButton->setEnabled( customProgrammer );
@@ -154,7 +154,7 @@ void SettingsDlg::slotUpdatePicProgrammerDescription()
edit = m_picProgrammerConfigWidget->name; \
edit->setText( config.name ); \
edit->setEnabled(customProgrammer); \
- QToolTip::add( edit, customProgrammer ? 0 : config.name )
+ TQToolTip::add( edit, customProgrammer ? 0 : config.name )
SETUP_COMMAND( initCommand );
SETUP_COMMAND( readCommand );
@@ -169,7 +169,7 @@ void SettingsDlg::slotUpdatePicProgrammerDescription()
void SettingsDlg::slotSaveCurrentProgrammerConfig()
{
- QString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
+ TQString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText();
if ( m_pPicProgrammerSettings->isPredefined( program ) )
return;
@@ -191,9 +191,9 @@ void SettingsDlg::slotRemoveProgrammerConfig()
{
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
- QString program = combo->currentText();
+ TQString program = combo->currentText();
- KMessageBox::ButtonCode confirm = (KMessageBox::ButtonCode)KMessageBox::warningContinueCancel( this, i18n("Remove programmer configuration \"%1\"?").arg(program), i18n("Remove \"%1\"").arg(program), i18n("Remove") );
+ KMessageBox::ButtonCode confirm = (KMessageBox::ButtonCode)KMessageBox::warningContinueCancel( this, i18n("Remove programmer configuration \"%1\"?").tqarg(program), i18n("Remove \"%1\"").tqarg(program), i18n("Remove") );
if ( confirm == KMessageBox::Cancel )
return;
@@ -203,20 +203,20 @@ void SettingsDlg::slotRemoveProgrammerConfig()
}
-class NameValidator : public QValidator
+class NameValidator : public TQValidator
{
public:
- NameValidator( QStringList unallowed )
- : QValidator(0) {
+ NameValidator( TQStringList unallowed )
+ : TQValidator(0) {
m_unallowed = unallowed;
}
- virtual State validate( QString & input, int & ) const {
- return (input.isEmpty() || m_unallowed.contains( input.lower() )) ? Intermediate : Acceptable;
+ virtual State validate( TQString & input, int & ) const {
+ return (input.isEmpty() || m_unallowed.tqcontains( input.lower() )) ? Intermediate : Acceptable;
}
protected:
- QStringList m_unallowed;
+ TQStringList m_unallowed;
};
@@ -224,7 +224,7 @@ void SettingsDlg::slotAddProgrammerConfig()
{
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
- QStringList takenNames;
+ TQStringList takenNames;
int count = combo->count();
for ( int i = 0; i < count; ++i )
takenNames << combo->text(i).lower();
@@ -232,7 +232,7 @@ void SettingsDlg::slotAddProgrammerConfig()
NameValidator * nv = new NameValidator( takenNames );
bool ok = false;
- QString name = KInputDialog::getText( i18n("Configuration Name"), i18n("Name"), 0, &ok, this, 0, nv );
+ TQString name = KInputDialog::getText( i18n("Configuration Name"), i18n("Name"), 0, &ok, this, 0, nv );
delete nv;
@@ -300,7 +300,7 @@ void SettingsDlg::updateSettings()
emit settingsChanged();
}
- QTimer::singleShot( 0, this, SLOT(slotUpdateSettings()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateSettings()) );
}
@@ -313,7 +313,7 @@ void SettingsDlg::slotUpdateSettings()
return;
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
- QString newProgram = combo->currentText();
+ TQString newProgram = combo->currentText();
if ( newProgram != KTLConfig::picProgrammerProgram() )
{
@@ -339,14 +339,14 @@ void SettingsDlg::updateWidgets()
m_pPicProgrammerSettings->load( kapp->config() );
- QStringList programmerNames = m_pPicProgrammerSettings->configNames( false );
+ TQStringList programmerNames = m_pPicProgrammerSettings->configNames( false );
KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram;
combo->clear();
combo->insertStringList( programmerNames );
combo->setSizeLimit( programmerNames.size() );
- QTimer::singleShot( 0, this, SLOT(slotUpdateWidgets()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateWidgets()) );
}
diff --git a/src/gui/settingsdlg.h b/src/gui/settingsdlg.h
index 1fbf966..41f5b55 100644
--- a/src/gui/settingsdlg.h
+++ b/src/gui/settingsdlg.h
@@ -12,7 +12,7 @@
#define SETTINGSDLG_H
#include <kconfigdialog.h>
-#include <qmap.h>
+#include <tqmap.h>
class AsmFormattingWidget;
class GeneralOptionsWidget;
@@ -29,8 +29,9 @@ class SDCCOptionsWidget;
class SettingsDlg : public KConfigDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *config );
+ SettingsDlg( TQWidget *tqparent, const char *name, KConfigSkeleton *config );
~SettingsDlg();
static int refreshRateToSliderValue( int refreshRate );
diff --git a/src/gui/symbolviewer.cpp b/src/gui/symbolviewer.cpp
index 74d54e1..da4d6bd 100644
--- a/src/gui/symbolviewer.cpp
+++ b/src/gui/symbolviewer.cpp
@@ -18,8 +18,8 @@
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <assert.h>
@@ -39,8 +39,8 @@ SymbolViewerItem::SymbolViewerItem( SymbolViewer * symbolViewer, RegisterInfo *
// setText( TYPE_COLUMN, RegisterInfo::toString( m_pRegisterInfo->type() ) );
radixChanged(); // force update of displayed string
- connect( m_pRegisterInfo, SIGNAL(valueChanged(unsigned)), this, SLOT(valueChanged(unsigned)) );
- connect( m_pSymbolViewer, SIGNAL(valueRadixChanged(SymbolViewer::Radix)), this, SLOT(radixChanged()) );
+ connect( m_pRegisterInfo, TQT_SIGNAL(valueChanged(unsigned)), this, TQT_SLOT(valueChanged(unsigned)) );
+ connect( m_pSymbolViewer, TQT_SIGNAL(valueRadixChanged(SymbolViewer::Radix)), this, TQT_SLOT(radixChanged()) );
}
@@ -61,25 +61,25 @@ void SymbolViewerItem::radixChanged()
//BEGIN class SymbolView
SymbolViewer * SymbolViewer::m_pSelf = 0l;
-SymbolViewer * SymbolViewer::self( KateMDI::ToolView * parent )
+SymbolViewer * SymbolViewer::self( KateMDI::ToolView * tqparent )
{
if (!m_pSelf)
{
- assert (parent);
- m_pSelf = new SymbolViewer(parent);
+ assert (tqparent);
+ m_pSelf = new SymbolViewer(tqparent);
}
return m_pSelf;
}
-SymbolViewer::SymbolViewer( KateMDI::ToolView * parent )
- : QWidget( (QWidget*)parent )
+SymbolViewer::SymbolViewer( KateMDI::ToolView * tqparent )
+ : TQWidget( (TQWidget*)tqparent )
{
- QGridLayout * grid = new QGridLayout( this, 1, 1, 0, 6 );
+ TQGridLayout * grid = new TQGridLayout( this, 1, 1, 0, 6 );
m_pSymbolList = new KListView(this);
grid->addMultiCellWidget( m_pSymbolList, 0, 0, 0, 1 );
- grid->addWidget( new QLabel( i18n("Value radix:"), this ), 1, 0 );
+ grid->addWidget( new TQLabel( i18n("Value radix:"), this ), 1, 0 );
m_pRadixCombo = new KComboBox( false, this );
grid->addWidget( m_pRadixCombo, 1, 1 );
@@ -89,7 +89,7 @@ SymbolViewer::SymbolViewer( KateMDI::ToolView * parent )
m_pRadixCombo->insertItem( i18n("Hexadecimal") );
m_valueRadix = Decimal;
m_pRadixCombo->setCurrentItem(2);
- connect( m_pRadixCombo, SIGNAL(activated(int)), this, SLOT(selectRadix(int)) );
+ connect( m_pRadixCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(selectRadix(int)) );
m_pGpsim = 0l;
m_pCurrentContext = 0l;
@@ -108,7 +108,7 @@ SymbolViewer::~SymbolViewer()
void SymbolViewer::saveProperties( KConfig * config )
{
- QString oldGroup = config->group();
+ TQString oldGroup = config->group();
config->setGroup( "SymbolEditor" );
config->writeEntry( "Radix", m_valueRadix );
@@ -119,7 +119,7 @@ void SymbolViewer::saveProperties( KConfig * config )
void SymbolViewer::readProperties( KConfig * config )
{
- QString oldGroup = config->group();
+ TQString oldGroup = config->group();
config->setGroup( "SymbolEditor" );
m_valueRadix = (SymbolViewer::Radix)config->readNumEntry( "Radix", Decimal );
@@ -156,7 +156,7 @@ void SymbolViewer::setContext( GpsimProcessor * gpsim )
if (!m_pCurrentContext)
return;
- connect( gpsim, SIGNAL(destroyed()), m_pSymbolList, SLOT(clear()) );
+ connect( gpsim, TQT_SIGNAL(destroyed()), m_pSymbolList, TQT_SLOT(clear()) );
unsigned count = m_pCurrentContext->size();
for ( unsigned i = 0; i < count; ++i )
@@ -192,21 +192,21 @@ void SymbolViewer::selectRadix( int selectIndex )
}
-QString SymbolViewer::toDisplayString( unsigned value ) const
+TQString SymbolViewer::toDisplayString( unsigned value ) const
{
switch ( m_valueRadix )
{
case Binary:
- return QString::number( value, 2 ).rightJustify( 8, '0', false );
+ return TQString::number( value, 2 ).rightJustify( 8, '0', false );
case Octal:
- return "0" + QString::number( value, 8 );
+ return "0" + TQString::number( value, 8 );
case Decimal:
- return QString::number( value, 10 );
+ return TQString::number( value, 10 );
case Hexadecimal:
- return "0x" + QString::number( value, 16 );
+ return "0x" + TQString::number( value, 16 );
}
return "?";
diff --git a/src/gui/symbolviewer.h b/src/gui/symbolviewer.h
index 9a09cb6..ed2fcee 100644
--- a/src/gui/symbolviewer.h
+++ b/src/gui/symbolviewer.h
@@ -15,7 +15,7 @@
#define SYMBOLVIEWER_H
#include <klistview.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KComboBox;
class RegisterInfo;
@@ -27,12 +27,13 @@ namespace KateMDI { class ToolView; }
/**
@author David Saxton
*/
-class SymbolViewer : public QWidget
+class SymbolViewer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- static SymbolViewer * self( KateMDI::ToolView * parent = 0l );
- static QString toolViewIdentifier() { return "SymbolViewer"; }
+ static SymbolViewer * self( KateMDI::ToolView * tqparent = 0l );
+ static TQString toolViewIdentifier() { return "SymbolViewer"; }
~SymbolViewer();
enum Radix
@@ -62,7 +63,7 @@ class SymbolViewer : public QWidget
* Converts the value to a string for display according to the currently
* selected radix.
*/
- QString toDisplayString( unsigned value ) const;
+ TQString toDisplayString( unsigned value ) const;
signals:
void valueRadixChanged( SymbolViewer::Radix newRadix );
@@ -71,21 +72,22 @@ class SymbolViewer : public QWidget
void selectRadix( int selectIndex );
protected:
- QGuardedPtr<GpsimProcessor> m_pGpsim;
+ TQGuardedPtr<GpsimProcessor> m_pGpsim;
RegisterSet * m_pCurrentContext;
KListView * m_pSymbolList;
Radix m_valueRadix;
private:
- SymbolViewer( KateMDI::ToolView * parent );
+ SymbolViewer( KateMDI::ToolView * tqparent );
static SymbolViewer * m_pSelf;
KComboBox * m_pRadixCombo;
};
-class SymbolViewerItem : public QObject, public KListViewItem
+class SymbolViewerItem : public TQObject, public KListViewItem
{
Q_OBJECT
+ TQ_OBJECT
public:
SymbolViewerItem( SymbolViewer * symbolViewer, RegisterInfo * registerInfo );
diff --git a/src/icndocument.cpp b/src/icndocument.cpp
index d220765..1273802 100644
--- a/src/icndocument.cpp
+++ b/src/icndocument.cpp
@@ -25,10 +25,10 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qclipboard.h>
-#include <qtimer.h>
+#include <tqclipboard.h>
+#include <tqtimer.h>
-ICNDocument::ICNDocument( const QString &caption, KTechlab *ktechlab, const char *name )
+ICNDocument::ICNDocument( const TQString &caption, KTechlab *ktechlab, const char *name )
: ItemDocument( caption, ktechlab, name ),
m_cells(0l)
{
@@ -47,10 +47,10 @@ ICNDocument::~ICNDocument()
{
m_bDeleted = true;
- // Go to hell, QCanvas. I'm in charge of what gets deleted.
- QCanvasItemList all = m_canvas->allItems();
- const QCanvasItemList::Iterator end = all.end();
- for ( QCanvasItemList::Iterator it= all.begin(); it != end; ++it )
+ // Go to hell, TQCanvas. I'm in charge of what gets deleted.
+ TQCanvasItemList all = m_canvas->allItems();
+ const TQCanvasItemList::Iterator end = all.end();
+ for ( TQCanvasItemList::Iterator it= all.begin(); it != end; ++it )
(*it)->setCanvas(0l);
// Remove all items from the canvas
@@ -94,20 +94,20 @@ ItemGroup* ICNDocument::selectList() const
}
-void ICNDocument::fillContextMenu( const QPoint &pos )
+void ICNDocument::fillContextMenu( const TQPoint &pos )
{
ItemDocument::fillContextMenu(pos);
slotInitItemActions( dynamic_cast<CNItem*>(m_selectList->activeItem()) );
}
-CNItem* ICNDocument::cnItemWithID( const QString &id )
+CNItem* ICNDocument::cnItemWithID( const TQString &id )
{
return dynamic_cast<CNItem*>(itemWithID(id));
}
-Node *ICNDocument::nodeWithID( const QString &id )
+Node *ICNDocument::nodeWithID( const TQString &id )
{
const NodeList::iterator end = m_nodeList.end();
for ( NodeList::iterator it = m_nodeList.begin(); it != end; ++it )
@@ -119,7 +119,7 @@ Node *ICNDocument::nodeWithID( const QString &id )
}
-Connector *ICNDocument::connectorWithID( const QString &id )
+Connector *ICNDocument::connectorWithID( const TQString &id )
{
const ConnectorList::iterator end = m_connectorList.end();
for ( ConnectorList::iterator it = m_connectorList.begin(); it != end; ++it )
@@ -131,17 +131,17 @@ Connector *ICNDocument::connectorWithID( const QString &id )
}
-FlowContainer *ICNDocument::flowContainer( const QPoint &pos )
+FlowContainer *ICNDocument::flowContainer( const TQPoint &pos )
{
- QCanvasItemList collisions = m_canvas->collisions(pos);
+ TQCanvasItemList collisions = m_canvas->collisions(pos);
FlowContainer *flowContainer = 0l;
int currentLevel = -1;
- const QCanvasItemList::iterator end = collisions.end();
- for ( QCanvasItemList::iterator it = collisions.begin(); it != end; ++it )
+ const TQCanvasItemList::iterator end = collisions.end();
+ for ( TQCanvasItemList::iterator it = collisions.begin(); it != end; ++it )
{
if ( FlowContainer *container = dynamic_cast<FlowContainer*>(*it) )
{
- if ( container->level() > currentLevel && !m_selectList->contains(container) )
+ if ( container->level() > currentLevel && !m_selectList->tqcontains(container) )
{
currentLevel = container->level();
flowContainer = container;
@@ -152,7 +152,7 @@ FlowContainer *ICNDocument::flowContainer( const QPoint &pos )
}
-bool ICNDocument::canConnect( QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasItem2 ) const
+bool ICNDocument::canConnect( TQCanvasItem *qcanvasItem1, TQCanvasItem *qcanvasItem2 ) const
{
// Rough outline of what can and can't connect:
// * At most three connectors to a node
@@ -279,11 +279,11 @@ bool ICNDocument::canConnect( QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasIte
//BEGIN Advanced level check
CNItem * startParentItem[3];
for ( unsigned i = 0; i < 3; i++ )
- startParentItem[i] = start[i] ? start[i]->parentItem() : 0l;
+ startParentItem[i] = start[i] ? start[i]->tqparentItem() : 0l;
CNItem * endParentItem[3];
for ( unsigned i = 0; i < 3; i++ )
- endParentItem[i] = end[i] ? end[i]->parentItem() : 0l;
+ endParentItem[i] = end[i] ? end[i]->tqparentItem() : 0l;
Item * container[6] = {0l};
@@ -293,7 +293,7 @@ bool ICNDocument::canConnect( QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasIte
{
int dl = start[i]->level() - startParentItem[i]->level();
if ( dl == 0 )
- container[i] = startParentItem[i]->parentItem();
+ container[i] = startParentItem[i]->tqparentItem();
else if ( dl == 1 )
container[i] = startParentItem[i];
else
@@ -303,7 +303,7 @@ bool ICNDocument::canConnect( QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasIte
{
int dl = end[i]->level() - endParentItem[i]->level();
if ( dl == 0 )
- container[i+3] = endParentItem[i]->parentItem();
+ container[i+3] = endParentItem[i]->tqparentItem();
else if ( dl == 1 )
container[i+3] = endParentItem[i];
else
@@ -331,12 +331,12 @@ bool ICNDocument::canConnect( QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasIte
-Connector * ICNDocument::createConnector( Node *startNode, Node *endNode, QPointList *pointList )
+Connector * ICNDocument::createConnector( Node *startNode, Node *endNode, TQPointList *pointList )
{
if ( !canConnect( startNode, endNode ) )
return 0l;
- QPointList autoPoints;
+ TQPointList autoPoints;
if (!pointList)
{
addAllItemConnectorPoints();
@@ -367,7 +367,7 @@ Connector * ICNDocument::createConnector( Node *startNode, Node *endNode, QPoint
return con;
}
-Connector * ICNDocument::createConnector( Node *node, Connector *con, const QPoint &pos2, QPointList *pointList )
+Connector * ICNDocument::createConnector( Node *node, Connector *con, const TQPoint &pos2, TQPointList *pointList )
{
if ( !canConnect( node, con ) )
return 0l;
@@ -387,7 +387,7 @@ Connector * ICNDocument::createConnector( Node *node, Connector *con, const QPoi
else
return 0l;
- QPointList autoPoints;
+ TQPointList autoPoints;
if (!pointList)
{
addAllItemConnectorPoints();
@@ -397,7 +397,7 @@ Connector * ICNDocument::createConnector( Node *node, Connector *con, const QPoi
pointList = &autoPoints;
}
- QValueList<QPointList> oldConPoints = con->splitConnectorPoints(pos2);
+ TQValueList<TQPointList> oldConPoints = con->splitConnectorPoints(pos2);
con->hide();
// The actual new connector
@@ -431,7 +431,7 @@ Connector * ICNDocument::createConnector( Node *node, Connector *con, const QPoi
return new1;
}
-Connector * ICNDocument::createConnector( Connector *con1, Connector *con2, const QPoint &pos1, const QPoint &pos2, QPointList *pointList )
+Connector * ICNDocument::createConnector( Connector *con1, Connector *con2, const TQPoint &pos1, const TQPoint &pos2, TQPointList *pointList )
{
if ( !canConnect( con1, con2 ) )
return 0l;
@@ -439,8 +439,8 @@ Connector * ICNDocument::createConnector( Connector *con1, Connector *con2, cons
const bool con1UsedManual = con1->usesManualPoints();
const bool con2UsedManual = con2->usesManualPoints();
- QValueList<QPointList> oldCon1Points = con1->splitConnectorPoints(pos1);
- QValueList<QPointList> oldCon2Points = con2->splitConnectorPoints(pos2);
+ TQValueList<TQPointList> oldCon1Points = con1->splitConnectorPoints(pos1);
+ TQValueList<TQPointList> oldCon2Points = con2->splitConnectorPoints(pos2);
Node *node1a = con1->startNode();
Node *node1b = con1->endNode();
@@ -504,7 +504,7 @@ Connector * ICNDocument::createConnector( Connector *con1, Connector *con2, cons
con2a->setRoutePoints( *oldCon2Points.at(0), con2UsedManual );
con2b->setRoutePoints( *oldCon2Points.at(1), con2UsedManual );
- QPointList autoPoints;
+ TQPointList autoPoints;
if (!pointList)
{
addAllItemConnectorPoints();
@@ -553,7 +553,7 @@ NodeGroup* ICNDocument::createNodeGroup( Node *node )
const GuardedNodeGroupList::iterator end = m_nodeGroupList.end();
for ( GuardedNodeGroupList::iterator it = m_nodeGroupList.begin(); it != end; ++it )
{
- if ( *it && (*it)->contains(node) ) {
+ if ( *it && (*it)->tqcontains(node) ) {
return *it;
}
}
@@ -575,7 +575,7 @@ bool ICNDocument::deleteNodeGroup( Node *node )
const GuardedNodeGroupList::iterator end = m_nodeGroupList.end();
for ( GuardedNodeGroupList::iterator it = m_nodeGroupList.begin(); it != end; ++it )
{
- if ( *it && (*it)->contains(node) )
+ if ( *it && (*it)->tqcontains(node) )
{
delete *it;
m_nodeGroupList.remove(it);
@@ -637,7 +637,7 @@ void ICNDocument::getTranslatable( const ItemList & itemList, ConnectorList * fi
// the number of times an item in the list is connected to
// it - i.e. 1 or 2. For those with 2, it is safe to update their
// route as it simply involves shifting the route
- typedef QMap< Connector*, int > ConnectorMap;
+ typedef TQMap< Connector*, int > ConnectorMap;
ConnectorMap fixedConnectorMap;
// This list of nodes is built up, used for later in determining fixed NodeGroups
@@ -662,7 +662,7 @@ void ICNDocument::getTranslatable( const ItemList & itemList, ConnectorList * fi
const ConnectorList::iterator clEnd = conList.end();
for ( ConnectorList::iterator clit = conList.begin(); clit != clEnd; ++clit )
{
- ConnectorMap::iterator cit = fixedConnectorMap.find(*clit);
+ ConnectorMap::iterator cit = fixedConnectorMap.tqfind(*clit);
if ( cit != fixedConnectorMap.end() ) {
cit.data()++;
} else {
@@ -715,11 +715,11 @@ void ICNDocument::getTranslatable( const ItemList & itemList, ConnectorList * fi
Node *startNode = it.key()->endNode();
Node *endNode = it.key()->startNode();
if ( (it.data() > 1) ||
- (startNode && endNode && startNode->parentItem() == endNode->parentItem()) )
+ (startNode && endNode && startNode->tqparentItem() == endNode->tqparentItem()) )
{
translatableConnectors->append( const_cast<Connector*>(it.key()) );
}
- else if ( !fixedNGConnectors.contains(it.key()) && !fixedConnectors->contains(it.key()) )
+ else if ( !fixedNGConnectors.tqcontains(it.key()) && !fixedConnectors->tqcontains(it.key()) )
{
fixedConnectors->append(it.key());
}
@@ -738,8 +738,8 @@ void ICNDocument::addCPenalty( int x, int y, int score )
void ICNDocument::createCellMap()
{
- unsigned newCellsX = QMAX( canvas()->width()/cellSize, 1 );
- unsigned newCellsY = QMAX( canvas()->height()/cellSize, 1 );
+ unsigned newCellsX = TQMAX( canvas()->width()/cellSize, 1 );
+ unsigned newCellsY = TQMAX( canvas()->height()/cellSize, 1 );
if ( m_cells && newCellsX == m_cellsX && newCellsY == m_cellsY )
return;
@@ -773,15 +773,15 @@ int ICNDocument::gridSnap( int pos )
// return int((floor(pos/8))*8)+4;
}
-QPoint ICNDocument::gridSnap( const QPoint &pos )
+TQPoint ICNDocument::gridSnap( const TQPoint &pos )
{
- return QPoint( gridSnap( pos.x() ), gridSnap( pos.y() ) );
+ return TQPoint( gridSnap( pos.x() ), gridSnap( pos.y() ) );
}
-void ICNDocument::appendDeleteList( QCanvasItem *qcanvasItem )
+void ICNDocument::appendDeleteList( TQCanvasItem *qcanvasItem )
{
- if ( !qcanvasItem || m_itemDeleteList.findIndex(qcanvasItem) != -1 ) {
+ if ( !qcanvasItem || m_itemDeleteList.tqfindIndex(qcanvasItem) != -1 ) {
return;
}
@@ -803,32 +803,32 @@ void ICNDocument::appendDeleteList( QCanvasItem *qcanvasItem )
{
Connector *connector = dynamic_cast<Connector*>(qcanvasItem);
if (!connector)
- connector = (dynamic_cast<ConnectorLine*>(qcanvasItem))->parent();
+ connector = (dynamic_cast<ConnectorLine*>(qcanvasItem))->tqparent();
connector->removeConnector();
}
else
{
- kdDebug() << k_funcinfo << "unrecognised QCanvasItem rtti " << QString::number(qcanvasItem->rtti()) << endl;
+ kdDebug() << k_funcinfo << "unrecognised TQCanvasItem rtti " << TQString::number(qcanvasItem->rtti()) << endl;
}
}
void ICNDocument::flushDeleteList()
{
// Remove duplicate items in the delete list
- QCanvasItemList::iterator end = m_itemDeleteList.end();
- for ( QCanvasItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
+ TQCanvasItemList::iterator end = m_itemDeleteList.end();
+ for ( TQCanvasItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
{
- if ( *it && m_itemDeleteList.contains(*it) > 1 ) {
+ if ( *it && m_itemDeleteList.tqcontains(*it) > 1 ) {
*it = 0l;
}
}
m_itemDeleteList.remove(0l);
end = m_itemDeleteList.end();
- for ( QCanvasItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
+ for ( TQCanvasItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
{
- QCanvasItem *qcanvasItem = *it;
- m_selectList->removeQCanvasItem(*it);
+ TQCanvasItem *qcanvasItem = *it;
+ m_selectList->removeTQCanvasItem(*it);
if ( Item *item = dynamic_cast<Item*>(qcanvasItem) )
m_itemList.remove(item);
@@ -855,7 +855,7 @@ void ICNDocument::flushDeleteList()
{
(*it)->removeNullConnectors();
int conCount = (*it)->inputConnectorList().count() + (*it)->outputConnectorList().count();
- if ( conCount == 2 && !(*it)->parentItem() )
+ if ( conCount == 2 && !(*it)->tqparentItem() )
{
if ( joinConnectors(*it) )
doneJoin = true;
@@ -872,8 +872,8 @@ void ICNDocument::flushDeleteList()
bool ICNDocument::joinConnectors( Node *node )
{
- // We don't want to destroy the node if it has a parent
- if ( node->parentItem() )
+ // We don't want to destroy the node if it has a tqparent
+ if ( node->tqparentItem() )
return false;
node->removeNullConnectors();
@@ -884,7 +884,7 @@ bool ICNDocument::joinConnectors( Node *node )
Connector *con1, *con2;
Node *startNode, *endNode;
- QPointList conPoints;
+ TQPointList conPoints;
if ( node->inputConnectorList().count() == 0 )
@@ -950,7 +950,7 @@ bool ICNDocument::joinConnectors( Node *node )
}
-bool ICNDocument::registerItem( QCanvasItem *qcanvasItem )
+bool ICNDocument::registerItem( TQCanvasItem *qcanvasItem )
{
if (!qcanvasItem)
return false;
@@ -963,7 +963,7 @@ bool ICNDocument::registerItem( QCanvasItem *qcanvasItem )
{
Node *node = (Node*)qcanvasItem;
m_nodeList.append(node);
- connect( node, SIGNAL(removed(Node*)), this, SLOT(requestRerouteInvalidatedConnectors()) );
+ connect( node, TQT_SIGNAL(removed(Node*)), this, TQT_SLOT(requestRerouteInvalidatedConnectors()) );
emit nodeAdded(node);
break;
}
@@ -971,7 +971,7 @@ bool ICNDocument::registerItem( QCanvasItem *qcanvasItem )
{
Connector *connector = dynamic_cast<Connector*>(qcanvasItem);
m_connectorList.append(connector);
- connect( connector, SIGNAL(removed(Connector*)), this, SLOT(requestRerouteInvalidatedConnectors()) );
+ connect( connector, TQT_SIGNAL(removed(Connector*)), this, TQT_SLOT(requestRerouteInvalidatedConnectors()) );
emit connectorAdded(connector);
break;
}
@@ -999,7 +999,7 @@ void ICNDocument::copy()
// We only want to copy the connectors who have all ends attached to something in the selection
ConnectorList connectorList = m_selectList->connectors(false);
- typedef QMap< Node*, ConnectorList > NCLMap;
+ typedef TQMap< Node*, ConnectorList > NCLMap;
NCLMap nclMap;
ConnectorList::iterator end = connectorList.end();
@@ -1030,7 +1030,7 @@ void ICNDocument::copy()
data.addNodes( nodeList );
data.addConnectors( connectorList );
- KApplication::clipboard()->setText( data.toXML(), QClipboard::Clipboard );
+ KApplication::tqclipboard()->setText( data.toXML(), TQClipboard::Clipboard );
}
void ICNDocument::selectAll()
@@ -1056,7 +1056,7 @@ void ICNDocument::selectAll()
}
-Item* ICNDocument::addItem( const QString &id, const QPoint &p, bool newItem )
+Item* ICNDocument::addItem( const TQString &id, const TQPoint &p, bool newItem )
{
if ( !isValidItem(id) ) {
return 0l;
@@ -1070,7 +1070,7 @@ Item* ICNDocument::addItem( const QString &id, const QPoint &p, bool newItem )
if ( FlowContainer *flowContainer = dynamic_cast<FlowContainer*>((Item*)(*it)) )
flowContainer->setFullBounds(true);
}
- QCanvasItemList preCollisions = canvas()->collisions(p);
+ TQCanvasItemList preCollisions = canvas()->collisions(p);
for ( ItemList::iterator it = m_itemList.begin(); it != end; ++it )
{
if ( FlowContainer *flowContainer = dynamic_cast<FlowContainer*>((Item*)(*it)) )
@@ -1084,8 +1084,8 @@ Item* ICNDocument::addItem( const QString &id, const QPoint &p, bool newItem )
// Look through the CNItems at the given point (sorted by z-coordinate) for
// a container item.
FlowContainer *container = 0l;
- const QCanvasItemList::iterator pcEnd = preCollisions.end();
- for ( QCanvasItemList::iterator it = preCollisions.begin(); it != pcEnd && !container; ++it )
+ const TQCanvasItemList::iterator pcEnd = preCollisions.end();
+ for ( TQCanvasItemList::iterator it = preCollisions.begin(); it != pcEnd && !container; ++it )
{
if ( FlowContainer *flowContainer = dynamic_cast<FlowContainer*>(*it) )
container = flowContainer;
@@ -1142,7 +1142,7 @@ void ICNDocument::requestRerouteInvalidatedConnectors()
}
void ICNDocument::rerouteInvalidatedConnectors()
{
- qApp->processEvents(300);
+ tqApp->tqprocessEvents(300);
// We only ever need to add the connector points for CNItem's when we're about to reroute...
addAllItemConnectorPoints();
@@ -1163,17 +1163,17 @@ void ICNDocument::rerouteInvalidatedConnectors()
bool needsRerouting = false;
// Test to see if we actually have any points
- const QPointList pointList = connector->connectorPoints();
+ const TQPointList pointList = connector->connectorPoints();
if ( pointList.isEmpty() )
needsRerouting = true;
// Test to see if the route doesn't match up with the node positions at either end
if (!needsRerouting)
{
- const QPoint listStart = pointList.first();
- const QPoint listEnd = pointList.last();
- const QPoint nodeStart = QPoint( int(connector->startNode()->x()), int(connector->startNode()->y()) );
- const QPoint nodeEnd = QPoint( int(connector->endNode()->x()), int(connector->endNode()->y()) );
+ const TQPoint listStart = pointList.first();
+ const TQPoint listEnd = pointList.last();
+ const TQPoint nodeStart = TQPoint( int(connector->startNode()->x()), int(connector->startNode()->y()) );
+ const TQPoint nodeEnd = TQPoint( int(connector->endNode()->x()), int(connector->endNode()->y()) );
if ( ((listStart != nodeStart) || (listEnd != nodeEnd)) &&
((listStart != nodeEnd) || (listEnd != nodeStart)) )
@@ -1186,9 +1186,9 @@ void ICNDocument::rerouteInvalidatedConnectors()
// Test to see if the route intersects any Items (we ignore if it is a manual route)
if ( !needsRerouting && !connector->usesManualPoints() )
{
- const QCanvasItemList collisions = connector->collisions(true);
- const QCanvasItemList::const_iterator collisionsEnd = collisions.end();
- for ( QCanvasItemList::const_iterator collisionsIt = collisions.begin(); (collisionsIt != collisionsEnd) && !needsRerouting; ++collisionsIt )
+ const TQCanvasItemList collisions = connector->collisions(true);
+ const TQCanvasItemList::const_iterator collisionsEnd = collisions.end();
+ for ( TQCanvasItemList::const_iterator collisionsIt = collisions.begin(); (collisionsIt != collisionsEnd) && !needsRerouting; ++collisionsIt )
{
if ( dynamic_cast<Item*>(*collisionsIt) )
needsRerouting = true;
@@ -1199,16 +1199,16 @@ void ICNDocument::rerouteInvalidatedConnectors()
{
NodeGroup *nodeGroup = connector->nodeGroup();
- if ( !nodeGroup && !connectorRerouteList.contains(connector) )
+ if ( !nodeGroup && !connectorRerouteList.tqcontains(connector) )
connectorRerouteList.append(connector);
- else if ( nodeGroup && !nodeGroupRerouteList.contains(nodeGroup) )
+ else if ( nodeGroup && !nodeGroupRerouteList.tqcontains(nodeGroup) )
nodeGroupRerouteList.append(nodeGroup);
}
}
}
- // To allow proper rerouting, we want to start with clean routes for all of the invalidated connectors
+ // To allow proper rerouting, we want to start with clean routes for all of the tqinvalidated connectors
const NodeGroupList::iterator nodeGroupRerouteEnd = nodeGroupRerouteList.end();
for ( NodeGroupList::iterator it = nodeGroupRerouteList.begin(); it != nodeGroupRerouteEnd; ++it )
{
@@ -1237,7 +1237,7 @@ void ICNDocument::rerouteInvalidatedConnectors()
}
-Connector* ICNDocument::createConnector( const QString &startNodeId, const QString &endNodeId, QPointList *pointList )
+Connector* ICNDocument::createConnector( const TQString &startNodeId, const TQString &endNodeId, TQPointList *pointList )
{
Node *startNode = nodeWithID(startNodeId);
Node *endNode = nodeWithID(endNodeId);
@@ -1303,7 +1303,7 @@ ConnectorList ICNDocument::getCommonConnectors( const ItemList &list )
for ( ConnectorList::iterator it = connectorList.begin(); it != connectorListEnd; ++it )
{
Connector *con = *it;
- if ( !con || !nodeList.contains(con->startNode()) || !nodeList.contains(con->endNode()) ) {
+ if ( !con || !nodeList.tqcontains(con->startNode()) || !nodeList.tqcontains(con->endNode()) ) {
*it = 0l;
}
}
@@ -1328,7 +1328,7 @@ NodeList ICNDocument::getCommonNodes( const ItemList &list )
{
Node *node = it.data().node;
- if ( !nodeList.contains(node) ) {
+ if ( !nodeList.tqcontains(node) ) {
nodeList += node;
}
@@ -1340,7 +1340,7 @@ NodeList ICNDocument::getCommonNodes( const ItemList &list )
for ( NodeList::iterator it = intNodeList.begin(); it != intNodeListEnd; ++it )
{
Node *intNode = *it;
- if ( !nodeList.contains(intNode) ) {
+ if ( !nodeList.tqcontains(intNode) ) {
nodeList += intNode;
}
}
@@ -1372,11 +1372,11 @@ DirCursor* DirCursor::self()
void DirCursor::initCursors()
{
-// QCursor c(Qt::ArrowCursor);
-// QBitmap bitmap = *c.bitmap();
-// QBitmap mask = *c.mask();
-// QPixmap pm( bitmap->width(), bitmap->height() );
-// pm.setMask(mask);
+// TQCursor c(TQt::ArrowCursor);
+// TQBitmap bitmap = *c.bitmap();
+// TQBitmap tqmask = *c.tqmask();
+// TQPixmap pm( bitmap->width(), bitmap->height() );
+// pm.setMask(tqmask);
// pm = c.pi
// @todo finish
}
diff --git a/src/icndocument.h b/src/icndocument.h
index 7a5b126..c463bb1 100644
--- a/src/icndocument.h
+++ b/src/icndocument.h
@@ -23,10 +23,10 @@ class FlowContainer;
class Node;
class NodeGroup;
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
-typedef QValueList<QGuardedPtr<Node> > NodeList;
-typedef QValueList<NodeGroup*> NodeGroupList;
-typedef QValueList<QGuardedPtr<NodeGroup> > GuardedNodeGroupList;
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<TQGuardedPtr<Node> > NodeList;
+typedef TQValueList<NodeGroup*> NodeGroupList;
+typedef TQValueList<TQGuardedPtr<NodeGroup> > GuardedNodeGroupList;
/**
@author David Saxton
@@ -34,8 +34,9 @@ typedef QValueList<QGuardedPtr<NodeGroup> > GuardedNodeGroupList;
class ICNDocument : public ItemDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- ICNDocument( const QString &caption, KTechlab *ktechlab, const char *name );
+ ICNDocument( const TQString &caption, KTechlab *ktechlab, const char *name );
virtual ~ICNDocument();
enum hit_score
@@ -52,47 +53,47 @@ public:
* (such as PIC/START) have restrictions, and can only have one instance of
* themselves on the canvas, and adds the operation to the undo list
*/
- virtual Item* addItem( const QString &id, const QPoint &p, bool newItem );
+ virtual Item* addItem( const TQString &id, const TQPoint &p, bool newItem );
/**
* Creates a connector between two nodes, and returns a pointer to it
* and adds the operation to the undo list
*/
- Connector* createConnector( const QString &startNodeId, const QString &endNodeId, QPointList *pointList = 0L );
+ Connector* createConnector( const TQString &startNodeId, const TQString &endNodeId, TQPointList *pointList = 0L );
/**
* short for casting whatever itemWithID(id) returns
*/
- CNItem* cnItemWithID( const QString &id );
+ CNItem* cnItemWithID( const TQString &id );
/**
* Returns a pointer to a node on the canvas with the given id,
* or NULL if no such node exists
*/
- Node* nodeWithID( const QString &id );
+ Node* nodeWithID( const TQString &id );
/**
* Returns a pointer to a Connector on the canvas with the given id,
* or NULL if no such Connector exists
*/
- Connector* connectorWithID( const QString &id );
+ Connector* connectorWithID( const TQString &id );
/**
- * Adds a QCanvasItem to the delete list to be deleted,
+ * Adds a TQCanvasItem to the delete list to be deleted,
* when flushDeleteList() is called
*/
- virtual void appendDeleteList( QCanvasItem *qcanvasItem );
+ virtual void appendDeleteList( TQCanvasItem *qcanvasItem );
/**
* Permantly deletes all items that have been added to the delete list with
- * the appendDeleteList( QCanvasItem *qcanvasItem ) function.
+ * the appendDeleteList( TQCanvasItem *qcanvasItem ) function.
*/
virtual void flushDeleteList();
/**
* Reinherit this function to perform special checks on whether the two
- * given QCanvasItems (either nodes or connectors or both) can be
+ * given TQCanvasItems (either nodes or connectors or both) can be
* connected together.
*/
- virtual bool canConnect( QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasItem2 ) const;
+ virtual bool canConnect( TQCanvasItem *qcanvasItem1, TQCanvasItem *qcanvasItem2 ) const;
virtual void copy();
virtual void selectAll();
- virtual bool registerItem( QCanvasItem *qcanvasItem );
+ virtual bool registerItem( TQCanvasItem *qcanvasItem );
/**
* Returns a pointer to the 2-dimension array of ICNDocument cells.
*/
@@ -118,13 +119,13 @@ public:
*/
bool joinConnectors( Node *node );
static int gridSnap( int pos ); /// Returns 'pos' when snapped to grid
- static QPoint gridSnap( const QPoint &pos );
+ static TQPoint gridSnap( const TQPoint &pos );
/**
* Returns true if the CNItem is valid - e.g. will return true for a
* component in a circuit, but not in a pic program
*/
virtual bool isValidItem( Item *item ) = 0;
- virtual bool isValidItem( const QString &itemId ) = 0;
+ virtual bool isValidItem( const TQString &itemId ) = 0;
ConnectorList getCommonConnectors( const ItemList &list );
NodeList getCommonNodes( const ItemList &list );
const NodeList & nodeList() const { return m_nodeList; }
@@ -135,24 +136,24 @@ public:
* Creates a connector from node1 to node2. If pointList is non-null, then the
* connector will be assigned those points
*/
- Connector * createConnector( Node *node1, Node *node2, QPointList *pointList = 0L );
+ Connector * createConnector( Node *node1, Node *node2, TQPointList *pointList = 0L );
/**
* Splits Connector con into two connectors at point pos2, and creates a connector from the node
* to the intersection of the two new connectors. If pointList is non-null, then the new connector
* from the node will be assigned those points
*/
- Connector * createConnector( Node *node, Connector *con, const QPoint &pos2, QPointList *pointList = 0L );
+ Connector * createConnector( Node *node, Connector *con, const TQPoint &pos2, TQPointList *pointList = 0L );
/**
* Splits con1 and con2 into two new connectors each at points pos1 and pos2, and creates a new connector
* between the two points of intersection given by pos1 and pos2. If pointList is non-null, then the new
* connector between the two points will be assigned those points
*/
- Connector * createConnector( Connector *con1, Connector *con2, const QPoint &pos1, const QPoint &pos2, QPointList *pointList = 0L );
+ Connector * createConnector( Connector *con1, Connector *con2, const TQPoint &pos1, const TQPoint &pos2, TQPointList *pointList = 0L );
/**
* Returns the flowcontainer at the given position at the highest level that
* is not in the current select list, or 0l if there isn't one
*/
- FlowContainer *flowContainer( const QPoint &pos );
+ FlowContainer *flowContainer( const TQPoint &pos );
/**
* Sets the drag (e.g. horizontal arrow) cursor for resizing a CNItem, depending on the corner clicked on
*/
@@ -160,7 +161,7 @@ public:
void getTranslatable( const ItemList & itemList, ConnectorList * fixedConnectors = 0l, ConnectorList * translatableConnectors = 0l, NodeGroupList * translatableNodeGroups = 0l );
/**
- * Reroutes invalidated directors. You shouldn't call this function
+ * Reroutes tqinvalidated directors. You shouldn't call this function
* directly - instead use ItemDocument::requestEvent.
*/
void rerouteInvalidatedConnectors();
@@ -208,7 +209,7 @@ protected:
* This only needs to be called when connector(s) need routing.
*/
void addAllItemConnectorPoints();
- virtual void fillContextMenu( const QPoint &pos );
+ virtual void fillContextMenu( const TQPoint &pos );
/**
* Creates a new NodeGroup to control the node, if there does not already
* exist a NodeGroup containing the given node. The associated nodes will
@@ -232,7 +233,7 @@ protected:
GuardedNodeGroupList m_nodeGroupList;
private:
- QCanvasItemList m_itemDeleteList; // List of canvas items to be deleted
+ TQCanvasItemList m_itemDeleteList; // List of canvas items to be deleted
};
@@ -245,22 +246,22 @@ public:
static DirCursor* self();
~DirCursor();
- static QPixmap leftArrow()
+ static TQPixmap leftArrow()
{
return self()->m_leftArrow;
}
- static QPixmap rightArrow()
+ static TQPixmap rightArrow()
{
return self()->m_rightArrow;
}
- static QPixmap upArrow()
+ static TQPixmap upArrow()
{
return self()->m_upArrow;
}
- static QPixmap downArrow()
+ static TQPixmap downArrow()
{
return self()->m_downArrow;
}
@@ -270,10 +271,10 @@ protected:
void initCursors();
static DirCursor *m_self;
- QPixmap m_leftArrow;
- QPixmap m_rightArrow;
- QPixmap m_upArrow;
- QPixmap m_downArrow;
+ TQPixmap m_leftArrow;
+ TQPixmap m_rightArrow;
+ TQPixmap m_upArrow;
+ TQPixmap m_downArrow;
};
diff --git a/src/icnview.cpp b/src/icnview.cpp
index cff8a2c..d7a026c 100644
--- a/src/icnview.cpp
+++ b/src/icnview.cpp
@@ -28,12 +28,12 @@ ICNView::ICNView( ICNDocument *icnDocument, ViewContainer *viewContainer, uint v
//BEGIN Routing Actions
// These actions get inserted into the main menu
- m_pAutoRoutingAction = new KRadioAction( i18n("Automatic"), "", 0, this, SLOT(slotSetRoutingAuto()), ac, "routing_mode_auto" );
+ m_pAutoRoutingAction = new KRadioAction( i18n("Automatic"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetRoutingAuto()), ac, "routing_mode_auto" );
m_pAutoRoutingAction->setExclusiveGroup("routing_mode");
if ( !manualRouting )
m_pAutoRoutingAction->setChecked( true );
- m_pManualRoutingAction = new KRadioAction( i18n("Manual"), "", 0, this, SLOT(slotSetRoutingManual()), ac, "routing_mode_manual" );
+ m_pManualRoutingAction = new KRadioAction( i18n("Manual"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetRoutingManual()), ac, "routing_mode_manual" );
m_pManualRoutingAction->setExclusiveGroup("routing_mode");
if ( manualRouting )
m_pManualRoutingAction->setChecked( true );
@@ -52,10 +52,10 @@ ICNView::ICNView( ICNDocument *icnDocument, ViewContainer *viewContainer, uint v
m->setCheckable(true);
m->setItemChecked( manualRouting ? 1 : 0, true );
- connect( m, SIGNAL(activated(int)), this, SLOT(slotSetRoutingMode(int)) );
+ connect( m, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetRoutingMode(int)) );
//END Routing Actions
- connect( icnDocument->m_cmManager, SIGNAL(manualRoutingChanged(bool )), this, SLOT(slotUpdateRoutingToggles(bool )) );
+ connect( icnDocument->m_cmManager, TQT_SIGNAL(manualRoutingChanged(bool )), this, TQT_SLOT(slotUpdateRoutingToggles(bool )) );
}
diff --git a/src/icnview.h b/src/icnview.h
index 4f4d0bc..e9792a6 100644
--- a/src/icnview.h
+++ b/src/icnview.h
@@ -23,6 +23,7 @@ class KToolBarPopupAction;
class ICNView : public ItemView
{
Q_OBJECT
+ TQ_OBJECT
public:
ICNView( ICNDocument * icnDocument, ViewContainer *viewContainer, uint viewAreaId, const char * name = 0l );
~ICNView();
diff --git a/src/item.cpp b/src/item.cpp
index 1cbf7e3..e5f7466 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -16,18 +16,18 @@
#include <kdebug.h>
#include <kdialogbase.h>
#include <ktextedit.h>
-#include <qbitarray.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqbitarray.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
const int minPrefixExp = -24;
const int maxPrefixExp = 24;
const int numPrefix = int((maxPrefixExp-minPrefixExp)/3)+1;
-const QString SIprefix[] = {"y","z","a","f","p","n",QChar(0xB5),"m","","k","M","G","T","P","E","Z","Y"};
+const TQString SIprefix[] = {"y","z","a","f","p","n",TQChar(0xB5),"m","","k","M","G","T","P","E","Z","Y"};
-Item::Item( ItemDocument *itemDocument, bool newItem, const QString &id )
- : QObject(), QCanvasPolygon( itemDocument->canvas() )
+Item::Item( ItemDocument *itemDocument, bool newItem, const TQString &id )
+ : TQObject(), TQCanvasPolygon( itemDocument->canvas() )
{
m_bDynamicContent = false;
m_bIsRaised = false;
@@ -37,7 +37,7 @@ Item::Item( ItemDocument *itemDocument, bool newItem, const QString &id )
p_itemDocument = itemDocument;
m_baseZ = -1;
- if ( QFontInfo(m_font).pixelSize() > 11 ) // It has to be > 11, not > 12, as (I think) pixelSize() rounds off the actual size
+ if ( TQFontInfo(m_font).pixelSize() > 11 ) // It has to be > 11, not > 12, as (I think) pixelSize() rounds off the actual size
m_font.setPixelSize(12);
if (newItem)
@@ -56,7 +56,7 @@ Item::~Item()
p_itemDocument->requestEvent( ItemDocument::ItemDocumentEvent::ResizeCanvasToItems );
p_itemDocument->unregisterUID( id() );
- QCanvasPolygon::hide();
+ TQCanvasPolygon::hide();
const VariantDataMap::iterator variantDataEnd = m_variantData.end();
for ( VariantDataMap::iterator it = m_variantData.begin(); it != variantDataEnd; ++it )
@@ -80,7 +80,7 @@ void Item::removeItem()
void Item::moveBy( double dx, double dy )
{
- QCanvasPolygon::moveBy(dx,dy);
+ TQCanvasPolygon::moveBy(dx,dy);
emit movedBy( dx, dy );
}
@@ -95,7 +95,7 @@ void Item::setChanged()
}
-void Item::setItemPoints( const QPointArray & pa, bool setSizeFromPoints )
+void Item::setItemPoints( const TQPointArray & pa, bool setSizeFromPoints )
{
m_itemPoints = pa;
if (setSizeFromPoints)
@@ -110,7 +110,7 @@ void Item::itemPointsChanged()
}
-void Item::setSize( QRect sizeRect, bool forceItemPoints )
+void Item::setSize( TQRect sizeRect, bool forceItemPoints )
{
if ( m_sizeRect == sizeRect && !forceItemPoints )
return;
@@ -122,7 +122,7 @@ void Item::setSize( QRect sizeRect, bool forceItemPoints )
m_sizeRect = sizeRect;
if ( m_itemPoints.isEmpty() || forceItemPoints )
{
- setItemPoints( QPointArray( m_sizeRect ), false );
+ setItemPoints( TQPointArray( m_sizeRect ), false );
}
canvas()->setChanged(areaPoints().boundingRect());
postResize();
@@ -138,14 +138,14 @@ ItemData Item::itemData() const
itemData.x = x();
itemData.y = y();
- if ( !parentItem() )
+ if ( !tqparentItem() )
itemData.z = m_baseZ;
itemData.size = m_sizeRect;
itemData.setSize = canResize();
if (p_parentItem)
- itemData.parentId = p_parentItem->id();
+ itemData.tqparentId = p_parentItem->id();
const VariantDataMap::const_iterator end = m_variantData.end();
for ( VariantDataMap::const_iterator it = m_variantData.begin(); it != end; ++it )
@@ -212,15 +212,15 @@ void Item::restoreFromItemData( const ItemData &itemData )
if ( canResize() )
setSize( itemData.size );
- Item *parentItem = p_itemDocument->itemWithID( itemData.parentId );
- if (parentItem)
- setParentItem(parentItem);
+ Item *tqparentItem = p_itemDocument->itemWithID( itemData.tqparentId );
+ if (tqparentItem)
+ setParentItem(tqparentItem);
else
m_baseZ = itemData.z;
//BEGIN Restore data
- const QStringMap::const_iterator stringEnd = itemData.dataString.end();
- for ( QStringMap::const_iterator it = itemData.dataString.begin(); it != stringEnd; ++it )
+ const TQStringMap::const_iterator stringEnd = itemData.dataString.end();
+ for ( TQStringMap::const_iterator it = itemData.dataString.begin(); it != stringEnd; ++it )
{
if ( hasProperty(it.key()) )
property( it.key() )->setValue( it.data() );
@@ -233,8 +233,8 @@ void Item::restoreFromItemData( const ItemData &itemData )
property( it.key() )->setValue( it.data() );
}
- const QColorMap::const_iterator colorEnd = itemData.dataColor.end();
- for ( QColorMap::const_iterator it = itemData.dataColor.begin(); it != colorEnd; ++it )
+ const TQColorMap::const_iterator colorEnd = itemData.dataColor.end();
+ for ( TQColorMap::const_iterator it = itemData.dataColor.begin(); it != colorEnd; ++it )
{
if ( hasProperty(it.key()) )
property( it.key() )->setValue( it.data() );
@@ -244,11 +244,11 @@ void Item::restoreFromItemData( const ItemData &itemData )
for ( BoolMap::const_iterator it = itemData.dataBool.begin(); it != boolEnd; ++it )
{
if ( hasProperty(it.key()) )
- property( it.key() )->setValue( QVariant( it.data(), 0 ) );
+ property( it.key() )->setValue( TQVariant( it.data(), 0 ) );
}
- const QBitArrayMap::const_iterator rawEnd = itemData.dataRaw.end();
- for ( QBitArrayMap::const_iterator it = itemData.dataRaw.begin(); it != rawEnd; ++it )
+ const TQBitArrayMap::const_iterator rawEnd = itemData.dataRaw.end();
+ for ( TQBitArrayMap::const_iterator it = itemData.dataRaw.begin(); it != rawEnd; ++it )
{
if ( hasProperty(it.key()) )
property( it.key() )->setValue( it.data() );
@@ -288,7 +288,7 @@ bool Item::mouseDoubleClickEvent( const EventInfo &eventInfo )
{
Q_UNUSED(eventInfo);
- typedef QValueList<Variant*> VarPtrLst;
+ typedef TQValueList<Variant*> VarPtrLst;
VarPtrLst list;
const VariantDataMap::iterator variantDataEnd = m_variantData.end();
for ( VariantDataMap::iterator it = m_variantData.begin(); it != variantDataEnd; ++it )
@@ -309,17 +309,17 @@ bool Item::mouseDoubleClickEvent( const EventInfo &eventInfo )
/// @todo Replace this with KInputDialog::getMultiLineText for KDE 3.3
// bool ok;
-// QString text = KInputDialog::getMultiLineText( v->caption(), "", v->getValue(), ok );
+// TQString text = KInputDialog::getMultiLineText( v->caption(), "", v->getValue(), ok );
KDialogBase *dlg = new KDialogBase( 0l, "", true, v->editorCaption(), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Ok, false, KStdGuiItem::clear() );
- QFrame *frame = dlg->makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, dlg->spacingHint() );
+ TQFrame *frame = dlg->makeMainWidget();
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( frame, 0, dlg->spacingHint() );
KTextEdit *textEdit = new KTextEdit( frame );
textEdit->setTextFormat( PlainText );
textEdit->setText( v->value().toString() );
- layout->addWidget( textEdit, 10 );
+ tqlayout->addWidget( textEdit, 10 );
textEdit->setFocus();
- connect( dlg, SIGNAL( user1Clicked() ), textEdit, SLOT( clear() ) );
+ connect( dlg, TQT_SIGNAL( user1Clicked() ), textEdit, TQT_SLOT( clear() ) );
dlg->setMinimumWidth( 600 );
if ( dlg->exec() == KDialogBase::Accepted )
{
@@ -338,7 +338,7 @@ void Item::setSelected( bool yes )
if ( isSelected() == yes ) {
return;
}
- QCanvasPolygon::setSelected(yes);
+ TQCanvasPolygon::setSelected(yes);
yes ? (emit selected(this)) : (emit unselected(this));
}
@@ -353,17 +353,17 @@ void Item::setParentItem( Item *newParentItem )
if (oldParentItem)
{
- disconnect( oldParentItem, SIGNAL(removed(Item*)), this, SLOT(removeItem()) );
+ disconnect( oldParentItem, TQT_SIGNAL(removed(Item*)), this, TQT_SLOT(removeItem()) );
oldParentItem->removeChild(this);
}
if (newParentItem)
{
- if ( newParentItem->contains(this) );
+ if ( newParentItem->tqcontains(this) );
// kdError() << k_funcinfo << "Already a child of " << newParentItem << endl;
else
{
- connect( newParentItem, SIGNAL(removed(Item*)), this, SLOT(removeItem()) );
+ connect( newParentItem, TQT_SIGNAL(removed(Item*)), this, TQT_SLOT(removeItem()) );
newParentItem->addChild(this);
}
}
@@ -381,22 +381,22 @@ int Item::level() const
}
-ItemList Item::children( bool includeGrandChildren ) const
+ItemList Item::tqchildren( bool includeGrandChildren ) const
{
if (!includeGrandChildren)
- return m_children;
+ return m_tqchildren;
- ItemList children = m_children;
- ItemList::const_iterator end = m_children.end();
- for ( ItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ ItemList tqchildren = m_tqchildren;
+ ItemList::const_iterator end = m_tqchildren.end();
+ for ( ItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
{
if (!*it)
continue;
- children += (*it)->children(true);
+ tqchildren += (*it)->tqchildren(true);
}
- return children;
+ return tqchildren;
}
@@ -405,20 +405,20 @@ void Item::addChild( Item *child )
if ( !child )
return;
- if ( child->contains(this) )
+ if ( child->tqcontains(this) )
{
-// kdError() << k_funcinfo << "Attempting to add a child to this item that is already a parent of this item. Incest results in stack overflow." << endl;
+// kdError() << k_funcinfo << "Attempting to add a child to this item that is already a tqparent of this item. Incest results in stack overflow." << endl;
return;
}
- if ( contains( child, true ) )
+ if ( tqcontains( child, true ) )
{
// kdError() << k_funcinfo << "Already have child " << child << endl;
return;
}
- m_children.append(child);
- connect( child, SIGNAL(removed(Item* )), this, SLOT(removeChild(Item* )) );
+ m_tqchildren.append(child);
+ connect( child, TQT_SIGNAL(removed(Item* )), this, TQT_SLOT(removeChild(Item* )) );
child->setParentItem(this);
childAdded(child);
@@ -428,23 +428,23 @@ void Item::addChild( Item *child )
void Item::removeChild( Item *child )
{
- if ( !child || !m_children.contains(child) )
+ if ( !child || !m_tqchildren.tqcontains(child) )
return;
- m_children.remove(child);
- disconnect( child, SIGNAL(removed(Item* )), this, SLOT(removeChild(Item* )) );
+ m_tqchildren.remove(child);
+ disconnect( child, TQT_SIGNAL(removed(Item* )), this, TQT_SLOT(removeChild(Item* )) );
childRemoved(child);
p_itemDocument->slotUpdateZOrdering();
}
-bool Item::contains( Item *item, bool direct ) const
+bool Item::tqcontains( Item *item, bool direct ) const
{
- const ItemList::const_iterator end = m_children.end();
- for ( ItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ const ItemList::const_iterator end = m_tqchildren.end();
+ for ( ItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
{
- if ( (Item*)*it == item || ( !direct && (*it)->contains( item, false ) ) )
+ if ( (Item*)*it == item || ( !direct && (*it)->tqcontains( item, false ) ) )
return true;
}
return false;
@@ -468,8 +468,8 @@ void Item::updateZ( int baseZ )
setZ(z);
- const ItemList::const_iterator end = m_children.end();
- for ( ItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ const ItemList::const_iterator end = m_tqchildren.end();
+ for ( ItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
{
if (*it)
(*it)->updateZ(baseZ+1);
@@ -482,7 +482,7 @@ int Item::getNumberPre( double num )
return (int)(num/getMultiplier(num));
}
-QString Item::getNumberMag( double num )
+TQString Item::getNumberMag( double num )
{
if ( num == 0. ) return "";
const double exp_n = std::log10(std::abs(num));
@@ -497,12 +497,12 @@ double Item::getMultiplier( double num )
else return std::pow( 10, 3*std::floor(std::log10(std::abs(num))/3) );
}
-double Item::getMultiplier( const QString &_mag )
+double Item::getMultiplier( const TQString &_mag )
{
- QString mag;
+ TQString mag;
// Allow the user to enter in "u" instead of mu, as unfortunately many keyboards don't have the mu key
if ( _mag == "u" )
- mag = QChar(0xB5);
+ mag = TQChar(0xB5);
else
mag = _mag;
@@ -522,57 +522,57 @@ double Item::getMultiplier( const QString &_mag )
//BEGIN Data stuff
-double Item::dataDouble( const QString & id ) const
+double Item::dataDouble( const TQString & id ) const
{
Variant * variant = property(id);
return variant ? variant->value().toDouble() : 0.0;
}
-int Item::dataInt( const QString & id ) const
+int Item::dataInt( const TQString & id ) const
{
Variant * variant = property(id);
return variant ? variant->value().toInt() : 0;
}
-bool Item::dataBool( const QString & id ) const
+bool Item::dataBool( const TQString & id ) const
{
Variant * variant = property(id);
return variant ? variant->value().toBool() : false;
}
-QString Item::dataString( const QString & id ) const
+TQString Item::dataString( const TQString & id ) const
{
Variant * variant = property(id);
- return variant ? variant->value().toString() : QString::null;
+ return variant ? variant->value().toString() : TQString();
}
-QColor Item::dataColor( const QString & id ) const
+TQColor Item::dataColor( const TQString & id ) const
{
Variant * variant = property(id);
- return variant ? variant->value().toColor() : Qt::black;
+ return variant ? variant->value().toColor() : TQt::black;
}
-Variant * Item::createProperty( const QString & id, Variant::Type::Value type )
+Variant * Item::createProperty( const TQString & id, Variant::Type::Value type )
{
- if ( !m_variantData.contains(id) )
+ if ( !m_variantData.tqcontains(id) )
{
m_variantData[id] = new Variant(type);
if (m_bDoneCreation)
- connect( m_variantData[id], SIGNAL(valueChanged(QVariant,QVariant)), this, SLOT(dataChanged()) );
+ connect( m_variantData[id], TQT_SIGNAL(valueChanged(TQVariant,TQVariant)), this, TQT_SLOT(dataChanged()) );
}
return m_variantData[id];
}
-Variant * Item::property( const QString & id ) const
+Variant * Item::property( const TQString & id ) const
{
- if ( m_variantData.contains(id) )
+ if ( m_variantData.tqcontains(id) )
return m_variantData[id];
kdError() << k_funcinfo << " No such property with id " << id << endl;
@@ -580,9 +580,9 @@ Variant * Item::property( const QString & id ) const
}
-bool Item::hasProperty( const QString & id ) const
+bool Item::hasProperty( const TQString & id ) const
{
- return m_variantData.contains(id);
+ return m_variantData.tqcontains(id);
}
@@ -591,7 +591,7 @@ void Item::finishedCreation( )
m_bDoneCreation = true;
const VariantDataMap::iterator end = m_variantData.end();
for ( VariantDataMap::iterator it = m_variantData.begin(); it != end; ++it )
- connect( it.data(), SIGNAL(valueChanged(QVariant,QVariant)), this, SLOT(dataChanged()) );
+ connect( it.data(), TQT_SIGNAL(valueChanged(TQVariant,TQVariant)), this, TQT_SLOT(dataChanged()) );
dataChanged();
}
//END Data stuff
diff --git a/src/item.h b/src/item.h
index f1968d2..7f65c7a 100644
--- a/src/item.h
+++ b/src/item.h
@@ -13,9 +13,9 @@
#include "variant.h"
-#include <qcanvas.h>
-#include <qfont.h>
-#include <qguardedptr.h>
+#include <tqcanvas.h>
+#include <tqfont.h>
+#include <tqguardedptr.h>
class Document;
@@ -27,22 +27,23 @@ class ItemView;
class DoubleSpinBox;
class Document;
class Variant;
-class QBitArray;
+class TQBitArray;
typedef Item*(*createItemPtr)( ItemDocument *itemDocument, bool newItem, const char *id );
-typedef QGuardedPtr<Item> GuardedItem;
-typedef QMap<QString, Variant*> VariantDataMap;
-typedef QValueList<GuardedItem> ItemList;
+typedef TQGuardedPtr<Item> GuardedItem;
+typedef TQMap<TQString, Variant*> VariantDataMap;
+typedef TQValueList<GuardedItem> ItemList;
/**
@author David Saxton
@author Daniel Clarke
*/
-class Item : public QObject, public QCanvasPolygon
+class Item : public TQObject, public TQCanvasPolygon
{
Q_OBJECT
+ TQ_OBJECT
public:
- Item( ItemDocument *itemDocument, bool newItem, const QString &id );
+ Item( ItemDocument *itemDocument, bool newItem, const TQString &id );
virtual ~Item();
/**
@@ -50,15 +51,15 @@ public:
*/
VariantDataMap *variantMap() { return &m_variantData; }
- double dataDouble( const QString & id ) const;
- int dataInt( const QString & id ) const;
- bool dataBool( const QString & id ) const;
- QString dataString( const QString & id ) const;
- QColor dataColor( const QString & id ) const;
+ double dataDouble( const TQString & id ) const;
+ int dataInt( const TQString & id ) const;
+ bool dataBool( const TQString & id ) const;
+ TQString dataString( const TQString & id ) const;
+ TQColor dataColor( const TQString & id ) const;
- virtual Variant * createProperty( const QString & id, Variant::Type::Value type );
- Variant * property( const QString & id ) const;
- bool hasProperty( const QString & id ) const;
+ virtual Variant * createProperty( const TQString & id, Variant::Type::Value type );
+ Variant * property( const TQString & id ) const;
+ bool hasProperty( const TQString & id ) const;
/**
* Whether or not we can rotate the item
@@ -86,8 +87,8 @@ public:
/**
* Returns a identifier for the CNItem, which is unique on the ICNDocument
*/
- QString id() const { return m_id; }
- QString type() const { return m_type; }
+ TQString id() const { return m_id; }
+ TQString type() const { return m_type; }
/**
* Called from ItemLibrary after this class and subclasses have finished
* constructing themselves.
@@ -105,17 +106,17 @@ public:
void setChanged();
/**
* Sets this item as a child of the given item. Calls reparented with the
- * old and the new parent.
+ * old and the new tqparent.
*/
- void setParentItem( Item *parentItem );
+ void setParentItem( Item *tqparentItem );
/**
- * The parent item for this item, or NULL if none
+ * The tqparent item for this item, or NULL if none
*/
- Item *parentItem() const { return p_parentItem; }
+ Item *tqparentItem() const { return p_parentItem; }
ItemDocument *itemDocument() const { return p_itemDocument; }
/**
* Returns the number of items away from the top item this is
- * (parent-wise). Returns 0 if has no parent.
+ * (tqparent-wise). Returns 0 if has no tqparent.
*/
int level() const;
/**
@@ -129,7 +130,7 @@ public:
bool isRaised() const { return m_bIsRaised; }
/**
* Sets this item to the given baseZ level, and calls this function for the
- * children with baseZ incremented by one. Reinherit this function to set
+ * tqchildren with baseZ incremented by one. Reinherit this function to set
* the Z of attached stuff (such as nodes).
*/
virtual void updateZ( int baseZ );
@@ -142,37 +143,37 @@ public:
*/
void addChild( Item *child );
/**
- * Returns the list of children.
+ * Returns the list of tqchildren.
* @param if includeGrandChildren is true then this list will also contain
- * the children's children, and so on recursively, instead of just the
- * immediate children.
+ * the tqchildren's tqchildren, and so on recursively, instead of just the
+ * immediate tqchildren.
*/
- ItemList children( bool includeGrandChildren = false ) const;
+ ItemList tqchildren( bool includeGrandChildren = false ) const;
/**
* Returns whether we have the given child as either a direct child, or as
* either a direct or indirect child
*/
- bool contains( Item *item, bool direct = false ) const;
+ bool tqcontains( Item *item, bool direct = false ) const;
/**
* Calls prePresize with the bounds, and if that returns true, sets
* m_sizeRect to the given rect, and then calls postResize.
* @param forceItemPoints if true, will set the item points to a rectangle of the given size
*/
- void setSize( QRect sizeRect, bool forceItemPoints = false );
+ void setSize( TQRect sizeRect, bool forceItemPoints = false );
/**
* Convenience function.
- * @see setSize( QRect sizeRect, bool forceItemPoints );
+ * @see setSize( TQRect sizeRect, bool forceItemPoints );
*/
- void setSize( int x, int y, int w, int h, bool forceItemPoints = false ) { setSize( QRect(x,y,w,h), forceItemPoints ); }
+ void setSize( int x, int y, int w, int h, bool forceItemPoints = false ) { setSize( TQRect(x,y,w,h), forceItemPoints ); }
/**
* @returns the m_sizeRect rectangble that contains the item points
*/
- QRect sizeRect() const { return m_sizeRect; }
+ TQRect sizeRect() const { return m_sizeRect; }
/**
* Reinherit this function if you want to determine what the minimum size is
* that this item can be resized to.
*/
- virtual QSize minimumSize() const { return QSize(0,0); }
+ virtual TQSize tqminimumSize() const { return TQSize(0,0); }
int offsetX() const { return m_sizeRect.x(); }
int offsetY() const { return m_sizeRect.y(); }
int width() const { return m_sizeRect.width(); }
@@ -187,11 +188,11 @@ public:
/**
* Returns the name of the CNItem, e.g. "Resistor"
*/
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
/**
* Returns a description of the CNItem, with html tags if appropriate.
*/
- QString description() const { return m_desc; }
+ TQString description() const { return m_desc; }
/**
* Modifies the exponent of the number so that it appears readable:
* eg 10000->10, 174822->175, 0.6->600, etc
@@ -201,7 +202,7 @@ public:
* Returns the SI exponent of the number as a letter:
* eg 10000 returns 'k', 0.6 returns 'm', etc
*/
- static QString getNumberMag( double num );
+ static TQString getNumberMag( double num );
/**
* Returns the multiplier required to get the num up to human readable form:
* eg 10000 returns 0.001, etc
@@ -212,12 +213,12 @@ public:
* to its actual value based on the SI exponent:
* eg 'm' returns 0.001, etc
*/
- static double getMultiplier( const QString &mag );
+ static double getMultiplier( const TQString &mag );
virtual ItemData itemData() const;
virtual void restoreFromItemData( const ItemData &itemData );
- const QFont & font() const { return m_font; }
+ const TQFont & font() const { return m_font; }
public slots:
virtual void removeItem();
@@ -258,17 +259,17 @@ protected slots:
protected:
/**
- * Reinherit this function if you want to do anything with children. Called
- * after the parent is changed, with the old parent and the new parent.
+ * Reinherit this function if you want to do anything with tqchildren. Called
+ * after the tqparent is changed, with the old tqparent and the new tqparent.
*/
virtual void reparented( Item */*oldParent*/, Item */*newParent*/ ) {};
/**
- * Reinherit this function if you want to do anything with children. Called
+ * Reinherit this function if you want to do anything with tqchildren. Called
* after a child has been added.
*/
virtual void childAdded( Item * ) {};
/**
- * Reinherit this function if you want to do anything with children. Called
+ * Reinherit this function if you want to do anything with tqchildren. Called
* after a child has been removed.
*/
virtual void childRemoved( Item * ) {};
@@ -276,22 +277,22 @@ protected:
* Set the rough bounding points for this item. Calls itemPointsChanged
* after setting the points
*/
- void setItemPoints( const QPointArray &pa, bool setSizeFromPoints = true );
+ void setItemPoints( const TQPointArray &pa, bool setSizeFromPoints = true );
/**
* Reinherit this function if you want to apply any sort of transformation
* to the item points
*/
virtual void itemPointsChanged();
- virtual bool preResize( QRect sizeRect ) { Q_UNUSED(sizeRect); return true; }
+ virtual bool preResize( TQRect sizeRect ) { Q_UNUSED(sizeRect); return true; }
virtual void postResize() {};
- QString m_id;
- QString m_name, m_desc; // Name and description
- QString m_type;
- GuardedItem p_parentItem; // If attached to a parent item
- ItemList m_children;
- QGuardedPtr<ItemDocument> p_itemDocument;
- QPointArray m_itemPoints; // The unorientated and unsized item points
+ TQString m_id;
+ TQString m_name, m_desc; // Name and description
+ TQString m_type;
+ GuardedItem p_parentItem; // If attached to a tqparent item
+ ItemList m_tqchildren;
+ TQGuardedPtr<ItemDocument> p_itemDocument;
+ TQPointArray m_itemPoints; // The unorientated and unsized item points
friend class ItemLibrary;
@@ -300,8 +301,8 @@ protected:
bool m_bDoneCreation;
bool b_deleted;
bool m_bDynamicContent;
- QFont m_font;
- QRect m_sizeRect;
+ TQFont m_font;
+ TQRect m_sizeRect;
VariantDataMap m_variantData;
};
diff --git a/src/itemdocument.cpp b/src/itemdocument.cpp
index cfe3230..0556552 100644
--- a/src/itemdocument.cpp
+++ b/src/itemdocument.cpp
@@ -32,16 +32,16 @@
#include <kmessagebox.h>
#include <kpopupmenu.h>
#include <kprinter.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qimage.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qpicture.h>
-#include <qregexp.h>
-#include <qsimplerichtext.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqimage.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqpicture.h>
+#include <tqregexp.h>
+#include <tqsimplerichtext.h>
+#include <tqtimer.h>
#include <cmath>
@@ -49,7 +49,7 @@
//BEGIN class ItemDocument
int ItemDocument::m_nextActionTicket = 0;
-ItemDocument::ItemDocument( const QString &caption, KTechlab *ktechlab, const char *name)
+ItemDocument::ItemDocument( const TQString &caption, KTechlab *ktechlab, const char *name)
: Document( caption, ktechlab, name )
{
m_queuedEvents = 0;
@@ -69,16 +69,16 @@ ItemDocument::ItemDocument( const QString &caption, KTechlab *ktechlab, const ch
m_canvas->resize( 0, 0 );
m_canvas->setDoubleBuffering(true);
- m_pEventTimer = new QTimer(this);
- connect( m_pEventTimer, SIGNAL(timeout()), this, SLOT(processItemDocumentEvents()) );
+ m_pEventTimer = new TQTimer(this);
+ connect( m_pEventTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processItemDocumentEvents()) );
- connect( this, SIGNAL(itemSelected(Item*)), this, SLOT(slotInitItemActions(Item*)) );
- connect( this, SIGNAL(itemUnselected(Item*)), this, SLOT(slotInitItemActions(Item*)) );
+ connect( this, TQT_SIGNAL(itemSelected(Item*)), this, TQT_SLOT(slotInitItemActions(Item*)) );
+ connect( this, TQT_SIGNAL(itemUnselected(Item*)), this, TQT_SLOT(slotInitItemActions(Item*)) );
- connect( ComponentSelector::self(), SIGNAL(itemClicked(const QString& )), this, SLOT(slotUnsetRepeatedItemId()) );
- connect( FlowPartSelector::self(), SIGNAL(itemClicked(const QString& )), this, SLOT(slotUnsetRepeatedItemId()) );
+ connect( ComponentSelector::self(), TQT_SIGNAL(itemClicked(const TQString& )), this, TQT_SLOT(slotUnsetRepeatedItemId()) );
+ connect( FlowPartSelector::self(), TQT_SIGNAL(itemClicked(const TQString& )), this, TQT_SLOT(slotUnsetRepeatedItemId()) );
#ifdef MECHANICS
- connect( MechanicsSelector::self(), SIGNAL(itemClicked(const QString& )), this, SLOT(slotUnsetRepeatedItemId()) );
+ connect( MechanicsSelector::self(), TQT_SIGNAL(itemClicked(const TQString& )), this, TQT_SLOT(slotUnsetRepeatedItemId()) );
#endif
m_pAlignmentAction = new KActionMenu( i18n("Alignment"), "rightjust", this );
@@ -112,7 +112,7 @@ void ItemDocument::handleNewView( View * view )
}
-bool ItemDocument::registerItem( QCanvasItem *qcanvasItem )
+bool ItemDocument::registerItem( TQCanvasItem *qcanvasItem )
{
if (!qcanvasItem)
return false;
@@ -126,9 +126,9 @@ bool ItemDocument::registerItem( QCanvasItem *qcanvasItem )
{
Item *item = dynamic_cast<Item*>(qcanvasItem);
m_itemList.append(item);
- connect( item, SIGNAL(removed(Item*)), this, SLOT(requestRerouteInvalidatedConnectors()) );
- connect( item, SIGNAL(selected(Item*,bool)), this, SIGNAL(itemSelected(Item*)) );
- connect( item, SIGNAL(unselected(Item*,bool)), this, SIGNAL(itemUnselected(Item*)) );
+ connect( item, TQT_SIGNAL(removed(Item*)), this, TQT_SLOT(requestRerouteInvalidatedConnectors()) );
+ connect( item, TQT_SIGNAL(selected(Item*,bool)), this, TQT_SIGNAL(itemSelected(Item*)) );
+ connect( item, TQT_SIGNAL(unselected(Item*,bool)), this, TQT_SIGNAL(itemUnselected(Item*)) );
itemAdded(item);
return true;
}
@@ -150,7 +150,7 @@ void ItemDocument::cancelCurrentOperation()
}
-void ItemDocument::slotSetRepeatedItemId( const QString &id )
+void ItemDocument::slotSetRepeatedItemId( const TQString &id )
{
m_cmManager->setCMState( CMManager::cms_repeated_add, true );
m_cmManager->setRepeatedAddId(id);
@@ -202,7 +202,7 @@ bool ItemDocument::openURL( const KURL &url )
return false;
// Why do we stop simulating while loading a document?
- // Crash possible when loading a circuit document, and the Qt event loop is
+ // Crash possible when loading a circuit document, and the TQt event loop is
// reentered (such as when a PIC component pops-up a message box), which
// will then call the Simulator::step function, which might use components
// that have not fully initialized themselves.
@@ -232,7 +232,7 @@ bool ItemDocument::openURL( const KURL &url )
ItemList::iterator end = m_itemList.end();
for ( ItemList::iterator it = m_itemList.begin(); it != end; ++it )
{
- if ( !*it || (*it)->parentItem() )
+ if ( !*it || (*it)->tqparentItem() )
continue;
m_zOrder[(*it)->baseZ()] = *it;
@@ -249,26 +249,26 @@ void ItemDocument::print()
if ( ! printer->setup( p_ktechlab ) )
return;
- // setup the printer. with Qt, you always "print" to a
- // QPainter.. whether the output medium is a pixmap, a screen,
+ // setup the printer. with TQt, you always "print" to a
+ // TQPainter.. whether the output medium is a pixmap, a screen,
// or paper
- QPainter p;
+ TQPainter p;
p.begin( printer );
// we let our view do the actual printing
- QPaintDeviceMetrics metrics( printer );
+ TQPaintDeviceMetrics metrics( printer );
// Round to 16 (= 2 * 8) so that we cut in the middle of squares
int w = 16*int(metrics.width()/16);
int h = 16*int(metrics.height()/16);
p.setClipping( true );
- p.setClipRect( 0, 0, w, h, QPainter::CoordPainter );
+ p.setClipRect( 0, 0, w, h, TQPainter::CoordPainter );
// Send off the painter for drawing
- m_canvas->setBackgroundPixmap( 0 );
+ m_canvas->tqsetBackgroundPixmap( 0 );
- QRect bounding = canvasBoundingRect();
+ TQRect bounding = canvasBoundingRect();
unsigned int rows = (unsigned) std::ceil( double( bounding.height() ) / double( h ) );
unsigned int cols = (unsigned) std::ceil( double( bounding.width() ) / double( w ) );
int offset_x = bounding.x();
@@ -281,7 +281,7 @@ void ItemDocument::print()
if ( row != 0 || col != 0 )
printer->newPage();
- QRect drawArea( offset_x + (col * w), offset_y + (row * h), w, h );
+ TQRect drawArea( offset_x + (col * w), offset_y + (row * h), w, h );
m_canvas->drawArea( drawArea, & p );
p.translate( -w, 0 );
@@ -406,7 +406,7 @@ void ItemDocument::cut()
void ItemDocument::paste()
{
- QString xml = KApplication::clipboard()->text( QClipboard::Clipboard );
+ TQString xml = KApplication::tqclipboard()->text( TQClipboard::Clipboard );
if ( xml.isEmpty() )
return;
@@ -425,7 +425,7 @@ void ItemDocument::paste()
}
-Item *ItemDocument::itemWithID( const QString &id )
+Item *ItemDocument::itemWithID( const TQString &id )
{
const ItemList::iterator end = m_itemList.end();
for ( ItemList::iterator it = m_itemList.begin(); it != end; ++it )
@@ -443,27 +443,27 @@ void ItemDocument::unselectAll()
}
-void ItemDocument::select( QCanvasItem * item )
+void ItemDocument::select( TQCanvasItem * item )
{
if (!item)
return;
- item->setSelected( selectList()->contains( item ) || selectList()->addQCanvasItem( item ) );
+ item->setSelected( selectList()->tqcontains( item ) || selectList()->addTQCanvasItem( item ) );
}
-void ItemDocument::select( const QCanvasItemList & list )
+void ItemDocument::select( const TQCanvasItemList & list )
{
- const QCanvasItemList::const_iterator end = list.end();
- for ( QCanvasItemList::const_iterator it = list.begin(); it != end; ++it )
- selectList()->addQCanvasItem(*it);
+ const TQCanvasItemList::const_iterator end = list.end();
+ for ( TQCanvasItemList::const_iterator it = list.begin(); it != end; ++it )
+ selectList()->addTQCanvasItem(*it);
selectList()->setSelected(true);
}
-void ItemDocument::unselect( QCanvasItem *qcanvasItem )
+void ItemDocument::unselect( TQCanvasItem *qcanvasItem )
{
- selectList()->removeQCanvasItem(qcanvasItem);
+ selectList()->removeTQCanvasItem(qcanvasItem);
qcanvasItem->setSelected(false);
}
@@ -475,26 +475,26 @@ void ItemDocument::slotUpdateConfiguration()
}
-QCanvasItem* ItemDocument::itemAtTop( const QPoint &pos ) const
+TQCanvasItem* ItemDocument::itemAtTop( const TQPoint &pos ) const
{
- QCanvasItemList list = m_canvas->collisions( QRect( pos.x()-1, pos.y()-1, 3, 3 ) );
+ TQCanvasItemList list = m_canvas->collisions( TQRect( pos.x()-1, pos.y()-1, 3, 3 ) );
- QCanvasItemList::const_iterator it = list.begin();
- const QCanvasItemList::const_iterator end = list.end();
+ TQCanvasItemList::const_iterator it = list.begin();
+ const TQCanvasItemList::const_iterator end = list.end();
while ( it != end )
{
- QCanvasItem *item = *it;
+ TQCanvasItem *item = *it;
if ( item == m_canvasTip ||
- item->rtti() == QCanvasItem::Rtti_Line ||
- item->rtti() == QCanvasItem::Rtti_Text ||
- item->rtti() == QCanvasItem::Rtti_Rectangle )
+ item->rtti() == TQCanvasItem::Rtti_Line ||
+ item->rtti() == TQCanvasItem::Rtti_Text ||
+ item->rtti() == TQCanvasItem::Rtti_Rectangle )
{
++it;
}
else
{
if ( item->rtti() == ItemDocument::RTTI::ConnectorLine )
- return (static_cast<ConnectorLine*>(item))->parent();
+ return (static_cast<ConnectorLine*>(item))->tqparent();
return item;
}
@@ -531,9 +531,9 @@ void ItemDocument::distributeVertically( )
}
-bool ItemDocument::registerUID( const QString &UID )
+bool ItemDocument::registerUID( const TQString &UID )
{
- if ( m_idList.findIndex(UID) == -1 )
+ if ( m_idList.tqfindIndex(UID) == -1 )
{
m_idList.append(UID);
return true;
@@ -543,24 +543,24 @@ bool ItemDocument::registerUID( const QString &UID )
}
-void ItemDocument::unregisterUID( const QString & uid )
+void ItemDocument::unregisterUID( const TQString & uid )
{
m_idList.remove(uid);
}
-QString ItemDocument::generateUID( QString name )
+TQString ItemDocument::generateUID( TQString name )
{
- name.remove( QRegExp("__.*") ); // Change 'node__13' to 'node', for example
- QString idAttempt = name;
-// if ( idAttempt.find("__") != -1 ) idAttempt.truncate( idAttempt.find("__") );
- while ( !registerUID(idAttempt) ) { idAttempt = name + "__" + QString::number(m_nextIdNum++); }
+ name.remove( TQRegExp("__.*") ); // Change 'node__13' to 'node', for example
+ TQString idAttempt = name;
+// if ( idAttempt.tqfind("__") != -1 ) idAttempt.truncate( idAttempt.tqfind("__") );
+ while ( !registerUID(idAttempt) ) { idAttempt = name + "__" + TQString::number(m_nextIdNum++); }
return idAttempt;
}
-void ItemDocument::canvasRightClick( const QPoint &pos, QCanvasItem* item )
+void ItemDocument::canvasRightClick( const TQPoint &pos, TQCanvasItem* item )
{
if (item)
{
@@ -572,12 +572,12 @@ void ItemDocument::canvasRightClick( const QPoint &pos, QCanvasItem* item )
}
}
- p_ktechlab->unplugActionList("alignment_actionlist");
+ p_ktechlab->unplugActionList("tqalignment_actionlist");
p_ktechlab->unplugActionList("orientation_actionlist");
p_ktechlab->unplugActionList("component_actionlist");
fillContextMenu(pos);
- QPopupMenu *pop = static_cast<QPopupMenu*>(p_ktechlab->factory()->container("item_popup", p_ktechlab));
+ TQPopupMenu *pop = static_cast<TQPopupMenu*>(p_ktechlab->factory()->container("item_popup", p_ktechlab));
if (!pop)
return;
@@ -586,7 +586,7 @@ void ItemDocument::canvasRightClick( const QPoint &pos, QCanvasItem* item )
}
-void ItemDocument::fillContextMenu( const QPoint & pos )
+void ItemDocument::fillContextMenu( const TQPoint & pos )
{
Q_UNUSED(pos);
@@ -611,9 +611,9 @@ void ItemDocument::fillContextMenu( const QPoint & pos )
m_pAlignmentAction->remove( align_actions[i] );
m_pAlignmentAction->insert( align_actions[i] );
}
- QPtrList<KAction> alignment_actions;
- alignment_actions.append( m_pAlignmentAction );
- p_ktechlab->plugActionList( "alignment_actionlist", alignment_actions );
+ TQPtrList<KAction> tqalignment_actions;
+ tqalignment_actions.append( m_pAlignmentAction );
+ p_ktechlab->plugActionList( "tqalignment_actionlist", tqalignment_actions );
}
@@ -656,12 +656,12 @@ void ItemDocument::updateBackground()
int interval = 8;
int bigness = interval * 10;
- QPixmap pm( bigness, bigness );
+ TQPixmap pm( bigness, bigness );
// pm.fill( KTLConfig::bgColor() ); // first fill the background colour in
- pm.fill( Qt::white );
+ pm.fill( TQt::white );
if( KTLConfig::showGrid() ){
- QPainter p(&pm); // setup painter to draw on pixmap
+ TQPainter p(&pm); // setup painter to draw on pixmap
p.setPen( KTLConfig::gridColor() ); // set forecolour
// note: anything other than 8 borks this
for( int i = (interval / 2); i < bigness; i+=interval ){
@@ -671,8 +671,8 @@ void ItemDocument::updateBackground()
p.end(); // all done
}
- pm.setDefaultOptimization( QPixmap::BestOptim );
- m_canvas->setBackgroundPixmap(pm); // and the finale.
+ pm.setDefaultOptimization( TQPixmap::BestOptim );
+ m_canvas->tqsetBackgroundPixmap(pm); // and the finale.
}
@@ -710,8 +710,8 @@ void ItemDocument::resizeCanvasToItems()
{
const ViewList::iterator end = m_viewList.end();
- QRect bound = canvasBoundingRect();
- QSize size( bound.right(), bound.bottom() );
+ TQRect bound = canvasBoundingRect();
+ TQSize size( bound.right(), bound.bottom() );
m_viewList.remove((View*)0);
@@ -732,7 +732,7 @@ void ItemDocument::resizeCanvasToItems()
if ( (contentsY - contentsWMY) == 1 )
contentsWMY = contentsY;
- size = size.expandedTo( QSize( contentsWMX, contentsWMY ) );
+ size = size.expandedTo( TQSize( contentsWMX, contentsWMY ) );
}
// We want to avoid flicker....
@@ -741,8 +741,8 @@ void ItemDocument::resizeCanvasToItems()
ItemView * itemView = static_cast<ItemView*>((View*)*it);
CVBEditor * cvbEditor = itemView->cvbEditor();
- cvbEditor->setVScrollBarMode( ((size.height()*itemView->zoomLevel()) > cvbEditor->visibleHeight()) ? QScrollView::AlwaysOn : QScrollView::AlwaysOff );
- cvbEditor->setHScrollBarMode( ((size.width()*itemView->zoomLevel()) > cvbEditor->visibleWidth()) ? QScrollView::AlwaysOn : QScrollView::AlwaysOff );
+ cvbEditor->setVScrollBarMode( ((size.height()*itemView->zoomLevel()) > cvbEditor->visibleHeight()) ? TQScrollView::AlwaysOn : TQScrollView::AlwaysOff );
+ cvbEditor->setHScrollBarMode( ((size.width()*itemView->zoomLevel()) > cvbEditor->visibleWidth()) ? TQScrollView::AlwaysOn : TQScrollView::AlwaysOff );
}
bool changedSize = canvas()->size() != size;
@@ -755,13 +755,13 @@ void ItemDocument::resizeCanvasToItems()
}
-QRect ItemDocument::canvasBoundingRect() const
+TQRect ItemDocument::canvasBoundingRect() const
{
- QRect bound;
+ TQRect bound;
- const QCanvasItemList allItems = canvas()->allItems();
- const QCanvasItemList::const_iterator end = allItems.end();
- for ( QCanvasItemList::const_iterator it = allItems.begin(); it != end; ++it )
+ const TQCanvasItemList allItems = canvas()->allItems();
+ const TQCanvasItemList::const_iterator end = allItems.end();
+ for ( TQCanvasItemList::const_iterator it = allItems.begin(); it != end; ++it )
{
if ( !(*it)->isVisible() )
continue;
@@ -790,9 +790,9 @@ void ItemDocument::exportToImage()
// widget for the kfiledialog
// It is the bit that says "Crop circuit?"
// Okay need to think of something way better to say here.
- // gotme here, KFileDialog makes itself parent so tries to destroy cropCheck when it is deleted.
+ // gotme here, KFileDialog makes itself tqparent so tries to destroy cropCheck when it is deleted.
// therefore we use a pointer.
- QString cropMessage;
+ TQString cropMessage;
if ( type() == Document::dt_flowcode )
cropMessage = i18n("Crop image to program parts");
@@ -802,42 +802,42 @@ void ItemDocument::exportToImage()
else
cropMessage = i18n("Crop image");
- QCheckBox *cropCheck = new QCheckBox( cropMessage, p_ktechlab, "cropCheck" );
+ TQCheckBox *cropCheck = new TQCheckBox( cropMessage, p_ktechlab, "cropCheck" );
cropCheck->setChecked(true); // yes by default?
// we need an object so we can retrieve which image type was selected by the user
// so setup the filedialog.
- KFileDialog exportDialog(QString::null, "*.png|PNG Image\n*.bmp|BMP Image\n*.svg|SVG Image" , p_ktechlab, i18n("Export As Image"), true, cropCheck);
+ KFileDialog exportDialog(TQString(), "*.png|PNG Image\n*.bmp|BMP Image\n*.svg|SVG Image" , p_ktechlab, i18n("Export As Image"), true, cropCheck);
exportDialog.setOperationMode( KFileDialog::Saving );
// now actually show it
- if ( exportDialog.exec() == QDialog::Rejected )
+ if ( exportDialog.exec() == TQDialog::Rejected )
return;
KURL url = exportDialog.selectedURL();
if ( url.isEmpty() )
return;
- if ( QFile::exists( url.path() ) )
+ if ( TQFile::exists( url.path() ) )
{
- int query = KMessageBox::warningYesNo( p_ktechlab, i18n( "A file named \"%1\" already exists. " "Are you sure you want to overwrite it?" ).arg( url.fileName() ), i18n( "Overwrite File?" ), i18n( "Overwrite" ), KStdGuiItem::cancel() );
+ int query = KMessageBox::warningYesNo( p_ktechlab, i18n( "A file named \"%1\" already exists. " "Are you sure you want to overwrite it?" ).tqarg( url.fileName() ), i18n( "Overwrite File?" ), i18n( "Overwrite" ), KStdGuiItem::cancel() );
if ( query == KMessageBox::No ) return;
}
- // with Qt, you always "print" to a
- // QPainter.. whether the output medium is a pixmap, a screen,
+ // with TQt, you always "print" to a
+ // TQPainter.. whether the output medium is a pixmap, a screen,
// or paper
- // needs to be something like QPicture to do SVG etc...
+ // needs to be something like TQPicture to do SVG etc...
// at the moment the pixmap is just as big as the canvas,
// intend to make some kind of cropping thing so it just
// takes the bit with the circuit on.
- QRect saveArea;
- QString type;
- QRect cropArea;
- QPaintDevice *outputImage;
- QString filter = exportDialog.currentFilter();
+ TQRect saveArea;
+ TQString type;
+ TQRect cropArea;
+ TQPaintDevice *outputImage;
+ TQString filter = exportDialog.currentFilter();
filter = filter.lower(); // gently soften the appearance of the letters.
// did have a switch here but seems you can't use that on strings
@@ -877,12 +877,12 @@ void ItemDocument::exportToImage()
saveArea = m_canvas->rect();
if ( type == "PNG" || type == "BMP" )
- outputImage = new QPixmap( saveArea.size() );
+ outputImage = TQT_TQPAINTDEVICE(new TQPixmap( saveArea.size() ));
else if ( type == "SVG" )
{
setSVGExport(true);
- outputImage = new QPicture();
+ outputImage = TQT_TQPAINTDEVICE(new TQPicture());
// svg can't be cropped using the qimage method.
saveArea = cropArea;
}
@@ -892,9 +892,9 @@ void ItemDocument::exportToImage()
return;
}
- QPainter p(outputImage);
+ TQPainter p(outputImage);
- m_canvas->setBackgroundPixmap(QPixmap());
+ m_canvas->tqsetBackgroundPixmap(TQPixmap());
m_canvas->drawArea( saveArea, &p );
updateBackground();
@@ -907,11 +907,11 @@ void ItemDocument::exportToImage()
if ( cropCheck->isChecked() )
{
if( type == "SVG" )
- saveResult = dynamic_cast<QPicture*>(outputImage)->save( url.path(), type);
+ saveResult = dynamic_cast<TQPicture*>(outputImage)->save( url.path(), type);
else
{
- QImage img = dynamic_cast<QPixmap*>(outputImage)->convertToImage();
+ TQImage img = dynamic_cast<TQPixmap*>(outputImage)->convertToImage();
img = img.copy(cropArea);
saveResult = img.save(url.path(),type);
}
@@ -919,12 +919,12 @@ void ItemDocument::exportToImage()
else
{
if ( type=="SVG" )
- saveResult = dynamic_cast<QPicture*>(outputImage)->save( url.path(), type );
+ saveResult = dynamic_cast<TQPicture*>(outputImage)->save( url.path(), type );
else
- saveResult = dynamic_cast<QPixmap*>(outputImage)->save( url.path(), type );
+ saveResult = dynamic_cast<TQPixmap*>(outputImage)->save( url.path(), type );
}
- //if(saveResult == true) KMessageBox::information( this, i18n("Sucessfully exported to \"%1\"").arg( url.filename() ), i18n("Image Export") );
+ //if(saveResult == true) KMessageBox::information( this, i18n("Sucessfully exported to \"%1\"").tqarg( url.filename() ), i18n("Image Export") );
//else KMessageBox::information( this, i18n("Export failed"), i18n("Image Export") );
if ( type == "SVG" )
@@ -940,9 +940,9 @@ void ItemDocument::exportToImage()
void ItemDocument::setSVGExport( bool svgExport )
{
// Find any items and tell them not to draw buttons or sliders
- QCanvasItemList items = m_canvas->allItems();
- const QCanvasItemList::iterator end = items.end();
- for ( QCanvasItemList::Iterator it = items.begin(); it != end; ++it )
+ TQCanvasItemList items = m_canvas->allItems();
+ const TQCanvasItemList::iterator end = items.end();
+ for ( TQCanvasItemList::Iterator it = items.begin(); it != end; ++it )
{
if ( CNItem * cnItem = dynamic_cast<CNItem*>(*it) )
cnItem->setDrawWidgets(!svgExport);
@@ -969,7 +969,7 @@ void ItemDocument::raiseZ( const ItemList & itemList )
Item * previousData = (previous == m_zOrder.end()) ? 0l : previous.data();
Item * currentData = it.data();
- if ( currentData && previousData && itemList.contains(currentData) && !itemList.contains(previousData) )
+ if ( currentData && previousData && itemList.tqcontains(currentData) && !itemList.tqcontains(previousData) )
{
previous.data() = currentData;
it.data() = previousData;
@@ -1003,7 +1003,7 @@ void ItemDocument::lowerZ( const ItemList & itemList )
Item * previousData = previous.data();
Item * currentData = it.data();
- if ( currentData && previousData && itemList.contains(currentData) && !itemList.contains(previousData) )
+ if ( currentData && previousData && itemList.tqcontains(currentData) && !itemList.tqcontains(previousData) )
{
previous.data() = currentData;
it.data() = previousData;
@@ -1039,7 +1039,7 @@ void ItemDocument::slotUpdateZOrdering()
toAdd.remove(item);
- if ( !item->parentItem() && item->isMovable() )
+ if ( !item->tqparentItem() && item->isMovable() )
newZOrder[atLevel++] = item;
}
@@ -1047,7 +1047,7 @@ void ItemDocument::slotUpdateZOrdering()
for ( ItemList::iterator it = toAdd.begin(); it != addEnd; ++it )
{
Item * item = *it;
- if ( item->parentItem() || !item->isMovable() )
+ if ( item->tqparentItem() || !item->isMovable() )
continue;
newZOrder[atLevel++] = item;
@@ -1075,12 +1075,12 @@ void ItemDocument::update( )
//BEGIN class CanvasTip
-CanvasTip::CanvasTip( ItemDocument *itemDocument, QCanvas *qcanvas )
- : QCanvasText(qcanvas)
+CanvasTip::CanvasTip( ItemDocument *itemDocument, TQCanvas *qcanvas )
+ : TQCanvasText(qcanvas)
{
p_itemDocument = itemDocument;
- setColor( Qt::black );
+ setColor( TQt::black );
setZ( ICNDocument::Z::Tip );
}
@@ -1088,7 +1088,7 @@ CanvasTip::~CanvasTip()
{
}
-void CanvasTip::displayVI( ECNode *node, const QPoint &pos )
+void CanvasTip::displayVI( ECNode *node, const TQPoint &pos )
{
if ( !node || !updateVI() )
return;
@@ -1111,7 +1111,7 @@ void CanvasTip::displayVI( ECNode *node, const QPoint &pos )
}
-void CanvasTip::displayVI( Connector *connector, const QPoint &pos )
+void CanvasTip::displayVI( Connector *connector, const TQPoint &pos )
{
if ( !connector || !updateVI())
return;
@@ -1145,7 +1145,7 @@ bool CanvasTip::updateVI()
}
-void CanvasTip::display( const QPoint &pos )
+void CanvasTip::display( const TQPoint &pos )
{
unsigned num = m_v.size();
@@ -1168,37 +1168,37 @@ void CanvasTip::display( const QPoint &pos )
else
{
- QString text;
+ TQString text;
for ( unsigned i = 0; i < num; i++ )
- text += QString(" %1: %2\n").arg( QString::number(i) ).arg( displayText(i) );
+ text += TQString(" %1: %2\n").tqarg( TQString::number(i) ).tqarg( displayText(i) );
setText(text);
}
}
-QString CanvasTip::displayText( unsigned num ) const
+TQString CanvasTip::displayText( unsigned num ) const
{
if ( m_v.size() <= num )
- return QString::null;
+ return TQString();
- return QString(" %1%2V %3%4A ")
- .arg( QString::number( m_v[num] / CNItem::getMultiplier(m_v[num]), 'g', 3 ) )
- .arg( CNItem::getNumberMag( m_v[num] ) )
- .arg( QString::number( m_i[num] / CNItem::getMultiplier(m_i[num]), 'g', 3 ) )
- .arg( CNItem::getNumberMag( m_i[num] ) );
+ return TQString(" %1%2V %3%4A ")
+ .tqarg( TQString::number( m_v[num] / CNItem::getMultiplier(m_v[num]), 'g', 3 ) )
+ .tqarg( CNItem::getNumberMag( m_v[num] ) )
+ .tqarg( TQString::number( m_i[num] / CNItem::getMultiplier(m_i[num]), 'g', 3 ) )
+ .tqarg( CNItem::getNumberMag( m_i[num] ) );
}
-void CanvasTip::draw( QPainter &p )
+void CanvasTip::draw( TQPainter &p )
{
CircuitDocument *circuitDocument = dynamic_cast<CircuitDocument*>(p_itemDocument);
if ( !circuitDocument || !Simulator::self()->isSimulating() )
return;
- p.setBrush( QColor( 0xff, 0xff, 0xdc ) );
- p.setPen( Qt::black );
+ p.setBrush( TQColor( 0xff, 0xff, 0xdc ) );
+ p.setPen( TQt::black );
p.drawRect( boundingRect() );
- QCanvasText::draw(p);
+ TQCanvasText::draw(p);
}
//END class CanvasTip
@@ -1207,15 +1207,15 @@ void CanvasTip::draw( QPainter &p )
//BEGIN class Canvas
Canvas::Canvas( ItemDocument *itemDocument, const char * name )
- : QCanvas( itemDocument, name )
+ : TQCanvas( itemDocument, name )
{
p_itemDocument = itemDocument;
- m_pMessageTimeout = new QTimer(this);
- connect( m_pMessageTimeout, SIGNAL(timeout()), this, SLOT(slotSetAllChanged()) );
+ m_pMessageTimeout = new TQTimer(this);
+ connect( m_pMessageTimeout, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSetAllChanged()) );
}
-void Canvas::setMessage( const QString & message )
+void Canvas::setMessage( const TQString & message )
{
m_message = message;
@@ -1229,9 +1229,9 @@ void Canvas::setMessage( const QString & message )
}
-void Canvas::drawBackground ( QPainter &p, const QRect & clip )
+void Canvas::drawBackground ( TQPainter &p, const TQRect & clip )
{
- QCanvas::drawBackground( p, clip );
+ TQCanvas::drawBackground( p, clip );
#if 0
const int scx = (int)((clip.left()-4)/8);
const int ecx = (int)((clip.right()+4)/8);
@@ -1248,8 +1248,8 @@ void Canvas::drawBackground ( QPainter &p, const QRect & clip )
int value = (int)std::log(score)*20;
if ( value>255 ) value=255;
else if (value<0 ) value=0;
- p.setBrush( QColor( 255, (255-value), (255-value) ) );
- p.setPen( Qt::NoPen );
+ p.setBrush( TQColor( 255, (255-value), (255-value) ) );
+ p.setPen( TQt::NoPen );
p.drawRect( (x*8), (y*8), 8, 8 );
}
}
@@ -1257,9 +1257,9 @@ void Canvas::drawBackground ( QPainter &p, const QRect & clip )
}
-void Canvas::drawForeground ( QPainter &p, const QRect & clip )
+void Canvas::drawForeground ( TQPainter &p, const TQRect & clip )
{
- QCanvas::drawForeground( p, clip );
+ TQCanvas::drawForeground( p, clip );
if ( !m_pMessageTimeout->isActive() )
return;
@@ -1269,7 +1269,7 @@ void Canvas::drawForeground ( QPainter &p, const QRect & clip )
// Following code stolen and adapted from amarok/src/playlist.cpp :)
// Find out width of smallest view
- QSize minSize;
+ TQSize minSize;
const ViewList viewList = p_itemDocument->viewList();
ViewList::const_iterator end = viewList.end();
View * firstView = 0l;
@@ -1290,7 +1290,7 @@ void Canvas::drawForeground ( QPainter &p, const QRect & clip )
if ( !firstView )
return;
- QSimpleRichText * t = new QSimpleRichText( m_message, QApplication::font() );
+ TQSimpleRichText * t = new TQSimpleRichText( m_message, TQApplication::font() );
int w = t->width();
int h = t->height();
@@ -1304,9 +1304,9 @@ void Canvas::drawForeground ( QPainter &p, const QRect & clip )
return;
}
- p.setBrush( firstView->colorGroup().background() );
+ p.setBrush( firstView->tqcolorGroup().background() );
p.drawRoundRect( x, y, w+2*b, h+2*b, (8*200)/(w+2*b), (8*200)/(h+2*b) );
- t->draw( &p, x+b, y+b, QRect(), firstView->colorGroup() );
+ t->draw( &p, x+b, y+b, TQRect(), firstView->tqcolorGroup() );
delete t;
}
@@ -1314,7 +1314,7 @@ void Canvas::drawForeground ( QPainter &p, const QRect & clip )
void Canvas::update()
{
p_itemDocument->update();
- QCanvas::update();
+ TQCanvas::update();
}
//END class Canvas
diff --git a/src/itemdocument.h b/src/itemdocument.h
index e9e9f6f..c40bc31 100644
--- a/src/itemdocument.h
+++ b/src/itemdocument.h
@@ -12,9 +12,9 @@
#define ITEMDOCUMENT_H
#include <document.h>
-#include <qcanvas.h>
-#include <qptrstack.h>
-#include <qvaluevector.h>
+#include <tqcanvas.h>
+#include <tqptrstack.h>
+#include <tqvaluevector.h>
class Canvas;
class CanvasTip;
@@ -28,13 +28,13 @@ class KTechlab;
class Operation;
class KActionMenu;
-class QCanvasItem;
+class TQCanvasItem;
-typedef QPtrStack<ItemDocumentData> IDDStack;
-typedef QGuardedPtr<Item> GuardedItem;
-typedef QMap< int, GuardedItem > IntItemMap;
-typedef QValueList<GuardedItem> ItemList;
-typedef QValueList<QPoint> QPointList;
+typedef TQPtrStack<ItemDocumentData> IDDStack;
+typedef TQGuardedPtr<Item> GuardedItem;
+typedef TQMap< int, GuardedItem > IntItemMap;
+typedef TQValueList<GuardedItem> ItemList;
+typedef TQValueList<TQPoint> TQPointList;
/**
@author David Saxton
@@ -42,8 +42,9 @@ typedef QValueList<QPoint> QPointList;
class ItemDocument : public Document
{
Q_OBJECT
+ TQ_OBJECT
public:
- ItemDocument( const QString &caption, KTechlab *ktechlab, const char *name = 0 );
+ ItemDocument( const TQString &caption, KTechlab *ktechlab, const char *name = 0 );
~ItemDocument();
class Z
@@ -84,7 +85,7 @@ class ItemDocument : public Document
/**
* Some things (such as the canvas getting resized, connectors being
- * invalidated, need to be done after editing operations have finished,
+ * tqinvalidated, need to be done after editing operations have finished,
* etc, and they also need to be done in the order given in the
* enumeration below.
*/
@@ -106,13 +107,13 @@ class ItemDocument : public Document
/**
* Attempt to register the item, returning true iff successful
*/
- virtual bool registerItem( QCanvasItem *qcanvasItem );
+ virtual bool registerItem( TQCanvasItem *qcanvasItem );
/**
* Will attempt to create an item with the given id at position p. Some item
* (such as PIC/START) have restrictions, and can only have one instance of
* themselves on the canvas, and adds the operation to the undo list
*/
- virtual Item* addItem( const QString &id, const QPoint &p, bool newItem ) = 0;
+ virtual Item* addItem( const TQString &id, const TQPoint &p, bool newItem ) = 0;
/**
* @returns A pointer to the canvas
*/
@@ -122,16 +123,16 @@ class ItemDocument : public Document
* canvas. If the id does not already exist, will return true; otherwise
* the function will return false.
*/
- bool registerUID( const QString & uid );
+ bool registerUID( const TQString & uid );
/**
* Generates a unique id based on a possibly unique component name.
*/
- QString generateUID( QString name );
+ TQString generateUID( TQString name );
/**
* Unlists the given id as one that is used.
* @see registerUID
*/
- void unregisterUID( const QString & uid );
+ void unregisterUID( const TQString & uid );
/**
* @return Whether or not the item is valid; i.e. is appropriate to the
* document being edited, and does not have other special restrictions
@@ -145,7 +146,7 @@ class ItemDocument : public Document
* on it (such as only allowing one instance of the Start part in
* FlowCode).
*/
- virtual bool isValidItem( const QString &itemId ) = 0;
+ virtual bool isValidItem( const TQString &itemId ) = 0;
/**
* Increases the "height" of the given list of items by "one".
*/
@@ -163,17 +164,17 @@ class ItemDocument : public Document
*/
void unselectAll();
/**
- * Select a list of QCanvasItem's
+ * Select a list of TQCanvasItem's
*/
- void select( const QCanvasItemList & list );
+ void select( const TQCanvasItemList & list );
/**
- * Select a QCanvasItem
+ * Select a TQCanvasItem
*/
- void select( QCanvasItem * item );
+ void select( TQCanvasItem * item );
/**
* Unselects the item
*/
- void unselect( QCanvasItem *qcanvasItem );
+ void unselect( TQCanvasItem *qcanvasItem );
/**
* Deletes anything waiting to be deleted.
*/
@@ -182,12 +183,12 @@ class ItemDocument : public Document
* Returns a rubber-band rectangle that contains all of the items on the
* canvas, padded out by a small border.
*/
- QRect canvasBoundingRect() const;
+ TQRect canvasBoundingRect() const;
/**
* Returns a pointer to a Item on the canvas with the given id,
* or NULL if no such Item exists.
*/
- Item* itemWithID( const QString & );
+ Item* itemWithID( const TQString & );
/**
* Returns true if the the user can perform an undo action
* (i.e. the undo stack is not empty)
@@ -201,21 +202,21 @@ class ItemDocument : public Document
/**
* Returns the top item at point (x, y), or NULL if there is no item there
*/
- QCanvasItem* itemAtTop( const QPoint &pos ) const;
+ TQCanvasItem* itemAtTop( const TQPoint &pos ) const;
/**
* Called when the canvas is clicked on with the right mouse button.
* Popups up a menu for editing operations
*/
- virtual void canvasRightClick( const QPoint &pos, QCanvasItem* item );
+ virtual void canvasRightClick( const TQPoint &pos, TQCanvasItem* item );
/**
* List of items in the ItemDocument
*/
ItemList itemList() const { return m_itemList; }
/**
- * Set the given QCanvasItem (which will attempt to be casted to known
+ * Set the given TQCanvasItem (which will attempt to be casted to known
* items to be deleted.
*/
- virtual void appendDeleteList( QCanvasItem * ) = 0;
+ virtual void appendDeleteList( TQCanvasItem * ) = 0;
/**
* Save the current state of the document to the undo/redo history.
* @param actionTicket if this is non-negative, and the last state save
@@ -237,7 +238,7 @@ class ItemDocument : public Document
*/
void requestEvent( ItemDocumentEvent::type type );
/**
- * Called from Canvas (when QCanvas::advance is called).
+ * Called from Canvas (when TQCanvas::advance is called).
*/
virtual void update();
@@ -291,7 +292,7 @@ class ItemDocument : public Document
void distributeVertically();
/**
* Adds an items not in the Z ordering to the ordering, and removes any
- * items from the Z ordering if they have parents. Then, calls all items
+ * items from the Z ordering if they have tqparents. Then, calls all items
* found in the ordering to tell them their Z position.
*/
void slotUpdateZOrdering();
@@ -304,7 +305,7 @@ class ItemDocument : public Document
* with the given id. Usually called when the user double-clicks on
* the component box.
*/
- void slotSetRepeatedItemId( const QString &id );
+ void slotSetRepeatedItemId( const TQString &id );
/**
* Unsets the editing mode from repeatedly creating a CNItem
*/
@@ -349,7 +350,7 @@ class ItemDocument : public Document
/**
* Reinherit this if you want to add any options to the right-click context
*/
- virtual void fillContextMenu( const QPoint & pos );
+ virtual void fillContextMenu( const TQPoint & pos );
/**
* Reads the background settings (grid-colour, underlying colour) from the Config settings,
* and generates the background pixmap from those settings
@@ -365,11 +366,11 @@ class ItemDocument : public Document
Canvas *m_canvas;
KTechlab *p_ktechlab;
- QStringList m_idList;
+ TQStringList m_idList;
static int m_nextActionTicket;
uint m_nextIdNum;
bool m_bIsLoading;
- QSize m_oldCanvasSize;
+ TQSize m_oldCanvasSize;
CMManager *m_cmManager;
ItemList m_itemDeleteList;
ItemList m_itemList;
@@ -378,11 +379,11 @@ class ItemDocument : public Document
ItemDocumentData * m_currentState;
int m_currentActionTicket;
ItemDocumentData * m_savedState; // Pointer to the document data that holds the state when it saved
- QString m_fileExtensionInfo; // For displaying in the save file dialog
+ TQString m_fileExtensionInfo; // For displaying in the save file dialog
CanvasTip * m_canvasTip;
IntItemMap m_zOrder;
KActionMenu * m_pAlignmentAction;
- QTimer * m_pEventTimer;
+ TQTimer * m_pEventTimer;
unsigned m_queuedEvents; // OR'ed together list of ItemDocumentEvent::type
friend class ICNView;
@@ -393,9 +394,10 @@ class ItemDocument : public Document
/**
@author David Saxton
*/
-class Canvas : public QCanvas
+class Canvas : public TQCanvas
{
Q_OBJECT
+ TQ_OBJECT
public:
Canvas( ItemDocument *itemDocument, const char * name = 0 );
@@ -404,7 +406,7 @@ class Canvas : public QCanvas
* time. If this is called with an empty message, then any existing
* message will be removed.
*/
- void setMessage( const QString & message );
+ void setMessage( const TQString & message );
virtual void update();
@@ -412,36 +414,36 @@ class Canvas : public QCanvas
void slotSetAllChanged() { setAllChanged(); }
protected:
- virtual void drawBackground ( QPainter & painter, const QRect & clip );
- virtual void drawForeground ( QPainter & painter, const QRect & clip );
+ virtual void drawBackground ( TQPainter & painter, const TQRect & clip );
+ virtual void drawForeground ( TQPainter & painter, const TQRect & clip );
ItemDocument *p_itemDocument;
- QString m_message;
- QTimer * m_pMessageTimeout;
+ TQString m_message;
+ TQTimer * m_pMessageTimeout;
};
/**
@author David Saxton
*/
-class CanvasTip : public QCanvasText
+class CanvasTip : public TQCanvasText
{
public:
- CanvasTip( ItemDocument *itemDocument, QCanvas *qcanvas );
+ CanvasTip( ItemDocument *itemDocument, TQCanvas *qcanvas );
virtual ~CanvasTip();
- void displayVI( ECNode *node, const QPoint &pos );
- void displayVI( Connector *connector, const QPoint &pos );
+ void displayVI( ECNode *node, const TQPoint &pos );
+ void displayVI( Connector *connector, const TQPoint &pos );
protected:
- virtual void draw( QPainter &p );
+ virtual void draw( TQPainter &p );
bool updateVI();
- void display( const QPoint &pos );
- QString displayText( unsigned num ) const;
+ void display( const TQPoint &pos );
+ TQString displayText( unsigned num ) const;
- QValueVector<double> m_v;
- QValueVector<double> m_i;
+ TQValueVector<double> m_v;
+ TQValueVector<double> m_i;
ItemDocument *p_itemDocument;
};
diff --git a/src/itemdocumentdata.cpp b/src/itemdocumentdata.cpp
index a582231..a352b04 100644
--- a/src/itemdocumentdata.cpp
+++ b/src/itemdocumentdata.cpp
@@ -24,15 +24,15 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <ktempfile.h>
-#include <qbitarray.h>
-#include <qfile.h>
+#include <tqbitarray.h>
+#include <tqfile.h>
-// Converts the QBitArray into a string (e.g. "F289A9E") that can be stored in an xml file
-static QString toAsciiHex( QBitArray _data )
+// Converts the TQBitArray into a string (e.g. "F289A9E") that can be stored in an xml file
+static TQString toAsciiHex( TQBitArray _data )
{
- QBitArray data = _data;
-// data = qCompress(data);
+ TQBitArray data = _data;
+// data = tqCompress(data);
// Pad out the data to a nice size
if ( (data.size() % 4) != 0 )
@@ -41,32 +41,32 @@ static QString toAsciiHex( QBitArray _data )
data.resize( data.size() + 4 - (data.size()%4) );
}
- QString text;
+ TQString text;
for ( unsigned i = 0; i < data.size()/4; ++i )
{
unsigned val = 0;
for ( unsigned j = 0; j < 4; ++j )
val += (data[4*i+j] ? 1:0) << j;
- text += QString::number( val, 16 );
+ text += TQString::number( val, 16 );
}
return text;
}
-// Converts a string (e.g. "F289A9E") into a QBitArray, the opposite of the above function
-static QBitArray toQBitArray( QString text )
+// Converts a string (e.g. "F289A9E") into a TQBitArray, the opposite of the above function
+static TQBitArray toTQBitArray( TQString text )
{
unsigned size = text.length();
- QBitArray data(size*4);
+ TQBitArray data(size*4);
for ( unsigned i = 0; i < size; ++i )
{
- unsigned val = QString(text[i]).toInt( 0l, 16 );
+ unsigned val = TQString(text[i]).toInt( 0l, 16 );
for ( unsigned j = 0; j < 4; ++j )
data[4*i+j] = val & (1 << j);
}
-// data = qUncompress(data);
+// data = tqUncompress(data);
return data;
}
@@ -97,7 +97,7 @@ void ItemDocumentData::reset()
bool ItemDocumentData::loadData( const KURL &url )
{
- QString target;
+ TQString target;
if ( !KIO::NetAccess::download( url, target, 0l ) )
{
// If the file could not be downloaded, for example does not
@@ -107,15 +107,15 @@ bool ItemDocumentData::loadData( const KURL &url )
return false;
}
- QFile file(target);
+ TQFile file(target);
if ( !file.open( IO_ReadOnly ) )
{
- KMessageBox::sorry( 0l, i18n("Could not open %1 for reading").arg(target) );
+ KMessageBox::sorry( 0l, i18n("Could not open %1 for reading").tqarg(target) );
return false;
}
- QString xml;
- QTextStream textStream( &file );
+ TQString xml;
+ TQTextStream textStream( &file );
while ( !textStream.eof() )
xml += textStream.readLine() + '\n';
@@ -124,27 +124,27 @@ bool ItemDocumentData::loadData( const KURL &url )
}
-bool ItemDocumentData::fromXML( const QString &xml )
+bool ItemDocumentData::fromXML( const TQString &xml )
{
reset();
- QDomDocument doc( "KTechlab" );
- QString errorMessage;
+ TQDomDocument doc( "KTechlab" );
+ TQString errorMessage;
if ( !doc.setContent( xml, &errorMessage ) )
{
- KMessageBox::sorry( 0l, i18n("Couldn't parse xml:\n%1").arg(errorMessage) );
+ KMessageBox::sorry( 0l, i18n("Couldn't parse xml:\n%1").tqarg(errorMessage) );
return false;
}
- QDomElement root = doc.documentElement();
+ TQDomElement root = doc.documentElement();
- QDomNode node = root.firstChild();
+ TQDomNode node = root.firstChild();
while ( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
if ( tagName == "item" )
elementToItemData(element);
@@ -177,14 +177,14 @@ bool ItemDocumentData::saveData( const KURL &url )
if ( url.isLocalFile() )
{
- QFile file( url.path() );
+ TQFile file( url.path() );
if ( !file.open(IO_WriteOnly) )
{
- KMessageBox::sorry( 0l, i18n("Could not open '%1' for writing. Check that you have write permissions").arg(url.path()), i18n("Saving File") );
+ KMessageBox::sorry( 0l, i18n("Could not open '%1' for writing. Check that you have write permissions").tqarg(url.path()), i18n("Saving File") );
return false;
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << toXML();
file.close();
}
@@ -205,12 +205,12 @@ bool ItemDocumentData::saveData( const KURL &url )
}
-QString ItemDocumentData::toXML()
+TQString ItemDocumentData::toXML()
{
- QDomDocument doc("KTechlab");
+ TQDomDocument doc("KTechlab");
//TODO Add revision information to save file
- QDomElement root = doc.createElement("document");
+ TQDomElement root = doc.createElement("document");
root.setAttribute( "type", documentTypeString() );
doc.appendChild(root);
@@ -218,7 +218,7 @@ QString ItemDocumentData::toXML()
const ItemDataMap::iterator end = m_itemDataMap.end();
for ( ItemDataMap::iterator it = m_itemDataMap.begin(); it != end; ++it )
{
- QDomElement node = itemDataToElement( doc, it.data() );
+ TQDomElement node = itemDataToElement( doc, it.data() );
node.setAttribute( "id", it.key() );
root.appendChild(node);
}
@@ -227,7 +227,7 @@ QString ItemDocumentData::toXML()
const ConnectorDataMap::iterator end = m_connectorDataMap.end();
for ( ConnectorDataMap::iterator it = m_connectorDataMap.begin(); it != end; ++it )
{
- QDomElement node = connectorDataToElement( doc, it.data() );
+ TQDomElement node = connectorDataToElement( doc, it.data() );
node.setAttribute( "id", it.key() );
root.appendChild(node);
}
@@ -236,14 +236,14 @@ QString ItemDocumentData::toXML()
const NodeDataMap::iterator end = m_nodeDataMap.end();
for ( NodeDataMap::iterator it = m_nodeDataMap.begin(); it != end; ++it )
{
- QDomElement node = nodeDataToElement( doc, it.data() );
+ TQDomElement node = nodeDataToElement( doc, it.data() );
node.setAttribute( "id", it.key() );
root.appendChild(node);
}
}
if ( m_documentType == Document::dt_flowcode )
{
- QDomElement node = microDataToElement(doc);
+ TQDomElement node = microDataToElement(doc);
root.appendChild(node);
}
@@ -252,19 +252,19 @@ QString ItemDocumentData::toXML()
-//BEGIN functions for generating / reading QDomElements
-QDomElement ItemDocumentData::microDataToElement( QDomDocument &doc )
+//BEGIN functions for generating / reading TQDomElements
+TQDomElement ItemDocumentData::microDataToElement( TQDomDocument &doc )
{
- QDomElement node = doc.createElement("micro");
+ TQDomElement node = doc.createElement("micro");
node.setAttribute( "id", m_microData.id );
{
const PinMappingMap::iterator end = m_microData.pinMappings.end();
for ( PinMappingMap::iterator it = m_microData.pinMappings.begin(); it != end; ++it )
{
- QDomElement pinMapNode = doc.createElement("pinmap");
+ TQDomElement pinMapNode = doc.createElement("pinmap");
- QString type;
+ TQString type;
switch ( it.data().type() )
{
case PinMapping::SevenSegment:
@@ -295,7 +295,7 @@ QDomElement ItemDocumentData::microDataToElement( QDomDocument &doc )
const PinDataMap::iterator end = m_microData.pinMap.end();
for ( PinDataMap::iterator it = m_microData.pinMap.begin(); it != end; ++it )
{
- QDomElement pinNode = doc.createElement("pin");
+ TQDomElement pinNode = doc.createElement("pin");
pinNode.setAttribute( "id", it.key() );
pinNode.setAttribute( "type", (it.data().type == PinSettings::pt_input) ? "input" : "output" );
@@ -306,10 +306,10 @@ QDomElement ItemDocumentData::microDataToElement( QDomDocument &doc )
}
{
- const QStringMap::iterator end = m_microData.variableMap.end();
- for ( QStringMap::iterator it = m_microData.variableMap.begin(); it != end; ++it )
+ const TQStringMap::iterator end = m_microData.variableMap.end();
+ for ( TQStringMap::iterator it = m_microData.variableMap.begin(); it != end; ++it )
{
- QDomElement variableNode = doc.createElement("variable");
+ TQDomElement variableNode = doc.createElement("variable");
variableNode.setAttribute( "name", it.key() );
variableNode.setAttribute( "value", it.data() );
@@ -322,12 +322,12 @@ QDomElement ItemDocumentData::microDataToElement( QDomDocument &doc )
}
-void ItemDocumentData::elementToMicroData( QDomElement element )
+void ItemDocumentData::elementToMicroData( TQDomElement element )
{
- QString id = element.attribute( "id", QString::null );
+ TQString id = element.attribute( "id", TQString() );
if ( id.isNull() )
- id = element.attribute( "pic", QString::null );
+ id = element.attribute( "pic", TQString() );
if ( id.isNull() )
{
@@ -338,18 +338,18 @@ void ItemDocumentData::elementToMicroData( QDomElement element )
m_microData.reset();
m_microData.id = id;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() )
{
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() )
{
- const QString tagName = childElement.tagName();
+ const TQString tagName = childElement.tagName();
if ( tagName == "pinmap" )
{
- QString id = childElement.attribute( "id", QString::null );
- QString typeString = childElement.attribute( "type", QString::null );
+ TQString id = childElement.attribute( "id", TQString() );
+ TQString typeString = childElement.attribute( "type", TQString() );
if ( !id.isEmpty() && !typeString.isEmpty() )
{
@@ -365,7 +365,7 @@ void ItemDocumentData::elementToMicroData( QDomElement element )
type = PinMapping::Keypad_4x4;
PinMapping pinMapping( type );
- pinMapping.setPins( QStringList::split( " ", childElement.attribute( "map", 0 ) ) );
+ pinMapping.setPins( TQStringList::split( " ", childElement.attribute( "map", 0 ) ) );
m_microData.pinMappings[id] = pinMapping;
}
@@ -373,7 +373,7 @@ void ItemDocumentData::elementToMicroData( QDomElement element )
else if ( tagName == "pin" )
{
- QString pinID = childElement.attribute( "id", QString::null );
+ TQString pinID = childElement.attribute( "id", TQString() );
if ( !pinID.isEmpty() )
{
m_microData.pinMap[pinID].type = (childElement.attribute( "type", "input" ) == "input" ) ? PinSettings::pt_input : PinSettings::pt_output;
@@ -383,8 +383,8 @@ void ItemDocumentData::elementToMicroData( QDomElement element )
else if ( tagName == "variable" )
{
- QString variableId = childElement.attribute( "name", QString::null );
- m_microData.variableMap[variableId] = childElement.attribute( "value", QString::null );
+ TQString variableId = childElement.attribute( "name", TQString() );
+ m_microData.variableMap[variableId] = childElement.attribute( "value", TQString() );
}
else
@@ -396,9 +396,9 @@ void ItemDocumentData::elementToMicroData( QDomElement element )
}
-QDomElement ItemDocumentData::itemDataToElement( QDomDocument &doc, const ItemData &itemData )
+TQDomElement ItemDocumentData::itemDataToElement( TQDomDocument &doc, const ItemData &itemData )
{
- QDomElement node = doc.createElement("item");
+ TQDomElement node = doc.createElement("item");
node.setAttribute( "type", itemData.type );
node.setAttribute( "x", itemData.x );
node.setAttribute( "y", itemData.y );
@@ -423,13 +423,13 @@ QDomElement ItemDocumentData::itemDataToElement( QDomDocument &doc, const ItemDa
node.setAttribute( "flip", itemData.flipped );
}
- if ( !itemData.parentId.isEmpty() )
- node.setAttribute( "parent", itemData.parentId );
+ if ( !itemData.tqparentId.isEmpty() )
+ node.setAttribute( "tqparent", itemData.tqparentId );
- const QStringMap::const_iterator stringEnd = itemData.dataString.end();
- for ( QStringMap::const_iterator it = itemData.dataString.begin(); it != stringEnd; ++it )
+ const TQStringMap::const_iterator stringEnd = itemData.dataString.end();
+ for ( TQStringMap::const_iterator it = itemData.dataString.begin(); it != stringEnd; ++it )
{
- QDomElement e = doc.createElement("data");
+ TQDomElement e = doc.createElement("data");
node.appendChild(e);
e.setAttribute( "id", it.key() );
e.setAttribute( "type", "string" );
@@ -439,27 +439,27 @@ QDomElement ItemDocumentData::itemDataToElement( QDomDocument &doc, const ItemDa
const DoubleMap::const_iterator numberEnd = itemData.dataNumber.end();
for ( DoubleMap::const_iterator it = itemData.dataNumber.begin(); it != numberEnd; ++it )
{
- QDomElement e = doc.createElement("data");
+ TQDomElement e = doc.createElement("data");
node.appendChild(e);
e.setAttribute( "id", it.key() );
e.setAttribute( "type", "number" );
- e.setAttribute( "value", QString::number(it.data()) );
+ e.setAttribute( "value", TQString::number(it.data()) );
}
- const QColorMap::const_iterator colorEnd = itemData.dataColor.end();
- for ( QColorMap::const_iterator it = itemData.dataColor.begin(); it != colorEnd; ++it )
+ const TQColorMap::const_iterator colorEnd = itemData.dataColor.end();
+ for ( TQColorMap::const_iterator it = itemData.dataColor.begin(); it != colorEnd; ++it )
{
- QDomElement e = doc.createElement("data");
+ TQDomElement e = doc.createElement("data");
node.appendChild(e);
e.setAttribute( "id", it.key() );
e.setAttribute( "type", "color" );
e.setAttribute( "value", it.data().name() );
}
- const QBitArrayMap::const_iterator rawEnd = itemData.dataRaw.end();
- for ( QBitArrayMap::const_iterator it = itemData.dataRaw.begin(); it != rawEnd; ++it )
+ const TQBitArrayMap::const_iterator rawEnd = itemData.dataRaw.end();
+ for ( TQBitArrayMap::const_iterator it = itemData.dataRaw.begin(); it != rawEnd; ++it )
{
- QDomElement e = doc.createElement("data");
+ TQDomElement e = doc.createElement("data");
node.appendChild(e);
e.setAttribute( "id", it.key() );
e.setAttribute( "type", "raw" );
@@ -469,38 +469,38 @@ QDomElement ItemDocumentData::itemDataToElement( QDomDocument &doc, const ItemDa
const BoolMap::const_iterator boolEnd = itemData.dataBool.end();
for ( BoolMap::const_iterator it = itemData.dataBool.begin(); it != boolEnd; ++it )
{
- QDomElement e = doc.createElement("data");
+ TQDomElement e = doc.createElement("data");
node.appendChild(e);
e.setAttribute( "id", it.key() );
e.setAttribute( "type", "bool" );
- e.setAttribute( "value", QString::number(it.data()) );
+ e.setAttribute( "value", TQString::number(it.data()) );
}
const BoolMap::const_iterator buttonEnd = itemData.buttonMap.end();
for ( BoolMap::const_iterator it = itemData.buttonMap.begin(); it != buttonEnd; ++it )
{
- QDomElement e = doc.createElement("button");
+ TQDomElement e = doc.createElement("button");
node.appendChild(e);
e.setAttribute( "id", it.key() );
- e.setAttribute( "state", QString::number(it.data()) );
+ e.setAttribute( "state", TQString::number(it.data()) );
}
const IntMap::const_iterator sliderEnd = itemData.sliderMap.end();
for ( IntMap::const_iterator it = itemData.sliderMap.begin(); it != sliderEnd; ++it )
{
- QDomElement e = doc.createElement("slider");
+ TQDomElement e = doc.createElement("slider");
node.appendChild(e);
e.setAttribute( "id", it.key() );
- e.setAttribute( "value", QString::number(it.data()) );
+ e.setAttribute( "value", TQString::number(it.data()) );
}
return node;
}
-void ItemDocumentData::elementToItemData( QDomElement element )
+void ItemDocumentData::elementToItemData( TQDomElement element )
{
- QString id = element.attribute( "id", QString::null );
+ TQString id = element.attribute( "id", TQString() );
if ( id.isNull() )
{
kdError() << k_funcinfo << "Could not find id in element" << endl;
@@ -508,7 +508,7 @@ void ItemDocumentData::elementToItemData( QDomElement element )
}
ItemData itemData;
- itemData.type = element.attribute( "type", QString::null );
+ itemData.type = element.attribute( "type", TQString() );
itemData.x = element.attribute( "x", "120" ).toInt();
itemData.y = element.attribute( "y", "120" ).toInt();
itemData.z = element.attribute( "z", "-1" ).toInt();
@@ -517,7 +517,7 @@ void ItemDocumentData::elementToItemData( QDomElement element )
element.hasAttribute("height") )
{
itemData.setSize = true;
- itemData.size = QRect( element.attribute( "offset-x", "0" ).toInt(),
+ itemData.size = TQRect( element.attribute( "offset-x", "0" ).toInt(),
element.attribute( "offset-y", "0" ).toInt(),
element.attribute( "width", "120" ).toInt(),
element.attribute( "height", "120" ).toInt() );
@@ -528,45 +528,45 @@ void ItemDocumentData::elementToItemData( QDomElement element )
itemData.angleDegrees = element.attribute( "angle", "0" ).toInt();
itemData.flipped = element.attribute( "flip", "0" ).toInt();
itemData.orientation = element.attribute( "orientation", "-1" ).toInt();
- itemData.parentId = element.attribute( "parent", QString::null );
+ itemData.tqparentId = element.attribute( "tqparent", TQString() );
m_itemDataMap[id] = itemData;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() )
{
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() )
{
- const QString tagName = childElement.tagName();
+ const TQString tagName = childElement.tagName();
if ( tagName == "item" )
{
// We're reading in a file saved in the older format, with
// child items nestled, so we must specify that the new item
- // has the currently parsed item as its parent.
+ // has the currently parsed item as its tqparent.
elementToItemData(childElement);
- QString childId = childElement.attribute( "id", QString::null );
+ TQString childId = childElement.attribute( "id", TQString() );
if ( !childId.isNull() )
- m_itemDataMap[childId].parentId = id;
+ m_itemDataMap[childId].tqparentId = id;
}
else if ( tagName == "data" )
{
- QString dataId = childElement.attribute( "id", QString::null );
+ TQString dataId = childElement.attribute( "id", TQString() );
if ( !dataId.isNull() )
{
- QString dataType = childElement.attribute( "type", QString::null );
- QString value = childElement.attribute( "value", QString::null );
+ TQString dataType = childElement.attribute( "type", TQString() );
+ TQString value = childElement.attribute( "value", TQString() );
if ( dataType == "string" || dataType == "multiline" )
m_itemDataMap[id].dataString[dataId] = value;
else if ( dataType == "number" )
m_itemDataMap[id].dataNumber[dataId] = value.toDouble();
else if ( dataType == "color" )
- m_itemDataMap[id].dataColor[dataId] = QColor(value);
+ m_itemDataMap[id].dataColor[dataId] = TQColor(value);
else if ( dataType == "raw" )
- m_itemDataMap[id].dataRaw[dataId] = toQBitArray(value);
+ m_itemDataMap[id].dataRaw[dataId] = toTQBitArray(value);
else if ( dataType == "bool" )
m_itemDataMap[id].dataBool[dataId] = bool(value.toInt());
else
@@ -576,14 +576,14 @@ void ItemDocumentData::elementToItemData( QDomElement element )
else if ( tagName == "button" )
{
- QString buttonId = childElement.attribute( "id", QString::null );
+ TQString buttonId = childElement.attribute( "id", TQString() );
if ( !buttonId.isNull() )
m_itemDataMap[id].buttonMap[buttonId] = childElement.attribute( "state", "0" ).toInt();
}
else if ( tagName == "slider" )
{
- QString sliderId = childElement.attribute( "id", QString::null );
+ TQString sliderId = childElement.attribute( "id", TQString() );
if ( !sliderId.isNull() )
m_itemDataMap[id].sliderMap[sliderId] = childElement.attribute( "value", "0" ).toInt();
}
@@ -600,18 +600,18 @@ void ItemDocumentData::elementToItemData( QDomElement element )
}
-QDomElement ItemDocumentData::nodeDataToElement( QDomDocument &doc, const NodeData &nodeData )
+TQDomElement ItemDocumentData::nodeDataToElement( TQDomDocument &doc, const NodeData &nodeData )
{
- QDomElement node = doc.createElement("node");
+ TQDomElement node = doc.createElement("node");
node.setAttribute( "x", nodeData.x );
node.setAttribute( "y", nodeData.y );
return node;
}
-void ItemDocumentData::elementToNodeData( QDomElement element )
+void ItemDocumentData::elementToNodeData( TQDomElement element )
{
- QString id = element.attribute( "id", QString::null );
+ TQString id = element.attribute( "id", TQString() );
if ( id.isNull() )
{
kdError() << k_funcinfo << "Could not find id in element" << endl;
@@ -626,18 +626,18 @@ void ItemDocumentData::elementToNodeData( QDomElement element )
}
-QDomElement ItemDocumentData::connectorDataToElement( QDomDocument &doc, const ConnectorData &connectorData )
+TQDomElement ItemDocumentData::connectorDataToElement( TQDomDocument &doc, const ConnectorData &connectorData )
{
- QDomElement node = doc.createElement("connector");
+ TQDomElement node = doc.createElement("connector");
node.setAttribute( "manual-route", connectorData.manualRoute );
- QString route;
- const QPointList::const_iterator end = connectorData.route.end();
- for ( QPointList::const_iterator it = connectorData.route.begin(); it != end; ++it )
+ TQString route;
+ const TQPointList::const_iterator end = connectorData.route.end();
+ for ( TQPointList::const_iterator it = connectorData.route.begin(); it != end; ++it )
{
- route.append( QString::number((*it).x())+"," );
- route.append( QString::number((*it).y())+"," );
+ route.append( TQString::number((*it).x())+"," );
+ route.append( TQString::number((*it).y())+"," );
}
node.setAttribute( "route", route );
@@ -645,7 +645,7 @@ QDomElement ItemDocumentData::connectorDataToElement( QDomDocument &doc, const C
{
node.setAttribute( "start-node-is-child", 1 );
node.setAttribute( "start-node-cid", connectorData.startNodeCId );
- node.setAttribute( "start-node-parent", connectorData.startNodeParent );
+ node.setAttribute( "start-node-tqparent", connectorData.startNodeParent );
}
else
{
@@ -658,7 +658,7 @@ QDomElement ItemDocumentData::connectorDataToElement( QDomDocument &doc, const C
{
node.setAttribute( "end-node-is-child", 1 );
node.setAttribute( "end-node-cid", connectorData.endNodeCId );
- node.setAttribute( "end-node-parent", connectorData.endNodeParent );
+ node.setAttribute( "end-node-tqparent", connectorData.endNodeParent );
}
else
{
@@ -670,9 +670,9 @@ QDomElement ItemDocumentData::connectorDataToElement( QDomDocument &doc, const C
}
-void ItemDocumentData::elementToConnectorData( QDomElement element )
+void ItemDocumentData::elementToConnectorData( TQDomElement element )
{
- QString id = element.attribute( "id", QString::null );
+ TQString id = element.attribute( "id", TQString() );
if ( id.isNull() )
{
kdError() << k_funcinfo << "Could not find id in element" << endl;
@@ -682,47 +682,47 @@ void ItemDocumentData::elementToConnectorData( QDomElement element )
ConnectorData connectorData;
connectorData.manualRoute = element.attribute( "manual-route", "0" );
- QString route = element.attribute( "route", "" );
+ TQString route = element.attribute( "route", "" );
- QStringList points = QStringList::split( ",", route );
- const QStringList::iterator end = points.end();
- for ( QStringList::iterator it = points.begin(); it != end; ++it )
+ TQStringList points = TQStringList::split( ",", route );
+ const TQStringList::iterator end = points.end();
+ for ( TQStringList::iterator it = points.begin(); it != end; ++it )
{
int x = (*it).toInt();
it++;
if ( it != end )
{
int y = (*it).toInt();
- connectorData.route.append( QPoint(x,y) );
+ connectorData.route.append( TQPoint(x,y) );
}
}
connectorData.startNodeIsChild = element.attribute( "start-node-is-child", "0" ).toInt();
if ( connectorData.startNodeIsChild )
{
- connectorData.startNodeCId = element.attribute( "start-node-cid", QString::null );
- connectorData.startNodeParent = element.attribute( "start-node-parent", QString::null );
+ connectorData.startNodeCId = element.attribute( "start-node-cid", TQString() );
+ connectorData.startNodeParent = element.attribute( "start-node-tqparent", TQString() );
}
else
- connectorData.startNodeId = element.attribute( "start-node-id", QString::null );
+ connectorData.startNodeId = element.attribute( "start-node-id", TQString() );
connectorData.endNodeIsChild = element.attribute( "end-node-is-child", "0" ).toInt();
if ( connectorData.endNodeIsChild )
{
- connectorData.endNodeCId = element.attribute( "end-node-cid", QString::null );
- connectorData.endNodeParent = element.attribute( "end-node-parent", QString::null );
+ connectorData.endNodeCId = element.attribute( "end-node-cid", TQString() );
+ connectorData.endNodeParent = element.attribute( "end-node-tqparent", TQString() );
}
else
- connectorData.endNodeId = element.attribute( "end-node-id", QString::null );
+ connectorData.endNodeId = element.attribute( "end-node-id", TQString() );
m_connectorDataMap[id] = connectorData;
}
-//END functions for generating / reading QDomElements
+//END functions for generating / reading TQDomElements
-QString ItemDocumentData::documentTypeString() const
+TQString ItemDocumentData::documentTypeString() const
{
switch (m_documentType)
{
@@ -744,7 +744,7 @@ QString ItemDocumentData::documentTypeString() const
}
-QString ItemDocumentData::revisionString() const
+TQString ItemDocumentData::revisionString() const
{
return "1";
}
@@ -780,9 +780,9 @@ void ItemDocumentData::generateUniqueIDs( ItemDocument *itemDocument )
if (!itemDocument)
return;
- QStringMap replaced;
- replaced[""] = QString::null;
- replaced[QString::null] = QString::null;
+ TQStringMap replaced;
+ replaced[""] = TQString();
+ replaced[TQString()] = TQString();
ItemDataMap newItemDataMap;
ConnectorDataMap newConnectorDataMap;
@@ -793,7 +793,7 @@ void ItemDocumentData::generateUniqueIDs( ItemDocument *itemDocument )
const ItemDataMap::iterator end = m_itemDataMap.end();
for ( ItemDataMap::iterator it = m_itemDataMap.begin(); it != end; ++it )
{
- if ( !replaced.contains( it.key() ) )
+ if ( !replaced.tqcontains( it.key() ) )
replaced[it.key()] = itemDocument->generateUID(it.key());
newItemDataMap[replaced[it.key()]] = it.data();
@@ -803,7 +803,7 @@ void ItemDocumentData::generateUniqueIDs( ItemDocument *itemDocument )
const NodeDataMap::iterator end = m_nodeDataMap.end();
for ( NodeDataMap::iterator it = m_nodeDataMap.begin(); it != end; ++it )
{
- if ( !replaced.contains( it.key() ) )
+ if ( !replaced.tqcontains( it.key() ) )
replaced[it.key()] = itemDocument->generateUID(it.key());
newNodeDataMap[replaced[it.key()]] = it.data();
@@ -813,7 +813,7 @@ void ItemDocumentData::generateUniqueIDs( ItemDocument *itemDocument )
const ConnectorDataMap::iterator end = m_connectorDataMap.end();
for ( ConnectorDataMap::iterator it = m_connectorDataMap.begin(); it != end; ++it )
{
- if ( !replaced.contains( it.key() ) )
+ if ( !replaced.tqcontains( it.key() ) )
replaced[it.key()] = itemDocument->generateUID(it.key());
newConnectorDataMap[replaced[it.key()]] = it.data();
@@ -826,7 +826,7 @@ void ItemDocumentData::generateUniqueIDs( ItemDocument *itemDocument )
const ItemDataMap::iterator end = newItemDataMap.end();
for ( ItemDataMap::iterator it = newItemDataMap.begin(); it != end; ++it )
{
- it.data().parentId = replaced[it.data().parentId];
+ it.data().tqparentId = replaced[it.data().tqparentId];
}
}
{
@@ -872,10 +872,10 @@ void ItemDocumentData::translateContents( int dx, int dy )
const ConnectorDataMap::iterator end = m_connectorDataMap.end();
for ( ConnectorDataMap::iterator it = m_connectorDataMap.begin(); it != end; ++it )
{
- const QPointList::iterator routeEnd = it.data().route.end();
- for ( QPointList::iterator routeIt = it.data().route.begin(); routeIt != routeEnd; ++routeIt )
+ const TQPointList::iterator routeEnd = it.data().route.end();
+ for ( TQPointList::iterator routeIt = it.data().route.begin(); routeIt != routeEnd; ++routeIt )
{
- *routeIt += QPoint( dx/8, dy/8 );
+ *routeIt += TQPoint( dx/8, dy/8 );
}
}
}
@@ -966,12 +966,12 @@ void ItemDocumentData::mergeWithDocument( ItemDocument *itemDocument, bool selec
{
if ( !icnd->nodeWithID( it.key() ) )
{
- QString id = it.key();
+ TQString id = it.key();
if ( itemDocument->type() == Document::dt_circuit )
- new ECNode( icnd, Node::ec_junction, Node::dir_up, QPoint( int(it.data().x), int(it.data().y) ), &id );
+ new ECNode( icnd, Node::ec_junction, Node::dir_up, TQPoint( int(it.data().x), int(it.data().y) ), &id );
else if ( itemDocument->type() == Document::dt_flowcode )
- new FPNode( icnd, Node::fp_junction, Node::dir_up, QPoint( int(it.data().x), int(it.data().y) ), &id );
+ new FPNode( icnd, Node::fp_junction, Node::dir_up, TQPoint( int(it.data().x), int(it.data().y) ), &id );
}
}
for ( NodeDataMap::iterator it = m_nodeDataMap.begin(); it != nodeEnd; ++it )
@@ -1000,8 +1000,8 @@ void ItemDocumentData::mergeWithDocument( ItemDocument *itemDocument, bool selec
}
if (item)
{
- //HACK We move the item now before restoreFromItemData is called later, in case it is to be parented
- //(as we don't want to move children)...
+ //HACK We move the item now before restoreFromItemData is called later, in case it is to be tqparented
+ //(as we don't want to move tqchildren)...
item->move( it.data().x, it.data().y );
}
}
@@ -1029,7 +1029,7 @@ void ItemDocumentData::mergeWithDocument( ItemDocument *itemDocument, bool selec
if ( icnd->connectorWithID( it.key() ) )
continue;
- QString id = it.key();
+ TQString id = it.key();
Node *startNode = 0l;
Node *endNode = 0l;
@@ -1037,7 +1037,7 @@ void ItemDocumentData::mergeWithDocument( ItemDocument *itemDocument, bool selec
{
CNItem *item = icnd->cnItemWithID( it.data().startNodeParent );
if (!item)
- kdError() << k_funcinfo << "Unable to find node parent with id: "<<it.data().startNodeParent<<endl;
+ kdError() << k_funcinfo << "Unable to find node tqparent with id: "<<it.data().startNodeParent<<endl;
else
startNode = item->childNode( it.data().startNodeCId );
}
@@ -1048,7 +1048,7 @@ void ItemDocumentData::mergeWithDocument( ItemDocument *itemDocument, bool selec
{
CNItem *item = icnd->cnItemWithID( it.data().endNodeParent );
if (!item)
- kdError() << k_funcinfo << "Unable to find node parent with id: "<<it.data().endNodeParent<<endl;
+ kdError() << k_funcinfo << "Unable to find node tqparent with id: "<<it.data().endNodeParent<<endl;
else
endNode = item->childNode( it.data().endNodeCId );
}
@@ -1139,19 +1139,19 @@ void ItemDocumentData::addNodes( const NodeList &nodeList )
}
-void ItemDocumentData::addItemData( ItemData itemData, QString id )
+void ItemDocumentData::addItemData( ItemData itemData, TQString id )
{
m_itemDataMap[id] = itemData;
}
-void ItemDocumentData::addConnectorData( ConnectorData connectorData, QString id )
+void ItemDocumentData::addConnectorData( ConnectorData connectorData, TQString id )
{
m_connectorDataMap[id] = connectorData;
}
-void ItemDocumentData::addNodeData( NodeData nodeData, QString id )
+void ItemDocumentData::addNodeData( NodeData nodeData, TQString id )
{
m_nodeDataMap[id] = nodeData;
}
@@ -1208,7 +1208,7 @@ MicroData::MicroData()
void MicroData::reset()
{
- id = QString::null;
+ id = TQString();
pinMap.clear();
}
//END class MicroData
@@ -1229,7 +1229,7 @@ void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
generateUniqueIDs( ecSubcircuit->itemDocument() );
// Generate a list of the External Connections, sorting by x coordinate
- std::multimap< double, QString > extCon;
+ std::multimap< double, TQString > extCon;
ItemDataMap::iterator itemEnd = m_itemDataMap.end();
for ( ItemDataMap::iterator it = m_itemDataMap.begin(); it != itemEnd; ++it )
{
@@ -1241,12 +1241,12 @@ void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
ecSubcircuit->setNumExtCon(extCon.size());
// Sort the connections into the pins of the subcircuit by y coordinate
- std::multimap< double, QString > leftPins;
- std::multimap< double, QString > rightPins;
+ std::multimap< double, TQString > leftPins;
+ std::multimap< double, TQString > rightPins;
int at = 0;
int size = (extCon.size()/2) + (extCon.size()%2);
- const std::multimap< double, QString >::iterator extConEnd = extCon.end();
- for ( std::multimap< double, QString >::iterator it = extCon.begin(); it != extConEnd; ++it )
+ const std::multimap< double, TQString >::iterator extConEnd = extCon.end();
+ for ( std::multimap< double, TQString >::iterator it = extCon.begin(); it != extConEnd; ++it )
{
if ( at < size )
leftPins.insert( std::make_pair( m_itemDataMap[it->second].y, it->second ) );
@@ -1257,22 +1257,22 @@ void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
// Remove the external connections (recording their names and associated numerical position)
int nodeId = 0;
- typedef QMap<QString,int> IntMap;
+ typedef TQMap<TQString,int> IntMap;
IntMap nodeMap;
- const std::multimap< double, QString >::iterator leftPinsEnd = leftPins.end();
- for ( std::multimap< double, QString >::iterator it = leftPins.begin(); it != leftPinsEnd; ++it )
+ const std::multimap< double, TQString >::iterator leftPinsEnd = leftPins.end();
+ for ( std::multimap< double, TQString >::iterator it = leftPins.begin(); it != leftPinsEnd; ++it )
{
nodeMap[ it->second ] = nodeId;
- ecSubcircuit->setExtConName( nodeId, m_itemDataMap[ it->second ].dataString["name"].data() );
+ ecSubcircuit->setExtConName( nodeId, m_itemDataMap[ it->second ].dataString["name"] );
nodeId++;
m_itemDataMap.remove( it->second );
}
nodeId = extCon.size()-1;
- const std::multimap< double, QString >::iterator rightPinsEnd = rightPins.end();
- for ( std::multimap< double, QString >::iterator it = rightPins.begin(); it != rightPinsEnd; ++it )
+ const std::multimap< double, TQString >::iterator rightPinsEnd = rightPins.end();
+ for ( std::multimap< double, TQString >::iterator it = rightPins.begin(); it != rightPinsEnd; ++it )
{
nodeMap[ it->second ] = nodeId;
- ecSubcircuit->setExtConName( nodeId, m_itemDataMap[ it->second ].dataString["name"].data() );
+ ecSubcircuit->setExtConName( nodeId, m_itemDataMap[ it->second ].dataString["name"] );
nodeId--;
m_itemDataMap.remove( it->second );
}
@@ -1281,15 +1281,15 @@ void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
const ConnectorDataMap::iterator connectorEnd = m_connectorDataMap.end();
for ( ConnectorDataMap::iterator it = m_connectorDataMap.begin(); it != connectorEnd; ++it )
{
- if ( it.data().startNodeIsChild && nodeMap.contains(it.data().startNodeParent ) )
+ if ( it.data().startNodeIsChild && nodeMap.tqcontains(it.data().startNodeParent ) )
{
- it.data().startNodeCId = QString::number( nodeMap[it.data().startNodeParent] );
+ it.data().startNodeCId = TQString::number( nodeMap[it.data().startNodeParent] );
it.data().startNodeParent = ecSubcircuit->id();
}
- if ( it.data().endNodeIsChild && nodeMap.contains(it.data().endNodeParent ) )
+ if ( it.data().endNodeIsChild && nodeMap.tqcontains(it.data().endNodeParent ) )
{
- it.data().endNodeCId = QString::number( nodeMap[it.data().endNodeParent] );
+ it.data().endNodeCId = TQString::number( nodeMap[it.data().endNodeParent] );
it.data().endNodeParent = ecSubcircuit->id();
}
}
@@ -1308,7 +1308,7 @@ void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
component->updateConnectorPoints(false);
component->setVisible(false);
component->setCanvas(0l);
- ecSubcircuit->connect( ecSubcircuit, SIGNAL(subcircuitDeleted()), component, SLOT(removeItem()) );
+ ecSubcircuit->connect( ecSubcircuit, TQT_SIGNAL(subcircuitDeleted()), component, TQT_SLOT(removeItem()) );
}
}
for ( ConnectorDataMap::iterator it = m_connectorDataMap.begin(); it != connectorEnd; ++it )
@@ -1319,7 +1319,7 @@ void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
connector->updateConnectorPoints(false);
connector->setVisible(false);
connector->setCanvas(0l);
- ecSubcircuit->connect( ecSubcircuit, SIGNAL(subcircuitDeleted()), connector, SLOT(removeConnector()) );
+ ecSubcircuit->connect( ecSubcircuit, TQT_SIGNAL(subcircuitDeleted()), connector, TQT_SLOT(removeConnector()) );
}
}
const NodeDataMap::iterator nodeEnd = m_nodeDataMap.end();
@@ -1330,7 +1330,7 @@ void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
{
node->setVisible(false);
node->setCanvas(0l);
- ecSubcircuit->connect( ecSubcircuit, SIGNAL(subcircuitDeleted()), node, SLOT(removeNode()) );
+ ecSubcircuit->connect( ecSubcircuit, TQT_SIGNAL(subcircuitDeleted()), node, TQT_SLOT(removeNode()) );
}
}
diff --git a/src/itemdocumentdata.h b/src/itemdocumentdata.h
index 40c92a6..b5e349a 100644
--- a/src/itemdocumentdata.h
+++ b/src/itemdocumentdata.h
@@ -14,7 +14,7 @@
#include "item.h"
#include "microsettings.h"
-#include <qdom.h>
+#include <tqdom.h>
class Connector;
class ECSubcircuit;
@@ -22,18 +22,18 @@ class KURL;
class Node;
class PinMapping;
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
-typedef QValueList<QGuardedPtr<Item> > ItemList;
-typedef QValueList<QGuardedPtr<Node> > NodeList;
-typedef QMap< QString, PinMapping > PinMappingMap;
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<TQGuardedPtr<Item> > ItemList;
+typedef TQValueList<TQGuardedPtr<Node> > NodeList;
+typedef TQMap< TQString, PinMapping > PinMappingMap;
-typedef QValueList<QPoint> QPointList;
-typedef QMap<QString, bool> BoolMap;
-typedef QMap<QString, double> DoubleMap;
-typedef QMap<QString, int> IntMap;
-typedef QMap<QString, QColor> QColorMap;
-typedef QMap<QString, QString> QStringMap;
-typedef QMap<QString, QBitArray> QBitArrayMap;
+typedef TQValueList<TQPoint> TQPointList;
+typedef TQMap<TQString, bool> BoolMap;
+typedef TQMap<TQString, double> DoubleMap;
+typedef TQMap<TQString, int> IntMap;
+typedef TQMap<TQString, TQColor> TQColorMap;
+typedef TQMap<TQString, TQString> TQStringMap;
+typedef TQMap<TQString, TQBitArray> TQBitArrayMap;
class ItemData
@@ -41,25 +41,25 @@ class ItemData
public:
ItemData();
- QString type;
+ TQString type;
double x;
double y;
int z;
- QRect size;
+ TQRect size;
bool setSize;
int orientation; // used for flowparts, should be set to -1 if not used.
double angleDegrees;
bool flipped;
BoolMap buttonMap;
IntMap sliderMap;
- QString parentId;
+ TQString tqparentId;
BoolMap dataBool;
DoubleMap dataNumber;
- QColorMap dataColor;
- QStringMap dataString;
- QBitArrayMap dataRaw;
+ TQColorMap dataColor;
+ TQStringMap dataString;
+ TQBitArrayMap dataRaw;
};
-typedef QMap< QString, ItemData > ItemDataMap;
+typedef TQMap< TQString, ItemData > ItemDataMap;
class ConnectorData
@@ -67,22 +67,22 @@ class ConnectorData
public:
ConnectorData();
- QPointList route;
+ TQPointList route;
bool manualRoute;
bool startNodeIsChild;
bool endNodeIsChild;
- QString startNodeCId;
- QString endNodeCId;
+ TQString startNodeCId;
+ TQString endNodeCId;
- QString startNodeParent;
- QString endNodeParent;
+ TQString startNodeParent;
+ TQString endNodeParent;
- QString startNodeId;
- QString endNodeId;
+ TQString startNodeId;
+ TQString endNodeId;
};
-typedef QMap< QString, ConnectorData > ConnectorDataMap;
+typedef TQMap< TQString, ConnectorData > ConnectorDataMap;
class NodeData
@@ -93,7 +93,7 @@ class NodeData
double x;
double y;
};
-typedef QMap< QString, NodeData > NodeDataMap;
+typedef TQMap< TQString, NodeData > NodeDataMap;
class PinData
@@ -104,7 +104,7 @@ class PinData
PinSettings::pin_type type;
PinSettings::pin_state state;
};
-typedef QMap< QString, PinData > PinDataMap;
+typedef TQMap< TQString, PinData > PinDataMap;
class MicroData
@@ -113,9 +113,9 @@ class MicroData
MicroData();
void reset();
- QString id;
+ TQString id;
PinDataMap pinMap;
- QStringMap variableMap;
+ TQStringMap variableMap;
PinMappingMap pinMappings;
};
@@ -149,12 +149,12 @@ class ItemDocumentData
/**
* Returns the xml used for describing the data
*/
- QString toXML();
+ TQString toXML();
/**
* Restore the document from the given xml
* @return true if successful
*/
- bool fromXML( const QString &xml );
+ bool fromXML( const TQString &xml );
/**
* Saves the document to the data
*/
@@ -193,36 +193,36 @@ class ItemDocumentData
/**
* Add the given ItemData to the stored data
*/
- void addItemData( ItemData itemData, QString id );
+ void addItemData( ItemData itemData, TQString id );
/**
* Add the given ConnectorData to the stored data
*/
- void addConnectorData( ConnectorData connectorData, QString id );
+ void addConnectorData( ConnectorData connectorData, TQString id );
/**
* Add the given NodeData to the stored data
*/
- void addNodeData( NodeData nodeData, QString id );
+ void addNodeData( NodeData nodeData, TQString id );
//END functions for adding data
//BEGIN functions for returning strings for saving to xml
- QString documentTypeString() const;
- QString revisionString() const;
+ TQString documentTypeString() const;
+ TQString revisionString() const;
//END functions for returning strings for saving to xml
protected:
- //BEGIN functions for generating QDomElements
- QDomElement microDataToElement( QDomDocument &doc );
- QDomElement itemDataToElement( QDomDocument &doc, const ItemData &itemData );
- QDomElement nodeDataToElement( QDomDocument &doc, const NodeData &nodeData );
- QDomElement connectorDataToElement( QDomDocument &doc, const ConnectorData &connectorData );
- //END functions for generating QDomElements
+ //BEGIN functions for generating TQDomElements
+ TQDomElement microDataToElement( TQDomDocument &doc );
+ TQDomElement itemDataToElement( TQDomDocument &doc, const ItemData &itemData );
+ TQDomElement nodeDataToElement( TQDomDocument &doc, const NodeData &nodeData );
+ TQDomElement connectorDataToElement( TQDomDocument &doc, const ConnectorData &connectorData );
+ //END functions for generating TQDomElements
- //BEGIN functions for reading QDomElements to stored data
- void elementToMicroData( QDomElement element );
- void elementToItemData( QDomElement element );
- void elementToNodeData( QDomElement element );
- void elementToConnectorData( QDomElement element );
- //END functions for reading QDomElements to stored data
+ //BEGIN functions for reading TQDomElements to stored data
+ void elementToMicroData( TQDomElement element );
+ void elementToItemData( TQDomElement element );
+ void elementToNodeData( TQDomElement element );
+ void elementToConnectorData( TQDomElement element );
+ //END functions for reading TQDomElements to stored data
ItemDataMap m_itemDataMap;
ConnectorDataMap m_connectorDataMap;
diff --git a/src/itemgroup.cpp b/src/itemgroup.cpp
index 1b640d3..9abdfe0 100644
--- a/src/itemgroup.cpp
+++ b/src/itemgroup.cpp
@@ -13,18 +13,18 @@
#include "itemgroup.h"
#include "mechanicsdocument.h"
-#include <qtimer.h>
+#include <tqtimer.h>
ItemGroup::ItemGroup( ItemDocument *view, const char *name )
- : QObject( view, name )
+ : TQObject( view, name )
{
m_activeItem = 0l;
b_itemsAreSameType = true;
p_view = view;
p_icnDocument = dynamic_cast<ICNDocument*>(p_view);
p_mechanicsDocument = dynamic_cast<MechanicsDocument*>(p_view);
- QTimer::singleShot( 0, this, SLOT(getViewPtrs()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(getViewPtrs()) );
}
@@ -46,28 +46,28 @@ ItemList ItemGroup::items( bool excludeParentedItems ) const
return m_itemList;
ItemList items = m_itemList;
- ItemList parents = m_itemList;
+ ItemList tqparents = m_itemList;
uint oldSize = items.size();
do
{
oldSize = items.size();
- ItemList children;
+ ItemList tqchildren;
- ItemList::iterator end = parents.end();
- for ( ItemList::iterator it = parents.begin(); it != end; ++it )
- children += (*it)->children();
+ ItemList::iterator end = tqparents.end();
+ for ( ItemList::iterator it = tqparents.begin(); it != end; ++it )
+ tqchildren += (*it)->tqchildren();
- end = children.end();
- for ( ItemList::iterator it = children.begin(); it != end; ++it )
+ end = tqchildren.end();
+ for ( ItemList::iterator it = tqchildren.begin(); it != end; ++it )
{
- if ( children.contains(*it) > 1 )
+ if ( tqchildren.tqcontains(*it) > 1 )
*it = 0l;
}
- children.remove((Item*)0l);
+ tqchildren.remove((Item*)0l);
- items += children;
- parents = children;
+ items += tqchildren;
+ tqparents = tqchildren;
}
while ( oldSize != items.size() );
@@ -75,7 +75,7 @@ ItemList ItemGroup::items( bool excludeParentedItems ) const
}
-bool ItemGroup::itemsHaveSameDataValue( const QString &id ) const
+bool ItemGroup::itemsHaveSameDataValue( const TQString &id ) const
{
if ( m_itemList.size() < 1 ) {
return true;
@@ -87,7 +87,7 @@ bool ItemGroup::itemsHaveSameDataValue( const QString &id ) const
ItemList::const_iterator it = m_itemList.begin();
const ItemList::const_iterator end = m_itemList.end();
- QVariant firstData = (*it)->property(id)->value();
+ TQVariant firstData = (*it)->property(id)->value();
for ( ++it; it != end; ++it )
{
if ( (*it) && (*it)->property(id) && (*it)->property(id)->value() != firstData ) {
@@ -143,24 +143,24 @@ bool ItemGroup::itemsHaveDefaultData() const
void ItemGroup::registerItem( Item *item )
{
- if ( !item || m_itemList.contains(item) ) {
+ if ( !item || m_itemList.tqcontains(item) ) {
return;
}
m_itemList += item;
- updateAreSameStatus();
+ updateAreSametqStatus();
}
void ItemGroup::unregisterItem( Item *item )
{
if ( m_itemList.remove(item) > 0 ) {
- updateAreSameStatus();
+ updateAreSametqStatus();
}
}
-void ItemGroup::updateAreSameStatus()
+void ItemGroup::updateAreSametqStatus()
{
b_itemsAreSameType = true;
@@ -168,8 +168,8 @@ void ItemGroup::updateAreSameStatus()
return;
}
- QString activeId = (*m_itemList.begin())->id();
- int discardIndex = activeId.findRev("__");
+ TQString activeId = (*m_itemList.begin())->id();
+ int discardIndex = activeId.tqfindRev("__");
if ( discardIndex != -1 ) activeId.truncate(discardIndex);
const ItemList::iterator end = m_itemList.end();
@@ -177,8 +177,8 @@ void ItemGroup::updateAreSameStatus()
{
if (*it)
{
- QString id = (*it)->id();
- discardIndex = id.findRev("__");
+ TQString id = (*it)->id();
+ discardIndex = id.tqfindRev("__");
if ( discardIndex != -1 ) id.truncate(discardIndex);
if ( id != activeId )
{
diff --git a/src/itemgroup.h b/src/itemgroup.h
index 6913165..bf31cc1 100644
--- a/src/itemgroup.h
+++ b/src/itemgroup.h
@@ -11,7 +11,7 @@
#ifndef ITEMGROUP_H
#define ITEMGROUP_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class Item;
class ICNDocument;
@@ -21,19 +21,20 @@ class ItemGroup;
class MechanicsDocument;
class Variant;
-typedef QValueList<QGuardedPtr<Item> > ItemList;
+typedef TQValueList<TQGuardedPtr<Item> > ItemList;
-class QCanvasItem;
-class QCanvasItemList;
+class TQCanvasItem;
+class TQCanvasItemList;
/**
Generic base class for controlling a selection of Item. Provides
some functionality such as for dealing with item data
@author David Saxton
*/
-class ItemGroup : public QObject
+class ItemGroup : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
ItemGroup( ItemDocument *view, const char *name = 0 );
virtual ~ItemGroup();
@@ -45,10 +46,10 @@ public:
*/
Item *activeItem() const { return m_activeItem; }
uint itemCount() const { return m_itemList.count(); }
- virtual bool addQCanvasItem( QCanvasItem *qcanvasItem ) = 0;
- virtual void setItems( QCanvasItemList list ) = 0;
- virtual void removeQCanvasItem( QCanvasItem *qcanvasItem ) = 0;
- virtual bool contains( QCanvasItem *qcanvasItem ) const = 0;
+ virtual bool addTQCanvasItem( TQCanvasItem *qcanvasItem ) = 0;
+ virtual void setItems( TQCanvasItemList list ) = 0;
+ virtual void removeTQCanvasItem( TQCanvasItem *qcanvasItem ) = 0;
+ virtual bool tqcontains( TQCanvasItem *qcanvasItem ) const = 0;
virtual uint count() const = 0;
bool isEmpty() const { return (count() == 0); }
virtual void mergeGroup( ItemGroup *group ) = 0;
@@ -56,7 +57,7 @@ public:
virtual void deleteAllItems() = 0;
/**
* Returns a list of all the Items in the group.
- * @param excludeParented whether to return items whose (grand-) parents are
+ * @param excludeParented whether to return items whose (grand-) tqparents are
* already in the list.
*/
ItemList items( bool excludeParented = true ) const;
@@ -74,7 +75,7 @@ public:
* Returns truee iff either there are no items, or itemsAreSameType and the
* value of the data with the given id is the same for each item
*/
- bool itemsHaveSameDataValue( const QString &id ) const;
+ bool itemsHaveSameDataValue( const TQString &id ) const;
/**
* Returns true iff all the iff itemsHaveSameData() returns true and the
* value of the data are the defaults
@@ -123,7 +124,7 @@ protected:
* Subclasses must call this to unregister the item with the data interface
*/
void unregisterItem( Item *item );
- void updateAreSameStatus();
+ void updateAreSametqStatus();
ItemList m_itemList;
bool b_itemsAreSameType;
diff --git a/src/iteminterface.cpp b/src/iteminterface.cpp
index 6b9c1af..c1b3521 100644
--- a/src/iteminterface.cpp
+++ b/src/iteminterface.cpp
@@ -26,9 +26,9 @@
#include <knuminput.h>
#include <kurlrequester.h>
#include <ktoolbar.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <assert.h>
@@ -46,7 +46,7 @@ ItemInterface * ItemInterface::self( KTechlab * ktechlab )
ItemInterface::ItemInterface( KTechlab * ktechlab )
- : QObject(ktechlab),
+ : TQObject(ktechlab),
p_ktechlab(ktechlab)
{
m_pActiveItemEditorToolBar = 0;
@@ -74,8 +74,8 @@ void ItemInterface::slotItemDocumentChanged( ItemDocument * doc )
slotClearAll();
if ( ItemDocument * itemDocument = dynamic_cast<ItemDocument*>((Document*)p_cvb) )
{
- disconnect( itemDocument, SIGNAL(itemSelected(Item*)), this, SLOT(slotUpdateItemInterface()) );
- disconnect( itemDocument, SIGNAL(itemUnselected(Item*)), this, SLOT(slotUpdateItemInterface()) );
+ disconnect( itemDocument, TQT_SIGNAL(itemSelected(Item*)), this, TQT_SLOT(slotUpdateItemInterface()) );
+ disconnect( itemDocument, TQT_SIGNAL(itemUnselected(Item*)), this, TQT_SLOT(slotUpdateItemInterface()) );
}
p_itemGroup = 0l;
@@ -86,8 +86,8 @@ void ItemInterface::slotItemDocumentChanged( ItemDocument * doc )
if (!p_cvb)
return;
- connect( p_cvb, SIGNAL(itemSelected(Item*)), this, SLOT(slotUpdateItemInterface()) );
- connect( p_cvb, SIGNAL(itemUnselected(Item*)), this, SLOT(slotUpdateItemInterface()) );
+ connect( p_cvb, TQT_SIGNAL(itemSelected(Item*)), this, TQT_SLOT(slotUpdateItemInterface()) );
+ connect( p_cvb, TQT_SIGNAL(itemUnselected(Item*)), this, TQT_SLOT(slotUpdateItemInterface()) );
p_itemGroup = p_cvb->selectList();
@@ -159,7 +159,7 @@ void ItemInterface::slotUpdateItemInterface()
if ( m_pActiveItemEditorToolBar = dynamic_cast<KToolBar*>(p_ktechlab->factory()->container("itemEditorTB",itemView)) )
{
m_pActiveItemEditorToolBar->setFullSize( true );
- QWidget * widget = configWidget();
+ TQWidget * widget = configWidget();
m_toolBarWidgetID = 1;
m_pActiveItemEditorToolBar->insertWidget( m_toolBarWidgetID, 0, widget );
}
@@ -226,24 +226,24 @@ void ItemInterface::itemEditTBCleared()
// The bool specifies whether advanced data should be shown
-QWidget * ItemInterface::configWidget()
+TQWidget * ItemInterface::configWidget()
{
if ( !p_itemGroup || !p_itemGroup->activeItem() || !m_pActiveItemEditorToolBar )
return 0l;
VariantDataMap *variantMap = p_itemGroup->activeItem()->variantMap();
- QWidget * parent = m_pActiveItemEditorToolBar;
+ TQWidget * tqparent = m_pActiveItemEditorToolBar;
- // Create new widget with the toolbar or dialog as the parent
- QWidget * configWidget = new QWidget( parent, "tbConfigWidget" );
- configWidget->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 1, 1 ) );
+ // Create new widget with the toolbar or dialog as the tqparent
+ TQWidget * configWidget = new TQWidget( tqparent, "tbConfigWidget" );
+ configWidget->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, 1, 1 ) );
- QHBoxLayout * configLayout = new QHBoxLayout( configWidget );
+ TQHBoxLayout * configLayout = new TQHBoxLayout( configWidget );
// configLayout->setAutoAdd( true );
configLayout->setSpacing( 6 );
-// configLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+// configLayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
const VariantDataMap::iterator vaEnd = variantMap->end();
for ( VariantDataMap::iterator vait = variantMap->begin(); vait != vaEnd; ++vait )
@@ -254,11 +254,11 @@ QWidget * ItemInterface::configWidget()
const Variant::Type::Value type = vait.data()->type();
// common to all types apart from bool
- QString toolbarCaption = vait.data()->toolbarCaption();
+ TQString toolbarCaption = vait.data()->toolbarCaption();
if ( type != Variant::Type::Bool && !toolbarCaption.isEmpty() )
- configLayout->addWidget( new QLabel( toolbarCaption, configWidget ) );
+ configLayout->addWidget( new TQLabel( toolbarCaption, configWidget ) );
- QWidget * editWidget = 0l; // Should be set to the created widget
+ TQWidget * editWidget = 0l; // Should be set to the created widget
switch( type )
{
@@ -270,11 +270,11 @@ QWidget * ItemInterface::configWidget()
case Variant::Type::KeyPad:
case Variant::Type::SevenSegment:
{
- QString value = vait.data()->value().toString();
- if ( !value.isEmpty() && !vait.data()->allowed().contains(value) )
+ TQString value = vait.data()->value().toString();
+ if ( !value.isEmpty() && !vait.data()->allowed().tqcontains(value) )
vait.data()->appendAllowed(value);
- const QStringList allowed = vait.data()->allowed();
+ const TQStringList allowed = vait.data()->allowed();
KComboBox * box = new KComboBox(configWidget);
@@ -285,23 +285,23 @@ QWidget * ItemInterface::configWidget()
box->setEditable( true );
m_stringComboBoxMap[vait.key()] = box;
- connectMapWidget( box, SIGNAL(textChanged(const QString &)));
- connectMapWidget( box, SIGNAL(activated(const QString &)));
+ connectMapWidget( box, TQT_SIGNAL(textChanged(const TQString &)));
+ connectMapWidget( box, TQT_SIGNAL(activated(const TQString &)));
editWidget = box;
break;
}
case Variant::Type::FileName:
{
- QString value = vait.data()->value().toString();
- if ( !vait.data()->allowed().contains(value) )
+ TQString value = vait.data()->value().toString();
+ if ( !vait.data()->allowed().tqcontains(value) )
vait.data()->appendAllowed(value);
- const QStringList allowed = vait.data()->allowed();
+ const TQStringList allowed = vait.data()->allowed();
KURLComboRequester * urlreq = new KURLComboRequester( configWidget );
urlreq->setFilter( vait.data()->filter() );
- connectMapWidget( urlreq, SIGNAL(urlSelected(const QString &)) );
+ connectMapWidget( urlreq, TQT_SIGNAL(urlSelected(const TQString &)) );
m_stringURLReqMap[vait.key()] = urlreq;
KComboBox * box = urlreq->comboBox();
@@ -312,8 +312,8 @@ QWidget * ItemInterface::configWidget()
urlreq->setURL( vait.data()->value().toString() );
// Generally we only want a file name once the user has finished typing out the full file name.
- connectMapWidget( box, SIGNAL(returnPressed(const QString &)));
- connectMapWidget( box, SIGNAL(activated(const QString &)));
+ connectMapWidget( box, TQT_SIGNAL(returnPressed(const TQString &)));
+ connectMapWidget( box, TQT_SIGNAL(activated(const TQString &)));
editWidget = urlreq;
break;
@@ -323,7 +323,7 @@ QWidget * ItemInterface::configWidget()
KLineEdit * edit = new KLineEdit( configWidget );
edit->setText( vait.data()->value().toString() );
- connectMapWidget(edit,SIGNAL(textChanged(const QString &)));
+ connectMapWidget(edit,TQT_SIGNAL(textChanged(const TQString &)));
m_stringLineEditMap[vait.key()] = edit;
editWidget = edit;
break;
@@ -332,7 +332,7 @@ QWidget * ItemInterface::configWidget()
{
KIntSpinBox *spin = new KIntSpinBox( (int)vait.data()->minValue(), (int)vait.data()->maxValue(), 1, vait.data()->value().toInt(), 10, configWidget );
- connectMapWidget( spin, SIGNAL(valueChanged(int)) );
+ connectMapWidget( spin, TQT_SIGNAL(valueChanged(int)) );
m_intSpinBoxMap[vait.key()] = spin;
editWidget = spin;
break;
@@ -341,19 +341,19 @@ QWidget * ItemInterface::configWidget()
{
DoubleSpinBox *spin = new DoubleSpinBox( vait.data()->minValue(), vait.data()->maxValue(), vait.data()->minAbsValue(), vait.data()->value().toDouble(), vait.data()->unit(), configWidget );
- connectMapWidget( spin, SIGNAL(valueChanged(double)));
+ connectMapWidget( spin, TQT_SIGNAL(valueChanged(double)));
m_doubleSpinBoxMap[vait.key()] = spin;
editWidget = spin;
break;
}
case Variant::Type::Color:
{
- QColor value = vait.data()->value().toColor();
+ TQColor value = vait.data()->value().toColor();
ColorCombo * colorBox = new ColorCombo( (ColorCombo::ColorScheme)vait.data()->colorScheme(), configWidget );
colorBox->setColor( value );
- connectMapWidget( colorBox, SIGNAL(activated(const QColor &)));
+ connectMapWidget( colorBox, TQT_SIGNAL(activated(const TQColor &)));
m_colorComboMap[vait.key()] = colorBox;
editWidget = colorBox;
@@ -362,10 +362,10 @@ QWidget * ItemInterface::configWidget()
case Variant::Type::Bool:
{
const bool value = vait.data()->value().toBool();
- QCheckBox * box = new QCheckBox( vait.data()->toolbarCaption(), configWidget );
+ TQCheckBox * box = new TQCheckBox( vait.data()->toolbarCaption(), configWidget );
box->setChecked(value);
- connectMapWidget( box, SIGNAL(toggled(bool)));
+ connectMapWidget( box, TQT_SIGNAL(toggled(bool)));
m_boolCheckMap[vait.key()] = box;
editWidget = box;
break;
@@ -385,8 +385,8 @@ QWidget * ItemInterface::configWidget()
continue;
// In the case of the toolbar, we don't want it too high
- if ( editWidget->height() > parent->height()-2 )
- editWidget->setMaximumHeight( parent->height()-2 );
+ if ( editWidget->height() > tqparent->height()-2 )
+ editWidget->setMaximumHeight( tqparent->height()-2 );
switch ( type )
{
@@ -394,9 +394,9 @@ QWidget * ItemInterface::configWidget()
case Variant::Type::Combo:
case Variant::Type::String:
{
- QSizePolicy p( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed, 1, 1 );
+ TQSizePolicy p( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 1, 1 );
- editWidget->setSizePolicy( p );
+ editWidget->tqsetSizePolicy( p );
editWidget->setMaximumWidth( 250 );
break;
}
@@ -422,15 +422,15 @@ QWidget * ItemInterface::configWidget()
configLayout->addWidget( editWidget );
}
- configLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ configLayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
return configWidget;
}
-void ItemInterface::connectMapWidget( QWidget *widget, const char *_signal )
+void ItemInterface::connectMapWidget( TQWidget *widget, const char *_signal )
{
- connect( widget, _signal, this, SLOT(tbDataChanged()) );
+ connect( widget, _signal, this, TQT_SLOT(tbDataChanged()) );
}
@@ -458,8 +458,8 @@ void ItemInterface::tbDataChanged()
}
// Bool values from checkboxes
- const QCheckBoxMap::iterator m_boolCheckMapEnd = m_boolCheckMap.end();
- for ( QCheckBoxMap::iterator chit = m_boolCheckMap.begin(); chit != m_boolCheckMapEnd; ++chit )
+ const TQCheckBoxMap::iterator m_boolCheckMapEnd = m_boolCheckMap.end();
+ for ( TQCheckBoxMap::iterator chit = m_boolCheckMap.begin(); chit != m_boolCheckMapEnd; ++chit )
{
slotSetData( chit.key(), chit.data()->isChecked() );
}
@@ -476,7 +476,7 @@ void ItemInterface::tbDataChanged()
const DoubleSpinBoxMap::iterator m_doubleSpinBoxMapEnd = m_doubleSpinBoxMap.end();
for ( DoubleSpinBoxMap::iterator sbit = m_doubleSpinBoxMap.begin(); sbit != m_doubleSpinBoxMapEnd; ++sbit )
{
-// VariantDataMap::iterator vait = variantData.find(sbit.key());
+// VariantDataMap::iterator vait = variantData.tqfind(sbit.key());
slotSetData( sbit.key(), sbit.data()->value() );
}
@@ -494,7 +494,7 @@ void ItemInterface::tbDataChanged()
-void ItemInterface::slotSetData( const QString &id, QVariant value )
+void ItemInterface::slotSetData( const TQString &id, TQVariant value )
{
if ( !p_itemGroup || (p_itemGroup->itemCount() == 0) )
return;
@@ -517,7 +517,7 @@ void ItemInterface::slotSetData( const QString &id, QVariant value )
VariantDataMap * variantMap = (*itemList.begin())->variantMap();
- VariantDataMap::iterator it = variantMap->find(id);
+ VariantDataMap::iterator it = variantMap->tqfind(id);
if ( it == variantMap->end() )
return;
@@ -529,13 +529,13 @@ void ItemInterface::slotSetData( const QString &id, QVariant value )
{
case Variant::Type::String:
{
- KLineEditMap::iterator mit = m_stringLineEditMap.find(id);
+ KLineEditMap::iterator mit = m_stringLineEditMap.tqfind(id);
if ( mit != m_stringLineEditMap.end() ) mit.data()->setText( it.data()->value().toString() );
break;
}
case Variant::Type::FileName:
{
- KURLReqMap::iterator mit = m_stringURLReqMap.find(id);
+ KURLReqMap::iterator mit = m_stringURLReqMap.tqfind(id);
if ( mit != m_stringURLReqMap.end() ) mit.data()->setURL( it.data()->value().toString() );
break;
}
@@ -549,13 +549,13 @@ void ItemInterface::slotSetData( const QString &id, QVariant value )
case Variant::Type::SevenSegment:
case Variant::Type::KeyPad:
{
- KComboBoxMap::iterator mit = m_stringComboBoxMap.find(id);
+ KComboBoxMap::iterator mit = m_stringComboBoxMap.tqfind(id);
if ( mit != m_stringComboBoxMap.end() ) mit.data()->setCurrentItem( it.data()->value().toString() );
break;
}
case Variant::Type::Int:
{
- IntSpinBoxMap::iterator mit = m_intSpinBoxMap.find(id);
+ IntSpinBoxMap::iterator mit = m_intSpinBoxMap.tqfind(id);
if ( mit != m_intSpinBoxMap.end() ) {
KIntSpinBox *sb = mit.data();
sb->setValue( it.data()->value().toInt() );
@@ -564,7 +564,7 @@ void ItemInterface::slotSetData( const QString &id, QVariant value )
}
case Variant::Type::Double:
{
- DoubleSpinBoxMap::iterator mit = m_doubleSpinBoxMap.find(id);
+ DoubleSpinBoxMap::iterator mit = m_doubleSpinBoxMap.tqfind(id);
if ( mit != m_doubleSpinBoxMap.end() ) {
DoubleSpinBox *sb = mit.data();
sb->setValue( it.data()->value().toDouble() );
@@ -573,13 +573,13 @@ void ItemInterface::slotSetData( const QString &id, QVariant value )
}
case Variant::Type::Color:
{
- ColorComboMap::iterator mit = m_colorComboMap.find(id);
+ ColorComboMap::iterator mit = m_colorComboMap.tqfind(id);
if ( mit != m_colorComboMap.end() ) mit.data()->setColor( it.data()->value().toColor() );
break;
}
case Variant::Type::Bool:
{
- QCheckBoxMap::iterator mit = m_boolCheckMap.find(id);
+ TQCheckBoxMap::iterator mit = m_boolCheckMap.tqfind(id);
if ( mit != m_boolCheckMap.end() ) mit.data()->setChecked( it.data()->value().toBool() );
break;
}
diff --git a/src/iteminterface.h b/src/iteminterface.h
index 22a4a04..5cc8702 100644
--- a/src/iteminterface.h
+++ b/src/iteminterface.h
@@ -11,7 +11,7 @@
#ifndef ITEMINTERFACE_H
#define ITEMINTERFACE_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class CNItemGroup;
class DoubleSpinBox;
@@ -27,19 +27,19 @@ class ColorCombo;
class KComboBox;
class KToolBar;
class KURLRequester;
-class QCheckBox;
+class TQCheckBox;
class KLineEdit;
class KIntSpinBox;
-typedef QMap<QString, Variant*> VariantDataMap;
-typedef QMap<QString, KComboBox*> KComboBoxMap;
-typedef QMap<QString, KLineEdit*> KLineEditMap;
-typedef QMap<QString, DoubleSpinBox*> DoubleSpinBoxMap;
-typedef QMap<QString, KIntSpinBox*> IntSpinBoxMap;
-typedef QMap<QString, ColorCombo*> ColorComboMap;
-typedef QMap<QString, KURLRequester*> KURLReqMap;
-typedef QMap<QString, QCheckBox*> QCheckBoxMap;
+typedef TQMap<TQString, Variant*> VariantDataMap;
+typedef TQMap<TQString, KComboBox*> KComboBoxMap;
+typedef TQMap<TQString, KLineEdit*> KLineEditMap;
+typedef TQMap<TQString, DoubleSpinBox*> DoubleSpinBoxMap;
+typedef TQMap<TQString, KIntSpinBox*> IntSpinBoxMap;
+typedef TQMap<TQString, ColorCombo*> ColorComboMap;
+typedef TQMap<TQString, KURLRequester*> KURLReqMap;
+typedef TQMap<TQString, TQCheckBox*> TQCheckBoxMap;
/**
This acts as an interface between the ItemDocument's and the associated
@@ -47,9 +47,10 @@ Items's, and the various objects that like to know about them
(e.g. ContextHelp, ItemEditor, ItemEditTB)
@author David Saxton
*/
-class ItemInterface : public QObject
+class ItemInterface : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
~ItemInterface();
static ItemInterface * self( KTechlab * ktechlab = 0l );
@@ -72,7 +73,7 @@ class ItemInterface : public QObject
* ItemEditTB.
* @param showAdvanced Whether advanced data should be shown
*/
- virtual QWidget * configWidget();
+ virtual TQWidget * configWidget();
public slots:
/**
@@ -80,7 +81,7 @@ class ItemInterface : public QObject
* data with the given id for all the CNItems in the group.
* Else, it only sets the data for the activeCNItem()
*/
- void slotSetData( const QString &id, QVariant value );
+ void slotSetData( const TQString &id, TQVariant value );
/**
* Called when the ItemEditTB is cleared. This clears all widget maps.
*/
@@ -97,7 +98,7 @@ class ItemInterface : public QObject
* Connects the specified widget to either tbDataChanged or advDataChanged
* as specified by mi.
*/
- void connectMapWidget( QWidget *widget, const char *_signal);
+ void connectMapWidget( TQWidget *widget, const char *_signal);
KTechlab * const p_ktechlab;
@@ -108,10 +109,10 @@ class ItemInterface : public QObject
DoubleSpinBoxMap m_doubleSpinBoxMap;
IntSpinBoxMap m_intSpinBoxMap;
ColorComboMap m_colorComboMap;
- QCheckBoxMap m_boolCheckMap;
+ TQCheckBoxMap m_boolCheckMap;
// Use by item editor toolbar
- QGuardedPtr<KToolBar> m_pActiveItemEditorToolBar;
+ TQGuardedPtr<KToolBar> m_pActiveItemEditorToolBar;
int m_toolBarWidgetID;
@@ -122,9 +123,9 @@ class ItemInterface : public QObject
ItemInterface( KTechlab * ktechlab );
static ItemInterface * m_pSelf;
- QGuardedPtr<ItemDocument> p_cvb;
- QGuardedPtr<ItemGroup> p_itemGroup;
- QGuardedPtr<Item> p_lastItem;
+ TQGuardedPtr<ItemDocument> p_cvb;
+ TQGuardedPtr<ItemGroup> p_itemGroup;
+ TQGuardedPtr<Item> p_lastItem;
int m_currentActionTicket;
};
diff --git a/src/itemlibrary.cpp b/src/itemlibrary.cpp
index d749f7f..9905372 100644
--- a/src/itemlibrary.cpp
+++ b/src/itemlibrary.cpp
@@ -104,12 +104,12 @@
#include "kdebug.h"
#include <kiconloader.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
#include <cassert>
@@ -289,7 +289,7 @@ void ItemLibrary::addLibraryItem( LibraryItem *item )
}
-Item *ItemLibrary::createItem( const QString &id, ItemDocument *itemDocument, bool newItem, const char *newId, bool finishCreation )
+Item *ItemLibrary::createItem( const TQString &id, ItemDocument *itemDocument, bool newItem, const char *newId, bool finishCreation )
{
Item * item = 0l;
if ( id.startsWith("sc/") )
@@ -303,7 +303,7 @@ Item *ItemLibrary::createItem( const QString &id, ItemDocument *itemDocument, bo
return 0l;
}
- QString temp = id;
+ TQString temp = id;
int numId = temp.remove("sc/").toInt();
item = subcircuits()->createSubcircuit( numId, /*id,*/ circuitDocument, newItem, newId );
@@ -315,7 +315,7 @@ Item *ItemLibrary::createItem( const QString &id, ItemDocument *itemDocument, bo
LibraryItemList::iterator it = m_items.begin();
for ( ; it != end; ++it )
{
- if ( (*it)->allIDs().contains(id) )
+ if ( (*it)->allIDs().tqcontains(id) )
{
item = (*it)->createItemFnPtr()( itemDocument, newItem, newId );
item->m_type = (*it)->activeID();
@@ -334,11 +334,11 @@ Item *ItemLibrary::createItem( const QString &id, ItemDocument *itemDocument, bo
}
-QImage ItemLibrary::itemImage( Item *item, const uint maxSize )
+TQImage ItemLibrary::itemImage( Item *item, const uint maxSize )
{
Component *component = dynamic_cast<Component*>(item);
- QRect bound = item->boundingRect().normalize();
+ TQRect bound = item->boundingRect().normalize();
bound.setLeft( bound.left()-8 );
bound.setRight( bound.right()+8 );
bound.setTop( bound.top()-8 );
@@ -358,30 +358,30 @@ QImage ItemLibrary::itemImage( Item *item, const uint maxSize )
}
const bool cache = ((bound.width()*bound.height()) > (int)maxSize);
- QString type;
- if ( cache && m_imageMap.contains(item->type()) )
+ TQString type;
+ if ( cache && m_imageMap.tqcontains(item->type()) )
return m_imageMap[item->type()];
// Create pixmap big enough to contain CNItem and surrounding nodes
// and copy the button grab to it
- QPixmap pm( bound.size() );
+ TQPixmap pm( bound.size() );
- QBitmap mask( bound.size() );
- mask.fill( Qt::color0 );
+ TQBitmap tqmask( bound.size() );
+ tqmask.fill( TQt::color0 );
- QPainter maskPainter(&mask);
- maskPainter.translate( -bound.x(), -bound.y() );
- maskPainter.setPen( Qt::color1 );
- maskPainter.setBrush( Qt::color1 );
+ TQPainter tqmaskPainter(&tqmask);
+ tqmaskPainter.translate( -bound.x(), -bound.y() );
+ tqmaskPainter.setPen( TQt::color1 );
+ tqmaskPainter.setBrush( TQt::color1 );
- QPainter p(&pm);
+ TQPainter p(&pm);
p.translate( -bound.x(), -bound.y() );
p.setPen( item->pen() );
p.setBrush( item->brush() );
- // Now draw the shape :-)
+ // Now draw the tqshape :-)
const bool sel = item->isSelected();
if (sel)
{
@@ -391,7 +391,7 @@ QImage ItemLibrary::itemImage( Item *item, const uint maxSize )
item->blockSignals(false);
}
item->drawShape(p);
- item->drawShape(maskPainter);
+ item->drawShape(tqmaskPainter);
if (sel)
{
item->blockSignals(true);
@@ -399,10 +399,10 @@ QImage ItemLibrary::itemImage( Item *item, const uint maxSize )
item->blockSignals(false);
}
- maskPainter.setPen( Qt::color1 );
- maskPainter.setBrush( Qt::color1 );
+ tqmaskPainter.setPen( TQt::color1 );
+ tqmaskPainter.setBrush( TQt::color1 );
- QWMatrix transMatrix; // Matrix to apply to the image
+ TQWMatrix transMatrix; // Matrix to apply to the image
CNItem *cnItem = dynamic_cast<CNItem*>(item);
if (cnItem)
@@ -420,41 +420,41 @@ QImage ItemLibrary::itemImage( Item *item, const uint maxSize )
const bool showVB = ecnode->showVoltageBars();
ecnode->setShowVoltageBars(false);
ecnode->drawShape(p);
- ecnode->drawShape(maskPainter);
+ ecnode->drawShape(tqmaskPainter);
ecnode->setShowVoltageBars(showVB);
}
else
{
node->drawShape(p);
- node->drawShape(maskPainter);
+ node->drawShape(tqmaskPainter);
}
if (sel)
node->setSelected(sel);
}
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
TextMap text = cnItem->textMap();
const TextMap::iterator textEnd = text.end();
for ( TextMap::iterator it = text.begin(); it != textEnd; ++it )
{
it.data()->drawShape(p);
- it.data()->drawShape(maskPainter);
+ it.data()->drawShape(tqmaskPainter);
}
-// maskPainter.setPen( Qt::color1 );
-// maskPainter.setBrush( Qt::color1 );
+// tqmaskPainter.setPen( TQt::color1 );
+// tqmaskPainter.setBrush( TQt::color1 );
cnItem->drawWidgets(p);
-// cnItem->drawWidgets(maskPainter);
+// cnItem->drawWidgets(tqmaskPainter);
transMatrix = Component::transMatrix( component->angleDegrees(), component->flipped(), bound.width()/2, bound.height()/2, true );
}
- pm.setMask(mask);
+ pm.setMask(tqmask);
// Now, rotate the image so that it's the right way up, and scale it to size
- QImage im = pm.convertToImage();
+ TQImage im = pm.convertToImage();
im = im.xForm(transMatrix);
- im = im.smoothScale( 50, 50, QImage::ScaleMin );
+ im = im.smoothScale( 50, 50, TQ_ScaleMin );
if (cache)
m_imageMap[item->type()] = im;
@@ -462,15 +462,15 @@ QImage ItemLibrary::itemImage( Item *item, const uint maxSize )
return im;
}
-QPixmap ItemLibrary::itemIconFull( const QString &id )
+TQPixmap ItemLibrary::itemIconFull( const TQString &id )
{
LibraryItemList::iterator end = m_items.end();
for ( LibraryItemList::iterator it = m_items.begin(); it != end; ++it )
{
- if ( *it && (*it)->allIDs().contains(id) )
+ if ( *it && (*it)->allIDs().tqcontains(id) )
{
return (*it)->iconFull();
}
}
- return QPixmap();
+ return TQPixmap();
}
diff --git a/src/itemlibrary.h b/src/itemlibrary.h
index 181eb5f..5f0e39f 100644
--- a/src/itemlibrary.h
+++ b/src/itemlibrary.h
@@ -11,8 +11,8 @@
#ifndef ITEMLIBRARY_H
#define ITEMLIBRARY_H
-#include <qcolor.h>
-#include <qmap.h>
+#include <tqcolor.h>
+#include <tqmap.h>
class Document;
class Item;
@@ -21,8 +21,8 @@ class ItemLibrary;
class LibraryItem;
inline ItemLibrary* itemLibrary();
-typedef QMap< QString, QImage > ImageMap;
-typedef QValueList<LibraryItem*> LibraryItemList;
+typedef TQMap< TQString, TQImage > ImageMap;
+typedef TQValueList<LibraryItem*> LibraryItemList;
/**
While the program is running, only one instance of this class is created.
@@ -35,9 +35,9 @@ class ItemLibrary
public:
~ItemLibrary();
/**
- * Returns a QPixmap of the item icon
+ * Returns a TQPixmap of the item icon
*/
- QPixmap itemIconFull( const QString &id );
+ TQPixmap itemIconFull( const TQString &id );
/**
* Append the given item into the library
*/
@@ -49,15 +49,15 @@ public:
/**
* Creates a new item with the given id, and returns a pointer to it
*/
- Item *createItem( const QString &id, ItemDocument *itemDocument, bool newItem, const char *newId = 0L, bool finishCreation = true );
+ Item *createItem( const TQString &id, ItemDocument *itemDocument, bool newItem, const char *newId = 0L, bool finishCreation = true );
/**
- * Returns an image of the given cnitem. As QPixmap::convertToImage is
+ * Returns an image of the given cnitem. As TQPixmap::convertToImage is
* a *very* slow function, this will cache the result and return that for
* large images.
* @param cnItem A pointer to the CNItem
* @param maxSize The maximum size (in pixels) before the image is cached
*/
- QImage itemImage( Item *item, const uint maxSize = 36000 );
+ TQImage itemImage( Item *item, const uint maxSize = 36000 );
protected:
void addComponents();
diff --git a/src/itemview.cpp b/src/itemview.cpp
index 452d33c..fd2d6af 100644
--- a/src/itemview.cpp
+++ b/src/itemview.cpp
@@ -26,9 +26,9 @@
#include <kurldrag.h>
#include <cmath>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qwmatrix.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqwmatrix.h>
//BEGIN class ItemView
@@ -37,24 +37,24 @@ ItemView::ItemView( ItemDocument * itemDocument, ViewContainer *viewContainer, u
{
KActionCollection * ac = actionCollection();
- KStdAction::selectAll( itemDocument, SLOT(selectAll()), ac );
- KStdAction::zoomIn( this, SLOT(zoomIn()), ac );
- KStdAction::zoomOut( this, SLOT(zoomOut()), ac );
- KStdAction::actualSize( this, SLOT(actualSize()), ac )->setEnabled(false);
+ KStdAction::selectAll( itemDocument, TQT_SLOT(selectAll()), ac );
+ KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), ac );
+ KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), ac );
+ KStdAction::actualSize( TQT_TQOBJECT(this), TQT_SLOT(actualSize()), ac )->setEnabled(false);
KAccel *pAccel = new KAccel(this);
- pAccel->insert( "Cancel", i18n("Cancel"), i18n("Cancel the current operation"), Qt::Key_Escape, itemDocument, SLOT(cancelCurrentOperation()) );
+ pAccel->insert( "Cancel", i18n("Cancel"), i18n("Cancel the current operation"), TQt::Key_Escape, itemDocument, TQT_SLOT(cancelCurrentOperation()) );
pAccel->readSettings();
- new KAction( i18n("Delete"), "editdelete", Qt::Key_Delete, itemDocument, SLOT(deleteSelection()), ac, "edit_delete" );
- new KAction( i18n("Export as Image..."), 0, 0, itemDocument, SLOT(exportToImage()), ac, "file_export_image");
+ new KAction( i18n("Delete"), "editdelete", TQt::Key_Delete, itemDocument, TQT_SLOT(deleteSelection()), ac, "edit_delete" );
+ new KAction( i18n("Export as Image..."), 0, 0, itemDocument, TQT_SLOT(exportToImage()), ac, "file_export_image");
//BEGIN Item Alignment actions
- new KAction( i18n("Align Horizontally"), 0, 0, itemDocument, SLOT(alignHorizontally()), ac, "align_horizontally" );
- new KAction( i18n("Align Vertically"), 0, 0, itemDocument, SLOT(alignVertically()), ac, "align_vertically" );
- new KAction( i18n("Distribute Horizontally"), 0, 0, itemDocument, SLOT(distributeHorizontally()), ac, "distribute_horizontally" );
- new KAction( i18n("Distribute Vertically"), 0, 0, itemDocument, SLOT(distributeVertically()), ac, "distribute_vertically" );
+ new KAction( i18n("AlignQt::Horizontally"), 0, 0, itemDocument, TQT_SLOT(alignHorizontally()), ac, "align_horizontally" );
+ new KAction( i18n("AlignQt::Vertically"), 0, 0, itemDocument, TQT_SLOT(alignVertically()), ac, "align_vertically" );
+ new KAction( i18n("DistributeQt::Horizontally"), 0, 0, itemDocument, TQT_SLOT(distributeHorizontally()), ac, "distribute_horizontally" );
+ new KAction( i18n("DistributeQt::Vertically"), 0, 0, itemDocument, TQT_SLOT(distributeVertically()), ac, "distribute_vertically" );
//END Item Alignment actions
@@ -70,13 +70,13 @@ ItemView::ItemView( ItemDocument * itemDocument, ViewContainer *viewContainer, u
m->insertItem( KGlobal::iconLoader()->loadIcon( "tool_arrow", KIcon::Small ), i18n("Arrow"), DrawPart::da_arrow );
m->insertItem( KGlobal::iconLoader()->loadIcon( "tool_ellipse", KIcon::Small ), i18n("Ellipse"), DrawPart::da_ellipse );
m->insertItem( KGlobal::iconLoader()->loadIcon( "tool_rectangle", KIcon::Small ), i18n("Rectangle"), DrawPart::da_rectangle );
- connect( m, SIGNAL(activated(int)), itemDocument, SLOT(slotSetDrawAction(int)) );
+ connect( m, TQT_SIGNAL(activated(int)), itemDocument, TQT_SLOT(slotSetDrawAction(int)) );
//END Draw actions
//BEGIN Item Control actions
- new KAction( i18n("Raise Selection"), "1uparrow", Qt::Key_PageUp, itemDocument, SLOT(raiseZ()), ac, "edit_raise" );
- new KAction( i18n("Lower Selection"), "1downarrow", Qt::Key_PageDown, itemDocument, SLOT(lowerZ()), ac, "edit_lower" );
+ new KAction( i18n("Raise Selection"), "1uparrow", TQt::Key_PageUp, itemDocument, TQT_SLOT(raiseZ()), ac, "edit_raise" );
+ new KAction( i18n("Lower Selection"), "1downarrow", TQt::Key_PageDown, itemDocument, TQT_SLOT(lowerZ()), ac, "edit_lower" );
//END Item Control actions
@@ -85,9 +85,9 @@ ItemView::ItemView( ItemDocument * itemDocument, ViewContainer *viewContainer, u
setXMLFile( "ktechlabitemviewui.rc" );
- m_pUpdateStatusTmr = new QTimer(this);
- connect( m_pUpdateStatusTmr, SIGNAL(timeout()), this, SLOT(updateStatus()) );
- connect( this, SIGNAL(viewUnfocused()), this, SLOT(stopUpdatingStatus()) );
+ m_pUpdateStatusTmr = new TQTimer(this);
+ connect( m_pUpdateStatusTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updatetqStatus()) );
+ connect( this, TQT_SIGNAL(viewUnfocused()), this, TQT_SLOT(stopUpdatingtqStatus()) );
p_itemDocument = itemDocument;
m_zoomLevel = 1.;
@@ -129,7 +129,7 @@ void ItemView::zoomIn()
m_zoomLevel = newZoom/100.;
- QWMatrix m( m_zoomLevel, 0.0, 0.0, m_zoomLevel, 1.0, 1.0 );
+ TQWMatrix m( m_zoomLevel, 0.0, 0.0, m_zoomLevel, 1.0, 1.0 );
m_CVBEditor->setWorldMatrix(m);
p_itemDocument->requestEvent( ItemDocument::ItemDocumentEvent::ResizeCanvasToItems );
@@ -153,7 +153,7 @@ void ItemView::zoomOut()
m_zoomLevel = newZoom/100.;
- QWMatrix m( m_zoomLevel, 0.0, 0.0, m_zoomLevel, 1.0, 1.0 );
+ TQWMatrix m( m_zoomLevel, 0.0, 0.0, m_zoomLevel, 1.0, 1.0 );
m_CVBEditor->setWorldMatrix(m);
p_itemDocument->requestEvent( ItemDocument::ItemDocumentEvent::ResizeCanvasToItems );
@@ -164,7 +164,7 @@ void ItemView::zoomOut()
void ItemView::actualSize()
{
m_zoomLevel = 1.0;
- QWMatrix m( m_zoomLevel, 0.0, 0.0, m_zoomLevel, 1.0, 1.0 );
+ TQWMatrix m( m_zoomLevel, 0.0, 0.0, m_zoomLevel, 1.0, 1.0 );
m_CVBEditor->setWorldMatrix(m);
p_itemDocument->requestEvent( ItemDocument::ItemDocumentEvent::ResizeCanvasToItems );
@@ -180,7 +180,7 @@ void ItemView::updateZoomActions()
}
-void ItemView::dropEvent( QDropEvent *event )
+void ItemView::dropEvent( TQDropEvent *event )
{
KURL::List urls;
if ( KURLDrag::decode( event, urls ) )
@@ -194,14 +194,14 @@ void ItemView::dropEvent( QDropEvent *event )
return;
}
- if ( !QString(event->format()).startsWith("ktechlab/") )
+ if ( !TQString(event->format()).startsWith("ktechlab/") )
return;
- QString text;
- QDataStream stream( event->encodedData(event->format()), IO_ReadOnly );
+ TQString text;
+ TQDataStream stream( event->tqencodedData(event->format()), IO_ReadOnly );
stream >> text;
- QPoint position = event->pos();
+ TQPoint position = event->pos();
position.setX( int((position.x() + m_CVBEditor->contentsX())/m_zoomLevel) );
position.setY( int((position.y() + m_CVBEditor->contentsY())/m_zoomLevel) );
@@ -212,9 +212,9 @@ void ItemView::dropEvent( QDropEvent *event )
}
-void ItemView::scrollToMouse( const QPoint &pos )
+void ItemView::scrollToMouse( const TQPoint &pos )
{
- QPoint position = pos * m_zoomLevel;
+ TQPoint position = pos * m_zoomLevel;
int left = m_CVBEditor->contentsX();
int top = m_CVBEditor->contentsY();
@@ -229,7 +229,7 @@ void ItemView::scrollToMouse( const QPoint &pos )
}
-void ItemView::contentsMousePressEvent( QMouseEvent *e )
+void ItemView::contentsMousePressEvent( TQMouseEvent *e )
{
if (!e)
return;
@@ -245,7 +245,7 @@ void ItemView::contentsMousePressEvent( QMouseEvent *e )
if ( !p_itemDocument )
return;
- p_itemDocument->canvas()->setMessage( QString::null );
+ p_itemDocument->canvas()->setMessage( TQString() );
p_itemDocument->m_cmManager->mousePressEvent( EventInfo( this, e ) );
if ( !wasFocused )
@@ -253,7 +253,7 @@ void ItemView::contentsMousePressEvent( QMouseEvent *e )
}
-void ItemView::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void ItemView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
if (!e)
return;
@@ -261,7 +261,7 @@ void ItemView::contentsMouseDoubleClickEvent( QMouseEvent *e )
e->accept();
//HACK: Pass this of as a single press event if widget underneath
- QCanvasItem * atTop = p_itemDocument->itemAtTop( e->pos()/zoomLevel() );
+ TQCanvasItem * atTop = p_itemDocument->itemAtTop( e->pos()/zoomLevel() );
if ( atTop && atTop->rtti() == ItemDocument::RTTI::Widget )
contentsMousePressEvent(e);
else
@@ -269,7 +269,7 @@ void ItemView::contentsMouseDoubleClickEvent( QMouseEvent *e )
}
-void ItemView::contentsMouseMoveEvent( QMouseEvent *e )
+void ItemView::contentsMouseMoveEvent( TQMouseEvent *e )
{
if ( !e || !p_itemDocument )
return;
@@ -278,11 +278,11 @@ void ItemView::contentsMouseMoveEvent( QMouseEvent *e )
p_itemDocument->m_cmManager->mouseMoveEvent( EventInfo( this, e ) );
if ( !m_pUpdateStatusTmr->isActive() )
- startUpdatingStatus();
+ startUpdatingtqStatus();
}
-void ItemView::contentsMouseReleaseEvent( QMouseEvent *e )
+void ItemView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
if (!e)
return;
@@ -293,7 +293,7 @@ void ItemView::contentsMouseReleaseEvent( QMouseEvent *e )
}
-void ItemView::contentsWheelEvent( QWheelEvent *e )
+void ItemView::contentsWheelEvent( TQWheelEvent *e )
{
if (!e)
return;
@@ -304,9 +304,9 @@ void ItemView::contentsWheelEvent( QWheelEvent *e )
}
-void ItemView::dragEnterEvent( QDragEnterEvent *event )
+void ItemView::dragEnterEvent( TQDragEnterEvent *event )
{
- startUpdatingStatus();
+ startUpdatingtqStatus();
KURL::List urls;
if ( KURLDrag::decode( event, urls ) )
@@ -318,55 +318,55 @@ void ItemView::dragEnterEvent( QDragEnterEvent *event )
}
-void ItemView::enterEvent( QEvent * e )
+void ItemView::enterEvent( TQEvent * e )
{
Q_UNUSED(e);
- startUpdatingStatus();
+ startUpdatingtqStatus();
}
-void ItemView::leaveEvent( QEvent * e )
+void ItemView::leaveEvent( TQEvent * e )
{
Q_UNUSED(e);
- stopUpdatingStatus();
+ stopUpdatingtqStatus();
// Cleanup
- setCursor(Qt::ArrowCursor);
+ setCursor(TQt::ArrowCursor);
if (p_ktechlab)
- p_ktechlab->slotChangeStatusbar(QString::null);
+ p_ktechlab->slotChangeStatusbar(TQString());
if ( p_itemDocument )
- p_itemDocument->m_canvasTip->setVisible(false);
+ p_itemDocument->m_canvasTip->tqsetVisible(false);
}
void ItemView::slotUpdateConfiguration()
{
// m_CVBEditor->setEraseColor( KTLConfig::bgColor() );
- m_CVBEditor->setEraseColor( Qt::white );
+ m_CVBEditor->setEraseColor( TQt::white );
if ( m_pUpdateStatusTmr->isActive() )
- startUpdatingStatus();
+ startUpdatingtqStatus();
}
-void ItemView::startUpdatingStatus()
+void ItemView::startUpdatingtqStatus()
{
m_pUpdateStatusTmr->stop();
m_pUpdateStatusTmr->start( int(1000./KTLConfig::refreshRate()) );
}
-void ItemView::stopUpdatingStatus()
+void ItemView::stopUpdatingtqStatus()
{
m_pUpdateStatusTmr->stop();
}
-void ItemView::updateStatus()
+void ItemView::updatetqStatus()
{
- QPoint pos = (m_CVBEditor->mapFromGlobal( QCursor::pos() ) + QPoint( m_CVBEditor->contentsX(), m_CVBEditor->contentsY() )) / zoomLevel();
+ TQPoint pos = (m_CVBEditor->mapFromGlobal( TQCursor::pos() ) + TQPoint( m_CVBEditor->contentsX(), m_CVBEditor->contentsY() )) / zoomLevel();
ItemDocument * itemDocument = static_cast<ItemDocument*>(document());
if ( !itemDocument )
@@ -376,17 +376,17 @@ void ItemView::updateStatus()
CanvasTip * canvasTip = itemDocument->m_canvasTip;
bool displayTip = false;
- QCursor cursor = Qt::ArrowCursor;
- QString statusbar;
+ TQCursor cursor = TQt::ArrowCursor;
+ TQString statusbar;
if ( cmManager->cmState() & CMManager::cms_repeated_add )
{
- cursor = Qt::CrossCursor;
+ cursor = TQt::CrossCursor;
statusbar = i18n("Left click to add. Right click to resume normal editing");
}
else if ( cmManager->cmState() & CMManager::cms_draw )
{
- cursor = Qt::CrossCursor;
+ cursor = TQt::CrossCursor;
statusbar = i18n("Click and hold to start drawing.");
}
else if ( cmManager->currentManipulator())
@@ -394,34 +394,34 @@ void ItemView::updateStatus()
switch ( cmManager->currentManipulator()->type() )
{
case CanvasManipulator::RepeatedItemAdd:
- cursor = Qt::CrossCursor;
+ cursor = TQt::CrossCursor;
statusbar = i18n("Left click to add. Right click to resume normal editing");
break;
case CanvasManipulator::ManualConnector:
statusbar = i18n("Right click to cancel the connector");
// no break
case CanvasManipulator::AutoConnector:
- cursor = Qt::CrossCursor;
+ cursor = TQt::CrossCursor;
break;
case CanvasManipulator::ItemMove:
case CanvasManipulator::MechItemMove:
- cursor = Qt::SizeAllCursor;
+ cursor = TQt::SizeAllCursor;
break;
case CanvasManipulator::Draw:
- cursor = Qt::CrossCursor;
+ cursor = TQt::CrossCursor;
break;
default:
break;
}
}
- else if ( QCanvasItem *qcanvasItem = itemDocument->itemAtTop(pos) )
+ else if ( TQCanvasItem *qcanvasItem = itemDocument->itemAtTop(pos) )
{
switch( qcanvasItem->rtti() )
{
case ItemDocument::RTTI::Connector:
{
- cursor = Qt::CrossCursor;
+ cursor = TQt::CrossCursor;
if ( itemDocument->type() != Document::dt_circuit )
break;
@@ -431,7 +431,7 @@ void ItemView::updateStatus()
}
case ItemDocument::RTTI::Node:
{
- cursor = Qt::CrossCursor;
+ cursor = TQt::CrossCursor;
ECNode * ecnode = dynamic_cast<ECNode*>(qcanvasItem);
if ( !ecnode )
break;
@@ -456,7 +456,7 @@ void ItemView::updateStatus()
if (p_ktechlab)
p_ktechlab->slotChangeStatusbar(statusbar);
- canvasTip->setVisible(displayTip);
+ canvasTip->tqsetVisible(displayTip);
}
//END class ItemView
@@ -464,8 +464,8 @@ void ItemView::updateStatus()
//BEGIN class CVBEditor
-CVBEditor::CVBEditor( QCanvas *canvas, ItemView *itemView, const char *name )
- : QCanvasView( canvas, itemView, name, WNoAutoErase | WStaticContents )
+CVBEditor::CVBEditor( TQCanvas *canvas, ItemView *itemView, const char *name )
+ : TQCanvasView( canvas, itemView, name, WNoAutoErase | WStaticContents )
{
b_ignoreEvents = false;
b_passEventsToView = true;
@@ -474,86 +474,86 @@ CVBEditor::CVBEditor( QCanvas *canvas, ItemView *itemView, const char *name )
setAcceptDrops(true);
setFrameShape(NoFrame);
// setEraseColor( KTLConfig::bgColor() );
- setEraseColor( Qt::white );
- setPaletteBackgroundColor( Qt::white );
- viewport()->setEraseColor( Qt::white );
- viewport()->setPaletteBackgroundColor( Qt::white );
+ setEraseColor( TQt::white );
+ setPaletteBackgroundColor( TQt::white );
+ viewport()->setEraseColor( TQt::white );
+ viewport()->setPaletteBackgroundColor( TQt::white );
}
-void CVBEditor::contentsMousePressEvent( QMouseEvent* e )
+void CVBEditor::contentsMousePressEvent( TQMouseEvent* e )
{
if (b_passEventsToView)
p_itemView->contentsMousePressEvent(e);
else
- QCanvasView::contentsMousePressEvent(e);
+ TQCanvasView::contentsMousePressEvent(e);
}
-void CVBEditor::contentsMouseReleaseEvent( QMouseEvent* e )
+void CVBEditor::contentsMouseReleaseEvent( TQMouseEvent* e )
{
if (b_passEventsToView)
p_itemView->contentsMouseReleaseEvent(e);
else
- QCanvasView::contentsMouseReleaseEvent(e);
+ TQCanvasView::contentsMouseReleaseEvent(e);
}
-void CVBEditor::contentsMouseDoubleClickEvent( QMouseEvent* e )
+void CVBEditor::contentsMouseDoubleClickEvent( TQMouseEvent* e )
{
if (b_passEventsToView)
p_itemView->contentsMouseDoubleClickEvent(e);
else
- QCanvasView::contentsMouseDoubleClickEvent(e);
+ TQCanvasView::contentsMouseDoubleClickEvent(e);
}
-void CVBEditor::contentsMouseMoveEvent( QMouseEvent* e )
+void CVBEditor::contentsMouseMoveEvent( TQMouseEvent* e )
{
if (b_passEventsToView)
p_itemView->contentsMouseMoveEvent(e);
else
- QCanvasView::contentsMouseMoveEvent(e);
+ TQCanvasView::contentsMouseMoveEvent(e);
}
-void CVBEditor::dragEnterEvent( QDragEnterEvent* e )
+void CVBEditor::dragEnterEvent( TQDragEnterEvent* e )
{
if (b_passEventsToView)
p_itemView->dragEnterEvent(e);
else
- QCanvasView::dragEnterEvent(e);
+ TQCanvasView::dragEnterEvent(e);
}
-void CVBEditor::dropEvent( QDropEvent* e )
+void CVBEditor::dropEvent( TQDropEvent* e )
{
if (b_passEventsToView)
p_itemView->dropEvent(e);
else
- QCanvasView::dropEvent(e);
+ TQCanvasView::dropEvent(e);
}
-void CVBEditor::enterEvent( QEvent * e )
+void CVBEditor::enterEvent( TQEvent * e )
{
if (b_passEventsToView)
p_itemView->enterEvent(e);
else
- QCanvasView::enterEvent(e);
+ TQCanvasView::enterEvent(e);
}
-void CVBEditor::leaveEvent( QEvent* e )
+void CVBEditor::leaveEvent( TQEvent* e )
{
if (b_passEventsToView)
p_itemView->leaveEvent(e);
else
- QCanvasView::leaveEvent(e);
+ TQCanvasView::leaveEvent(e);
}
-void CVBEditor::contentsWheelEvent( QWheelEvent *e )
+void CVBEditor::contentsWheelEvent( TQWheelEvent *e )
{
if (b_ignoreEvents)
{
@@ -566,14 +566,14 @@ void CVBEditor::contentsWheelEvent( QWheelEvent *e )
else
{
b_ignoreEvents = true;
- QCanvasView::wheelEvent(e);
+ TQCanvasView::wheelEvent(e);
b_ignoreEvents = false;
}
}
-void CVBEditor::viewportResizeEvent( QResizeEvent * e )
+void CVBEditor::viewportResizeEvent( TQResizeEvent * e )
{
- QCanvasView::viewportResizeEvent(e);
+ TQCanvasView::viewportResizeEvent(e);
p_itemView->p_itemDocument->requestEvent( ItemDocument::ItemDocumentEvent::ResizeCanvasToItems );
}
//END class CVBEditor
diff --git a/src/itemview.h b/src/itemview.h
index 2bca8fd..e847ed0 100644
--- a/src/itemview.h
+++ b/src/itemview.h
@@ -13,12 +13,12 @@
#include <view.h>
-#include <qcanvas.h>
-#include <qguardedptr.h>
+#include <tqcanvas.h>
+#include <tqguardedptr.h>
class CVBEditor;
class ItemDocument;
-class QTimer;
+class TQTimer;
/**
@author David Saxton
@@ -26,6 +26,7 @@ class QTimer;
class ItemView : public View
{
Q_OBJECT
+ TQ_OBJECT
public:
ItemView( ItemDocument *itemDocument, ViewContainer *viewContainer, uint viewAreaId, const char *name = 0 );
~ItemView();
@@ -42,39 +43,39 @@ class ItemView : public View
void actualSize();
void zoomIn();
void zoomOut();
- void scrollToMouse( const QPoint &pos );
- virtual void updateStatus();
+ void scrollToMouse( const TQPoint &pos );
+ virtual void updatetqStatus();
protected slots:
/**
* Called when the user changes the configuration.
*/
virtual void slotUpdateConfiguration();
- void startUpdatingStatus();
- void stopUpdatingStatus();
+ void startUpdatingtqStatus();
+ void stopUpdatingtqStatus();
protected:
void updateZoomActions();
/**
* Attempts to create a new CNItem if one was dragged onto the canvas
*/
- void dropEvent( QDropEvent* );
+ void dropEvent( TQDropEvent* );
/**
* Reinherit to allow different types of items to be dragged in.
*/
- virtual void dragEnterEvent( QDragEnterEvent* );
- void contentsMousePressEvent( QMouseEvent *e );
- void contentsMouseReleaseEvent( QMouseEvent *e );
- void contentsMouseDoubleClickEvent( QMouseEvent *e );
- void contentsMouseMoveEvent( QMouseEvent *e );
- void contentsWheelEvent( QWheelEvent *e );
- void enterEvent( QEvent * e );
- void leaveEvent( QEvent * e );
-
- QGuardedPtr<ItemDocument> p_itemDocument;
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ void contentsMousePressEvent( TQMouseEvent *e );
+ void contentsMouseReleaseEvent( TQMouseEvent *e );
+ void contentsMouseDoubleClickEvent( TQMouseEvent *e );
+ void contentsMouseMoveEvent( TQMouseEvent *e );
+ void contentsWheelEvent( TQWheelEvent *e );
+ void enterEvent( TQEvent * e );
+ void leaveEvent( TQEvent * e );
+
+ TQGuardedPtr<ItemDocument> p_itemDocument;
CVBEditor *m_CVBEditor;
double m_zoomLevel;
- QTimer * m_pUpdateStatusTmr;
+ TQTimer * m_pUpdateStatusTmr;
friend class CVBEditor;
};
@@ -83,26 +84,27 @@ class ItemView : public View
/**
@author David Saxton
*/
-class CVBEditor : public QCanvasView
+class CVBEditor : public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- CVBEditor( QCanvas *canvas, ItemView *itemView, const char *name );
+ CVBEditor( TQCanvas *canvas, ItemView *itemView, const char *name );
void setPassEventsToView( bool pass ) { b_passEventsToView = pass; }
- virtual void contentsMousePressEvent( QMouseEvent* e );
- virtual void contentsMouseReleaseEvent( QMouseEvent* e );
- virtual void contentsMouseDoubleClickEvent( QMouseEvent* e );
- virtual void contentsMouseMoveEvent( QMouseEvent* e );
- virtual void dragEnterEvent( QDragEnterEvent* e );
- virtual void dropEvent( QDropEvent* e );
- virtual void contentsWheelEvent( QWheelEvent *e );
- virtual void enterEvent( QEvent * e );
- virtual void leaveEvent( QEvent * e );
+ virtual void contentsMousePressEvent( TQMouseEvent* e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent* e );
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent* e );
+ virtual void contentsMouseMoveEvent( TQMouseEvent* e );
+ virtual void dragEnterEvent( TQDragEnterEvent* e );
+ virtual void dropEvent( TQDropEvent* e );
+ virtual void contentsWheelEvent( TQWheelEvent *e );
+ virtual void enterEvent( TQEvent * e );
+ virtual void leaveEvent( TQEvent * e );
protected:
- virtual void viewportResizeEvent( QResizeEvent * );
+ virtual void viewportResizeEvent( TQResizeEvent * );
ItemView *p_itemView;
bool b_passEventsToView;
bool b_ignoreEvents;
diff --git a/src/katemdi.cpp b/src/katemdi.cpp
index 0f34de1..e518136 100644
--- a/src/katemdi.cpp
+++ b/src/katemdi.cpp
@@ -35,8 +35,8 @@ namespace KateMDI {
//BEGIN SPLITTER
-Splitter::Splitter(Orientation o, QWidget* parent, const char* name)
- : QSplitter(o, parent, name)
+Splitter::Splitter(Qt::Orientation o, TQWidget* tqparent, const char* name)
+ : TQSplitter(o, tqparent, name)
{
}
@@ -44,14 +44,14 @@ Splitter::~Splitter()
{
}
-bool Splitter::isLastChild(QWidget* w) const
+bool Splitter::isLastChild(TQWidget* w) const
{
return ( idAfter( w ) == 0 );
}
-int Splitter::idAfter ( QWidget * w ) const
+int Splitter::idAfter ( TQWidget * w ) const
{
- return QSplitter::idAfter (w);
+ return TQSplitter::idAfter (w);
}
//END SPLITTER
@@ -59,13 +59,13 @@ int Splitter::idAfter ( QWidget * w ) const
//BEGIN TOGGLETOOLVIEWACTION
-ToggleToolViewAction::ToggleToolViewAction ( const QString& text, const KShortcut& cut, ToolView *tv,
- QObject* parent, const char* name )
- : KToggleAction(text,cut,parent,name)
+ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const KShortcut& cut, ToolView *tv,
+ TQObject* tqparent, const char* name )
+ : KToggleAction(text,cut,tqparent,name)
, m_tv(tv)
{
- connect(this,SIGNAL(toggled(bool)),this,SLOT(slotToggled(bool)));
- connect(m_tv,SIGNAL(visibleChanged(bool)),this,SLOT(visibleChanged(bool)));
+ connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool)));
+ connect(m_tv,TQT_SIGNAL(visibleChanged(bool)),this,TQT_SLOT(visibleChanged(bool)));
setChecked(m_tv->visible());
}
@@ -101,12 +101,12 @@ void ToggleToolViewAction::slotToggled(bool t)
//BEGIN GUICLIENT
GUIClient::GUIClient ( MainWindow *mw )
- : QObject ( mw )
+ : TQObject ( mw )
, KXMLGUIClient ( mw )
, m_mw (mw)
{
- connect( m_mw->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
- this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+ connect( m_mw->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) );
if (actionCollection()->kaccel()==0)
actionCollection()->setWidget(m_mw);
@@ -122,12 +122,12 @@ GUIClient::~GUIClient()
void GUIClient::registerToolView (ToolView *tv)
{
- QString aname = QString("kate_mdi_toolview_") + tv->id;
+ TQString aname = TQString("kate_mdi_toolview_") + tv->id;
// try to read the action shortcut
KShortcut sc;
KConfig *cfg = kapp->config();
- QString _grp = cfg->group();
+ TQString _grp = cfg->group();
cfg->setGroup("Shortcuts");
sc = KShortcut( cfg->readEntry( aname, "" ) );
cfg->setGroup( _grp );
@@ -150,8 +150,8 @@ void GUIClient::updateActions()
//BEGIN TOOLVIEW
-ToolView::ToolView (MainWindow *mainwin, Sidebar *sidebar, QWidget *parent)
- : QVBox (parent)
+ToolView::ToolView (MainWindow *mainwin, Sidebar *sidebar, TQWidget *tqparent)
+ : TQVBox (tqparent)
, m_mainWin (mainwin)
, m_sidebar (sidebar)
, m_visible (false)
@@ -178,13 +178,13 @@ bool ToolView::visible () const
return m_visible;
}
-void ToolView::childEvent ( QChildEvent *ev )
+void ToolView::childEvent ( TQChildEvent *ev )
{
// set the widget to be focus proxy if possible
- if (ev->inserted() && ev->child() && ev->child()->qt_cast("QWidget"))
- setFocusProxy ((QWidget *)(ev->child()->qt_cast("QWidget")));
+ if (ev->inserted() && ev->child() && TQT_TQOBJECT(ev->child())->qt_cast(TQWIDGET_OBJECT_NAME_STRING))
+ setFocusProxy ((TQWidget *)(TQT_TQOBJECT(ev->child())->qt_cast(TQWIDGET_OBJECT_NAME_STRING)));
- QVBox::childEvent (ev);
+ TQVBox::childEvent (ev);
}
//END TOOLVIEW
@@ -192,8 +192,8 @@ void ToolView::childEvent ( QChildEvent *ev )
//BEGIN SIDEBAR
-Sidebar::Sidebar (KMultiTabBar::KMultiTabBarPosition pos, MainWindow *mainwin, QWidget *parent)
- : KMultiTabBar ((pos == KMultiTabBar::Top || pos == KMultiTabBar::Bottom) ? KMultiTabBar::Horizontal : KMultiTabBar::Vertical, parent)
+Sidebar::Sidebar (KMultiTabBar::KMultiTabBarPosition pos, MainWindow *mainwin, TQWidget *tqparent)
+ : KMultiTabBar ((pos == KMultiTabBar::Top || pos == KMultiTabBar::Bottom) ? KMultiTabBar::Horizontal : KMultiTabBar::Vertical, tqparent)
, m_mainWin (mainwin)
, m_splitter (0)
, m_ownSplit (0)
@@ -225,11 +225,11 @@ void Sidebar::setSplitter (Splitter *sp)
m_ownSplit = new Splitter ((sidebarPosition() == KMultiTabBar::Top || sidebarPosition() == KMultiTabBar::Bottom) ? Qt::Horizontal : Qt::Vertical, m_splitter);
m_ownSplit->setOpaqueResize( KGlobalSettings::opaqueResize() );
m_ownSplit->setChildrenCollapsible( false );
- m_splitter->setResizeMode( m_ownSplit, QSplitter::KeepSize );
+ m_splitter->setResizeMode( m_ownSplit, TQSplitter::KeepSize );
m_ownSplit->hide ();
}
-ToolView *Sidebar::addWidget (const QPixmap &icon, const QString &text, ToolView *widget)
+ToolView *Sidebar::addWidget (const TQPixmap &icon, const TQString &text, ToolView *widget)
{
static int id = 0;
@@ -255,7 +255,7 @@ ToolView *Sidebar::addWidget (const QPixmap &icon, const QString &text, ToolView
else
{
widget->hide ();
- widget->reparent (m_ownSplit, 0, QPoint());
+ widget->reparent (m_ownSplit, 0, TQPoint());
widget->m_sidebar = this;
}
@@ -268,7 +268,7 @@ ToolView *Sidebar::addWidget (const QPixmap &icon, const QString &text, ToolView
show ();
- connect(tab(newId),SIGNAL(clicked(int)),this,SLOT(tabClicked(int)));
+ connect(tab(newId),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int)));
tab(newId)->installEventFilter(this);
return widget;
@@ -276,7 +276,7 @@ ToolView *Sidebar::addWidget (const QPixmap &icon, const QString &text, ToolView
bool Sidebar::removeWidget (ToolView *widget)
{
- if (!m_widgetToId.contains(widget))
+ if (!m_widgetToId.tqcontains(widget))
return false;
removeTab(m_widgetToId[widget]);
@@ -286,7 +286,7 @@ bool Sidebar::removeWidget (ToolView *widget)
m_toolviews.remove (widget);
bool anyVis = false;
- QIntDictIterator<ToolView> it( m_idToWidget );
+ TQIntDictIterator<ToolView> it( m_idToWidget );
for ( ; it.current(); ++it )
{
if (!anyVis)
@@ -306,11 +306,11 @@ bool Sidebar::removeWidget (ToolView *widget)
bool Sidebar::showWidget (ToolView *widget)
{
- if (!m_widgetToId.contains(widget))
+ if (!m_widgetToId.tqcontains(widget))
return false;
// hide other non-persistent views
- QIntDictIterator<ToolView> it( m_idToWidget );
+ TQIntDictIterator<ToolView> it( m_idToWidget );
for ( ; it.current(); ++it )
if ((it.current() != widget) && !it.current()->persistent)
{
@@ -331,14 +331,14 @@ bool Sidebar::showWidget (ToolView *widget)
bool Sidebar::hideWidget (ToolView *widget)
{
- if (!m_widgetToId.contains(widget))
+ if (!m_widgetToId.tqcontains(widget))
return false;
bool anyVis = false;
updateLastSize ();
- for ( QIntDictIterator<ToolView> it( m_idToWidget ); it.current(); ++it )
+ for ( TQIntDictIterator<ToolView> it( m_idToWidget ); it.current(); ++it )
{
if (it.current() == widget)
{
@@ -380,11 +380,11 @@ void Sidebar::tabClicked(int i)
}
}
-bool Sidebar::eventFilter(QObject *obj, QEvent *ev)
+bool Sidebar::eventFilter(TQObject *obj, TQEvent *ev)
{
- if (ev->type()==QEvent::ContextMenu)
+ if (ev->type()==TQEvent::ContextMenu)
{
- QContextMenuEvent *e = (QContextMenuEvent *) ev;
+ TQContextMenuEvent *e = (TQContextMenuEvent *) ev;
KMultiTabBarTab *bt = dynamic_cast<KMultiTabBarTab*>(obj);
if (bt)
{
@@ -416,8 +416,8 @@ bool Sidebar::eventFilter(QObject *obj, QEvent *ev)
if (sidebarPosition() != 3)
p->insertItem(SmallIconSet("down"), i18n("Bottom Sidebar"),3);
- connect(p, SIGNAL(activated(int)),
- this, SLOT(buttonPopupActivate(int)));
+ connect(p, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(buttonPopupActivate(int)));
p->exec(e->globalPos());
delete p;
@@ -452,7 +452,7 @@ void Sidebar::buttonPopupActivate (int id)
void Sidebar::updateLastSize ()
{
- QValueList<int> s = m_splitter->sizes ();
+ TQValueList<int> s = m_splitter->sizes ();
int i = 0;
if ((sidebarPosition() == KMultiTabBar::Right || sidebarPosition() == KMultiTabBar::Bottom))
@@ -478,7 +478,7 @@ void Sidebar::restoreSession (KConfig *config)
{
ToolView *tv = m_toolviews[firstWrong];
- unsigned int pos = config->readUnsignedNumEntry (QString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(tv->id), firstWrong);
+ unsigned int pos = config->readUnsignedNumEntry (TQString ("Kate-MDI-ToolView-%1-Sidebar-Position").tqarg(tv->id), firstWrong);
if (pos != firstWrong)
break;
@@ -488,12 +488,12 @@ void Sidebar::restoreSession (KConfig *config)
if (firstWrong < m_toolviews.size())
{
// first: collect the items to reshuffle
- QValueList<TmpToolViewSorter> toSort;
+ TQValueList<TmpToolViewSorter> toSort;
for (unsigned int i=firstWrong; i < m_toolviews.size(); ++i)
{
TmpToolViewSorter s;
s.tv = m_toolviews[i];
- s.pos = config->readUnsignedNumEntry (QString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(m_toolviews[i]->id), i);
+ s.pos = config->readUnsignedNumEntry (TQString ("Kate-MDI-ToolView-%1-Sidebar-Position").tqarg(m_toolviews[i]->id), i);
toSort.push_back (s);
}
@@ -508,7 +508,7 @@ void Sidebar::restoreSession (KConfig *config)
}
// then: remove this items from the button bar
- // do this backwards, to minimize the relayout efforts
+ // do this backwards, to minimize the retqlayout efforts
for (int i=m_toolviews.size()-1; i >= (int)firstWrong; --i)
{
removeTab (m_widgetToId[m_toolviews[i]]);
@@ -524,7 +524,7 @@ void Sidebar::restoreSession (KConfig *config)
// readd the button
int newId = m_widgetToId[tv];
appendTab (tv->icon, newId, tv->text);
- connect(tab(newId),SIGNAL(clicked(int)),this,SLOT(tabClicked(int)));
+ connect(tab(newId),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int)));
tab(newId)->installEventFilter(this);
// reshuffle in splitter
@@ -536,7 +536,7 @@ void Sidebar::restoreSession (KConfig *config)
updateLastSize ();
// restore the own splitter sizes
- QValueList<int> s = config->readIntListEntry (QString ("Kate-MDI-Sidebar-%1-Splitter").arg(sidebarPosition()));
+ TQValueList<int> s = config->readIntListEntry (TQString ("Kate-MDI-Sidebar-%1-Splitter").tqarg(sidebarPosition()));
m_ownSplit->setSizes (s);
// show only correct toolviews, remember persistent values ;)
@@ -545,8 +545,8 @@ void Sidebar::restoreSession (KConfig *config)
{
ToolView *tv = m_toolviews[i];
- tv->persistent = config->readBoolEntry (QString ("Kate-MDI-ToolView-%1-Persistent").arg(tv->id), false);
- tv->setVisible (config->readBoolEntry (QString ("Kate-MDI-ToolView-%1-Visible").arg(tv->id), false));
+ tv->persistent = config->readBoolEntry (TQString ("Kate-MDI-ToolView-%1-Persistent").tqarg(tv->id), false);
+ tv->setVisible (config->readBoolEntry (TQString ("Kate-MDI-ToolView-%1-Visible").tqarg(tv->id), false));
if (!anyVis)
anyVis = tv->visible();
@@ -568,18 +568,18 @@ void Sidebar::restoreSession (KConfig *config)
void Sidebar::saveSession (KConfig *config)
{
// store the own splitter sizes
- QValueList<int> s = m_ownSplit->sizes();
- config->writeEntry (QString ("Kate-MDI-Sidebar-%1-Splitter").arg(sidebarPosition()), s);
+ TQValueList<int> s = m_ownSplit->sizes();
+ config->writeEntry (TQString ("Kate-MDI-Sidebar-%1-Splitter").tqarg(sidebarPosition()), s);
// store the data about all toolviews in this sidebar ;)
for ( unsigned int i=0; i < m_toolviews.size(); ++i )
{
ToolView *tv = m_toolviews[i];
- config->writeEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(tv->id), tv->sidebar()->sidebarPosition());
- config->writeEntry (QString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(tv->id), i);
- config->writeEntry (QString ("Kate-MDI-ToolView-%1-Visible").arg(tv->id), tv->visible());
- config->writeEntry (QString ("Kate-MDI-ToolView-%1-Persistent").arg(tv->id), tv->persistent);
+ config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Position").tqarg(tv->id), tv->sidebar()->sidebarPosition());
+ config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Sidebar-Position").tqarg(tv->id), i);
+ config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Visible").tqarg(tv->id), tv->visible());
+ config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Persistent").tqarg(tv->id), tv->persistent);
}
}
@@ -588,13 +588,13 @@ void Sidebar::saveSession (KConfig *config)
//BEGIN MAIN WINDOW
-MainWindow::MainWindow (QWidget* parentWidget, const char* name)
- : KParts::MainWindow( parentWidget, name)
+MainWindow::MainWindow (TQWidget* tqparentWidget, const char* name)
+ : KParts::MainWindow( tqparentWidget, name)
, m_restoreConfig (0)
, m_guiClient (new GUIClient (this))
{
// init the internal widgets
- QHBox *hb = new QHBox (this);
+ TQHBox *hb = new TQHBox (this);
setCentralWidget(hb);
m_sidebars[KMultiTabBar::Left] = new Sidebar (KMultiTabBar::Left, this, hb);
@@ -604,7 +604,7 @@ MainWindow::MainWindow (QWidget* parentWidget, const char* name)
m_sidebars[KMultiTabBar::Left]->setSplitter (m_hSplitter);
- QVBox *vb = new QVBox (m_hSplitter);
+ TQVBox *vb = new TQVBox (m_hSplitter);
m_hSplitter->setCollapsible(vb, false);
m_sidebars[KMultiTabBar::Top] = new Sidebar (KMultiTabBar::Top, this, vb);
@@ -614,7 +614,7 @@ MainWindow::MainWindow (QWidget* parentWidget, const char* name)
m_sidebars[KMultiTabBar::Top]->setSplitter (m_vSplitter);
- m_centralWidget = new QVBox (m_vSplitter);
+ m_centralWidget = new TQVBox (m_vSplitter);
m_vSplitter->setCollapsible(m_centralWidget, false);
m_sidebars[KMultiTabBar::Bottom] = new Sidebar (KMultiTabBar::Bottom, this, vb);
@@ -637,12 +637,12 @@ MainWindow::~MainWindow ()
delete m_sidebars[i];
}
-QWidget *MainWindow::centralWidget () const
+TQWidget *MainWindow::centralWidget () const
{
return m_centralWidget;
}
-ToolView *MainWindow::createToolView (const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QPixmap &icon, const QString &text)
+ToolView *MainWindow::createToolView (const TQString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const TQPixmap &icon, const TQString &text)
{
if (m_idToWidget[identifier])
return 0;
@@ -651,7 +651,7 @@ ToolView *MainWindow::createToolView (const QString &identifier, KMultiTabBar::K
if (m_restoreConfig && m_restoreConfig->hasGroup (m_restoreGroup))
{
m_restoreConfig->setGroup (m_restoreGroup);
- pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(identifier), pos);
+ pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (TQString ("Kate-MDI-ToolView-%1-Position").tqarg(identifier), pos);
}
ToolView *v = m_sidebars[pos]->addWidget (icon, text, 0);
@@ -666,7 +666,7 @@ ToolView *MainWindow::createToolView (const QString &identifier, KMultiTabBar::K
return v;
}
-ToolView *MainWindow::toolView (const QString &identifier) const
+ToolView *MainWindow::toolView (const TQString &identifier) const
{
return m_idToWidget[identifier];
}
@@ -710,7 +710,7 @@ bool MainWindow::moveToolView (ToolView *widget, KMultiTabBar::KMultiTabBarPosit
if (m_restoreConfig && m_restoreConfig->hasGroup (m_restoreGroup))
{
m_restoreConfig->setGroup (m_restoreGroup);
- pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(widget->id), pos);
+ pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (TQString ("Kate-MDI-ToolView-%1-Position").tqarg(widget->id), pos);
}
m_sidebars[pos]->addWidget (widget->icon, widget->text, widget);
@@ -742,7 +742,7 @@ bool MainWindow::hideToolView (ToolView *widget)
return widget->sidebar()->hideWidget (widget);
}
-void MainWindow::startRestore (KConfig *config, const QString &group)
+void MainWindow::startRestore (KConfig *config, const TQString &group)
{
// first save this stuff
m_restoreConfig = config;
@@ -751,9 +751,9 @@ void MainWindow::startRestore (KConfig *config, const QString &group)
if (!m_restoreConfig || !m_restoreConfig->hasGroup (m_restoreGroup))
{
//BEGIN Added stuff specifically for ktechlab
- QValueList<int> hs;
+ TQValueList<int> hs;
hs << 220 << 100 << 230;
- QValueList<int> vs;
+ TQValueList<int> vs;
vs << 0 << 100 << 150;
m_sidebars[0]->setLastSize (hs[0]);
@@ -775,8 +775,8 @@ void MainWindow::startRestore (KConfig *config, const QString &group)
m_restoreConfig->setGroup (m_restoreGroup);
// get main splitter sizes ;)
- QValueList<int> hs = m_restoreConfig->readIntListEntry ("Kate-MDI-H-Splitter");
- QValueList<int> vs = m_restoreConfig->readIntListEntry ("Kate-MDI-V-Splitter");
+ TQValueList<int> hs = m_restoreConfig->readIntListEntry ("Kate-MDI-H-Splitter");
+ TQValueList<int> vs = m_restoreConfig->readIntListEntry ("Kate-MDI-V-Splitter");
m_sidebars[0]->setLastSize (hs[0]);
m_sidebars[1]->setLastSize (hs[2]);
@@ -803,7 +803,7 @@ void MainWindow::finishRestore ()
m_restoreConfig->setGroup (m_restoreGroup);
for ( unsigned int i=0; i < m_toolviews.size(); ++i )
{
- KMultiTabBar::KMultiTabBarPosition newPos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(m_toolviews[i]->id), m_toolviews[i]->sidebar()->sidebarPosition());
+ KMultiTabBar::KMultiTabBarPosition newPos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (TQString ("Kate-MDI-ToolView-%1-Position").tqarg(m_toolviews[i]->id), m_toolviews[i]->sidebar()->sidebarPosition());
if (m_toolviews[i]->sidebar()->sidebarPosition() != newPos)
{
@@ -822,7 +822,7 @@ void MainWindow::finishRestore ()
m_restoreGroup = "";
}
-void MainWindow::saveSession (KConfig *config, const QString &group)
+void MainWindow::saveSession (KConfig *config, const TQString &group)
{
if (!config)
return;
@@ -832,8 +832,8 @@ void MainWindow::saveSession (KConfig *config, const QString &group)
config->setGroup (group);
// save main splitter sizes ;)
- QValueList<int> hs = m_hSplitter->sizes();
- QValueList<int> vs = m_vSplitter->sizes();
+ TQValueList<int> hs = m_hSplitter->sizes();
+ TQValueList<int> vs = m_vSplitter->sizes();
if (hs[0] <= 2 && !m_sidebars[0]->splitterVisible ())
hs[0] = m_sidebars[0]->lastSize();
diff --git a/src/katemdi.h b/src/katemdi.h
index aca8419..177d3b2 100644
--- a/src/katemdi.h
+++ b/src/katemdi.h
@@ -25,40 +25,42 @@
#include <kmultitabbar.h>
-#include <qdict.h>
-#include <qintdict.h>
-#include <qsplitter.h>
+#include <tqdict.h>
+#include <tqintdict.h>
+#include <tqsplitter.h>
namespace KateMDI {
-/** This class is needed because QSplitter cant return an index for a widget. */
-class Splitter : public QSplitter
+/** This class is needed because TQSplitter cant return an index for a widget. */
+class Splitter : public TQSplitter
{
Q_OBJECT
+ TQ_OBJECT
public:
- Splitter(Orientation o, QWidget* parent=0, const char* name=0);
+ Splitter(Qt::Orientation o, TQWidget* tqparent=0, const char* name=0);
~Splitter();
/** Since there is supposed to be only 2 childs of a katesplitter,
* any child other than the last is the first.
- * This method uses QSplitter::idAfter(widget) which
+ * This method uses TQSplitter::idAfter(widget) which
* returns 0 if there is no widget after this one.
* This results in an error if widget is not a child
* in this splitter */
- bool isLastChild(QWidget* w) const;
+ bool isLastChild(TQWidget* w) const;
- int idAfter ( QWidget * w ) const;
+ int idAfter ( TQWidget * w ) const;
};
class ToggleToolViewAction : public KToggleAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- ToggleToolViewAction ( const QString& text, const KShortcut& cut,
- class ToolView *tv, QObject* parent = 0, const char* name = 0 );
+ ToggleToolViewAction ( const TQString& text, const KShortcut& cut,
+ class ToolView *tv, TQObject* tqparent = 0, const char* name = 0 );
virtual ~ToggleToolViewAction();
@@ -70,9 +72,10 @@ class ToggleToolViewAction : public KToggleAction
ToolView *m_tv;
};
-class GUIClient : public QObject, public KXMLGUIClient
+class GUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
GUIClient ( class MainWindow *mw );
@@ -88,9 +91,10 @@ class GUIClient : public QObject, public KXMLGUIClient
MainWindow *m_mw;
};
-class ToolView : public QVBox
+class ToolView : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
friend class Sidebar;
friend class MainWindow;
@@ -105,9 +109,9 @@ class ToolView : public QVBox
* be automatically set to be the focus proxy of the toolview
* @param mainwin main window for this toolview
* @param sidebar sidebar of this toolview
- * @param parent parent widget, e.g. the splitter of one of the sidebars
+ * @param tqparent tqparent widget, e.g. the splitter of one of the sidebars
*/
- ToolView (class MainWindow *mainwin, class Sidebar *sidebar, QWidget *parent);
+ ToolView (class MainWindow *mainwin, class Sidebar *sidebar, TQWidget *tqparent);
public:
/**
@@ -137,7 +141,7 @@ class ToolView : public QVBox
bool visible () const;
protected:
- void childEvent ( QChildEvent *ev );
+ void childEvent ( TQChildEvent *ev );
private:
MainWindow *m_mainWin;
@@ -146,7 +150,7 @@ class ToolView : public QVBox
/**
* unique id
*/
- QString id;
+ TQString id;
/**
* is visible in sidebar
@@ -158,16 +162,17 @@ class ToolView : public QVBox
*/
bool persistent;
- QPixmap icon;
- QString text;
+ TQPixmap icon;
+ TQString text;
};
class Sidebar : public KMultiTabBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- Sidebar (KMultiTabBar::KMultiTabBarPosition pos, class MainWindow *mainwin, QWidget *parent);
+ Sidebar (KMultiTabBar::KMultiTabBarPosition pos, class MainWindow *mainwin, TQWidget *tqparent);
virtual ~Sidebar ();
void setSplitter (Splitter *sp);
@@ -180,7 +185,7 @@ class Sidebar : public KMultiTabBar
KMultiTabBar::KMultiTabBarStyle sidebarTabStyle() const { return m_sidebarTabStyle; }
public:
- ToolView *addWidget (const QPixmap &icon, const QString &text, ToolView *widget);
+ ToolView *addWidget (const TQPixmap &icon, const TQString &text, ToolView *widget);
bool removeWidget (ToolView *widget);
bool showWidget (ToolView *widget);
@@ -210,7 +215,7 @@ class Sidebar : public KMultiTabBar
void tabClicked(int);
protected:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(TQObject *obj, TQEvent *ev);
private slots:
void buttonPopupActivate (int id);
@@ -224,13 +229,13 @@ class Sidebar : public KMultiTabBar
KMultiTabBar *m_tabBar;
Splitter *m_ownSplit;
- QIntDict<ToolView> m_idToWidget;
- QMap<ToolView*, int> m_widgetToId;
+ TQIntDict<ToolView> m_idToWidget;
+ TQMap<ToolView*, int> m_widgetToId;
/**
* list of all toolviews around in this sidebar
*/
- QValueList<ToolView*> m_toolviews;
+ TQValueList<ToolView*> m_toolviews;
int m_lastSize;
@@ -240,6 +245,7 @@ class Sidebar : public KMultiTabBar
class MainWindow : public KParts::MainWindow
{
Q_OBJECT
+ TQ_OBJECT
friend class ToolView;
@@ -250,7 +256,7 @@ class MainWindow : public KParts::MainWindow
/**
* Constructor
*/
- MainWindow (QWidget* parentWidget = 0, const char* name = 0);
+ MainWindow (TQWidget* tqparentWidget = 0, const char* name = 0);
/**
* Destructor
@@ -263,11 +269,11 @@ class MainWindow : public KParts::MainWindow
public:
/**
* central widget ;)
- * use this as parent for your content
+ * use this as tqparent for your content
* this widget will get focus if a toolview is hidden
* @return central widget
*/
- QWidget *centralWidget () const;
+ TQWidget *centralWidget () const;
/**
* add a given widget to the given sidebar if possible, name is very important
@@ -277,14 +283,14 @@ class MainWindow : public KParts::MainWindow
* @param text text to use in addition to icon
* @return created toolview on success or 0
*/
- ToolView *createToolView (const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QPixmap &icon, const QString &text);
+ ToolView *createToolView (const TQString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const TQPixmap &icon, const TQString &text);
/**
* give you handle to toolview for the given name, 0 if no toolview around
* @param identifier toolview name
* @return toolview if existing, else 0
*/
- ToolView *toolView (const QString &identifier) const;
+ ToolView *toolView (const TQString &identifier) const;
/**
* set the toolview's tabbar style.
@@ -341,7 +347,7 @@ class MainWindow : public KParts::MainWindow
* @param config config object to use
* @param group config group to use
*/
- void startRestore (KConfig *config, const QString &group);
+ void startRestore (KConfig *config, const TQString &group);
/**
* finish the restore
@@ -353,7 +359,7 @@ class MainWindow : public KParts::MainWindow
* @param config config object to use
* @param group config group to use
*/
- void saveSession (KConfig *config, const QString &group);
+ void saveSession (KConfig *config, const TQString &group);
/**
* internal data ;)
@@ -362,18 +368,18 @@ class MainWindow : public KParts::MainWindow
/**
* map identifiers to widgets
*/
- QDict<ToolView> m_idToWidget;
+ TQDict<ToolView> m_idToWidget;
/**
* list of all toolviews around
*/
- QValueList<ToolView*> m_toolviews;
+ TQValueList<ToolView*> m_toolviews;
/**
* widget, which is the central part of the
* main window ;)
*/
- QWidget *m_centralWidget;
+ TQWidget *m_centralWidget;
/**
* horizontal splitter
@@ -399,7 +405,7 @@ class MainWindow : public KParts::MainWindow
/**
* restore group
*/
- QString m_restoreGroup;
+ TQString m_restoreGroup;
/**
* out guiclient
diff --git a/src/ktechlab.cpp b/src/ktechlab.cpp
index cc89ffb..1e10245 100644
--- a/src/ktechlab.cpp
+++ b/src/ktechlab.cpp
@@ -34,10 +34,10 @@
#include "textview.h"
#include "viewcontainer.h"
-#include <qdockarea.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqdockarea.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#include <kaccel.h>
#include <kapplication.h>
@@ -58,7 +58,7 @@
KTechlab::KTechlab()
: KateMDI::MainWindow( 0, "KTechlab" )
{
- QTime ct;
+ TQTime ct;
ct.start();
m_bIsShown = false;
@@ -68,8 +68,8 @@ KTechlab::KTechlab()
m_pFocusedContainer = 0l;
m_pToolBarOverlayLabel = 0l;
- m_pUpdateCaptionsTimer = new QTimer( this );
- connect( m_pUpdateCaptionsTimer, SIGNAL(timeout()), this, SLOT(slotUpdateCaptions()) );
+ m_pUpdateCaptionsTimer = new TQTimer( this );
+ connect( m_pUpdateCaptionsTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateCaptions()) );
setMinimumSize( 400, 400 );
@@ -105,7 +105,7 @@ void KTechlab::show()
void KTechlab::load( const KURL & url )
{
- if ( url.url().endsWith( ".ktechlab", false ) )
+ if ( url.url().tqendsWith( ".ktechlab", false ) )
{
// This is a ktechlab project; it has to be handled separetly from a
// normal file.
@@ -115,7 +115,7 @@ void KTechlab::load( const KURL & url )
}
- QString target;
+ TQString target;
// the below code is what you should normally do. in this
// example case, we want the url to our own. you probably
// want to use this code instead for your app
@@ -143,7 +143,7 @@ void KTechlab::load( const KURL & url )
}
-QStringList KTechlab::recentFiles()
+TQStringList KTechlab::recentFiles()
{
return m_recentFiles->items();
}
@@ -157,7 +157,7 @@ void KTechlab::setupToolDocks()
# endif
#endif
- QPixmap pm;
+ TQPixmap pm;
KIconLoader * loader = KGlobal::iconLoader();
KateMDI::ToolView * tv = 0l;
@@ -227,10 +227,10 @@ void KTechlab::setupToolDocks()
void KTechlab::addWindow( ViewContainer * vc )
{
- if ( vc && !m_viewContainerList.contains(vc) )
+ if ( vc && !m_viewContainerList.tqcontains(vc) )
{
m_viewContainerList << vc;
- connect( vc, SIGNAL(destroyed(QObject* )), this, SLOT(slotViewContainerDestroyed(QObject* )) );
+ connect( vc, TQT_SIGNAL(destroyed(TQObject* )), TQT_TQOBJECT(this), TQT_SLOT(slotViewContainerDestroyed(TQObject* )) );
}
m_viewContainerList.remove((ViewContainer*)0);
@@ -255,7 +255,7 @@ void KTechlab::overlayToolBarScreenshot()
{
if ( !m_pToolBarOverlayLabel )
{
- m_pToolBarOverlayLabel = new QLabel( 0, 0, WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WNoAutoErase | WType_Popup );
+ m_pToolBarOverlayLabel = new TQLabel( 0, 0, WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WNoAutoErase | WType_Popup );
m_pToolBarOverlayLabel->hide();
m_pToolBarOverlayLabel->setBackgroundMode( NoBackground );
}
@@ -275,39 +275,39 @@ void KTechlab::overlayToolBarScreenshot()
return;
}
- QPtrListIterator<KToolBar> toolBarIterator();
+ TQPtrListIterator<KToolBar> toolBarIterator();
-// QWidget * toolsWidget = toolBar( "toolsToolBar" );
-// QWidget * debugWidget = toolBar( "debugTB" );
+// TQWidget * toolsWidget = toolBar( "toolsToolBar" );
+// TQWidget * debugWidget = toolBar( "debugTB" );
- KToolBar * toolsWidget = static_cast<KToolBar*>(child( "toolsToolBar", "KToolBar" ));
- KToolBar * debugWidget = static_cast<KToolBar*>(child( "debugTB", "KToolBar" ));
+ KToolBar * toolsWidget = static_cast<KToolBar*>(TQT_TQWIDGET(child( "toolsToolBar", "KToolBar" )));
+ KToolBar * debugWidget = static_cast<KToolBar*>(TQT_TQWIDGET(child( "debugTB", "KToolBar" )));
if ( !toolsWidget && !debugWidget )
return;
- QWidget * parent = static_cast<QWidget*>(toolsWidget ? toolsWidget->parent() : debugWidget->parent());
+ TQWidget * tqparent = TQT_TQWIDGET(toolsWidget ? toolsWidget->tqparent() : debugWidget->tqparent());
- QRect grabRect;
+ TQRect grabRect;
// 128 is a sanity check (widget can do strange things when being destroyed)
if ( toolsWidget && toolsWidget->height() <= 128 )
- grabRect |= toolsWidget->geometry();
+ grabRect |= toolsWidget->tqgeometry();
if ( debugWidget && debugWidget->height() <= 128 )
- grabRect |= debugWidget->geometry();
+ grabRect |= debugWidget->tqgeometry();
if ( !grabRect.isValid() )
return;
- QPixmap shot = QPixmap::grabWidget( parent, grabRect.x(), grabRect.y(), grabRect.width(), grabRect.height() );
+ TQPixmap shot = TQPixmap::grabWidget( tqparent, grabRect.x(), grabRect.y(), grabRect.width(), grabRect.height() );
- m_pToolBarOverlayLabel->move( parent->mapToGlobal( grabRect.topLeft() ) );
+ m_pToolBarOverlayLabel->move( tqparent->mapToGlobal( grabRect.topLeft() ) );
m_pToolBarOverlayLabel->setFixedSize( grabRect.size() );
m_pToolBarOverlayLabel->setPixmap( shot );
m_pToolBarOverlayLabel->show();
- QTimer::singleShot( 100, this, SLOT( hideToolBarOverlay() ) );
+ TQTimer::singleShot( 100, TQT_TQOBJECT(this), TQT_SLOT( hideToolBarOverlay() ) );
}
@@ -316,7 +316,7 @@ void KTechlab::hideToolBarOverlay()
if ( !m_pToolBarOverlayLabel )
return;
-// QWidget * hiddenWidget = toolBar( "toolsToolBar" );
+// TQWidget * hiddenWidget = toolBar( "toolsToolBar" );
// if ( !hiddenWidget )
// return;
@@ -330,19 +330,19 @@ void KTechlab::hideToolBarOverlay()
void KTechlab::addNoRemoveGUIClient( KXMLGUIClient * client )
{
- if ( client && !m_noRemoveGUIClients.contains( client ) )
+ if ( client && !m_noRemoveGUIClients.tqcontains( client ) )
m_noRemoveGUIClients << client;
}
void KTechlab::removeGUIClients()
{
- QValueList<KXMLGUIClient*> clientsToRemove;
+ TQValueList<KXMLGUIClient*> clientsToRemove;
- QPtrList<KXMLGUIClient> clients = factory()->clients();
+ TQPtrList<KXMLGUIClient> clients = factory()->clients();
for ( KXMLGUIClient * client = clients.first(); client; client = clients.next() )
{
- if ( client && client != this && !m_noRemoveGUIClients.contains( client ) )
+ if ( client && client != this && !m_noRemoveGUIClients.tqcontains( client ) )
clientsToRemove << client;
}
@@ -351,8 +351,8 @@ void KTechlab::removeGUIClients()
overlayToolBarScreenshot();
- QValueList<KXMLGUIClient*>::iterator end = clientsToRemove.end();
- for ( QValueList<KXMLGUIClient*>::iterator it = clientsToRemove.begin(); it != end; ++it )
+ TQValueList<KXMLGUIClient*>::iterator end = clientsToRemove.end();
+ for ( TQValueList<KXMLGUIClient*>::iterator it = clientsToRemove.begin(); it != end; ++it )
factory()->removeClient(*it);
}
@@ -360,11 +360,11 @@ void KTechlab::removeGUIClients()
void KTechlab::setupTabWidget()
{
m_pViewContainerTabWidget = new KTabWidget(centralWidget());
- connect( tabWidget(), SIGNAL(currentChanged(QWidget* )), this, SLOT(slotViewContainerActivated(QWidget* )) );
- connect( tabWidget(), SIGNAL(testCanDecode(const QDragMoveEvent*, bool& )), this, SLOT(slotTabDragEvent(const QDragMoveEvent*, bool& )) );
- connect( tabWidget(), SIGNAL(initiateDrag(QWidget* )), this, SLOT(slotTabDragInitiate(QWidget* )) );
- connect( tabWidget(), SIGNAL(receivedDropEvent(QDropEvent* )), this, SLOT(slotTabReceivedDropEvent(QDropEvent* )) );
- connect( tabWidget(), SIGNAL(receivedDropEvent(QWidget*, QDropEvent* )), this, SLOT(slotTabReceivedDropEvent(QWidget*, QDropEvent* )) );
+ connect( tabWidget(), TQT_SIGNAL(currentChanged(TQWidget* )), TQT_TQOBJECT(this), TQT_SLOT(slotViewContainerActivated(TQWidget* )) );
+ connect( tabWidget(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent*, bool& )), TQT_TQOBJECT(this), TQT_SLOT(slotTabDragEvent(const TQDragMoveEvent*, bool& )) );
+ connect( tabWidget(), TQT_SIGNAL(initiateDrag(TQWidget* )), TQT_TQOBJECT(this), TQT_SLOT(slotTabDragInitiate(TQWidget* )) );
+ connect( tabWidget(), TQT_SIGNAL(receivedDropEvent(TQDropEvent* )), TQT_TQOBJECT(this), TQT_SLOT(slotTabReceivedDropEvent(TQDropEvent* )) );
+ connect( tabWidget(), TQT_SIGNAL(receivedDropEvent(TQWidget*, TQDropEvent* )), TQT_TQOBJECT(this), TQT_SLOT(slotTabReceivedDropEvent(TQWidget*, TQDropEvent* )) );
KConfig *config = kapp->config();
config->setGroup("UI");
@@ -380,16 +380,16 @@ void KTechlab::setupTabWidget()
if (config->readBoolEntry( "ShowCloseTabsButton", true ))
{
- QToolButton *but = new QToolButton(tabWidget());
+ TQToolButton *but = new TQToolButton(tabWidget());
but->setIconSet(SmallIcon("tab_remove"));
but->adjustSize();
but->hide();
- connect( but, SIGNAL(clicked()), this, SLOT(slotViewContainerClose()) );
+ connect( but, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotViewContainerClose()) );
tabWidget()->setCornerWidget(but, TopRight);
}
// tabWidget()->setTabReorderingEnabled(true);
-// connect(tabWidget(), SIGNAL(movedTab(int, int)), this, SLOT(tabMoved(int, int)));
- connect(tabWidget(), SIGNAL(contextMenu(QWidget*,const QPoint &)), this, SLOT(slotTabContext(QWidget*,const QPoint &)));
+// connect(tabWidget(), TQT_SIGNAL(movedTab(int, int)), TQT_TQOBJECT(this), TQT_SLOT(tabMoved(int, int)));
+ connect(tabWidget(), TQT_SIGNAL(contextMenu(TQWidget*,const TQPoint &)), TQT_TQOBJECT(this), TQT_SLOT(slotTabContext(TQWidget*,const TQPoint &)));
//END Tab bar stuff
}
@@ -400,7 +400,7 @@ void KTechlab::slotUpdateTabWidget()
bool noWindows = m_viewContainerList.isEmpty();
- if ( QWidget * button = tabWidget()->cornerWidget(TopRight) )
+ if ( TQWidget * button = tabWidget()->cornerWidget(TopRight) )
button->setHidden( noWindows );
if ( noWindows )
@@ -412,67 +412,67 @@ void KTechlab::setupActions()
{
KActionCollection *ac = actionCollection();
- KStdAction::openNew( this, SLOT(slotFileNew()), ac );
- KStdAction::open( this, SLOT(slotFileOpen()), ac );
- KStdAction::save( this, SLOT(slotFileSave()), ac );
- KStdAction::saveAs( this, SLOT(slotFileSaveAs()), ac );
- KStdAction::close( this, SLOT(slotViewClose()), ac );
- KStdAction::print( this, SLOT(slotFilePrint()), ac );
- KStdAction::quit( this, SLOT(slotFileQuit()), ac );
- KStdAction::undo( this, SLOT(slotEditUndo()), ac );
- KStdAction::redo( this, SLOT(slotEditRedo()), ac );
- KStdAction::cut( this, SLOT(slotEditCut()), ac );
- KStdAction::copy( this, SLOT(slotEditCopy()), ac );
- KStdAction::paste( this, SLOT(slotEditPaste()), ac );
- KStdAction::keyBindings( this, SLOT(slotOptionsConfigureKeys()), ac );
- KStdAction::configureToolbars( this, SLOT(slotOptionsConfigureToolbars()), ac );
- KStdAction::preferences( this, SLOT(slotOptionsPreferences()), ac );
+ KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), ac );
+ KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), ac );
+ KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), ac );
+ KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), ac );
+ KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT(slotViewClose()), ac );
+ KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), ac );
+ KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), ac );
+ KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT(slotEditUndo()), ac );
+ KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT(slotEditRedo()), ac );
+ KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT(slotEditCut()), ac );
+ KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), ac );
+ KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), ac );
+ KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotOptionsConfigureKeys()), ac );
+ KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT(slotOptionsConfigureToolbars()), ac );
+ KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotOptionsPreferences()), ac );
//BEGIN New file popup
- KToolBarPopupAction *p = new KToolBarPopupAction( i18n("&New"), "filenew", KStdAccel::shortcut(KStdAccel::New), this, SLOT(slotFileNew()), ac, "newfile_popup" );
+ KToolBarPopupAction *p = new KToolBarPopupAction( i18n("&New"), "filenew", KStdAccel::shortcut(KStdAccel::New), TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), ac, "newfile_popup" );
p->popupMenu()->insertTitle( i18n("New File") );
- (new KAction( i18n("Assembly"), "source", 0, this, SLOT(slotFileNewAssembly()), ac, "newfile_asm" ))->plug( p->popupMenu() );
- (new KAction( i18n("C source"), "source_c", 0, this, SLOT(slotFileNewC()), ac, "newfile_c" ))->plug( p->popupMenu() );
- (new KAction( i18n("Circuit"), "ktechlab_circuit", 0, this, SLOT(slotFileNewCircuit()), ac, "newfile_circuit" ))->plug( p->popupMenu() );
- (new KAction( i18n("FlowCode"), "ktechlab_flowcode", 0, this, SLOT(slotFileNewFlowCode()), ac, "newfile_flowcode" ))->plug( p->popupMenu() );
+ (new KAction( i18n("Assembly"), "source", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewAssembly()), ac, "newfile_asm" ))->plug( p->popupMenu() );
+ (new KAction( i18n("C source"), "source_c", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewC()), ac, "newfile_c" ))->plug( p->popupMenu() );
+ (new KAction( i18n("Circuit"), "ktechlab_circuit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewCircuit()), ac, "newfile_circuit" ))->plug( p->popupMenu() );
+ (new KAction( i18n("FlowCode"), "ktechlab_flowcode", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewFlowCode()), ac, "newfile_flowcode" ))->plug( p->popupMenu() );
#ifdef MECHANICS
- (new KAction( i18n("Mechanics"), "ktechlab_mechanics", 0, this, SLOT(slotFileNewMechanics()), ac, "newfile_mechanics" ))->plug( p->popupMenu() );
+ (new KAction( i18n("Mechanics"), "ktechlab_mechanics", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewMechanics()), ac, "newfile_mechanics" ))->plug( p->popupMenu() );
#endif
- (new KAction( "Microbe", "ktechlab_microbe", 0, this, SLOT(slotFileNewMicrobe()), ac, "newfile_microbe" ))->plug( p->popupMenu() );
+ (new KAction( "Microbe", "ktechlab_microbe", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewMicrobe()), ac, "newfile_microbe" ))->plug( p->popupMenu() );
//END New File popup
-// m_recentFiles = KStdAction::openRecent( this, SLOT(load(const KURL&)), ac );
- m_recentFiles = new RecentFilesAction( "Recent Files", i18n("Open Recent"), this, SLOT(load(const KURL &)), ac, "file_open_recent" );
- m_statusbarAction = KStdAction::showStatusbar( this, SLOT(slotOptionsShowStatusbar()), ac );
+// m_recentFiles = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT(load(const KURL&)), ac );
+ m_recentFiles = new RecentFilesAction( "Recent Files", i18n("Open Recent"), TQT_TQOBJECT(this), TQT_SLOT(load(const KURL &)), ac, "file_open_recent" );
+ m_statusbarAction = KStdAction::showStatusbar( TQT_TQOBJECT(this), TQT_SLOT(slotOptionsShowStatusbar()), ac );
//BEGIN Project Actions
ProjectManager *pm = ProjectManager::self(this);
- new KAction( i18n("New Project.."), "window_new", 0, pm, SLOT(slotNewProject()), ac, "project_new" );
- new KAction( i18n("Open Project..."), "project_open", 0, pm, SLOT(slotOpenProject()), ac, "project_open" );
-// m_recentProjects = new KRecentFilesAction( i18n("Open &Recent Project..."), 0, ProjectManager::self(), SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" );
- m_recentProjects = new RecentFilesAction( "Recent Projects", i18n("Open &Recent Project..."), ProjectManager::self(), SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" );
- new KAction( i18n("Export to Makefile..."), "fileexport", 0, pm, SLOT(slotExportToMakefile()), ac, "project_export_makefile" );
- new KAction( i18n("Create Subproject..."), 0, 0, pm, SLOT(slotCreateSubproject()), ac, "project_create_subproject" );
- new KAction( i18n("Add Existing File..."), "fileopen", 0, pm, SLOT(slotAddFile()), ac, "project_add_existing_file" );
- new KAction( i18n("Add Current File..."), "fileimport", 0, pm, SLOT(slotAddCurrentFile()), ac, "project_add_current_file" );
-// new KAction( i18n("Project Options"), "configure", 0, pm, SLOT(slotProjectOptions()), ac, "project_options" );
- new KAction( i18n("Close Project"), "fileclose", 0, pm, SLOT(slotCloseProject()), ac, "project_close" );
- new KAction( i18n("Remove from Project"), "editdelete", 0, pm, SLOT(slotRemoveSelected()), ac, "project_remove_selected" );
- new KAction( i18n("Insert Existing File..."), "fileopen", 0, pm, SLOT(slotSubprojectAddExistingFile()), ac, "subproject_add_existing_file" );
- new KAction( i18n("Insert Current File..."), "fileimport", 0, pm, SLOT(slotSubprojectAddCurrentFile()),ac, "subproject_add_current_file" );
- new KAction( i18n("Linker Options..."), "configure", 0, pm, SLOT(slotSubprojectLinkerOptions()), ac, "project_item_linker_options" );
- new KAction( i18n("Build..."), "launch", 0, pm, SLOT(slotItemBuild()), ac, "project_item_build" );
- new KAction( i18n("Upload..."), "convert_to_pic", 0, pm, SLOT(slotItemUpload()), ac, "project_item_upload" );
- new KAction( i18n("Processing Options..."), "configure", 0, pm, SLOT(slotItemProcessingOptions()), ac, "project_item_processing_options" );
+ new KAction( i18n("New Project.."), "window_new", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotNewProject()), ac, "project_new" );
+ new KAction( i18n("Open Project..."), "project_open", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotOpenProject()), ac, "project_open" );
+// m_recentProjects = new KRecentFilesAction( i18n("Open &Recent Project..."), 0, ProjectManager::self(), TQT_SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" );
+ m_recentProjects = new RecentFilesAction( "Recent Projects", i18n("Open &Recent Project..."), TQT_TQOBJECT(ProjectManager::self()), TQT_SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" );
+ new KAction( i18n("Export to Makefile..."), "fileexport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotExportToMakefile()), ac, "project_export_makefile" );
+ new KAction( i18n("Create Subproject..."), 0, 0, TQT_TQOBJECT(pm), TQT_SLOT(slotCreateSubproject()), ac, "project_create_subproject" );
+ new KAction( i18n("Add Existing File..."), "fileopen", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotAddFile()), ac, "project_add_existing_file" );
+ new KAction( i18n("Add Current File..."), "fileimport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotAddCurrentFile()), ac, "project_add_current_file" );
+// new KAction( i18n("Project Options"), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotProjectOptions()), ac, "project_options" );
+ new KAction( i18n("Close Project"), "fileclose", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotCloseProject()), ac, "project_close" );
+ new KAction( i18n("Remove from Project"), "editdelete", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotRemoveSelected()), ac, "project_remove_selected" );
+ new KAction( i18n("Insert Existing File..."), "fileopen", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectAddExistingFile()), ac, "subproject_add_existing_file" );
+ new KAction( i18n("Insert Current File..."), "fileimport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectAddCurrentFile()),ac, "subproject_add_current_file" );
+ new KAction( i18n("Linker Options..."), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectLinkerOptions()), ac, "project_item_linker_options" );
+ new KAction( i18n("Build..."), "launch", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemBuild()), ac, "project_item_build" );
+ new KAction( i18n("Upload..."), "convert_to_pic", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemUpload()), ac, "project_item_upload" );
+ new KAction( i18n("Processing Options..."), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemProcessingOptions()), ac, "project_item_processing_options" );
//END Project Actions
- new KAction( i18n("Split View Left/Right"), "view_right", Qt::CTRL|Qt::SHIFT|Qt::Key_L, this, SLOT(slotViewSplitLeftRight()), ac, "view_split_leftright" );
- new KAction( i18n("Split View Top/Bottom"), "view_bottom", Qt::CTRL|Qt::SHIFT|Qt::Key_T, this, SLOT(slotViewSplitTopBottom()), ac, "view_split_topbottom" );
+ new KAction( i18n("Split View Left/Right"), "view_right", TQt::CTRL|TQt::SHIFT|TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotViewSplitLeftRight()), ac, "view_split_leftright" );
+ new KAction( i18n("Split View Top/Bottom"), "view_bottom", TQt::CTRL|TQt::SHIFT|TQt::Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotViewSplitTopBottom()), ac, "view_split_topbottom" );
- KToggleAction * ta = new KToggleAction( i18n("Run Simulation"), "player_play", Qt::Key_F10, 0, 0, ac, "simulation_run" );
+ KToggleAction * ta = new KToggleAction( i18n("Run Simulation"), "player_play", TQt::Key_F10, 0, 0, ac, "simulation_run" );
ta->setChecked(true);
- connect( ta, SIGNAL(toggled(bool )), Simulator::self(), SLOT(slotSetSimulating(bool )) );
+ connect( ta, TQT_SIGNAL(toggled(bool )), Simulator::self(), TQT_SLOT(slotSetSimulating(bool )) );
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
ta->setCheckedState( KGuiItem( i18n("Pause Simulation"), "player_pause", 0 ) );
@@ -486,7 +486,7 @@ void KTechlab::setupActions()
}
-void KTechlab::slotViewContainerActivated( QWidget * viewContainer )
+void KTechlab::slotViewContainerActivated( TQWidget * viewContainer )
{
if (m_pFocusedContainer)
m_pFocusedContainer->setUnfocused();
@@ -499,15 +499,15 @@ void KTechlab::slotViewContainerActivated( QWidget * viewContainer )
}
-void KTechlab::slotViewContainerDestroyed( QObject * object )
+void KTechlab::slotViewContainerDestroyed( TQObject * object )
{
- m_viewContainerList.remove( static_cast<ViewContainer*>(object) );
+ m_viewContainerList.remove( static_cast<ViewContainer*>(TQT_TQWIDGET(object)) );
m_viewContainerList.remove( (ViewContainer*)0 );
slotUpdateTabWidget();
}
-void KTechlab::slotTabDragEvent( const QDragMoveEvent *e, bool &accept )
+void KTechlab::slotTabDragEvent( const TQDragMoveEvent *e, bool &accept )
{
// Hmm...this function doesn't actually seem to get called. Instead,
// KTabBar just seems to go straight to slotTabDragInitiate.
@@ -516,17 +516,17 @@ void KTechlab::slotTabDragEvent( const QDragMoveEvent *e, bool &accept )
}
-void KTechlab::slotTabDragInitiate( QWidget *widget )
+void KTechlab::slotTabDragInitiate( TQWidget *widget )
{
ViewContainer *viewContainer = dynamic_cast<ViewContainer*>(widget);
if (!viewContainer)
return;
- QDragObject *dragObject = new ViewContainerDrag(viewContainer);
+ TQDragObject *dragObject = new ViewContainerDrag(viewContainer);
dragObject->drag();
}
-void KTechlab::slotTabReceivedDropEvent( QDropEvent *e )
+void KTechlab::slotTabReceivedDropEvent( TQDropEvent *e )
{
if (!e)
return;
@@ -541,7 +541,7 @@ void KTechlab::slotTabReceivedDropEvent( QDropEvent *e )
}
-void KTechlab::slotTabReceivedDropEvent( QWidget *widget, QDropEvent *e )
+void KTechlab::slotTabReceivedDropEvent( TQWidget *widget, TQDropEvent *e )
{
if (!e)
return;
@@ -560,9 +560,9 @@ void KTechlab::slotTabReceivedDropEvent( QWidget *widget, QDropEvent *e )
dropMenu.insertSeparator();
dropMenu.insertItem( KGlobal::iconLoader()->loadIcon( "stop", KIcon::Small ), i18n("C&ancel"), 2 );
- connect( &dropMenu, SIGNAL(activated(int)), this, SLOT(slotDragContextActivated(int)) );
+ connect( &dropMenu, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotDragContextActivated(int)) );
// dropMenu.exec(e->pos() + widget->pos() );
- dropMenu.exec( QCursor::pos() );
+ dropMenu.exec( TQCursor::pos() );
}
@@ -587,7 +587,7 @@ void KTechlab::slotDragContextActivated( int id )
}
-KAction * KTechlab::action( const QString & name ) const
+KAction * KTechlab::action( const TQString & name ) const
{
KAction * action = actionCollection()->action(name);
if ( !action )
@@ -618,9 +618,9 @@ void KTechlab::saveProperties( KConfig *conf )
//BEGIN Open Views State
// Remvoe old entries describing the save state - we don't want a horrible mish-mash of saved states
- const QStringList groupList = conf->groupList();
- const QStringList::const_iterator groupListEnd = groupList.end();
- for ( QStringList::const_iterator it = groupList.begin(); it != groupListEnd; ++it )
+ const TQStringList groupList = conf->groupList();
+ const TQStringList::const_iterator groupListEnd = groupList.end();
+ for ( TQStringList::const_iterator it = groupList.begin(); it != groupListEnd; ++it )
{
if ( (*it).startsWith("ViewContainer") )
conf->deleteGroup(*it);
@@ -635,7 +635,7 @@ void KTechlab::saveProperties( KConfig *conf )
// To make sure the ViewContainers are restored in the right order, we must create them in alphabetical order,
// as KConfig stores them as such...
- const QString id = QString::number(viewContainerId++).rightJustify( 4, '0' );
+ const TQString id = TQString::number(viewContainerId++).rightJustify( 4, '0' );
conf->setGroup( "ViewContainer " + id );
(*it)->saveState(conf);
@@ -645,10 +645,10 @@ void KTechlab::saveProperties( KConfig *conf )
saveSession( conf, "KateMDI" );
// Piss off KMainWindow
conf->setGroup("KateMDI");
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
- conf->deleteEntry( QString::fromLatin1("Width %1").arg(desk.width()) );
- conf->deleteEntry( QString::fromLatin1("Height %1").arg(desk.height()) );
+ int scnum = TQApplication::desktop()->screenNumber(tqparentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
+ conf->deleteEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()) );
+ conf->deleteEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()) );
conf->sync();
}
@@ -666,11 +666,11 @@ void KTechlab::readProperties( KConfig *conf )
{
// If we have a lot of views open from last time, then opening them will take a long time.
// So we want to enter the qt event loop to finish drawing the window et al before adding the views.
- qApp->processEvents();
+ tqApp->processEvents();
- const QStringList groupList = conf->groupList();
- const QStringList::const_iterator groupListEnd = groupList.end();
- for ( QStringList::const_iterator it = groupList.begin(); it != groupListEnd; ++it )
+ const TQStringList groupList = conf->groupList();
+ const TQStringList::const_iterator groupListEnd = groupList.end();
+ for ( TQStringList::const_iterator it = groupList.begin(); it != groupListEnd; ++it )
{
if ( (*it).startsWith("ViewContainer") )
{
@@ -686,7 +686,7 @@ void KTechlab::readProperties( KConfig *conf )
//END Restore Open Views
conf->setGroup("Project");
- if ( conf->readPathEntry("Open") != QString::null )
+ if ( conf->readPathEntry("Open") != TQString() )
ProjectManager::self()->slotOpenProject( KURL( conf->readPathEntry("Open") ) );
#ifndef NO_GPSIM
@@ -702,17 +702,17 @@ void KTechlab::readProperties( KConfig *conf )
}
-void KTechlab::dragEnterEvent(QDragEnterEvent *event)
+void KTechlab::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void KTechlab::dropEvent(QDropEvent *event)
+void KTechlab::dropEvent(TQDropEvent *event)
{
// this is a very simplistic implementation of a drop event. we
- // will only accept a dropped URL. the Qt dnd code can do *much*
+ // will only accept a dropped URL. the TQt dnd code can do *much*
// much more, so please read the docs there
KURL::List urls;
@@ -773,7 +773,7 @@ void KTechlab::slotOptionsPreferences()
// User edited the configuration - update your local copies of the
// configuration data
- connect( dialog, SIGNAL(settingsChanged()), this, SLOT(slotUpdateConfiguration()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateConfiguration()) );
dialog->show();
}
@@ -784,9 +784,9 @@ void KTechlab::slotUpdateConfiguration()
}
-void KTechlab::slotChangeStatusbar( const QString & text )
+void KTechlab::slotChangeStatusbar( const TQString & text )
{
- // Avoid flicker by repeatedly displaying the same message, as QStatusBar does not check for this
+ // Avoid flicker by repeatedly displaying the same message, as TQStatusBar does not check for this
if ( m_lastStatusBarMessage == text )
return;
@@ -795,7 +795,7 @@ void KTechlab::slotChangeStatusbar( const QString & text )
}
-void KTechlab::slotTabContext( QWidget* widget,const QPoint & pos )
+void KTechlab::slotTabContext( TQWidget* widget,const TQPoint & pos )
{
// Shamelessly stolen from KDevelop...
@@ -831,7 +831,7 @@ void KTechlab::slotTabContext( QWidget* widget,const QPoint & pos )
}
}
- connect( tabMenu, SIGNAL( activated(int) ), this, SLOT(slotTabContextActivated(int)) );
+ connect( tabMenu, TQT_SIGNAL( activated(int) ), TQT_TQOBJECT(this), TQT_SLOT(slotTabContextActivated(int)) );
tabMenu->exec(pos);
delete tabMenu;
@@ -848,7 +848,7 @@ void KTechlab::slotTabContextActivated( int id )
View *view = m_pContextMenuContainer->activeView();
if (!view)
return;
- QGuardedPtr<Document> document = view->document();
+ TQGuardedPtr<Document> document = view->document();
switch(id)
{
@@ -931,7 +931,7 @@ void KTechlab::slotFileNew()
bool addToProject = newFileDlg->addToProject();
bool accepted = newFileDlg->accepted();
int finalType = newFileDlg->fileType();
- QString microID = newFileDlg->microID();
+ TQString microID = newFileDlg->microID();
int codeType = newFileDlg->codeType();
delete newFileDlg;
@@ -991,7 +991,7 @@ void KTechlab::addRecentFile( const KURL &url )
KURL::List KTechlab::getFileURLs()
{
return KFileDialog::getOpenURLs(
- QString::null,
+ TQString(),
"*|All Files\n"
"*.asm *.src *.inc|Assembly Code (*.asm, *.src, *.inc)\n"
"*.hex|Intel Hex (*.hex)\n"
@@ -1015,7 +1015,7 @@ void KTechlab::slotDocModifiedChanged()
if ( !vc || !vc->activeView() || !vc->activeView()->document() )
continue;
- QString iconName;
+ TQString iconName;
if ( vc->activeView()->document()->isModified() )
iconName = "filesave";
@@ -1062,7 +1062,7 @@ void KTechlab::slotUpdateCaptions()
{
//BEGIN Set KTechlab caption
Document *document = DocManager::self()->getFocusedDocument();
- QString newCaption;
+ TQString newCaption;
if ( document )
{
KURL url = document->url();
diff --git a/src/ktechlab.h b/src/ktechlab.h
index b69d0c2..d2bf51a 100644
--- a/src/ktechlab.h
+++ b/src/ktechlab.h
@@ -26,7 +26,7 @@ class ProjectManager;
class View;
class ViewContainer;
-typedef QValueList< QGuardedPtr<ViewContainer> > ViewContainerList;
+typedef TQValueList< TQGuardedPtr<ViewContainer> > ViewContainerList;
class KAction;
class RecentFilesAction;
@@ -34,7 +34,7 @@ class KTabWidget;
class KToolBar;
class KToggleAction;
class KURL;
-class QLabel;
+class TQLabel;
/**
* This class serves as the main window for KTechlab. It handles the
@@ -46,6 +46,7 @@ class QLabel;
class KTechlab : public KateMDI::MainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
KTechlab();
~KTechlab();
@@ -53,7 +54,7 @@ class KTechlab : public KateMDI::MainWindow
/**
* Returns a pointer to an action with the given name.
*/
- KAction * action( const QString & name ) const;
+ KAction * action( const TQString & name ) const;
/**
* Returns a URL from a Open File dialog (with all ktechlab related file
* types allowed).
@@ -62,10 +63,10 @@ class KTechlab : public KateMDI::MainWindow
/**
* Returns a list of the recently opened/saved files
*/
- QStringList recentFiles();
+ TQStringList recentFiles();
/**
* The tab and window captions will get updated when we have re-entered
- * the Qt event loop.
+ * the TQt event loop.
*/
void requestUpdateCaptions();
/**
@@ -111,13 +112,13 @@ class KTechlab : public KateMDI::MainWindow
/**
* The user right clicked on a tab item.
*/
- void slotTabContext( QWidget* widget,const QPoint & pos );
+ void slotTabContext( TQWidget* widget,const TQPoint & pos );
void slotDragContextActivated( int id );
/**
* The user clicked on an item in the tab-menu (from right clicking).
*/
void slotTabContextActivated( int id );
- void slotChangeStatusbar(const QString& text);
+ void slotChangeStatusbar(const TQString& text);
void load(const KURL& url);
void slotUpdateConfiguration();
/**
@@ -137,10 +138,10 @@ class KTechlab : public KateMDI::MainWindow
protected:
/**
- * Overridden virtuals for Qt drag 'n drop (XDND)
+ * Overridden virtuals for TQt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
/**
* This function is called when it is time for the app to save its
* properties for session management purposes.
@@ -160,11 +161,11 @@ class KTechlab : public KateMDI::MainWindow
virtual bool queryClose();
protected slots:
- void slotViewContainerActivated( QWidget * viewContainer );
- void slotTabDragEvent( const QDragMoveEvent *e, bool &accept );
- void slotTabDragInitiate( QWidget *widget );
- void slotTabReceivedDropEvent( QDropEvent *e );
- void slotTabReceivedDropEvent( QWidget *widget, QDropEvent *e );
+ void slotViewContainerActivated( TQWidget * viewContainer );
+ void slotTabDragEvent( const TQDragMoveEvent *e, bool &accept );
+ void slotTabDragInitiate( TQWidget *widget );
+ void slotTabReceivedDropEvent( TQDropEvent *e );
+ void slotTabReceivedDropEvent( TQWidget *widget, TQDropEvent *e );
void slotUpdateTabWidget();
/**
* Updates the tab and window captions from what is currently open and
@@ -174,11 +175,11 @@ class KTechlab : public KateMDI::MainWindow
private slots:
/**
- * Called from a QTimer timeout (which should be after the toolbars have
+ * Called from a TQTimer timeout (which should be after the toolbars have
* finished constructing themselves).
*/
void hideToolBarOverlay();
- void slotViewContainerDestroyed( QObject * obj );
+ void slotViewContainerDestroyed( TQObject * obj );
void slotFileNewAssembly();
void slotFileNewMicrobe();
@@ -226,17 +227,17 @@ class KTechlab : public KateMDI::MainWindow
RecentFilesAction * m_recentProjects;
KToggleAction * m_statusbarAction;
KTabWidget * m_pViewContainerTabWidget;
- QString m_lastStatusBarMessage;
- QValueList<KXMLGUIClient*> m_noRemoveGUIClients;
- QLabel * m_pToolBarOverlayLabel;
+ TQString m_lastStatusBarMessage;
+ TQValueList<KXMLGUIClient*> m_noRemoveGUIClients;
+ TQLabel * m_pToolBarOverlayLabel;
bool m_bIsShown; // Set true when show() is called
ViewContainerList m_viewContainerList;
- QTimer * m_pUpdateCaptionsTimer;
+ TQTimer * m_pUpdateCaptionsTimer;
- QGuardedPtr<ViewContainer> m_pContextMenuContainer;
- QGuardedPtr<ViewContainer> m_pFocusedContainer;
- QGuardedPtr<ViewContainer> m_pContainerDropSource;
- QGuardedPtr<ViewContainer> m_pContainerDropReceived;
+ TQGuardedPtr<ViewContainer> m_pContextMenuContainer;
+ TQGuardedPtr<ViewContainer> m_pFocusedContainer;
+ TQGuardedPtr<ViewContainer> m_pContainerDropSource;
+ TQGuardedPtr<ViewContainer> m_pContainerDropReceived;
};
#endif // KTECHLAB_H
diff --git a/src/languages/asmparser.cpp b/src/languages/asmparser.cpp
index eb4b7cd..94b01c0 100644
--- a/src/languages/asmparser.cpp
+++ b/src/languages/asmparser.cpp
@@ -13,10 +13,10 @@
#include "gpsimprocessor.h"
#include <kdebug.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
-AsmParser::AsmParser( const QString &url )
+AsmParser::AsmParser( const TQString &url )
: m_url(url)
{
m_bContainsRadix = false;
@@ -31,40 +31,40 @@ AsmParser::~AsmParser()
bool AsmParser::parse( GpsimDebugger * debugger )
{
- QFile file(m_url);
+ TQFile file(m_url);
if ( !file.open(IO_ReadOnly) )
return false;
- QTextStream stream( &file );
+ TQTextStream stream( &file );
m_type = Absolute;
m_bContainsRadix = false;
- m_picID = QString::null;
+ m_picID = TQString();
- QStringList nonAbsoluteOps = QStringList::split( ",",
+ TQStringList nonAbsoluteOps = TQStringList::split( ",",
"code,.def,.dim,.direct,endw,extern,.file,global,idata,.ident,.line,.type,udata,udata_acs,udata_ovr,udata_shr" );
unsigned inputAtLine = 0;
while ( !stream.atEnd() )
{
- const QString line = stream.readLine().stripWhiteSpace();
+ const TQString line = stream.readLine().stripWhiteSpace();
if ( m_type != Relocatable )
{
- QString col0 = line.section( QRegExp("[; ]"), 0, 0 );
+ TQString col0 = line.section( TQRegExp("[; ]"), 0, 0 );
col0 = col0.stripWhiteSpace();
- if ( nonAbsoluteOps.contains(col0) )
+ if ( nonAbsoluteOps.tqcontains(col0) )
m_type = Relocatable;
}
if ( !m_bContainsRadix )
{
- if ( line.contains( QRegExp("^RADIX[\\s]*") ) || line.contains( QRegExp("^radix[\\s]*") ) )
+ if ( line.tqcontains( TQRegExp("^RADIX[\\s]*") ) || line.tqcontains( TQRegExp("^radix[\\s]*") ) )
m_bContainsRadix = true;
}
if ( m_picID.isEmpty() )
{
// We look for "list p = ", and "list p = picid ", and subtract the positions / lengths away from each other to get the picid text position
- QRegExp fullRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*[\\d\\w]+");
- QRegExp halfRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*");
+ TQRegExp fullRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*[\\d\\w]+");
+ TQRegExp halfRegExp("[lL][iI][sS][tT][\\s]+[pP][\\s]*=[\\s]*");
int startPos = fullRegExp.search(line);
if ( (startPos != -1) && (startPos == halfRegExp.search(line)) )
@@ -81,15 +81,15 @@ bool AsmParser::parse( GpsimDebugger * debugger )
// Assembly file produced (by sdcc) from C, line is in format:
// ;#CSRC\t[file-name] [file-line]
// The filename can contain spaces.
- int fileLineAt = line.findRev(" ");
+ int fileLineAt = line.tqfindRev(" ");
if ( fileLineAt == -1 )
kdWarning() << k_funcinfo << "Syntax error in line \"" << line << "\" while looking for file-line" << endl;
else
{
// 7 = length_of(";#CSRC\t")
- QString fileName = line.mid( 7, fileLineAt-7 );
- QString fileLineString = line.mid( fileLineAt+1, line.length() - fileLineAt - 1 );
+ TQString fileName = line.mid( 7, fileLineAt-7 );
+ TQString fileLineString = line.mid( fileLineAt+1, line.length() - fileLineAt - 1 );
if ( fileName.startsWith("\"") )
{
@@ -111,19 +111,19 @@ bool AsmParser::parse( GpsimDebugger * debugger )
// Assembly file produced by either sdcc or microbe, line is in format:
// \t[".line"/"#MSRC"]\t[file-line]; [file-name]\t[c/microbe source code for that line]
// We're screwed if the file name contains tabs, but hopefully not many do...
- QStringList lineParts = QStringList::split( '\t', line );
+ TQStringList lineParts = TQStringList::split( '\t', line );
if ( lineParts.size() < 2 )
kdWarning() << k_funcinfo << "Line is in wrong format for extracing source line and file: \""<<line<<"\""<<endl;
else
{
- const QString lineAndFile = lineParts[1];
- int lineFileSplit = lineAndFile.find("; ");
+ const TQString lineAndFile = lineParts[1];
+ int lineFileSplit = lineAndFile.tqfind("; ");
if ( lineFileSplit == -1 )
kdDebug() << k_funcinfo << "Could not find file / line split in \""<<lineAndFile<<"\""<<endl;
else
{
- QString fileName = lineAndFile.mid( lineFileSplit + 2 );
- QString fileLineString = lineAndFile.left( lineFileSplit );
+ TQString fileName = lineAndFile.mid( lineFileSplit + 2 );
+ TQString fileLineString = lineAndFile.left( lineFileSplit );
if ( fileName.startsWith("\"") )
{
diff --git a/src/languages/asmparser.h b/src/languages/asmparser.h
index ab21837..e0c1e2c 100644
--- a/src/languages/asmparser.h
+++ b/src/languages/asmparser.h
@@ -11,7 +11,7 @@
#ifndef ASMPARSER_H
#define ASMPARSER_H
-#include <qstring.h>
+#include <tqstring.h>
class GpsimDebugger;
@@ -24,7 +24,7 @@ PIC ID
class AsmParser
{
public:
- AsmParser( const QString &url );
+ AsmParser( const TQString &url );
~AsmParser();
enum Type { Relocatable, Absolute };
@@ -39,7 +39,7 @@ class AsmParser
/**
* Returns the PIC ID
*/
- QString picID() const { return m_picID; }
+ TQString picID() const { return m_picID; }
/**
* Returns whether or not the assembly file contained the "set radix"
* directive
@@ -52,8 +52,8 @@ class AsmParser
Type type() const { return m_type; }
protected:
- const QString m_url;
- QString m_picID;
+ const TQString m_url;
+ TQString m_picID;
bool m_bContainsRadix;
Type m_type;
};
diff --git a/src/languages/externallanguage.cpp b/src/languages/externallanguage.cpp
index 7297e63..233c639 100644
--- a/src/languages/externallanguage.cpp
+++ b/src/languages/externallanguage.cpp
@@ -14,11 +14,11 @@
#include <kdebug.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
-ExternalLanguage::ExternalLanguage( ProcessChain *processChain, KTechlab *parent, const QString &name )
- : Language( processChain, parent, name )
+ExternalLanguage::ExternalLanguage( ProcessChain *processChain, KTechlab *tqparent, const TQString &name )
+ : Language( processChain, tqparent, name )
{
m_languageProcess = 0l;
}
@@ -37,7 +37,7 @@ void ExternalLanguage::deleteLanguageProcess()
// I'm not too sure if this combination of killing the process is the best way....
// m_languageProcess->tryTerminate();
-// QTimer::singleShot( 5000, m_languageProcess, SLOT( kill() ) );
+// TQTimer::singleShot( 5000, m_languageProcess, TQT_SLOT( kill() ) );
// delete m_languageProcess;
m_languageProcess->kill();
m_languageProcess->deleteLater();
@@ -48,10 +48,10 @@ void ExternalLanguage::deleteLanguageProcess()
void ExternalLanguage::receivedStdout( KProcess *, char * buffer, int buflen )
{
- QStringList lines = QStringList::split( '\n', QString::fromLocal8Bit( buffer, buflen ), false );
- QStringList::iterator end = lines.end();
+ TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
+ TQStringList::iterator end = lines.end();
- for ( QStringList::iterator it = lines.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = lines.begin(); it != end; ++it )
{
if ( isError( *it ) )
{
@@ -74,10 +74,10 @@ void ExternalLanguage::receivedStdout( KProcess *, char * buffer, int buflen )
void ExternalLanguage::receivedStderr( KProcess *, char * buffer, int buflen )
{
- QStringList lines = QStringList::split( '\n', QString::fromLocal8Bit( buffer, buflen ), false );
- QStringList::iterator end = lines.end();
+ TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
+ TQStringList::iterator end = lines.end();
- for ( QStringList::iterator it = lines.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = lines.begin(); it != end; ++it )
{
if ( isStderrOutputFatal( *it ) )
{
@@ -126,32 +126,32 @@ void ExternalLanguage::resetLanguageProcess()
m_languageProcess = new KProcess(this);
- connect( m_languageProcess, SIGNAL(receivedStdout( KProcess*, char*, int )),
- this, SLOT(receivedStdout( KProcess*, char*, int )) );
+ connect( m_languageProcess, TQT_SIGNAL(receivedStdout( KProcess*, char*, int )),
+ this, TQT_SLOT(receivedStdout( KProcess*, char*, int )) );
- connect( m_languageProcess, SIGNAL(receivedStderr( KProcess*, char*, int )),
- this, SLOT(receivedStderr( KProcess*, char*, int )) );
+ connect( m_languageProcess, TQT_SIGNAL(receivedStderr( KProcess*, char*, int )),
+ this, TQT_SLOT(receivedStderr( KProcess*, char*, int )) );
- connect( m_languageProcess, SIGNAL(processExited( KProcess* )),
- this, SLOT(processExited( KProcess* )) );
+ connect( m_languageProcess, TQT_SIGNAL(processExited( KProcess* )),
+ this, TQT_SLOT(processExited( KProcess* )) );
}
void ExternalLanguage::displayProcessCommand()
{
- QStringList quotedArguments;
- QValueList<QCString> arguments = m_languageProcess->args();
+ TQStringList quotedArguments;
+ TQValueList<TQCString> arguments = m_languageProcess->args();
if ( arguments.size() == 1 )
quotedArguments << arguments[0];
else
{
- QValueList<QCString>::const_iterator end = arguments.end();
+ TQValueList<TQCString>::const_iterator end = arguments.end();
- for ( QValueList<QCString>::const_iterator it = arguments.begin(); it != end; ++it )
+ for ( TQValueList<TQCString>::const_iterator it = arguments.begin(); it != end; ++it )
{
- if ( (*it).isEmpty() || (*it).contains( QRegExp("[\\s]") ) )
+ if ( (*it).isEmpty() || (*it).tqcontains( TQRegExp("[\\s]") ) )
quotedArguments << KProcess::quote( *it );
else
quotedArguments << *it;
diff --git a/src/languages/externallanguage.h b/src/languages/externallanguage.h
index 401c2b8..51a34f6 100644
--- a/src/languages/externallanguage.h
+++ b/src/languages/externallanguage.h
@@ -25,8 +25,9 @@ class provides functionality for dealing with external processes.
class ExternalLanguage : public Language
{
Q_OBJECT
+ TQ_OBJECT
public:
- ExternalLanguage( ProcessChain *processChain, KTechlab *parent, const QString &name );
+ ExternalLanguage( ProcessChain *processChain, KTechlab *tqparent, const TQString &name );
~ExternalLanguage();
protected slots:
@@ -44,27 +45,27 @@ protected:
/**
* @returns whether the string outputted to stdout is an error or not
*/
- virtual bool isError( const QString &message ) const = 0;
+ virtual bool isError( const TQString &message ) const = 0;
/**
* @returns whether the string outputted to stderr is fatal (stopped compilation)
*/
- virtual bool isStderrOutputFatal( const QString & message ) const { Q_UNUSED(message); return true; }
+ virtual bool isStderrOutputFatal( const TQString & message ) const { Q_UNUSED(message); return true; }
/**
* @returns whether the string outputted to stdout is a warning or not
*/
- virtual bool isWarning( const QString &message ) const = 0;
+ virtual bool isWarning( const TQString &message ) const = 0;
/**
* Called when the process outputs a (non warning/error) message
*/
- virtual void outputtedMessage( const QString &/*message*/ ) {};
+ virtual void outputtedMessage( const TQString &/*message*/ ) {};
/**
* Called when the process outputs a warning
*/
- virtual void outputtedWarning( const QString &/*message*/ ) {};
+ virtual void outputtedWarning( const TQString &/*message*/ ) {};
/**
* Called when the process outputs an error
*/
- virtual void outputtedError( const QString &/*message*/ ) {};
+ virtual void outputtedError( const TQString &/*message*/ ) {};
/**
* Called when the process exits (called before any signals are emitted,
* etc). If you reinherit this function, you should return whether
diff --git a/src/languages/flowcode.cpp b/src/languages/flowcode.cpp
index d19d17e..9fad28d 100644
--- a/src/languages/flowcode.cpp
+++ b/src/languages/flowcode.cpp
@@ -20,10 +20,10 @@
#include <klocale.h>
// #include <kmessagebox.h>
-#include <qfile.h>
+#include <tqfile.h>
-FlowCode::FlowCode( ProcessChain *processChain, KTechlab *parent )
- : Language( processChain, parent, i18n("FlowCode") )
+FlowCode::FlowCode( ProcessChain *processChain, KTechlab *tqparent )
+ : Language( processChain, tqparent, i18n("FlowCode") )
{
m_successfulMessage = i18n("*** Microbe generation successful ***");
m_failedMessage = i18n("*** Microbe generation failed ***");
@@ -41,11 +41,11 @@ void FlowCode::processInput( ProcessOptions options )
if ( !options.p_flowCodeDocument )
{
- options.p_flowCodeDocument = new FlowCodeDocument( QString::null, 0l );
+ options.p_flowCodeDocument = new FlowCodeDocument( TQString(), 0l );
options.p_flowCodeDocument->openURL( options.inputFiles().first() );
- connect( this, SIGNAL(processSucceeded( Language *)), options.p_flowCodeDocument, SLOT(deleteLater()) );
- connect( this, SIGNAL(processFailed( Language *)), options.p_flowCodeDocument, SLOT(deleteLater()) );
+ connect( this, TQT_SIGNAL(processSucceeded( Language *)), options.p_flowCodeDocument, TQT_SLOT(deleteLater()) );
+ connect( this, TQT_SIGNAL(processFailed( Language *)), options.p_flowCodeDocument, TQT_SLOT(deleteLater()) );
}
if ( !options.p_flowCodeDocument->microSettings() )
@@ -54,7 +54,7 @@ void FlowCode::processInput( ProcessOptions options )
return;
}
- QFile file(options.intermediaryOutput());
+ TQFile file(options.intermediaryOutput());
if ( file.open(IO_WriteOnly | IO_ReadOnly) == false )
{
finish(false);
@@ -68,14 +68,14 @@ void FlowCode::processInput( ProcessOptions options )
return;
}
- const QString code = generateMicrobe( options.p_flowCodeDocument->itemList(), options.p_flowCodeDocument->microSettings() );
+ const TQString code = generateMicrobe( options.p_flowCodeDocument->itemList(), options.p_flowCodeDocument->microSettings() );
if (code.isEmpty())
{
finish(false);
return;
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << code;
file.close();
finish(true);
@@ -88,7 +88,7 @@ void FlowCode::setStartPart( FlowPart *startPart )
}
-void FlowCode::addCode( const QString& code )
+void FlowCode::addCode( const TQString& code )
{
m_code += code;
if ( !m_code.endsWith("\n") ) m_code += '\n';
@@ -96,7 +96,7 @@ void FlowCode::addCode( const QString& code )
bool FlowCode::isValidBranch( FlowPart *flowPart )
{
- return flowPart && (flowPart->level() >= m_curLevel) && !m_stopParts.contains(flowPart);
+ return flowPart && (flowPart->level() >= m_curLevel) && !m_stopParts.tqcontains(flowPart);
}
void FlowCode::addCodeBranch( FlowPart * flowPart )
@@ -107,9 +107,9 @@ void FlowCode::addCodeBranch( FlowPart * flowPart )
if ( !isValidBranch(flowPart) )
return;
- if ( m_addedParts.contains(flowPart) )
+ if ( m_addedParts.tqcontains(flowPart) )
{
- const QString labelName = genLabel(flowPart->id());
+ const TQString labelName = genLabel(flowPart->id());
addCode( "goto "+labelName );
m_gotos.append(labelName);
return;
@@ -120,7 +120,7 @@ void FlowCode::addCodeBranch( FlowPart * flowPart )
int prevLevel = m_curLevel;
m_curLevel = flowPart->level();
- const QString labelName = genLabel(flowPart->id());
+ const TQString labelName = genLabel(flowPart->id());
addCode(labelName+':');
m_labels.append(labelName);
@@ -129,7 +129,7 @@ void FlowCode::addCodeBranch( FlowPart * flowPart )
}
}
-QString FlowCode::genLabel( const QString &id )
+TQString FlowCode::genLabel( const TQString &id )
{
return "__label_"+id;
}
@@ -145,11 +145,11 @@ void FlowCode::removeStopPart( FlowPart *part )
// We only want to remove one instance of the FlowPart, in case it has been
// used as a StopPart for more than one FlowPart
- FlowPartList::iterator it = m_stopParts.find(part);
+ FlowPartList::iterator it = m_stopParts.tqfind(part);
if ( it != m_stopParts.end() ) m_stopParts.remove(it);
}
-QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *settings )
+TQString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *settings )
{
bool foundStart = false;
const ItemList::const_iterator end = itemList.end();
@@ -173,7 +173,7 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
continue;
if ( !startPart->outputPart( nodeMapIt.key() ) )
- outputWarning( i18n("Warning: Floating connection for %1").arg( startPart->id() ) );
+ outputWarning( i18n("Warning: Floating connection for %1").tqarg( startPart->id() ) );
}
FlowContainer * fc = dynamic_cast<FlowContainer*>((Item*)*it);
@@ -199,25 +199,25 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
m_stopParts.clear();
m_gotos.clear();
m_labels.clear();
- m_code = QString::null;
+ m_code = TQString();
// PIC type
{
- const QString codeString = settings->microInfo()->id() + "\n";
+ const TQString codeString = settings->microInfo()->id() + "\n";
addCode(codeString);
}
// Initial variables
{
- QStringList vars = settings->variableNames();
+ TQStringList vars = settings->variableNames();
// If "inited" is true at the end, we comment at the insertion point
bool inited = false;
- const QString codeString = "// Initial variable values:\n";
+ const TQString codeString = "// Initial variable values:\n";
addCode(codeString);
- const QStringList::iterator end = vars.end();
- for ( QStringList::iterator it = vars.begin(); it != end; ++it )
+ const TQStringList::iterator end = vars.end();
+ for ( TQStringList::iterator it = vars.begin(); it != end; ++it )
{
VariableInfo *info = settings->variableInfo(*it);
if ( info /*&& info->initAtStart*/ )
@@ -239,7 +239,7 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
PinMappingMap::const_iterator end = pinMappings.end();
for ( PinMappingMap::const_iterator it = pinMappings.begin(); it != end; ++it )
{
- QString type;
+ TQString type;
switch ( it.data().type() )
{
@@ -259,17 +259,17 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
if ( type.isEmpty() )
continue;
- addCode( QString("%1 %2 %3").arg( type ).arg( it.key() ).arg( it.data().pins().join(" ") ) );
+ addCode( TQString("%1 %2 %3").tqarg( type ).tqarg( it.key() ).tqarg( it.data().pins().join(" ") ) );
}
}
// Initial port settings
{
- QStringList portNames = settings->microInfo()->package()->portNames();
- const QStringList::iterator end = portNames.end();
+ TQStringList portNames = settings->microInfo()->package()->portNames();
+ const TQStringList::iterator end = portNames.end();
// TRIS registers (remember that this is set to ..11111 on all resets)
- for ( QStringList::iterator it = portNames.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = portNames.begin(); it != end; ++it )
{
const int portType = settings->portType(*it);
const int pinCount = settings->microInfo()->package()->pinCount( 0, *it );
@@ -277,17 +277,17 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
// We don't need to reset it if portType == 2^(pinCount-1)
if ( portType != (1<<pinCount)-1 )
{
- QString name = *it;
- name.replace("PORT","TRIS");
- addCode( name+" = "+QString::number(portType) );
+ TQString name = *it;
+ name.tqreplace("PORT","TRIS");
+ addCode( name+" = "+TQString::number(portType) );
}
}
// PORT registers
- for ( QStringList::iterator it = portNames.begin(); it != end; ++it )
+ for ( TQStringList::iterator it = portNames.begin(); it != end; ++it )
{
const int portState = settings->portState(*it);
- addCode( (*it)+" = "+QString::number(portState) );
+ addCode( (*it)+" = "+TQString::number(portState) );
}
}
@@ -316,17 +316,17 @@ QString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *sett
void FlowCode::tidyCode()
{
// First, get rid of the unused labels
- const QStringList::iterator end = m_labels.end();
- for ( QStringList::iterator it = m_labels.begin(); it != end; ++it )
+ const TQStringList::iterator end = m_labels.end();
+ for ( TQStringList::iterator it = m_labels.begin(); it != end; ++it )
{
- if ( !m_gotos.contains(*it) ) m_code.remove(*it+':');
+ if ( !m_gotos.tqcontains(*it) ) m_code.remove(*it+':');
}
// And now on to handling indentation :-)
if ( !m_code.endsWith("\n") ) m_code.append("\n");
- QString newCode;
+ TQString newCode;
bool multiLineComment = false; // For "/*"..."*/"
bool comment = false; // For "//"
bool asmEmbed = false;
@@ -444,7 +444,7 @@ void FlowCode::tidyCode()
void FlowCode::addSubroutine( FlowPart *part )
{
- if ( !part || m_subroutines.contains(part) || part->parentItem() || !dynamic_cast<FlowContainer*>(part) ) return;
+ if ( !part || m_subroutines.tqcontains(part) || part->tqparentItem() || !dynamic_cast<FlowContainer*>(part) ) return;
m_subroutines.append(part);
}
diff --git a/src/languages/flowcode.h b/src/languages/flowcode.h
index afa17db..77fa5c1 100644
--- a/src/languages/flowcode.h
+++ b/src/languages/flowcode.h
@@ -13,19 +13,19 @@
#include "language.h"
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class CNItem;
class FlowPart;
class Item;
class MicroSettings;
-typedef QValueList<FlowPart*> FlowPartList;
-typedef QValueList<QGuardedPtr<Item> > ItemList;
+typedef TQValueList<FlowPart*> FlowPartList;
+typedef TQValueList<TQGuardedPtr<Item> > ItemList;
/**
"FlowCode" can possibly be considered a misnomer, as the output is actually Microbe.
@@ -39,7 +39,7 @@ basic from the code that they create. The 3 simple steps for usage of this funct
class FlowCode : public Language
{
public:
- FlowCode( ProcessChain *processChain, KTechlab *parent );
+ FlowCode( ProcessChain *processChain, KTechlab *tqparent );
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
@@ -56,7 +56,7 @@ public:
/**
* Adds code at the current insertion point
*/
- void addCode( const QString& code );
+ void addCode( const TQString& code );
/**
* Adds a code branch to the current insertion point. This will stop when the level gets
* below the original starting level (so for insertion of the contents of a for loop,
@@ -77,7 +77,7 @@ public:
* Generates and returns the microbe code
* @param nonVerbal if true then will not inform the user when something goes wrong
*/
- QString generateMicrobe( const ItemList &itemList, MicroSettings *settings );
+ TQString generateMicrobe( const ItemList &itemList, MicroSettings *settings );
/**
* Returns true if the FlowPart is a valid one for adding a branch
*/
@@ -86,7 +86,7 @@ public:
* Generates a nice label name from the string, e.g. genLabel("callsub")
* returns "__label_callsub".
*/
- static QString genLabel( const QString &id );
+ static TQString genLabel( const TQString &id );
protected:
/**
@@ -94,13 +94,13 @@ protected:
*/
void tidyCode();
- QStringList m_gotos; // Gotos used
- QStringList m_labels; // Labels used
+ TQStringList m_gotos; // Gotos used
+ TQStringList m_labels; // Labels used
FlowPartList m_subroutines;
FlowPartList m_addedParts;
FlowPartList m_stopParts;
FlowPart *p_startPart;
- QString m_code;
+ TQString m_code;
int m_curLevel;
};
diff --git a/src/languages/gpasm.cpp b/src/languages/gpasm.cpp
index 447354e..33cb892 100644
--- a/src/languages/gpasm.cpp
+++ b/src/languages/gpasm.cpp
@@ -18,10 +18,10 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-Gpasm::Gpasm( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "Gpasm" )
+Gpasm::Gpasm( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "Gpasm" )
{
m_successfulMessage = i18n("*** Assembly successful ***");
m_failedMessage = i18n("*** Assembly failed ***");
@@ -124,15 +124,15 @@ void Gpasm::processInput( ProcessOptions options )
}
-bool Gpasm::isError( const QString &message ) const
+bool Gpasm::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool Gpasm::isWarning( const QString &message ) const
+bool Gpasm::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
diff --git a/src/languages/gpasm.h b/src/languages/gpasm.h
index c92a969..f071b8d 100644
--- a/src/languages/gpasm.h
+++ b/src/languages/gpasm.h
@@ -20,15 +20,15 @@
class Gpasm : public ExternalLanguage
{
public:
- Gpasm( ProcessChain *processChain, KTechlab *parent );
+ Gpasm( ProcessChain *processChain, KTechlab *tqparent );
~Gpasm();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
diff --git a/src/languages/gpdasm.cpp b/src/languages/gpdasm.cpp
index 8c255d3..ea98221 100644
--- a/src/languages/gpdasm.cpp
+++ b/src/languages/gpdasm.cpp
@@ -16,11 +16,11 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
-Gpdasm::Gpdasm( ProcessChain *processChain, KTechlab *parent )
- : ExternalLanguage( processChain, parent, "Gpdasm" )
+Gpdasm::Gpdasm( ProcessChain *processChain, KTechlab *tqparent )
+ : ExternalLanguage( processChain, tqparent, "Gpdasm" )
{
m_successfulMessage = i18n("*** Disassembly successful ***");
m_failedMessage = i18n("*** Disassembly failed ***");
@@ -53,7 +53,7 @@ void Gpdasm::processInput( ProcessOptions options )
}
-void Gpdasm::outputtedMessage( const QString &message )
+void Gpdasm::outputtedMessage( const TQString &message )
{
m_asmOutput += message + "\n";
}
@@ -64,49 +64,49 @@ bool Gpdasm::processExited( bool successfully )
if (!successfully)
return false;
- QFile file(m_processOptions.intermediaryOutput());
+ TQFile file(m_processOptions.intermediaryOutput());
if ( file.open(IO_WriteOnly) == false )
return false;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << m_asmOutput;
file.close();
return true;
}
-bool Gpdasm::isError( const QString &message ) const
+bool Gpdasm::isError( const TQString &message ) const
{
- return (message.find( "error", -1, false ) != -1);
+ return (message.tqfind( "error", -1, false ) != -1);
}
-bool Gpdasm::isWarning( const QString &message ) const
+bool Gpdasm::isWarning( const TQString &message ) const
{
- return (message.find( "warning", -1, false ) != -1);
+ return (message.tqfind( "warning", -1, false ) != -1);
}
-MessageInfo Gpdasm::extractMessageInfo( const QString &text )
+MessageInfo Gpdasm::extractMessageInfo( const TQString &text )
{
if ( text.length()<5 || !text.startsWith("/") )
return MessageInfo();
- const int index = text.find( ".asm", 0, false )+4;
+ const int index = text.tqfind( ".asm", 0, false )+4;
if ( index == -1+4 )
return MessageInfo();
- const QString fileName = text.left(index);
+ const TQString fileName = text.left(index);
// Extra line number
- const QString message = text.right(text.length()-index);
- const int linePos = message.find( QRegExp(":[\\d]+") );
+ const TQString message = text.right(text.length()-index);
+ const int linePos = message.tqfind( TQRegExp(":[\\d]+") );
int line = -1;
if ( linePos != -1 )
{
- const int linePosEnd = message.find( ':', linePos+1 );
+ const int linePosEnd = message.tqfind( ':', linePos+1 );
if ( linePosEnd != -1 )
{
- const QString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
+ const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
bool ok;
line = number.toInt(&ok)-1;
if (!ok) line = -1;
diff --git a/src/languages/gpdasm.h b/src/languages/gpdasm.h
index 149ed26..8fd977c 100644
--- a/src/languages/gpdasm.h
+++ b/src/languages/gpdasm.h
@@ -20,20 +20,20 @@ Interface to the GNU Pic Disassembler
class Gpdasm : public ExternalLanguage
{
public:
- Gpdasm( ProcessChain *processChain, KTechlab *parent );
+ Gpdasm( ProcessChain *processChain, KTechlab *tqparent );
~Gpdasm();
virtual void processInput( ProcessOptions options );
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual void outputtedMessage( const QString &message );
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual void outputtedMessage( const TQString &message );
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
virtual bool processExited( bool successfully );
- QString m_asmOutput; // Outputed by gpdasm
+ TQString m_asmOutput; // Outputed by gpdasm
};
#endif
diff --git a/src/languages/gplib.cpp b/src/languages/gplib.cpp
index db4a32b..46e6a76 100644
--- a/src/languages/gplib.cpp
+++ b/src/languages/gplib.cpp
@@ -16,8 +16,8 @@
#include <kmessagebox.h>
#include <kprocess.h>
-Gplib::Gplib( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "Gpasm" )
+Gplib::Gplib( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "Gpasm" )
{
m_successfulMessage = i18n("*** Archiving successful ***");
m_failedMessage = i18n("*** Archiving failed ***");
@@ -39,9 +39,9 @@ void Gplib::processInput( ProcessOptions options )
*m_languageProcess << ( options.intermediaryOutput() );
- const QStringList inputFiles = options.inputFiles();
- QStringList::const_iterator end = inputFiles.end();
- for ( QStringList::const_iterator it = inputFiles.begin(); it != end; ++it )
+ const TQStringList inputFiles = options.inputFiles();
+ TQStringList::const_iterator end = inputFiles.end();
+ for ( TQStringList::const_iterator it = inputFiles.begin(); it != end; ++it )
*m_languageProcess << ( *it );
if ( !start() )
@@ -53,39 +53,39 @@ void Gplib::processInput( ProcessOptions options )
}
-bool Gplib::isError( const QString &message ) const
+bool Gplib::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool Gplib::isWarning( const QString &message ) const
+bool Gplib::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
-MessageInfo Gplib::extractMessageInfo( const QString &text )
+MessageInfo Gplib::extractMessageInfo( const TQString &text )
{
#if 0
if ( text.length()<5 || !text.startsWith("/") )
return MessageInfo();
- const int index = text.find( ".asm", 0, false )+4;
+ const int index = text.tqfind( ".asm", 0, false )+4;
if ( index == -1+4 )
return MessageInfo();
- const QString fileName = text.left(index);
+ const TQString fileName = text.left(index);
// Extra line number
- const QString message = text.right(text.length()-index);
- const int linePos = message.find( QRegExp(":[\\d]+") );
+ const TQString message = text.right(text.length()-index);
+ const int linePos = message.tqfind( TQRegExp(":[\\d]+") );
int line = -1;
if ( linePos != -1 )
{
- const int linePosEnd = message.find( ':', linePos+1 );
+ const int linePosEnd = message.tqfind( ':', linePos+1 );
if ( linePosEnd != -1 )
{
- const QString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
+ const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
bool ok;
line = number.toInt(&ok)-1;
if (!ok) line = -1;
diff --git a/src/languages/gplib.h b/src/languages/gplib.h
index 35cb1da..1d3df03 100644
--- a/src/languages/gplib.h
+++ b/src/languages/gplib.h
@@ -19,16 +19,16 @@
class Gplib : public ExternalLanguage
{
public:
- Gplib( ProcessChain *processChain, KTechlab *parent );
+ Gplib( ProcessChain *processChain, KTechlab *tqparent );
~Gplib();
virtual void processInput( ProcessOptions options );
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
diff --git a/src/languages/gplink.cpp b/src/languages/gplink.cpp
index 548449a..9b1859c 100644
--- a/src/languages/gplink.cpp
+++ b/src/languages/gplink.cpp
@@ -16,8 +16,8 @@
#include <kmessagebox.h>
#include <kprocess.h>
-Gplink::Gplink( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "Gpasm" )
+Gplink::Gplink( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "Gpasm" )
{
m_successfulMessage = i18n("*** Linking successful ***");
m_failedMessage = i18n("*** Linking failed ***");
@@ -65,14 +65,14 @@ void Gplink::processInput( ProcessOptions options )
*m_languageProcess << ( options.intermediaryOutput() );
// Input object file
- const QStringList inputFiles = options.inputFiles();
- QStringList::const_iterator end = inputFiles.end();
- for ( QStringList::const_iterator it = inputFiles.begin(); it != end; ++it )
+ const TQStringList inputFiles = options.inputFiles();
+ TQStringList::const_iterator end = inputFiles.end();
+ for ( TQStringList::const_iterator it = inputFiles.begin(); it != end; ++it )
*m_languageProcess << ( *it );
// Other libraries
end = options.m_linkLibraries.end();
- for ( QStringList::const_iterator it = options.m_linkLibraries.begin(); it != end; ++it )
+ for ( TQStringList::const_iterator it = options.m_linkLibraries.begin(); it != end; ++it )
*m_languageProcess << ( *it );
if ( !start() )
@@ -84,39 +84,39 @@ void Gplink::processInput( ProcessOptions options )
}
-bool Gplink::isError( const QString &message ) const
+bool Gplink::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool Gplink::isWarning( const QString &message ) const
+bool Gplink::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
-MessageInfo Gplink::extractMessageInfo( const QString &text )
+MessageInfo Gplink::extractMessageInfo( const TQString &text )
{
#if 0
if ( text.length()<5 || !text.startsWith("/") )
return MessageInfo();
- const int index = text.find( ".asm", 0, false )+4;
+ const int index = text.tqfind( ".asm", 0, false )+4;
if ( index == -1+4 )
return MessageInfo();
- const QString fileName = text.left(index);
+ const TQString fileName = text.left(index);
// Extra line number
- const QString message = text.right(text.length()-index);
- const int linePos = message.find( QRegExp(":[\\d]+") );
+ const TQString message = text.right(text.length()-index);
+ const int linePos = message.tqfind( TQRegExp(":[\\d]+") );
int line = -1;
if ( linePos != -1 )
{
- const int linePosEnd = message.find( ':', linePos+1 );
+ const int linePosEnd = message.tqfind( ':', linePos+1 );
if ( linePosEnd != -1 )
{
- const QString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
+ const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
bool ok;
line = number.toInt(&ok)-1;
if (!ok) line = -1;
diff --git a/src/languages/gplink.h b/src/languages/gplink.h
index c60f9f9..47cb1c9 100644
--- a/src/languages/gplink.h
+++ b/src/languages/gplink.h
@@ -20,16 +20,16 @@
class Gplink : public ExternalLanguage
{
public:
- Gplink( ProcessChain *processChain, KTechlab *parent );
+ Gplink( ProcessChain *processChain, KTechlab *tqparent );
~Gplink();
virtual void processInput( ProcessOptions options );
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
diff --git a/src/languages/language.cpp b/src/languages/language.cpp
index e7ce759..f98d580 100644
--- a/src/languages/language.cpp
+++ b/src/languages/language.cpp
@@ -22,14 +22,14 @@
#include <kio/netaccess.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
//BEGIN class Language
-Language::Language( ProcessChain *processChain, KTechlab *parent, const QString &name )
- : QObject(parent,name)
+Language::Language( ProcessChain *processChain, KTechlab *tqparent, const TQString &name )
+ : TQObject(tqparent,name)
{
- p_ktechlab = parent;
+ p_ktechlab = tqparent;
p_processChain = processChain;
}
@@ -39,19 +39,19 @@ Language::~Language()
}
-void Language::outputMessage( const QString &message )
+void Language::outputMessage( const TQString &message )
{
LanguageManager::self()->slotMessage( message, extractMessageInfo(message) );
}
-void Language::outputWarning( const QString &message )
+void Language::outputWarning( const TQString &message )
{
LanguageManager::self()->slotWarning( message, extractMessageInfo(message) );
}
-void Language::outputError( const QString &message )
+void Language::outputError( const TQString &message )
{
LanguageManager::self()->slotError( message, extractMessageInfo(message) );
m_errorCount++;
@@ -96,26 +96,26 @@ void Language::reset()
}
-MessageInfo Language::extractMessageInfo( const QString &text )
+MessageInfo Language::extractMessageInfo( const TQString &text )
{
if ( !text.startsWith("/") )
return MessageInfo();
- const int index = text.find( ":", 0, false );
+ const int index = text.tqfind( ":", 0, false );
if ( index == -1 )
return MessageInfo();
- const QString fileName = text.left(index);
+ const TQString fileName = text.left(index);
// Extra line number
- const QString message = text.right(text.length()-index);
- const int linePos = message.find( QRegExp(":[\\d]+") );
+ const TQString message = text.right(text.length()-index);
+ const int linePos = message.tqfind( TQRegExp(":[\\d]+") );
int line = -1;
if ( linePos != -1 )
{
- const int linePosEnd = message.find( ':', linePos+1 );
+ const int linePosEnd = message.tqfind( ':', linePos+1 );
if ( linePosEnd != -1 )
{
- const QString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
+ const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace();
bool ok;
line = number.toInt(&ok)-1;
if (!ok) line = -1;
@@ -177,7 +177,7 @@ ProcessOptions::ProcessOptions( OutputMethodInfo info )
m_picID = info.picID();
b_targetFileSet = false;
- QString target;
+ TQString target;
if ( !KIO::NetAccess::download( info.outputFile(), target, 0l ) )
{
// If the file could not be downloaded, for example does not
@@ -205,10 +205,10 @@ ProcessOptions::ProcessOptions( OutputMethodInfo info )
}
-void ProcessOptions::setTextOutputTarget( TextDocument * target, QObject * receiver, const char * slot )
+void ProcessOptions::setTextOutputTarget( TextDocument * target, TQObject * receiver, const char * slot )
{
m_pTextOutputTarget = target;
- QObject::connect( m_pHelper, SIGNAL(textOutputtedTo( TextDocument* )), receiver, slot );
+ TQObject::connect( m_pHelper, TQT_SIGNAL(textOutputtedTo( TextDocument* )), receiver, slot );
}
@@ -219,7 +219,7 @@ void ProcessOptions::setTextOutputtedTo( TextDocument * outputtedTo )
}
-void ProcessOptions::setTargetFile( const QString &file )
+void ProcessOptions::setTargetFile( const TQString &file )
{
if (b_targetFileSet)
{
@@ -232,9 +232,9 @@ void ProcessOptions::setTargetFile( const QString &file )
}
-ProcessOptions::ProcessPath::MediaType ProcessOptions::guessMediaType( const QString & url )
+ProcessOptions::ProcessPath::MediaType ProcessOptions::guessMediaType( const TQString & url )
{
- QString extension = url.right( url.length() - url.findRev('.') - 1 );
+ TQString extension = url.right( url.length() - url.tqfindRev('.') - 1 );
extension = extension.lower();
if ( extension == "asm" )
diff --git a/src/languages/language.h b/src/languages/language.h
index 68ef187..54fc408 100644
--- a/src/languages/language.h
+++ b/src/languages/language.h
@@ -11,8 +11,8 @@
#ifndef LANGUAGE_H
#define LANGUAGE_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class FlowCodeDocument;
class KTechlab;
@@ -23,9 +23,9 @@ class OutputMethodInfo;
class ProcessChain;
class ProcessOptions;
class TextDocument;
-class QProcess;
+class TQProcess;
-typedef QValueList<ProcessOptions> ProcessOptionsList;
+typedef TQValueList<ProcessOptions> ProcessOptionsList;
class ProcessOptionsSpecial
{
@@ -34,26 +34,27 @@ class ProcessOptionsSpecial
bool b_addToProject;
bool b_forceList;
- QString m_picID;
+ TQString m_picID;
FlowCodeDocument * p_flowCodeDocument;
// Linking
- QString m_hexFormat;
+ TQString m_hexFormat;
bool m_bOutputMapFile;
- QString m_libraryDir;
- QString m_linkerScript;
- QStringList m_linkLibraries;
- QString m_linkOther;
+ TQString m_libraryDir;
+ TQString m_linkerScript;
+ TQStringList m_linkLibraries;
+ TQString m_linkOther;
// Programming
- QString m_port;
- QString m_program;
+ TQString m_port;
+ TQString m_program;
};
-class ProcessOptionsHelper : public QObject
+class ProcessOptionsHelper : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
#define protected public
signals:
#undef protected
@@ -142,21 +143,21 @@ class ProcessOptions : public ProcessOptionsSpecial
* Tries to guess the media type from the url (and possible the contents
* of the file as well).
*/
- static ProcessPath::MediaType guessMediaType( const QString & url );
+ static ProcessPath::MediaType guessMediaType( const TQString & url );
/**
* The *final* target file (not any intermediatary ones)
*/
- QString targetFile() const { return m_targetFile; }
+ TQString targetFile() const { return m_targetFile; }
/**
* This sets the final target file, as well as the initial intermediatary one
*/
- void setTargetFile( const QString &file );
+ void setTargetFile( const TQString &file );
- void setIntermediaryOutput( const QString &file ) { m_intermediaryFile = file; }
- QString intermediaryOutput() const { return m_intermediaryFile; }
+ void setIntermediaryOutput( const TQString &file ) { m_intermediaryFile = file; }
+ TQString intermediaryOutput() const { return m_intermediaryFile; }
- void setInputFiles( const QStringList & files ) { m_inputFiles = files; }
- QStringList inputFiles() const { return m_inputFiles; }
+ void setInputFiles( const TQStringList & files ) { m_inputFiles = files; }
+ TQStringList inputFiles() const { return m_inputFiles; }
void setMethod( Method::type method ) { m_method = method; }
Method::type method() const { return m_method; }
@@ -174,7 +175,7 @@ class ProcessOptions : public ProcessOptionsSpecial
* is not to be confused with setTextOutputtedTo, which is called once
* the processing has finished, and will call-back to the slot given.
*/
- void setTextOutputTarget( TextDocument * target, QObject * receiver, const char * slot );
+ void setTextOutputTarget( TextDocument * target, TQObject * receiver, const char * slot );
/**
* @see setTextOutputTarget
*/
@@ -188,9 +189,9 @@ class ProcessOptions : public ProcessOptionsSpecial
TextDocument * m_pTextOutputTarget;
ProcessOptionsHelper * m_pHelper;
bool b_targetFileSet;
- QStringList m_inputFiles;
- QString m_targetFile;
- QString m_intermediaryFile;
+ TQStringList m_inputFiles;
+ TQString m_targetFile;
+ TQString m_intermediaryFile;
Method::type m_method;
ProcessPath::Path m_processPath;
};
@@ -200,11 +201,12 @@ class ProcessOptions : public ProcessOptionsSpecial
@author Daniel Clarke
@author David Saxton
*/
-class Language : public QObject
+class Language : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- Language( ProcessChain *processChain, KTechlab *parent, const QString &name );
+ Language( ProcessChain *processChain, KTechlab *tqparent, const TQString &name );
~Language();
/**
@@ -239,15 +241,15 @@ class Language : public QObject
* Examines the string for the line number if applicable, and creates a new
* MessageInfo for it.
*/
- virtual MessageInfo extractMessageInfo( const QString &text );
+ virtual MessageInfo extractMessageInfo( const TQString &text );
/**
* Reset the error count
*/
void reset();
- void outputMessage( const QString &message );
- void outputWarning( const QString &message );
- void outputError( const QString &error );
+ void outputMessage( const TQString &message );
+ void outputWarning( const TQString &message );
+ void outputError( const TQString &error );
void finish( bool successful );
int m_errorCount;
@@ -258,11 +260,11 @@ class Language : public QObject
/**
* A message appropriate to the language's success after compilation or similar.
*/
- QString m_successfulMessage;
+ TQString m_successfulMessage;
/**
* A message appropriate to the language's failure after compilation or similar.
*/
- QString m_failedMessage;
+ TQString m_failedMessage;
};
#endif
diff --git a/src/languages/languagemanager.cpp b/src/languages/languagemanager.cpp
index a6dddd8..0a641a9 100644
--- a/src/languages/languagemanager.cpp
+++ b/src/languages/languagemanager.cpp
@@ -25,7 +25,7 @@
#include <kdockwidget.h>
#include <kiconloader.h>
#include <klocale.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <assert.h>
@@ -33,26 +33,26 @@
LanguageManager * LanguageManager::m_pSelf = 0l;
-LanguageManager * LanguageManager::self( KateMDI::ToolView * parent, KTechlab * ktl )
+LanguageManager * LanguageManager::self( KateMDI::ToolView * tqparent, KTechlab * ktl )
{
if (!m_pSelf)
{
- assert(parent);
+ assert(tqparent);
assert(ktl);
- m_pSelf = new LanguageManager( parent, ktl );
+ m_pSelf = new LanguageManager( tqparent, ktl );
}
return m_pSelf;
}
-LanguageManager::LanguageManager( KateMDI::ToolView * parent, KTechlab * ktl )
- : QObject((QObject*)ktl)
+LanguageManager::LanguageManager( KateMDI::ToolView * tqparent, KTechlab * ktl )
+ : TQObject((TQObject*)ktl)
{
p_ktechlab = ktl;
- m_logView = new LogView( parent, "LanguageManager LogView");
+ m_logView = new LogView( tqparent, "LanguageManager LogView");
- QWhatsThis::add( m_logView, i18n("These messages show the output of language-related functionality such as compiling and assembling.<br><br>For error messages, clicking on the line will automatically open up the file at the position of the error.") );
- connect( m_logView, SIGNAL(paraClicked(const QString&, MessageInfo )), this, SLOT(slotParaClicked(const QString&, MessageInfo )) );
+ TQWhatsThis::add( m_logView, i18n("These messages show the output of language-related functionality such as compiling and assembling.<br><br>For error messages, clicking on the line will automatically open up the file at the position of the error.") );
+ connect( m_logView, TQT_SIGNAL(paraClicked(const TQString&, MessageInfo )), this, TQT_SLOT(slotParaClicked(const TQString&, MessageInfo )) );
reset();
}
@@ -86,20 +86,20 @@ ProcessListChain * LanguageManager::compile( ProcessOptionsList pol )
}
-void LanguageManager::slotError( const QString &error, MessageInfo messageInfo )
+void LanguageManager::slotError( const TQString &error, MessageInfo messageInfo )
{
m_logView->addOutput( error, LogView::ot_error, messageInfo );
}
-void LanguageManager::slotWarning( const QString &error, MessageInfo messageInfo )
+void LanguageManager::slotWarning( const TQString &error, MessageInfo messageInfo )
{
m_logView->addOutput( error, LogView::ot_warning, messageInfo );
}
-void LanguageManager::slotMessage( const QString &error, MessageInfo messageInfo )
+void LanguageManager::slotMessage( const TQString &error, MessageInfo messageInfo )
{
m_logView->addOutput( error, LogView::ot_message, messageInfo );
}
-void LanguageManager::slotParaClicked( const QString& message, MessageInfo messageInfo )
+void LanguageManager::slotParaClicked( const TQString& message, MessageInfo messageInfo )
{
Q_UNUSED(message);
DocManager::self()->gotoTextLine( messageInfo.fileURL(), messageInfo.fileLine() );
diff --git a/src/languages/languagemanager.h b/src/languages/languagemanager.h
index c5bda98..2a64e90 100644
--- a/src/languages/languagemanager.h
+++ b/src/languages/languagemanager.h
@@ -11,8 +11,8 @@
#ifndef LANGUAGEMANAGER_H
#define LANGUAGEMANAGER_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include "language.h"
@@ -33,12 +33,13 @@ namespace KateMDI { class ToolView; }
/**
@author David Saxton
*/
-class LanguageManager : public QObject
+class LanguageManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- static LanguageManager * self( KateMDI::ToolView * parent = 0l, KTechlab * ktl = 0l );
- static QString toolViewIdentifier() { return "LanguageManager"; }
+ static LanguageManager * self( KateMDI::ToolView * tqparent = 0l, KTechlab * ktl = 0l );
+ static TQString toolViewIdentifier() { return "LanguageManager"; }
~LanguageManager();
/**
@@ -62,25 +63,25 @@ class LanguageManager : public QObject
/**
* Called when the user clicks on any text in the LogView
*/
- void slotParaClicked( const QString& message, MessageInfo messageInfo );
+ void slotParaClicked( const TQString& message, MessageInfo messageInfo );
/**
* Called by languages to report an error message
* @param error Error message to report
*/
- void slotError( const QString &error, MessageInfo messageInfo );
+ void slotError( const TQString &error, MessageInfo messageInfo );
/**
* Called by languages to report a warning message
* @param warning Warning message to report
*/
- void slotWarning( const QString &warning, MessageInfo messageInfo );
+ void slotWarning( const TQString &warning, MessageInfo messageInfo );
/**
* Called by languages to report a general message
* @param message General message to report
*/
- void slotMessage( const QString &message, MessageInfo messageInfo );
+ void slotMessage( const TQString &message, MessageInfo messageInfo );
protected:
- LanguageManager( KateMDI::ToolView * parent, KTechlab * ktl );
+ LanguageManager( KateMDI::ToolView * tqparent, KTechlab * ktl );
private:
LogView * m_logView;
diff --git a/src/languages/microbe.cpp b/src/languages/microbe.cpp
index 628b3c1..b7c7f8b 100644
--- a/src/languages/microbe.cpp
+++ b/src/languages/microbe.cpp
@@ -19,30 +19,30 @@
#include <kmessagebox.h>
#include <kstandarddirs.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocess.h>
-Microbe::Microbe( ProcessChain *processChain, KTechlab *parent )
- : ExternalLanguage( processChain, parent, "Microbe" )
+Microbe::Microbe( ProcessChain *processChain, KTechlab *tqparent )
+ : ExternalLanguage( processChain, tqparent, "Microbe" )
{
m_failedMessage = i18n("*** Compilation failed ***");
m_successfulMessage = i18n("*** Compilation successful ***");
// Setup error messages list
- QFile file( locate("appdata",i18n("error_messages_en_gb")) );
+ TQFile file( locate("appdata",i18n("error_messages_en_gb")) );
if ( file.open( IO_ReadOnly ) )
{
- QTextStream stream( &file );
- QString line;
+ TQTextStream stream( &file );
+ TQString line;
while ( !stream.atEnd() )
{
line = stream.readLine(); // line of text excluding '\n'
if ( !line.isEmpty() )
{
bool ok;
- const int pos = line.left( line.find("#") ).toInt(&ok);
+ const int pos = line.left( line.tqfind("#") ).toInt(&ok);
if (ok) {
- m_errorMessages[pos] = line.right(line.length()-line.find("#"));
+ m_errorMessages[pos] = line.right(line.length()-line.tqfind("#"));
} else {
kdError() << k_funcinfo << "Error parsing Microbe error-message file"<<endl;
}
@@ -81,14 +81,14 @@ void Microbe::processInput( ProcessOptions options )
}
-bool Microbe::isError( const QString &message ) const
+bool Microbe::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool Microbe::isWarning( const QString &message ) const
+bool Microbe::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
diff --git a/src/languages/microbe.h b/src/languages/microbe.h
index 568db4b..91b4544 100644
--- a/src/languages/microbe.h
+++ b/src/languages/microbe.h
@@ -13,9 +13,9 @@
#include "externallanguage.h"
-#include <qmap.h>
+#include <tqmap.h>
-typedef QMap< int, QString > ErrorMap;
+typedef TQMap< int, TQString > ErrorMap;
/**
@author Daniel Clarke
@@ -24,15 +24,15 @@ typedef QMap< int, QString > ErrorMap;
class Microbe : public ExternalLanguage
{
public:
- Microbe( ProcessChain *processChain, KTechlab *parent );
+ Microbe( ProcessChain *processChain, KTechlab *tqparent );
~Microbe();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
ErrorMap m_errorMessages;
};
diff --git a/src/languages/picprogrammer.cpp b/src/languages/picprogrammer.cpp
index 6f5e76f..882622e 100644
--- a/src/languages/picprogrammer.cpp
+++ b/src/languages/picprogrammer.cpp
@@ -18,12 +18,12 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qapplication.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqfile.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
#include <stdio.h>
@@ -35,12 +35,12 @@ ProgrammerConfig::ProgrammerConfig()
void ProgrammerConfig::reset()
{
- initCommand = QString::null;
- readCommand = QString::null;
- writeCommand = QString::null;
- verifyCommand = QString::null;
- blankCheckCommand = QString::null;
- eraseCommand = QString::null;
+ initCommand = TQString();
+ readCommand = TQString();
+ writeCommand = TQString();
+ verifyCommand = TQString();
+ blankCheckCommand = TQString();
+ eraseCommand = TQString();
}
//END class ProgrammerConfig
@@ -63,7 +63,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_bDoneStaticConfigsInit = true;
ProgrammerConfig config;
- config.description = i18n("Supported programmers: %1").arg("JuPic, PICStart Plus, Warp-13");
+ config.description = i18n("Supported programmers: %1").tqarg("JuPic, PICStart Plus, Warp-13");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "picp %port %device -rp %file";
@@ -75,7 +75,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PICP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Epic Plus");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "odyssey init";
config.readCommand = "odyssey %device read %file";
@@ -87,7 +87,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "Odyssey" ] = config;
- config.description = i18n("Supported programmers: %1").arg("JDM PIC-Programmer 2, PIC-PG2C");
+ config.description = i18n("Supported programmers: %1").tqarg("JDM PIC-Programmer 2, PIC-PG2C");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "picprog --output %file --pic %port";
@@ -98,7 +98,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PICProg" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Epic Plus");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "dump84 --dump-all --output=%file";
@@ -109,7 +109,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "prog84" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Kit 149, Kit 150");
+ config.description = i18n("Supported programmers: %1").tqarg("Kit 149, Kit 150");
config.description += i18n("<br>Interface: USB Port");
config.initCommand = "";
config.readCommand = "pp -d %device -r %file";
@@ -120,7 +120,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Wisp628");
+ config.description = i18n("Supported programmers: %1").tqarg("Wisp628");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "xwisp ID %device PORT %device DUMP";
@@ -132,7 +132,7 @@ void PicProgrammerSettings::initStaticConfigs()
#if 0
- config.description = i18n("Supported programmers: %1").arg("Epic Plus, JDM PIC-Programmer 2, PICCOLO, PICCOLO Grande, Trivial HVP Programmer");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus, JDM PIC-Programmer 2, PICCOLO, PICCOLO Grande, Trivial HVP Programmer");
config.description += i18n("<br>Interface: Serial Port and Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -145,7 +145,7 @@ void PicProgrammerSettings::initStaticConfigs()
config.executable = "";
- config.description = i18n("Supported programmers: %1").arg("Trivial LVP programmer, Trivial HVP Programmer");
+ config.description = i18n("Supported programmers: %1").tqarg("Trivial LVP programmer, Trivial HVP Programmer");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -156,7 +156,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PicPrg2" ] = config;
- config.description = i18n("Supported programmers: %1").arg("El Cheapo");
+ config.description = i18n("Supported programmers: %1").tqarg("El Cheapo");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -167,7 +167,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PP06" ] = config;
- config.description = i18n("Supported programmers: %1").arg("NOPPP");
+ config.description = i18n("Supported programmers: %1").tqarg("NOPPP");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -178,7 +178,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "NOPPP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("SNOPPP");
+ config.description = i18n("Supported programmers: %1").tqarg("SNOPPP");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -193,9 +193,9 @@ void PicProgrammerSettings::initStaticConfigs()
void PicProgrammerSettings::load( KConfig * config )
{
- QStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
- QStringList::iterator ocpEnd = oldCustomProgrammers.end();
- for ( QStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
+ TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
+ TQStringList::iterator ocpEnd = oldCustomProgrammers.end();
+ for ( TQStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
{
// The CustomProgrammer_ string we searched for might appear half way through... (don't want)
if ( (*it).startsWith("CustomProgrammer_") )
@@ -210,7 +210,7 @@ void PicProgrammerSettings::load( KConfig * config )
pc.blankCheckCommand = config->readEntry( "BlankCheckCommand" );
pc.eraseCommand = config->readEntry( "EraseCommand" );
- QString name = config->readEntry( "Name" );
+ TQString name = config->readEntry( "Name" );
m_customConfigs[name] = pc;
}
}
@@ -219,9 +219,9 @@ void PicProgrammerSettings::load( KConfig * config )
void PicProgrammerSettings::save( KConfig * config )
{
- QStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
- QStringList::iterator ocpEnd = oldCustomProgrammers.end();
- for ( QStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
+ TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
+ TQStringList::iterator ocpEnd = oldCustomProgrammers.end();
+ for ( TQStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
{
// The CustomProgrammer_ string we searched for might appear half way through... (don't want)
if ( (*it).startsWith("CustomProgrammer_") )
@@ -232,7 +232,7 @@ void PicProgrammerSettings::save( KConfig * config )
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
{
- config->setGroup( QString("CustomProgrammer_%1").arg(at++) );
+ config->setGroup( TQString("CustomProgrammer_%1").tqarg(at++) );
config->writeEntry( "Name", it.key() );
config->writeEntry( "InitCommand", it.data().initCommand );
@@ -245,12 +245,12 @@ void PicProgrammerSettings::save( KConfig * config )
}
-ProgrammerConfig PicProgrammerSettings::config( const QString & name )
+ProgrammerConfig PicProgrammerSettings::config( const TQString & name )
{
if ( name.isEmpty() )
return ProgrammerConfig();
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::const_iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -270,7 +270,7 @@ ProgrammerConfig PicProgrammerSettings::config( const QString & name )
}
-void PicProgrammerSettings::removeConfig( const QString & name )
+void PicProgrammerSettings::removeConfig( const TQString & name )
{
if ( isPredefined( name ) )
{
@@ -278,7 +278,7 @@ void PicProgrammerSettings::removeConfig( const QString & name )
return;
}
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -292,7 +292,7 @@ void PicProgrammerSettings::removeConfig( const QString & name )
}
-void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerConfig & config )
+void PicProgrammerSettings::saveConfig( const TQString & name, const ProgrammerConfig & config )
{
if ( isPredefined( name ) )
{
@@ -300,7 +300,7 @@ void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerCo
return;
}
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -316,12 +316,12 @@ void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerCo
}
-QStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
+TQStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
{
if ( !makeLowercase )
return m_customConfigs.keys() + m_staticConfigs.keys();
- QStringList names;
+ TQStringList names;
ProgrammerConfigMap::const_iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -335,9 +335,9 @@ QStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
}
-bool PicProgrammerSettings::isPredefined( const QString & name ) const
+bool PicProgrammerSettings::isPredefined( const TQString & name ) const
{
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::const_iterator end = m_staticConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_staticConfigs.begin(); it != end; ++it )
@@ -353,8 +353,8 @@ bool PicProgrammerSettings::isPredefined( const QString & name ) const
//BEGIN class PicProgrammer
-PicProgrammer::PicProgrammer( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "PicProgrammer" )
+PicProgrammer::PicProgrammer( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "PicProgrammer" )
{
m_successfulMessage = i18n("*** Programming successful ***");
m_failedMessage = i18n("*** Programming failed ***");
@@ -374,8 +374,8 @@ void PicProgrammer::processInput( ProcessOptions options )
PicProgrammerSettings settings;
settings.load( kapp->config() );
- QString program = options.m_program;
- if ( !settings.configNames( true ).contains( program.lower() ) )
+ TQString program = options.m_program;
+ if ( !settings.configNames( true ).tqcontains( program.lower() ) )
{
kdError() << k_funcinfo << "Invalid program" << endl;
finish( false );
@@ -384,10 +384,10 @@ void PicProgrammer::processInput( ProcessOptions options )
ProgrammerConfig config = settings.config( program );
- QString command = config.writeCommand;
- command.replace( "%port", options.m_port );
- command.replace( "%device", QString( options.m_picID ).remove("P") );
- command.replace( "%file", KProcess::quote( options.inputFiles().first() ) );
+ TQString command = config.writeCommand;
+ command.tqreplace( "%port", options.m_port );
+ command.tqreplace( "%device", TQString( options.m_picID ).remove("P") );
+ command.tqreplace( "%file", KProcess::quote( options.inputFiles().first() ) );
m_languageProcess->setUseShell( true );
*m_languageProcess << command;
@@ -401,15 +401,15 @@ void PicProgrammer::processInput( ProcessOptions options )
}
-bool PicProgrammer::isError( const QString &message ) const
+bool PicProgrammer::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool PicProgrammer::isWarning( const QString &message ) const
+bool PicProgrammer::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}
diff --git a/src/languages/picprogrammer.h b/src/languages/picprogrammer.h
index 580cf6b..1c5f406 100644
--- a/src/languages/picprogrammer.h
+++ b/src/languages/picprogrammer.h
@@ -28,18 +28,18 @@ class ProgrammerConfig
*/
void reset();
- QString initCommand;
- QString readCommand;
- QString writeCommand;
- QString verifyCommand;
- QString blankCheckCommand;
- QString eraseCommand;
+ TQString initCommand;
+ TQString readCommand;
+ TQString writeCommand;
+ TQString verifyCommand;
+ TQString blankCheckCommand;
+ TQString eraseCommand;
- QString description;
- QString executable; // The name of the program executable
+ TQString description;
+ TQString executable; // The name of the program executable
};
-typedef QMap< QString, ProgrammerConfig > ProgrammerConfigMap;
+typedef TQMap< TQString, ProgrammerConfig > ProgrammerConfigMap;
@@ -72,26 +72,26 @@ class PicProgrammerSettings
* created. The name is case insensitive (although the full case of the
* name will be stored if a new ProgrammerConfig is created).
*/
- ProgrammerConfig config( const QString & name );
+ ProgrammerConfig config( const TQString & name );
/**
* Removes the config (if it is custom) with the give name.
*/
- void removeConfig( const QString & name );
+ void removeConfig( const TQString & name );
/**
* Sets the ProgrammerConfig with the given name (or creates one if no
* such config exists). The name is case insensitive.
*/
- void saveConfig( const QString & name, const ProgrammerConfig & config );
+ void saveConfig( const TQString & name, const ProgrammerConfig & config );
/**
* @param makeLowercase whether the names should be converted to
* lowercase before returning.
* @return a list of names of the custom and predefined configs.
*/
- QStringList configNames( bool makeLowercase ) const;
+ TQStringList configNames( bool makeLowercase ) const;
/**
* @return whether the given config is predefined.
*/
- bool isPredefined( const QString & name ) const;
+ bool isPredefined( const TQString & name ) const;
protected:
/**
@@ -113,15 +113,15 @@ class PicProgrammerSettings
class PicProgrammer : public ExternalLanguage
{
public:
- PicProgrammer( ProcessChain *processChain, KTechlab *parent );
+ PicProgrammer( ProcessChain *processChain, KTechlab *tqparent );
~PicProgrammer();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString &message ) const;
- virtual bool isWarning( const QString &message ) const;
+ virtual bool isError( const TQString &message ) const;
+ virtual bool isWarning( const TQString &message ) const;
};
#endif
diff --git a/src/languages/processchain.cpp b/src/languages/processchain.cpp
index e17c6ae..129c74e 100644
--- a/src/languages/processchain.cpp
+++ b/src/languages/processchain.cpp
@@ -31,13 +31,13 @@
#include <kdebug.h>
#include <klocale.h>
#include <ktempfile.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
//BEGIN class ProcessChain
ProcessChain::ProcessChain( ProcessOptions options, KTechlab * ktechlab, const char *name )
- : QObject( (QObject*)ktechlab, name)
+ : TQObject( (TQObject*)ktechlab, name)
{
m_pKTechlab = ktechlab;
m_pFlowCode = 0l;
@@ -50,14 +50,14 @@ ProcessChain::ProcessChain( ProcessOptions options, KTechlab * ktechlab, const c
m_pSDCC = 0l;
m_processOptions = options;
- QString target;
+ TQString target;
if ( ProcessOptions::ProcessPath::to( options.processPath() ) == ProcessOptions::ProcessPath::Pic )
target = options.m_picID;
else
target = options.targetFile();
- LanguageManager::self()->logView()->addOutput( i18n("Building: %1").arg( target ), LogView::ot_important );
- QTimer::singleShot( 0, this, SLOT(compile()) );
+ LanguageManager::self()->logView()->addOutput( i18n("Building: %1").tqarg( target ), LogView::ot_important );
+ TQTimer::singleShot( 0, this, TQT_SLOT(compile()) );
}
@@ -100,7 +100,7 @@ void ProcessChain::compile()
switch ( m_processOptions.processPath() )
{
#define DIRECT_PROCESS( path, processor ) case ProcessOptions::ProcessPath::path: { processor()->processInput(m_processOptions); break; }
-#define INDIRECT_PROCESS( path, processor, extension ) case ProcessOptions::ProcessPath::path: { KTempFile f( QString::null, extension ); f.close(); m_processOptions.setIntermediaryOutput( f.name() ); processor()->processInput(m_processOptions); break; }
+#define INDIRECT_PROCESS( path, processor, extension ) case ProcessOptions::ProcessPath::path: { KTempFile f( TQString(), extension ); f.close(); m_processOptions.setIntermediaryOutput( f.name() ); processor()->processInput(m_processOptions); break; }
INDIRECT_PROCESS( AssemblyAbsolute_PIC, gpasm, ".hex" )
DIRECT_PROCESS( AssemblyAbsolute_Program, gpasm )
@@ -178,8 +178,8 @@ void ProcessChain::slotFinishedCompile(Language *language)
if ( !editor )
break;
- QString text;
- QFile f( options.targetFile() );
+ TQString text;
+ TQFile f( options.targetFile() );
if ( !f.open( IO_ReadOnly ) )
{
editor->deleteLater();
@@ -187,7 +187,7 @@ void ProcessChain::slotFinishedCompile(Language *language)
break;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while ( !stream.atEnd() )
text += stream.readLine()+'\n';
@@ -267,8 +267,8 @@ a * ProcessChain::b( ) \
if ( !c ) \
{ \
c = new a( this, m_pKTechlab ); \
- connect( c, SIGNAL(processSucceeded(Language* )), this, SLOT(slotFinishedCompile(Language* )) ); \
- connect( c, SIGNAL(processFailed(Language* )), this, SIGNAL(failed()) ); \
+ connect( c, TQT_SIGNAL(processSucceeded(Language* )), this, TQT_SLOT(slotFinishedCompile(Language* )) ); \
+ connect( c, TQT_SIGNAL(processFailed(Language* )), this, TQT_SIGNAL(failed()) ); \
} \
return c; \
}
@@ -286,11 +286,11 @@ LanguageFunction( SDCC, sdcc, m_pSDCC )
//BEGIN class ProcessListChain
-ProcessListChain::ProcessListChain( ProcessOptionsList pol, KTechlab * parent, const char * name )
- : QObject( (QObject*)parent, name )
+ProcessListChain::ProcessListChain( ProcessOptionsList pol, KTechlab * tqparent, const char * name )
+ : TQObject( (TQObject*)tqparent, name )
{
m_processOptionsList = pol;
- m_pKTechlab = parent;
+ m_pKTechlab = tqparent;
// Start us off...
slotProcessChainSuccessful();
@@ -311,8 +311,8 @@ void ProcessListChain::slotProcessChainSuccessful()
ProcessChain * pc = LanguageManager::self()->compile(po);
- connect( pc, SIGNAL(successful()), this, SLOT(slotProcessChainSuccessful()) );
- connect( pc, SIGNAL(failed()), this, SLOT(slotProcessChainFailed()) );
+ connect( pc, TQT_SIGNAL(successful()), this, TQT_SLOT(slotProcessChainSuccessful()) );
+ connect( pc, TQT_SIGNAL(failed()), this, TQT_SLOT(slotProcessChainFailed()) );
}
diff --git a/src/languages/processchain.h b/src/languages/processchain.h
index 90b871e..e4a51b4 100644
--- a/src/languages/processchain.h
+++ b/src/languages/processchain.h
@@ -12,8 +12,8 @@
#define PROCESSCHAIN_H
#include "language.h"
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class FlowCode;
class Gpasm;
@@ -26,17 +26,18 @@ class PicProgrammer;
class ProcesOptions;
class SDCC;
-typedef QValueList<ProcessOptions> ProcessOptionsList;
+typedef TQValueList<ProcessOptions> ProcessOptionsList;
/**
@author Daniel Clarke
@author David Saxton
*/
-class ProcessChain : public QObject
+class ProcessChain : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProcessChain( ProcessOptions options, KTechlab *parent, const char *name = 0l );
+ ProcessChain( ProcessOptions options, KTechlab *tqparent, const char *name = 0l );
~ProcessChain();
void setProcessOptions( ProcessOptions options ) { m_processOptions = options; }
@@ -98,12 +99,13 @@ class ProcessChain : public QObject
};
-class ProcessListChain : public QObject
+class ProcessListChain : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProcessListChain( ProcessOptionsList pol, KTechlab *parent, const char *name = 0l );
+ ProcessListChain( ProcessOptionsList pol, KTechlab *tqparent, const char *name = 0l );
signals:
/**
diff --git a/src/languages/sdcc.cpp b/src/languages/sdcc.cpp
index 553e974..881db33 100644
--- a/src/languages/sdcc.cpp
+++ b/src/languages/sdcc.cpp
@@ -20,8 +20,8 @@
#include <kmessagebox.h>
#include <kprocess.h>
-SDCC::SDCC( ProcessChain * processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "SDCC" )
+SDCC::SDCC( ProcessChain * processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "SDCC" )
{
m_successfulMessage = i18n("*** Compilation successful ***");
m_failedMessage = i18n("*** Compilation failed ***");
@@ -40,7 +40,7 @@ void SDCC::processInput( ProcessOptions options )
MicroInfo * info = MicroLibrary::self()->microInfoWithID( options.m_picID );
if (!info)
{
- outputError( i18n("Could not find PIC with ID \"%1\".").arg(options.m_picID) );
+ outputError( i18n("Could not find PIC with ID \"%1\".").tqarg(options.m_picID) );
return;
}
@@ -50,7 +50,7 @@ void SDCC::processInput( ProcessOptions options )
//BEGIN Pass custom sdcc options
-#define ARG(text,option) if ( KTLConfig::text() ) *m_languageProcess << ( QString("--%1").arg(option) );
+#define ARG(text,option) if ( KTLConfig::text() ) *m_languageProcess << ( TQString("--%1").tqarg(option) );
// General
ARG( sDCC_nostdlib, "nostdlib" )
ARG( sDCC_nostdinc, "nostdinc" )
@@ -103,7 +103,7 @@ void SDCC::processInput( ProcessOptions options )
*m_languageProcess << ("--debug"); // Enable debugging symbol output
*m_languageProcess << ("-S"); // Compile only; do not assemble or link
- QString asmSwitch;
+ TQString asmSwitch;
switch ( info->instructionSet()->set() )
{
case AsmInfo::PIC12:
@@ -136,13 +136,13 @@ void SDCC::processInput( ProcessOptions options )
}
-bool SDCC::isError( const QString &message ) const
+bool SDCC::isError( const TQString &message ) const
{
return false;
}
-bool SDCC::isStderrOutputFatal( const QString & message ) const
+bool SDCC::isStderrOutputFatal( const TQString & message ) const
{
if ( message.startsWith("Processor:") )
return false;
@@ -151,7 +151,7 @@ bool SDCC::isStderrOutputFatal( const QString & message ) const
}
-bool SDCC::isWarning( const QString &message ) const
+bool SDCC::isWarning( const TQString &message ) const
{
return false;
}
diff --git a/src/languages/sdcc.h b/src/languages/sdcc.h
index a6de933..b37a5de 100644
--- a/src/languages/sdcc.h
+++ b/src/languages/sdcc.h
@@ -19,16 +19,16 @@
class SDCC : public ExternalLanguage
{
public:
- SDCC( ProcessChain * processChain, KTechlab * parent );
+ SDCC( ProcessChain * processChain, KTechlab * tqparent );
~SDCC();
virtual void processInput( ProcessOptions options );
virtual ProcessOptions::ProcessPath::Path outputPath( ProcessOptions::ProcessPath::Path inputPath ) const;
protected:
- virtual bool isError( const QString & message ) const;
- virtual bool isWarning( const QString & message ) const;
- virtual bool isStderrOutputFatal( const QString & message ) const;
+ virtual bool isError( const TQString & message ) const;
+ virtual bool isWarning( const TQString & message ) const;
+ virtual bool isStderrOutputFatal( const TQString & message ) const;
};
#endif
diff --git a/src/languages/sourceline.cpp b/src/languages/sourceline.cpp
index 9ca89bb..ad5e03c 100644
--- a/src/languages/sourceline.cpp
+++ b/src/languages/sourceline.cpp
@@ -18,7 +18,7 @@ SourceLine::SourceLine()
}
-SourceLine::SourceLine( const QString & fileName, int line )
+SourceLine::SourceLine( const TQString & fileName, int line )
: m_fileName(fileName),
m_line(line)
{
diff --git a/src/languages/sourceline.h b/src/languages/sourceline.h
index d2e774d..f799141 100644
--- a/src/languages/sourceline.h
+++ b/src/languages/sourceline.h
@@ -11,7 +11,7 @@
#ifndef SOURCELINE_H
#define SOURCELINE_H
-#include <qstring.h>
+#include <tqstring.h>
/**
@author David Saxton
@@ -23,9 +23,9 @@ class SourceLine
* Creates an invalid source line (line is negative).
*/
SourceLine();
- SourceLine( const QString & fileName, int line );
+ SourceLine( const TQString & fileName, int line );
- QString fileName() const { return m_fileName; }
+ TQString fileName() const { return m_fileName; }
int line() const { return m_line; }
bool isValid() const { return m_line >= 0; }
@@ -34,7 +34,7 @@ class SourceLine
bool operator == ( const SourceLine & sourceLine ) const;
protected:
- QString m_fileName;
+ TQString m_fileName;
int m_line;
};
diff --git a/src/libraryitem.cpp b/src/libraryitem.cpp
index f7ba013..8301a24 100644
--- a/src/libraryitem.cpp
+++ b/src/libraryitem.cpp
@@ -13,9 +13,9 @@
#include <kiconloader.h>
#include <kicontheme.h>
#include <kstandarddirs.h>
-#include <qimage.h>
+#include <tqimage.h>
-LibraryItem::LibraryItem( QStringList idList, const QString &name, const QString &category, QPixmap icon, Type type, createItemPtr _createItem )
+LibraryItem::LibraryItem( TQStringList idList, const TQString &name, const TQString &category, TQPixmap icon, Type type, createItemPtr _createItem )
{
m_idList = idList;
m_name = name;
@@ -27,7 +27,7 @@ LibraryItem::LibraryItem( QStringList idList, const QString &name, const QString
}
-LibraryItem::LibraryItem( QStringList idList, const QString &name, const QString &category, const QString &iconName, Type type, createItemPtr _createItem )
+LibraryItem::LibraryItem( TQStringList idList, const TQString &name, const TQString &category, const TQString &iconName, Type type, createItemPtr _createItem )
{
m_idList = idList;
m_name = name;
@@ -39,7 +39,7 @@ LibraryItem::LibraryItem( QStringList idList, const QString &name, const QString
}
-LibraryItem::LibraryItem( QStringList idList, const QString &name, const QString &category, Type type, createItemPtr _createItem )
+LibraryItem::LibraryItem( TQStringList idList, const TQString &name, const TQString &category, Type type, createItemPtr _createItem )
{
m_idList = idList;
m_name = name;
@@ -70,12 +70,12 @@ void LibraryItem::createIcon16()
return;
}
- QImage im = m_icon_full.convertToImage();
- im = im.smoothScale( size, size, QImage::ScaleMin );
+ TQImage im = m_icon_full.convertToImage();
+ im = im.smoothScale( size, size, TQ_ScaleMin );
m_icon_16.convertFromImage(im);
}
-QString LibraryItem::activeID( ) const
+TQString LibraryItem::activeID( ) const
{
return m_idList.isEmpty() ? "" : m_idList[0];
}
diff --git a/src/libraryitem.h b/src/libraryitem.h
index 1e6b429..040afa9 100644
--- a/src/libraryitem.h
+++ b/src/libraryitem.h
@@ -13,7 +13,7 @@
#include "item.h"
-class QStringList;
+class TQStringList;
/**
This holds details of an item - id, name, category it is displayed in in its
@@ -39,16 +39,16 @@ class LibraryItem
lit_subcircuit,
lit_other
};
- LibraryItem( QStringList idList, const QString &name, const QString &category, QPixmap icon, Type type, createItemPtr createItem );
- LibraryItem( QStringList idList, const QString &name, const QString &category, const QString &iconName, Type type, createItemPtr createItem );
- LibraryItem( QStringList idList, const QString &name, const QString &category, Type type, createItemPtr createItem );
+ LibraryItem( TQStringList idList, const TQString &name, const TQString &category, TQPixmap icon, Type type, createItemPtr createItem );
+ LibraryItem( TQStringList idList, const TQString &name, const TQString &category, const TQString &iconName, Type type, createItemPtr createItem );
+ LibraryItem( TQStringList idList, const TQString &name, const TQString &category, Type type, createItemPtr createItem );
- QString activeID() const;
- QStringList allIDs() const { return m_idList; }
- QString name() const { return m_name; }
- QString category() const { return m_category; }
- QPixmap iconFull() const { return m_icon_full; }
- QPixmap icon16() const { return m_icon_16; }
+ TQString activeID() const;
+ TQStringList allIDs() const { return m_idList; }
+ TQString name() const { return m_name; }
+ TQString category() const { return m_category; }
+ TQPixmap iconFull() const { return m_icon_full; }
+ TQPixmap icon16() const { return m_icon_16; }
createItemPtr createItemFnPtr() const { return createItem; }
int type() const { return m_type; }
@@ -56,14 +56,14 @@ class LibraryItem
void createIcon16();
private:
- QStringList m_idList;
- QString m_name;
- QString m_category;
- QPixmap m_icon_full;
- QPixmap m_icon_16;
+ TQStringList m_idList;
+ TQString m_name;
+ TQString m_category;
+ TQPixmap m_icon_full;
+ TQPixmap m_icon_16;
createItemPtr createItem;
int m_type;
};
-typedef QValueList<LibraryItem*> LibraryItemList;
+typedef TQValueList<LibraryItem*> LibraryItemList;
#endif
diff --git a/src/mechanics/chassiscircular2.cpp b/src/mechanics/chassiscircular2.cpp
index 91b9f0a..715073f 100644
--- a/src/mechanics/chassiscircular2.cpp
+++ b/src/mechanics/chassiscircular2.cpp
@@ -13,8 +13,8 @@
#include "libraryitem.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
+#include <tqpainter.h>
+#include <tqwmatrix.h>
#include <algorithm>
#include <cmath>
@@ -31,7 +31,7 @@ Item* ChassisCircular2::construct( ItemDocument *itemDocument, bool newItem, con
LibraryItem* ChassisCircular2::libraryItem()
{
return new LibraryItem(
- QString("mech/chassis_circular_2"),
+ TQString("mech/chassis_circular_2"),
i18n("Circular 2-Wheel Chassis"),
i18n("Chassis'"),
"chassis.png",
@@ -49,10 +49,10 @@ ChassisCircular2::ChassisCircular2( MechanicsDocument *mechanicsDocument, bool n
m_theta1 = 0.0;
m_theta2 = 0.0;
- QPointArray pa;
+ TQPointArray pa;
pa.makeEllipse( -25, -25, 50, 50 );
- QWMatrix m(4,0,0,4,0,0);
- m.setTransformationMode( QWMatrix::Areas );
+ TQWMatrix m(4,0,0,4,0,0);
+ m.setTransformationMode( TQWMatrix::Areas );
pa = m.map(pa);
setItemPoints(pa);
@@ -70,8 +70,8 @@ void ChassisCircular2::itemResized()
const double w = sizeRect().width();
const double h = sizeRect().height();
- m_wheel1Pos = QRect( int(w/5), int(h/6), int(w/4), int(h/8) );
- m_wheel2Pos = QRect( int(w/5), int(5*h/6-h/8), int(w/4), int(h/8) );
+ m_wheel1Pos = TQRect( int(w/5), int(h/6), int(w/4), int(h/8) );
+ m_wheel2Pos = TQRect( int(w/5), int(5*h/6-h/8), int(w/4), int(h/8) );
}
@@ -97,7 +97,7 @@ void ChassisCircular2::advance( int phase )
}
-void ChassisCircular2::drawShape( QPainter &p )
+void ChassisCircular2::drawShape( TQPainter &p )
{
const double _x = int(sizeRect().x() + x());
const double _y = int(sizeRect().y() + y());
@@ -105,8 +105,8 @@ void ChassisCircular2::drawShape( QPainter &p )
const double h = sizeRect().height();
initPainter(p);
- p.setBrush( QColor( 255, 246, 210 ) );
- QRect circleRect = sizeRect();
+ p.setBrush( TQColor( 255, 246, 210 ) );
+ TQRect circleRect = sizeRect();
circleRect.moveLeft( int(circleRect.left() + x()) );
circleRect.moveTop( int(circleRect.top() + y()) );
p.drawEllipse(circleRect);
@@ -118,24 +118,24 @@ void ChassisCircular2::drawShape( QPainter &p )
const double y1 = _y+(h/6); // Wheel 1 y-pos
const double y2 = _y+(5*h/6)-H; // Wheel 2 y-pos
- p.setPen( Qt::NoPen );
+ p.setPen( TQt::NoPen );
const double stripeWidth = 5;
const double offset2 = 1 + int(m_theta1*m_wheel1Pos.width())%int(2*stripeWidth);
const double offset1 = 1 + int(m_theta2*m_wheel2Pos.width())%int(2*stripeWidth);
- p.setBrush( QColor( 255, 232, 182 ) );
+ p.setBrush( TQColor( 255, 232, 182 ) );
for ( double i=-1; i<std::ceil(m_wheel1Pos.width()/stripeWidth); ++i )
{
- p.setClipRect( QRect( int(_x+m_wheel1Pos.x()+2), int(_y+m_wheel1Pos.y()+2), int(m_wheel1Pos.width()-4), int(m_wheel1Pos.height()-4) ), QPainter::CoordPainter );
+ p.setClipRect( TQRect( int(_x+m_wheel1Pos.x()+2), int(_y+m_wheel1Pos.y()+2), int(m_wheel1Pos.width()-4), int(m_wheel1Pos.height()-4) ), TQPainter::CoordPainter );
p.drawRect( int(offset1+X + i*stripeWidth*2), int(y1+1), int(stripeWidth), int(H-2) );
- p.setClipRect( QRect( int(_x+m_wheel2Pos.x()+2), int(_y+m_wheel2Pos.y()+2), int(m_wheel2Pos.width()-4), int(m_wheel2Pos.height()-4) ), QPainter::CoordPainter );
+ p.setClipRect( TQRect( int(_x+m_wheel2Pos.x()+2), int(_y+m_wheel2Pos.y()+2), int(m_wheel2Pos.width()-4), int(m_wheel2Pos.height()-4) ), TQPainter::CoordPainter );
p.drawRect( int(offset2+X + i*stripeWidth*2), int(y2+1), int(stripeWidth), int(H-2) );
}
p.setClipping(false);
- p.setPen( Qt::black );
- p.setBrush( Qt::NoBrush );
+ p.setPen( TQt::black );
+ p.setBrush( TQt::NoBrush );
p.drawRoundRect( int(X), int(y1), int(w/4), int(H), 25, 50 );
p.drawRoundRect( int(X), int(y2), int(w/4), int(H), 25, 50 );
diff --git a/src/mechanics/chassiscircular2.h b/src/mechanics/chassiscircular2.h
index 1c8897a..d0752b7 100644
--- a/src/mechanics/chassiscircular2.h
+++ b/src/mechanics/chassiscircular2.h
@@ -30,13 +30,13 @@ public:
protected:
virtual void itemResized();
- void drawShape( QPainter &p );
+ void drawShape( TQPainter &p );
double m_theta1; // Angle of rotation of wheel 1 (used for drawing)
double m_theta2; // Angle of rotation of wheel 1 (used for drawing)
- QRect m_wheel1Pos; // Position of first wheel, with respect to top left of item
- QRect m_wheel2Pos; // Position of second wheel, with respect to top left of item
+ TQRect m_wheel1Pos; // Position of first wheel, with respect to top left of item
+ TQRect m_wheel2Pos; // Position of second wheel, with respect to top left of item
};
#endif
diff --git a/src/mechanics/mechanicsdocument.cpp b/src/mechanics/mechanicsdocument.cpp
index 0b2fa3b..f11d421 100644
--- a/src/mechanics/mechanicsdocument.cpp
+++ b/src/mechanics/mechanicsdocument.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-MechanicsDocument::MechanicsDocument( const QString &caption, KTechlab *ktechlab, const char *name )
+MechanicsDocument::MechanicsDocument( const TQString &caption, KTechlab *ktechlab, const char *name )
: ItemDocument( caption, ktechlab, name )
{
m_type = Document::dt_mechanics;
@@ -67,7 +67,7 @@ ItemGroup *MechanicsDocument::selectList() const
-bool MechanicsDocument::isValidItem( const QString &itemId )
+bool MechanicsDocument::isValidItem( const TQString &itemId )
{
return itemId.startsWith("mech/") || itemId.startsWith("dp/");
}
@@ -79,7 +79,7 @@ bool MechanicsDocument::isValidItem( Item *item )
}
-Item* MechanicsDocument::addItem( const QString &id, const QPoint &p, bool newItem )
+Item* MechanicsDocument::addItem( const TQString &id, const TQPoint &p, bool newItem )
{
if ( !isValidItem(id) )
return 0l;
@@ -88,7 +88,7 @@ Item* MechanicsDocument::addItem( const QString &id, const QPoint &p, bool newIt
if (!item)
return 0L;
- QRect rect = item->boundingRect();
+ TQRect rect = item->boundingRect();
int dx = (int)(p.x())-rect.width()/2;
int dy = (int)(p.y())-rect.height()/2;
@@ -130,24 +130,24 @@ void MechanicsDocument::deleteSelection()
}
-bool MechanicsDocument::registerItem( QCanvasItem *qcanvasItem )
+bool MechanicsDocument::registerItem( TQCanvasItem *qcanvasItem )
{
return ItemDocument::registerItem(qcanvasItem);
}
-void MechanicsDocument::appendDeleteList( QCanvasItem *qcanvasItem )
+void MechanicsDocument::appendDeleteList( TQCanvasItem *qcanvasItem )
{
MechanicsItem *mechItem = dynamic_cast<MechanicsItem*>(qcanvasItem);
- if ( !mechItem || m_itemDeleteList.contains(mechItem) ) {
+ if ( !mechItem || m_itemDeleteList.tqcontains(mechItem) ) {
return;
}
m_itemDeleteList.append(mechItem);
m_itemList.remove(mechItem);
- disconnect( mechItem, SIGNAL(selected(Item*,bool)), this, SIGNAL(itemSelected(Item*)) );
- disconnect( mechItem, SIGNAL(unselected(Item*,bool)), this, SIGNAL(itemUnselected(Item*)) );
+ disconnect( mechItem, TQT_SIGNAL(selected(Item*,bool)), this, TQT_SIGNAL(itemSelected(Item*)) );
+ disconnect( mechItem, TQT_SIGNAL(unselected(Item*,bool)), this, TQT_SIGNAL(itemUnselected(Item*)) );
mechItem->removeItem();
}
@@ -159,10 +159,10 @@ void MechanicsDocument::flushDeleteList()
ItemList::iterator end = m_itemDeleteList.end();
for ( ItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
{
- if ( *it && m_itemDeleteList.contains(*it) > 1 )
+ if ( *it && m_itemDeleteList.tqcontains(*it) > 1 )
*it = 0l;
}
- m_itemDeleteList.remove(QGuardedPtr<Item>(0l));
+ m_itemDeleteList.remove(TQGuardedPtr<Item>(0l));
end = m_itemDeleteList.end();
for ( ItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
@@ -174,7 +174,7 @@ void MechanicsDocument::flushDeleteList()
}
-MechanicsItem* MechanicsDocument::mechanicsItemWithID( const QString &id )
+MechanicsItem* MechanicsDocument::mechanicsItemWithID( const TQString &id )
{
return dynamic_cast<MechanicsItem*>(itemWithID(id));
}
diff --git a/src/mechanics/mechanicsdocument.h b/src/mechanics/mechanicsdocument.h
index dfe454f..80b1206 100644
--- a/src/mechanics/mechanicsdocument.h
+++ b/src/mechanics/mechanicsdocument.h
@@ -18,8 +18,8 @@ class MechanicsGroup;
class MechanicsItem;
class MechanicsSimulation;
-typedef QValueList<MechanicsItem*> MechItemList;
-typedef QValueList<MechanicsItem*> MechanicsItemList;
+typedef TQValueList<MechanicsItem*> MechItemList;
+typedef TQValueList<MechanicsItem*> MechanicsItemList;
/**
@author David Saxton
@@ -27,35 +27,36 @@ typedef QValueList<MechanicsItem*> MechanicsItemList;
class MechanicsDocument : public ItemDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- MechanicsDocument( const QString &caption, KTechlab *ktechlab, const char *name = 0 );
+ MechanicsDocument( const TQString &caption, KTechlab *ktechlab, const char *name = 0 );
~MechanicsDocument();
virtual View *createView( ViewContainer *viewContainer, uint viewAreaId, const char *name = 0l );
- virtual bool isValidItem( const QString &itemId );
+ virtual bool isValidItem( const TQString &itemId );
virtual bool isValidItem( Item *item );
virtual void deleteSelection();
virtual void copy();
virtual void selectAll();
virtual ItemGroup *selectList() const;
- MechanicsItem *mechanicsItemWithID( const QString &id );
- virtual Item* addItem( const QString &id, const QPoint &p, bool newItem );
+ MechanicsItem *mechanicsItemWithID( const TQString &id );
+ virtual Item* addItem( const TQString &id, const TQPoint &p, bool newItem );
/**
- * Adds a QCanvasItem to the delete list to be deleted, when
+ * Adds a TQCanvasItem to the delete list to be deleted, when
* flushDeleteList() is called
*/
- virtual void appendDeleteList( QCanvasItem *qcanvasItem );
+ virtual void appendDeleteList( TQCanvasItem *qcanvasItem );
/**
* Permantly deletes all items that have been added to the delete list with
- * the appendDeleteList( QCanvasItem *qcanvasItem ) function.
+ * the appendDeleteList( TQCanvasItem *qcanvasItem ) function.
*/
virtual void flushDeleteList();
/**
* Register an item with the ICNDocument.
*/
- virtual bool registerItem( QCanvasItem *qcanvasItem );
+ virtual bool registerItem( TQCanvasItem *qcanvasItem );
protected:
MechanicsGroup *m_selectList;
diff --git a/src/mechanics/mechanicsgroup.cpp b/src/mechanics/mechanicsgroup.cpp
index 94fe703..8d27579 100644
--- a/src/mechanics/mechanicsgroup.cpp
+++ b/src/mechanics/mechanicsgroup.cpp
@@ -26,17 +26,17 @@ MechanicsGroup::~MechanicsGroup()
bool MechanicsGroup::addItem( Item *item )
{
- if ( !item || !item->canvas() || m_itemList.contains(item) ) {
+ if ( !item || !item->canvas() || m_itemList.tqcontains(item) ) {
return false;
}
- // Check that the item's parent isn't already selected
- Item *parent = item->parentItem();
- while (parent)
+ // Check that the item's tqparent isn't already selected
+ Item *tqparent = item->tqparentItem();
+ while (tqparent)
{
- if ( m_itemList.contains(parent) )
+ if ( m_itemList.tqcontains(tqparent) )
return false;
- parent = parent->parentItem();
+ tqparent = tqparent->tqparentItem();
}
removeChildren(item);
@@ -52,7 +52,7 @@ bool MechanicsGroup::addItem( Item *item )
bool MechanicsGroup::removeItem( Item *item )
{
- if ( !item || !m_itemList.contains(item) ) {
+ if ( !item || !m_itemList.tqcontains(item) ) {
return false;
}
unregisterItem(item);
@@ -71,9 +71,9 @@ void MechanicsGroup::removeChildren( Item *item )
if (!item)
return;
- const ItemList children = item->children();
- const ItemList::const_iterator end = children.end();
- for ( ItemList::const_iterator it = children.begin(); it != end; ++it )
+ const ItemList tqchildren = item->tqchildren();
+ const ItemList::const_iterator end = tqchildren.end();
+ for ( ItemList::const_iterator it = tqchildren.begin(); it != end; ++it )
{
removeChildren(*it);
removeItem(*it);
@@ -131,13 +131,13 @@ MechanicsItemList MechanicsGroup::toplevelMechItemList() const
const MechanicsItemList::const_iterator end = mechItemList.end();
for ( MechanicsItemList::const_iterator it = mechItemList.begin(); it != end; ++it )
{
- MechanicsItem* parent = *it;
- while (parent)
+ MechanicsItem* tqparent = *it;
+ while (tqparent)
{
- if ( !parent->parentItem() && !toplevel.contains(parent) )
- toplevel.append(parent);
+ if ( !tqparent->tqparentItem() && !toplevel.tqcontains(tqparent) )
+ toplevel.append(tqparent);
- parent = dynamic_cast<MechanicsItem*>(parent->parentItem());
+ tqparent = dynamic_cast<MechanicsItem*>(tqparent->tqparentItem());
}
}
@@ -157,14 +157,14 @@ void MechanicsGroup::setSelected( bool sel )
}
-bool MechanicsGroup::addQCanvasItem( QCanvasItem* item )
+bool MechanicsGroup::addTQCanvasItem( TQCanvasItem* item )
{
return addItem( dynamic_cast<Item*>(item) );
}
-bool MechanicsGroup::contains(QCanvasItem* item) const
+bool MechanicsGroup::tqcontains(TQCanvasItem* item) const
{
- return m_itemList.contains(dynamic_cast<Item*>(item));
+ return m_itemList.tqcontains(dynamic_cast<Item*>(item));
}
@@ -201,20 +201,20 @@ void MechanicsGroup::removeAllItems()
removeItem(m_itemList.first());
}
-void MechanicsGroup::removeQCanvasItem(QCanvasItem* item)
+void MechanicsGroup::removeTQCanvasItem(TQCanvasItem* item)
{
removeItem(dynamic_cast<Item*>(item));
}
-void MechanicsGroup::setItems(QCanvasItemList list)
+void MechanicsGroup::setItems(TQCanvasItemList list)
{
{
ItemList removeList;
const ItemList::iterator end = m_itemList.end();
for ( ItemList::iterator it = m_itemList.begin(); it != end; ++it )
{
- if ( !list.contains(*it) ) {
+ if ( !list.tqcontains(*it) ) {
removeList.append(*it);
}
}
@@ -226,12 +226,12 @@ void MechanicsGroup::setItems(QCanvasItemList list)
}
}
- const QCanvasItemList::iterator end = list.end();
- for ( QCanvasItemList::iterator it = list.begin(); it != end; ++it )
+ const TQCanvasItemList::iterator end = list.end();
+ for ( TQCanvasItemList::iterator it = list.begin(); it != end; ++it )
{
// We don't need to check that we've already got the item as it will
// be checked in the function call
- addQCanvasItem(*it);
+ addTQCanvasItem(*it);
}
}
diff --git a/src/mechanics/mechanicsgroup.h b/src/mechanics/mechanicsgroup.h
index 6b49966..c3ca347 100644
--- a/src/mechanics/mechanicsgroup.h
+++ b/src/mechanics/mechanicsgroup.h
@@ -16,7 +16,7 @@
class MechanicsItem;
class MechanicsDocument;
-typedef QValueList<MechanicsItem*> MechanicsItemList;
+typedef TQValueList<MechanicsItem*> MechanicsItemList;
/**
@author David Saxton
@@ -24,6 +24,7 @@ typedef QValueList<MechanicsItem*> MechanicsItemList;
class MechanicsGroup : public ItemGroup
{
Q_OBJECT
+ TQ_OBJECT
public:
MechanicsGroup( MechanicsDocument *mechanicsDocument, const char *name = 0);
~MechanicsGroup();
@@ -41,19 +42,19 @@ public:
*/
void setRaised( bool isRaised );
/**
- * Removes all the children of the given item from the group
+ * Removes all the tqchildren of the given item from the group
*/
void removeChildren( Item *item );
bool addItem( Item *item );
bool removeItem( Item *item );
- virtual bool addQCanvasItem(QCanvasItem* item);
- virtual bool contains(QCanvasItem* item) const;
+ virtual bool addTQCanvasItem(TQCanvasItem* item);
+ virtual bool tqcontains(TQCanvasItem* item) const;
virtual uint count() const { return itemCount(); }
virtual void deleteAllItems();
virtual void mergeGroup(ItemGroup* group);
virtual void removeAllItems();
- virtual void removeQCanvasItem(QCanvasItem* item);
- virtual void setItems(QCanvasItemList list);
+ virtual void removeTQCanvasItem(TQCanvasItem* item);
+ virtual void setItems(TQCanvasItemList list);
/**
* Sets the selected state of all items in the group
*/
diff --git a/src/mechanics/mechanicsitem.cpp b/src/mechanics/mechanicsitem.cpp
index acf2239..379face 100644
--- a/src/mechanics/mechanicsitem.cpp
+++ b/src/mechanics/mechanicsitem.cpp
@@ -14,9 +14,9 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qbitarray.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
+#include <tqbitarray.h>
+#include <tqpainter.h>
+#include <tqwmatrix.h>
#include <cmath>
/**
@@ -30,7 +30,7 @@ double normalizeAngle( double angle )
return angle - 6.2832*std::floor(angle/6.2832);
}
-MechanicsItem::MechanicsItem( MechanicsDocument *mechanicsDocument, bool newItem, const QString &id )
+MechanicsItem::MechanicsItem( MechanicsDocument *mechanicsDocument, bool newItem, const TQString &id )
: Item( mechanicsDocument, newItem, id )
{
p_mechanicsDocument = mechanicsDocument;
@@ -102,9 +102,9 @@ void MechanicsItem::dataChanged()
PositionInfo MechanicsItem::absolutePosition() const
{
- MechanicsItem *parentMechItem = dynamic_cast<MechanicsItem*>((Item*)(p_parentItem));
- if (parentMechItem)
- return parentMechItem->absolutePosition() + m_relativePosition;
+ MechanicsItem *tqparentMechItem = dynamic_cast<MechanicsItem*>((Item*)(p_parentItem));
+ if (tqparentMechItem)
+ return tqparentMechItem->absolutePosition() + m_relativePosition;
return m_relativePosition;
}
@@ -118,13 +118,13 @@ void MechanicsItem::reparented( Item *oldItem, Item *newItem )
if (oldMechItem)
{
m_relativePosition = oldMechItem->absolutePosition() + m_relativePosition;
- disconnect( oldMechItem, SIGNAL(moved()), this, SLOT(parentMoved()) );
+ disconnect( oldMechItem, TQT_SIGNAL(moved()), this, TQT_SLOT(tqparentMoved()) );
}
if (newMechItem)
{
m_relativePosition = m_relativePosition - newMechItem->absolutePosition();
- connect( newMechItem, SIGNAL(moved()), this, SLOT(parentMoved()) );
+ connect( newMechItem, TQT_SIGNAL(moved()), this, TQT_SLOT(tqparentMoved()) );
}
updateCanvasPoints();
@@ -137,7 +137,7 @@ void MechanicsItem::childAdded( Item *child )
if (!mechItem)
return;
- connect( mechItem, SIGNAL(updateMechanicsInfoCombined()), this, SLOT(childMoved()) );
+ connect( mechItem, TQT_SIGNAL(updateMechanicsInfoCombined()), this, TQT_SLOT(childMoved()) );
updateMechanicsInfoCombined();
}
@@ -148,12 +148,12 @@ void MechanicsItem::childRemoved( Item *child )
if (!mechItem)
return;
- disconnect( mechItem, SIGNAL(updateMechanicsInfoCombined()), this, SLOT(childMoved()) );
+ disconnect( mechItem, TQT_SIGNAL(updateMechanicsInfoCombined()), this, TQT_SLOT(childMoved()) );
updateMechanicsInfoCombined();
}
-void MechanicsItem::parentMoved()
+void MechanicsItem::tqparentMoved()
{
PositionInfo absPos = absolutePosition();
Item::moveBy( absPos.x() - x(), absPos.y() - y() );
@@ -164,21 +164,21 @@ void MechanicsItem::parentMoved()
void MechanicsItem::updateCanvasPoints()
{
- const QRect ipbr = m_itemPoints.boundingRect();
+ const TQRect ipbr = m_itemPoints.boundingRect();
double scalex = double(m_sizeRect.width()) / double(ipbr.width());
double scaley = double(m_sizeRect.height()) / double(ipbr.height());
PositionInfo abs = absolutePosition();
- QWMatrix m;
+ TQWMatrix m;
m.rotate(abs.angle()*57.29577951308232);
m.translate( m_sizeRect.left(), m_sizeRect.top() );
m.scale( scalex, scaley );
m.translate( -int(ipbr.left()), -int(ipbr.top()) );
setPoints( m.map(m_itemPoints) );
- QRect tempt = m.mapRect(ipbr);
+ TQRect tempt = m.mapRect(ipbr);
}
@@ -206,8 +206,8 @@ void MechanicsItem::updateMechanicsInfoCombined()
double mass_x = 0.;
double mass_y = 0.;
- const ItemList::const_iterator end = m_children.end();
- for ( ItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ const ItemList::const_iterator end = m_tqchildren.end();
+ for ( ItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
{
MechanicsItem *child = dynamic_cast<MechanicsItem*>((Item*)*it);
if (child)
@@ -287,9 +287,9 @@ void MechanicsItem::leaveEvent()
}
-QRect MechanicsItem::maxInnerRectangle( const QRect &outerRect ) const
+TQRect MechanicsItem::maxInnerRectangle( const TQRect &outerRect ) const
{
- QRect normalizedOuterRect = outerRect.normalize();
+ TQRect normalizedOuterRect = outerRect.normalize();
const double LEFT = normalizedOuterRect.left();
const double TOP = normalizedOuterRect.top();
const double X = normalizedOuterRect.width();
@@ -330,11 +330,11 @@ QRect MechanicsItem::maxInnerRectangle( const QRect &outerRect ) const
left = std::cos(a) * (LEFT + width*std::sin(a)) + std::sin(a)*TOP;
}
- return QRect( int(left), int(top), int(width), int(height) );
+ return TQRect( int(left), int(top), int(width), int(height) );
}
-void MechanicsItem::initPainter( QPainter &p )
+void MechanicsItem::initPainter( TQPainter &p )
{
PositionInfo absPos = absolutePosition();
p.translate( absPos.x(), absPos.y() );
@@ -344,7 +344,7 @@ void MechanicsItem::initPainter( QPainter &p )
}
-void MechanicsItem::deinitPainter( QPainter &p )
+void MechanicsItem::deinitPainter( TQPainter &p )
{
PositionInfo absPos = absolutePosition();
p.translate( absPos.x(), absPos.y() );
diff --git a/src/mechanics/mechanicsitem.h b/src/mechanics/mechanicsitem.h
index db500fc..8c73d9d 100644
--- a/src/mechanics/mechanicsitem.h
+++ b/src/mechanics/mechanicsitem.h
@@ -12,13 +12,13 @@
#define MECHANICSITEM_H
#include <item.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class LibraryItem;
class MechanicsItem;
// class MechanicsItemOverlayItem;
class MechanicsDocument;
-typedef QValueList<MechanicsItem*> MechanicsItemList;
+typedef TQValueList<MechanicsItem*> MechanicsItemList;
/**
@short Stores mass, moment of inertia
@@ -118,8 +118,9 @@ protected:
class MechanicsItem : public Item
{
Q_OBJECT
+ TQ_OBJECT
public:
- MechanicsItem( MechanicsDocument *mechanicsDocument, bool newItem, const QString &id );
+ MechanicsItem( MechanicsDocument *mechanicsDocument, bool newItem, const TQString &id );
virtual ~MechanicsItem();
enum SelectionMode
@@ -151,18 +152,18 @@ public:
*/
PositionInfo absolutePosition() const;
/**
- * Returns the position relative to the parent item (or the absolute
- * position if there is no parent item)
+ * Returns the position relative to the tqparent item (or the absolute
+ * position if there is no tqparent item)
*/
PositionInfo relativePosition() const { return m_relativePosition; }
/**
* Returns the mechanics info for this item (so not taking into account that
- * of attached children)
+ * of attached tqchildren)
*/
MechanicsInfo *mechanicsInfo() { return &m_mechanicsInfo; }
/**
* Returns the combined mechanics info for this item (which takes into
- * account that of attached children).
+ * account that of attached tqchildren).
*/
CombinedMechanicsInfo *mechanicsInfoCombined() { return &m_mechanicsInfoCombined; }
/**
@@ -170,7 +171,7 @@ public:
* rectangle, given this items current rotation. Legitimately means that
* whether this item is allowed to be distorted, inverted, resized, etc.
*/
- QRect maxInnerRectangle( const QRect &outerRect ) const;
+ TQRect maxInnerRectangle( const TQRect &outerRect ) const;
virtual ItemData itemData() const;
@@ -187,7 +188,7 @@ public slots:
* Rotate the item by the given amount (in radians)
*/
void rotateBy( double dtheta );
- void parentMoved();
+ void tqparentMoved();
signals:
/**
@@ -212,11 +213,11 @@ protected:
/**
* Sets the correct orientation on the painter
*/
- void initPainter( QPainter &p );
+ void initPainter( TQPainter &p );
/**
* *Must* be called after calling initPainter, if initPainter was called
*/
- void deinitPainter( QPainter &p );
+ void deinitPainter( TQPainter &p );
virtual void dataChanged();
virtual void itemPointsChanged() { updateCanvasPoints(); }
/**
@@ -226,7 +227,7 @@ protected:
void updateCanvasPoints();
MechanicsDocument *p_mechanicsDocument;
- PositionInfo m_relativePosition; // Absolution position if not attached to a parent item, or otherwise relative to parent item
+ PositionInfo m_relativePosition; // Absolution position if not attached to a tqparent item, or otherwise relative to tqparent item
MechanicsInfo m_mechanicsInfo;
CombinedMechanicsInfo m_mechanicsInfoCombined;
diff --git a/src/mechanics/mechanicssimulation.cpp b/src/mechanics/mechanicssimulation.cpp
index d5ec98d..c641074 100644
--- a/src/mechanics/mechanicssimulation.cpp
+++ b/src/mechanics/mechanicssimulation.cpp
@@ -13,14 +13,14 @@
#include "mechanicssimulation.h"
#include <cmath>
-#include <qtimer.h>
+#include <tqtimer.h>
MechanicsSimulation::MechanicsSimulation( MechanicsDocument *mechanicsDocument )
- : QObject(mechanicsDocument)
+ : TQObject(mechanicsDocument)
{
p_mechanicsDocument = mechanicsDocument;
- m_advanceTmr = new QTimer(this);
- connect( m_advanceTmr, SIGNAL(timeout()), this, SLOT(slotAdvance()) );
+ m_advanceTmr = new TQTimer(this);
+ connect( m_advanceTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvance()) );
m_advanceTmr->start(1);
}
@@ -51,7 +51,7 @@ RigidBody::~RigidBody()
bool RigidBody::addMechanicsItem( MechanicsItem *item )
{
- if ( !item || m_mechanicsItemList.contains(item) )
+ if ( !item || m_mechanicsItemList.tqcontains(item) )
return false;
m_mechanicsItemList.append(item);
@@ -85,20 +85,20 @@ bool RigidBody::findOverallParent()
const MechanicsItemList::iterator end = m_mechanicsItemList.end();
for ( MechanicsItemList::iterator it = m_mechanicsItemList.begin(); it != end; ++it )
{
- MechanicsItem *parentItem = *it;
- MechanicsItem *parentCandidate = dynamic_cast<MechanicsItem*>((*it)->parentItem());
+ MechanicsItem *tqparentItem = *it;
+ MechanicsItem *tqparentCandidate = dynamic_cast<MechanicsItem*>((*it)->tqparentItem());
- while (parentCandidate)
+ while (tqparentCandidate)
{
- parentItem = parentCandidate;
- parentCandidate = dynamic_cast<MechanicsItem*>(parentItem->parentItem());
+ tqparentItem = tqparentCandidate;
+ tqparentCandidate = dynamic_cast<MechanicsItem*>(tqparentItem->tqparentItem());
}
if ( !p_overallParent )
// Must be the first item to test
- p_overallParent = parentItem;
+ p_overallParent = tqparentItem;
- if ( p_overallParent != parentItem )
+ if ( p_overallParent != tqparentItem )
{
p_overallParent = 0l;
return false;
diff --git a/src/mechanics/mechanicssimulation.h b/src/mechanics/mechanicssimulation.h
index 19b474b..9a82d91 100644
--- a/src/mechanics/mechanicssimulation.h
+++ b/src/mechanics/mechanicssimulation.h
@@ -11,13 +11,13 @@
#ifndef MECHANICSSIMULATION_H
#define MECHANICSSIMULATION_H
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class MechanicsItem;
class MechanicsDocument;
-typedef QValueList<MechanicsItem*> MechanicsItemList;
+typedef TQValueList<MechanicsItem*> MechanicsItemList;
/**
@@ -55,9 +55,10 @@ public:
/**
@author David Saxton
*/
-class MechanicsSimulation : public QObject
+class MechanicsSimulation : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
MechanicsSimulation( MechanicsDocument *mechanicsDocument );
~MechanicsSimulation();
@@ -68,15 +69,15 @@ protected slots:
void slotAdvance();
protected:
- QGuardedPtr<MechanicsDocument> p_mechanicsDocument;
- QTimer *m_advanceTmr;
+ TQGuardedPtr<MechanicsDocument> p_mechanicsDocument;
+ TQTimer *m_advanceTmr;
};
/**
Rigid body with mass, inertia, etc. Collection of mechanics items with
-functionality for moving them about, rotating, etc. Only one mother-parent
-(has no parent itself, all other items are descendents) allowed.
+functionality for moving them about, rotating, etc. Only one mother-tqparent
+(has no tqparent itself, all other items are descendents) allowed.
@short Rigid body, handles MechanicsItems
@author David Saxton
*/
@@ -106,7 +107,7 @@ public:
protected:
/**
- * Attempt to find the overall parent.
+ * Attempt to find the overall tqparent.
* @returns false iff unsucessful (including if there are no MechanicsItems present)
*/
bool findOverallParent();
diff --git a/src/mechanics/mechanicsview.cpp b/src/mechanics/mechanicsview.cpp
index d49c66a..2694b17 100644
--- a/src/mechanics/mechanicsview.cpp
+++ b/src/mechanics/mechanicsview.cpp
@@ -30,7 +30,7 @@ MechanicsView::~MechanicsView()
-void MechanicsView::dragEnterEvent( QDragEnterEvent * e )
+void MechanicsView::dragEnterEvent( TQDragEnterEvent * e )
{
ItemView::dragEnterEvent(e);
if ( e->isAccepted() )
diff --git a/src/mechanics/mechanicsview.h b/src/mechanics/mechanicsview.h
index f787b1c..cba03f6 100644
--- a/src/mechanics/mechanicsview.h
+++ b/src/mechanics/mechanicsview.h
@@ -21,12 +21,13 @@ class MechanicsDocument;
class MechanicsView : public ItemView
{
Q_OBJECT
+ TQ_OBJECT
public:
MechanicsView( MechanicsDocument *mechanicsDocument, ViewContainer *viewContainer, uint viewAreaId, const char *name = 0l );
~MechanicsView();
protected:
- virtual void dragEnterEvent( QDragEnterEvent * e );
+ virtual void dragEnterEvent( TQDragEnterEvent * e );
MechanicsDocument *m_pMechanicsDocument;
};
diff --git a/src/micro/asminfo.cpp b/src/micro/asminfo.cpp
index 3a12b57..6006c63 100644
--- a/src/micro/asminfo.cpp
+++ b/src/micro/asminfo.cpp
@@ -22,7 +22,7 @@ AsmInfo::~AsmInfo()
}
-void AsmInfo::addInstruction( const QString & operand, const QString & description, const QString & opcode )
+void AsmInfo::addInstruction( const TQString & operand, const TQString & description, const TQString & opcode )
{
Instruction instruction;
instruction.operand = operand;
@@ -33,7 +33,7 @@ void AsmInfo::addInstruction( const QString & operand, const QString & descripti
}
-QString AsmInfo::setToString( Set set )
+TQString AsmInfo::setToString( Set set )
{
switch (set)
{
@@ -48,11 +48,11 @@ QString AsmInfo::setToString( Set set )
}
kdWarning() << k_funcinfo << "Unrecognized set="<<set<<endl;
- return QString::null;
+ return TQString();
}
-AsmInfo::Set AsmInfo::stringToSet( const QString & set )
+AsmInfo::Set AsmInfo::stringToSet( const TQString & set )
{
if ( set == "PIC12" )
return PIC12;
diff --git a/src/micro/asminfo.h b/src/micro/asminfo.h
index 2026b7d..c2bc0bf 100644
--- a/src/micro/asminfo.h
+++ b/src/micro/asminfo.h
@@ -11,20 +11,20 @@
#ifndef ASMINFO_H
#define ASMINFO_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
/**
@author David Saxton
*/
struct Instruction
{
- QString operand;
- QString description;
- QString opcode;
+ TQString operand;
+ TQString description;
+ TQString opcode;
};
-typedef QValueList<Instruction> InstructionList;
+typedef TQValueList<Instruction> InstructionList;
/**
@short Base class for all instruction sets
@@ -44,8 +44,8 @@ public:
};
enum { AsmSetAll = PIC12 | PIC14 | PIC16 };
- static QString setToString( Set set );
- static Set stringToSet( const QString & set );
+ static TQString setToString( Set set );
+ static Set stringToSet( const TQString & set );
/**
* @return the instruction set in use
@@ -54,18 +54,18 @@ public:
/**
* Returns a list of instruction operands (all uppercase).
*/
- QStringList operandList() const { return m_operandList; }
+ TQStringList operandList() const { return m_operandList; }
/**
* @param operand is the name of the instruction - eg 'addwf' or 'clrwdt'.
* @param description is instruction description - eg 'Add W and f'.
* @param opcode' is the 14-bit code for the instruction, eg
* '000111dfffffff'for addwf.
*/
- void addInstruction( const QString &operand, const QString &description, const QString &opcode );
+ void addInstruction( const TQString &operand, const TQString &description, const TQString &opcode );
private:
InstructionList m_instructionList;
- QStringList m_operandList;
+ TQStringList m_operandList;
};
#endif
diff --git a/src/micro/microinfo.cpp b/src/micro/microinfo.cpp
index b6d59a2..febf2af 100644
--- a/src/micro/microinfo.cpp
+++ b/src/micro/microinfo.cpp
@@ -23,19 +23,19 @@ MicroInfo::~MicroInfo()
}
#if 0
-QStringList MicroInfo::portNames()
+TQStringList MicroInfo::portNames()
{
if (m_package) return m_package->portNames();
else return "";
}
-QStringList MicroInfo::pinIDs()
+TQStringList MicroInfo::pinIDs()
{
if (m_package) return m_package->pinIDs();
else return "";
}
-QStringList MicroInfo::bidirPinIDs()
+TQStringList MicroInfo::bidirPinIDs()
{
if (m_package) return m_package->bidirPinIDs();
else return "";
@@ -53,7 +53,7 @@ int MicroInfo::numIOPins()
else return 0;
}
-int MicroInfo::numIOPins( const QString &portName )
+int MicroInfo::numIOPins( const TQString &portName )
{
if (m_package) return m_package->numIOPins(portName);
else return 0;
diff --git a/src/micro/microinfo.h b/src/micro/microinfo.h
index 7a22bf7..7aae10e 100644
--- a/src/micro/microinfo.h
+++ b/src/micro/microinfo.h
@@ -11,7 +11,7 @@
#ifndef MICROINFO_H
#define MICROINFO_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class AsmInfo;
class MicroPackage;
@@ -53,10 +53,10 @@ public:
/**
* Returns an id unique to the Micro
*/
- QString id() const { return m_id; }
+ TQString id() const { return m_id; }
protected:
- QString m_id;
+ TQString m_id;
MicroPackage *m_package;
};
diff --git a/src/micro/microlibrary.cpp b/src/micro/microlibrary.cpp
index f0faabc..2c0a4f0 100644
--- a/src/micro/microlibrary.cpp
+++ b/src/micro/microlibrary.cpp
@@ -79,7 +79,7 @@ MicroLibrary::~MicroLibrary()
}
}
-MicroInfo * const MicroLibrary::microInfoWithID( QString id )
+MicroInfo * const MicroLibrary::microInfoWithID( TQString id )
{
id = id.upper();
const MicroInfoList::iterator end = m_microInfoList.end();
@@ -97,9 +97,9 @@ void MicroLibrary::addMicroInfo( MicroInfo *microInfo )
m_microInfoList += microInfo;
}
-QStringList MicroLibrary::microIDs( unsigned asmSet, unsigned gpsimSupport, unsigned flowCodeSupport, unsigned microbeSupport )
+TQStringList MicroLibrary::microIDs( unsigned asmSet, unsigned gpsimSupport, unsigned flowCodeSupport, unsigned microbeSupport )
{
- QStringList ids;
+ TQStringList ids;
const MicroInfoList::iterator end = m_microInfoList.end();
for ( MicroInfoList::iterator it = m_microInfoList.begin(); it != end; ++it )
diff --git a/src/micro/microlibrary.h b/src/micro/microlibrary.h
index 537cf6c..0484ca0 100644
--- a/src/micro/microlibrary.h
+++ b/src/micro/microlibrary.h
@@ -14,13 +14,13 @@
#include "asminfo.h"
#include "microinfo.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class MicroInfo;
class MicroLibrary;
-typedef QValueList<MicroInfo*> MicroInfoList;
+typedef TQValueList<MicroInfo*> MicroInfoList;
inline MicroLibrary *microLibrary();
@@ -35,14 +35,14 @@ class MicroLibrary
~MicroLibrary();
- MicroInfo * const microInfoWithID( QString id );
+ MicroInfo * const microInfoWithID( TQString id );
void addMicroInfo( MicroInfo *microInfo );
/**
* Returns a list of micro ids with the given properties (OR'ed
* together).
*/
- QStringList microIDs( unsigned asmSet = AsmInfo::AsmSetAll, unsigned gpsimSupport = MicroInfo::AllSupport, unsigned flowCodeSupport = MicroInfo::AllSupport, unsigned microbeSupport = MicroInfo::AllSupport );
+ TQStringList microIDs( unsigned asmSet = AsmInfo::AsmSetAll, unsigned gpsimSupport = MicroInfo::AllSupport, unsigned flowCodeSupport = MicroInfo::AllSupport, unsigned microbeSupport = MicroInfo::AllSupport );
private:
MicroLibrary();
diff --git a/src/micro/micropackage.cpp b/src/micro/micropackage.cpp
index 9becbab..a5e8809 100644
--- a/src/micro/micropackage.cpp
+++ b/src/micro/micropackage.cpp
@@ -21,7 +21,7 @@ PicPin::PicPin()
}
-PicPin::PicPin( const QString &_pinID, PicPin::pin_type _type, const QString &_portName, int _portPosition )
+PicPin::PicPin( const TQString &_pinID, PicPin::pin_type _type, const TQString &_portName, int _portPosition )
{
pinID = _pinID;
type = _type;
@@ -38,14 +38,14 @@ MicroPackage::~MicroPackage()
{
}
-void MicroPackage::assignPin( int pinPosition, PicPin::pin_type type, const QString& pinID, const QString& portName, int portPosition )
+void MicroPackage::assignPin( int pinPosition, PicPin::pin_type type, const TQString& pinID, const TQString& portName, int portPosition )
{
- if ( m_picPinMap.find(pinPosition) != m_picPinMap.end() )
+ if ( m_picPinMap.tqfind(pinPosition) != m_picPinMap.end() )
{
kdError() << "PicDevice::assignBidirPin: Attempting to reset pin "<<pinPosition<<endl;
return;
}
- if ( !m_portNames.contains(portName) && !portName.isEmpty() )
+ if ( !m_portNames.tqcontains(portName) && !portName.isEmpty() )
{
m_portNames.append(portName);
m_portNames.sort();
@@ -55,7 +55,7 @@ void MicroPackage::assignPin( int pinPosition, PicPin::pin_type type, const QStr
}
-PicPinMap MicroPackage::pins( uint pinType, const QString& portName )
+PicPinMap MicroPackage::pins( uint pinType, const TQString& portName )
{
if ( pinType == 0 ) pinType = (1<<30)-1;
@@ -74,10 +74,10 @@ PicPinMap MicroPackage::pins( uint pinType, const QString& portName )
return list;
}
-QStringList MicroPackage::pinIDs( uint pinType, const QString& portName )
+TQStringList MicroPackage::pinIDs( uint pinType, const TQString& portName )
{
if ( pinType == 0 ) pinType = (1<<30)-1;
- QStringList list;
+ TQStringList list;
const PicPinMap::iterator picPinListEnd = m_picPinMap.end();
for ( PicPinMap::iterator it = m_picPinMap.begin(); it != picPinListEnd; ++it )
@@ -92,7 +92,7 @@ QStringList MicroPackage::pinIDs( uint pinType, const QString& portName )
return list;
}
-int MicroPackage::pinCount( uint pinType, const QString& portName )
+int MicroPackage::pinCount( uint pinType, const TQString& portName )
{
if ( pinType == 0 ) pinType = (1<<30)-1;
int count = 0;
diff --git a/src/micro/micropackage.h b/src/micro/micropackage.h
index 0dc98fe..11b9a09 100644
--- a/src/micro/micropackage.h
+++ b/src/micro/micropackage.h
@@ -11,10 +11,10 @@
#ifndef PICPACKAGES_H
#define PICPACKAGES_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
-#include <qmap.h>
+#include <tqmap.h>
/**
@author David Saxton
@@ -34,17 +34,17 @@ public:
};
PicPin();
- PicPin( const QString &_pinID, PicPin::pin_type _type, const QString &_portName = "", int _portPosition = -1 );
+ PicPin( const TQString &_pinID, PicPin::pin_type _type, const TQString &_portName = "", int _portPosition = -1 );
PicPin::pin_type type;
- QString pinID; // Id of pin, eg 'MCLR'
+ TQString pinID; // Id of pin, eg 'MCLR'
// For bidir (io) pins
- QString portName; // Name of port, eg 'PORTA'
+ TQString portName; // Name of port, eg 'PORTA'
int portPosition; // Position in port
};
-typedef QMap<int, PicPin> PicPinMap;
+typedef TQMap<int, PicPin> PicPinMap;
/**
@short Describes the PIC package (i.e. pins)
@@ -59,30 +59,30 @@ public:
/**
* Assigns a pin to a position in the package.
*/
- void assignPin( int pinPosition, PicPin::pin_type type, const QString& pinID, const QString& portName = "", int portPosition = -1);
+ void assignPin( int pinPosition, PicPin::pin_type type, const TQString& pinID, const TQString& portName = "", int portPosition = -1);
/**
* Returns the pins of the given type(s). If portName is not specified, all pins will be returned;
* not just those belonging to a given port. pin_type's can be OR'ed together
* e.g. pins( PicPin::type_input | PicPin::type_bidir, "PORTA" ) will return all bidirectional or
* input pins belonging to PORTA. If pinType is 0, then this will return all pins
*/
- PicPinMap pins( uint pinType = 0, const QString& portName = "" );
+ PicPinMap pins( uint pinType = 0, const TQString& portName = "" );
/**
- * Returns just a QStringList of the pin ids.
- * @see pins( uint pinType, const QString& portName )
+ * Returns just a TQStringList of the pin ids.
+ * @see pins( uint pinType, const TQString& portName )
*/
- QStringList pinIDs( uint pinType = 0, const QString& portName = "" );
+ TQStringList pinIDs( uint pinType = 0, const TQString& portName = "" );
/**
* Returns the number of pins of the given type(s) (which can be OR'ed together), with the given
* port name if specified, while avoiding the construction of a new PicPinMap. if pinType is 0,
* then all pin types are considered
* @see pins
*/
- int pinCount( uint pinType = 0, const QString& portName = "" );
+ int pinCount( uint pinType = 0, const TQString& portName = "" );
/**
* Returns a list of port names, eg 'PORTA', 'PORTB' for the package
*/
- QStringList portNames() const { return m_portNames; }
+ TQStringList portNames() const { return m_portNames; }
/**
* Returns the number of ports
*/
@@ -90,7 +90,7 @@ public:
private:
PicPinMap m_picPinMap;
- QStringList m_portNames;
+ TQStringList m_portNames;
int m_numPins;
};
diff --git a/src/microsettings.cpp b/src/microsettings.cpp
index 4554dc9..6790582 100644
--- a/src/microsettings.cpp
+++ b/src/microsettings.cpp
@@ -18,20 +18,20 @@
VariableInfo::VariableInfo()
{
type = MicroSettings::vt_unknown;
- value = QVariant(0);
+ value = TQVariant(0);
initAtStart = false;
permanent = false;
}
-void VariableInfo::setValue( const QVariant & _value )
+void VariableInfo::setValue( const TQVariant & _value )
{
value = _value;
}
-QString VariableInfo::valueAsString() const
+TQString VariableInfo::valueAsString() const
{
- if ( value.canCast(QVariant::String) ) return value.toString();
- if ( value.canCast(QVariant::Int) ) return QString::number(value.toInt());
+ if ( value.canCast(TQVariant::String) ) return value.toString();
+ if ( value.canCast(TQVariant::Int) ) return TQString::number(value.toInt());
return "0";
}
//END class VariableInfo
@@ -40,14 +40,14 @@ QString VariableInfo::valueAsString() const
//BEGIN class PinSettings
PinSettings::PinSettings()
- : QObject()
+ : TQObject()
{
m_type = PinSettings::pt_input;
m_state = PinSettings::ps_off;
m_id = "pin";
}
-PinSettings::PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const QString &id, const QString &port )
+PinSettings::PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const TQString &id, const TQString &port )
{
m_type = _type;
m_state = _state;
@@ -81,12 +81,12 @@ MicroSettings::MicroSettings( MicroInfo * microInfo )
{
_microInfo = microInfo;
- QStringList portNames = _microInfo->package()->portNames();
- const QStringList::iterator portNamesEnd = portNames.end();
- for ( QStringList::iterator it = portNames.begin(); it != portNamesEnd; ++it )
+ TQStringList portNames = _microInfo->package()->portNames();
+ const TQStringList::iterator portNamesEnd = portNames.end();
+ for ( TQStringList::iterator it = portNames.begin(); it != portNamesEnd; ++it )
{
PinSettingsList portPins;
- QStringList pinIDs;
+ TQStringList pinIDs;
pinIDs = _microInfo->package()->pinIDs( PicPin::type_bidir | PicPin::type_open, *it );
pinIDs.sort();
const int numPins = pinIDs.size();
@@ -110,13 +110,13 @@ MicroSettings::~MicroSettings()
// delete m_variableList;
}
-void MicroSettings::setPinType( const QString &id, PinSettings::pin_type type )
+void MicroSettings::setPinType( const TQString &id, PinSettings::pin_type type )
{
PinSettings *pin = pinWithID(id);
if (pin) pin->setType(type);
}
-void MicroSettings::setPinState( const QString &id, PinSettings::pin_state state )
+void MicroSettings::setPinState( const TQString &id, PinSettings::pin_state state )
{
PinSettings *pin = pinWithID(id);
if (pin)
@@ -124,7 +124,7 @@ void MicroSettings::setPinState( const QString &id, PinSettings::pin_state state
}
-PinSettings* MicroSettings::pinWithID( const QString &id )
+PinSettings* MicroSettings::pinWithID( const TQString &id )
{
const PinSettingsList::iterator pinListEnd = m_pinSettingsList.end();
for ( PinSettingsList::iterator it = m_pinSettingsList.begin(); it != pinListEnd; ++it )
@@ -134,9 +134,9 @@ PinSettings* MicroSettings::pinWithID( const QString &id )
return 0L;
}
-int MicroSettings::portState( const QString &port )
+int MicroSettings::portState( const TQString &port )
{
- if ( microInfo()->package()->portNames().findIndex(port) == -1 ) return -1;
+ if ( microInfo()->package()->portNames().tqfindIndex(port) == -1 ) return -1;
int pinPower = 1;
int num = 0;
@@ -155,9 +155,9 @@ int MicroSettings::portState( const QString &port )
return num;
}
-int MicroSettings::portType( const QString &port )
+int MicroSettings::portType( const TQString &port )
{
- if ( microInfo()->package()->portNames().findIndex(port) == -1 ) return -1;
+ if ( microInfo()->package()->portNames().tqfindIndex(port) == -1 ) return -1;
int pinPower = 1;
int num = 0;
@@ -175,9 +175,9 @@ int MicroSettings::portType( const QString &port )
return num;
}
-void MicroSettings::setPortState( const QString &port, int state )
+void MicroSettings::setPortState( const TQString &port, int state )
{
- PortList::iterator plit = m_ports.find(port);
+ PortList::iterator plit = m_ports.tqfind(port);
if ( plit == m_ports.end() ) return;
const PinSettingsList::iterator plitEnd = plit.data().end();
@@ -190,9 +190,9 @@ void MicroSettings::setPortState( const QString &port, int state )
}
}
-void MicroSettings::setPortType( const QString &port, int type )
+void MicroSettings::setPortType( const TQString &port, int type )
{
- PortList::iterator plit = m_ports.find(port);
+ PortList::iterator plit = m_ports.tqfind(port);
if ( plit == m_ports.end() ) return;
const PinSettingsList::iterator plitEnd = plit.data().end();
@@ -243,18 +243,18 @@ void MicroSettings::restoreFromMicroData( const MicroData &microData )
}
}
- const QStringMap::const_iterator variableMapEnd = microData.variableMap.end();
- for ( QStringMap::const_iterator it = microData.variableMap.begin(); it != variableMapEnd; ++it )
+ const TQStringMap::const_iterator variableMapEnd = microData.variableMap.end();
+ for ( TQStringMap::const_iterator it = microData.variableMap.begin(); it != variableMapEnd; ++it )
{
setVariable( it.key(), it.data(), true );
}
}
-void MicroSettings::setVariable( const QString &name, QVariant value, bool permanent )
+void MicroSettings::setVariable( const TQString &name, TQVariant value, bool permanent )
{
if ( name.isNull() ) return;
- VariableMap::iterator it = m_variableMap.find(name);
+ VariableMap::iterator it = m_variableMap.tqfind(name);
if ( it != m_variableMap.end() )
{
it.data().setValue(value);
@@ -272,9 +272,9 @@ void MicroSettings::setVariable( const QString &name, QVariant value, bool perma
}
-QStringList MicroSettings::variableNames()
+TQStringList MicroSettings::variableNames()
{
- QStringList list;
+ TQStringList list;
const VariableMap::iterator variableMapEnd = m_variableMap.end();
for ( VariableMap::iterator it = m_variableMap.begin(); it != variableMapEnd; ++it )
{
@@ -284,10 +284,10 @@ QStringList MicroSettings::variableNames()
}
-VariableInfo* MicroSettings::variableInfo( const QString &name )
+VariableInfo* MicroSettings::variableInfo( const TQString &name )
{
if ( name.isNull() ) return 0l;
- VariableMap::iterator it = m_variableMap.find(name);
+ VariableMap::iterator it = m_variableMap.tqfind(name);
if ( it != m_variableMap.end() ) {
return &(it.data());
} else {
@@ -296,10 +296,10 @@ VariableInfo* MicroSettings::variableInfo( const QString &name )
}
-bool MicroSettings::deleteVariable( const QString &name )
+bool MicroSettings::deleteVariable( const TQString &name )
{
if ( name.isNull() ) return false;
- VariableMap::iterator it = m_variableMap.find(name);
+ VariableMap::iterator it = m_variableMap.tqfind(name);
if ( it != m_variableMap.end() )
{
m_variableMap.erase(it);
@@ -316,7 +316,7 @@ void MicroSettings::removeAllVariables()
}
-PinMapping MicroSettings::pinMapping( const QString & id ) const
+PinMapping MicroSettings::pinMapping( const TQString & id ) const
{
return m_pinMappings[id];
}
diff --git a/src/microsettings.h b/src/microsettings.h
index d960f10..5832e76 100644
--- a/src/microsettings.h
+++ b/src/microsettings.h
@@ -11,11 +11,11 @@
#ifndef MICROSETTINGS_H
#define MICROSETTINGS_H
-#include <qobject.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqvariant.h>
-class QString;
-class QVariant;
+class TQString;
+class TQVariant;
class MicroData;
class MicroInfo;
@@ -25,13 +25,13 @@ public:
VariableInfo();
// Returns the value as a string
- QString valueAsString() const;
+ TQString valueAsString() const;
// MicroSettings::VariableType (don't rely on this just yet...)
int type;
// Sets the value
- void setValue( const QVariant & value );
+ void setValue( const TQVariant & value );
// If true, the variable will be initialised at the start of the FlowCode
// to the given value
@@ -42,20 +42,21 @@ public:
bool permanent;
private:
- QVariant value;
+ TQVariant value;
};
-typedef QMap< QString, VariableInfo > VariableMap; // Variable name, variable info
+typedef TQMap< TQString, VariableInfo > VariableMap; // Variable name, variable info
/**
@short Stores pic pin settings - type/state
@author David Saxton
*/
-class PinSettings : public QObject
+class PinSettings : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum pin_type
{
@@ -70,12 +71,12 @@ class PinSettings : public QObject
};
PinSettings();
- PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const QString &id, const QString &port );
+ PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const TQString &id, const TQString &port );
PinSettings::pin_type type() const { return m_type; }
PinSettings::pin_state state() const { return m_state; }
- QString id() const { return m_id; }
- QString port() const { return m_port; }
+ TQString id() const { return m_id; }
+ TQString port() const { return m_port; }
void setType( PinSettings::pin_type type );
void setState( PinSettings::pin_state state );
@@ -89,14 +90,14 @@ class PinSettings : public QObject
private:
PinSettings::pin_type m_type;
PinSettings::pin_state m_state;
- QString m_id;
- QString m_port;
+ TQString m_id;
+ TQString m_port;
};
-typedef QValueList<PinSettings*> PinSettingsList;
+typedef TQValueList<PinSettings*> PinSettingsList;
class PinMapping;
-typedef QMap< QString, PinMapping > PinMappingMap;
-typedef QMap< QString, PinSettingsList > PortList;
+typedef TQMap< TQString, PinMapping > PinMappingMap;
+typedef TQMap< TQString, PinSettingsList > PortList;
/**
This class stores PIC settings that are specific to the PIC program being devloped.
@@ -106,9 +107,10 @@ This is different from PIC info, which includes stuff such as PIC pin names
@short Stores Pic settings - pin settings
@author David Saxton
*/
-class MicroSettings : public QObject
+class MicroSettings : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum VariableType
{
@@ -131,55 +133,55 @@ public:
/**
* Set the pin with the given id to the given initial type (input/output)
*/
- void setPinType( const QString &id, PinSettings::pin_type type );
+ void setPinType( const TQString &id, PinSettings::pin_type type );
/**
* Set the pin with the given id to the given initial state (on/off)
*/
- void setPinState( const QString &id, PinSettings::pin_state state );
+ void setPinState( const TQString &id, PinSettings::pin_state state );
/**
* Returns a pointer to the PinSettings for the pin with the given id,
* or null if no such pin exists.
*/
- PinSettings* pinWithID( const QString &id );
+ PinSettings* pinWithID( const TQString &id );
/**
* Returns the initial port state (on/off) for the given port.
* Each pin state occupies one bit of the returned integer.
*/
- int portState( const QString &port );
+ int portState( const TQString &port );
/**
* Sets the port with the given name to the given state
*/
- void setPortState( const QString &port, int state );
+ void setPortState( const TQString &port, int state );
/**
* Sets the port with the given name to the given type
*/
- void setPortType( const QString &port, int type );
+ void setPortType( const TQString &port, int type );
/**
* Returns the initial port type (intput/output) for the given port.
* Each pin type occupies one bit of the returned integer.
*/
- int portType( const QString &port );
+ int portType( const TQString &port );
/**
* Sets the variable "name" to the initial value "value. If the variable
* already exists, its value will be changed. Else, the variable will be
* created.
*/
- void setVariable( const QString &name, QVariant value, bool permanent = true );
+ void setVariable( const TQString &name, TQVariant value, bool permanent = true );
/**
- * Returns the list of initial variables as a QStringList, just the names
+ * Returns the list of initial variables as a TQStringList, just the names
* without the values. Generated from the VariableMap m_variables.
*/
- QStringList variableNames();
+ TQStringList variableNames();
/**
* Returns a pointer to the variable info with the given name, or NULL
* if the variable is not found
*/
- VariableInfo *variableInfo( const QString &name );
+ VariableInfo *variableInfo( const TQString &name );
/**
* Deletes the variable with the given name, returns true if successul
* (i.e. a variable with that name existed), or false if not
*/
- bool deleteVariable( const QString &name );
+ bool deleteVariable( const TQString &name );
/**
* Removes all variables
*/
@@ -191,7 +193,7 @@ public:
/**
* Returns the pic pin mapping with the given id.
*/
- PinMapping pinMapping( const QString & id ) const;
+ PinMapping pinMapping( const TQString & id ) const;
/**
* Returns the list of different Pin Mappings;
*/
diff --git a/src/node.cpp b/src/node.cpp
index 9a3531d..68002a2 100644
--- a/src/node.cpp
+++ b/src/node.cpp
@@ -16,10 +16,10 @@
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
-Node::Node( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const QPoint &pos, QString *id )
- : QObject(), QCanvasPolygon( icnDocument->canvas() )
+Node::Node( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const TQPoint &pos, TQString *id )
+ : TQObject(), TQCanvasPolygon( icnDocument->canvas() )
{
p_nodeGroup = 0l;
p_parentItem = 0L;
@@ -28,7 +28,7 @@ Node::Node( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const
m_type = type;
p_icnDocument = icnDocument;
m_level = 0;
- m_selectedColor = QColor( 101, 134, 192 );
+ m_selectedColor = TQColor( 101, 134, 192 );
if (id)
{
@@ -36,12 +36,12 @@ Node::Node( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const
if ( !p_icnDocument->registerUID(*id) )
kdError() << k_funcinfo << "Could not register id " << *id << endl;
}
- else m_id = p_icnDocument->generateUID("node"+QString::number(type));
+ else m_id = p_icnDocument->generateUID("node"+TQString::number(type));
initPoints();
move( pos.x(), pos.y() );
- setBrush( Qt::black );
- setPen( Qt::black );
+ setBrush( TQt::black );
+ setPen( TQt::black );
show();
emit (moved(this));
@@ -83,7 +83,7 @@ void Node::setVisible( bool yes )
if ( isVisible() == yes )
return;
- QCanvasPolygon::setVisible(yes);
+ TQCanvasPolygon::tqsetVisible(yes);
const ConnectorList::iterator inputEnd = m_inputConnectorList.end();
for ( ConnectorList::iterator it = m_inputConnectorList.begin(); it != inputEnd; ++it )
@@ -130,7 +130,7 @@ bool Node::isConnected( Node *node, NodeList *checkedNodes )
if (firstNode)
checkedNodes = new NodeList();
- else if ( checkedNodes->contains(this) )
+ else if ( checkedNodes->tqcontains(this) )
return false;
@@ -199,20 +199,20 @@ void Node::initPoints()
{
if ( type() == ec_junction )
{
- setPoints( QPointArray( QRect( -4, -4, 8, 8 ) ) );
+ setPoints( TQPointArray( TQRect( -4, -4, 8, 8 ) ) );
return;
}
if ( type() == fp_junction )
{
- setPoints( QPointArray( QRect( -4, -4, 9, 9 ) ) );
+ setPoints( TQPointArray( TQRect( -4, -4, 9, 9 ) ) );
return;
}
const int length = ( type() == ec_pin ) ? 8 : -8;
// Bounding rectangle, facing right
- QPointArray pa( QRect( 0, -8, length, 16 ) );
+ TQPointArray pa( TQRect( 0, -8, length, 16 ) );
double angle;
if ( m_dir == Node::dir_up ) angle = -90.;
@@ -225,14 +225,14 @@ void Node::initPoints()
return;
}
- QWMatrix m;
+ TQWMatrix m;
m.rotate(angle);
pa = m.map(pa);
setPoints(pa);
}
-QPoint Node::findConnectorDivergePoint( bool * found )
+TQPoint Node::findConnectorDivergePoint( bool * found )
{
bool temp;
if (!found)
@@ -240,10 +240,10 @@ QPoint Node::findConnectorDivergePoint( bool * found )
*found = false;
if ( numCon( false, false ) != 2 )
- return QPoint(0,0);
+ return TQPoint(0,0);
- QPointList p1;
- QPointList p2;
+ TQPointList p1;
+ TQPointList p2;
int inSize = m_inputConnectorList.count();
@@ -270,7 +270,7 @@ QPoint Node::findConnectorDivergePoint( bool * found )
}
}
if ( !gotP1 || !gotP2 )
- return QPoint(0,0);
+ return TQPoint(0,0);
unsigned maxLength = p1.size() > p2.size() ? p1.size() : p2.size();
@@ -282,24 +282,24 @@ QPoint Node::findConnectorDivergePoint( bool * found )
return p1[i-1];
}
}
- return QPoint(0, 0);
+ return TQPoint(0, 0);
}
-void Node::setParentItem( CNItem *parentItem )
+void Node::setParentItem( CNItem *tqparentItem )
{
- if (!parentItem)
+ if (!tqparentItem)
{
- kdError() << k_funcinfo << "no parent item" << endl;
+ kdError() << k_funcinfo << "no tqparent item" << endl;
return;
}
- p_parentItem = parentItem;
+ p_parentItem = tqparentItem;
setLevel(p_parentItem->level());
- connect( p_parentItem, SIGNAL(movedBy(double, double )), this, SLOT(moveBy(double, double)) );
- connect( p_parentItem, SIGNAL(removed(Item*)), this, SLOT(removeNode(Item*)) );
+ connect( p_parentItem, TQT_SIGNAL(movedBy(double, double )), this, TQT_SLOT(moveBy(double, double)) );
+ connect( p_parentItem, TQT_SIGNAL(removed(Item*)), this, TQT_SLOT(removeNode(Item*)) );
}
@@ -317,7 +317,7 @@ void Node::removeNode()
void Node::moveBy( double dx, double dy )
{
if ( dx == 0 && dy == 0 ) return;
- QCanvasPolygon::moveBy( dx, dy );
+ TQCanvasPolygon::moveBy( dx, dy );
emit moved(this);
}
@@ -387,15 +387,15 @@ bool Node::handleNewConnector( Connector * connector )
if (!connector)
return false;
- if ( m_inputConnectorList.contains(connector) || m_outputConnectorList.contains(connector) )
+ if ( m_inputConnectorList.tqcontains(connector) || m_outputConnectorList.tqcontains(connector) )
{
kdWarning() << k_funcinfo << " Already have connector = " << connector << endl;
return false;
}
- connect( this, SIGNAL(removed(Node*)), connector, SLOT(removeConnector(Node*)) );
- connect( connector, SIGNAL(removed(Connector*)), this, SLOT(checkForRemoval(Connector*)) );
- connect( connector, SIGNAL(selected(bool)), this, SLOT(setNodeSelected(bool)) );
+ connect( this, TQT_SIGNAL(removed(Node*)), connector, TQT_SLOT(removeConnector(Node*)) );
+ connect( connector, TQT_SIGNAL(removed(Connector*)), this, TQT_SLOT(checkForRemoval(Connector*)) );
+ connect( connector, TQT_SIGNAL(selected(bool)), this, TQT_SLOT(setNodeSelected(bool)) );
if ( !isChildNode() )
p_icnDocument->slotRequestAssignNG();
@@ -423,14 +423,14 @@ void Node::removeConnector( Connector *connector )
ConnectorList::iterator it;
- it = m_inputConnectorList.find(connector);
+ it = m_inputConnectorList.tqfind(connector);
if ( it != m_inputConnectorList.end() )
{
(*it)->removeConnector();
(*it) = 0L;
}
- it = m_outputConnectorList.find(connector);
+ it = m_outputConnectorList.tqfind(connector);
if ( it != m_outputConnectorList.end() )
{
(*it)->removeConnector();
@@ -477,10 +477,10 @@ void Node::setNodeSelected( bool yes )
if ( isSelected() == yes )
return;
- QCanvasItem::setSelected(yes);
+ TQCanvasItem::setSelected(yes);
- setPen( yes ? m_selectedColor : Qt::black );
- setBrush( yes ? m_selectedColor : Qt::black );
+ setPen( yes ? m_selectedColor : TQt::black );
+ setBrush( yes ? m_selectedColor : TQt::black );
}
#include "node.moc"
diff --git a/src/node.h b/src/node.h
index 9f440b3..f3bdfef 100644
--- a/src/node.h
+++ b/src/node.h
@@ -11,8 +11,8 @@
#ifndef NODE_H
#define NODE_H
-#include <qcanvas.h>
-#include <qguardedptr.h>
+#include <tqcanvas.h>
+#include <tqguardedptr.h>
class CNItem;
class Item;
@@ -22,18 +22,19 @@ class Connector;
class Node;
class NodeData;
class NodeGroup;
-class QTimer;
+class TQTimer;
-typedef QValueList<QGuardedPtr<Connector> > ConnectorList;
-typedef QValueList<QGuardedPtr<Node> > NodeList;
+typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<TQGuardedPtr<Node> > NodeList;
/**
@short A standard node that can be associated with a Connector or a CNItem
@author David Saxton
*/
-class Node : public QObject, public QCanvasPolygon
+class Node : public TQObject, public TQCanvasPolygon
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Used for run-time identification of the node:
@@ -56,7 +57,7 @@ public:
dir_down = 90,
dir_left = 180
};
- Node( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const QPoint &pos, QString *id = 0L );
+ Node( ICNDocument *icnDocument, Node::node_type type, node_dir dir, const TQPoint &pos, TQString *id = 0L );
virtual ~Node();
/**
@@ -68,17 +69,17 @@ public:
* Returns the global id, that is unique to the node
* amongst all the nodes on the canvas
*/
- const QString id() const { return m_id; }
+ const TQString id() const { return m_id; }
/**
* Returns the id that is internal to the CNItem to which the
- * node belongs to. Returns a null QString if no parentitem
+ * node belongs to. Returns a null TQString if no tqparentitem
*/
- const QString childId() const { return m_childId; }
+ const TQString childId() const { return m_childId; }
/**
* Use this function to set the child-id, that is unique to the node
- * amongst the other nodes associated with its parent CNItem
+ * amongst the other nodes associated with its tqparent CNItem
*/
- void setChildId( const QString &id ) { m_childId = id; }
+ void setChildId( const TQString &id ) { m_childId = id; }
/**
* Returns the run-time-type-identifier of ICNDocument::RTTI::Node
*/
@@ -117,7 +118,7 @@ public:
* Associates a CNItem with the node - ie the node belongs to the CNItem,
* and hence gets deleted when the CNItem gets deleted.s
*/
- virtual void setParentItem( CNItem *parentItem );
+ virtual void setParentItem( CNItem *tqparentItem );
/**
* Returns true if the node is part of a CNItem
* (i.e. not between multiple connectors)
@@ -127,7 +128,7 @@ public:
* Returns a pointer to the CNItem to which the node belongs,
* or Null if it doesn't.
*/
- CNItem *parentItem() const { return p_parentItem; }
+ CNItem *tqparentItem() const { return p_parentItem; }
/**
* Remove a specific connector
*/
@@ -150,9 +151,9 @@ public:
void addOutputConnector( Connector * const connector );
/**
* Returns the total number of connections to the node. This is the number
- * of input connectors, the number of output connectors, and the parent
+ * of input connectors, the number of output connectors, and the tqparent
* item connector if it exists and is requested.
- * @param includeParentItem Count the parent item as a connector if it exists
+ * @param includeParentItem Count the tqparent item as a connector if it exists
* @param includeHiddenConnectors hidden connectors are those as e.g. part of a subcircuit
*/
int numCon( bool includeParentItem, bool includeHiddenConnectors ) const;
@@ -176,9 +177,9 @@ public:
void removeNullConnectors();
/**
- * Draw shape. Note that this has to remain public.
+ * Draw tqshape. Note that this has to remain public.
*/
- virtual void drawShape( QPainter &p ) = 0;
+ virtual void drawShape( TQPainter &p ) = 0;
public slots:
void moveBy( double dx, double dy );
@@ -199,13 +200,13 @@ protected:
/** If this node has precisely two connectors emerging from it, then this
* function will trace thw two connectors until the point where they
* diverge; this point is returned. */
- QPoint findConnectorDivergePoint( bool * found );
+ TQPoint findConnectorDivergePoint( bool * found );
void initPoints();
bool handleNewConnector( Connector * newConnector );
node_type m_type;
- QString m_id;
- QString m_childId;
+ TQString m_id;
+ TQString m_childId;
node_dir m_dir;
ICNDocument *p_icnDocument;
CNItem *p_parentItem;
@@ -213,7 +214,7 @@ protected:
ConnectorList m_outputConnectorList;
int m_level;
NodeGroup *p_nodeGroup;
- QColor m_selectedColor;
+ TQColor m_selectedColor;
private:
bool b_deleted;
diff --git a/src/nodegroup.cpp b/src/nodegroup.cpp
index fe55293..903a20f 100644
--- a/src/nodegroup.cpp
+++ b/src/nodegroup.cpp
@@ -19,7 +19,7 @@
#include <cmath>
NodeGroup::NodeGroup( ICNDocument *icnDocument, const char *name )
- : QObject( icnDocument, name )
+ : TQObject( icnDocument, name )
{
p_icnDocument = icnDocument;
b_visible = true;
@@ -60,7 +60,7 @@ void NodeGroup::setVisible( bool visible )
void NodeGroup::addNode( Node *node, bool checkSurrouding )
{
- if ( !node || node->isChildNode() || m_nodeList.contains(node) ) {
+ if ( !node || node->isChildNode() || m_nodeList.tqcontains(node) ) {
return;
}
@@ -143,20 +143,20 @@ void NodeGroup::updateRoutes()
ConRouter cr(p_icnDocument);
cr.mapRoute( (int)n1->x(), (int)n1->y(), (int)n2->x(), (int)n2->y() );
- QPointListList pl = cr.dividePoints( route.size()+1 );
+ TQPointListList pl = cr.dividePoints( route.size()+1 );
const NodeList::iterator routeEnd = route.end();
- const QPointListList::iterator plEnd = pl.end();
+ const TQPointListList::iterator plEnd = pl.end();
Node *prev = n1;
NodeList::iterator routeIt = route.begin();
- for ( QPointListList::iterator it = pl.begin(); it != plEnd; ++it )
+ for ( TQPointListList::iterator it = pl.begin(); it != plEnd; ++it )
{
Node *next = (routeIt == routeEnd) ? n2 : (Node*)*(routeIt++);
removeRoutedNodes( &currentList, prev, next );
- QPointList pointList = *it;
+ TQPointList pointList = *it;
if ( prev != n1 )
{
- QPoint first = pointList.first();
+ TQPoint first = pointList.first();
prev->moveBy( first.x() - prev->x(), first.y() - prev->y() );
}
Connector *con = findCommonConnector( prev, next );
@@ -209,7 +209,7 @@ IntList NodeGroup::findRoute( IntList used, int currentNode, int endNode, bool *
}
*success = false;
- if ( !used.contains(currentNode) ) {
+ if ( !used.tqcontains(currentNode) ) {
used.append(currentNode);
}
@@ -221,7 +221,7 @@ IntList NodeGroup::findRoute( IntList used, int currentNode, int endNode, bool *
const uint n = m_nodeList.size()+m_extNodeList.size();
for ( uint i=0; i<n; ++i )
{
- if ( b_routedMap[i*n+currentNode] && !used.contains(i) )
+ if ( b_routedMap[i*n+currentNode] && !used.tqcontains(i) )
{
IntList il = findRoute( used, i, endNode, success );
if (*success) {
@@ -247,7 +247,7 @@ Connector* NodeGroup::findCommonConnector( Node *n1, Node *n2 )
const ConnectorList::iterator end = n1Con.end();
for ( ConnectorList::iterator it = n1Con.begin(); it != end; ++it )
{
- if ( n2Con.contains(*it) ) {
+ if ( n2Con.tqcontains(*it) ) {
return *it;
}
}
@@ -346,13 +346,13 @@ bool NodeGroup::canRoute( Node *n1, Node *n2 )
IntList reachable;
getReachable( &reachable, getNodePos(n1) );
- return reachable.contains(getNodePos(n2));
+ return reachable.tqcontains(getNodePos(n2));
}
void NodeGroup::getReachable( IntList *reachable, int node )
{
- if ( !reachable || reachable->contains(node) ) {
+ if ( !reachable || reachable->tqcontains(node) ) {
return;
}
reachable->append(node);
@@ -402,7 +402,7 @@ void NodeGroup::removeRoutedNodes( NodeList *nodes, Node *n1, Node *n2 )
const NodeList::iterator end = nodes->end();
for ( NodeList::iterator it = nodes->begin(); it != end; ++it )
{
- if ( nodes->contains(*it) > 1 ) {
+ if ( nodes->tqcontains(*it) > 1 ) {
*it = 0l;
}
}
@@ -442,11 +442,11 @@ int NodeGroup::getNodePos( Node *n )
if (!n) {
return -1;
}
- int pos = m_nodeList.findIndex(n);
+ int pos = m_nodeList.tqfindIndex(n);
if ( pos != -1 ) {
return pos;
}
- pos = m_extNodeList.findIndex(n);
+ pos = m_extNodeList.tqfindIndex(n);
if ( pos != -1 ) {
return pos+m_nodeList.size();
}
@@ -480,7 +480,7 @@ void NodeGroup::clearConList()
if (con)
{
con->setNodeGroup(0l);
- disconnect( con, SIGNAL(removed(Connector*)), this, SLOT(connectorRemoved(Connector*)) );
+ disconnect( con, TQT_SIGNAL(removed(Connector*)), this, TQT_SLOT(connectorRemoved(Connector*)) );
}
}
m_conList.clear();
@@ -511,11 +511,11 @@ void NodeGroup::init()
{
Connector *con = *conIt;
addExtNode(con->startNode());
- if ( !m_conList.contains(con) ) {
+ if ( !m_conList.tqcontains(con) ) {
m_conList += con;
con->setNodeGroup(this);
}
- connect( con, SIGNAL(removed(Connector*)), this, SLOT(connectorRemoved(Connector*)) );
+ connect( con, TQT_SIGNAL(removed(Connector*)), this, TQT_SLOT(connectorRemoved(Connector*)) );
}
conEnd = outCon.end();
@@ -523,23 +523,23 @@ void NodeGroup::init()
{
Connector *con = *conIt;
addExtNode(con->endNode());
- if ( !m_conList.contains(con) ) {
+ if ( !m_conList.tqcontains(con) ) {
m_conList += con;
con->setNodeGroup(this);
}
- connect( con, SIGNAL(removed(Connector*)), this, SLOT(connectorRemoved(Connector*)) );
+ connect( con, TQT_SIGNAL(removed(Connector*)), this, TQT_SLOT(connectorRemoved(Connector*)) );
}
// Connect the node up to us
- connect( *nodeIt, SIGNAL(removed(Node*)), this, SLOT(nodeRemoved(Node*)) );
+ connect( *nodeIt, TQT_SIGNAL(removed(Node*)), this, TQT_SLOT(nodeRemoved(Node*)) );
}
// And connect up our external nodes
xnEnd = m_extNodeList.end();
for ( NodeList::iterator it = m_extNodeList.begin(); it != xnEnd; ++it )
{
-// connect( *it, SIGNAL(moved(Node*)), this, SLOT(extNodeMoved()) );
- connect( *it, SIGNAL(removed(Node*)), this, SLOT(nodeRemoved(Node*)) );
+// connect( *it, TQT_SIGNAL(moved(Node*)), this, TQT_SLOT(extNodeMoved()) );
+ connect( *it, TQT_SIGNAL(removed(Node*)), this, TQT_SLOT(nodeRemoved(Node*)) );
}
}
@@ -562,7 +562,7 @@ void NodeGroup::connectorRemoved( Connector *connector )
void NodeGroup::addExtNode( Node *node )
{
- if ( !m_extNodeList.contains(node) && !m_nodeList.contains(node) )
+ if ( !m_extNodeList.tqcontains(node) && !m_nodeList.tqcontains(node) )
{
m_extNodeList.append(node);
node->setNodeGroup(this);
diff --git a/src/nodegroup.h b/src/nodegroup.h
index f3f49f8..acdd055 100644
--- a/src/nodegroup.h
+++ b/src/nodegroup.h
@@ -11,10 +11,10 @@
#ifndef NODEGROUP_H
#define NODEGROUP_H
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
class ICNDocument;
class Connector;
@@ -22,20 +22,21 @@ class ConRouter;
class Node;
class NodeGroup;
-class QTimer;
+class TQTimer;
-typedef QValueList<int> IntList;
-typedef QValueList<NodeGroup*> NodeGroupList;
-typedef QValueList<QGuardedPtr<Node> > NodeList;
+typedef TQValueList<int> IntList;
+typedef TQValueList<NodeGroup*> NodeGroupList;
+typedef TQValueList<TQGuardedPtr<Node> > NodeList;
/**
Controls a group of nodes who are not attached to any CNItems (poor things!)
along with their associated connectors.
@author David Saxton
*/
-class NodeGroup : public QObject
+class NodeGroup : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
NodeGroup( ICNDocument *icnDocument, const char *name = 0);
~NodeGroup();
@@ -65,7 +66,7 @@ public:
/**
* @returns true if node is an internal node to this group
*/
- bool contains( Node *node ) const { return m_nodeList.contains(node); }
+ bool tqcontains( Node *node ) const { return m_nodeList.tqcontains(node); }
/**
* Reroute the NodeGroup. This function should only ever be called by
* ICNDocument::rerouteInvalidatedConnectors(), as it is important that
@@ -111,7 +112,7 @@ protected:
NodeList m_nodeList;
NodeList m_extNodeList;
ICNDocument *p_icnDocument;
- QValueVector<bool> b_routedMap; // Routes between different nodes
+ TQValueVector<bool> b_routedMap; // Routes between different nodes
bool b_visible;
private:
diff --git a/src/oscilloscopedata.cpp b/src/oscilloscopedata.cpp
index cc1e289..9eaf2f1 100644
--- a/src/oscilloscopedata.cpp
+++ b/src/oscilloscopedata.cpp
@@ -17,7 +17,7 @@ ProbeData::ProbeData( int id )
{
m_resetTime = Simulator::self()->time();
// b_isPaused = false;
- m_color = Qt::black;
+ m_color = TQt::black;
m_drawPosition = 0.5;
m_insertPos = 0;
}
@@ -29,7 +29,7 @@ ProbeData::~ProbeData()
}
-void ProbeData::setColor( QColor color )
+void ProbeData::setColor( TQColor color )
{
m_color = color;
emit displayAttributeChanged();
diff --git a/src/oscilloscopedata.h b/src/oscilloscopedata.h
index cbabdac..c4b3bca 100644
--- a/src/oscilloscopedata.h
+++ b/src/oscilloscopedata.h
@@ -11,8 +11,8 @@
#ifndef OSCILLOSCOPEDATA_H
#define OSCILLOSCOPEDATA_H
-#include <qcolor.h>
-#include <qobject.h>
+#include <tqcolor.h>
+#include <tqobject.h>
typedef long long llong;
typedef unsigned long long ullong;
@@ -206,9 +206,11 @@ class StoredData
/**
@author David Saxton
*/
-class ProbeData : public QObject
+class ProbeData : public TQObject
{
- Q_OBJECT;
+ Q_OBJECT
+ TQ_OBJECT
+
public:
ProbeData( int id );
~ProbeData();
@@ -232,11 +234,11 @@ class ProbeData : public QObject
* Set the colour that is used to display the probe in the oscilloscope.
* Default is black.
*/
- void setColor( QColor color );
+ void setColor( TQColor color );
/**
* @returns the colour that is used to display the probe in the oscilloscope
*/
- QColor color() const { return m_color; }
+ TQColor color() const { return m_color; }
// /**
// * Will not record any data when paused
// */
@@ -275,7 +277,7 @@ class ProbeData : public QObject
ullong m_insertPos;
// bool b_isPaused;
ullong m_resetTime;
- QColor m_color;
+ TQColor m_color;
};
diff --git a/src/picitem.cpp b/src/picitem.cpp
index cbd7f1f..b5e0f03 100644
--- a/src/picitem.cpp
+++ b/src/picitem.cpp
@@ -19,7 +19,7 @@
#include <kdebug.h>
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
static const int InnerWidth = 88;
static const int SidePadding = 24;
@@ -33,16 +33,16 @@ static const int PinDirArrow = 3;
//BEGIN class PinItem
-PinItem::PinItem( FlowCodeDocument* _view, QPoint position, bool _onLeft, PinSettings * pinSettings )
- : QCanvasRectangle(0)
+PinItem::PinItem( FlowCodeDocument* _view, TQPoint position, bool _onLeft, PinSettings * pinSettings )
+ : TQCanvasRectangle(0)
{
m_pinSettings = pinSettings;
view = _view;
onLeft = _onLeft;
- connect( m_pinSettings, SIGNAL(settingsChanged()), this, SLOT(updateDrawing()) );
+ connect( m_pinSettings, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateDrawing()) );
- if ( QFontInfo(m_font).pixelSize() > 11 ) // It has to be > 11, not > 12, as (I think) pixelSize() rounds off the actual size
+ if ( TQFontInfo(m_font).pixelSize() > 11 ) // It has to be > 11, not > 12, as (I think) pixelSize() rounds off the actual size
m_font.setPixelSize(12);
setCanvas( view->canvas() );
@@ -69,13 +69,13 @@ void PinItem::initItem()
{
setSize( PinLength, PinWidth );
setSelected(false);
- setPen( Qt::black );
+ setPen( TQt::black );
calcTextRect();
show();
}
-void PinItem::drawShape( QPainter& p )
+void PinItem::drawShape( TQPainter& p )
{
if (!m_pinSettings)
return;
@@ -83,23 +83,23 @@ void PinItem::drawShape( QPainter& p )
if ( m_pinSettings->state() == PinSettings::ps_on )
{
if ( m_pinSettings->type() == PinSettings::pt_output )
- setBrush( QColor( 255, 127, 127 ) );
+ setBrush( TQColor( 255, 127, 127 ) );
else
- setBrush( QColor( 255, 191, 191 ) );
+ setBrush( TQColor( 255, 191, 191 ) );
}
else
- setBrush( Qt::white );
+ setBrush( TQt::white );
p.drawRect(rect());
p.setFont(m_font);
- p.setBrush( Qt::NoBrush );
- QRect r = m_textRect;
+ p.setBrush( TQt::NoBrush );
+ TQRect r = m_textRect;
if ( onLeft )
- p.drawText( r, Qt::AlignLeft, m_pinSettings->id() );
+ p.drawText( r, TQt::AlignLeft, m_pinSettings->id() );
else
- p.drawText( r, Qt::AlignRight, m_pinSettings->id() );
- QRect br = p.boundingRect( r, Qt::AlignLeft, m_pinSettings->id() );
+ p.drawText( r, TQt::AlignRight, m_pinSettings->id() );
+ TQRect br = p.boundingRect( r, TQt::AlignLeft, m_pinSettings->id() );
int left;
int right;
@@ -115,7 +115,7 @@ void PinItem::drawShape( QPainter& p )
}
int midY = (int)y() + PinWidth/2;
- QPointArray pa(3);
+ TQPointArray pa(3);
int midLeft = left + (8-PinDirArrow)/2;
int midRight = left + (8+PinDirArrow)/2;
@@ -130,32 +130,32 @@ void PinItem::drawShape( QPainter& p )
midRight++;
}
- p.setBrush( Qt::black );
+ p.setBrush( TQt::black );
// Right facing arrow
if ( (m_pinSettings->type() == PinSettings::pt_input && onLeft) ||
(m_pinSettings->type() == PinSettings::pt_output && !onLeft) )
{
- pa[0] = QPoint::QPoint( midRight, midY );
- pa[1] = QPoint::QPoint( midLeft, midY - PinDirArrow );
- pa[2] = QPoint::QPoint( midLeft, midY + PinDirArrow );
+ pa[0] = TQPoint::TQPoint( midRight, midY );
+ pa[1] = TQPoint::TQPoint( midLeft, midY - PinDirArrow );
+ pa[2] = TQPoint::TQPoint( midLeft, midY + PinDirArrow );
p.drawPolygon(pa);
p.drawLine ( left, midY, right, midY );
}
else // Left facing arrow
{
- pa[0] = QPoint::QPoint( midLeft, midY );
- pa[1] = QPoint::QPoint( midRight, midY - PinDirArrow );
- pa[2] = QPoint::QPoint( midRight, midY + PinDirArrow );
+ pa[0] = TQPoint::TQPoint( midLeft, midY );
+ pa[1] = TQPoint::TQPoint( midRight, midY - PinDirArrow );
+ pa[2] = TQPoint::TQPoint( midRight, midY + PinDirArrow );
p.drawPolygon(pa);
p.drawLine ( left, midY, right, midY );
}
}
-QRect PinItem::boundingRect () const
+TQRect PinItem::boundingRect () const
{
- QRect r = m_textRect;
+ TQRect r = m_textRect;
if ( onLeft )
r.setLeft( (int)x() - 10 );
else
@@ -165,7 +165,7 @@ QRect PinItem::boundingRect () const
}
-QString PinItem::id()
+TQString PinItem::id()
{
return m_pinSettings->id();
}
@@ -198,7 +198,7 @@ void PinItem::dragged( int dx )
void PinItem::moveBy ( double dx, double dy )
{
- QCanvasRectangle::moveBy( dx, dy );
+ TQCanvasRectangle::moveBy( dx, dy );
calcTextRect();
}
@@ -207,10 +207,10 @@ void PinItem::calcTextRect()
{
m_textRect = rect();
m_textRect.moveTop( m_textRect.top()-2 );
- QRect br;
+ TQRect br;
- QWidget tmpWidget;
- QPainter p(&tmpWidget);
+ TQWidget tmpWidget;
+ TQPainter p(&tmpWidget);
p.setFont(m_font);
@@ -223,13 +223,13 @@ void PinItem::calcTextRect()
{
m_textRect.setLeft( (int)x() + PinLength + 2 );
m_textRect.setRight( (int)x() + InnerWidth/2 );
- br = p.boundingRect( m_textRect, Qt::AlignLeft, m_pinSettings->id() );
+ br = p.boundingRect( m_textRect, TQt::AlignLeft, m_pinSettings->id() );
}
else
{
m_textRect.setLeft( m_textRect.right() - InnerWidth/2 );
m_textRect.setRight( (int)x() - 2 );
- br = p.boundingRect( m_textRect, Qt::AlignRight, m_pinSettings->id() );
+ br = p.boundingRect( m_textRect, TQt::AlignRight, m_pinSettings->id() );
}
}
//END class PinItem
@@ -253,33 +253,33 @@ PicItem::PicItem( ICNDocument *icnDocument, bool newItem, const char *id, MicroS
m_innerHeight = (numSide+2)*PinWidth + (numSide-1)*PinSeparation;
updateVisibility();
- addButton( "settings", QRect( SidePadding-8, m_innerHeight+TopPadding+(BottomPadding-24)/2-1, InnerWidth+16, 24 ), i18n("Advanced...") );
- addButton( "expandBtn", QRect( (TopPadding-22)/2, (TopPadding-22)/2, 22, 22 ), KGlobal::iconLoader()->loadIcon( "down", KIcon::Small ), true );
+ addButton( "settings", TQRect( SidePadding-8, m_innerHeight+TopPadding+(BottomPadding-24)/2-1, InnerWidth+16, 24 ), i18n("Advanced...") );
+ addButton( "expandBtn", TQRect( (TopPadding-22)/2, (TopPadding-22)/2, 22, 22 ), KGlobal::iconLoader()->loadIcon( "down", KIcon::Small ), true );
button("expandBtn")->setState(true);
move( 12, 12 );
- QStringList pinIDs = microSettings->microInfo()->package()->pinIDs( PicPin::type_bidir | PicPin::type_input | PicPin::type_open );
- QStringList::iterator it = pinIDs.begin();
+ TQStringList pinIDs = microSettings->microInfo()->package()->pinIDs( PicPin::type_bidir | PicPin::type_input | PicPin::type_open );
+ TQStringList::iterator it = pinIDs.begin();
for ( int i=0; i < numSide; ++i, ++it )
{
- QPoint position( int(this->x()) + SidePadding - PinLength+1, int(y()) + TopPadding + (i+1)*PinWidth + i*PinSeparation );
- const QString id = *it;
+ TQPoint position( int(this->x()) + SidePadding - PinLength+1, int(y()) + TopPadding + (i+1)*PinWidth + i*PinSeparation );
+ const TQString id = *it;
PinSettings *settings = microSettings->pinWithID(id);
m_pinItemList.append( new PinItem( dynamic_cast<FlowCodeDocument*>(icnDocument), position, true, settings ) );
}
for ( int i=0; i < numPins/2; ++i, ++it )
{
- QPoint position( int(this->x()) + SidePadding + InnerWidth-1, int(y()) + TopPadding + m_innerHeight - ( (i+2)*PinWidth + i*PinSeparation ) );
- const QString id = *it;
+ TQPoint position( int(this->x()) + SidePadding + InnerWidth-1, int(y()) + TopPadding + m_innerHeight - ( (i+2)*PinWidth + i*PinSeparation ) );
+ const TQString id = *it;
PinSettings *settings = microSettings->pinWithID(id);
m_pinItemList.append( new PinItem( dynamic_cast<FlowCodeDocument*>(icnDocument), position, false, settings ) );
}
setSelected(false);
- setPen( Qt::black );
+ setPen( TQt::black );
updateZ(-1);
update();
show();
@@ -305,24 +305,24 @@ void PicItem::updateZ( int baseZ )
}
-void PicItem::drawShape( QPainter & p )
+void PicItem::drawShape( TQPainter & p )
{
int _x = int(x());
int _y = int(y());
- p.setBrush( QColor( 0xef, 0xff, 0xef ) );
+ p.setBrush( TQColor( 0xef, 0xff, 0xef ) );
p.setFont( font() );
p.drawRoundRect( _x, _y, width(), height(), 2000/width(), 2000/height() );
- p.drawText( _x+TopPadding-2, _y, width()-TopPadding+2, TopPadding, Qt::AlignVCenter, i18n("PIC Settings") );
+ p.drawText( _x+TopPadding-2, _y, width()-TopPadding+2, TopPadding, TQt::AlignVCenter, i18n("PIC Settings") );
if ( !m_bExpanded )
return;
// Draw rectangle to cut off pins
- p.setBrush( QColor( 239, 255, 255 ) );
- QRect r( _x+SidePadding, _y+TopPadding, InnerWidth, m_innerHeight );
+ p.setBrush( TQColor( 239, 255, 255 ) );
+ TQRect r( _x+SidePadding, _y+TopPadding, InnerWidth, m_innerHeight );
p.drawRect(r);
// Draw dimple thingy at end of pic
@@ -331,15 +331,15 @@ void PicItem::drawShape( QPainter & p )
// Draw vertical text centered in PIC
p.translate( r.width()/2 + r.x(), r.height()/2 + r.y() );
p.rotate(90);
- QRect textRect( r.width()/-2, r.height()/-2, r.width(), r.height() );
- p.drawText( textRect, Qt::AlignCenter, microSettings->microInfo()->id() );
+ TQRect textRect( r.width()/-2, r.height()/-2, r.width(), r.height() );
+ p.drawText( textRect, TQt::AlignCenter, microSettings->microInfo()->id() );
p.rotate(-90);
p.translate( r.width()/-2 - r.x(), r.height()/-2 - r.y() );
}
-void PicItem::buttonStateChanged( const QString &id, bool state )
+void PicItem::buttonStateChanged( const TQString &id, bool state )
{
if ( id == "expandBtn" )
{
@@ -357,8 +357,8 @@ void PicItem::buttonStateChanged( const QString &id, bool state )
update();
MicroSettingsDlg *dlg = new MicroSettingsDlg( microSettings, 0L, "microSettingsDlg" );
- connect( dlg, SIGNAL(okClicked()), this, SLOT(slotMicroSettingsDlgAccepted()) );
- connect( dlg, SIGNAL(applyClicked()), this, SLOT(slotMicroSettingsDlgAccepted()) );
+ connect( dlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotMicroSettingsDlgAccepted()) );
+ connect( dlg, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotMicroSettingsDlgAccepted()) );
dlg->show();
// At this point the PIC is selected but this does not appear to the
// user so we must deselect it when done.
@@ -377,10 +377,10 @@ void PicItem::updateVisibility()
const PinItemList::iterator end = m_pinItemList.end();
for ( PinItemList::iterator it = m_pinItemList.begin(); it != end; ++it )
- (*it)->setVisible(m_bExpanded);
+ (*it)->tqsetVisible(m_bExpanded);
if ( Button * btn = button("settings") )
- btn->setVisible(m_bExpanded);
+ btn->tqsetVisible(m_bExpanded);
}
diff --git a/src/picitem.h b/src/picitem.h
index 0474ba8..7d936bf 100644
--- a/src/picitem.h
+++ b/src/picitem.h
@@ -13,7 +13,7 @@
#include "cnitem.h"
-#include <qobject.h>
+#include <tqobject.h>
class MicroSettings;
class FlowCodeDocument;
@@ -23,17 +23,18 @@ class PinSettings;
@short Allows visual setting of pin type/state
@author David Saxton
*/
-class PinItem : public QObject, public QCanvasRectangle
+class PinItem : public TQObject, public TQCanvasRectangle
{
Q_OBJECT
+ TQ_OBJECT
public:
- PinItem( FlowCodeDocument* _view, QPoint position, bool _onLeft, PinSettings *_pinSettings );
+ PinItem( FlowCodeDocument* _view, TQPoint position, bool _onLeft, PinSettings *_pinSettings );
int rtti() const;
- QRect boundingRect () const;
+ TQRect boundingRect () const;
void switchState();
- QString id();
+ TQString id();
/**
* Called from ICNDocument when the pin item was dragged
@@ -47,16 +48,16 @@ public slots:
private:
void initItem();
- void drawShape( QPainter& p );
+ void drawShape( TQPainter& p );
void calcTextRect();
FlowCodeDocument *view; // Pointer to canvas view that the component item is currently on
bool onLeft;
PinSettings * m_pinSettings;
- QRect m_textRect;
- QFont m_font;
+ TQRect m_textRect;
+ TQFont m_font;
};
-typedef QValueList<PinItem*> PinItemList;
+typedef TQValueList<PinItem*> PinItemList;
/**
@@ -66,16 +67,17 @@ Allows visual editing of inital PIC settings
class PicItem : public CNItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PicItem( ICNDocument *icnDocument, bool newItem, const char *id, MicroSettings *_microSettings );
~PicItem();
- void drawShape( QPainter &p );
+ void drawShape( TQPainter &p );
- virtual void buttonStateChanged( const QString &id, bool state );
+ virtual void buttonStateChanged( const TQString &id, bool state );
virtual bool isMovable() const { return false; }
- static QString typeString() { return "microitem"; }
+ static TQString typeString() { return "microitem"; }
virtual void updateZ( int baseZ );
protected slots:
diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp
index dfef6b3..ad6a32a 100644
--- a/src/projectmanager.cpp
+++ b/src/projectmanager.cpp
@@ -28,9 +28,9 @@
#include <kmessagebox.h>
#include <kmimetype.h>
#include <kstandarddirs.h>
-#include <qdom.h>
-#include <qpopupmenu.h>
-#include <qwhatsthis.h>
+#include <tqdom.h>
+#include <tqpopupmenu.h>
+#include <tqwhatsthis.h>
#include <assert.h>
@@ -42,9 +42,9 @@ LinkerOptions::LinkerOptions()
}
-QDomElement LinkerOptions::toDomElement( QDomDocument & doc, const KURL & baseURL ) const
+TQDomElement LinkerOptions::toDomElement( TQDomDocument & doc, const KURL & baseURL ) const
{
- QDomElement node = doc.createElement("linker");
+ TQDomElement node = doc.createElement("linker");
node.setAttribute( "hex-format", hexFormatToString(hexFormat()) );
node.setAttribute( "output-map-file", outputMapFile() );
@@ -52,18 +52,18 @@ QDomElement LinkerOptions::toDomElement( QDomDocument & doc, const KURL & baseUR
node.setAttribute( "linker-script", linkerScript() );
node.setAttribute( "other", linkerOther() );
- QStringList::const_iterator end = m_linkedInternal.end();
- for ( QStringList::const_iterator it = m_linkedInternal.begin(); it != end; ++it )
+ TQStringList::const_iterator end = m_linkedInternal.end();
+ for ( TQStringList::const_iterator it = m_linkedInternal.begin(); it != end; ++it )
{
- QDomElement child = doc.createElement("linked-internal");
+ TQDomElement child = doc.createElement("linked-internal");
node.appendChild(child);
child.setAttribute( "url", KURL::relativeURL( baseURL, *it ) );
}
end = m_linkedExternal.end();
- for ( QStringList::const_iterator it = m_linkedExternal.begin(); it != end; ++it )
+ for ( TQStringList::const_iterator it = m_linkedExternal.begin(); it != end; ++it )
{
- QDomElement child = doc.createElement("linked-external");
+ TQDomElement child = doc.createElement("linked-external");
node.appendChild(child);
child.setAttribute( "url", *it );
}
@@ -72,30 +72,30 @@ QDomElement LinkerOptions::toDomElement( QDomDocument & doc, const KURL & baseUR
}
-void LinkerOptions::domElementToLinkerOptions( const QDomElement & element, const KURL & baseURL )
+void LinkerOptions::domElementToLinkerOptions( const TQDomElement & element, const KURL & baseURL )
{
- setHexFormat( stringToHexFormat( element.attribute( "hex-format", QString::null ) ) );
+ setHexFormat( stringToHexFormat( element.attribute( "hex-format", TQString() ) ) );
setOutputMapFile( element.attribute( "output-map-file", "0" ).toInt() );
- setLibraryDir( element.attribute( "library-dir", QString::null ) );
- setLinkerScript( element.attribute( "linker-script", QString::null ) );
- setLinkerOther( element.attribute( "other", QString::null ) );
+ setLibraryDir( element.attribute( "library-dir", TQString() ) );
+ setLinkerScript( element.attribute( "linker-script", TQString() ) );
+ setLinkerOther( element.attribute( "other", TQString() ) );
m_linkedInternal.clear();
m_linkedExternal.clear();
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() )
{
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() )
{
- const QString tagName = childElement.tagName();
+ const TQString tagName = childElement.tagName();
if ( tagName == "linked-internal" )
- m_linkedInternal << KURL( baseURL, childElement.attribute( "url", QString::null ) ).url();
+ m_linkedInternal << KURL( baseURL, childElement.attribute( "url", TQString() ) ).url();
else if ( tagName == "linked-external" )
- m_linkedExternal << childElement.attribute( "url", QString::null );
+ m_linkedExternal << childElement.attribute( "url", TQString() );
else
kdError() << k_funcinfo << "Unrecognised element tag name: "<<tagName<<endl;
@@ -106,7 +106,7 @@ void LinkerOptions::domElementToLinkerOptions( const QDomElement & element, cons
}
-QString LinkerOptions::hexFormatToString( HexFormat::type hexFormat )
+TQString LinkerOptions::hexFormatToString( HexFormat::type hexFormat )
{
switch ( hexFormat )
{
@@ -128,7 +128,7 @@ QString LinkerOptions::hexFormatToString( HexFormat::type hexFormat )
}
-LinkerOptions::HexFormat::type LinkerOptions::stringToHexFormat( const QString & hexFormat )
+LinkerOptions::HexFormat::type LinkerOptions::stringToHexFormat( const TQString & hexFormat )
{
if ( hexFormat == "inhx8m" )
return HexFormat::inhx8m;
@@ -158,9 +158,9 @@ ProcessingOptions::~ProcessingOptions()
}
-QDomElement ProcessingOptions::toDomElement( QDomDocument & doc, const KURL & baseURL ) const
+TQDomElement ProcessingOptions::toDomElement( TQDomDocument & doc, const KURL & baseURL ) const
{
- QDomElement node = doc.createElement("processing");
+ TQDomElement node = doc.createElement("processing");
node.setAttribute( "output", KURL::relativeURL( baseURL, outputURL().url() ) );
node.setAttribute( "micro", m_microID );
@@ -169,20 +169,20 @@ QDomElement ProcessingOptions::toDomElement( QDomDocument & doc, const KURL & ba
}
-void ProcessingOptions::domElementToProcessingOptions( const QDomElement & element, const KURL & baseURL )
+void ProcessingOptions::domElementToProcessingOptions( const TQDomElement & element, const KURL & baseURL )
{
- setOutputURL( KURL( baseURL, element.attribute( "output", QString::null ) ) );
- setMicroID( element.attribute("micro", QString::null ) );
+ setOutputURL( KURL( baseURL, element.attribute( "output", TQString() ) ) );
+ setMicroID( element.attribute("micro", TQString() ) );
}
//END class ProcessingOptions
//BEGIN class ProjectItem
-ProjectItem::ProjectItem( ProjectItem * parent, Type type, ProjectManager * projectManager, KTechlab * ktechlab )
- : QObject()
+ProjectItem::ProjectItem( ProjectItem * tqparent, Type type, ProjectManager * projectManager, KTechlab * ktechlab )
+ : TQObject()
{
- m_pParent = parent;
+ m_pParent = tqparent;
m_pILVItem = 0l;
m_pProjectManager = projectManager;
p_ktechlab = ktechlab;
@@ -192,11 +192,11 @@ ProjectItem::ProjectItem( ProjectItem * parent, Type type, ProjectManager * proj
ProjectItem::~ProjectItem()
{
- m_children.remove( (ProjectItem*)0l );
- ProjectItemList::iterator end = m_children.end();
- for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it )
+ m_tqchildren.remove( (ProjectItem*)0l );
+ ProjectItemList::iterator end = m_tqchildren.end();
+ for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it )
(*it)->deleteLater();
- m_children.clear();
+ m_tqchildren.clear();
delete m_pILVItem;
m_pILVItem = 0l;
@@ -228,7 +228,7 @@ void ProjectItem::updateILVItemPixmap()
case ProgramType:
{
- QPixmap pm;
+ TQPixmap pm;
pm.load( locate( "appdata", "icons/project_program.png" ) );
m_pILVItem->setPixmap( 0, pm );
break;
@@ -236,7 +236,7 @@ void ProjectItem::updateILVItemPixmap()
case LibraryType:
{
- QPixmap pm;
+ TQPixmap pm;
pm.load( locate( "appdata", "icons/project_library.png" ) );
m_pILVItem->setPixmap( 0, pm );
break;
@@ -254,10 +254,10 @@ void ProjectItem::updateILVItemPixmap()
void ProjectItem::addChild( ProjectItem * child )
{
- if ( !child || m_children.contains(child) )
+ if ( !child || m_tqchildren.tqcontains(child) )
return;
- m_children << child;
+ m_tqchildren << child;
child->setILVItem( m_pILVItem ?
new ILVItem( m_pILVItem, child->name() ) :
@@ -283,14 +283,14 @@ void ProjectItem::updateControlChildMicroIDs()
break;
}
- m_children.remove( (ProjectItem*)0l );
- ProjectItemList::iterator end = m_children.end();
- for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it )
+ m_tqchildren.remove( (ProjectItem*)0l );
+ ProjectItemList::iterator end = m_tqchildren.end();
+ for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it )
(*it)->setUseParentMicroID( control );
}
-void ProjectItem::setName( const QString & name )
+void ProjectItem::setName( const TQString & name )
{
m_name = name;
if (m_pILVItem)
@@ -313,7 +313,7 @@ void ProjectItem::setURL( const KURL & url )
else if ( outputURL().isEmpty() )
{
// Try and guess what the output url should be...
- QString newExtension;
+ TQString newExtension;
switch ( outputType() )
{
@@ -335,9 +335,9 @@ void ProjectItem::setURL( const KURL & url )
if ( !newExtension.isEmpty() )
{
- const QString fileName = url.url();
- QString extension = fileName.right( fileName.length() - fileName.findRev('.') );
- setOutputURL( QString(fileName).replace( extension, newExtension ) );
+ const TQString fileName = url.url();
+ TQString extension = fileName.right( fileName.length() - fileName.tqfindRev('.') );
+ setOutputURL( TQString(fileName).tqreplace( extension, newExtension ) );
}
}
@@ -345,16 +345,16 @@ void ProjectItem::setURL( const KURL & url )
}
-QString ProjectItem::microID() const
+TQString ProjectItem::microID() const
{
if ( !m_bUseParentMicroID )
return m_microID;
- return m_pParent ? m_pParent->microID() : QString::null;
+ return m_pParent ? m_pParent->microID() : TQString();
}
-void ProjectItem::setMicroID( const QString & id )
+void ProjectItem::setMicroID( const TQString & id )
{
ProcessingOptions::setMicroID(id);
updateControlChildMicroIDs();
@@ -389,7 +389,7 @@ ProjectItem::OutputType ProjectItem::outputType() const
case ProjectItem::FileType:
{
- kdWarning() << k_funcinfo << "Don't know how to handle parent item being a file" << endl;
+ kdWarning() << k_funcinfo << "Don't know how to handle tqparent item being a file" << endl;
return UnknownOutput;
}
@@ -420,18 +420,18 @@ bool ProjectItem::build( ProcessOptionsList * pol )
if ( outputURL().isEmpty() )
{
- KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (output url is empty).").arg(name()) );
+ KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (output url is empty).").tqarg(name()) );
return false;
}
// Build all internal libraries that we depend on
- QStringList::iterator send = m_linkedInternal.end();
- for ( QStringList::iterator it = m_linkedInternal.begin(); it != send; ++it )
+ TQStringList::iterator send = m_linkedInternal.end();
+ for ( TQStringList::iterator it = m_linkedInternal.begin(); it != send; ++it )
{
ProjectItem * lib = projectInfo->findItem( projectInfo->directory() + *it );
if ( !lib )
{
- KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (library does not exist in project).").arg(*it) );
+ KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (library does not exist in project).").tqarg(*it) );
return false;
}
@@ -440,10 +440,10 @@ bool ProjectItem::build( ProcessOptionsList * pol )
}
- // Build all children
- m_children.remove( (ProjectItem*)0l );
- ProjectItemList::iterator cend = m_children.end();
- for ( ProjectItemList::iterator it = m_children.begin(); it != cend; ++it )
+ // Build all tqchildren
+ m_tqchildren.remove( (ProjectItem*)0l );
+ ProjectItemList::iterator cend = m_tqchildren.end();
+ for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != cend; ++it )
{
if ( ! (*it)->build(pol) )
return false;
@@ -461,7 +461,7 @@ bool ProjectItem::build( ProcessOptionsList * pol )
switch ( outputType() )
{
case UnknownOutput:
- KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (unknown output type).").arg(name()) );
+ KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (unknown output type).").tqarg(name()) );
return false;
case ProgramOutput:
@@ -491,12 +491,12 @@ bool ProjectItem::build( ProcessOptionsList * pol )
case ProgramType:
case LibraryType:
// Build up a list of input urls
- QStringList inputFiles;
+ TQStringList inputFiles;
// Link child objects
- m_children.remove( (ProjectItem*)0l );
- ProjectItemList::iterator cend = m_children.end();
- for ( ProjectItemList::iterator it = m_children.begin(); it != cend; ++it )
+ m_tqchildren.remove( (ProjectItem*)0l );
+ ProjectItemList::iterator cend = m_tqchildren.end();
+ for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != cend; ++it )
inputFiles << (*it)->outputURL().path();
po.setInputFiles(inputFiles);
@@ -511,11 +511,11 @@ bool ProjectItem::build( ProcessOptionsList * pol )
po.m_linkOther = linkerOther();
// Link against libraries
- QStringList::iterator lend = m_linkedInternal.end();
- for ( QStringList::iterator it = m_linkedInternal.begin(); it != lend; ++it )
+ TQStringList::iterator lend = m_linkedInternal.end();
+ for ( TQStringList::iterator it = m_linkedInternal.begin(); it != lend; ++it )
po.m_linkLibraries += projectInfo->directory() + *it;
lend = m_linkedExternal.end();
- for ( QStringList::iterator it = m_linkedExternal.begin(); it != lend; ++it )
+ for ( TQStringList::iterator it = m_linkedExternal.begin(); it != lend; ++it )
po.m_linkLibraries += *it;
// Save our working file (if open) and append to the build list
@@ -532,7 +532,7 @@ void ProjectItem::upload( ProcessOptionsList * pol )
{
build( pol );
- ProgrammerDlg * dlg = new ProgrammerDlg( microID(), (QWidget*)p_ktechlab, "Programmer Dlg" );
+ ProgrammerDlg * dlg = new ProgrammerDlg( microID(), (TQWidget*)p_ktechlab, "Programmer Dlg" );
dlg->exec();
if ( !dlg->isAccepted() )
@@ -553,9 +553,9 @@ void ProjectItem::upload( ProcessOptionsList * pol )
}
-QDomElement ProjectItem::toDomElement( QDomDocument & doc, const KURL & baseURL ) const
+TQDomElement ProjectItem::toDomElement( TQDomDocument & doc, const KURL & baseURL ) const
{
- QDomElement node = doc.createElement("item");
+ TQDomElement node = doc.createElement("item");
node.setAttribute( "type", typeToString() );
node.setAttribute( "name", m_name );
@@ -565,8 +565,8 @@ QDomElement ProjectItem::toDomElement( QDomDocument & doc, const KURL & baseURL
node.appendChild( ProcessingOptions::toDomElement( doc, baseURL ) );
- ProjectItemList::const_iterator end = m_children.end();
- for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ ProjectItemList::const_iterator end = m_tqchildren.end();
+ for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
{
if (*it)
node.appendChild( (*it)->toDomElement( doc, baseURL ) );
@@ -580,8 +580,8 @@ KURL::List ProjectItem::childOutputURLs( unsigned types, unsigned outputTypes )
{
KURL::List urls;
- ProjectItemList::const_iterator end = m_children.end();
- for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ ProjectItemList::const_iterator end = m_tqchildren.end();
+ for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
{
if (!*it)
continue;
@@ -601,8 +601,8 @@ ProjectItem * ProjectItem::findItem( const KURL & url )
if ( this->url() == url )
return this;
- ProjectItemList::const_iterator end = m_children.end();
- for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ ProjectItemList::const_iterator end = m_tqchildren.end();
+ for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
{
if (!*it)
continue;
@@ -622,9 +622,9 @@ bool ProjectItem::closeOpenFiles()
if ( doc && !doc->fileClose() )
return false;
- m_children.remove( (ProjectItem*)0l );
- ProjectItemList::iterator end = m_children.end();
- for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it )
+ m_tqchildren.remove( (ProjectItem*)0l );
+ ProjectItemList::iterator end = m_tqchildren.end();
+ for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it )
{
if ( !(*it)->closeOpenFiles() )
return false;
@@ -668,9 +668,9 @@ void ProjectItem::addFile( const KURL & url )
if ( url.isEmpty() )
return;
- m_children.remove( (ProjectItem*)0l );
- ProjectItemList::iterator end = m_children.end();
- for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it )
+ m_tqchildren.remove( (ProjectItem*)0l );
+ ProjectItemList::iterator end = m_tqchildren.end();
+ for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it )
{
if ( (*it)->type() == FileType && (*it)->url() == url )
return;
@@ -682,7 +682,7 @@ void ProjectItem::addFile( const KURL & url )
}
-QString ProjectItem::typeToString() const
+TQString ProjectItem::typeToString() const
{
switch (m_type)
{
@@ -698,11 +698,11 @@ QString ProjectItem::typeToString() const
case LibraryType:
return "Library";
}
- return QString::null;
+ return TQString();
}
-ProjectItem::Type ProjectItem::stringToType( const QString & type )
+ProjectItem::Type ProjectItem::stringToType( const TQString & type )
{
if ( type == "Project" )
return ProjectType;
@@ -720,11 +720,11 @@ ProjectItem::Type ProjectItem::stringToType( const QString & type )
}
-void ProjectItem::domElementToItem( const QDomElement & element, const KURL & baseURL )
+void ProjectItem::domElementToItem( const TQDomElement & element, const KURL & baseURL )
{
- Type type = stringToType( element.attribute( "type", QString::null ) );
- QString name = element.attribute( "name", QString::null );
- KURL url( baseURL, element.attribute( "url", QString::null ) );
+ Type type = stringToType( element.attribute( "type", TQString() ) );
+ TQString name = element.attribute( "name", TQString() );
+ KURL url( baseURL, element.attribute( "url", TQString() ) );
ProjectItem * createdItem = new ProjectItem( this, type, m_pProjectManager, p_ktechlab );
createdItem->setName( name );
@@ -732,13 +732,13 @@ void ProjectItem::domElementToItem( const QDomElement & element, const KURL & ba
addChild( createdItem );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() )
{
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() )
{
- const QString tagName = childElement.tagName();
+ const TQString tagName = childElement.tagName();
if ( tagName == "linker" )
createdItem->domElementToLinkerOptions( childElement, baseURL );
@@ -764,7 +764,7 @@ void ProjectItem::domElementToItem( const QDomElement & element, const KURL & ba
ProjectInfo::ProjectInfo( ProjectManager * projectManager, KTechlab * ktechlab )
: ProjectItem( 0l, ProjectItem::ProjectType, projectManager, ktechlab )
{
- m_microID = QString::null;
+ m_microID = TQString();
}
@@ -775,7 +775,7 @@ ProjectInfo::~ ProjectInfo()
bool ProjectInfo::open( const KURL & url )
{
- QString target;
+ TQString target;
if ( !KIO::NetAccess::download( url, target, 0l ) )
{
// If the file could not be downloaded, for example does not
@@ -785,39 +785,39 @@ bool ProjectInfo::open( const KURL & url )
return false;
}
- QFile file(target);
+ TQFile file(target);
if ( !file.open( IO_ReadOnly ) )
{
- KMessageBox::sorry( 0l, i18n("Could not open %1 for reading").arg(target) );
+ KMessageBox::sorry( 0l, i18n("Could not open %1 for reading").tqarg(target) );
return false;
}
m_url = url;
- QString xml;
- QTextStream textStream( &file );
+ TQString xml;
+ TQTextStream textStream( &file );
while ( !textStream.eof() )
xml += textStream.readLine() + '\n';
file.close();
- QDomDocument doc( "KTechlab" );
- QString errorMessage;
+ TQDomDocument doc( "KTechlab" );
+ TQString errorMessage;
if ( !doc.setContent( xml, &errorMessage ) )
{
- KMessageBox::sorry( 0l, i18n("Couldn't parse xml:\n%1").arg(errorMessage) );
+ KMessageBox::sorry( 0l, i18n("Couldn't parse xml:\n%1").tqarg(errorMessage) );
return false;
}
- QDomElement root = doc.documentElement();
+ TQDomElement root = doc.documentElement();
- QDomNode node = root.firstChild();
+ TQDomNode node = root.firstChild();
while ( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
if ( tagName == "linker" )
domElementToLinkerOptions( element, m_url );
@@ -842,27 +842,27 @@ bool ProjectInfo::open( const KURL & url )
bool ProjectInfo::save()
{
- QFile file( m_url.path() );
+ TQFile file( m_url.path() );
if ( file.open(IO_WriteOnly) == false )
{
- KMessageBox::sorry( NULL, i18n("Project could not be saved to \"%1\"").arg(m_url.path()), i18n("Saving Project") );
+ KMessageBox::sorry( NULL, i18n("Project could not be saved to \"%1\"").tqarg(m_url.path()), i18n("Saving Project") );
return false;
}
- QDomDocument doc("KTechlab");
+ TQDomDocument doc("KTechlab");
- QDomElement root = doc.createElement("project");
+ TQDomElement root = doc.createElement("project");
doc.appendChild(root);
// root.appendChild( LinkerOptions::toDomElement(doc) );
// root.appendChild( ProcessingOptions::toDomElement(doc) );
- m_children.remove( (ProjectItem*)0l );
- ProjectItemList::const_iterator end = m_children.end();
- for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it )
+ m_tqchildren.remove( (ProjectItem*)0l );
+ ProjectItemList::const_iterator end = m_tqchildren.end();
+ for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it )
root.appendChild( (*it)->toDomElement( doc, m_url ) );
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << doc.toString();
file.close();
@@ -889,29 +889,29 @@ bool ProjectInfo::saveAndClose()
//BEGIN class ProjectManager
ProjectManager * ProjectManager::m_pSelf = 0l;
-ProjectManager * ProjectManager::self( KTechlab * ktl, KateMDI::ToolView * parent )
+ProjectManager * ProjectManager::self( KTechlab * ktl, KateMDI::ToolView * tqparent )
{
if ( !m_pSelf )
{
assert(ktl);
- assert(parent);
- m_pSelf = new ProjectManager( ktl, parent );
+ assert(tqparent);
+ m_pSelf = new ProjectManager( ktl, tqparent );
}
return m_pSelf;
}
-ProjectManager::ProjectManager( KTechlab * ktl, KateMDI::ToolView * parent )
- : ItemSelector( parent, "Project Manager" ),
+ProjectManager::ProjectManager( KTechlab * ktl, KateMDI::ToolView * tqparent )
+ : ItemSelector( tqparent, "Project Manager" ),
m_pCurrentProject(0l),
p_ktechlab(ktl)
{
- QWhatsThis::add( this, i18n("Displays the list of files in the project.\nTo open or close a project, use the \"Project\" menu. Right click on a file to remove it from the project") );
+ TQWhatsThis::add( this, i18n("Displays the list of files in the project.\nTo open or close a project, use the \"Project\" menu. Right click on a file to remove it from the project") );
setListCaption( i18n("File") );
setCaption( i18n("Project Manager") );
- connect( this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotItemClicked(QListViewItem*)) );
+ connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotItemClicked(TQListViewItem*)) );
}
@@ -934,7 +934,7 @@ void ProjectManager::slotNewProject()
m_pCurrentProject->setName( newProjectDlg->projectName() );
m_pCurrentProject->setURL( newProjectDlg->location() + m_pCurrentProject->name().lower() + ".ktechlab" );
- QDir dir;
+ TQDir dir;
if ( !dir.mkdir( m_pCurrentProject->directory() ) )
kdDebug() << "Error in creating directory " << m_pCurrentProject->directory() << endl;
@@ -955,7 +955,7 @@ void ProjectManager::slotProjectOptions()
void ProjectManager::slotOpenProject()
{
- KURL url = KFileDialog::getOpenURL(QString::null,
+ KURL url = KFileDialog::getOpenURL(TQString(),
"*.ktechlab|KTechlab Project(*.ktechlab)\n*|All Files", this, i18n("Open Location"));
if ( url.isEmpty() )
@@ -1130,7 +1130,7 @@ void ProjectManager::slotRemoveSelected()
if ( !currentItem )
return;
- int choice = KMessageBox::questionYesNo( this, i18n("Do you really want to remove \"%1\"?").arg( currentItem->text(0) ), i18n("Remove Project File?"), KGuiItem(i18n("Remove")), KGuiItem(i18n("Cancel")) );
+ int choice = KMessageBox::questionYesNo( this, i18n("Do you really want to remove \"%1\"?").tqarg( currentItem->text(0) ), i18n("Remove Project File?"), KGuiItem(i18n("Remove")), KGuiItem(i18n("Cancel")) );
if ( choice == KMessageBox::No )
return;
@@ -1175,7 +1175,7 @@ void ProjectManager::slotItemProcessingOptions()
}
-void ProjectManager::slotItemClicked( QListViewItem * item )
+void ProjectManager::slotItemClicked( TQListViewItem * item )
{
ILVItem * ilvItem = dynamic_cast<ILVItem*>(item);
if ( !ilvItem )
@@ -1189,9 +1189,9 @@ void ProjectManager::slotItemClicked( QListViewItem * item )
}
-void ProjectManager::slotContextMenuRequested( QListViewItem * item, const QPoint& pos, int /*col*/ )
+void ProjectManager::slotContextMenuRequested( TQListViewItem * item, const TQPoint& pos, int /*col*/ )
{
- QString popupName;
+ TQString popupName;
ILVItem * ilvItem = dynamic_cast<ILVItem*>(item);
KAction * linkerOptionsAct = p_ktechlab->action("project_item_linker_options");
linkerOptionsAct->setEnabled(false);
@@ -1247,7 +1247,7 @@ void ProjectManager::slotContextMenuRequested( QListViewItem * item, const QPoin
p_ktechlab->action("subproject_add_current_file")->setEnabled( haveFocusedDocument );
p_ktechlab->action("project_add_current_file")->setEnabled( haveFocusedDocument );
- QPopupMenu *pop = static_cast<QPopupMenu*>(p_ktechlab->factory()->container( popupName, p_ktechlab ));
+ TQPopupMenu *pop = static_cast<TQPopupMenu*>(p_ktechlab->factory()->container( popupName, p_ktechlab ));
if (pop)
pop->popup(pos);
}
diff --git a/src/projectmanager.h b/src/projectmanager.h
index 81620cb..dce400e 100644
--- a/src/projectmanager.h
+++ b/src/projectmanager.h
@@ -14,8 +14,8 @@
#include "itemselector.h"
#include <kurl.h>
-#include <qguardedptr.h>
-#include <qvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
class Document;
class ILVItem;
@@ -24,13 +24,13 @@ class ProcessOptions;
class ProjectInfo;
class ProjectItem;
class ProjectManager;
-class QDomDocument;
-class QDomElement;
-class QStringList;
+class TQDomDocument;
+class TQDomElement;
+class TQStringList;
namespace KateMDI { class ToolView; }
-typedef QValueList<ProcessOptions> ProcessOptionsList;
-typedef QValueList< QGuardedPtr<ProjectItem> > ProjectItemList;
+typedef TQValueList<ProcessOptions> ProcessOptionsList;
+typedef TQValueList< TQGuardedPtr<ProjectItem> > ProjectItemList;
class LinkerOptions
@@ -50,45 +50,45 @@ class LinkerOptions
bool outputMapFile() const { return m_bOutputMapFile; }
void setOutputMapFile( bool outputMapFile ) { m_bOutputMapFile = outputMapFile; }
- QString libraryDir() const { return m_libraryDir; }
- void setLibraryDir( const QString & libraryDir ) { m_libraryDir = libraryDir; }
+ TQString libraryDir() const { return m_libraryDir; }
+ void setLibraryDir( const TQString & libraryDir ) { m_libraryDir = libraryDir; }
- QString linkerScript() const { return m_linkerScript; }
- void setLinkerScript( const QString & linkerScript ) { m_linkerScript = linkerScript; }
+ TQString linkerScript() const { return m_linkerScript; }
+ void setLinkerScript( const TQString & linkerScript ) { m_linkerScript = linkerScript; }
- QString linkerOther() const { return m_other; }
- void setLinkerOther( const QString & other ) { m_other = other; }
+ TQString linkerOther() const { return m_other; }
+ void setLinkerOther( const TQString & other ) { m_other = other; }
/**
* Used for linkable ProjectItems. Returns a list of urls of files
* inside the project to link against. Each url is relative to the
* project directory.
*/
- QStringList linkedInternal() const { return m_linkedInternal; }
- void setLinkedInternal( const QStringList & linkedInternal ) { m_linkedInternal = linkedInternal; }
+ TQStringList linkedInternal() const { return m_linkedInternal; }
+ void setLinkedInternal( const TQStringList & linkedInternal ) { m_linkedInternal = linkedInternal; }
/**
* Used for linkable ProjectItems. Returns a list of urls of files
* outside the project to link against. Each url is absolute.
*/
- QStringList linkedExternal() const { return m_linkedExternal; }
- void setLinkedExternal( const QStringList & linkedExternal ) { m_linkedExternal = linkedExternal; }
+ TQStringList linkedExternal() const { return m_linkedExternal; }
+ void setLinkedExternal( const TQStringList & linkedExternal ) { m_linkedExternal = linkedExternal; }
- QDomElement toDomElement( QDomDocument & doc, const KURL & baseURL ) const;
+ TQDomElement toDomElement( TQDomDocument & doc, const KURL & baseURL ) const;
- static QString hexFormatToString( HexFormat::type format );
- static HexFormat::type stringToHexFormat( const QString & hexFormat );
+ static TQString hexFormatToString( HexFormat::type format );
+ static HexFormat::type stringToHexFormat( const TQString & hexFormat );
protected:
- void domElementToLinkerOptions( const QDomElement & element, const KURL & baseURL );
+ void domElementToLinkerOptions( const TQDomElement & element, const KURL & baseURL );
- QStringList m_linkedInternal;
- QStringList m_linkedExternal;
+ TQStringList m_linkedInternal;
+ TQStringList m_linkedExternal;
HexFormat::type m_hexFormat;
bool m_bOutputMapFile;
- QString m_libraryDir;
- QString m_linkerScript;
- QString m_other;
+ TQString m_libraryDir;
+ TQString m_linkerScript;
+ TQString m_other;
};
@@ -109,19 +109,19 @@ class ProcessingOptions
* Set the microprocessor id that this project item is being built for
* (when applicable).
*/
- virtual void setMicroID( const QString & id ) { m_microID = id; }
- virtual QString microID() const { return m_microID; }
+ virtual void setMicroID( const TQString & id ) { m_microID = id; }
+ virtual TQString microID() const { return m_microID; }
- QDomElement toDomElement( QDomDocument & doc, const KURL & baseURL ) const;
+ TQDomElement toDomElement( TQDomDocument & doc, const KURL & baseURL ) const;
void setUseParentMicroID( bool useParentMicroID ) { m_bUseParentMicroID = useParentMicroID; }
bool useParentMicroID() const { return m_bUseParentMicroID; }
protected:
- void domElementToProcessingOptions( const QDomElement & element, const KURL & baseURL );
+ void domElementToProcessingOptions( const TQDomElement & element, const KURL & baseURL );
KURL m_outputURL;
- QString m_microID;
+ TQString m_microID;
bool m_bUseParentMicroID;
};
@@ -129,7 +129,7 @@ class ProcessingOptions
/**
@author David Saxton
*/
-class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptions
+class ProjectItem : public TQObject, public LinkerOptions, public ProcessingOptions
{
public:
enum Type
@@ -150,24 +150,24 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
};
enum { AllOutputs = ProgramOutput | ObjectOutput | LibraryOutput | UnknownOutput };
- ProjectItem( ProjectItem * parent, Type type, ProjectManager * projectManager, KTechlab * ktechlab );
+ ProjectItem( ProjectItem * tqparent, Type type, ProjectManager * projectManager, KTechlab * ktechlab );
virtual ~ProjectItem();
Type type() const { return m_type; }
- QString typeToString() const;
- static Type stringToType( const QString & type );
+ TQString typeToString() const;
+ static Type stringToType( const TQString & type );
void setILVItem( ILVItem * ilvItem );
/**
- * Adds the child to the list of children, and creates an ILVItem for it
+ * Adds the child to the list of tqchildren, and creates an ILVItem for it
* in the project tree view.
*/
void addChild( ProjectItem * child );
- ProjectItemList children() const { return m_children; }
+ ProjectItemList tqchildren() const { return m_tqchildren; }
- void setName( const QString & name );
- QString name() const { return m_name; }
+ void setName( const TQString & name );
+ TQString name() const { return m_name; }
/**
* Sets the (input) url that this project item refers to. If the output
@@ -180,12 +180,12 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
OutputType outputType() const;
/**
- * Returns a list of output urls of the children and their recursively
- * contained children (does not include the url for this project item).
+ * Returns a list of output urls of the tqchildren and their recursively
+ * contained tqchildren (does not include the url for this project item).
* @param types An OR'ed list of ProjectItem::Type values for the
- * children.
+ * tqchildren.
* @param outputTypes An OR'ed list of ProjectItem::OutputType values
- * for the children.
+ * for the tqchildren.
*/
KURL::List childOutputURLs( unsigned types = AllTypes, unsigned outputTypes = AllOutputs ) const;
@@ -201,32 +201,32 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
void addCurrentFile();
bool closeOpenFiles();
- QDomElement toDomElement( QDomDocument & doc, const KURL & baseURL ) const;
+ TQDomElement toDomElement( TQDomDocument & doc, const KURL & baseURL ) const;
bool build( ProcessOptionsList * pol );
void upload( ProcessOptionsList * pol );
- virtual void setMicroID( const QString & id );
- virtual QString microID() const;
+ virtual void setMicroID( const TQString & id );
+ virtual TQString microID() const;
/**
- * Searches this item and the children for an item for the given url,
+ * Searches this item and the tqchildren for an item for the given url,
* return null if no such item could be found.
*/
ProjectItem * findItem( const KURL & url );
protected:
- void domElementToItem( const QDomElement & element, const KURL & baseURL );
+ void domElementToItem( const TQDomElement & element, const KURL & baseURL );
void updateILVItemPixmap();
void updateControlChildMicroIDs();
KURL m_url;
- QString m_name;
- ProjectItemList m_children;
+ TQString m_name;
+ ProjectItemList m_tqchildren;
Type m_type;
KTechlab * p_ktechlab;
- QGuardedPtr<ILVItem> m_pILVItem;
+ TQGuardedPtr<ILVItem> m_pILVItem;
ProjectManager * m_pProjectManager;
ProjectItem * m_pParent;
};
@@ -238,6 +238,7 @@ class ProjectItem : public QObject, public LinkerOptions, public ProcessingOptio
class ProjectInfo : public ProjectItem
{
Q_OBJECT
+ TQ_OBJECT
public:
ProjectInfo( ProjectManager * projectManager, KTechlab * ktechlab );
@@ -246,7 +247,7 @@ class ProjectInfo : public ProjectItem
/**
* Returns the directory that the project is saved in
*/
- QString directory() const { return m_url.directory(false); }
+ TQString directory() const { return m_url.directory(false); }
/**
* Saves the project information to file, and attempts to close all
@@ -266,11 +267,12 @@ class ProjectInfo : public ProjectItem
class ProjectManager : public ItemSelector
{
Q_OBJECT
+ TQ_OBJECT
public:
~ProjectManager();
- static ProjectManager * self( KTechlab * ktl = 0l, KateMDI::ToolView * parent = 0l );
+ static ProjectManager * self( KTechlab * ktl = 0l, KateMDI::ToolView * tqparent = 0l );
- static QString toolViewIdentifier() { return "ProjectManager"; }
+ static TQString toolViewIdentifier() { return "ProjectManager"; }
/**
* @return the currently open project, or NULL if no project is open.
@@ -327,18 +329,18 @@ class ProjectManager : public ItemSelector
void slotProjectOptions();
private slots:
- void slotContextMenuRequested( QListViewItem *item, const QPoint &pos, int col );
+ void slotContextMenuRequested( TQListViewItem *item, const TQPoint &pos, int col );
/**
* Called when a user clicks on any item in the project view
*/
- void slotItemClicked( QListViewItem * item );
+ void slotItemClicked( TQListViewItem * item );
protected:
ProjectInfo * m_pCurrentProject;
KTechlab * const p_ktechlab;
private:
- ProjectManager( KTechlab * ktl, KateMDI::ToolView * parent );
+ ProjectManager( KTechlab * ktl, KateMDI::ToolView * tqparent );
static ProjectManager * m_pSelf;
};
diff --git a/src/recentfilesaction.cpp b/src/recentfilesaction.cpp
index ac38d6b..64ba467 100644
--- a/src/recentfilesaction.cpp
+++ b/src/recentfilesaction.cpp
@@ -15,22 +15,22 @@
#include <kstandarddirs.h>
#include <kurl.h>
-RecentFilesAction::RecentFilesAction( const QString & configGroupName, const QString& text, const QObject* receiver, const char* slot, QObject* parent, const char* name )
- : KSelectAction( text, 0/*pix*/, parent, name )
+RecentFilesAction::RecentFilesAction( const TQString & configGroupName, const TQString& text, const TQObject* receiver, const char* slot, TQObject* tqparent, const char* name )
+ : KSelectAction( text, 0/*pix*/, tqparent, name )
{
m_configGroupName = configGroupName;
m_maxItems = 10;
m_popup = new KPopupMenu;
- connect(m_popup, SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()));
- connect(m_popup, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
- connect( this, SIGNAL( activated( const QString& ) ),
- this, SLOT( itemSelected( const QString& ) ) );
+ connect(m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow()));
+ connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int)));
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( itemSelected( const TQString& ) ) );
setMenuAccelsEnabled( false );
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL &)), receiver, slot );
+ connect( this, TQT_SIGNAL(urlSelected(const KURL &)), receiver, slot );
}
@@ -44,13 +44,13 @@ void RecentFilesAction::addURL( const KURL& url )
if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/"))
return;
- QString file;
+ TQString file;
if ( url.isLocalFile() && url.ref().isNull() && url.query().isNull() )
file = url.path();
else
file = url.prettyURL();
- QStringList lst = items();
+ TQStringList lst = items();
// remove file if already in list
lst.remove( file );
@@ -74,10 +74,10 @@ void RecentFilesAction::loadEntries()
{
KConfig * config = KGlobal::config();
- QString key;
- QString value;
- QString oldGroup;
- QStringList lst;
+ TQString key;
+ TQString value;
+ TQString oldGroup;
+ TQStringList lst;
oldGroup = config->group();
@@ -86,7 +86,7 @@ void RecentFilesAction::loadEntries()
// read file list
for( unsigned int i = 1 ; i <= m_maxItems ; i++ )
{
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).tqarg( i );
value = config->readPathEntry( key );
if (!value.isNull())
@@ -103,10 +103,10 @@ void RecentFilesAction::saveEntries()
{
KConfig * config = KGlobal::config();
- QString key;
- QString value;
- QString oldGroup;
- QStringList lst = items();
+ TQString key;
+ TQString value;
+ TQString oldGroup;
+ TQStringList lst = items();
oldGroup = config->group();
@@ -116,7 +116,7 @@ void RecentFilesAction::saveEntries()
// write file list
for( unsigned int i = 1 ; i <= lst.count() ; i++ )
{
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).tqarg( i );
value = lst[ i - 1 ];
config->writePathEntry( key, value );
}
@@ -126,7 +126,7 @@ void RecentFilesAction::saveEntries()
config->sync();
}
-void RecentFilesAction::itemSelected( const QString& text )
+void RecentFilesAction::itemSelected( const TQString& text )
{
emit urlSelected( KURL( text ) );
}
@@ -140,9 +140,9 @@ void RecentFilesAction::menuAboutToShow()
{
KPopupMenu *menu = m_popup;
menu->clear();
- QStringList list = items();
- QStringList::iterator end = list.end();
- for ( QStringList::Iterator it = list.begin(); it != end; ++it )
+ TQStringList list = items();
+ TQStringList::iterator end = list.end();
+ for ( TQStringList::Iterator it = list.begin(); it != end; ++it )
menu->insertItem(*it);
}
@@ -151,7 +151,7 @@ void RecentFilesAction::slotClicked()
KAction::slotActivated();
}
-void RecentFilesAction::slotActivated(const QString& text)
+void RecentFilesAction::slotActivated(const TQString& text)
{
KSelectAction::slotActivated(text);
}
diff --git a/src/recentfilesaction.h b/src/recentfilesaction.h
index 158e945..1e6bbaf 100644
--- a/src/recentfilesaction.h
+++ b/src/recentfilesaction.h
@@ -20,8 +20,9 @@ Adapted to work around strange bug occuring.
class RecentFilesAction : public KSelectAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- RecentFilesAction( const QString & configGroupName, const QString & text, const QObject * receiver, const char* slot, QObject* parent, const char * name );
+ RecentFilesAction( const TQString & configGroupName, const TQString & text, const TQObject * receiver, const char* slot, TQObject* tqparent, const char * name );
~RecentFilesAction();
@@ -57,18 +58,18 @@ class RecentFilesAction : public KSelectAction
void urlSelected( const KURL& url );
protected slots:
- void itemSelected( const QString& string );
+ void itemSelected( const TQString& string );
void menuAboutToShow();
void menuItemActivated( int id );
void slotClicked();
virtual void slotActivated(int);
- virtual void slotActivated(const QString& );
+ virtual void slotActivated(const TQString& );
virtual void slotActivated();
protected:
unsigned m_maxItems;
KPopupMenu * m_popup;
- QString m_configGroupName;
+ TQString m_configGroupName;
};
#endif
diff --git a/src/resizeoverlay.cpp b/src/resizeoverlay.cpp
index 9d714bd..6c45f93 100644
--- a/src/resizeoverlay.cpp
+++ b/src/resizeoverlay.cpp
@@ -13,16 +13,16 @@
#include "resizeoverlay.h"
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN class ResizeOverlay
-ResizeOverlay::ResizeOverlay( Item *parent )
- : QObject(parent)
+ResizeOverlay::ResizeOverlay( Item *tqparent )
+ : TQObject(tqparent)
{
b_showResizeHandles = false;
b_visible = true;
- p_item = parent;
+ p_item = tqparent;
}
@@ -45,7 +45,7 @@ void ResizeOverlay::showResizeHandles( bool show )
const ResizeHandleMap::iterator end = m_resizeHandleMap.end();
for ( ResizeHandleMap::iterator it = m_resizeHandleMap.begin(); it != end; ++it )
{
- it.data()->setVisible(b_showResizeHandles && b_visible);
+ it.data()->tqsetVisible(b_showResizeHandles && b_visible);
}
}
@@ -56,32 +56,32 @@ void ResizeOverlay::setVisible( bool visible )
const ResizeHandleMap::iterator end = m_resizeHandleMap.end();
for ( ResizeHandleMap::iterator it = m_resizeHandleMap.begin(); it != end; ++it )
{
- it.data()->setVisible(b_showResizeHandles && b_visible);
+ it.data()->tqsetVisible(b_showResizeHandles && b_visible);
}
}
ResizeHandle *ResizeOverlay::createResizeHandle( int id, ResizeHandle::DrawType drawType, int xsnap, int ysnap )
{
- ResizeHandleMap::iterator it = m_resizeHandleMap.find(id);
+ ResizeHandleMap::iterator it = m_resizeHandleMap.tqfind(id);
if ( it != m_resizeHandleMap.end() )
return it.data();
ResizeHandle *newResizeHandle = new ResizeHandle( this, id, drawType, xsnap, ysnap );
m_resizeHandleMap[id] = newResizeHandle;
- connect( newResizeHandle, SIGNAL(rhMovedBy(int, double, double )), this, SLOT(slotResizeHandleMoved(int, double, double )) );
+ connect( newResizeHandle, TQT_SIGNAL(rhMovedBy(int, double, double )), this, TQT_SLOT(slotResizeHandleMoved(int, double, double )) );
return newResizeHandle;
}
void ResizeOverlay::removeResizeHandle( int id )
{
- ResizeHandleMap::iterator it = m_resizeHandleMap.find(id);
+ ResizeHandleMap::iterator it = m_resizeHandleMap.tqfind(id);
if ( it == m_resizeHandleMap.end() )
return;
ResizeHandle *rh = it.data();
- disconnect( rh, SIGNAL(rhMovedBy(int, double, double )), this, SLOT(slotResizeHandleMoved(int, double, double )) );
+ disconnect( rh, TQT_SIGNAL(rhMovedBy(int, double, double )), this, TQT_SLOT(slotResizeHandleMoved(int, double, double )) );
delete rh;
m_resizeHandleMap.erase(it);
}
@@ -89,7 +89,7 @@ void ResizeOverlay::removeResizeHandle( int id )
ResizeHandle *ResizeOverlay::resizeHandle( int id )
{
- ResizeHandleMap::iterator it = m_resizeHandleMap.find(id);
+ ResizeHandleMap::iterator it = m_resizeHandleMap.tqfind(id);
if ( it != m_resizeHandleMap.end() )
return it.data();
return 0l;
@@ -122,27 +122,27 @@ void ResizeOverlay::syncX( ResizeHandle *rh1, ResizeHandle *rh2 )
{
if ( !rh1 || !rh2 )
return;
- connect( rh1, SIGNAL(rhMovedByX(double )), rh2, SLOT(slotMoveByX(double )) );
- connect( rh2, SIGNAL(rhMovedByX(double )), rh1, SLOT(slotMoveByX(double )) );
+ connect( rh1, TQT_SIGNAL(rhMovedByX(double )), rh2, TQT_SLOT(slotMoveByX(double )) );
+ connect( rh2, TQT_SIGNAL(rhMovedByX(double )), rh1, TQT_SLOT(slotMoveByX(double )) );
}
void ResizeOverlay::syncY( ResizeHandle *rh1, ResizeHandle *rh2 )
{
if ( !rh1 || !rh2 )
return;
- connect( rh1, SIGNAL(rhMovedByY(double )), rh2, SLOT(slotMoveByY(double )) );
- connect( rh2, SIGNAL(rhMovedByY(double )), rh1, SLOT(slotMoveByY(double )) );
+ connect( rh1, TQT_SIGNAL(rhMovedByY(double )), rh2, TQT_SLOT(slotMoveByY(double )) );
+ connect( rh2, TQT_SIGNAL(rhMovedByY(double )), rh1, TQT_SLOT(slotMoveByY(double )) );
}
//END class ResizeOverlay
//BEGIN class MechanicsItemOverlay
-MechanicsItemOverlay::MechanicsItemOverlay( MechanicsItem *parent )
- : ResizeOverlay(parent)
+MechanicsItemOverlay::MechanicsItemOverlay( MechanicsItem *tqparent )
+ : ResizeOverlay(tqparent)
{
- p_mechanicsItem = parent;
- connect( parent, SIGNAL(moved()), this, SLOT(slotUpdateResizeHandles()) );
- connect( parent, SIGNAL(resized()), this, SLOT(slotUpdateResizeHandles()) );
+ p_mechanicsItem = tqparent;
+ connect( tqparent, TQT_SIGNAL(moved()), this, TQT_SLOT(slotUpdateResizeHandles()) );
+ connect( tqparent, TQT_SIGNAL(resized()), this, TQT_SLOT(slotUpdateResizeHandles()) );
m_tl = createResizeHandle( ResizeHandle::rhp_topLeft, ResizeHandle::dt_resize_backwardsDiagonal );
m_tm = createResizeHandle( ResizeHandle::rhp_topMiddle, ResizeHandle::dt_resize_vertical );
@@ -164,9 +164,9 @@ MechanicsItemOverlay::~MechanicsItemOverlay()
void MechanicsItemOverlay::slotUpdateResizeHandles()
{
const PositionInfo absPos = p_mechanicsItem->absolutePosition();
- const QRect sizeRect = p_mechanicsItem->sizeRect();
+ const TQRect sizeRect = p_mechanicsItem->sizeRect();
- QPointArray pa(9);
+ TQPointArray pa(9);
pa[0] = sizeRect.topLeft();
pa[2] = sizeRect.topRight();
pa[1] = (pa[0]+pa[2])/2;
@@ -175,9 +175,9 @@ void MechanicsItemOverlay::slotUpdateResizeHandles()
pa[6] = sizeRect.bottomLeft();
pa[5] = (pa[4]+pa[6])/2;
pa[7] = (pa[6]+pa[0])/2;
- pa[8] = QPoint(0,0);
+ pa[8] = TQPoint(0,0);
- QWMatrix m;
+ TQWMatrix m;
m.rotate(absPos.angle()*57.29577951308232);
pa = m.map(pa);
@@ -229,11 +229,11 @@ void MechanicsItemOverlay::slotResizeHandleMoved( int id, double dx, double dy )
//BEGIN class RectangularOverlay
-RectangularOverlay::RectangularOverlay( Item *parent, int xsnap, int ysnap )
- : ResizeOverlay(parent)
+RectangularOverlay::RectangularOverlay( Item *tqparent, int xsnap, int ysnap )
+ : ResizeOverlay(tqparent)
{
- connect( parent, SIGNAL(resized()), this, SLOT(slotUpdateResizeHandles()) );
- connect( parent, SIGNAL(movedBy(double, double )), this, SLOT(slotMoveAllResizeHandles(double, double )) );
+ connect( tqparent, TQT_SIGNAL(resized()), this, TQT_SLOT(slotUpdateResizeHandles()) );
+ connect( tqparent, TQT_SIGNAL(movedBy(double, double )), this, TQT_SLOT(slotMoveAllResizeHandles(double, double )) );
m_tl = createResizeHandle( ResizeHandle::rhp_topLeft, ResizeHandle::dt_resize_backwardsDiagonal, xsnap, ysnap );
m_tm = createResizeHandle( ResizeHandle::rhp_topMiddle, ResizeHandle::dt_resize_vertical, xsnap, ysnap );
@@ -273,7 +273,7 @@ void RectangularOverlay::removeBotMiddle()
void RectangularOverlay::slotUpdateResizeHandles()
{
- const QRect sizeRect = p_item->sizeRect();
+ const TQRect sizeRect = p_item->sizeRect();
int x1 = sizeRect.left() + int(p_item->x());
int x2 = x1 + sizeRect.width();
@@ -319,7 +319,7 @@ void RectangularOverlay::slotResizeHandleMoved( int id, double dx, double dy )
Q_UNUSED(dy);
bool ok;
- QRect sizeRect = getSizeRect(&ok);
+ TQRect sizeRect = getSizeRect(&ok);
if (!ok)
return;
@@ -328,7 +328,7 @@ void RectangularOverlay::slotResizeHandleMoved( int id, double dx, double dy )
}
-QRect RectangularOverlay::getSizeRect( bool *ok, bool *widthOk, bool *heightOk ) const
+TQRect RectangularOverlay::getSizeRect( bool *ok, bool *widthOk, bool *heightOk ) const
{
bool t1,t2,t3;
if (!ok)
@@ -341,12 +341,12 @@ QRect RectangularOverlay::getSizeRect( bool *ok, bool *widthOk, bool *heightOk
int width = int(m_br->x() - m_tl->x());
int height = int(m_br->y() - m_tl->y());
- QRect sizeRect( int(m_tl->x() - p_item->x()),
+ TQRect sizeRect( int(m_tl->x() - p_item->x()),
int(m_tl->y() - p_item->y()),
width, height );
- *widthOk = sizeRect.width() >= p_item->minimumSize().width();
- *heightOk = sizeRect.height() >= p_item->minimumSize().height();
+ *widthOk = sizeRect.width() >= p_item->tqminimumSize().width();
+ *heightOk = sizeRect.height() >= p_item->tqminimumSize().height();
*ok = *widthOk && *heightOk;
return sizeRect;
@@ -356,11 +356,11 @@ QRect RectangularOverlay::getSizeRect( bool *ok, bool *widthOk, bool *heightOk
//BEGIN class LineOverlay
-LineOverlay::LineOverlay( Item * parent )
- : ResizeOverlay(parent)
+LineOverlay::LineOverlay( Item * tqparent )
+ : ResizeOverlay(tqparent)
{
- connect( parent, SIGNAL(resized()), this, SLOT(slotUpdateResizeHandles()) );
- connect( parent, SIGNAL(movedBy(double, double )), this, SLOT(slotMoveAllResizeHandles(double, double )) );
+ connect( tqparent, TQT_SIGNAL(resized()), this, TQT_SLOT(slotUpdateResizeHandles()) );
+ connect( tqparent, TQT_SIGNAL(movedBy(double, double )), this, TQT_SLOT(slotMoveAllResizeHandles(double, double )) );
m_pStart = createResizeHandle( ResizeHandle::rhp_start, ResizeHandle::dt_point_rect );
m_pEnd = createResizeHandle( ResizeHandle::rhp_end, ResizeHandle::dt_point_rect );
@@ -369,13 +369,13 @@ LineOverlay::LineOverlay( Item * parent )
}
-QPoint LineOverlay::startPoint() const
+TQPoint LineOverlay::startPoint() const
{
- return QPoint( int(m_pStart->x()), int(m_pStart->y()) );
+ return TQPoint( int(m_pStart->x()), int(m_pStart->y()) );
}
-QPoint LineOverlay::endPoint() const
+TQPoint LineOverlay::endPoint() const
{
- return QPoint( int(m_pEnd->x()), int(m_pEnd->y()) );
+ return TQPoint( int(m_pEnd->x()), int(m_pEnd->y()) );
}
@@ -404,7 +404,7 @@ void LineOverlay::slotResizeHandleMoved( int id, double dx, double dy )
//BEGIN class ResizeHandle
ResizeHandle::ResizeHandle( ResizeOverlay *resizeOverlay, int id, DrawType drawType, int xsnap, int ysnap )
- : QObject(), QCanvasRectangle( 0, 0, 13, 13, resizeOverlay->parentItem()->canvas() )
+ : TQObject(), TQCanvasRectangle( 0, 0, 13, 13, resizeOverlay->tqparentItem()->canvas() )
{
p_resizeOverlay = resizeOverlay;
m_drawType = drawType;
@@ -431,15 +431,15 @@ void ResizeHandle::setHover( bool hover )
return;
b_hover = hover;
- canvas()->setChanged( QRect( int(x())-8, int(y())-8, 15, 15 ) );
+ canvas()->setChanged( TQRect( int(x())-8, int(y())-8, 15, 15 ) );
}
-QPointArray ResizeHandle::areaPoints() const
+TQPointArray ResizeHandle::areaPoints() const
{
-// QPointArray pa = QCanvasRectangle::areaPoints();
+// TQPointArray pa = TQCanvasRectangle::areaPoints();
// pa.translate( -7, -7 );
// return pa;
- return QPointArray( QRect( int(x())-8, int(y())-8, 15, 15 ) );
+ return TQPointArray( TQRect( int(x())-8, int(y())-8, 15, 15 ) );
}
void ResizeHandle::moveRH( double _x, double _y )
@@ -485,12 +485,12 @@ void ResizeHandle::setDrawType( DrawType drawType )
canvas()->setChanged(boundingRect());
}
-void ResizeHandle::drawShape( QPainter &p )
+void ResizeHandle::drawShape( TQPainter &p )
{
- p.drawPixmap( rect().topLeft()-QPoint( 7, 7 ), handlePixmap( m_drawType, b_hover ) );
+ p.drawPixmap( rect().topLeft()-TQPoint( 7, 7 ), handlePixmap( m_drawType, b_hover ) );
}
-const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
+const TQPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
{
const char * resize_forwardsDiagonal_hover_xpm[] = {
"13 13 3 1",
@@ -510,7 +510,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" .+++.. ",
" ....... ",
" "};
- static QPixmap pixmap_forwardsDiagonal_hover(resize_forwardsDiagonal_hover_xpm);
+ static TQPixmap pixmap_forwardsDiagonal_hover(resize_forwardsDiagonal_hover_xpm);
const char * resize_forwardsDiagonal_nohover_xpm[] = {
"13 13 2 1",
@@ -529,7 +529,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" ...... ",
" ....... ",
" "};
- static QPixmap pixmap_forwardsDiagonal_nohover(resize_forwardsDiagonal_nohover_xpm);
+ static TQPixmap pixmap_forwardsDiagonal_nohover(resize_forwardsDiagonal_nohover_xpm);
const char * resize_backwardsDiagonal_hover_xpm[] = {
@@ -550,7 +550,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" ..+++. ",
" ....... ",
" "};
- static QPixmap pixmap_backwardsDiagonal_hover(resize_backwardsDiagonal_hover_xpm);
+ static TQPixmap pixmap_backwardsDiagonal_hover(resize_backwardsDiagonal_hover_xpm);
const char * resize_backwardsDiagonal_nohover_xpm[] = {
"13 13 2 1",
@@ -569,7 +569,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" ...... ",
" ....... ",
" "};
- static QPixmap pixmap_backwardsDiagonal_nohover(resize_backwardsDiagonal_nohover_xpm);
+ static TQPixmap pixmap_backwardsDiagonal_nohover(resize_backwardsDiagonal_nohover_xpm);
const char * resize_vertical_hover_xpm[] = {
@@ -590,7 +590,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" ..+.. ",
" ... ",
" . "};
- static QPixmap pixmap_vertical_hover(resize_vertical_hover_xpm);
+ static TQPixmap pixmap_vertical_hover(resize_vertical_hover_xpm);
const char * resize_vertical_nohover_xpm[] = {
"13 13 2 1",
@@ -609,7 +609,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" ..... ",
" ... ",
" . "};
- static QPixmap pixmap_vertical_nohover(resize_vertical_nohover_xpm);
+ static TQPixmap pixmap_vertical_nohover(resize_vertical_nohover_xpm);
const char * resize_horizontal_hover_xpm[] = {
@@ -630,7 +630,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" . . ",
" ",
" "};
- static QPixmap pixmap_horizontal_hover(resize_horizontal_hover_xpm);
+ static TQPixmap pixmap_horizontal_hover(resize_horizontal_hover_xpm);
const char * resize_horizontal_nohover_xpm[] = {
"13 13 2 1",
@@ -649,7 +649,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" . . ",
" ",
" "};
- static QPixmap pixmap_horizontal_nohover(resize_horizontal_nohover_xpm);
+ static TQPixmap pixmap_horizontal_nohover(resize_horizontal_nohover_xpm);
const char * point_rect_hover_xpm[] = {
"13 13 3 1",
@@ -669,7 +669,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" ",
" ",
" "};
- static QPixmap pixmap_point_rect_hover(point_rect_hover_xpm);
+ static TQPixmap pixmap_point_rect_hover(point_rect_hover_xpm);
const char * point_rect_nohover_xpm[] = {
"13 13 3 1",
@@ -689,7 +689,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
" ",
" ",
" "};
- static QPixmap pixmap_point_rect_nohover(point_rect_nohover_xpm);
+ static TQPixmap pixmap_point_rect_nohover(point_rect_nohover_xpm);
if (hover)
{
@@ -738,7 +738,7 @@ const QPixmap& ResizeHandle::handlePixmap( DrawType drawType, bool hover )
}
}
- static QPixmap blank;
+ static TQPixmap blank;
return blank;
}
//END class ResizeHandle
diff --git a/src/resizeoverlay.h b/src/resizeoverlay.h
index c71e6de..2684ede 100644
--- a/src/resizeoverlay.h
+++ b/src/resizeoverlay.h
@@ -13,25 +13,26 @@
// This file contains class definitions for different types of resizing and rotating
-#include <qcanvas.h>
-#include <qguardedptr.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqcanvas.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class MechanicsItem;
class ResizeHandle;
class ResizeOverlay;
-class QEvent;
+class TQEvent;
-typedef QMap< int, QGuardedPtr<ResizeHandle> > ResizeHandleMap;
+typedef TQMap< int, TQGuardedPtr<ResizeHandle> > ResizeHandleMap;
/**
@author David Saxton
*/
-class ResizeHandle : public QObject, public QCanvasRectangle
+class ResizeHandle : public TQObject, public TQCanvasRectangle
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Convenience enumeration for resize handle positioning. Note: this class
@@ -85,9 +86,9 @@ public:
void moveRH( double x, double y );
void setHover( bool hover );
- static const QPixmap& handlePixmap( DrawType drawType, bool hover );
+ static const TQPixmap& handlePixmap( DrawType drawType, bool hover );
- virtual QPointArray areaPoints () const;
+ virtual TQPointArray areaPoints () const;
public slots:
void slotMoveByX( double dx ) { moveBy( dx, 0 ); }
@@ -99,7 +100,7 @@ signals:
void rhMovedByY( double dy );
protected:
- virtual void drawShape( QPainter &p );
+ virtual void drawShape( TQPainter &p );
DrawType m_drawType;
bool b_hover; // If true, then paint resize handle for mouse hovering over
int m_id;
@@ -108,19 +109,20 @@ protected:
ResizeOverlay *p_resizeOverlay;
};
-typedef QValueList<ResizeHandle*> ResizeHandleList;
+typedef TQValueList<ResizeHandle*> ResizeHandleList;
/**
@author David Saxton
*/
-class ResizeOverlay : public QObject
+class ResizeOverlay : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ResizeOverlay( Item *parent );
+ ResizeOverlay( Item *tqparent );
~ResizeOverlay();
- Item *parentItem() const { return p_item; }
+ Item *tqparentItem() const { return p_item; }
/**
* Shows / hides the resize handles. They are hidden by default.
@@ -189,8 +191,9 @@ protected:
class MechanicsItemOverlay : public ResizeOverlay
{
Q_OBJECT
+ TQ_OBJECT
public:
- MechanicsItemOverlay( MechanicsItem *parent );
+ MechanicsItemOverlay( MechanicsItem *tqparent );
~MechanicsItemOverlay();
public slots:
@@ -219,17 +222,18 @@ protected:
class RectangularOverlay : public ResizeOverlay
{
Q_OBJECT
+ TQ_OBJECT
public:
RectangularOverlay( Item *item, int xsnap = 1, int ysnap = 1 );
void removeTopMiddle();
void removeBotMiddle();
/**
* Get the size rectangle from the position of the handles. If the size
- * is invalid (e.g. the parent Item does not consider it a valid size,
+ * is invalid (e.g. the tqparent Item does not consider it a valid size,
* then *ok is set to false; otherwise to true.
* @returns the sizerect, regardless of whether or not it is valid
*/
- QRect getSizeRect( bool *ok = 0l, bool *widthOk = 0l, bool *heightOk = 0l ) const;
+ TQRect getSizeRect( bool *ok = 0l, bool *widthOk = 0l, bool *heightOk = 0l ) const;
virtual bool isValidXPos( ResizeHandle *rh );
virtual bool isValidYPos( ResizeHandle *rh );
@@ -257,10 +261,11 @@ protected:
class LineOverlay : public ResizeOverlay
{
Q_OBJECT
+ TQ_OBJECT
public:
- LineOverlay( Item * parent );
- QPoint startPoint() const;
- QPoint endPoint() const;
+ LineOverlay( Item * tqparent );
+ TQPoint startPoint() const;
+ TQPoint endPoint() const;
public slots:
void slotUpdateResizeHandles();
diff --git a/src/simulator.cpp b/src/simulator.cpp
index c0f406d..bc6ab55 100644
--- a/src/simulator.cpp
+++ b/src/simulator.cpp
@@ -15,7 +15,7 @@
#include "switch.h"
#include <kstaticdeleter.h>
-#include <qtimer.h>
+#include <tqtimer.h>
//BEGIN class Simulator
@@ -56,8 +56,8 @@ Simulator::Simulator()
m_pChangedCircuitStart = new Circuit;
m_pChangedCircuitLast = m_pChangedCircuitStart;
- QTimer * stepTimer = new QTimer(this);
- connect( stepTimer, SIGNAL(timeout()), this, SLOT(step()) );
+ TQTimer * stepTimer = new TQTimer(this);
+ connect( stepTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(step()) );
stepTimer->start(1);
}
@@ -80,7 +80,7 @@ void Simulator::step()
if (!m_bIsSimulating)
return;
- // We are called a thousand times a second (the maximum allowed by QTimer),
+ // We are called a thousand times a second (the maximum allowed by TQTimer),
// so divide the LINEAR_UPDATE_RATE by 1e3 for the number of loops we need
// to do.
const unsigned maxSteps = unsigned(LINEAR_UPDATE_RATE/1e3);
@@ -247,7 +247,7 @@ void Simulator::createLogicChain( LogicOut * logicOut, const LogicInList & logic
addChangedLogic(logicOut);
logicOut->setCanAddChanged(false);
- if ( !m_logicChainStarts.contains( logicOut ) )
+ if ( !m_logicChainStarts.tqcontains( logicOut ) )
m_logicChainStarts << logicOut;
}
@@ -383,8 +383,8 @@ void Simulator::removeLogicInReferences( LogicIn * logicIn )
if ( !logicIn )
return;
- QValueList<LogicOut*>::iterator end = m_logicChainStarts.end();
- for ( QValueList<LogicOut*>::iterator it = m_logicChainStarts.begin(); it != end; ++it )
+ TQValueList<LogicOut*>::iterator end = m_logicChainStarts.end();
+ for ( TQValueList<LogicOut*>::iterator it = m_logicChainStarts.begin(); it != end; ++it )
{
LogicIn * logicCallback = *it;
while (logicCallback)
diff --git a/src/simulator.h b/src/simulator.h
index a6ade3a..fd03173 100644
--- a/src/simulator.h
+++ b/src/simulator.h
@@ -38,8 +38,8 @@ class LogicOut;
class Switch;
class Wire;
-typedef QValueList<ECNode*> ECNodeList;
-typedef QValueList<LogicIn*> LogicInList;
+typedef TQValueList<ECNode*> ECNodeList;
+typedef TQValueList<LogicIn*> LogicInList;
typedef void(Component::*VoidCallbackPtr)();
@@ -80,9 +80,10 @@ This singleton class oversees all simulation (keeping in sync linear, nonlinear,
logic, external simulators (such as gpsim), mechanical simulation, etc).
@author David Saxton
*/
-class Simulator : public QObject
+class Simulator : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
static Simulator * self();
~Simulator();
@@ -208,7 +209,7 @@ class Simulator : public QObject
static Simulator * m_pSelf;
///List of LogicOuts that are at the start of a LogicChain
- QValueList<LogicOut*> m_logicChainStarts;
+ TQValueList<LogicOut*> m_logicChainStarts;
LogicOut * m_pChangedLogicStart;
LogicOut * m_pChangedLogicLast;
diff --git a/src/textdocument.cpp b/src/textdocument.cpp
index ba03c04..41caf94 100644
--- a/src/textdocument.cpp
+++ b/src/textdocument.cpp
@@ -34,9 +34,9 @@
#include <ktempfile.h>
-TextDocument *TextDocument::constructTextDocument( const QString& caption, KTechlab *parent, const char *name )
+TextDocument *TextDocument::constructTextDocument( const TQString& caption, KTechlab *tqparent, const char *name )
{
- TextDocument *textDocument = new TextDocument( caption, parent, name);
+ TextDocument *textDocument = new TextDocument( caption, tqparent, name);
if( textDocument->m_constructorSuccessful )
return textDocument;
delete textDocument;
@@ -44,7 +44,7 @@ TextDocument *TextDocument::constructTextDocument( const QString& caption, KTech
}
-TextDocument::TextDocument( const QString &caption, KTechlab *ktechlab, const char *name )
+TextDocument::TextDocument( const TQString &caption, KTechlab *ktechlab, const char *name )
: Document( caption, ktechlab, name ),
m_doc(0)
{
@@ -73,11 +73,11 @@ TextDocument::TextDocument( const QString &caption, KTechlab *ktechlab, const ch
guessScheme();
- connect( m_doc, SIGNAL(undoChanged()), this, SIGNAL(undoRedoStateChanged()) );
- connect( m_doc, SIGNAL(undoChanged()), this, SLOT(slotSyncModifiedStates()) );
- connect( m_doc, SIGNAL(textChanged()), this, SLOT(slotSyncModifiedStates()) );
- connect( m_doc, SIGNAL(marksChanged()), this, SLOT(slotUpdateMarksInfo()) );
- connect( m_doc, SIGNAL(selectionChanged()), this, SLOT(slotSelectionmChanged()) );
+ connect( m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SIGNAL(undoRedoStateChanged()) );
+ connect( m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slotSyncModifiedStates()) );
+ connect( m_doc, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotSyncModifiedStates()) );
+ connect( m_doc, TQT_SIGNAL(marksChanged()), this, TQT_SLOT(slotUpdateMarksInfo()) );
+ connect( m_doc, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionmChanged()) );
m_doc->setDescription((KTextEditor::MarkInterface::MarkTypes)Breakpoint, i18n("Breakpoint"));
m_doc->setPixmap((KTextEditor::MarkInterface::MarkTypes)Breakpoint, *inactiveBreakpointPixmap());
@@ -118,7 +118,7 @@ TextDocument::~TextDocument()
bool TextDocument::fileClose()
{
- const QString path = url().prettyURL();
+ const TQString path = url().prettyURL();
if ( !path.isEmpty() )
fileMetaInfo()->grabMetaInfo( path, this );
@@ -143,9 +143,9 @@ View * TextDocument::createView( ViewContainer *viewContainer, uint viewAreaId,
}
-Kate::View* TextDocument::createKateView( QWidget *parent, const char *name )
+Kate::View* TextDocument::createKateView( TQWidget *tqparent, const char *name )
{
- return static_cast<Kate::View*>((m_doc->createView( parent, name ))->qt_cast("Kate::View"));
+ return static_cast<Kate::View*>((m_doc->createView( tqparent, name ))->qt_cast("Kate::View"));
}
@@ -166,13 +166,13 @@ void TextDocument::paste()
}
-void TextDocument::setText( const QString & text, bool asInitial )
+void TextDocument::setText( const TQString & text, bool asInitial )
{
if ( asInitial )
{
- disconnect( m_doc, SIGNAL(undoChanged()), this, SIGNAL(undoRedoStateChanged()) );
- disconnect( m_doc, SIGNAL(undoChanged()), this, SLOT(slotSyncModifiedStates()) );
- disconnect( m_doc, SIGNAL(textChanged()), this, SLOT(slotSyncModifiedStates()) );
+ disconnect( m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SIGNAL(undoRedoStateChanged()) );
+ disconnect( m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slotSyncModifiedStates()) );
+ disconnect( m_doc, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotSyncModifiedStates()) );
}
const ViewList::iterator end = m_viewList.end();
@@ -190,9 +190,9 @@ void TextDocument::setText( const QString & text, bool asInitial )
m_doc->clearRedo();
setModified(false);
- connect( m_doc, SIGNAL(undoChanged()), this, SIGNAL(undoRedoStateChanged()) );
- connect( m_doc, SIGNAL(undoChanged()), this, SLOT(slotSyncModifiedStates()) );
- connect( m_doc, SIGNAL(textChanged()), this, SLOT(slotSyncModifiedStates()) );
+ connect( m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SIGNAL(undoRedoStateChanged()) );
+ connect( m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slotSyncModifiedStates()) );
+ connect( m_doc, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotSyncModifiedStates()) );
}
}
@@ -230,8 +230,8 @@ void TextDocument::setModified( bool modified )
void TextDocument::guessScheme( bool allowDisable )
{
// And specific file actions depending on the current type of file
- QString fileName = url().fileName();
- QString extension = fileName.right( fileName.length() - fileName.findRev('.') - 1 );
+ TQString fileName = url().fileName();
+ TQString extension = fileName.right( fileName.length() - fileName.tqfindRev('.') - 1 );
if ( extension == "asm" || extension == "src" || extension == "inc" )
slotInitLanguage(ct_asm);
@@ -255,7 +255,7 @@ void TextDocument::guessScheme( bool allowDisable )
void TextDocument::slotInitLanguage( CodeType type )
{
- QString hlName;
+ TQString hlName;
switch (type)
{
@@ -302,7 +302,7 @@ void TextDocument::slotInitLanguage( CodeType type )
void TextDocument::formatAssembly()
{
AsmFormatter formatter;
- QStringList lines = QStringList::split( "\n", m_doc->text(), true );
+ TQStringList lines = TQStringList::split( "\n", m_doc->text(), true );
setText( formatter.tidyAsm(lines), false );
setModified(true);
}
@@ -363,12 +363,12 @@ void TextDocument::setLastTextOutputTarget( TextDocument * target )
}
-QString TextDocument::outputFilePath( const QString &ext )
+TQString TextDocument::outputFilePath( const TQString &ext )
{
- QString filePath = url().path();
+ TQString filePath = url().path();
if ( filePath.isEmpty() )
{
- KTempFile f( QString::null, ext );
+ KTempFile f( TQString(), ext );
(*f.textStream()) << m_doc->text();
f.close();
DocManager::self()->associateDocument( f.name(), this );
@@ -406,7 +406,7 @@ void TextDocument::slotConvertTo( int target )
void TextDocument::convertToAssembly()
{
- QString filePath;
+ TQString filePath;
bool showPICSelect = false;
ProcessOptions::ProcessPath::MediaType toType;
@@ -447,7 +447,7 @@ void TextDocument::convertToAssembly()
return;
ProcessOptions o( dlg.info() );
- o.setTextOutputTarget( m_pLastTextOutputTarget, this, SLOT(setLastTextOutputTarget( TextDocument* )) );
+ o.setTextOutputTarget( m_pLastTextOutputTarget, this, TQT_SLOT(setLastTextOutputTarget( TextDocument* )) );
o.setInputFiles(filePath);
o.setProcessPath( ProcessOptions::ProcessPath::path( ProcessOptions::guessMediaType(filePath), toType ) );
LanguageManager::self()->compile(o);
@@ -456,7 +456,7 @@ void TextDocument::convertToAssembly()
void TextDocument::convertToHex()
{
- QString filePath;
+ TQString filePath;
bool showPICSelect = false;
if ( m_guessedCodeType == TextDocument::ct_microbe )
@@ -489,7 +489,7 @@ void TextDocument::convertToHex()
return;
ProcessOptions o( dlg.info() );
- o.setTextOutputTarget( m_pLastTextOutputTarget, this, SLOT(setLastTextOutputTarget( TextDocument* )) );
+ o.setTextOutputTarget( m_pLastTextOutputTarget, this, TQT_SLOT(setLastTextOutputTarget( TextDocument* )) );
o.setInputFiles(filePath);
o.setProcessPath( ProcessOptions::ProcessPath::path( ProcessOptions::guessMediaType(filePath), ProcessOptions::ProcessPath::Program ) );
LanguageManager::self()->compile(o);
@@ -498,9 +498,9 @@ void TextDocument::convertToHex()
void TextDocument::convertToPIC()
{
- QString filePath;
+ TQString filePath;
- QString picID;
+ TQString picID;
switch ( m_guessedCodeType )
{
@@ -530,7 +530,7 @@ void TextDocument::convertToPIC()
return;
}
- ProgrammerDlg * dlg = new ProgrammerDlg( picID, (QWidget*)p_ktechlab, "Programmer Dlg" );
+ ProgrammerDlg * dlg = new ProgrammerDlg( picID, (TQWidget*)p_ktechlab, "Programmer Dlg" );
if ( m_guessedCodeType == TextDocument::ct_c )
dlg->microSelect()->setAllowedAsmSet( AsmInfo::PIC14 | AsmInfo::PIC16 );
@@ -569,7 +569,7 @@ IntList TextDocument::bookmarkList() const
{
IntList bookmarkList;
- typedef QPtrList<KTextEditor::Mark> MarkList;
+ typedef TQPtrList<KTextEditor::Mark> MarkList;
MarkList markList = m_doc->marks();
// Find out what marks need adding to our internal lists
@@ -596,16 +596,16 @@ void TextDocument::slotUpdateMarksInfo()
p_ktechlab->unplugActionList("bookmark_actionlist");
m_bookmarkActions.clear();
- QPtrList<KTextEditor::Mark> markList = m_doc->marks();
+ TQPtrList<KTextEditor::Mark> markList = m_doc->marks();
// Find out what marks need adding to our internal lists
for ( KTextEditor::Mark * mark = markList.first(); mark; mark = markList.next() )
{
if ( mark->type & Bookmark )
{
- KAction * a = new KAction( i18n("%1 - %2").arg( QString::number( mark->line+1 ) ).arg( m_doc->textLine(mark->line) ),
- 0, this, SLOT(slotBookmarkRequested()), this,
- QString("bookmark_%1").arg(QString::number(mark->line).ascii()) );
+ KAction * a = new KAction( i18n("%1 - %2").tqarg( TQString::number( mark->line+1 ) ).tqarg( m_doc->textLine(mark->line) ),
+ 0, this, TQT_SLOT(slotBookmarkRequested()), this,
+ TQString("bookmark_%1").tqarg(TQString::number(mark->line).ascii()) );
m_bookmarkActions.append(a);
}
}
@@ -616,10 +616,10 @@ void TextDocument::slotUpdateMarksInfo()
void TextDocument::slotBookmarkRequested()
{
- const QObject * s = sender();
+ const TQObject * s = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
if (!s) return;
- QString name = s->name();
+ TQString name = s->name();
if ( !name.startsWith("bookmark_") )
return;
@@ -643,7 +643,7 @@ void TextDocument::setBookmarks( const IntList &lines )
void TextDocument::clearBookmarks()
{
- QPtrList<KTextEditor::Mark> markList = m_doc->marks();
+ TQPtrList<KTextEditor::Mark> markList = m_doc->marks();
// Find out what marks need adding to our internal lists
for ( KTextEditor::Mark * mark = markList.first(); mark; mark = markList.next() )
@@ -682,7 +682,7 @@ IntList TextDocument::breakpointList() const
IntList breakpointList;
#ifndef NO_GPSIM
- typedef QPtrList<KTextEditor::Mark> MarkList;
+ typedef TQPtrList<KTextEditor::Mark> MarkList;
MarkList markList = m_doc->marks();
// Find out what marks need adding to our internal lists
@@ -752,7 +752,7 @@ void TextDocument::debugRun()
break;
}
- m_symbolFile = GpsimProcessor::generateSymbolFile( m_debugFile, this, SLOT(slotCODCreationSucceeded()), SLOT(slotCODCreationFailed()) );
+ m_symbolFile = GpsimProcessor::generateSymbolFile( m_debugFile, this, TQT_SLOT(slotCODCreationSucceeded()), TQT_SLOT(slotCODCreationFailed()) );
#endif // !NO_GPSIM
}
@@ -868,8 +868,8 @@ void TextDocument::slotCODCreationSucceeded()
void TextDocument::slotCODCreationFailed()
{
#ifndef NO_GPSIM
- m_debugFile = QString::null;
- m_symbolFile = QString::null;
+ m_debugFile = TQString();
+ m_symbolFile = TQString();
#endif // !NO_GPSIM
}
@@ -879,7 +879,7 @@ void TextDocument::slotDebuggerDestroyed()
#ifndef NO_GPSIM
slotDebugSetCurrentLine( SourceLine() );
m_pDebugger = 0l;
- m_debugFile = QString::null;
+ m_debugFile = TQString();
slotInitDebugActions();
#endif // !NO_GPSIM
}
@@ -888,7 +888,7 @@ void TextDocument::slotDebuggerDestroyed()
#ifndef NO_GPSIM
void TextDocument::clearBreakpoints()
{
- QPtrList<KTextEditor::Mark> markList = m_doc->marks();
+ TQPtrList<KTextEditor::Mark> markList = m_doc->marks();
// Find out what marks need adding to our internal lists
for ( KTextEditor::Mark * mark = markList.first(); mark; mark = markList.next() )
@@ -912,7 +912,7 @@ void TextDocument::syncBreakpoints()
b_lockSyncBreakpoints = true;
- typedef QPtrList<KTextEditor::Mark> MarkList;
+ typedef TQPtrList<KTextEditor::Mark> MarkList;
MarkList markList = m_doc->marks();
IntList bpList;
@@ -959,7 +959,7 @@ void TextDocument::setDebugger( GpsimDebugger * debugger, bool ownDebugger )
return;
// Reset it for use next time
- m_symbolFile = QString::null;
+ m_symbolFile = TQString();
if (m_bOwnDebugger)
delete m_pDebugger;
@@ -973,9 +973,9 @@ void TextDocument::setDebugger( GpsimDebugger * debugger, bool ownDebugger )
if ( m_debugFile.isEmpty() )
m_debugFile = url().path();
- connect( m_pDebugger, SIGNAL(destroyed()), this, SLOT(slotDebuggerDestroyed()) );
- connect( m_pDebugger->gpsim(), SIGNAL(runningStatusChanged(bool )), this, SLOT(slotInitDebugActions()) );
- connect( m_pDebugger, SIGNAL(lineReached(const SourceLine &)), this, SLOT(slotDebugSetCurrentLine(const SourceLine &)) );
+ connect( m_pDebugger, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDebuggerDestroyed()) );
+ connect( m_pDebugger->gpsim(), TQT_SIGNAL(runningStatusChanged(bool )), this, TQT_SLOT(slotInitDebugActions()) );
+ connect( m_pDebugger, TQT_SIGNAL(lineReached(const SourceLine &)), this, TQT_SLOT(slotDebugSetCurrentLine(const SourceLine &)) );
m_pDebugger->setBreakpoints( m_debugFile, breakpointList() );
slotInitDebugActions();
@@ -988,7 +988,7 @@ void TextDocument::setDebugger( GpsimDebugger * debugger, bool ownDebugger )
#endif // !NO_GPSIM
-const QPixmap* TextDocument::inactiveBreakpointPixmap()
+const TQPixmap* TextDocument::inactiveBreakpointPixmap()
{
const char*breakpoint_gr_xpm[]={
"11 16 6 1",
@@ -1014,12 +1014,12 @@ const QPixmap* TextDocument::inactiveBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_gr_xpm );
+ static TQPixmap pixmap( breakpoint_gr_xpm );
return &pixmap;
}
-const QPixmap* TextDocument::activeBreakpointPixmap()
+const TQPixmap* TextDocument::activeBreakpointPixmap()
{
const char* breakpoint_xpm[]={
"11 16 6 1",
@@ -1045,13 +1045,13 @@ const QPixmap* TextDocument::activeBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_xpm );
+ static TQPixmap pixmap( breakpoint_xpm );
return &pixmap;
}
-const QPixmap* TextDocument::reachedBreakpointPixmap()
+const TQPixmap* TextDocument::reachedBreakpointPixmap()
{
const char*breakpoint_bl_xpm[]={
"11 16 7 1",
@@ -1078,12 +1078,12 @@ const QPixmap* TextDocument::reachedBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_bl_xpm );
+ static TQPixmap pixmap( breakpoint_bl_xpm );
return &pixmap;
}
-const QPixmap* TextDocument::disabledBreakpointPixmap()
+const TQPixmap* TextDocument::disabledBreakpointPixmap()
{
const char*breakpoint_wh_xpm[]={
"11 16 7 1",
@@ -1110,12 +1110,12 @@ const QPixmap* TextDocument::disabledBreakpointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( breakpoint_wh_xpm );
+ static TQPixmap pixmap( breakpoint_wh_xpm );
return &pixmap;
}
-const QPixmap* TextDocument::executionPointPixmap()
+const TQPixmap* TextDocument::executionPointPixmap()
{
const char*exec_xpm[]={
"11 16 4 1",
@@ -1139,7 +1139,7 @@ const QPixmap* TextDocument::executionPointPixmap()
"...........",
"...........",
"..........."};
- static QPixmap pixmap( exec_xpm );
+ static TQPixmap pixmap( exec_xpm );
return &pixmap;
}
diff --git a/src/textdocument.h b/src/textdocument.h
index 1876473..18e4e81 100644
--- a/src/textdocument.h
+++ b/src/textdocument.h
@@ -14,7 +14,7 @@
#include "config.h"
#include "document.h"
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kate/document.h>
@@ -22,7 +22,7 @@ class GpsimDebugger;
class SourceLine;
class TextView;
-typedef QValueList<int> IntList;
+typedef TQValueList<int> IntList;
/**
@author David Saxton
@@ -30,6 +30,7 @@ typedef QValueList<int> IntList;
class TextDocument : public Document
{
Q_OBJECT
+ TQ_OBJECT
public:
~TextDocument();
@@ -58,7 +59,7 @@ public:
* it if successful, or 0 if it failed.
* @returns pointer to constructed object, or 0 if there was a problem
*/
- static TextDocument *constructTextDocument( const QString& caption, KTechlab *parent, const char *name = 0L );
+ static TextDocument *constructTextDocument( const TQString& caption, KTechlab *tqparent, const char *name = 0L );
/**
* @returns the guessed code type that this file is
*/
@@ -106,7 +107,7 @@ public:
* Returns true if we are in stepping more
*/
bool debuggerIsStepping() const;
- QString debugFile() const { return m_debugFile; }
+ TQString debugFile() const { return m_debugFile; }
virtual void clearBreakpoints();
#endif
@@ -118,7 +119,7 @@ public:
* @param asInitial whether the next should be treated as if we had just
* opened the file (no undo/redo history, and unmodified).
*/
- void setText( const QString & text, bool asInitial );
+ void setText( const TQString & text, bool asInitial );
/**
* Attempts to guess the filetype from the file extension, and load an
* appropriate highlighting/etc
@@ -132,7 +133,7 @@ public:
virtual void print();
virtual void setModified( bool modified );
- Kate::View* createKateView( QWidget *parent, const char *name = 0l );
+ Kate::View* createKateView( TQWidget *tqparent, const char *name = 0l );
virtual void undo();
virtual void redo();
@@ -147,11 +148,11 @@ public:
void clearBookmarks();
virtual bool fileClose();
- static const QPixmap* inactiveBreakpointPixmap();
- static const QPixmap* activeBreakpointPixmap();
- static const QPixmap* reachedBreakpointPixmap();
- static const QPixmap* disabledBreakpointPixmap();
- static const QPixmap* executionPointPixmap();
+ static const TQPixmap* inactiveBreakpointPixmap();
+ static const TQPixmap* activeBreakpointPixmap();
+ static const TQPixmap* reachedBreakpointPixmap();
+ static const TQPixmap* disabledBreakpointPixmap();
+ static const TQPixmap* executionPointPixmap();
/**
* Returns a TextView pointer to the active TextView (if there is one)
*/
@@ -202,7 +203,7 @@ protected:
* returned. Otherwise, a temporary file with the given extension (ext) is
* created, and the location of this file is returned.
*/
- QString outputFilePath( const QString &ext );
+ TQString outputFilePath( const TQString &ext );
void saveDone();
#ifndef NO_GPSIM
/**
@@ -216,7 +217,7 @@ protected:
#endif
Kate::Document *m_doc;
- QGuardedPtr<TextDocument> m_pLastTextOutputTarget;
+ TQGuardedPtr<TextDocument> m_pLastTextOutputTarget;
private slots:
void setLastTextOutputTarget( TextDocument * target );
@@ -228,17 +229,17 @@ private slots:
void slotSelectionmChanged();
private:
- TextDocument( const QString& caption, KTechlab *parent, const char *name = 0L );
+ TextDocument( const TQString& caption, KTechlab *tqparent, const char *name = 0L );
bool m_constructorSuccessful;
CodeType m_guessedCodeType;
- QPtrList<KAction> m_bookmarkActions;
+ TQPtrList<KAction> m_bookmarkActions;
#ifndef NO_GPSIM
bool b_lockSyncBreakpoints; // Used to avoid calling syncMarks() when we are currently doing so
bool m_bOwnDebugger;
- QGuardedPtr<GpsimDebugger> m_pDebugger;
- QString m_symbolFile;
- QString m_debugFile;
+ TQGuardedPtr<GpsimDebugger> m_pDebugger;
+ TQString m_symbolFile;
+ TQString m_debugFile;
#endif
};
diff --git a/src/textview.cpp b/src/textview.cpp
index 49a1946..0bca8a8 100644
--- a/src/textview.cpp
+++ b/src/textview.cpp
@@ -33,10 +33,10 @@
#include <kpopupmenu.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
//BEGIN class TextView
@@ -60,24 +60,24 @@ TextView::TextView( TextDocument * textDocument, ViewContainer *viewContainer, u
m->insertItem( KGlobal::iconLoader()->loadIcon( "convert_to_assembly", KIcon::Small ), i18n("Assembly"), TextDocument::AssemblyOutput );
m->insertItem( KGlobal::iconLoader()->loadIcon( "convert_to_hex", KIcon::Small ), i18n("Hex"), TextDocument::HexOutput );
m->insertItem( KGlobal::iconLoader()->loadIcon( "convert_to_pic", KIcon::Small ), i18n("PIC (upload)"), TextDocument::PICOutput );
- connect( m, SIGNAL(activated(int)), textDocument, SLOT(slotConvertTo(int)) );
+ connect( m, TQT_SIGNAL(activated(int)), textDocument, TQT_SLOT(slotConvertTo(int)) );
m->setItemEnabled( TextDocument::MicrobeOutput, false );
//END Convert To * Actions
- new KAction( i18n("Format Assembly Code"), "", Qt::Key_F12, textDocument, SLOT(formatAssembly()), ac, "format_asm" );
+ new KAction( i18n("Format Assembly Code"), "", TQt::Key_F12, textDocument, TQT_SLOT(formatAssembly()), ac, "format_asm" );
#ifndef NO_GPSIM
//BEGIN Debug Actions
- new KAction( i18n("Set &Breakpoint"), 0, 0, this, SLOT(toggleBreakpoint()), ac, "debug_toggle_breakpoint" );
- new KAction( i18n("Run"), "dbgrun", 0, textDocument, SLOT(debugRun()), ac, "debug_run" );
- new KAction( i18n("Interrupt"), "player_pause", 0, textDocument, SLOT(debugInterrupt()), ac, "debug_interrupt" );
- new KAction( i18n("Stop"), "stop", 0, textDocument, SLOT(debugStop()), ac, "debug_stop" );
- new KAction( i18n("Step"), "dbgstep", Qt::CTRL|Qt::ALT|Qt::Key_Right, textDocument, SLOT(debugStep()), ac, "debug_step" );
- new KAction( i18n("Step Over"), "dbgnext", 0, textDocument, SLOT(debugStepOver()), ac, "debug_step_over" );
- new KAction( i18n("Step Out"), "dbgstepout", 0, textDocument, SLOT(debugStepOut()), ac, "debug_step_out" );
+ new KAction( i18n("Set &Breakpoint"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(toggleBreakpoint()), ac, "debug_toggle_breakpoint" );
+ new KAction( i18n("Run"), "dbgrun", 0, textDocument, TQT_SLOT(debugRun()), ac, "debug_run" );
+ new KAction( i18n("Interrupt"), "player_pause", 0, textDocument, TQT_SLOT(debugInterrupt()), ac, "debug_interrupt" );
+ new KAction( i18n("Stop"), "stop", 0, textDocument, TQT_SLOT(debugStop()), ac, "debug_stop" );
+ new KAction( i18n("Step"), "dbgstep", TQt::CTRL|TQt::ALT|TQt::Key_Right, textDocument, TQT_SLOT(debugStep()), ac, "debug_step" );
+ new KAction( i18n("Step Over"), "dbgnext", 0, textDocument, TQT_SLOT(debugStepOver()), ac, "debug_step_over" );
+ new KAction( i18n("Step Out"), "dbgstepout", 0, textDocument, TQT_SLOT(debugStepOut()), ac, "debug_step_out" );
//END Debug Actions
#endif
@@ -93,10 +93,10 @@ TextView::TextView( TextDocument * textDocument, ViewContainer *viewContainer, u
m_statusBar->insertItem( "", ViewStatusBar::LineCol );
- m_view->installPopup( static_cast<QPopupMenu*>( p_ktechlab->factory()->container( "ktexteditor_popup", p_ktechlab ) ) );
+ m_view->installPopup( static_cast<TQPopupMenu*>( p_ktechlab->factory()->container( "ktexteditor_popup", p_ktechlab ) ) );
- connect( m_view, SIGNAL(cursorPositionChanged()), this, SLOT(slotCursorPositionChanged()) );
- connect( m_view, SIGNAL(gotFocus(Kate::View*)), this, SLOT(setFocused()) );
+ connect( m_view, TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(slotCursorPositionChanged()) );
+ connect( m_view, TQT_SIGNAL(gotFocus(Kate::View*)), this, TQT_SLOT(setFocused()) );
m_layout->insertWidget( 0, m_view );
@@ -109,10 +109,10 @@ TextView::TextView( TextDocument * textDocument, ViewContainer *viewContainer, u
m_pTextViewLabel->hide();
TextViewEventFilter * eventFilter = new TextViewEventFilter( this );
- connect( eventFilter, SIGNAL(wordHoveredOver( const QString&, int, int )), this, SLOT(slotWordHoveredOver( const QString&, int, int )) );
- connect( eventFilter, SIGNAL(wordUnhovered()), this, SLOT(slotWordUnhovered()) );
+ connect( eventFilter, TQT_SIGNAL(wordHoveredOver( const TQString&, int, int )), this, TQT_SLOT(slotWordHoveredOver( const TQString&, int, int )) );
+ connect( eventFilter, TQT_SIGNAL(wordUnhovered()), this, TQT_SLOT(slotWordUnhovered()) );
- QObject * internalView = m_view->child( 0, "KateViewInternal" );
+ TQObject * internalView = m_view->child( 0, "KateViewInternal" );
internalView->installEventFilter( eventFilter );
#endif
}
@@ -137,7 +137,7 @@ bool TextView::closeView()
{
if ( textDocument() )
{
- const QString path = textDocument()->url().prettyURL();
+ const TQString path = textDocument()->url().prettyURL();
if ( !path.isEmpty() )
fileMetaInfo()->grabMetaInfo( path, this );
}
@@ -262,7 +262,7 @@ void TextView::slotCursorPositionChanged()
uint line, column;
m_view->cursorPosition( &line, &column );
- m_statusBar->changeItem( i18n(" Line: %1 Col: %2 ").arg(QString::number(line+1)).arg(QString::number(column+1)), ViewStatusBar::LineCol );
+ m_statusBar->changeItem( i18n(" Line: %1 Col: %2 ").tqarg(TQString::number(line+1)).tqarg(TQString::number(column+1)), ViewStatusBar::LineCol );
slotUpdateMarksInfo();
}
@@ -309,7 +309,7 @@ void TextView::toggleBreakpoint()
}
-void TextView::slotWordHoveredOver( const QString & word, int line, int col )
+void TextView::slotWordHoveredOver( const TQString & word, int line, int col )
{
#ifndef NO_GPSIM
// We're only interested in popping something up if we currently have a debugger running
@@ -323,7 +323,7 @@ void TextView::slotWordHoveredOver( const QString & word, int line, int col )
// Find out if the word that we are hovering over is the operand data
KTextEditor::EditInterface * e = (KTextEditor::EditInterface*)textDocument()->kateDocument()->qt_cast("KTextEditor::EditInterface");
InstructionParts parts( e->textLine( unsigned(line) ) );
- if ( !parts.operandData().contains( word ) )
+ if ( !parts.operandData().tqcontains( word ) )
return;
if ( RegisterInfo * info = gpsim->registerMemory()->fromName( word ) )
@@ -350,7 +350,7 @@ void TextView::slotWordHoveredOver( const QString & word, int line, int col )
}
}
- m_pTextViewLabel->move( mapFromGlobal( QCursor::pos() ) + QPoint( 0, 20 ) );
+ m_pTextViewLabel->move( mapFromGlobal( TQCursor::pos() ) + TQPoint( 0, 20 ) );
m_pTextViewLabel->show();
#endif // !NO_GPSIM
}
@@ -369,37 +369,37 @@ void TextView::slotWordUnhovered()
//BEGIN class TextViewEventFilter
TextViewEventFilter::TextViewEventFilter( TextView * textView )
{
- m_hoverStatus = Sleeping;
+ m_hovertqStatus = Sleeping;
m_pTextView = textView;
m_lastLine = m_lastCol = -1;
((KTextEditor::TextHintInterface*)textView->kateView()->qt_cast("KTextEditor::TextHintInterface"))->enableTextHints(0);
- connect( textView->kateView(), SIGNAL(needTextHint(int, int, QString &)), this, SLOT(slotNeedTextHint( int, int, QString& )) );
+ connect( textView->kateView(), TQT_SIGNAL(needTextHint(int, int, TQString &)), this, TQT_SLOT(slotNeedTextHint( int, int, TQString& )) );
- m_pHoverTimer = new QTimer( this );
- connect( m_pHoverTimer, SIGNAL(timeout()), this, SLOT(hoverTimeout()) );
+ m_pHoverTimer = new TQTimer( this );
+ connect( m_pHoverTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hoverTimeout()) );
- m_pSleepTimer = new QTimer( this );
- connect( m_pSleepTimer, SIGNAL(timeout()), this, SLOT(gotoSleep()) );
+ m_pSleepTimer = new TQTimer( this );
+ connect( m_pSleepTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(gotoSleep()) );
- m_pNoWordTimer = new QTimer( this );
- connect( m_pNoWordTimer, SIGNAL(timeout()), this, SLOT(slotNoWordTimeout()) );
+ m_pNoWordTimer = new TQTimer( this );
+ connect( m_pNoWordTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotNoWordTimeout()) );
}
-bool TextViewEventFilter::eventFilter( QObject *, QEvent * e )
+bool TextViewEventFilter::eventFilter( TQObject *, TQEvent * e )
{
- if ( e->type() == QEvent::MouseMove )
+ if ( e->type() == TQEvent::MouseMove )
{
if ( !m_pNoWordTimer->isActive() )
m_pNoWordTimer->start( 10 );
return false;
}
- if ( e->type() == QEvent::FocusOut || e->type() == QEvent::FocusIn || e->type() == QEvent::MouseButtonPress || e->type() == QEvent::Leave || e->type() == QEvent::Wheel )
+ if ( e->type() == TQEvent::FocusOut || e->type() == TQEvent::FocusIn || e->type() == TQEvent::MouseButtonPress || e->type() == TQEvent::Leave || e->type() == TQEvent::Wheel )
{
// user moved focus somewhere - hide the tip and sleep
- if ( ((QFocusEvent*)e)->reason() != QFocusEvent::Popup )
+ if ( ((TQFocusEvent*)e)->reason() != TQFocusEvent::Popup )
updateHovering( 0, -1, -1 );
}
@@ -410,15 +410,15 @@ bool TextViewEventFilter::eventFilter( QObject *, QEvent * e )
void TextViewEventFilter::hoverTimeout()
{
m_pSleepTimer->stop();
- m_hoverStatus = Active;
+ m_hovertqStatus = Active;
emit wordHoveredOver( m_lastWord, m_lastLine, m_lastCol );
}
void TextViewEventFilter::gotoSleep()
{
- m_hoverStatus = Sleeping;
- m_lastWord = QString::null;
+ m_hovertqStatus = Sleeping;
+ m_lastWord = TQString();
emit wordUnhovered();
m_pHoverTimer->stop();
}
@@ -430,7 +430,7 @@ void TextViewEventFilter::slotNoWordTimeout()
}
-void TextViewEventFilter::updateHovering( const QString & currentWord, int line, int col )
+void TextViewEventFilter::updateHovering( const TQString & currentWord, int line, int col )
{
if ( (currentWord == m_lastWord) && (line == m_lastLine) )
return;
@@ -441,8 +441,8 @@ void TextViewEventFilter::updateHovering( const QString & currentWord, int line,
if ( currentWord.isEmpty() )
{
- if ( m_hoverStatus == Active )
- m_hoverStatus = Hidden;
+ if ( m_hovertqStatus == Active )
+ m_hovertqStatus = Hidden;
emit wordUnhovered();
if ( !m_pSleepTimer->isActive() )
@@ -451,17 +451,17 @@ void TextViewEventFilter::updateHovering( const QString & currentWord, int line,
return;
}
- if ( m_hoverStatus != Sleeping )
+ if ( m_hovertqStatus != Sleeping )
emit wordHoveredOver( currentWord, line, col );
else
m_pHoverTimer->start( 700, true );
}
-static inline bool isWordLetter( const QString & s ) { return (s.length() == 1) && (s[0].isLetterOrNumber() || s[0] == '_'); }
+static inline bool isWordLetter( const TQString & s ) { return (s.length() == 1) && (s[0].isLetterOrNumber() || s[0] == '_'); }
-void TextViewEventFilter::slotNeedTextHint( int line, int col, QString & )
+void TextViewEventFilter::slotNeedTextHint( int line, int col, TQString & )
{
m_pNoWordTimer->stop();
@@ -470,7 +470,7 @@ void TextViewEventFilter::slotNeedTextHint( int line, int col, QString & )
// Return if we aren't currently in a word
if ( !isWordLetter( e->text( line, col, line, col+1 ) ) )
{
- updateHovering( QString::null, line, col );
+ updateHovering( TQString(), line, col );
return;
}
@@ -485,7 +485,7 @@ void TextViewEventFilter::slotNeedTextHint( int line, int col, QString & )
do wordEnd++;
while ( isWordLetter( e->text( line, wordEnd, line, wordEnd+1 ) ) );
- QString t = e->text( line, wordStart, line, wordEnd );
+ TQString t = e->text( line, wordStart, line, wordEnd );
updateHovering( t, line, col );
}
diff --git a/src/textview.h b/src/textview.h
index 8903843..604b52b 100644
--- a/src/textview.h
+++ b/src/textview.h
@@ -15,10 +15,10 @@
#include "view.h"
#include <kate/view.h>
-#include <qguardedptr.h>
-#include <qlabel.h>
+#include <tqguardedptr.h>
+#include <tqlabel.h>
-class QMouseEvent;
+class TQMouseEvent;
class RegisterInfo;
class TextDocument;
class TextView;
@@ -31,6 +31,7 @@ class VariableLabel;
class TextView : public View
{
Q_OBJECT
+ TQ_OBJECT
public:
TextView( TextDocument *textDocument, ViewContainer *viewContainer, uint viewAreaId, const char *name = 0 );
~TextView();
@@ -78,7 +79,7 @@ class TextView : public View
void slotInitDebugActions();
protected slots:
- void slotWordHoveredOver( const QString & word, int line, int col );
+ void slotWordHoveredOver( const TQString & word, int line, int col );
void slotWordUnhovered();
protected:
@@ -100,13 +101,14 @@ over (used in the debugger).
@author David Saxton
*/
-class TextViewEventFilter : public QObject
+class TextViewEventFilter : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
TextViewEventFilter( TextView * textView );
- bool eventFilter( QObject * watched, QEvent * e );
+ bool eventFilter( TQObject * watched, TQEvent * e );
signals:
/**
@@ -115,14 +117,14 @@ class TextViewEventFilter : public QObject
* mouse, etc, this mode is left. During the mode, any word that is
* under the mouse cursor will be emitted as hoveredOver( word ).
*/
- void wordHoveredOver( const QString & word, int line, int col );
+ void wordHoveredOver( const TQString & word, int line, int col );
/**
* Emitted when focus is lost, the mouse moves to a different word, etc.
*/
void wordUnhovered();
protected slots:
- void slotNeedTextHint( int line, int col, QString & text );
+ void slotNeedTextHint( int line, int col, TQString & text );
/**
* Called when we are not in hover mode, but the user has had his mouse
* in the same position for some time.
@@ -139,7 +141,7 @@ class TextViewEventFilter : public QObject
void slotNoWordTimeout();
protected:
- enum HoverStatus
+ enum HovertqStatus
{
/**
* We are currently hovering - wordHoveredOver was emitted, and
@@ -162,29 +164,29 @@ class TextViewEventFilter : public QObject
* Starts / stops timers, emits signals, etc. See other functions for an
* idea of what this does.
*/
- void updateHovering( const QString & currentWord, int line, int col );
+ void updateHovering( const TQString & currentWord, int line, int col );
/**
* Started when the user moves his mouse over a word, and we are in
* Sleeping mode. Reset when the user moves his mouse, etc.
*/
- QTimer * m_pHoverTimer;
+ TQTimer * m_pHoverTimer;
/**
* Started when a word is unhovered. When this timeouts, we will go to
* Sleeping mode.
*/
- QTimer * m_pSleepTimer;
+ TQTimer * m_pSleepTimer;
/**
* Activated by the user moving the mouse. Reset by a call to
* slotNeedTextHint. This timer is needed as KateViewInternal doesn't
* bother updating us if the mouse cursor isn't over text.
*/
- QTimer * m_pNoWordTimer;
+ TQTimer * m_pNoWordTimer;
TextView * m_pTextView;
- QString m_lastWord;
+ TQString m_lastWord;
int m_lastLine;
int m_lastCol;
- HoverStatus m_hoverStatus;
+ HovertqStatus m_hovertqStatus;
};
#endif
diff --git a/src/variablelabel.cpp b/src/variablelabel.cpp
index a6a6ed1..f4b64b8 100644
--- a/src/variablelabel.cpp
+++ b/src/variablelabel.cpp
@@ -18,23 +18,23 @@
//BEGIN class VariableLabel
-VariableLabel::VariableLabel( TextView * parent )
- : QLabel( parent, "toolTipTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM )
+VariableLabel::VariableLabel( TextView * tqparent )
+ : TQLabel( tqparent, "toolTipTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM )
{
m_value = -1;
setMargin(1);
setAutoMask( FALSE );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
setLineWidth( 1 );
- setAlignment( AlignAuto | AlignTop );
+ tqsetAlignment( AlignAuto | AlignTop );
setIndent(0);
polish();
adjustSize();
}
-void VariableLabel::setRegister( RegisterInfo * info, const QString & name )
+void VariableLabel::setRegister( RegisterInfo * info, const TQString & name )
{
disconnectRegisterInfo();
@@ -45,8 +45,8 @@ void VariableLabel::setRegister( RegisterInfo * info, const QString & name )
m_pRegisterInfo = info;
m_registerName = name;
- connect( m_pRegisterInfo, SIGNAL(destroyed()), this, SLOT(hide()) );
- connect( m_pRegisterInfo, SIGNAL(valueChanged(unsigned)), this, SLOT(updateText()) );
+ connect( m_pRegisterInfo, TQT_SIGNAL(destroyed()), this, TQT_SLOT(hide()) );
+ connect( m_pRegisterInfo, TQT_SIGNAL(valueChanged(unsigned)), this, TQT_SLOT(updateText()) );
updateText();
}
@@ -57,11 +57,11 @@ void VariableLabel::disconnectRegisterInfo()
if ( !m_pRegisterInfo )
return;
- disconnect( m_pRegisterInfo, SIGNAL(destroyed()), this, SLOT(hide()) );
- disconnect( m_pRegisterInfo, SIGNAL(valueChanged(unsigned)), this, SLOT(updateText()) );
+ disconnect( m_pRegisterInfo, TQT_SIGNAL(destroyed()), this, TQT_SLOT(hide()) );
+ disconnect( m_pRegisterInfo, TQT_SIGNAL(valueChanged(unsigned)), this, TQT_SLOT(updateText()) );
m_pRegisterInfo = 0l;
- m_registerName = QString::null;
+ m_registerName = TQString();
}
@@ -77,10 +77,10 @@ void VariableLabel::setValue( unsigned value )
void VariableLabel::updateText()
{
if ( m_pRegisterInfo )
- setText( QString("%1 = %2").arg( m_registerName ).arg( SymbolViewer::self()->toDisplayString( m_pRegisterInfo->value() ) ) );
+ setText( TQString("%1 = %2").tqarg( m_registerName ).tqarg( SymbolViewer::self()->toDisplayString( m_pRegisterInfo->value() ) ) );
else if ( m_value != -1 )
- setText( QString::number( m_value ) );
+ setText( TQString::number( m_value ) );
adjustSize();
}
diff --git a/src/variablelabel.h b/src/variablelabel.h
index ba3850e..ea5fea5 100644
--- a/src/variablelabel.h
+++ b/src/variablelabel.h
@@ -14,8 +14,8 @@
#ifndef VARIABLELABEL_H
#define VARIABLELABEL_H
-#include <qguardedptr.h>
-#include <qlabel.h>
+#include <tqguardedptr.h>
+#include <tqlabel.h>
class TextView;
@@ -26,15 +26,16 @@ a variable while debugging.
@author David Saxton
*/
-class VariableLabel : public QLabel
+class VariableLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- VariableLabel( TextView * parent );
+ VariableLabel( TextView * tqparent );
/**
* Sets the register that this label is displaying the value of.
*/
- void setRegister( RegisterInfo * info, const QString & name );
+ void setRegister( RegisterInfo * info, const TQString & name );
/**
* Sets the value that this label is displaying. This is an alternative
* to setRegister.
@@ -50,8 +51,8 @@ class VariableLabel : public QLabel
protected:
void disconnectRegisterInfo();
- QGuardedPtr<RegisterInfo> m_pRegisterInfo;
- QString m_registerName;
+ TQGuardedPtr<RegisterInfo> m_pRegisterInfo;
+ TQString m_registerName;
int m_value;
};
diff --git a/src/variant.cpp b/src/variant.cpp
index 10422cd..940eb6e 100644
--- a/src/variant.cpp
+++ b/src/variant.cpp
@@ -15,7 +15,7 @@
#include <klocale.h>
Variant::Variant( Type::Value type )
- : QObject()
+ : TQObject()
{
m_type = type;
m_bSetDefault = false;
@@ -24,7 +24,7 @@ Variant::Variant( Type::Value type )
m_minValue = 1e-6;
m_maxValue = 1e9;
m_minAbsValue = 1e-6;
- m_colorScheme = ColorCombo::QtStandard;
+ m_colorScheme = ColorCombo::TQtStandard;
if ( type == Type::Color )
{
// this value is taken from ColorCombo and should ideally be put somewhere...
@@ -45,23 +45,23 @@ void Variant::setType( Type::Value type )
}
-void Variant::appendAllowed(QString string)
+void Variant::appendAllowed(TQString string)
{
- if ( !m_allowed.contains(string) ) {
+ if ( !m_allowed.tqcontains(string) ) {
m_allowed.append(string);
}
}
-void Variant::setAllowed(QStringList stringList)
+void Variant::setAllowed(TQStringList stringList)
{
// Ideally, we should check for duplicates in whatever is setting the
// allowed strings, but it is a lot easier and permanent to do it here
m_allowed.clear();
- const QStringList::iterator end = stringList.end();
- for ( QStringList::iterator it = stringList.begin(); it != end; ++it )
+ const TQStringList::iterator end = stringList.end();
+ for ( TQStringList::iterator it = stringList.begin(); it != end; ++it )
{
- if ( !m_allowed.contains(*it) ) {
+ if ( !m_allowed.tqcontains(*it) ) {
m_allowed.append(*it);
}
}
@@ -86,14 +86,14 @@ void Variant::setMaxValue( const double value )
}
}
-QString Variant::displayString() const
+TQString Variant::displayString() const
{
switch(type())
{
case Variant::Type::Double:
{
double numValue = m_value.toDouble();
- return QString::number( numValue / CNItem::getMultiplier(numValue) ) + " " + CNItem::getNumberMag(numValue) + m_unit;
+ return TQString::number( numValue / CNItem::getMultiplier(numValue) ) + " " + CNItem::getNumberMag(numValue) + m_unit;
}
case Variant::Type::Int:
@@ -107,7 +107,7 @@ QString Variant::displayString() const
}
}
-void Variant::setValue( const QVariant& val )
+void Variant::setValue( const TQVariant& val )
{
if (!m_bSetDefault)
setDefaultValue(val);
@@ -115,12 +115,12 @@ void Variant::setValue( const QVariant& val )
if ( m_value == val )
return;
- const QVariant old = m_value;
+ const TQVariant old = m_value;
m_value = val;
emit( valueChanged( val, old ) );
}
-void Variant::setDefaultValue( QVariant val )
+void Variant::setDefaultValue( TQVariant val )
{
m_defaultValue = val;
m_bSetDefault = true;
diff --git a/src/variant.h b/src/variant.h
index 8367026..b74c221 100644
--- a/src/variant.h
+++ b/src/variant.h
@@ -11,22 +11,23 @@
#ifndef VARIANT_H
#define VARIANT_H
-#include <qobject.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqvariant.h>
-class QColor;
-class QString;
+class TQColor;
+class TQString;
/**
For information:
-QVariant::type() returns an enum for the current data type
-contained. e.g. returns QVariant::Color or QVariant::Rect
+TQVariant::type() returns an enum for the current data type
+contained. e.g. returns TQVariant::Color or TQVariant::Rect
@author Daniel Clarke
@author David Saxton
*/
-class Variant : public QObject
+class Variant : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
class Type
{
@@ -35,7 +36,7 @@ public:
{
None,
Int, // Integer
- Raw, // QByteArray
+ Raw, // TQByteArray
Double, // Real number
String, // Editable string
Multiline, // String that may contain linebreaks
@@ -68,8 +69,8 @@ public:
/**
* Returns the filter used for file dialogs (if this is of type Type::FileName)
*/
- QString filter() const { return m_filter; }
- void setFilter( const QString & filter ) { m_filter = filter; }
+ TQString filter() const { return m_filter; }
+ void setFilter( const TQString & filter ) { m_filter = filter; }
/**
* The selection of colours to be used in the combo box - e.g.
* ColorCombo::LED.
@@ -81,22 +82,22 @@ public:
* This function is for convenience; it sets both the toolbar and editor
* caption.
*/
- void setCaption( const QString & caption ) { setToolbarCaption(caption); setEditorCaption(caption); }
+ void setCaption( const TQString & caption ) { setToolbarCaption(caption); setEditorCaption(caption); }
/**
* This text is displayed to the left of the entry widget in the toolbar
*/
- QString toolbarCaption() const { return m_toolbarCaption; }
- void setToolbarCaption( const QString & caption ) { m_toolbarCaption = caption; }
+ TQString toolbarCaption() const { return m_toolbarCaption; }
+ void setToolbarCaption( const TQString & caption ) { m_toolbarCaption = caption; }
/**
* This text is displayed to the left of the entry widget in the item editor
*/
- QString editorCaption() const { return m_editorCaption; }
- void setEditorCaption( const QString & caption ) { m_editorCaption = caption; }
+ TQString editorCaption() const { return m_editorCaption; }
+ void setEditorCaption( const TQString & caption ) { m_editorCaption = caption; }
/**
* Unit of number, (e.g. V (volts) / F (farads))
*/
- QString unit() const { return m_unit; }
- void setUnit( const QString & unit ) { m_unit = unit; }
+ TQString unit() const { return m_unit; }
+ void setUnit( const TQString & unit ) { m_unit = unit; }
/**
* The smallest (as in negative, not absoluteness) value that the user can
* set this to.
@@ -115,8 +116,8 @@ public:
*/
double minAbsValue() const { return m_minAbsValue; }
void setMinAbsValue( double val );
- QVariant defaultValue() const { return m_defaultValue; }
- void setDefaultValue( QVariant val );
+ TQVariant defaultValue() const { return m_defaultValue; }
+ void setDefaultValue( TQVariant val );
/**
* If this data is marked as advanced, it will only display in the item
* editor (and not in the toolbar)
@@ -133,16 +134,16 @@ public:
* Returns the best possible attempt at representing the data in a string
* for display. Used by the properties list view.
*/
- QString displayString() const;
+ TQString displayString() const;
/**
* The list of values that the data is allowed to take (if it is string)
*/
- QStringList allowed() const { return m_allowed; }
- void setAllowed(QStringList stringList);
- void appendAllowed(QString string);
+ TQStringList allowed() const { return m_allowed; }
+ void setAllowed(TQStringList stringList);
+ void appendAllowed(TQString string);
- QVariant value() const { return m_value; }
- void setValue( const QVariant& val );
+ TQVariant value() const { return m_value; }
+ void setValue( const TQVariant& val );
void resetToDefault();
signals:
@@ -152,23 +153,23 @@ signals:
* This is done so that slots that don't care about the old value don't
* have to accept it
*/
- void valueChanged( QVariant newValue, QVariant oldValue );
+ void valueChanged( TQVariant newValue, TQVariant oldValue );
private:
- QVariant m_value; // the actual data
- QVariant m_defaultValue;
- QString m_unit;
+ TQVariant m_value; // the actual data
+ TQVariant m_defaultValue;
+ TQString m_unit;
double m_minAbsValue;
double m_minValue;
double m_maxValue;
- QString m_toolbarCaption; // Short description shown in e.g. properties dialog
- QString m_editorCaption; // Text displayed before the data entry widget in the toolbar
+ TQString m_toolbarCaption; // Short description shown in e.g. properties dialog
+ TQString m_editorCaption; // Text displayed before the data entry widget in the toolbar
bool m_bAdvanced; // If advanced, only display data in item editor
bool m_bHidden; // If hidden, do not allow user to change data
- QString m_filter; // If type() == Type::FileName this is the filter used in file dialogs.
+ TQString m_filter; // If type() == Type::FileName this is the filter used in file dialogs.
bool m_bSetDefault; // If false, then the default will be set to the first thing this variant is set to
Type::Value m_type;
- QStringList m_allowed;
+ TQStringList m_allowed;
int m_colorScheme;
};
diff --git a/src/view.cpp b/src/view.cpp
index 07e81ec..8785321 100644
--- a/src/view.cpp
+++ b/src/view.cpp
@@ -19,7 +19,7 @@
#include <kiconloader.h>
#include <klocale.h>
#include <ksqueezedtextlabel.h>
-#include <qpainter.h>
+#include <tqpainter.h>
//BEGIN KVSSBSep
// Taken from kdebase-3.4.0/kate/app/kateviewspace.cpp, Copyright Anders Lund <anders.lund@lund.tdcadsl.dk>
@@ -27,31 +27,31 @@
"KateViewSpaceStatusBarSeparator"
A 2 px line to separate the statusbar from the view.
It is here to compensate for the lack of a frame in the view,
- I think Kate looks very nice this way, as QScrollView with frame
+ I think Kate looks very nice this way, as TQScrollView with frame
looks slightly clumsy...
- Slight 3D effect. I looked for suitable QStyle props or methods,
- but found none, though maybe it should use QStyle::PM_DefaultFrameWidth
+ Slight 3D effect. I looked for suitable TQStyle props or methods,
+ but found none, though maybe it should use TQStyle::PM_DefaultFrameWidth
for height (TRY!).
It does look a bit funny with flat styles (Light, .Net) as is,
but there are on methods to paint panel lines separately. And,
those styles tends to look funny on their own, as a light line
in a 3D frame next to a light contents widget is not functional.
- Also, QStatusBar is up to now completely ignorant to style.
+ Also, TQStatusBar is up to now completely ignorant to style.
-anders
*/
-class KVSSBSep : public QWidget {
+class KVSSBSep : public TQWidget {
public:
- KVSSBSep( View * parent=0) : QWidget(parent)
+ KVSSBSep( View * tqparent=0) : TQWidget(tqparent)
{
setFixedHeight( 2 );
}
protected:
- void paintEvent( QPaintEvent *e )
+ void paintEvent( TQPaintEvent *e )
{
- QPainter p( this );
- p.setPen( colorGroup().shadow() );
+ TQPainter p( this );
+ p.setPen( tqcolorGroup().shadow() );
p.drawLine( e->rect().left(), 0, e->rect().right(), 0 );
- p.setPen( ((View*)parentWidget())->isFocused() ? colorGroup().light() : colorGroup().midlight() );
+ p.setPen( ((View*)tqparentWidget())->isFocused() ? tqcolorGroup().light() : tqcolorGroup().midlight() );
p.drawLine( e->rect().left(), 1, e->rect().right(), 1 );
}
};
@@ -61,7 +61,7 @@ class KVSSBSep : public QWidget {
//BEGIN class View
View::View( Document *document, ViewContainer *viewContainer, uint viewAreaId, const char *name )
- : QWidget( viewContainer->viewArea(viewAreaId), name ? name : (const char *)("view_" + QString::number(viewAreaId)) ),
+ : TQWidget( viewContainer->viewArea(viewAreaId), name ? name : (const char *)("view_" + TQString::number(viewAreaId)) ),
KXMLGUIClient()
{
m_dcopID = 0;
@@ -79,7 +79,7 @@ View::View( Document *document, ViewContainer *viewContainer, uint viewAreaId, c
b_isFocused = false;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
// Don't bother creating statusbar if no ktechlab as we are not a main ktechlab tab
if (p_ktechlab)
@@ -89,7 +89,7 @@ View::View( Document *document, ViewContainer *viewContainer, uint viewAreaId, c
m_layout->addWidget( new KVSSBSep(this) );
m_layout->addWidget( m_statusBar );
- connect( p_ktechlab, SIGNAL(configurationChanged()), this, SLOT(slotUpdateConfiguration()) );
+ connect( p_ktechlab, TQT_SIGNAL(configurationChanged()), this, TQT_SLOT(slotUpdateConfiguration()) );
}
}
@@ -101,7 +101,7 @@ View::~View()
}
-KAction * View::action( const QString & name ) const
+KAction * View::action( const TQString & name ) const
{
KAction * action = actionCollection()->action(name);
if ( !action )
@@ -159,10 +159,10 @@ void View::setDCOPID( unsigned id )
m_dcopID = id;
if ( m_pViewIface )
{
- QCString docID;
+ TQCString docID;
docID.setNum( document()->dcopID() );
- QCString viewID;
+ TQCString viewID;
viewID.setNum( dcopID() );
m_pViewIface->setObjId( "View#" + docID + "." + viewID );
@@ -178,7 +178,7 @@ ViewStatusBar::ViewStatusBar( View *view )
{
p_view = view;
- m_modifiedLabel = new QLabel(this);
+ m_modifiedLabel = new TQLabel(this);
addWidget( m_modifiedLabel, 0, false );
m_fileNameLabel = new KSqueezedTextLabel(this);
addWidget( m_fileNameLabel, 1, false );
@@ -186,11 +186,11 @@ ViewStatusBar::ViewStatusBar( View *view )
m_modifiedPixmap = KGlobal::iconLoader()->loadIcon( "filesave", KIcon::Small );
m_unmodifiedPixmap = KGlobal::iconLoader()->loadIcon( "null", KIcon::Small );
- connect( view->document(), SIGNAL(modifiedStateChanged()), this, SLOT(slotModifiedStateChanged()) );
- connect( view->document(), SIGNAL(fileNameChanged(const KURL& )), this, SLOT(slotFileNameChanged(const KURL& )) );
+ connect( view->document(), TQT_SIGNAL(modifiedStateChanged()), this, TQT_SLOT(slotModifiedStateChanged()) );
+ connect( view->document(), TQT_SIGNAL(fileNameChanged(const KURL& )), this, TQT_SLOT(slotFileNameChanged(const KURL& )) );
- connect( view, SIGNAL(viewFocused(View* )), this, SLOT(slotViewFocused(View* )) );
- connect( view, SIGNAL(viewUnfocused()), this, SLOT(slotViewUnfocused()) );
+ connect( view, TQT_SIGNAL(viewFocused(View* )), this, TQT_SLOT(slotViewFocused(View* )) );
+ connect( view, TQT_SIGNAL(viewUnfocused()), this, TQT_SLOT(slotViewUnfocused()) );
slotModifiedStateChanged();
slotFileNameChanged( view->document()->url() );
@@ -217,9 +217,9 @@ void ViewStatusBar::slotViewFocused( View * )
void ViewStatusBar::slotViewUnfocused()
{
- QPalette pal( p_view->palette() );
- pal.setColor( QColorGroup::Background, pal.active().mid() );
- pal.setColor( QColorGroup::Light, pal.active().midlight() );
+ TQPalette pal( p_view->palette() );
+ pal.setColor( TQColorGroup::Background, pal.active().mid() );
+ pal.setColor( TQColorGroup::Light, pal.active().midlight() );
setPalette(pal);
}
//END class ViewStatusBar
diff --git a/src/view.h b/src/view.h
index d501363..802137c 100644
--- a/src/view.h
+++ b/src/view.h
@@ -14,8 +14,8 @@
#include <kstatusbar.h>
#include <kurl.h>
#include <kxmlguiclient.h>
-#include <qguardedptr.h>
-#include <qpixmap.h>
+#include <tqguardedptr.h>
+#include <tqpixmap.h>
class DCOPObject;
class Document;
@@ -24,11 +24,12 @@ class KTechlab;
class View;
class ViewContainer;
class ViewIface;
-class QVBoxLayout;
+class TQVBoxLayout;
class ViewStatusBar : public KStatusBar
{
Q_OBJECT
+ TQ_OBJECT
public:
ViewStatusBar( View *view );
@@ -48,26 +49,27 @@ public slots:
protected:
View *p_view;
- QLabel* m_modifiedLabel;
+ TQLabel* m_modifiedLabel;
KSqueezedTextLabel* m_fileNameLabel;
- QPixmap m_modifiedPixmap;
- QPixmap m_unmodifiedPixmap;
+ TQPixmap m_modifiedPixmap;
+ TQPixmap m_unmodifiedPixmap;
};
/**
@author David Saxton
*/
-class View : public QWidget, public KXMLGUIClient
+class View : public TQWidget, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
View( Document *document, ViewContainer *viewContainer, uint viewAreaId, const char *name = 0 );
virtual ~View();
- KAction * action( const QString & name ) const;
+ KAction * action( const TQString & name ) const;
bool isFocused() const { return b_isFocused; }
/**
- * Pointer to the parent document
+ * Pointer to the tqparent document
*/
Document *document() const { return m_pDocument; }
/**
@@ -76,7 +78,7 @@ public:
DCOPObject * dcopObject() const;
/**
* Returns the dcop suffix for this view - a unique ID for the current the
- * view within all views associated with the parent document. DCOP name
+ * view within all views associated with the tqparent document. DCOP name
* will become "View#docID#viewID".
*/
unsigned dcopID() const { return m_dcopID; }
@@ -141,13 +143,13 @@ signals:
void viewUnfocused();
protected:
- QGuardedPtr<Document> m_pDocument;
+ TQGuardedPtr<Document> m_pDocument;
KTechlab * p_ktechlab;
- QGuardedPtr<ViewContainer> p_viewContainer;
+ TQGuardedPtr<ViewContainer> p_viewContainer;
uint m_viewAreaId;
bool b_isFocused;
ViewStatusBar *m_statusBar;
- QVBoxLayout *m_layout;
+ TQVBoxLayout *m_layout;
ViewIface * m_pViewIface;
unsigned m_dcopID;
};
diff --git a/src/viewcontainer.cpp b/src/viewcontainer.cpp
index 4f145dd..9242562 100644
--- a/src/viewcontainer.cpp
+++ b/src/viewcontainer.cpp
@@ -19,21 +19,21 @@
#include <kglobalsettings.h>
#include <klocale.h>
#include <ktabwidget.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
-ViewContainer::ViewContainer( const QString & caption, KTechlab * ktechlab, QWidget * parent )
- : QWidget( ktechlab ? ktechlab->tabWidget() : parent )
+ViewContainer::ViewContainer( const TQString & caption, KTechlab * ktechlab, TQWidget * tqparent )
+ : TQWidget( ktechlab ? ktechlab->tabWidget() : tqparent )
{
b_deleted = false;
p_ktechlab = ktechlab;
if (ktechlab)
- connect( ktechlab, SIGNAL(needUpdateCaptions()), this, SLOT(updateCaption()) );
+ connect( ktechlab, TQT_SIGNAL(needUpdateCaptions()), this, TQT_SLOT(updateCaption()) );
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
m_baseViewArea = new ViewArea( this, this, 0, "viewarea_0" );
- connect( m_baseViewArea, SIGNAL(destroyed(QObject* )), this, SLOT(baseViewAreaDestroyed(QObject* )) );
+ connect( m_baseViewArea, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(baseViewAreaDestroyed(TQObject* )) );
- layout->addWidget(m_baseViewArea);
+ tqlayout->addWidget(m_baseViewArea);
m_activeViewArea = 0;
b_focused = false;
@@ -112,7 +112,7 @@ View *ViewContainer::view( uint id ) const
return 0l;
// We do not want a recursive search as ViewAreas also hold other ViewAreas
- QObjectList *l = va->queryList( "View", 0, false, false );
+ TQObjectList *l = va->queryList( "View", 0, false, false );
View *view = 0l;
if ( !l->isEmpty() )
view = dynamic_cast<View*>(l->first());
@@ -124,7 +124,7 @@ View *ViewContainer::view( uint id ) const
ViewArea *ViewContainer::viewArea( uint id ) const
{
- if ( !m_viewAreaMap.contains(id) )
+ if ( !m_viewAreaMap.tqcontains(id) )
return 0l;
return m_viewAreaMap[id];
@@ -192,7 +192,7 @@ int ViewContainer::createViewArea( int relativeViewArea, ViewArea::Position posi
// setActiveViewArea(id);
ViewArea *viewArea = relative->createViewArea( position, id );
-// ViewArea *viewArea = new ViewArea( m_splitter, id, (const char*)("viewarea_"+QString::number(id)) );
+// ViewArea *viewArea = new ViewArea( m_splitter, id, (const char*)("viewarea_"+TQString::number(id)) );
viewArea->show(); // remove?
return id;
@@ -211,7 +211,7 @@ void ViewContainer::setViewAreaRemoved( uint id )
if (b_deleted)
return;
- ViewAreaMap::iterator it = m_viewAreaMap.find(id);
+ ViewAreaMap::iterator it = m_viewAreaMap.tqfind(id);
if ( it == m_viewAreaMap.end() )
return;
@@ -231,7 +231,7 @@ void ViewContainer::findActiveViewArea()
}
-void ViewContainer::baseViewAreaDestroyed( QObject *obj )
+void ViewContainer::baseViewAreaDestroyed( TQObject *obj )
{
if (!obj)
return;
@@ -296,7 +296,7 @@ void ViewContainer::saveState( KConfig *config )
}
-void ViewContainer::restoreState( KConfig *config, const QString &groupName )
+void ViewContainer::restoreState( KConfig *config, const TQString &groupName )
{
config->setGroup(groupName);
int baseAreaId = config->readNumEntry("BaseViewArea");
@@ -342,7 +342,7 @@ void ViewContainer::setIdUsed( int id )
void ViewContainer::updateCaption()
{
- QString caption;
+ TQString caption;
if ( !activeView() || !activeView()->document() )
caption = i18n("(empty)");
@@ -375,8 +375,8 @@ void ViewContainer::setKTechlabDeleted()
-ViewArea::ViewArea( QWidget *parent, ViewContainer *viewContainer, int id, const char *name )
- : QSplitter( parent, name )
+ViewArea::ViewArea( TQWidget *tqparent, ViewContainer *viewContainer, int id, const char *name )
+ : TQSplitter( tqparent, name )
{
p_viewContainer = viewContainer;
m_id = id;
@@ -412,18 +412,18 @@ ViewArea *ViewArea::createViewArea( Position position, uint id )
setOrientation( ( position == Right ) ? Qt::Horizontal : Qt::Vertical );
- p_viewArea1 = new ViewArea( this, p_viewContainer, m_id, (const char*)("viewarea_"+QString::number(m_id)) );
- p_viewArea2 = new ViewArea( this, p_viewContainer, id, (const char*)("viewarea_"+QString::number(id)) );
+ p_viewArea1 = new ViewArea( this, p_viewContainer, m_id, (const char*)("viewarea_"+TQString::number(m_id)) );
+ p_viewArea2 = new ViewArea( this, p_viewContainer, id, (const char*)("viewarea_"+TQString::number(id)) );
- connect( p_viewArea1, SIGNAL(destroyed(QObject* )), this, SLOT(viewAreaDestroyed(QObject* )) );
- connect( p_viewArea2, SIGNAL(destroyed(QObject* )), this, SLOT(viewAreaDestroyed(QObject* )) );
+ connect( p_viewArea1, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
+ connect( p_viewArea2, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
- p_view->reparent( p_viewArea1, QPoint(), true );
+ p_view->reparent( p_viewArea1, TQPoint(), true );
p_viewArea1->setView(p_view);
p_view = 0l;
m_id = p_viewContainer->uniqueParentId();
- QValueList<int> splitPos;
+ TQValueList<int> splitPos;
int pos = ((orientation() == Qt::Horizontal) ? width()/2 : height()/2);
splitPos << pos << pos;
setSizes(splitPos);
@@ -434,9 +434,9 @@ ViewArea *ViewArea::createViewArea( Position position, uint id )
}
-void ViewArea::viewAreaDestroyed( QObject *obj )
+void ViewArea::viewAreaDestroyed( TQObject *obj )
{
- ViewArea *viewArea = static_cast<ViewArea*>(obj);
+ ViewArea *viewArea = static_cast<ViewArea*>(TQT_TQWIDGET(obj));
if ( viewArea == p_viewArea1 )
p_viewArea1 = 0l;
@@ -459,7 +459,7 @@ void ViewArea::setView( View *view )
return;
}
p_view = view;
- connect( view, SIGNAL(destroyed()), this, SLOT(viewDestroyed()) );
+ connect( view, TQT_SIGNAL(destroyed()), this, TQT_SLOT(viewDestroyed()) );
}
@@ -501,13 +501,13 @@ void ViewArea::saveState( KConfig *config )
{
config->writeEntry( orientationKey(m_id), (orientation() == Qt::Horizontal) ? "LeftRight" : "TopBottom" );
- QValueList<int> contains;
+ TQValueList<int> tqcontains;
if (va1Ok)
- contains << p_viewArea1->id();
+ tqcontains << p_viewArea1->id();
if (va2Ok)
- contains << p_viewArea2->id();
+ tqcontains << p_viewArea2->id();
- config->writeEntry( containsKey(m_id), contains );
+ config->writeEntry( containsKey(m_id), tqcontains );
if (va1Ok)
p_viewArea1->saveState(config);
if (va2Ok)
@@ -520,7 +520,7 @@ void ViewArea::saveState( KConfig *config )
}
-void ViewArea::restoreState( KConfig *config, int id, const QString &groupName )
+void ViewArea::restoreState( KConfig *config, int id, const TQString &groupName )
{
if (!config)
return;
@@ -541,35 +541,35 @@ void ViewArea::restoreState( KConfig *config, int id, const QString &groupName )
config->setGroup(groupName);
if ( config->hasKey( orientationKey(id) ) )
{
- QString orientation = config->readEntry( orientationKey(m_id) );
+ TQString orientation = config->readEntry( orientationKey(m_id) );
setOrientation( (orientation == "LeftRight") ? Qt::Horizontal : Qt::Vertical );
}
config->setGroup(groupName);
if ( config->hasKey( containsKey(m_id) ) )
{
- typedef QValueList<int> IntList;
- IntList contains = config->readIntListEntry( containsKey(m_id) );
+ typedef TQValueList<int> IntList;
+ IntList tqcontains = config->readIntListEntry( containsKey(m_id) );
- if ( contains.isEmpty() || contains.size() > 2 )
- kdError() << k_funcinfo << "Contained list has wrong size of " << contains.size() << endl;
+ if ( tqcontains.isEmpty() || tqcontains.size() > 2 )
+ kdError() << k_funcinfo << "Contained list has wrong size of " << tqcontains.size() << endl;
else
{
- if ( contains.size() >= 1 )
+ if ( tqcontains.size() >= 1 )
{
- int viewArea1Id = contains[0];
- p_viewArea1 = new ViewArea( this, p_viewContainer, viewArea1Id, (const char*)("viewarea_"+QString::number(viewArea1Id)) );
- connect( p_viewArea1, SIGNAL(destroyed(QObject* )), this, SLOT(viewAreaDestroyed(QObject* )) );
+ int viewArea1Id = tqcontains[0];
+ p_viewArea1 = new ViewArea( this, p_viewContainer, viewArea1Id, (const char*)("viewarea_"+TQString::number(viewArea1Id)) );
+ connect( p_viewArea1, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
p_viewArea1->restoreState( config, viewArea1Id, groupName );
p_viewArea1->show();
}
- if ( contains.size() >= 2 )
+ if ( tqcontains.size() >= 2 )
{
- int viewArea2Id = contains[1];
- p_viewArea2 = new ViewArea( this, p_viewContainer, viewArea2Id, (const char*)("viewarea_"+QString::number(viewArea2Id)) );
- connect( p_viewArea2, SIGNAL(destroyed(QObject* )), this, SLOT(viewAreaDestroyed(QObject* )) );
+ int viewArea2Id = tqcontains[1];
+ p_viewArea2 = new ViewArea( this, p_viewContainer, viewArea2Id, (const char*)("viewarea_"+TQString::number(viewArea2Id)) );
+ connect( p_viewArea2, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
p_viewArea2->restoreState( config, viewArea2Id, groupName );
p_viewArea2->show();
}
@@ -585,24 +585,24 @@ void ViewArea::restoreState( KConfig *config, int id, const QString &groupName )
}
}
-QString ViewArea::fileKey( int id )
+TQString ViewArea::fileKey( int id )
{
- return QString("ViewArea ") + QString::number(id) + QString(" file");
+ return TQString("ViewArea ") + TQString::number(id) + TQString(" file");
}
-QString ViewArea::containsKey( int id )
+TQString ViewArea::containsKey( int id )
{
- return QString("ViewArea ") + QString::number(id) + QString(" contains");
+ return TQString("ViewArea ") + TQString::number(id) + TQString(" tqcontains");
}
-QString ViewArea::orientationKey( int id )
+TQString ViewArea::orientationKey( int id )
{
- return QString("ViewArea ") + QString::number(id) + QString(" orientation");
+ return TQString("ViewArea ") + TQString::number(id) + TQString(" orientation");
}
ViewContainerDrag::ViewContainerDrag( ViewContainer *viewContainer )
- : QStoredDrag( "dontcare", viewContainer)
+ : TQStoredDrag( "dontcare", viewContainer)
{
p_viewContainer = viewContainer;
}
diff --git a/src/viewcontainer.h b/src/viewcontainer.h
index c798530..25f0f33 100644
--- a/src/viewcontainer.h
+++ b/src/viewcontainer.h
@@ -11,10 +11,10 @@
#ifndef VIEWCONTAINER_H
#define VIEWCONTAINER_H
-#include <qdragobject.h>
-#include <qmap.h>
-#include <qsplitter.h>
-#include <qvaluelist.h>
+#include <tqdragobject.h>
+#include <tqmap.h>
+#include <tqsplitter.h>
+#include <tqvaluelist.h>
class KTechlab;
class View;
@@ -22,14 +22,14 @@ class ViewArea;
class ViewContainer;
class KConfig;
-class QHBoxLayout;
-class QLayout;
-class QSplitter;
+class TQHBoxLayout;
+class TQLayout;
+class TQSplitter;
-typedef QMap< uint, ViewArea* > ViewAreaMap;
-typedef QValueList<int> IntList;
+typedef TQMap< uint, ViewArea* > ViewAreaMap;
+typedef TQValueList<int> IntList;
-class ViewContainerDrag : public QStoredDrag
+class ViewContainerDrag : public TQStoredDrag
{
public:
ViewContainerDrag( ViewContainer *viewContainer );
@@ -42,14 +42,15 @@ protected:
/**
-Contains either exactly one View, or two ViewAreas, seperated by a QSplitter.
+Contains either exactly one View, or two ViewAreas, seperated by a TQSplitter.
If it contains one view, then the value returned in id() is that of the view.
If it contains two ViewAreas, then the value returned by id() is -1.
@author David Saxton
*/
-class ViewArea : public QSplitter
+class ViewArea : public TQSplitter
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Position
{
@@ -57,7 +58,7 @@ public:
Bottom
};
- ViewArea( QWidget *parent, ViewContainer *viewContainer, int id, const char *name = 0 );
+ ViewArea( TQWidget *tqparent, ViewContainer *viewContainer, int id, const char *name = 0 );
~ViewArea();
ViewContainer *viewContainer() const { return p_viewContainer; }
@@ -67,7 +68,7 @@ public:
*/
ViewArea *createViewArea( Position position, uint id );
/**
- * Adds the given View to the main part of the layout
+ * Adds the given View to the main part of the tqlayout
*/
void setView( View *view );
/**
@@ -78,10 +79,10 @@ public:
* Restores the state of this ViewArea and any contained ViewAreas
* @param groupName e.g. "ViewContainer 1"
*/
- void restoreState( KConfig *config, int id, const QString &groupName );
+ void restoreState( KConfig *config, int id, const TQString &groupName );
/**
* Returns true if this ViewArea can save useful information as to its state
- * (i.e. it's children can save useful information about their state, or has
+ * (i.e. it's tqchildren can save useful information about their state, or has
* a view with a url in it)
*/
bool canSaveUsefulStateInfo() const;
@@ -90,17 +91,17 @@ public:
*/
void setKTechlabDeleted();
- static QString fileKey( int id );
- static QString containsKey( int id );
- static QString orientationKey( int id );
+ static TQString fileKey( int id );
+ static TQString containsKey( int id );
+ static TQString orientationKey( int id );
protected slots:
- void viewAreaDestroyed( QObject *obj );
+ void viewAreaDestroyed( TQObject *obj );
void viewDestroyed();
protected:
int m_id;
- QGuardedPtr<View> p_view;
+ TQGuardedPtr<View> p_view;
ViewArea *p_viewArea1;
ViewArea *p_viewArea2;
ViewContainer *p_viewContainer;
@@ -109,16 +110,17 @@ protected:
/**
@author David Saxton
*/
-class ViewContainer : public QWidget
+class ViewContainer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new ViewContainer, along with a default ViewArea ready for
- * parenting a View, with an id of 0. parent is only used if ktechlab is
- * null; otherwise the parent widget is ktechlab's tabWidget()
+ * tqparenting a View, with an id of 0. tqparent is only used if ktechlab is
+ * null; otherwise the tqparent widget is ktechlab's tabWidget()
*/
- ViewContainer( const QString & caption, KTechlab * ktechlab, QWidget * parent = 0 );
+ ViewContainer( const TQString & caption, KTechlab * ktechlab, TQWidget * tqparent = 0 );
~ViewContainer();
/**
@@ -147,7 +149,7 @@ public:
*/
bool closeViewArea( uint id );
/**
- * Creates a view area (parent QWidget, splitter et al) ready for inclusion
+ * Creates a view area (tqparent TQWidget, splitter et al) ready for inclusion
* of a view.
* @param relativeViewArea the viewarea to position the new viewarea next to, if -1 then is taken to be the active view area
* @param position Top, Right, Bottom or Left of given relativeViewArea
@@ -195,7 +197,7 @@ public:
*/
void setIdUsed( int id );
/**
- * Writes the state of the View Container (layout of views and view URLs)
+ * Writes the state of the View Container (tqlayout of views and view URLs)
* to the given KConfig. Doesn't change the group - so preset it if
* needed!
*/
@@ -205,7 +207,7 @@ public:
* the ViewContainer with all appropriate views open
* @param groupName e.g. "ViewContainer 1"
*/
- void restoreState( KConfig *config, const QString &groupName );
+ void restoreState( KConfig *config, const TQString &groupName );
/**
* Returns a unique id (negative) for a ViewArea that is now a Parent of other ViewAreas
*/
@@ -216,7 +218,7 @@ public:
int uniqueNewId();
/**
* Returns true if this ViewArea can save useful information as to its state
- * (i.e. it's children can save useful information about their state, or has
+ * (i.e. it's tqchildren can save useful information about their state, or has
* a view with a url in it)
*/
bool canSaveUsefulStateInfo() const;
@@ -232,7 +234,7 @@ public slots:
void updateCaption();
protected slots:
- void baseViewAreaDestroyed( QObject *obj );
+ void baseViewAreaDestroyed( TQObject *obj );
protected:
void restoreViewArea( KConfig *config, int id, ViewArea *viewArea );