diff options
Diffstat (limited to 'kturtle')
-rw-r--r-- | kturtle/TODO | 8 | ||||
-rw-r--r-- | kturtle/file.txt | 6 | ||||
-rw-r--r-- | kturtle/kturtle.kdevses | 65 | ||||
-rw-r--r-- | kturtle/kturtle.tdevelop | 160 | ||||
-rw-r--r-- | kturtle/src/Makefile.am | 4 | ||||
-rw-r--r-- | kturtle/src/canvas.cpp | 6 | ||||
-rw-r--r-- | kturtle/src/canvas.h | 2 | ||||
-rw-r--r-- | kturtle/src/dialogs.cpp | 28 | ||||
-rw-r--r-- | kturtle/src/dialogs.h | 6 | ||||
-rw-r--r-- | kturtle/src/executer.cpp | 30 | ||||
-rw-r--r-- | kturtle/src/executer.h | 2 | ||||
-rw-r--r-- | kturtle/src/kturtle.cpp | 188 | ||||
-rw-r--r-- | kturtle/src/kturtle.h | 2 | ||||
-rw-r--r-- | kturtle/src/parser.h | 2 | ||||
-rw-r--r-- | kturtle/src/settings.kcfgc | 2 |
15 files changed, 143 insertions, 368 deletions
diff --git a/kturtle/TODO b/kturtle/TODO index 30e5189d..f7883e31 100644 --- a/kturtle/TODO +++ b/kturtle/TODO @@ -185,7 +185,7 @@ Translating data in the tdenewstuff.xml file: how would the translators access t -After a conversiation with lypanov I came to the conclusion that making the executer 'statefull' is a very by thing! So I take the cheap approach using kapp->processEvents();... Maybe someday, later, I'll do it neatly -- the lypanov pointed out. FIXED +After a conversiation with lypanov I came to the conclusion that making the executer 'statefull' is a very by thing! So I take the cheap approach using tdeApp->processEvents();... Maybe someday, later, I'll do it neatly -- the lypanov pointed out. FIXED @@ -230,7 +230,7 @@ cies: That is a good plan! I have tux allready in my sprites dir (I'm a fan too - crash on quitting after Opening files DONE annma 02/04/2004 -- cies: Make the interpreter (stolen from wsbasic.sf.net) (executer, parser, lexer, number and treenode) more native Qt. Right now they are a mixture of standard-CLI-C++ and Qt thingies (i put the Qt thingies there). I tried do that but i found that i'm not comfortable with the concept of streams -- which are used a lot in the interpreter. Especially streaming QString was an obstacle i couldnt take. DONE +- cies: Make the interpreter (stolen from wsbasic.sf.net) (executer, parser, lexer, number and treenode) more native Qt. Right now they are a mixture of standard-CLI-C++ and Qt thingies (i put the Qt thingies there). I tried do that but i found that i'm not comfortable with the concept of streams -- which are used a lot in the interpreter. Especially streaming TQString was an obstacle i couldnt take. DONE >>>>> after this is done we can also make the ()[],.""-configurable With long lines and wrapping the canvas can get into a endless loop -> 100%CPU, i tried a lot to fix this allready, maybe my solution needs some tuning :). @@ -292,8 +292,8 @@ dcop khelpcenter KHelpCenterIface openUrl "help:/kate/index.html#kate-part-selec Im tryered of this... I can fix it; too much for me. Sorry -in tdelibs/tdecore/kapp... : -url = QString("help:/%1?anchor=%2").arg(appname).arg(anchor); +in tdelibs/tdecore/tdeapp... : +url = TQString("help:/%1?anchor=%2").arg(appname).arg(anchor); and DCOPRef( "khelpcenter", "KHelpCenterIface" ).send( "openUrl", url, startup_id ); diff --git a/kturtle/file.txt b/kturtle/file.txt index e2f39a42..041b85d7 100644 --- a/kturtle/file.txt +++ b/kturtle/file.txt @@ -4,12 +4,12 @@ Correcting dependencies... Done The following extra packages will be installed: alsa-headers libasound2-dev libaudio-dev libaudiofile-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libjpeg62-dev liblcms1-dev libmad0-dev - libogg-dev libpng12-dev libqt3-headers libvorbis-dev libxcursor-dev + libogg-dev libpng12-dev libtqt3-headers libvorbis-dev libxcursor-dev pkg-config qt3-dev-tools xlibmesa3-gl xlibmesa3-glu zlib1g-dev Suggested packages: libasound2-doc libglib2.0-doc libgnome-dev libglide3 Recommended packages: - libqt3-mt-dev libqt3-dev + libtqt3-mt-dev libtqt3-dev The following packages will be REMOVED: arts gideon gideon-data gideon-plugins kaddressbook kalarm kalarmd kandy kappfinder karm kate kcontrol kde-cvs-snapshot tdeartwork tdeartwork-misc @@ -25,7 +25,7 @@ The following packages will be REMOVED: The following NEW packages will be installed: alsa-headers libasound2-dev libaudio-dev libaudiofile-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libjpeg62-dev liblcms1-dev libmad0-dev - libogg-dev libpng12-dev libqt3-headers libvorbis-dev libxcursor-dev + libogg-dev libpng12-dev libtqt3-headers libvorbis-dev libxcursor-dev pkg-config qt3-dev-tools xlibmesa3-gl xlibmesa3-glu zlib1g-dev 0 upgraded, 20 newly installed, 74 to remove and 9 not upgraded. 1 not fully installed or removed. diff --git a/kturtle/kturtle.kdevses b/kturtle/kturtle.kdevses deleted file mode 100644 index 1864d53d..00000000 --- a/kturtle/kturtle.kdevses +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version = '1.0' encoding = 'UTF-8'?> -<!DOCTYPE KDevPrjSession> -<KDevPrjSession> - <DocsAndViews NumberOfDocuments="16" > - <Doc0 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/TODO" > - <View0 Type="Source" /> - </Doc0> - <Doc1 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/main.cpp" > - <View0 Type="Source" /> - </Doc1> - <Doc2 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/kturtle.h" > - <View0 Type="Source" /> - </Doc2> - <Doc3 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/kturtle.cpp" > - <View0 Type="Source" /> - </Doc3> - <Doc4 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/dialogs.h" > - <View0 Type="Source" /> - </Doc4> - <Doc5 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/dialogs.cpp" > - <View0 Type="Source" /> - </Doc5> - <Doc6 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/executer.cpp" > - <View0 Type="Source" /> - </Doc6> - <Doc7 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/translate.h" > - <View0 line="0" Type="Source" /> - </Doc7> - <Doc8 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/lexer.cpp" > - <View0 line="408" Type="Source" /> - </Doc8> - <Doc9 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/translate.cpp" > - <View0 line="104" Type="Source" /> - </Doc9> - <Doc10 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/canvas.cpp" > - <View0 line="390" Type="Source" /> - </Doc10> - <Doc11 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/parser.cpp" > - <View0 line="1052" Type="Source" /> - </Doc11> - <Doc12 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/settings.cpp" > - <View0 line="50" Type="Source" /> - </Doc12> - <Doc13 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/token.cpp" > - <View0 line="0" Type="Source" /> - </Doc13> - <Doc14 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/treenode.cpp" > - <View0 line="219" Type="Source" /> - </Doc14> - <Doc15 NumberOfViews="1" URL="file:/home/cies/kdecvs/tdeedu/kturtle/src/value.cpp" > - <View0 line="247" Type="Source" /> - </Doc15> - </DocsAndViews> - <pluginList> - <kdevbookmarks> - <bookmarks/> - </kdevbookmarks> - <kdevsubversion> - <subversion recurseresolve="1" recurserelocate="1" recursemerge="1" recursecommit="1" base="" recursepropget="1" recurseswitch="1" recurseupdate="1" recursepropset="1" recursediff="1" recurserevert="1" forcemove="1" recursecheckout="1" forceremove="1" recurseadd="1" recurseproplist="1" forcemerge="1" /> - </kdevsubversion> - <kdevdebugger> - <breakpointList/> - </kdevdebugger> - </pluginList> -</KDevPrjSession> diff --git a/kturtle/kturtle.tdevelop b/kturtle/kturtle.tdevelop deleted file mode 100644 index 2cddc3cd..00000000 --- a/kturtle/kturtle.tdevelop +++ /dev/null @@ -1,160 +0,0 @@ -<?xml version = '1.0'?> -<tdevelop> - <general> - <author>Cies Breijs</author> - <email>cies # showroommama ! nl</email> - <version>0.01</version> - <projectmanagement>KDevKDEAutoProject</projectmanagement> - <primarylanguage>C++</primarylanguage> - <keywords> - <keyword>C++</keyword> - <keyword>Code</keyword> - <keyword>Qt</keyword> - <keyword>KDE</keyword> - </keywords> - <projectdirectory>.</projectdirectory> - <absoluteprojectpath>false</absoluteprojectpath> - <description/> - <ignoreparts/> - <secondaryLanguages/> - </general> - <kdevautoproject> - <general> - <activetarget>src/kturtle</activetarget> - <useconfiguration>default</useconfiguration> - </general> - <run> - <mainprogram>src/kturtle</mainprogram> - <directoryradio>executable</directoryradio> - <customdirectory>/</customdirectory> - <programargs/> - <terminal>false</terminal> - <autocompile>true</autocompile> - <envvars/> - </run> - <configurations> - <optimized> - <builddir>optimized</builddir> - <ccompiler>GccOptions</ccompiler> - <cxxcompiler>GppOptions</cxxcompiler> - <f77compiler>G77Options</f77compiler> - <cxxflags>-O2 -g0</cxxflags> - </optimized> - <debug> - <configargs>--enable-debug=full</configargs> - <builddir>debug</builddir> - <ccompiler>GccOptions</ccompiler> - <cxxcompiler>GppOptions</cxxcompiler> - <f77compiler>G77Options</f77compiler> - <cxxflags>-O0 -g3</cxxflags> - </debug> - </configurations> - <make> - <envvars> - <envvar value="1" name="WANT_AUTOCONF_2_5" /> - <envvar value="1" name="WANT_AUTOMAKE_1_6" /> - </envvars> - <abortonerror>false</abortonerror> - <numberofjobs>1</numberofjobs> - <dontact>false</dontact> - <makebin/> - </make> - </kdevautoproject> - <kdevfileview> - <groups> - <group pattern="*.cpp;*.cxx;*.h" name="Sources" /> - <group pattern="*.ui" name="User Interface" /> - <group pattern="*.png" name="Icons" /> - <group pattern="*.po;*.ts" name="Translations" /> - <group pattern="*" name="Others" /> - <hidenonprojectfiles>false</hidenonprojectfiles> - <hidenonlocation>false</hidenonlocation> - </groups> - <tree> - <hidepatterns></hidepatterns> - <hidenonprojectfiles>false</hidenonprojectfiles> - <showvcsfields>true</showvcsfields> - </tree> - </kdevfileview> - <kdevdoctreeview> - <ignoretocs> - <toc>gtk</toc> - <toc>gnustep</toc> - <toc>python</toc> - <toc>php</toc> - <toc>perl</toc> - </ignoretocs> - <projectdoc> - <userdocDir>/home/cies/src/kturtle/html/</userdocDir> - <apidocDir>/home/cies/src/kturtle/html/</apidocDir> - </projectdoc> - <ignoreqt_xml/> - <ignoredoxygen/> - <ignorekdocs/> - <ignoredevhelp/> - </kdevdoctreeview> - <kdevdebugger> - <general> - <dbgshell>libtool</dbgshell> - <programargs/> - <gdbpath/> - <configGdbScript/> - <runShellScript/> - <runGdbScript/> - <breakonloadinglibs>true</breakonloadinglibs> - <separatetty>false</separatetty> - <floatingtoolbar>false</floatingtoolbar> - </general> - <display> - <staticmembers>false</staticmembers> - <demanglenames>true</demanglenames> - </display> - </kdevdebugger> - <kdevfilecreate> - <filetypes/> - <useglobaltypes> - <type ext="ui" /> - <type ext="cpp" /> - <type ext="h" /> - </useglobaltypes> - </kdevfilecreate> - <kdevcvs> - <cvsoptions>-z3 -d:ext:cies@cvs.sourceforge.net:/cvsroot/kturtle co kturtle </cvsoptions> - <commitoptions/> - <addoptions/> - <logoptions/> - <updateoptions>-dP</updateoptions> - <removeoptions>-f</removeoptions> - <revertoptions>-C -d -P</revertoptions> - <diffoptions>-u3 -p</diffoptions> - <rshoptions>ssh</rshoptions> - </kdevcvs> - <kdevcvsservice> - <recursivewhenupdate>true</recursivewhenupdate> - <prunedirswhenupdate>true</prunedirswhenupdate> - <createdirswhenupdate>true</createdirswhenupdate> - <recursivewhencommitremove>true</recursivewhencommitremove> - <revertoptions>-C</revertoptions> - </kdevcvsservice> - <kdevcppsupport> - <references/> - <codecompletion> - <includeGlobalFunctions>true</includeGlobalFunctions> - <includeTypes>true</includeTypes> - <includeEnums>true</includeEnums> - <includeTypedefs>false</includeTypedefs> - <automaticCodeCompletion>true</automaticCodeCompletion> - <automaticArgumentsHint>true</automaticArgumentsHint> - <automaticHeaderCompletion>true</automaticHeaderCompletion> - <codeCompletionDelay>250</codeCompletionDelay> - <argumentsHintDelay>400</argumentsHintDelay> - <headerCompletionDelay>250</headerCompletionDelay> - </codecompletion> - </kdevcppsupport> - <cppsupportpart> - <filetemplates> - <interfacesuffix>.h</interfacesuffix> - <implementationsuffix>.cpp</implementationsuffix> - </filetemplates> - </cppsupportpart> -</tdevelop> diff --git a/kturtle/src/Makefile.am b/kturtle/src/Makefile.am index a5706a23..83d7eef5 100644 --- a/kturtle/src/Makefile.am +++ b/kturtle/src/Makefile.am @@ -4,9 +4,9 @@ INCLUDES = $(all_includes) SUBDIRS = pics # added from kjots -AM_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +AM_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -kturtle_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kturtle_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor kturtle_LDADD = $(LIB_TDEUI) $(LIB_TDEIO) $(LIB_TDEPRINT) $(LIB_TDEPARTS) -lkatepartinterfaces KDE_ICON = kturtle diff --git a/kturtle/src/canvas.cpp b/kturtle/src/canvas.cpp index 5d14ead3..8564d6ae 100644 --- a/kturtle/src/canvas.cpp +++ b/kturtle/src/canvas.cpp @@ -78,7 +78,7 @@ const double DEG2RAD = 3.14159265358979323846/180; Canvas::Canvas(TQWidget *parent, const char *name) : TQCanvasView(0, parent, name) { // Create a new canvas for this view - canvas = new TQCanvas(TQT_TQOBJECT(parent)); + canvas = new TQCanvas(parent); canvas->setAdvancePeriod(250); // refresh-rate in [ms] // set initial values @@ -403,7 +403,7 @@ void Canvas::line(double xa, double ya, double xb, double yb) xb + translation.x() * canvasWidth, yb + translation.y() * canvasHeight); if (cutLoop == true) { - // kdDebug(0)<<"Canvas::line(): cutLoop is set to TRUE! ABORT LINE MISSION"<<endl; + // kdDebug(0)<<"Canvas::line(): cutLoop is set to true! ABORT LINE MISSION"<<endl; return; } } @@ -418,7 +418,7 @@ bool Canvas::endlessLoop(TQPoint begin, TQPoint end) // this is to break the horrible endless loop bug that i cannot fix... // i need more simple reproductions of this bug to really find it // for now i say it is something with TQCanvas but i'm likely wrong on thisone - // kdDebug(0)<<"Canvas::endlessLoop TRUE!!"<<endl; + // kdDebug(0)<<"Canvas::endlessLoop true!!"<<endl; return true; } else diff --git a/kturtle/src/canvas.h b/kturtle/src/canvas.h index b5ad54a1..c2fb7c27 100644 --- a/kturtle/src/canvas.h +++ b/kturtle/src/canvas.h @@ -24,7 +24,7 @@ class Canvas : public TQCanvasView { - Q_OBJECT + TQ_OBJECT public: diff --git a/kturtle/src/dialogs.cpp b/kturtle/src/dialogs.cpp index 1690ca02..0499b7db 100644 --- a/kturtle/src/dialogs.cpp +++ b/kturtle/src/dialogs.cpp @@ -28,8 +28,8 @@ ErrorMessage::ErrorMessage (TQWidget *parent) : KDialogBase (parent, "errorDialog", false, 0, KDialogBase::Close | KDialogBase::Help | KDialogBase::User1, KDialogBase::Close, true, i18n("Help on &Error") ) { - connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( showHelpOnError() ) ); - connect( this, TQT_SIGNAL( helpClicked() ), this, TQT_SLOT( errorMessageHelp() ) ); + connect( this, TQ_SIGNAL( user1Clicked() ), this, TQ_SLOT( showHelpOnError() ) ); + connect( this, TQ_SIGNAL( helpClicked() ), this, TQ_SLOT( errorMessageHelp() ) ); setCaption( i18n("Error Dialog") ); setButtonWhatsThis( KDialogBase::Close, i18n("Closes this error dialog") ); setButtonWhatsThis( KDialogBase::Help, i18n("Click here to read more on this error dialog in KTurtle's Handbook.") ); @@ -107,7 +107,7 @@ void ErrorMessage::display() enableButton (KDialogBase::User1, false); errTable->sortColumn(0, true, true); show(); - connect( errTable, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( updateSelection() ) ); + connect( errTable, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( updateSelection() ) ); } void ErrorMessage::updateSelection() @@ -125,13 +125,13 @@ void ErrorMessage::updateSelection() void ErrorMessage::showHelpOnError() { // #if 0 // FIXME -// kapp->invokeHelp(tokenTypeNames[currentError.tok.type], "", ""); +// tdeApp->invokeHelp(tokenTypeNames[currentError.tok.type], "", ""); // #endif } void ErrorMessage::errorMessageHelp() { - kapp->invokeHelp("anchorname", "", ""); + tdeApp->invokeHelp("anchorname", "", ""); } // END @@ -144,10 +144,10 @@ ColorPicker::ColorPicker(TQWidget *parent) : KDialogBase(parent, "colorpicker", false, i18n("Color Picker"), KDialogBase::Close | KDialogBase::Help | KDialogBase::User1, KDialogBase::Close, true ) { // connect to help - connect( this, TQT_SIGNAL( helpClicked() ), TQT_SLOT( slotColorPickerHelp() ) ); + connect( this, TQ_SIGNAL( helpClicked() ), TQ_SLOT( slotColorPickerHelp() ) ); // for toggling convenience - connect( this, TQT_SIGNAL( finished() ), TQT_SLOT( slotEmitVisibility() ) ); + connect( this, TQ_SIGNAL( finished() ), TQ_SLOT( slotEmitVisibility() ) ); // Create the top level page and its layout BaseWidget = new TQWidget(this); @@ -155,7 +155,7 @@ ColorPicker::ColorPicker(TQWidget *parent) // the User1 button: setButtonText( KDialogBase::User1, i18n("Insert Color Code at Cursor") ); - connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotEmitColorCode() ) ); + connect( this, TQ_SIGNAL( user1Clicked() ), TQ_SLOT( slotEmitColorCode() ) ); TQVBoxLayout *vlayout = new TQVBoxLayout(BaseWidget); @@ -170,14 +170,14 @@ ColorPicker::ColorPicker(TQWidget *parent) hsSelector = new KHSSelector(BaseWidget); // the color (SH) selector hsSelector->setMinimumSize(300, 150); h1layout->addWidget(hsSelector); - connect( hsSelector, TQT_SIGNAL( valueChanged(int, int) ), TQT_SLOT( slotSelectorChanged(int, int) ) ); + connect( hsSelector, TQ_SIGNAL( valueChanged(int, int) ), TQ_SLOT( slotSelectorChanged(int, int) ) ); h1layout->addSpacing(5); // space in between valuePal = new KValueSelector(BaseWidget); // the darkness (V) pal valuePal->setFixedWidth(30); h1layout->addWidget(valuePal); - connect( valuePal, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotPalChanged(int) ) ); + connect( valuePal, TQ_SIGNAL( valueChanged(int) ), TQ_SLOT( slotPalChanged(int) ) ); vlayout->addSpacing(15); // space in between the top and the bottom widgets @@ -203,7 +203,7 @@ ColorPicker::ColorPicker(TQWidget *parent) colorcode = new TQLineEdit(BaseWidget); // the code generator colorcode->setReadOnly(true); v2layout->addWidget(colorcode); - connect( colorcode, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotReselect() ) ); + connect( colorcode, TQ_SIGNAL( selectionChanged() ), TQ_SLOT( slotReselect() ) ); h2layout->addSpacing(5); // spacing on the right border @@ -269,9 +269,9 @@ void ColorPicker::slotPalChanged(int v_) void ColorPicker::slotReselect() { // reselect by selectAll(), but make sure no looping occurs - disconnect( colorcode, TQT_SIGNAL( selectionChanged() ), 0, 0 ); + disconnect( colorcode, TQ_SIGNAL( selectionChanged() ), 0, 0 ); colorcode->selectAll(); - connect( colorcode, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotReselect() ) ); + connect( colorcode, TQ_SIGNAL( selectionChanged() ), TQ_SLOT( slotReselect() ) ); } void ColorPicker::slotEmitVisibility() @@ -288,7 +288,7 @@ void ColorPicker::slotEmitColorCode() void ColorPicker::slotColorPickerHelp() { - kapp->invokeHelp("tools-color-picker", "", ""); + tdeApp->invokeHelp("tools-color-picker", "", ""); } // END diff --git a/kturtle/src/dialogs.h b/kturtle/src/dialogs.h index bd4431c8..d652dd5f 100644 --- a/kturtle/src/dialogs.h +++ b/kturtle/src/dialogs.h @@ -52,7 +52,7 @@ struct errorData class ErrorMessage : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: @@ -97,7 +97,7 @@ class ErrorMessage : public KDialogBase class ColorPicker : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: @@ -150,7 +150,7 @@ class ColorPicker : public KDialogBase class RestartOrBack : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kturtle/src/executer.cpp b/kturtle/src/executer.cpp index 9268eab1..d98f5df8 100644 --- a/kturtle/src/executer.cpp +++ b/kturtle/src/executer.cpp @@ -61,7 +61,7 @@ bool Executer::run() for (i = tree->begin(); i != tree->end(); ++i) { if (bAbort) return false; - kapp->processEvents(); + tdeApp->processEvents(); execute(*i); symbolTables.pop(); //free up stack @@ -103,7 +103,7 @@ void Executer::pause() // The next line is within all loops of the Executer // if (bAbort) return; // mostly before - // kapp->processEvents(); + // tdeApp->processEvents(); // this to keep the GUI of KTurtle accessible while executing the logo code // so the Abort button can be clicked, and will function bPause = true; @@ -114,7 +114,7 @@ void Executer::abort() // The next line is within all loops of the Executer // if(bAbort) return; // mostly before - // kapp->processEvents(); + // tdeApp->processEvents(); // this to keep the GUI of KTurtle accessible while executing the logo code // so the Abort button can be clicked, and will function bAbort = true; @@ -244,7 +244,7 @@ void Executer::execFunction(TreeNode* node) { if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); // execute the parameters which can be expressions execute(*pfrom); @@ -305,7 +305,7 @@ void Executer::execBlock(TreeNode* node) if (runSpeed != 0) slowDown(*i); if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); execute(*i); @@ -334,7 +334,7 @@ void Executer::execForEach(TreeNode* node) { if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); execute(statements); if (bBreak || bReturn) break; //jump out loop @@ -369,7 +369,7 @@ void Executer::execFor(TreeNode* node) { if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); ( symbolTables.top() )[name] = d; execute( statements ); if (bBreak || bReturn) break; //jump out loop @@ -390,7 +390,7 @@ void Executer::execFor(TreeNode* node) { if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); (symbolTables.top() )[name] = d; execute( statements ); @@ -403,7 +403,7 @@ void Executer::execFor(TreeNode* node) { if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); ( symbolTables.top() )[name] = d; execute(statements); @@ -427,7 +427,7 @@ void Executer::execRepeat(TreeNode* node) { if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); execute(statements); if (bBreak || bReturn) break; //jump out loop @@ -447,7 +447,7 @@ void Executer::execWhile(TreeNode* node) { if (bAbort) return; if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); execute(statements); if (bBreak || bReturn) break; //jump out loop @@ -647,7 +647,7 @@ TQString Executer::runCommand(const TQString& command) while( fgets(buf, sizeof(buf), pstream) !=NULL) { if (bAbort) return (""); - kapp->processEvents(); + tdeApp->processEvents(); Line += buf; } @@ -1015,12 +1015,12 @@ void Executer::startWaiting(int msec) { bStopWaiting = false; // call a timer that sets stopWaiting to true when it runs - TQTimer::singleShot( msec, this, TQT_SLOT( slotStopWaiting() ) ); + TQTimer::singleShot( msec, this, TQ_SLOT( slotStopWaiting() ) ); while (bStopWaiting == false) { if (bAbort) return; // waits need to be interrupted by the stop action if (bPause) startPausing(); - kapp->processEvents(); + tdeApp->processEvents(); // only 10 times per second is enough... else the CPU gets 100% loaded ( not nice :) usleep(100000); @@ -1037,7 +1037,7 @@ void Executer::startPausing() while (bPause == true) { if (bAbort) return; // waits need to be interrupted by the stop action - kapp->processEvents(); + tdeApp->processEvents(); // only 10 times per second is enough... else the CPU gets 100% loaded ( not nice :) usleep(100000); } diff --git a/kturtle/src/executer.h b/kturtle/src/executer.h index 7cf48ddd..6a892285 100644 --- a/kturtle/src/executer.h +++ b/kturtle/src/executer.h @@ -34,7 +34,7 @@ typedef stack<Value> runstack; class Executer : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kturtle/src/kturtle.cpp b/kturtle/src/kturtle.cpp index 74b33300..04416053 100644 --- a/kturtle/src/kturtle.cpp +++ b/kturtle/src/kturtle.cpp @@ -86,7 +86,7 @@ MainWindow::MainWindow(KTextEditor::Document *document) : editor(0) { KMessageBox::error( this, i18n("A TDE text-editor component could not be found;\n" "please check your TDE installation.") ); - kapp->exit(1); + tdeApp->exit(1); } // docList.append(doc); } @@ -101,9 +101,9 @@ MainWindow::MainWindow(KTextEditor::Document *document) : editor(0) setMinimumSize(200,200); // init with more usefull size, stolen from kwite (they stole it from konq) - if ( !initialGeometrySet() && !kapp->config()->hasGroup("MainWindow Settings") ) resize(640, 480); + if ( !initialGeometrySet() && !tdeApp->config()->hasGroup("MainWindow Settings") ) resize(640, 480); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); readConfig(config); } @@ -123,59 +123,59 @@ void MainWindow::setupActions() TDEActionCollection *ac = actionCollection(); // abbreviation // File actions - KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotNewFile()), ac); - openExAction = new TDEAction(i18n("Open Exa&mples..."), "bookmark_folder", CTRL+Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotOpenExample()), ac, "open_examples"); - KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpenFile()), ac); - m_recentFiles = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotOpenFile(const KURL&)), ac); - KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSaveFile()), ac); - KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), ac); - new TDEAction(i18n("Save &Canvas..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanvas()), ac, "save_canvas"); - speed = new TDESelectAction(i18n("Execution Speed"), 0, ALT+Key_S, TQT_TQOBJECT(this), TQT_SLOT( slotChangeSpeed() ), ac, "speed"); + KStdAction::openNew(this, TQ_SLOT(slotNewFile()), ac); + openExAction = new TDEAction(i18n("Open Exa&mples..."), "bookmark_folder", CTRL+Key_E, this, TQ_SLOT(slotOpenExample()), ac, "open_examples"); + KStdAction::open(this, TQ_SLOT(slotOpenFile()), ac); + m_recentFiles = KStdAction::openRecent(this, TQ_SLOT(slotOpenFile(const KURL&)), ac); + KStdAction::save(this, TQ_SLOT(slotSaveFile()), ac); + KStdAction::saveAs(this, TQ_SLOT(slotSaveAs()), ac); + new TDEAction(i18n("Save &Canvas..."), 0, 0, this, TQ_SLOT(slotSaveCanvas()), ac, "save_canvas"); + speed = new TDESelectAction(i18n("Execution Speed"), 0, ALT+Key_S, this, TQ_SLOT( slotChangeSpeed() ), ac, "speed"); TQStringList speeds; speeds << i18n("Full Speed") << i18n("Slow") << i18n("Slower") << i18n("Slowest"); speed->setItems(speeds); speed->setCurrentItem(0); - run = new TDEAction(i18n("&Execute Commands"), "gear", ALT+Key_Return, TQT_TQOBJECT(this), TQT_SLOT( slotExecute() ), ac, "run"); - pause = new TDEToggleAction(i18n("Pause E&xecution"), "media-playback-pause", Key_Pause, TQT_TQOBJECT(this), TQT_SLOT( slotPauseExecution() ), ac, "pause"); + run = new TDEAction(i18n("&Execute Commands"), "gear", ALT+Key_Return, this, TQ_SLOT( slotExecute() ), ac, "run"); + pause = new TDEToggleAction(i18n("Pause E&xecution"), "media-playback-pause", Key_Pause, this, TQ_SLOT( slotPauseExecution() ), ac, "pause"); pause->setChecked(false); pause->setEnabled(false); - stop = new TDEAction(i18n("Stop E&xecution"), "process-stop", Key_Escape, TQT_TQOBJECT(this), TQT_SLOT( slotAbortExecution() ), ac, "stop"); + stop = new TDEAction(i18n("Stop E&xecution"), "process-stop", Key_Escape, this, TQ_SLOT( slotAbortExecution() ), ac, "stop"); stop->setEnabled(false); - KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), ac); - KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), ac); + KStdAction::print(this, TQ_SLOT(slotPrint()), ac); + KStdAction::quit(this, TQ_SLOT(close()), ac); // Edit actions - KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), ac); - KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(slotRedo()), ac); - KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), ac); - KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), ac); - KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), ac); - KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), ac); - KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), ac); - new TDEToggleAction(i18n("Toggle Insert"), Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(slotToggleInsert()), ac, "set_insert"); - KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(slotFind()), ac); - KStdAction::findNext(TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()), ac); - KStdAction::findPrev(TQT_TQOBJECT(this), TQT_SLOT(slotFindPrevious()), ac); - KStdAction::replace(TQT_TQOBJECT(this), TQT_SLOT(slotReplace()), ac); + KStdAction::undo(this, TQ_SLOT(slotUndo()), ac); + KStdAction::redo(this, TQ_SLOT(slotRedo()), ac); + KStdAction::cut(this, TQ_SLOT(slotCut()), ac); + KStdAction::copy(this, TQ_SLOT(slotCopy()), ac); + KStdAction::paste(this, TQ_SLOT(slotPaste()), ac); + KStdAction::selectAll(this, TQ_SLOT(slotSelectAll()), ac); + KStdAction::deselect(this, TQ_SLOT(slotClearSelection()), ac); + new TDEToggleAction(i18n("Toggle Insert"), Key_Insert, this, TQ_SLOT(slotToggleInsert()), ac, "set_insert"); + KStdAction::find(this, TQ_SLOT(slotFind()), ac); + KStdAction::findNext(this, TQ_SLOT(slotFindNext()), ac); + KStdAction::findPrev(this, TQ_SLOT(slotFindPrevious()), ac); + KStdAction::replace(this, TQ_SLOT(slotReplace()), ac); // View actions - new TDEToggleAction(i18n("Show &Line Numbers"), 0, Key_F11, TQT_TQOBJECT(this), TQT_SLOT(slotToggleLineNumbers()), ac, "line_numbers"); - m_fullscreen = KStdAction::fullScreen(TQT_TQOBJECT(this), TQT_SLOT(slotToggleFullscreen()), ac, this, "full_screen"); + new TDEToggleAction(i18n("Show &Line Numbers"), 0, Key_F11, this, TQ_SLOT(slotToggleLineNumbers()), ac, "line_numbers"); + m_fullscreen = KStdAction::fullScreen(this, TQ_SLOT(slotToggleFullscreen()), ac, this, "full_screen"); m_fullscreen->setChecked(b_fullscreen); // Tools actions - colorpicker = new TDEToggleAction(i18n("&Color Picker"), "colorize", ALT+Key_C, TQT_TQOBJECT(this), TQT_SLOT(slotColorPicker()), ac, "color_picker"); - new TDEAction(i18n("&Indent"), "format-indent-more", CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotIndent()), ac, "edit_indent"); - new TDEAction(i18n("&Unindent"), "format-indent-less", CTRL+SHIFT+Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotUnIndent()), ac, "edit_unindent"); - new TDEAction(i18n("Cl&ean Indentation"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotCleanIndent()), ac, "edit_cleanIndent"); - new TDEAction(i18n("Co&mment"), 0, CTRL+Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotComment()), ac, "edit_comment"); - new TDEAction(i18n("Unc&omment"), 0, CTRL+SHIFT+Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotUnComment()), ac, "edit_uncomment"); + colorpicker = new TDEToggleAction(i18n("&Color Picker"), "colorize", ALT+Key_C, this, TQ_SLOT(slotColorPicker()), ac, "color_picker"); + new TDEAction(i18n("&Indent"), "format-indent-more", CTRL+Key_I, this, TQ_SLOT(slotIndent()), ac, "edit_indent"); + new TDEAction(i18n("&Unindent"), "format-indent-less", CTRL+SHIFT+Key_I, this, TQ_SLOT(slotUnIndent()), ac, "edit_unindent"); + new TDEAction(i18n("Cl&ean Indentation"), 0, 0, this, TQ_SLOT(slotCleanIndent()), ac, "edit_cleanIndent"); + new TDEAction(i18n("Co&mment"), 0, CTRL+Key_D, this, TQ_SLOT(slotComment()), ac, "edit_comment"); + new TDEAction(i18n("Unc&omment"), 0, CTRL+SHIFT+Key_D, this, TQ_SLOT(slotUnComment()), ac, "edit_uncomment"); // Settings actions - KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotSettings()), ac ); - new TDEAction(i18n("&Configure Editor..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditor()), ac, "set_confdlg"); + KStdAction::preferences( this, TQ_SLOT(slotSettings()), ac ); + new TDEAction(i18n("&Configure Editor..."), "configure", 0, this, TQ_SLOT(slotEditor()), ac, "set_confdlg"); // Help actions - ContextHelp = new TDEAction(0, 0, Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotContextHelp()), ac, "context_help"); + ContextHelp = new TDEAction(0, 0, Key_F2, this, TQ_SLOT(slotContextHelp()), ac, "context_help"); slotContextHelpUpdate(); // this sets the label of this action // other @@ -204,9 +204,9 @@ void MainWindow::setupEditor() slotSetHighlightstyle( Settings::logoLanguage() ); // allow the cursor position to be indicated in the statusbar - connect( editor, TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(slotCursorStatusBar()) ); + connect( editor, TQ_SIGNAL(cursorPositionChanged()), this, TQ_SLOT(slotCursorStatusBar()) ); // and update the context help menu item - connect( editor, TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(slotContextHelpUpdate()) ); + connect( editor, TQ_SIGNAL(cursorPositionChanged()), this, TQ_SLOT(slotContextHelpUpdate()) ); translate = new Translate(); } @@ -236,7 +236,7 @@ void MainWindow::setupCanvas() baseLayout->setColStretch(0, 1); TQWhatsThis::add( canvasView, i18n("This is the canvas, here the turtle draws a picture.") ); canvasView->show(); - connect( canvasView, TQT_SIGNAL( CanvasResized() ), this, TQT_SLOT( slotUpdateCanvas() ) ); + connect( canvasView, TQ_SIGNAL( CanvasResized() ), this, TQ_SLOT( slotUpdateCanvas() ) ); } // END @@ -490,7 +490,7 @@ bool MainWindow::queryClose() } } } - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); config->setGroup("General Options"); m_recentFiles->saveEntries(config, "Recent Files"); config->sync(); @@ -520,15 +520,15 @@ void MainWindow::slotExecute() // start paring slotStatusBar(i18n("Parsing commands..."), IDS_STATUS); kdDebug(0)<<"############## PARSING STARTED ##############"<<endl; - kapp->processEvents(); + tdeApp->processEvents(); errMsg = new ErrorMessage(this); // create an empty errorDialog TQString txt = editorInterface->text() + "\x0a\x0a"; // parser expects input to have 2 delimiting newlines TQTextIStream in(&txt); // create the stream Parser parser(in); // pass the reference to the stream to the parse object - connect(&parser, TQT_SIGNAL( ErrorMsg(Token&, const TQString&, uint) ), - errMsg, TQT_SLOT( slotAddError(Token&, const TQString&, uint) ) ); - connect( errMsg, TQT_SIGNAL(setSelection(uint, uint, uint, uint) ), - this, TQT_SLOT(slotSetSelection(uint, uint, uint, uint) ) ); + connect(&parser, TQ_SIGNAL( ErrorMsg(Token&, const TQString&, uint) ), + errMsg, TQ_SLOT( slotAddError(Token&, const TQString&, uint) ) ); + connect( errMsg, TQ_SIGNAL(setSelection(uint, uint, uint, uint) ), + this, TQ_SLOT(slotSetSelection(uint, uint, uint, uint) ) ); parser.parse(); // and GO! TreeNode* root = parser.getTree(); // when finished parsing get the nodeTree kdDebug(0)<<"############## PARSING FINISHED ##############"<<endl; @@ -541,42 +541,42 @@ void MainWindow::slotExecute() kdDebug(0)<<"############## EXECUTION STARTED ##############"<<endl; exe = new Executer(root); // make Executer object, 'exe', and pass it the nodeTree - connect(this, TQT_SIGNAL( changeSpeed(int) ), exe, TQT_SLOT(slotChangeSpeed(int) ) ); - connect(this, TQT_SIGNAL( unpauseExecution() ), exe, TQT_SLOT( slotStopPausing() ) ); - connect( exe, TQT_SIGNAL( setSelection(uint, uint, uint, uint) ), - this, TQT_SLOT ( slotSetSelection(uint, uint, uint, uint) ) ); - connect( exe, TQT_SIGNAL( ErrorMsg(Token&, const TQString&, uint) ), - errMsg, TQT_SLOT ( slotAddError(Token&, const TQString&, uint) ) ); - connect( exe, TQT_SIGNAL( InputDialog(TQString&) ), this, TQT_SLOT( slotInputDialog(TQString&) ) ); - connect( exe, TQT_SIGNAL( MessageDialog(TQString) ), this, TQT_SLOT( slotMessageDialog(TQString) ) ); + connect(this, TQ_SIGNAL( changeSpeed(int) ), exe, TQ_SLOT(slotChangeSpeed(int) ) ); + connect(this, TQ_SIGNAL( unpauseExecution() ), exe, TQ_SLOT( slotStopPausing() ) ); + connect( exe, TQ_SIGNAL( setSelection(uint, uint, uint, uint) ), + this, TQ_SLOT ( slotSetSelection(uint, uint, uint, uint) ) ); + connect( exe, TQ_SIGNAL( ErrorMsg(Token&, const TQString&, uint) ), + errMsg, TQ_SLOT ( slotAddError(Token&, const TQString&, uint) ) ); + connect( exe, TQ_SIGNAL( InputDialog(TQString&) ), this, TQ_SLOT( slotInputDialog(TQString&) ) ); + connect( exe, TQ_SIGNAL( MessageDialog(TQString) ), this, TQ_SLOT( slotMessageDialog(TQString) ) ); // Connect the signals form Executer to the slots from Canvas: - connect( exe, TQT_SIGNAL( Clear() ), canvasView, TQT_SLOT( slotClear() ) ); - connect( exe, TQT_SIGNAL( Go(double, double) ), canvasView, TQT_SLOT( slotGo(double, double) ) ); - connect( exe, TQT_SIGNAL( GoX(double) ), canvasView, TQT_SLOT( slotGoX(double) ) ); - connect( exe, TQT_SIGNAL( GoY(double) ), canvasView, TQT_SLOT( slotGoY(double) ) ); - connect( exe, TQT_SIGNAL( Forward(double) ), canvasView, TQT_SLOT( slotForward(double) ) ); - connect( exe, TQT_SIGNAL( Backward(double) ), canvasView, TQT_SLOT( slotBackward(double) ) ); - connect( exe, TQT_SIGNAL( Direction(double) ), canvasView, TQT_SLOT( slotDirection(double) ) ); - connect( exe, TQT_SIGNAL( TurnLeft(double) ), canvasView, TQT_SLOT( slotTurnLeft(double) ) ); - connect( exe, TQT_SIGNAL( TurnRight(double) ), canvasView, TQT_SLOT( slotTurnRight(double) ) ); - connect( exe, TQT_SIGNAL( Center() ), canvasView, TQT_SLOT( slotCenter() ) ); - connect( exe, TQT_SIGNAL( SetPenWidth(int) ), canvasView, TQT_SLOT( slotSetPenWidth(int) ) ); - connect( exe, TQT_SIGNAL( PenUp() ), canvasView, TQT_SLOT( slotPenUp() ) ); - connect( exe, TQT_SIGNAL( PenDown() ), canvasView, TQT_SLOT( slotPenDown() ) ); - connect( exe, TQT_SIGNAL( SetFgColor(int, int, int) ), canvasView, TQT_SLOT( slotSetFgColor(int, int, int) ) ); - connect( exe, TQT_SIGNAL( SetBgColor(int, int, int) ), canvasView, TQT_SLOT( slotSetBgColor(int, int, int) ) ); - connect( exe, TQT_SIGNAL( ResizeCanvas(int, int) ), canvasView, TQT_SLOT( slotResizeCanvas(int, int) ) ); - connect( exe, TQT_SIGNAL( SpriteShow() ), canvasView, TQT_SLOT( slotSpriteShow() ) ); - connect( exe, TQT_SIGNAL( SpriteHide() ), canvasView, TQT_SLOT( slotSpriteHide() ) ); - connect( exe, TQT_SIGNAL( SpritePress() ), canvasView, TQT_SLOT( slotSpritePress() ) ); - connect( exe, TQT_SIGNAL( SpriteChange(int) ), canvasView, TQT_SLOT( slotSpriteChange(int) ) ); - connect( exe, TQT_SIGNAL( Print(TQString) ), canvasView, TQT_SLOT( slotPrint(TQString) ) ); - connect( exe, TQT_SIGNAL( FontType(TQString, TQString) ), canvasView, TQT_SLOT( slotFontType(TQString, TQString) ) ); - connect( exe, TQT_SIGNAL( FontSize(int) ), canvasView, TQT_SLOT( slotFontSize(int) ) ); - connect( exe, TQT_SIGNAL( WrapOn() ), canvasView, TQT_SLOT( slotWrapOn() ) ); - connect( exe, TQT_SIGNAL( WrapOff() ), canvasView, TQT_SLOT( slotWrapOff() ) ); - connect( exe, TQT_SIGNAL( Reset() ), canvasView, TQT_SLOT( slotReset() ) ); + connect( exe, TQ_SIGNAL( Clear() ), canvasView, TQ_SLOT( slotClear() ) ); + connect( exe, TQ_SIGNAL( Go(double, double) ), canvasView, TQ_SLOT( slotGo(double, double) ) ); + connect( exe, TQ_SIGNAL( GoX(double) ), canvasView, TQ_SLOT( slotGoX(double) ) ); + connect( exe, TQ_SIGNAL( GoY(double) ), canvasView, TQ_SLOT( slotGoY(double) ) ); + connect( exe, TQ_SIGNAL( Forward(double) ), canvasView, TQ_SLOT( slotForward(double) ) ); + connect( exe, TQ_SIGNAL( Backward(double) ), canvasView, TQ_SLOT( slotBackward(double) ) ); + connect( exe, TQ_SIGNAL( Direction(double) ), canvasView, TQ_SLOT( slotDirection(double) ) ); + connect( exe, TQ_SIGNAL( TurnLeft(double) ), canvasView, TQ_SLOT( slotTurnLeft(double) ) ); + connect( exe, TQ_SIGNAL( TurnRight(double) ), canvasView, TQ_SLOT( slotTurnRight(double) ) ); + connect( exe, TQ_SIGNAL( Center() ), canvasView, TQ_SLOT( slotCenter() ) ); + connect( exe, TQ_SIGNAL( SetPenWidth(int) ), canvasView, TQ_SLOT( slotSetPenWidth(int) ) ); + connect( exe, TQ_SIGNAL( PenUp() ), canvasView, TQ_SLOT( slotPenUp() ) ); + connect( exe, TQ_SIGNAL( PenDown() ), canvasView, TQ_SLOT( slotPenDown() ) ); + connect( exe, TQ_SIGNAL( SetFgColor(int, int, int) ), canvasView, TQ_SLOT( slotSetFgColor(int, int, int) ) ); + connect( exe, TQ_SIGNAL( SetBgColor(int, int, int) ), canvasView, TQ_SLOT( slotSetBgColor(int, int, int) ) ); + connect( exe, TQ_SIGNAL( ResizeCanvas(int, int) ), canvasView, TQ_SLOT( slotResizeCanvas(int, int) ) ); + connect( exe, TQ_SIGNAL( SpriteShow() ), canvasView, TQ_SLOT( slotSpriteShow() ) ); + connect( exe, TQ_SIGNAL( SpriteHide() ), canvasView, TQ_SLOT( slotSpriteHide() ) ); + connect( exe, TQ_SIGNAL( SpritePress() ), canvasView, TQ_SLOT( slotSpritePress() ) ); + connect( exe, TQ_SIGNAL( SpriteChange(int) ), canvasView, TQ_SLOT( slotSpriteChange(int) ) ); + connect( exe, TQ_SIGNAL( Print(TQString) ), canvasView, TQ_SLOT( slotPrint(TQString) ) ); + connect( exe, TQ_SIGNAL( FontType(TQString, TQString) ), canvasView, TQ_SLOT( slotFontType(TQString, TQString) ) ); + connect( exe, TQ_SIGNAL( FontSize(int) ), canvasView, TQ_SLOT( slotFontSize(int) ) ); + connect( exe, TQ_SIGNAL( WrapOn() ), canvasView, TQ_SLOT( slotWrapOn() ) ); + connect( exe, TQ_SIGNAL( WrapOff() ), canvasView, TQ_SLOT( slotWrapOff() ) ); + connect( exe, TQ_SIGNAL( Reset() ), canvasView, TQ_SLOT( slotReset() ) ); // START EXECUTION on the selected speed, and use the feedbacked boolean value slotChangeSpeed(); @@ -625,7 +625,7 @@ void MainWindow::finishExecution() if (speed->currentItem() == 0) slotClearSelection(); // if coming from fullscreen-mode show the editor, menu- and statusbar - if (b_fullscreen) TQTimer::singleShot( 1000, this, TQT_SLOT( slotFinishedFullScreenExecution() ) ); + if (b_fullscreen) TQTimer::singleShot( 1000, this, TQ_SLOT( slotFinishedFullScreenExecution() ) ); } void MainWindow::slotChangeSpeed() @@ -833,9 +833,9 @@ void MainWindow::slotFinishedFullScreenExecution() if ( errMsg->containsErrors() ) slotBackToFullScreen(); // straight back to edit if there where errors else { - connect( restartOrBackDialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotRestartFullScreen() ) ); - connect( restartOrBackDialog, TQT_SIGNAL( user2Clicked() ), this, TQT_SLOT( slotBackToFullScreen() ) ); - connect( restartOrBackDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotBackToFullScreen() ) ); + connect( restartOrBackDialog, TQ_SIGNAL( user1Clicked() ), this, TQ_SLOT( slotRestartFullScreen() ) ); + connect( restartOrBackDialog, TQ_SIGNAL( user2Clicked() ), this, TQ_SLOT( slotBackToFullScreen() ) ); + connect( restartOrBackDialog, TQ_SIGNAL( finished() ), this, TQ_SLOT( slotBackToFullScreen() ) ); restartOrBackDialog->show(); restartOrBackDialog->move(50, 50); } @@ -870,13 +870,13 @@ void MainWindow::slotSettings() // Create a new dialog with the same name as the above checking code. TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self() ); // connect the help - connect( dialog, TQT_SIGNAL( helpClicked() ), this, TQT_SLOT( slotSettingsHelp() ) ); + connect( dialog, TQ_SIGNAL( helpClicked() ), this, TQ_SLOT( slotSettingsHelp() ) ); // making the filling for the 'General' settings dept. general = new TQWidget(); TQGridLayout *generalLayout = new TQGridLayout( general, 1, 1, 11, 6, "generalLayout"); WidthHeightBox = new TQGroupBox( i18n("Initial Canvas Size"), general ); - WidthHeightBox->setColumnLayout(0, Qt::Vertical ); + WidthHeightBox->setColumnLayout(0, TQt::Vertical ); WidthHeightBox->layout()->setSpacing( 6 ); WidthHeightBox->layout()->setMargin( 11 ); TQVBoxLayout *WidthHeightBoxLayout = new TQVBoxLayout( WidthHeightBox->layout() ); @@ -917,7 +917,7 @@ void MainWindow::slotSettings() TQWidget *language = new TQWidget(); TQGridLayout *languageLayout = new TQGridLayout( language, 1, 1, 11, 6, "Form1Layout"); TQGroupBox *groupBox1 = new TQGroupBox( language, "groupBox1" ); - groupBox1->setColumnLayout(0, Qt::Vertical ); + groupBox1->setColumnLayout(0, TQt::Vertical ); groupBox1->layout()->setSpacing( 6 ); groupBox1->layout()->setMargin( 11 ); TQGridLayout *groupBox1Layout = new TQGridLayout( groupBox1->layout() ); @@ -946,7 +946,7 @@ void MainWindow::slotSettings() dialog->addPage( language, i18n("Language"), "locale", i18n("Language Settings") ); // When the user clicks OK or Apply we want to update our settings. - connect( dialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotUpdateSettings() ) ); + connect( dialog, TQ_SIGNAL( settingsChanged() ), this, TQ_SLOT( slotUpdateSettings() ) ); // Display the dialog is there where errors. dialog->setInitialSize( TQSize(550, 300) ); @@ -984,7 +984,7 @@ void MainWindow::readConfig(TDEConfig *config) void MainWindow::slotSettingsHelp() { - kapp->invokeHelp("settings-configure", "", ""); + tdeApp->invokeHelp("settings-configure", "", ""); } // END @@ -1040,7 +1040,7 @@ void MainWindow::slotContextHelp() kdDebug(0)<<"trying to open a help page using this keyword: "<<helpWord<<endl; - kapp->invokeHelp(helpWord, "", ""); + tdeApp->invokeHelp(helpWord, "", ""); TQString help2statusBar; if ( helpKeyword.startsWith("<") ) help2statusBar = helpKeyword; @@ -1150,8 +1150,8 @@ void MainWindow::slotColorPicker() { picker = new ColorPicker(this); if(picker == 0) return; // safety - connect( picker, TQT_SIGNAL( visible(bool) ), colorpicker, TQT_SLOT( setChecked(bool) ) ); - connect( picker, TQT_SIGNAL( ColorCode(TQString) ), this, TQT_SLOT( slotInsertText(TQString) ) ); + connect( picker, TQ_SIGNAL( visible(bool) ), colorpicker, TQ_SLOT( setChecked(bool) ) ); + connect( picker, TQ_SIGNAL( ColorCode(TQString) ), this, TQ_SLOT( slotInsertText(TQString) ) ); } // if picker is not 0, there is a colorpickerdialog which only needs to be shown OR hidden if ( picker->isHidden() ) diff --git a/kturtle/src/kturtle.h b/kturtle/src/kturtle.h index b9dfd00c..f42cbe81 100644 --- a/kturtle/src/kturtle.h +++ b/kturtle/src/kturtle.h @@ -45,7 +45,7 @@ class TDERecentFilesAction; class MainWindow : public KParts::MainWindow { - Q_OBJECT + TQ_OBJECT public: diff --git a/kturtle/src/parser.h b/kturtle/src/parser.h index d1baf5d1..b05a354b 100644 --- a/kturtle/src/parser.h +++ b/kturtle/src/parser.h @@ -28,7 +28,7 @@ class Parser : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kturtle/src/settings.kcfgc b/kturtle/src/settings.kcfgc index d6aa84aa..90c57632 100644 --- a/kturtle/src/settings.kcfgc +++ b/kturtle/src/settings.kcfgc @@ -1,5 +1,5 @@ File=kturtle.kcfg -IncludeFiles=kstandarddirs.h,kdebug.h +IncludeFiles=tdestandarddirs.h,kdebug.h ClassName=Settings Singleton=true Mutators=true |