From a374efce3a207b39514be3c52264091400ce297e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:44:41 +0000 Subject: [PATCH] TQt4 port kdeedu This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- blinken/src/artsplayer.h | 3 +- blinken/src/blinken.cpp | 52 +- blinken/src/blinken.h | 5 +- blinken/src/blinkengame.h | 3 +- blinken/src/button.cpp | 12 +- blinken/src/counter.cpp | 2 +- blinken/src/fontutils.cpp | 4 +- blinken/src/highscoredialog.cpp | 40 +- blinken/src/highscoredialog.h | 4 +- blinken/src/number.cpp | 30 +- kalzium/ChangeLog | 2 +- kalzium/RELEASE-PLAN | 2 +- kalzium/src/detailedgraphicaloverview.cpp | 82 +- kalzium/src/detailedgraphicaloverview.h | 7 +- kalzium/src/detailinfodlg.cpp | 94 +- kalzium/src/detailinfodlg.h | 3 +- kalzium/src/element.cpp | 70 +- kalzium/src/elementdataviewer.cpp | 18 +- kalzium/src/elementdataviewer.h | 3 +- kalzium/src/eqchemview.cpp | 14 +- kalzium/src/eqchemview.h | 18 +- kalzium/src/eqresult.cpp | 8 +- kalzium/src/eqresult.h | 15 +- kalzium/src/isotope.cpp | 16 +- kalzium/src/kalzium.cpp | 56 +- kalzium/src/kalzium.h | 7 +- kalzium/src/kalziumdataobject.cpp | 12 +- kalzium/src/kalziumtip.cpp | 70 +- kalzium/src/kalziumtip.h | 15 +- kalzium/src/kalziumutils.cpp | 10 +- kalzium/src/molcalcwidget.cpp | 22 +- kalzium/src/molcalcwidget.h | 5 +- kalzium/src/molcalcwidgetbase.ui | 22 +- kalzium/src/moleculeparser.cpp | 2 +- kalzium/src/orbitswidget.cpp | 8 +- kalzium/src/orbitswidget.h | 5 +- kalzium/src/parser.cpp | 6 +- kalzium/src/periodictableview.cpp | 138 +-- kalzium/src/periodictableview.h | 7 +- kalzium/src/plotsetupwidget.ui | 42 +- kalzium/src/plotwidget.cpp | 6 +- kalzium/src/plotwidget.h | 3 +- kalzium/src/settings_colors.ui | 208 ++-- kalzium/src/settings_misc.ui | 14 +- kalzium/src/settings_units.ui | 24 +- kalzium/src/somwidget.ui | 30 +- kalzium/src/somwidget_impl.cpp | 16 +- kalzium/src/somwidget_impl.h | 5 +- kalzium/src/spectrum.cpp | 24 +- kalzium/src/spectrum.h | 4 +- kalzium/src/spectrumview.ui | 30 +- kalzium/src/spectrumviewimpl.cpp | 8 +- kalzium/src/spectrumviewimpl.h | 5 +- kalzium/src/spectrumwidget.cpp | 46 +- kalzium/src/spectrumwidget.h | 5 +- kalzium/src/tempunit.cpp | 16 +- kalzium/src/tempunit.h | 4 +- kalzium/src/timewidget.ui | 28 +- kalzium/src/timewidget_impl.cpp | 8 +- kalzium/src/timewidget_impl.h | 5 +- kanagram/Doxyfile | 4 +- kanagram/data/fruits.kvtml | 4 +- kanagram/data/objects.kvtml | 2 +- kanagram/data/space.kvtml | 2 +- kanagram/data/vegetables.kvtml | 2 +- kanagram/src/fontutils.cpp | 4 +- kanagram/src/kanagram.cpp | 70 +- kanagram/src/kanagram.h | 3 +- kanagram/src/kanagramgame.cpp | 8 +- kanagram/src/kanagramgame.h | 5 +- kanagram/src/keduvocdocument.cpp | 32 +- kanagram/src/keduvocdocument.h | 11 +- kanagram/src/keduvocexpression.cpp | 4 +- kanagram/src/keduvocexpression.h | 2 +- kanagram/src/keduvockvtmlreader.cpp | 82 +- kanagram/src/keduvockvtmlreader.h | 56 +- kanagram/src/keduvockvtmlwriter.cpp | 26 +- kanagram/src/keduvockvtmlwriter.h | 54 +- kanagram/src/leitnersystem.cpp | 10 +- kanagram/src/leitnersystemview.cpp | 6 +- kanagram/src/leitnersystemview.h | 5 +- kanagram/src/mainsettings.cpp | 8 +- kanagram/src/mainsettings.h | 3 +- kanagram/src/mainsettingswidget.ui | 34 +- kanagram/src/newstuff.cpp | 2 +- kanagram/src/newstuff.h | 3 +- kanagram/src/newstuffwidget.ui | 12 +- kanagram/src/vocabedit.cpp | 12 +- kanagram/src/vocabedit.h | 5 +- kanagram/src/vocabeditwidget.ui | 62 +- kanagram/src/vocabsettings.cpp | 4 +- kanagram/src/vocabsettings.h | 3 +- kanagram/src/vocabsettingswidget.ui | 26 +- kbruch/ChangeLog | 4 +- kbruch/src/exercisebase.cpp | 4 +- kbruch/src/exercisebase.h | 5 +- kbruch/src/exercisecompare.cpp | 18 +- kbruch/src/exercisecompare.h | 3 +- kbruch/src/exerciseconvert.cpp | 18 +- kbruch/src/exerciseconvert.h | 3 +- kbruch/src/exercisefactorize.cpp | 82 +- kbruch/src/exercisefactorize.h | 19 +- kbruch/src/factorizedwidget.cpp | 8 +- kbruch/src/factorizedwidget.h | 3 +- kbruch/src/fractionbasewidget.cpp | 16 +- kbruch/src/fractionbasewidget.h | 7 +- kbruch/src/kbruch.cpp | 6 +- kbruch/src/kbruch.h | 2 +- kbruch/src/mainqtwidget.cpp | 66 +- kbruch/src/mainqtwidget.h | 15 +- kbruch/src/ratio.cpp | 4 +- kbruch/src/rationalwidget.cpp | 8 +- kbruch/src/rationalwidget.h | 3 +- kbruch/src/ratiowidget.cpp | 8 +- kbruch/src/ratiowidget.h | 3 +- kbruch/src/resultwidget.cpp | 10 +- kbruch/src/resultwidget.h | 3 +- kbruch/src/statisticsview.cpp | 34 +- kbruch/src/statisticsview.h | 7 +- kbruch/src/taskview.cpp | 20 +- kbruch/src/taskview.h | 3 +- kbruch/src/taskvieweroptionsbase.ui | 30 +- kbruch/src/taskwidget.cpp | 8 +- kbruch/src/taskwidget.h | 3 +- kbruch/testcases/primenumber_test.cpp | 52 +- kbruch/testcases/ratio_test.cpp | 158 +-- keduca/keduca/Makefile.am | 4 +- keduca/keduca/configdialogbase.ui | 20 +- keduca/keduca/kcheckeduca.cpp | 12 +- keduca/keduca/kcheckeduca.h | 3 +- keduca/keduca/keduca.cpp | 20 +- keduca/keduca/keduca.h | 3 +- keduca/keduca/keduca_part.cpp | 8 +- keduca/keduca/keduca_part.h | 3 +- keduca/keduca/keducaprefs.cpp | 18 +- keduca/keduca/keducaprefs.h | 3 +- keduca/keduca/keducaview.cpp | 60 +- keduca/keduca/keducaview.h | 7 +- keduca/keduca/kgroupeduca.cpp | 10 +- keduca/keduca/kgroupeduca.h | 3 +- keduca/keduca/kquestion.cpp | 12 +- keduca/keduca/kquestion.h | 5 +- keduca/keduca/kradioeduca.cpp | 12 +- keduca/keduca/kradioeduca.h | 3 +- keduca/keducabuilder/kcontroladdedit.cpp | 40 +- keduca/keducabuilder/kcontroladdedit.h | 5 +- keduca/keducabuilder/kcontroladdeditbase.ui | 162 +-- keduca/keducabuilder/kcontrolheader.cpp | 70 +- keduca/keducabuilder/kcontrolheader.h | 3 +- keduca/keducabuilder/kcontrolheaderbase.ui | 82 +- keduca/keducabuilder/keducabuilder.cpp | 86 +- keduca/keducabuilder/keducabuilder.h | 3 +- .../keducabuilder/keducaeditorstartdialog.cpp | 8 +- .../keducabuilder/keducaeditorstartdialog.h | 3 +- .../keducaeditorstartdialogbase.ui | 36 +- keduca/keducabuilder/klangcombo.cpp | 12 +- keduca/keducabuilder/klangcombo.h | 7 +- keduca/keducabuilder/ktagcombobox.cpp | 26 +- keduca/keducabuilder/ktagcombobox.h | 15 +- keduca/libkeduca/fileread.cpp | 98 +- keduca/libkeduca/fileread.h | 9 +- keduca/libkeduca/kgallerydialog.cpp | 4 +- keduca/libkeduca/kgallerydialog.h | 3 +- keduca/libkeduca/kgallerydialogbase.ui | 72 +- kgeography/Changelog | 2 +- kgeography/data/africa.kgm | 2 +- kgeography/data/world.kgm | 4 +- kgeography/src/answer.cpp | 6 +- kgeography/src/answersdialog.cpp | 8 +- kgeography/src/answersdialog.h | 2 +- kgeography/src/askwidget.cpp | 8 +- kgeography/src/askwidget.h | 5 +- kgeography/src/boxasker.cpp | 8 +- kgeography/src/boxasker.h | 3 +- kgeography/src/capitaldivisionasker.cpp | 6 +- kgeography/src/capitaldivisionasker.h | 2 +- kgeography/src/division.cpp | 6 +- kgeography/src/division.h | 4 +- kgeography/src/divisioncapitalasker.cpp | 6 +- kgeography/src/divisioncapitalasker.h | 2 +- kgeography/src/divisionflagasker.cpp | 6 +- kgeography/src/divisionflagasker.h | 2 +- kgeography/src/flagdivisionasker.cpp | 4 +- kgeography/src/flagdivisionasker.h | 2 +- kgeography/src/kgeography.cpp | 44 +- kgeography/src/kgeography.h | 1 + kgeography/src/map.cpp | 14 +- kgeography/src/map.h | 4 +- kgeography/src/mapasker.cpp | 20 +- kgeography/src/mapasker.h | 5 +- kgeography/src/mapchooser.cpp | 8 +- kgeography/src/mapchooser.h | 3 +- kgeography/src/mapparser.cpp | 42 +- kgeography/src/mapparser.h | 4 +- kgeography/src/mapsdatatranslation.cpp | 24 +- kgeography/src/mapwidget.cpp | 22 +- kgeography/src/mapwidget.h | 9 +- kgeography/src/mypopup.cpp | 10 +- kgeography/src/mypopup.h | 5 +- kgeography/src/popupmanager.cpp | 4 +- kgeography/src/popupmanager.h | 5 +- khangman/ChangeLog | 2 +- khangman/README.languages | 2 +- khangman/khangman/advanced.ui | 18 +- khangman/khangman/data/en/easy.kvtml | 4 +- khangman/khangman/khangman.cpp | 86 +- khangman/khangman/khangman.h | 1 + khangman/khangman/khangmanview.cpp | 116 +- khangman/khangman/khangmanview.h | 7 +- khangman/khangman/khnewstuff.cpp | 8 +- khangman/khangman/khnewstuff.h | 4 +- khangman/khangman/normal.ui | 18 +- khangman/khangman/prefs.kcfgc | 2 +- khangman/khangman/timer.h | 1 + khangman/khangman/timerdlg.ui | 36 +- kig/ChangeLog | 18 +- kig/DESIGN | 32 +- kig/FEATURES | 4 +- kig/Makefile.am | 4 +- kig/README.boost-python1.30-gcc3.2 | 2 +- kig/TODO | 12 +- kig/configure.in.in | 18 + kig/examples/figure_angle.fgeo | 26 +- kig/examples/figure_manyobjects.fgeo | 62 +- kig/examples/session_alotofthings.fgeo | 136 +- kig/filters/cabri-filter.cc | 82 +- kig/filters/drgeo-filter-chooser.h | 1 + kig/filters/drgeo-filter-chooserbase.ui | 16 +- kig/filters/drgeo-filter.cc | 240 ++-- kig/filters/drgeo-filter.h | 2 +- kig/filters/exporter.cc | 38 +- kig/filters/filter.cc | 8 +- kig/filters/filter.h | 6 +- kig/filters/filters-common.cc | 2 +- kig/filters/imageexporteroptions.cc | 4 +- kig/filters/imageexporteroptions.h | 3 +- kig/filters/imageexporteroptionsbase.ui | 24 +- kig/filters/kgeo-filter.cc | 142 +-- kig/filters/kgeo-filter.h | 4 +- kig/filters/kgeo-resource.h | 2 +- kig/filters/kseg-defs.h | 8 +- kig/filters/kseg-filter.cc | 188 +-- kig/filters/kseg-filter.h | 2 +- kig/filters/latexexporter.cc | 16 +- kig/filters/latexexporteroptions.ui | 14 +- kig/filters/native-filter.cc | 98 +- kig/filters/svgexporter.cc | 14 +- kig/filters/svgexporteroptions.ui | 12 +- kig/filters/tests/locus.fgeo | 2 +- kig/kfile/Makefile.am | 4 +- kig/kfile/kfile_drgeo.cpp | 6 +- kig/kfile/kfile_drgeo.h | 3 +- kig/kfile/kfile_kig.cpp | 10 +- kig/kfile/kfile_kig.h | 3 +- kig/kig/kig.cpp | 24 +- kig/kig/kig.h | 3 +- kig/kig/kig_commands.cpp | 54 +- kig/kig/kig_commands.h | 7 +- kig/kig/kig_document.cc | 2 +- kig/kig/kig_part.cpp | 56 +- kig/kig/kig_part.h | 5 +- kig/kig/kig_view.cpp | 50 +- kig/kig/kig_view.h | 18 +- kig/misc/argsparser.cpp | 14 +- kig/misc/argsparser.h | 14 +- kig/misc/builtin_stuff.cc | 20 +- kig/misc/calcpaths.cc | 48 +- kig/misc/calcpaths.h | 6 +- kig/misc/common.cpp | 18 +- kig/misc/common.h | 2 +- kig/misc/coordinate.cpp | 6 +- kig/misc/coordinate.h | 4 +- kig/misc/coordinate_system.cpp | 50 +- kig/misc/coordinate_system.h | 2 +- kig/misc/cubic-common.cc | 2 +- kig/misc/guiaction.cc | 20 +- kig/misc/guiaction.h | 3 +- kig/misc/kigfiledialog.cc | 6 +- kig/misc/kigfiledialog.h | 7 +- kig/misc/kiginputdialog.cc | 28 +- kig/misc/kiginputdialog.h | 17 +- kig/misc/kigpainter.cpp | 44 +- kig/misc/kigpainter.h | 10 +- kig/misc/lists.cc | 8 +- kig/misc/object_constructor.cc | 38 +- kig/misc/object_constructor.h | 8 +- kig/misc/object_hierarchy.cc | 146 +-- kig/misc/object_hierarchy.h | 12 +- kig/misc/rect.cc | 10 +- kig/misc/rect.h | 8 +- kig/misc/special_constructors.cc | 188 +-- kig/misc/special_constructors.h | 18 +- kig/modes/base_mode.cc | 28 +- kig/modes/base_mode.h | 2 +- kig/modes/construct_mode.cc | 82 +- kig/modes/construct_mode.h | 2 +- kig/modes/dragrectmode.cc | 2 +- kig/modes/edittype.cc | 8 +- kig/modes/edittype.h | 3 +- kig/modes/edittypebase.ui | 40 +- kig/modes/label.cc | 68 +- kig/modes/label.h | 10 +- kig/modes/linkslabel.cpp | 34 +- kig/modes/linkslabel.h | 5 +- kig/modes/macro.cc | 6 +- kig/modes/macrowizard.cc | 8 +- kig/modes/macrowizard.h | 3 +- kig/modes/macrowizardbase.ui | 28 +- kig/modes/mode.h | 2 +- kig/modes/moving.cc | 54 +- kig/modes/moving.h | 2 +- kig/modes/normal.cc | 6 +- kig/modes/popup.cc | 52 +- kig/modes/popup.h | 2 + kig/modes/textlabelwizard.cc | 12 +- kig/modes/textlabelwizard.h | 5 +- kig/modes/textlabelwizardbase.ui | 22 +- kig/modes/typesdialog.cpp | 14 +- kig/modes/typesdialog.h | 3 +- kig/modes/typesdialogbase.ui | 38 +- kig/objects/angle_type.cc | 30 +- kig/objects/arc_type.h | 4 +- kig/objects/base_type.cc | 42 +- kig/objects/bogus_imp.cc | 10 +- kig/objects/bogus_imp.h | 2 +- kig/objects/circle_imp.cc | 26 +- kig/objects/circle_imp.h | 2 +- kig/objects/conic_imp.cc | 22 +- kig/objects/conic_imp.h | 2 +- kig/objects/conic_types.cc | 104 +- kig/objects/conic_types.h | 22 +- kig/objects/cubic_imp.cc | 28 +- kig/objects/cubic_imp.h | 2 +- kig/objects/cubic_type.cc | 12 +- kig/objects/cubic_type.h | 6 +- kig/objects/intersection_types.cc | 70 +- kig/objects/intersection_types.h | 12 +- kig/objects/line_imp.cc | 10 +- kig/objects/line_imp.h | 6 +- kig/objects/line_type.cc | 12 +- kig/objects/locus_imp.cc | 2 +- kig/objects/locus_imp.h | 8 +- kig/objects/object_calcer.cc | 78 +- kig/objects/object_calcer.h | 66 +- kig/objects/object_drawer.cc | 22 +- kig/objects/object_drawer.h | 6 +- kig/objects/object_factory.cc | 98 +- kig/objects/object_factory.h | 18 +- kig/objects/object_holder.cc | 8 +- kig/objects/object_holder.h | 4 +- kig/objects/object_imp.cc | 6 +- kig/objects/object_imp.h | 12 +- kig/objects/object_imp_factory.cc | 138 +-- kig/objects/object_imp_factory.h | 8 +- kig/objects/object_type.cc | 8 +- kig/objects/object_type.h | 18 +- kig/objects/object_type_factory.cc | 4 +- kig/objects/object_type_factory.h | 2 +- kig/objects/other_imp.cc | 8 +- kig/objects/other_imp.h | 6 +- kig/objects/other_type.cc | 20 +- kig/objects/other_type.h | 8 +- kig/objects/point_imp.cc | 6 +- kig/objects/point_imp.h | 2 +- kig/objects/point_type.cc | 106 +- kig/objects/point_type.h | 20 +- kig/objects/polygon_imp.cc | 4 +- kig/objects/polygon_imp.h | 2 +- kig/objects/polygon_type.cc | 184 +-- kig/objects/polygon_type.h | 22 +- kig/objects/special_calcers.cc | 4 +- kig/objects/special_calcers.h | 2 +- kig/objects/tests_type.cc | 66 +- kig/objects/tests_type.h | 16 +- kig/objects/text_imp.cc | 4 +- kig/objects/text_imp.h | 4 +- kig/objects/text_type.cc | 32 +- kig/objects/text_type.h | 6 +- kig/pykig/pykig.py | 6 +- kig/scripting/newscriptwizard.cc | 18 +- kig/scripting/newscriptwizard.h | 3 +- kig/scripting/newscriptwizardbase.ui | 18 +- kig/scripting/python_type.cc | 22 +- kig/scripting/python_type.h | 12 +- kig/scripting/script-common.cc | 4 +- kig/scripting/script_mode.cc | 16 +- kiten/configdictionaries.cpp | 6 +- kiten/configdictionaries.h | 3 +- kiten/configdictionariesbase.ui | 64 +- kiten/configfont.ui | 6 +- kiten/configlearn.ui | 30 +- kiten/configsearching.ui | 16 +- kiten/deinf.cpp | 6 +- kiten/deinf.h | 2 +- kiten/dict.cpp | 24 +- kiten/dict.h | 5 +- kiten/edict | 1094 ++++++++--------- kiten/edict_doc.html | 8 +- kiten/edict_kanjidic_licence.html | 2 +- kiten/kanjidic | 52 +- kiten/kiten.cpp | 118 +- kiten/kiten.h | 3 +- kiten/kloader.cpp | 6 +- kiten/kromajiedit.cpp | 16 +- kiten/kromajiedit.h | 3 +- kiten/ksaver.cpp | 2 +- kiten/learn.cpp | 86 +- kiten/learn.h | 7 +- kiten/main.cpp | 4 +- kiten/optiondialog.cpp | 4 +- kiten/optiondialog.h | 3 +- kiten/rad.cpp | 42 +- kiten/rad.h | 10 +- kiten/widgets.cpp | 76 +- kiten/widgets.h | 11 +- kiten/xjdic.h | 6 +- klatin/klatin/data/vocab/en/I2L.kvtml | 4 +- klatin/klatin/data/vocab/pl/A.kvtml | 2 +- klatin/klatin/data/vocab/pl/V.kvtml | 2 +- klatin/klatin/data/vocab/sk/A.kvtml | 2 +- klatin/klatin/data/vocab/sk/BC.kvtml | 2 +- klatin/klatin/data/vocab/sk/GHI1.kvtml | 2 +- klatin/klatin/data/vocab/sk/M.kvtml | 2 +- klatin/klatin/data/vocab/sk/P2.kvtml | 2 +- klatin/klatin/data/vocab/sk/QR.kvtml | 4 +- klatin/klatin/data/vocab/sk/TU.kvtml | 4 +- klatin/klatin/klatin.cpp | 30 +- klatin/klatin/klatin.h | 3 +- klatin/klatin/klatin.kcfg | 12 +- klatin/klatin/klatinchoose.ui | 40 +- klatin/klatin/klatingrammar.cpp | 30 +- klatin/klatin/klatingrammar.h | 3 +- klatin/klatin/klatingrammarwidget.ui | 70 +- klatin/klatin/klatinresultsdialog.ui | 34 +- klatin/klatin/klatinsettings_vocabpage.ui | 34 +- klatin/klatin/klatinverbs.cpp | 18 +- klatin/klatin/klatinverbs.h | 3 +- klatin/klatin/klatinverbswidget.ui | 68 +- klatin/klatin/klatinvocab.cpp | 12 +- klatin/klatin/klatinvocab.h | 9 +- klatin/klatin/klatinvocabwidget.ui | 70 +- klatin/klatin/settings.kcfgc | 2 +- klettres/klettres/fontsdlg.ui | 6 +- klettres/klettres/klettres.cpp | 88 +- klettres/klettres/klettres.h | 5 +- klettres/klettres/klettresview.cpp | 12 +- klettres/klettres/klettresview.h | 5 +- klettres/klettres/klnewstuff.cpp | 4 +- klettres/klettres/prefs_addons.h | 6 +- klettres/klettres/soundfactory.cpp | 10 +- klettres/klettres/soundfactory.h | 7 +- klettres/klettres/timer.h | 1 + klettres/klettres/timerdlg.ui | 32 +- kmplot/KmPlot.kdevelop | 2 +- kmplot/TODO | 2 +- kmplot/kmplot/FktDlg.cpp | 6 +- kmplot/kmplot/FktDlg.h | 5 +- kmplot/kmplot/FktDlgData.ui | 44 +- kmplot/kmplot/MainDlg.cpp | 72 +- kmplot/kmplot/MainDlg.h | 17 +- kmplot/kmplot/Makefile.am | 4 +- kmplot/kmplot/View.cpp | 80 +- kmplot/kmplot/View.h | 5 +- kmplot/kmplot/coordsconfigdialog.cpp | 4 +- kmplot/kmplot/coordsconfigdialog.h | 3 +- kmplot/kmplot/diagr.cpp | 42 +- kmplot/kmplot/diagr.h | 8 +- kmplot/kmplot/editderivativespage.ui | 28 +- kmplot/kmplot/editfunction.cpp | 24 +- kmplot/kmplot/editfunction.h | 5 +- kmplot/kmplot/editfunctionpage.ui | 140 +-- kmplot/kmplot/editintegralpage.ui | 30 +- kmplot/kmplot/kconstanteditor.cpp | 20 +- kmplot/kmplot/kconstanteditor.h | 3 +- kmplot/kmplot/keditconstant.cpp | 6 +- kmplot/kmplot/keditconstant.h | 5 +- kmplot/kmplot/keditparametric.cpp | 12 +- kmplot/kmplot/keditparametric.h | 6 +- kmplot/kmplot/keditpolar.cpp | 6 +- kmplot/kmplot/keditpolar.h | 8 +- kmplot/kmplot/kminmax.cpp | 56 +- kmplot/kmplot/kminmax.h | 5 +- kmplot/kmplot/kmplot.cpp | 14 +- kmplot/kmplot/kmplot.h | 1 + kmplot/kmplot/kmplotio.cpp | 16 +- kmplot/kmplot/kmplotio.h | 4 +- kmplot/kmplot/kmplotprogress.cpp | 4 +- kmplot/kmplot/kmplotprogress.h | 5 +- kmplot/kmplot/kparametereditor.cpp | 20 +- kmplot/kmplot/kparametereditor.h | 3 +- kmplot/kmplot/kprinterdlg.cpp | 18 +- kmplot/kmplot/kprinterdlg.h | 5 +- kmplot/kmplot/ksliderwindow.cpp | 14 +- kmplot/kmplot/ksliderwindow.h | 5 +- kmplot/kmplot/parser.cpp | 38 +- kmplot/kmplot/parser.h | 4 +- kmplot/kmplot/parseriface.h | 2 +- kmplot/kmplot/qconstanteditor.ui | 32 +- kmplot/kmplot/qconstanteditor.ui.h | 2 +- kmplot/kmplot/qeditconstant.ui | 24 +- kmplot/kmplot/qeditconstant.ui.h | 2 +- kmplot/kmplot/qeditparametric.ui | 68 +- kmplot/kmplot/qeditpolar.ui | 48 +- kmplot/kmplot/qminmax.ui | 20 +- kmplot/kmplot/qparametereditor.ui | 12 +- kmplot/kmplot/settingspagecolor.ui | 58 +- kmplot/kmplot/settingspagecoords.ui | 114 +- kmplot/kmplot/settingspagefonts.ui | 14 +- kmplot/kmplot/settingspageprecision.ui | 34 +- kmplot/kmplot/settingspagescaling.ui | 36 +- kmplot/kmplot/sliderwindow.ui | 16 +- kmplot/kmplot/xparser.cpp | 40 +- kmplot/kmplot/xparser.h | 6 +- kpercentage/kpercentage/kanimation.cpp | 10 +- kpercentage/kpercentage/kanimation.h | 2 +- kpercentage/kpercentage/kanswer.cpp | 16 +- kpercentage/kpercentage/kanswer.h | 9 +- kpercentage/kpercentage/kpercentage.cpp | 8 +- kpercentage/kpercentage/kpercentage.docbook | 44 +- kpercentage/kpercentage/kpercentage.h | 3 +- kpercentage/kpercentage/kpercentmain.cpp | 36 +- kpercentage/kpercentage/kpercentmain.h | 5 +- kpercentage/kpercentage/ksplashscreen.cpp | 6 +- kpercentage/kpercentage/ksplashscreen.h | 1 + kstars/ChangeLog | 2 +- kstars/README.i18n | 2 +- kstars/README.timekeeping | 2 +- kstars/TODO | 2 +- kstars/configure.in.in | 15 + kstars/kstars/Options.kcfgc | 2 +- kstars/kstars/addcatdialog.cpp | 20 +- kstars/kstars/addcatdialog.h | 3 +- kstars/kstars/addcatdialogui.ui | 52 +- kstars/kstars/addlinkdialog.cpp | 4 +- kstars/kstars/addlinkdialog.h | 3 +- kstars/kstars/addlinkdialogui.ui | 30 +- kstars/kstars/ccdpreviewui.ui | 74 +- kstars/kstars/ccdpreviewwg.cpp | 26 +- kstars/kstars/ccdpreviewwg.h | 14 +- kstars/kstars/colorscheme.cpp | 22 +- kstars/kstars/colorscheme.h | 2 +- kstars/kstars/conbridlg.cpp | 8 +- kstars/kstars/conbridlg.h | 5 +- kstars/kstars/contrastbrightnessgui.ui | 14 +- kstars/kstars/data/Cities.dat | 2 +- kstars/kstars/data/info_url.dat | 2 +- kstars/kstars/data/tips | 6 +- kstars/kstars/deepskyobject.cpp | 2 +- kstars/kstars/deepskyobject.h | 4 +- kstars/kstars/detaildialog.cpp | 112 +- kstars/kstars/detaildialog.h | 15 +- kstars/kstars/details_data.ui | 78 +- kstars/kstars/details_database.ui | 6 +- kstars/kstars/details_links.ui | 26 +- kstars/kstars/details_log.ui | 8 +- kstars/kstars/details_position.ui | 118 +- kstars/kstars/devicemanager.cpp | 26 +- kstars/kstars/devicemanager.h | 11 +- kstars/kstars/devmanager.ui | 54 +- kstars/kstars/dms.cpp | 22 +- kstars/kstars/dms.h | 2 +- kstars/kstars/dmsbox.cpp | 4 +- kstars/kstars/dmsbox.h | 7 +- kstars/kstars/draglistbox.cpp | 6 +- kstars/kstars/draglistbox.h | 7 +- kstars/kstars/filesource.cpp | 2 +- kstars/kstars/filesource.h | 2 +- kstars/kstars/finddialog.cpp | 24 +- kstars/kstars/finddialog.h | 9 +- kstars/kstars/fitsheaderdialog.ui | 10 +- kstars/kstars/fitshistogram.cpp | 24 +- kstars/kstars/fitshistogram.h | 5 +- kstars/kstars/fitsimage.cpp | 22 +- kstars/kstars/fitsimage.h | 12 +- kstars/kstars/fitsprocess.cpp | 8 +- kstars/kstars/fitsprocess.h | 4 +- kstars/kstars/fitsviewer.cpp | 92 +- kstars/kstars/fitsviewer.h | 5 +- kstars/kstars/focusdialog.cpp | 12 +- kstars/kstars/focusdialog.h | 5 +- kstars/kstars/focusdialogdlg.ui | 32 +- kstars/kstars/fov.cpp | 8 +- kstars/kstars/fov.h | 6 +- kstars/kstars/fovdialog.cpp | 30 +- kstars/kstars/fovdialog.h | 6 +- kstars/kstars/fovdialogui.ui | 26 +- kstars/kstars/geolocation.h | 2 +- kstars/kstars/histdialog.ui | 58 +- kstars/kstars/imagereductiondlg.cpp | 8 +- kstars/kstars/imagereductiondlg.h | 3 +- kstars/kstars/imagereductionui.ui | 104 +- kstars/kstars/imagesequence.cpp | 40 +- kstars/kstars/imagesequence.h | 5 +- kstars/kstars/imageviewer.cpp | 18 +- kstars/kstars/imageviewer.h | 5 +- kstars/kstars/imgsequencedlgui.ui | 92 +- kstars/kstars/indi/LICENSE | 4 +- kstars/kstars/indi/Makefile.am | 17 + kstars/kstars/indi/apmount.cpp | 9 +- kstars/kstars/indi/apogee/ApnCamera.cpp | 82 +- kstars/kstars/indi/apogee/ApnCamera.h | 10 +- kstars/kstars/indi/apogee/ApnCamera_Linux.cpp | 4 +- kstars/kstars/indi/apogee/ApnCamera_NET.cpp | 2 +- kstars/kstars/indi/apogee/ApnCamera_USB.cpp | 4 +- kstars/kstars/indi/apogee/Apogee.h | 8 +- kstars/kstars/indi/apogee/CameraIO_Linux.cpp | 86 +- kstars/kstars/indi/apogee/CameraIO_Linux.h | 32 +- .../kstars/indi/apogee/CameraIO_LinuxISA.cpp | 8 +- .../kstars/indi/apogee/CameraIO_LinuxPCI.cpp | 8 +- .../kstars/indi/apogee/CameraIO_LinuxPPI.cpp | 8 +- kstars/kstars/indi/apogee/CameraIO_PCI.cpp | 6 +- kstars/kstars/indi/apogee/Camera_Example.cpp | 22 +- kstars/kstars/indi/apogee/Makefile.am | 4 +- kstars/kstars/indi/apogee_ppi.cpp | 38 +- kstars/kstars/indi/base64.c | 2 +- kstars/kstars/indi/celestrongps.cpp | 10 +- kstars/kstars/indi/fitsrw.c | 14 +- kstars/kstars/indi/fli/libfli.c | 12 +- kstars/kstars/indi/fli/libfli.h | 2 +- kstars/kstars/indi/fli_ccd.c | 10 +- kstars/kstars/indi/indiapi.h | 10 +- kstars/kstars/indi/indicom.c | 4 +- kstars/kstars/indi/indicom.h | 4 +- kstars/kstars/indi/indiserver.c | 4 +- kstars/kstars/indi/lilxml.c | 14 +- kstars/kstars/indi/lilxml.h | 16 +- kstars/kstars/indi/lx200_16.cpp | 4 +- kstars/kstars/indi/lx200autostar.cpp | 2 +- kstars/kstars/indi/lx200basic.cpp | 2 +- kstars/kstars/indi/lx200classic.cpp | 2 +- kstars/kstars/indi/lx200driver.c | 16 +- kstars/kstars/indi/lx200driver.h | 6 +- kstars/kstars/indi/lx200generic.cpp | 17 +- kstars/kstars/indi/lx200gps.cpp | 8 +- kstars/kstars/indi/sbigccd.cpp | 8 +- kstars/kstars/indi/skycommander.c | 2 +- kstars/kstars/indi/temmadriver.h | 4 +- kstars/kstars/indi/v4lphilips.cpp | 6 +- kstars/kstars/indi/webcam/Makefile.am | 3 + kstars/kstars/indi/webcam/ccvt_c2.c | 2 +- kstars/kstars/indi/webcam/port.cpp | 6 +- kstars/kstars/indi/webcam/port.h | 8 +- kstars/kstars/indi/webcam/pwc-ioctl.h | 6 +- kstars/kstars/indi/webcam/v4l1_pwc.cpp | 4 +- kstars/kstars/indi/webcam/v4l1_pwc.h | 2 +- kstars/kstars/indi/webcam/v4l2_base.cpp | 62 +- kstars/kstars/indi/webcam/videodev.h | 4 +- kstars/kstars/indi/webcam/videodev2.h | 24 +- kstars/kstars/indiconf.ui | 66 +- kstars/kstars/indidevice.cpp | 34 +- kstars/kstars/indidevice.h | 13 +- kstars/kstars/indidriver.cpp | 56 +- kstars/kstars/indidriver.h | 10 +- kstars/kstars/indielement.cpp | 30 +- kstars/kstars/indielement.h | 17 +- kstars/kstars/indifitsconf.cpp | 4 +- kstars/kstars/indifitsconf.h | 3 +- kstars/kstars/indigroup.cpp | 10 +- kstars/kstars/indigroup.h | 6 +- kstars/kstars/indihostconf.ui | 40 +- kstars/kstars/indimenu.cpp | 14 +- kstars/kstars/indimenu.h | 13 +- kstars/kstars/indiproperty.cpp | 50 +- kstars/kstars/indiproperty.h | 19 +- kstars/kstars/indistd.cpp | 88 +- kstars/kstars/indistd.h | 12 +- kstars/kstars/infobox.cpp | 6 +- kstars/kstars/infobox.h | 9 +- kstars/kstars/infoboxes.cpp | 26 +- kstars/kstars/infoboxes.h | 3 +- kstars/kstars/kscomet.cpp | 4 +- kstars/kstars/ksfilereader.h | 1 + kstars/kstars/ksnewstuff.cpp | 18 +- kstars/kstars/ksnewstuff.h | 8 +- kstars/kstars/ksplanet.h | 4 +- kstars/kstars/ksplanetbase.cpp | 2 +- kstars/kstars/ksplanetbase.h | 8 +- kstars/kstars/kspopupmenu.cpp | 32 +- kstars/kstars/kspopupmenu.h | 3 +- kstars/kstars/kssun.cpp | 2 +- kstars/kstars/kstars.cpp | 6 +- kstars/kstars/kstars.h | 7 +- kstars/kstars/kstarsactions.cpp | 94 +- kstars/kstars/kstarsdata.cpp | 156 +-- kstars/kstars/kstarsdata.h | 13 +- kstars/kstars/kstarsdatetime.cpp | 8 +- kstars/kstars/kstarsdatetime.h | 2 +- kstars/kstars/kstarsdcop.cpp | 66 +- kstars/kstars/kstarsinit.cpp | 118 +- kstars/kstars/kstarssplash.cpp | 26 +- kstars/kstars/kstarssplash.h | 7 +- kstars/kstars/kswizard.cpp | 6 +- kstars/kstars/kswizard.h | 5 +- kstars/kstars/kswizardui.ui | 168 +-- kstars/kstars/locationdialog.cpp | 42 +- kstars/kstars/locationdialog.h | 11 +- kstars/kstars/magnitudespinbox.cpp | 8 +- kstars/kstars/magnitudespinbox.h | 6 +- kstars/kstars/main.cpp | 28 +- kstars/kstars/mapcanvas.cpp | 12 +- kstars/kstars/mapcanvas.h | 11 +- kstars/kstars/newfovui.ui | 174 +-- kstars/kstars/objectnamelist.cpp | 4 +- kstars/kstars/objectnamelist.h | 10 +- kstars/kstars/opsadvanced.h | 3 +- kstars/kstars/opsadvancedui.ui | 72 +- kstars/kstars/opscatalog.cpp | 8 +- kstars/kstars/opscatalog.h | 3 +- kstars/kstars/opscatalogui.ui | 86 +- kstars/kstars/opscolors.cpp | 20 +- kstars/kstars/opscolors.h | 3 +- kstars/kstars/opscolorsui.ui | 40 +- kstars/kstars/opsguides.cpp | 4 +- kstars/kstars/opsguides.h | 3 +- kstars/kstars/opsguidesui.ui | 40 +- kstars/kstars/opssolarsystem.cpp | 8 +- kstars/kstars/opssolarsystem.h | 3 +- kstars/kstars/opssolarsystemui.ui | 72 +- kstars/kstars/planetcatalog.cpp | 2 +- kstars/kstars/planetcatalog.h | 3 +- kstars/kstars/simclock.cpp | 10 +- kstars/kstars/simclock.h | 5 +- kstars/kstars/skymap.cpp | 46 +- kstars/kstars/skymap.h | 35 +- kstars/kstars/skymapdraw.cpp | 18 +- kstars/kstars/skymapevents.cpp | 26 +- kstars/kstars/skyobject.cpp | 30 +- kstars/kstars/skyobject.h | 2 +- kstars/kstars/skyobjectname.cpp | 4 +- kstars/kstars/skyobjectname.h | 4 +- kstars/kstars/skypoint.cpp | 22 +- kstars/kstars/skypoint.h | 6 +- kstars/kstars/stardatasink.cpp | 4 +- kstars/kstars/stardatasink.h | 5 +- kstars/kstars/starobject.cpp | 2 +- kstars/kstars/starobject.h | 2 +- kstars/kstars/starpixmap.cpp | 18 +- kstars/kstars/statform.ui | 24 +- kstars/kstars/streamformui.ui | 22 +- kstars/kstars/streamwg.cpp | 18 +- kstars/kstars/streamwg.h | 14 +- kstars/kstars/telescopeprop.cpp | 12 +- kstars/kstars/telescopeprop.h | 3 +- kstars/kstars/telescopepropui.ui | 48 +- kstars/kstars/telescopewizard.ui | 134 +- kstars/kstars/telescopewizardprocess.cpp | 32 +- kstars/kstars/telescopewizardprocess.h | 3 +- kstars/kstars/thumbnaileditor.cpp | 12 +- kstars/kstars/thumbnaileditor.h | 8 +- kstars/kstars/thumbnaileditorui.ui | 14 +- kstars/kstars/thumbnailpicker.cpp | 22 +- kstars/kstars/thumbnailpicker.h | 3 +- kstars/kstars/thumbnailpickerui.ui | 60 +- kstars/kstars/timebox.cpp | 22 +- kstars/kstars/timebox.h | 6 +- kstars/kstars/timedialog.cpp | 10 +- kstars/kstars/timedialog.h | 9 +- kstars/kstars/timespinbox.cpp | 4 +- kstars/kstars/timespinbox.h | 7 +- kstars/kstars/timestepbox.cpp | 4 +- kstars/kstars/timestepbox.h | 3 +- kstars/kstars/timeunitbox.cpp | 4 +- kstars/kstars/timeunitbox.h | 3 +- kstars/kstars/timezonerule.cpp | 8 +- kstars/kstars/timezonerule.h | 4 +- kstars/kstars/toggleaction.cpp | 8 +- kstars/kstars/toggleaction.h | 5 +- kstars/kstars/tools/altvstime.cpp | 38 +- kstars/kstars/tools/altvstime.h | 6 +- kstars/kstars/tools/altvstimeui.ui | 64 +- kstars/kstars/tools/argchangeviewoption.ui | 20 +- kstars/kstars/tools/argexportimage.ui | 52 +- kstars/kstars/tools/argloadcolorscheme.ui | 6 +- kstars/kstars/tools/arglooktoward.ui | 18 +- kstars/kstars/tools/argprintimage.ui | 12 +- kstars/kstars/tools/argsetactionindi.ui | 26 +- kstars/kstars/tools/argsetaltaz.ui | 18 +- kstars/kstars/tools/argsetccdtempindi.ui | 26 +- kstars/kstars/tools/argsetcolor.ui | 44 +- kstars/kstars/tools/argsetfilternumindi.ui | 26 +- kstars/kstars/tools/argsetfocusspeedindi.ui | 14 +- kstars/kstars/tools/argsetfocustimeoutindi.ui | 26 +- kstars/kstars/tools/argsetframetypeindi.ui | 28 +- kstars/kstars/tools/argsetgeolocation.ui | 38 +- kstars/kstars/tools/argsetgeolocationindi.ui | 26 +- kstars/kstars/tools/argsetlocaltime.ui | 16 +- kstars/kstars/tools/argsetportindi.ui | 16 +- kstars/kstars/tools/argsetradec.ui | 16 +- kstars/kstars/tools/argsetscopeactionindi.ui | 28 +- kstars/kstars/tools/argsettargetcoordindi.ui | 26 +- kstars/kstars/tools/argsettargetnameindi.ui | 30 +- kstars/kstars/tools/argsettrack.ui | 16 +- kstars/kstars/tools/argsetutcindi.ui | 26 +- kstars/kstars/tools/argshutdownindi.ui | 18 +- kstars/kstars/tools/argstartexposureindi.ui | 26 +- kstars/kstars/tools/argstartfocusindi.ui | 28 +- kstars/kstars/tools/argstartindi.ui | 26 +- kstars/kstars/tools/argswitchindi.ui | 26 +- kstars/kstars/tools/argtimescale.ui | 14 +- kstars/kstars/tools/argwaitfor.ui | 18 +- kstars/kstars/tools/argwaitforkey.ui | 16 +- kstars/kstars/tools/argzoom.ui | 16 +- kstars/kstars/tools/astrocalc.cpp | 28 +- kstars/kstars/tools/astrocalc.h | 12 +- kstars/kstars/tools/jmoontool.cpp | 22 +- kstars/kstars/tools/jmoontool.h | 3 +- kstars/kstars/tools/kstarsplotwidget.cpp | 64 +- kstars/kstars/tools/kstarsplotwidget.h | 3 +- kstars/kstars/tools/lcgenerator.cpp | 26 +- kstars/kstars/tools/lcgenerator.h | 5 +- kstars/kstars/tools/modcalcangdist.cpp | 6 +- kstars/kstars/tools/modcalcangdist.h | 1 + kstars/kstars/tools/modcalcangdistdlg.ui | 98 +- kstars/kstars/tools/modcalcapcoord.cpp | 18 +- kstars/kstars/tools/modcalcapcoord.h | 3 +- kstars/kstars/tools/modcalcapcoorddlg.ui | 124 +- kstars/kstars/tools/modcalcazel.cpp | 22 +- kstars/kstars/tools/modcalcazel.h | 1 + kstars/kstars/tools/modcalcazeldlg.ui | 160 +-- kstars/kstars/tools/modcalcdaylength.cpp | 38 +- kstars/kstars/tools/modcalcdaylength.h | 3 +- kstars/kstars/tools/modcalcdaylengthdlg.ui | 88 +- kstars/kstars/tools/modcalceclipticcoords.cpp | 6 +- kstars/kstars/tools/modcalceclipticcoords.h | 3 +- .../kstars/tools/modcalceclipticcoordsdlg.ui | 120 +- kstars/kstars/tools/modcalcequinox.cpp | 18 +- kstars/kstars/tools/modcalcequinox.h | 5 +- kstars/kstars/tools/modcalcequinoxdlg.ui | 78 +- kstars/kstars/tools/modcalcgalcoord.cpp | 6 +- kstars/kstars/tools/modcalcgalcoord.h | 3 +- kstars/kstars/tools/modcalcgalcoorddlg.ui | 118 +- kstars/kstars/tools/modcalcgeodcoord.cpp | 8 +- kstars/kstars/tools/modcalcgeodcoord.h | 3 +- kstars/kstars/tools/modcalcgeoddlg.ui | 108 +- kstars/kstars/tools/modcalcjd.cpp | 10 +- kstars/kstars/tools/modcalcjd.h | 3 +- kstars/kstars/tools/modcalcjddlg.ui | 78 +- kstars/kstars/tools/modcalcplanets.cpp | 28 +- kstars/kstars/tools/modcalcplanets.h | 1 + kstars/kstars/tools/modcalcplanetsdlg.ui | 212 ++-- kstars/kstars/tools/modcalcprec.cpp | 10 +- kstars/kstars/tools/modcalcprec.h | 1 + kstars/kstars/tools/modcalcprecdlg.ui | 98 +- kstars/kstars/tools/modcalcsidtime.cpp | 14 +- kstars/kstars/tools/modcalcsidtime.h | 1 + kstars/kstars/tools/modcalcsidtimedlg.ui | 130 +- kstars/kstars/tools/modcalcvlsr.cpp | 18 +- kstars/kstars/tools/modcalcvlsr.h | 1 + kstars/kstars/tools/modcalcvlsrdlg.ui | 188 +-- kstars/kstars/tools/observinglist.cpp | 48 +- kstars/kstars/tools/observinglist.h | 5 +- kstars/kstars/tools/observinglistui.ui | 54 +- kstars/kstars/tools/obslistwizard.cpp | 78 +- kstars/kstars/tools/obslistwizard.h | 3 +- kstars/kstars/tools/obslistwizardui.ui | 142 +-- kstars/kstars/tools/optionstreeview.ui | 16 +- kstars/kstars/tools/planetviewer.cpp | 24 +- kstars/kstars/tools/planetviewer.h | 8 +- kstars/kstars/tools/planetviewerui.ui | 14 +- kstars/kstars/tools/scriptbuilder.cpp | 286 ++--- kstars/kstars/tools/scriptbuilder.h | 5 +- kstars/kstars/tools/scriptbuilderui.ui | 96 +- kstars/kstars/tools/scriptfunction.cpp | 74 +- kstars/kstars/tools/scriptnamedialog.ui | 24 +- kstars/kstars/tools/wutdialog.cpp | 30 +- kstars/kstars/tools/wutdialog.h | 1 + kstars/kstars/tools/wutdialogui.ui | 98 +- ktouch/ChangeLog | 12 +- ktouch/extras/training-gen/perl/dk.config | 2 +- ktouch/extras/training-gen/perl/en.config | 2 +- ktouch/extras/training-gen/perl/es.config | 2 +- .../extras/training-gen/python/ktouchgen.py | 4 +- ktouch/keyboards/be.keyboard | 8 +- ktouch/keyboards/bg.keyboard | 2 +- ktouch/keyboards/de.keyboard | 2 +- ktouch/keyboards/de.neo.keyboard | 2 +- ktouch/keyboards/de.swiss.keyboard | 2 +- ktouch/keyboards/dk.keyboard | 2 +- ktouch/keyboards/dvorak_fr.keyboard | 2 +- ktouch/keyboards/ee.keyboard | 2 +- ktouch/keyboards/en.dvorak.keyboard | 2 +- ktouch/keyboards/en.keyboard | 8 +- ktouch/keyboards/es.dvorak.keyboard | 2 +- ktouch/keyboards/es.keyboard | 2 +- ktouch/keyboards/fi.keyboard | 2 +- ktouch/keyboards/fr.a.keyboard | 2 +- ktouch/keyboards/fr.keyboard | 2 +- ktouch/keyboards/fr.swiss.keyboard | 2 +- ktouch/keyboards/he.keyboard | 2 +- ktouch/keyboards/hu.keyboard | 2 +- ktouch/keyboards/it.keyboard | 2 +- ktouch/keyboards/la.keyboard | 2 +- ktouch/keyboards/nb.keyboard | 4 +- ktouch/keyboards/nn.keyboard | 2 +- ktouch/keyboards/pl.keyboard | 2 +- ktouch/keyboards/pt.br.keyboard | 2 +- ktouch/keyboards/pt.keyboard | 2 +- ktouch/keyboards/ru.2.keyboard | 2 +- ktouch/keyboards/ru.3.keyboard | 2 +- ktouch/keyboards/ru.basic.keyboard | 2 +- ktouch/keyboards/ru.keyboard | 2 +- ktouch/keyboards/ru.typewriter.keyboard | 2 +- ktouch/keyboards/ru.winkeys.keyboard | 2 +- ktouch/keyboards/sl.keyboard | 2 +- ktouch/keyboards/sv.dvorak.keyboard | 2 +- ktouch/keyboards/sv.keyboard | 2 +- ktouch/keyboards/tr.f.keyboard | 2 +- ktouch/keyboards/tr.q.keyboard | 2 +- ktouch/keyboards/uk.basic.keyboard | 2 +- ktouch/keyboards/uk.typewriter.keyboard | 2 +- ktouch/keyboards/uk.winkeys.keyboard | 2 +- ktouch/ktouch.lsm | 2 +- ktouch/src/ktouch.cpp | 102 +- ktouch/src/ktouch.h | 17 +- ktouch/src/ktouchchartwidget.cpp | 4 +- ktouch/src/ktouchchartwidget.h | 3 +- ktouch/src/ktouchcoloreditor.cpp | 10 +- ktouch/src/ktouchcoloreditor.h | 3 +- ktouch/src/ktouchcoloreditor_dlg.ui | 108 +- ktouch/src/ktouchcolorscheme.cpp | 106 +- ktouch/src/ktouchdefaults.h | 2 +- ktouch/src/ktouchkey.h | 2 +- ktouch/src/ktouchkeyboard.cpp | 46 +- ktouch/src/ktouchkeyboard.h | 12 +- ktouch/src/ktouchkeyboardeditor.cpp | 18 +- ktouch/src/ktouchkeyboardeditor.h | 3 +- ktouch/src/ktouchkeyboardeditor_dlg.ui | 46 +- ktouch/src/ktouchkeyboardwidget.cpp | 42 +- ktouch/src/ktouchkeyboardwidget.h | 17 +- ktouch/src/ktouchkeys.cpp | 2 +- ktouch/src/ktouchkeys.h | 8 +- ktouch/src/ktouchlecture.cpp | 8 +- ktouch/src/ktouchlecture.h | 2 +- ktouch/src/ktouchlectureeditor.cpp | 12 +- ktouch/src/ktouchlectureeditor.h | 3 +- ktouch/src/ktouchlectureeditor_dlg.ui | 90 +- ktouch/src/ktouchleveldata.cpp | 4 +- ktouch/src/ktouchopenrequest.cpp | 8 +- ktouch/src/ktouchopenrequest.h | 5 +- ktouch/src/ktouchopenrequest_dlg.ui | 42 +- ktouch/src/ktouchprefcolorslayout.ui | 76 +- ktouch/src/ktouchprefgenerallayout.ui | 58 +- ktouch/src/ktouchprefkeyboardlayout.ui | 32 +- ktouch/src/ktouchpreftraininglayout.ui | 58 +- ktouch/src/ktouchslideline.cpp | 16 +- ktouch/src/ktouchslideline.h | 11 +- ktouch/src/ktouchstatistics.cpp | 22 +- ktouch/src/ktouchstatistics.h | 3 +- ktouch/src/ktouchstatistics_dlg.ui | 266 ++-- ktouch/src/ktouchstatisticsdata.cpp | 36 +- ktouch/src/ktouchstatisticsdata.h | 6 +- ktouch/src/ktouchstatus.cpp | 10 +- ktouch/src/ktouchstatus.h | 9 +- ktouch/src/ktouchstatuslayout.ui | 60 +- ktouch/src/ktouchtrainer.cpp | 18 +- ktouch/src/ktouchtrainer.h | 7 +- ktouch/src/ktouchutils.cpp | 2 +- kturtle/TODO | 2 +- kturtle/src/canvas.cpp | 16 +- kturtle/src/canvas.h | 5 +- kturtle/src/dialogs.cpp | 58 +- kturtle/src/dialogs.h | 15 +- kturtle/src/executer.cpp | 30 +- kturtle/src/executer.h | 3 +- kturtle/src/kturtle.cpp | 174 +-- kturtle/src/kturtle.h | 1 + kturtle/src/kturtle.kcfg | 18 +- kturtle/src/parser.cpp | 24 +- kturtle/src/parser.h | 3 +- kturtle/src/translate.cpp | 2 +- kturtle/src/treenode.cpp | 26 +- kturtle/src/treenode.h | 12 +- kverbos/kverbos/data/en/verbos.verbos | 2 +- kverbos/kverbos/kerfassen.cpp | 16 +- kverbos/kverbos/kerfassen.h | 52 +- kverbos/kverbos/kfeedercontrol.cpp | 8 +- kverbos/kverbos/kresult.cpp | 4 +- kverbos/kverbos/kresult.h | 2 +- kverbos/kverbos/kstartuplogo.cpp | 4 +- kverbos/kverbos/kstartuplogo.h | 3 +- kverbos/kverbos/kverbedit.cpp | 4 +- kverbos/kverbos/kverbedit.h | 24 +- kverbos/kverbos/kverbos.cpp | 90 +- kverbos/kverbos/kverbos.h | 7 +- kverbos/kverbos/kverbos.kcfg | 2 +- kverbos/kverbos/kverbosdoc.cpp | 30 +- kverbos/kverbos/kverbosdoc.h | 13 +- kverbos/kverbos/kverbosoptions.cpp | 4 +- kverbos/kverbos/kverbosoptions.h | 10 +- kverbos/kverbos/kverbosuser.cpp | 14 +- kverbos/kverbos/kverbosview.cpp | 38 +- kverbos/kverbos/kverbosview.h | 35 +- kverbos/kverbos/qerfassen.ui | 590 ++++----- kverbos/kverbos/qlernen.ui | 194 +-- kverbos/kverbos/qresult.ui | 36 +- kverbos/kverbos/qverbedit.ui | 26 +- kverbos/kverbos/qverbosoptions.ui | 216 ++-- kverbos/kverbos/verbspanish.cpp | 96 +- .../kvoctrain/common-dialogs/ProgressDlg.cpp | 4 +- .../kvoctrain/common-dialogs/ProgressDlg.h | 3 +- .../common-dialogs/ProgressDlgForm.ui | 24 +- .../kvoctrain/common-dialogs/blockoptions.cpp | 10 +- .../kvoctrain/common-dialogs/blockoptions.h | 3 +- .../common-dialogs/blockoptionsbase.ui | 56 +- .../common-dialogs/generaloptions.cpp | 4 +- .../kvoctrain/common-dialogs/generaloptions.h | 3 +- .../common-dialogs/generaloptionsbase.ui | 26 +- .../kvoctrain/common-dialogs/groupoptions.cpp | 4 +- .../kvoctrain/common-dialogs/groupoptions.h | 3 +- .../common-dialogs/groupoptionsbase.ui | 24 +- .../kvoctrain/common-dialogs/kvoctrain.kcfg | 2 +- .../common-dialogs/kvoctrainprefs.cpp | 4 +- .../kvoctrain/common-dialogs/kvoctrainprefs.h | 3 +- .../common-dialogs/languageoptions.cpp | 84 +- .../common-dialogs/languageoptions.h | 3 +- .../common-dialogs/languageoptionsbase.ui | 48 +- .../kvoctrain/common-dialogs/pasteoptions.cpp | 4 +- .../kvoctrain/common-dialogs/pasteoptions.h | 3 +- .../common-dialogs/pasteoptionsbase.ui | 28 +- .../common-dialogs/profilesdialog.cpp | 26 +- .../kvoctrain/common-dialogs/profilesdialog.h | 3 +- .../kvoctrain/common-dialogs/queryoptions.cpp | 4 +- .../kvoctrain/common-dialogs/queryoptions.h | 7 +- .../common-dialogs/queryoptionsbase.ui | 62 +- .../common-dialogs/thresholdoptions.cpp | 4 +- .../common-dialogs/thresholdoptions.h | 3 +- .../common-dialogs/thresholdoptionsbase.ui | 60 +- .../kvoctrain/common-dialogs/viewoptions.cpp | 4 +- .../kvoctrain/common-dialogs/viewoptions.h | 3 +- .../common-dialogs/viewoptionsbase.ui | 32 +- .../docprop-dialogs/DocOptionsPage.cpp | 2 +- .../docprop-dialogs/DocOptionsPage.h | 3 +- .../docprop-dialogs/DocOptionsPageForm.ui | 10 +- .../kvoctrain/docprop-dialogs/DocPropDlg.cpp | 4 +- .../kvoctrain/docprop-dialogs/DocPropDlg.h | 3 +- .../docprop-dialogs/DocPropLangDlg.cpp | 4 +- .../docprop-dialogs/DocPropLangDlg.h | 3 +- .../docprop-dialogs/LangPropPage.cpp | 4 +- .../kvoctrain/docprop-dialogs/LangPropPage.h | 3 +- .../docprop-dialogs/LangPropPageForm.ui | 86 +- .../kvoctrain/docprop-dialogs/LessOptPage.cpp | 14 +- .../kvoctrain/docprop-dialogs/LessOptPage.h | 3 +- .../docprop-dialogs/LessOptPageForm.ui | 20 +- .../docprop-dialogs/TenseOptPage.cpp | 20 +- .../kvoctrain/docprop-dialogs/TenseOptPage.h | 3 +- .../docprop-dialogs/TenseOptPageForm.ui | 20 +- .../kvoctrain/docprop-dialogs/TitlePage.cpp | 4 +- .../kvoctrain/docprop-dialogs/TitlePage.h | 3 +- .../docprop-dialogs/TitlePageForm.ui | 28 +- .../kvoctrain/docprop-dialogs/TypeOptPage.cpp | 22 +- .../kvoctrain/docprop-dialogs/TypeOptPage.h | 3 +- .../docprop-dialogs/TypeOptPageForm.ui | 20 +- .../docprop-dialogs/UsageOptPage.cpp | 20 +- .../kvoctrain/docprop-dialogs/UsageOptPage.h | 3 +- .../docprop-dialogs/UsageOptPageForm.ui | 20 +- .../kvoctrain/entry-dialogs/AdjEntryPage.cpp | 4 +- .../kvoctrain/entry-dialogs/AdjEntryPage.h | 3 +- .../entry-dialogs/AdjEntryPageForm.ui | 20 +- .../entry-dialogs/AuxInfoEntryPage.cpp | 4 +- .../entry-dialogs/AuxInfoEntryPage.h | 3 +- .../entry-dialogs/AuxInfoEntryPageForm.ui | 38 +- .../entry-dialogs/CommonEntryPage.cpp | 12 +- .../kvoctrain/entry-dialogs/CommonEntryPage.h | 3 +- .../entry-dialogs/CommonEntryPageForm.ui | 72 +- .../kvoctrain/entry-dialogs/EntryDlg.cpp | 32 +- kvoctrain/kvoctrain/entry-dialogs/EntryDlg.h | 11 +- .../entry-dialogs/FromToEntryPage.cpp | 26 +- .../kvoctrain/entry-dialogs/FromToEntryPage.h | 9 +- .../entry-dialogs/FromToEntryPageForm.ui | 44 +- .../kvoctrain/entry-dialogs/MCEntryPage.cpp | 4 +- .../kvoctrain/entry-dialogs/MCEntryPage.h | 3 +- .../entry-dialogs/MCEntryPageForm.ui | 28 +- .../kvoctrain/entry-dialogs/MySpinBox.cpp | 4 +- kvoctrain/kvoctrain/entry-dialogs/MySpinBox.h | 6 +- .../entry-dialogs/PhoneticEntryPage.cpp | 26 +- .../entry-dialogs/PhoneticEntryPage.h | 10 +- .../entry-dialogs/TenseEntryPage.cpp | 4 +- .../kvoctrain/entry-dialogs/TenseEntryPage.h | 3 +- .../entry-dialogs/TenseEntryPageForm.ui | 64 +- kvoctrain/kvoctrain/entry-dialogs/blockall.h | 2 +- kvoctrain/kvoctrain/kv_resource.h | 4 +- kvoctrain/kvoctrain/kva_clip.cpp | 18 +- kvoctrain/kvoctrain/kva_config.cpp | 10 +- kvoctrain/kvoctrain/kva_header.cpp | 86 +- kvoctrain/kvoctrain/kva_init.cpp | 84 +- kvoctrain/kvoctrain/kva_io.cpp | 66 +- kvoctrain/kvoctrain/kva_query.cpp | 32 +- kvoctrain/kvoctrain/kvoctrain.cpp | 92 +- kvoctrain/kvoctrain/kvoctrain.h | 5 +- kvoctrain/kvoctrain/kvoctraintable.cpp | 44 +- kvoctrain/kvoctrain/kvoctraintable.h | 9 +- kvoctrain/kvoctrain/kvoctraintableitem.cpp | 4 +- kvoctrain/kvoctrain/kvoctraintableitem.h | 2 +- kvoctrain/kvoctrain/kvoctrainview.cpp | 52 +- kvoctrain/kvoctrain/kvoctrainview.h | 9 +- kvoctrain/kvoctrain/kvt-core/LineList.cpp | 6 +- kvoctrain/kvoctrain/kvt-core/LineList.h | 2 +- kvoctrain/kvoctrain/kvt-core/QueryManager.cpp | 94 +- kvoctrain/kvoctrain/kvt-core/QueryManager.h | 60 +- kvoctrain/kvoctrain/kvt-core/UsageManager.cpp | 4 +- kvoctrain/kvoctrain/kvt-core/UsageManager.h | 2 +- kvoctrain/kvoctrain/kvt-core/kvd_csv.cpp | 42 +- kvoctrain/kvoctrain/kvt-core/kvd_lex.cpp | 18 +- .../kvoctrain/kvt-core/kvd_rb_kvtml1.cpp | 96 +- .../kvoctrain/kvt-core/kvd_rb_kvtml2.cpp | 18 +- kvoctrain/kvoctrain/kvt-core/kvd_rh_kvtml.cpp | 74 +- kvoctrain/kvoctrain/kvt-core/kvd_vcb.cpp | 18 +- kvoctrain/kvoctrain/kvt-core/kvd_voc.cpp | 8 +- kvoctrain/kvoctrain/kvt-core/kvd_wkvtml.cpp | 28 +- kvoctrain/kvoctrain/kvt-core/kvoctraincore.h | 50 +- kvoctrain/kvoctrain/kvt-core/kvoctraindoc.cpp | 36 +- kvoctrain/kvoctrain/kvt-core/kvoctraindoc.h | 9 +- .../kvoctrain/kvt-core/kvoctrainexpr.cpp | 4 +- kvoctrain/kvoctrain/kvt-core/kvoctrainexpr.h | 2 +- .../kvoctrain/kvt-core/kvt-xml/XmlReader.cpp | 14 +- .../kvt-core/kvt-xml/XmlTokenizer.cpp | 4 +- .../kvoctrain/kvt-core/kvt-xml/XmlTokenizer.h | 2 +- .../kvoctrain/kvt-core/kvt-xml/XmlWriter.cpp | 10 +- .../kvoctrain/kvt-core/kvt-xml/XmlWriter.h | 8 +- .../kvoctrain/kvt-core/kvt-xml/koxml_config.h | 8 +- kvoctrain/kvoctrain/kvt-core/langset.cpp | 16 +- kvoctrain/kvoctrain/kvt-core/langset.h | 10 +- kvoctrain/kvoctrain/kvtnewstuff.cpp | 20 +- kvoctrain/kvoctrain/kvtnewstuff.h | 3 +- kvoctrain/kvoctrain/main.cpp | 2 +- .../kvoctrain/query-dialogs/AdjQueryDlg.h | 1 + .../query-dialogs/AdjQueryDlgForm.ui | 50 +- .../kvoctrain/query-dialogs/ArtQueryDlg.cpp | 24 +- .../kvoctrain/query-dialogs/ArtQueryDlg.h | 1 + .../query-dialogs/ArtQueryDlgForm.ui | 48 +- .../kvoctrain/query-dialogs/MCQueryDlg.cpp | 2 +- .../kvoctrain/query-dialogs/MCQueryDlg.h | 1 + .../kvoctrain/query-dialogs/MCQueryDlgForm.ui | 70 +- .../kvoctrain/query-dialogs/QueryDlgBase.cpp | 28 +- .../kvoctrain/query-dialogs/QueryDlgBase.h | 3 +- .../query-dialogs/RandomQueryDlg.cpp | 22 +- .../kvoctrain/query-dialogs/RandomQueryDlg.h | 1 + .../query-dialogs/RandomQueryDlgForm.ui | 58 +- .../query-dialogs/SimpleQueryDlg.cpp | 28 +- .../kvoctrain/query-dialogs/SimpleQueryDlg.h | 1 + .../query-dialogs/SimpleQueryDlgForm.ui | 52 +- .../kvoctrain/query-dialogs/VerbQueryDlg.cpp | 2 +- .../kvoctrain/query-dialogs/VerbQueryDlg.h | 1 + .../query-dialogs/VerbQueryDlgForm.ui | 104 +- kvoctrain/kvoctrain/spotlight2kvtml.cpp | 62 +- .../statistik-dialogs/GenStatPage.cpp | 2 +- .../kvoctrain/statistik-dialogs/GenStatPage.h | 3 +- .../statistik-dialogs/GenStatPageForm.ui | 28 +- .../statistik-dialogs/StatistikDlg.cpp | 4 +- .../statistik-dialogs/StatistikDlg.h | 3 +- .../statistik-dialogs/StatistikPage.cpp | 16 +- .../statistik-dialogs/StatistikPage.h | 3 +- .../statistik-dialogs/StatistikPageForm.ui | 10 +- kvoctrain/kvoctrain/tools/extractlang.cpp | 14 +- kwordquiz/src/dlglanguage.cpp | 2 +- kwordquiz/src/dlglanguage.h | 3 +- kwordquiz/src/dlglanguagebase.ui | 36 +- kwordquiz/src/dlgrc.cpp | 2 +- kwordquiz/src/dlgrc.h | 3 +- kwordquiz/src/dlgrcbase.ui | 28 +- kwordquiz/src/dlgsort.cpp | 2 +- kwordquiz/src/dlgsort.h | 3 +- kwordquiz/src/dlgsortbase.ui | 24 +- kwordquiz/src/dlgspecchar.cpp | 8 +- kwordquiz/src/dlgspecchar.h | 3 +- kwordquiz/src/flashview.cpp | 16 +- kwordquiz/src/flashview.h | 11 +- kwordquiz/src/flashviewbase.ui | 64 +- kwordquiz/src/keduvocdata.cpp | 8 +- kwordquiz/src/kvtmlwriter.cpp | 24 +- kwordquiz/src/kwordquiz.cpp | 248 ++-- kwordquiz/src/kwordquiz.h | 31 +- kwordquiz/src/kwordquizdoc.cpp | 26 +- kwordquiz/src/kwordquizdoc.h | 17 +- kwordquiz/src/kwordquizprefs.cpp | 6 +- kwordquiz/src/kwordquizprefs.h | 7 +- kwordquiz/src/kwordquizview.cpp | 58 +- kwordquiz/src/kwordquizview.h | 29 +- kwordquiz/src/kwqnewstuff.cpp | 28 +- kwordquiz/src/kwqnewstuff.h | 9 +- kwordquiz/src/main.cpp | 2 +- kwordquiz/src/multipleview.cpp | 20 +- kwordquiz/src/multipleview.h | 9 +- kwordquiz/src/multipleviewbase.ui | 150 +-- kwordquiz/src/paukerreader.cpp | 6 +- kwordquiz/src/prefcardappearance.cpp | 4 +- kwordquiz/src/prefcardappearance.h | 3 +- kwordquiz/src/prefcardappearancebase.ui | 46 +- kwordquiz/src/prefcharacter.cpp | 4 +- kwordquiz/src/prefcharacter.h | 3 +- kwordquiz/src/prefcharacterbase.ui | 28 +- kwordquiz/src/prefeditor.cpp | 4 +- kwordquiz/src/prefeditor.h | 3 +- kwordquiz/src/prefeditorbase.ui | 20 +- kwordquiz/src/prefquiz.cpp | 4 +- kwordquiz/src/prefquiz.h | 7 +- kwordquiz/src/prefquizbase.ui | 40 +- kwordquiz/src/qaview.cpp | 44 +- kwordquiz/src/qaview.h | 17 +- kwordquiz/src/qaviewbase.ui | 138 +-- kwordquiz/src/version.h | 2 +- kwordquiz/src/wqlistitem.cpp | 14 +- kwordquiz/src/wqlistitem.h | 10 +- kwordquiz/src/wqlreader.cpp | 28 +- kwordquiz/src/wqlreader.h | 4 +- kwordquiz/src/wqlwriter.cpp | 12 +- kwordquiz/src/wqlwriter.h | 4 +- kwordquiz/src/wqprintdialogpage.cpp | 20 +- kwordquiz/src/wqprintdialogpage.h | 11 +- kwordquiz/src/wqquiz.cpp | 94 +- kwordquiz/src/wqquiz.h | 11 +- kwordquiz/src/wqscore.cpp | 26 +- kwordquiz/src/wqscore.h | 10 +- kwordquiz/src/wqundo.h | 6 +- libkdeedu/extdate/extcalendarsystem.cpp | 2 +- libkdeedu/extdate/extcalendarsystem.h | 12 +- .../extdate/extcalendarsystemgregorian.cpp | 8 +- libkdeedu/extdate/extdatepicker.cpp | 66 +- libkdeedu/extdate/extdatepicker.h | 21 +- libkdeedu/extdate/extdatetbl.cpp | 108 +- libkdeedu/extdate/extdatetbl.h | 39 +- libkdeedu/extdate/extdatetime.cpp | 136 +- libkdeedu/extdate/extdatetime.h | 48 +- libkdeedu/extdate/extdatetimeedit.cpp | 447 ++++--- libkdeedu/extdate/extdatetimeedit.h | 140 ++- libkdeedu/extdate/extdatewidget.cpp | 32 +- libkdeedu/extdate/extdatewidget.h | 9 +- libkdeedu/extdate/test_extdate.cc | 32 +- libkdeedu/extdate/testwidget.cpp | 4 +- libkdeedu/extdate/testwidget.h | 3 +- libkdeedu/kdeeducore/keduvocdata.cpp | 6 +- libkdeedu/kdeeduplot/kplotaxis.h | 2 +- libkdeedu/kdeeduplot/kplotobject.h | 6 +- libkdeedu/kdeeduplot/kplotwidget.cpp | 26 +- libkdeedu/kdeeduplot/kplotwidget.h | 9 +- libkdeedu/kdeeduui/kdeeduglossary.cpp | 44 +- libkdeedu/kdeeduui/kdeeduglossary.h | 7 +- libkdeedu/kdeeduui/kedusimpleentrydlg.h | 1 + libkdeedu/kdeeduui/kedusimpleentrydlgForm.ui | 30 +- 1239 files changed, 15382 insertions(+), 15016 deletions(-) diff --git a/blinken/src/artsplayer.h b/blinken/src/artsplayer.h index 64586074..97f9f62c 100644 --- a/blinken/src/artsplayer.h +++ b/blinken/src/artsplayer.h @@ -34,9 +34,10 @@ namespace KDE class TQTimer; -class artsPlayer : public QObject +class artsPlayer : public TQObject { Q_OBJECT + TQ_OBJECT public: artsPlayer(); ~artsPlayer(); diff --git a/blinken/src/blinken.cpp b/blinken/src/blinken.cpp index 202a9a99..36a8f93c 100644 --- a/blinken/src/blinken.cpp +++ b/blinken/src/blinken.cpp @@ -144,7 +144,7 @@ void blinken::paintEvent(TQPaintEvent *) p.setBrush(m_fillColor); p.drawPie(169, 192, 4, 58, 1440, 2880); p.drawPie(465, 192, 4, 58, -1440, 2880); - p.setPen(TQPen(Qt::black, 3)); + p.setPen(TQPen(TQt::black, 3)); p.fillRect(171, 192, 296, 58, m_fillColor); p.drawLine(169, 192, 469, 192); p.drawLine(169, 250, 469, 250); @@ -184,16 +184,16 @@ void blinken::paintEvent(TQPaintEvent *) if (sizeAux > size) size = sizeAux; f1.setPointSize(size); #ifndef WITHOUT_ARTS - area = p.boundingRect(TQRect(), Qt::AlignAuto, sounds); + area = p.boundingRect(TQRect(), TQt::AlignAuto, sounds); area.moveBy(212, 221 - (area.height() / 2)); - p.drawText(area, Qt::AlignCenter, sounds); + p.drawText(area, TQt::AlignCenter, sounds); m_soundRect = m_soundRect.unite(area); #endif if (!m_alwaysUseNonCoolFont) { - area = p.boundingRect(TQRect(), Qt::AlignAuto, font); + area = p.boundingRect(TQRect(), TQt::AlignAuto, font); area.moveBy(426 - area.width(), 221 - (area.height() / 2)); - p.drawText(area, Qt::AlignCenter, font); + p.drawText(area, TQt::AlignCenter, font); m_fontRect = m_fontRect.unite(area); } @@ -227,7 +227,7 @@ void blinken::keyPressEvent(TQKeyEvent *e) if (i < 4) { - if (e -> key() == Qt::Key_Escape) + if (e -> key() == TQt::Key_Escape) { m_buttons[i] -> setSelected(false); update(); @@ -267,7 +267,7 @@ void blinken::keyReleaseEvent(TQKeyEvent *e) { if (e -> isAutoRepeat()) return; - if (e -> state() == Qt::ControlButton && e -> stateAfter() != Qt::ControlButton && (m_game.phase() == blinkenGame::starting || m_game.phase() == blinkenGame::choosingLevel)) + if (e -> state() == TQt::ControlButton && e -> stateAfter() != TQt::ControlButton && (m_game.phase() == blinkenGame::starting || m_game.phase() == blinkenGame::choosingLevel)) { m_showPreferences = !m_showPreferences; for (int i = 0; i < 4; i++) m_buttons[i] -> setSelected(false); @@ -289,13 +289,13 @@ void blinken::mousePressEvent(TQMouseEvent *e) hsd->showLevel(1); m_updateButtonHighlighting = true; } - else if (m_showPreferences && m_fontRect.contains(e -> pos()) && !m_alwaysUseNonCoolFont) + else if (m_showPreferences && m_fontRect.tqcontains(e -> pos()) && !m_alwaysUseNonCoolFont) { blinkenSettings::setCustomFont(!blinkenSettings::customFont()); blinkenSettings::writeConfig(); update(); } - else if (m_showPreferences && m_soundRect.contains(e -> pos())) + else if (m_showPreferences && m_soundRect.tqcontains(e -> pos())) { blinkenSettings::setPlaySounds(!blinkenSettings::playSounds()); blinkenSettings::writeConfig(); @@ -316,9 +316,9 @@ void blinken::mousePressEvent(TQMouseEvent *e) else if (m_game.phase() == blinkenGame::choosingLevel) { int level = 0; - if (m_levelsRect[1].contains(e -> pos())) level = 1; - else if (m_levelsRect[0].contains(e -> pos())) level = 2; - else if (m_levelsRect[2].contains(e -> pos())) level = 3; + if (m_levelsRect[1].tqcontains(e -> pos())) level = 1; + else if (m_levelsRect[0].tqcontains(e -> pos())) level = 2; + else if (m_levelsRect[2].tqcontains(e -> pos())) level = 3; if (level) { for(int i = 0; i < 3; i++) m_overLevels[i] = false; @@ -639,7 +639,7 @@ void blinken::drawText(TQPainter &p, const TQString &text, const TQPoint ¢er if (bold) f.setBold(true); p.setFont(f); - r = p.boundingRect(TQRect(), Qt::AlignAuto, text); + r = p.boundingRect(TQRect(), TQt::AlignAuto, text); r = TQRect(0, 0, r.width() + xMargin, r.height() + yMargin); r.moveBy(center.x() - r.width() / 2, center.y() - r.height() / 2); @@ -652,7 +652,7 @@ void blinken::drawText(TQPainter &p, const TQString &text, const TQPoint ¢er if (!highlight) p.setPen(m_fontColor); else p.setPen(m_fontHighlightColor); - p.drawText(r, Qt::AlignCenter, text); + p.drawText(r, TQt::AlignCenter, text); if (rect) *rect = r; p.setFont(oldFont); @@ -665,7 +665,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) m_updateButtonHighlighting = false; haveToUpdate = false; - if (m_highscoreRect.contains(p)) + if (m_highscoreRect.tqcontains(p)) { if (!m_overHighscore) { @@ -679,7 +679,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_menuRect.contains(p)) + if (m_menuRect.tqcontains(p)) { if (!m_overMenu) { @@ -699,7 +699,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) } else if (m_overMenu) { - if (m_aboutKDERect.contains(p)) + if (m_aboutKDERect.tqcontains(p)) { if (!m_overAboutKDE) { @@ -709,7 +709,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } } - else if (m_aboutBlinkenRect.contains(p)) + else if (m_aboutBlinkenRect.tqcontains(p)) { if (!m_overAboutBlinken) { @@ -719,7 +719,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } } - else if (m_manualRect.contains(p)) + else if (m_manualRect.tqcontains(p)) { if (!m_overManual) { @@ -739,7 +739,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) } } - if (!m_showPreferences && m_centralLettersRect.contains(p)) + if (!m_showPreferences && m_centralLettersRect.tqcontains(p)) { m_overCentralLetters = true; haveToUpdate = true; @@ -750,7 +750,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_showPreferences && m_soundRect.contains(p)) + if (m_showPreferences && m_soundRect.tqcontains(p)) { m_overSound = true; haveToUpdate = true; @@ -761,7 +761,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_showPreferences && m_fontRect.contains(p) && !m_alwaysUseNonCoolFont) + if (m_showPreferences && m_fontRect.tqcontains(p) && !m_alwaysUseNonCoolFont) { m_overFont = true; haveToUpdate = true; @@ -772,7 +772,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_counterRect.contains(p)) + if (m_counterRect.tqcontains(p)) { m_overCounter = true; haveToUpdate = true; @@ -783,7 +783,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_quitRect.contains(p)) + if (m_quitRect.tqcontains(p)) { if (!m_overQuit) { @@ -805,7 +805,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) case blinkenGame::waiting1: case blinkenGame::learningTheSequence: case blinkenGame::typingTheSequence: - if (m_centralTextRect.contains(p)) + if (m_centralTextRect.tqcontains(p)) { if (!m_overCentralText) { @@ -823,7 +823,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) case blinkenGame::choosingLevel: for (int i = 0; i < 3; i++) { - if (m_levelsRect[i].contains(p)) + if (m_levelsRect[i].tqcontains(p)) { if (!m_overLevels[i]) { diff --git a/blinken/src/blinken.h b/blinken/src/blinken.h index 0c45c8a7..6994de20 100644 --- a/blinken/src/blinken.h +++ b/blinken/src/blinken.h @@ -22,9 +22,10 @@ class KHelpMenu; class button; class highScoreDialog; -class blinken : public QWidget +class blinken : public TQWidget { Q_OBJECT + TQ_OBJECT public: blinken(); ~blinken(); @@ -73,7 +74,7 @@ Q_OBJECT // Preferences setting handling bool m_showPreferences; - // if should update the highlighting after the next repaint + // if should update the highlighting after the next tqrepaint bool m_updateButtonHighlighting; // use always the non-cool font? diff --git a/blinken/src/blinkengame.h b/blinken/src/blinkengame.h index 3cdbde6a..40a3c000 100644 --- a/blinken/src/blinkengame.h +++ b/blinken/src/blinkengame.h @@ -17,9 +17,10 @@ class TQTimer; class artsPlayer; -class blinkenGame : public QObject +class blinkenGame : public TQObject { Q_OBJECT + TQ_OBJECT public: blinkenGame(); ~blinkenGame(); diff --git a/blinken/src/button.cpp b/blinken/src/button.cpp index 406112eb..052ef6ed 100644 --- a/blinken/src/button.cpp +++ b/blinken/src/button.cpp @@ -20,24 +20,24 @@ button::button(blinkenGame::color c) : m_selected(false), m_color(c) KConfig *kc = kapp->config(); kc->setGroup("General"); TQString cs = getColorString(); - TQString pixmap = TQString("images/%1h.png").arg(cs); + TQString pixmap = TQString("images/%1h.png").tqarg(cs); switch (c) { case blinkenGame::blue: - m_key = kc->readNumEntry(cs, Qt::Key_3); + m_key = kc->readNumEntry(cs, TQt::Key_3); break; case blinkenGame::yellow: - m_key = kc->readNumEntry(cs, Qt::Key_1); + m_key = kc->readNumEntry(cs, TQt::Key_1); break; case blinkenGame::red: - m_key = kc->readNumEntry(cs, Qt::Key_2); + m_key = kc->readNumEntry(cs, TQt::Key_2); break; case blinkenGame::green: - m_key = kc->readNumEntry(cs, Qt::Key_4); + m_key = kc->readNumEntry(cs, TQt::Key_4); break; default: @@ -115,5 +115,5 @@ TQString button::getColorString() const } // never happens - return TQString::null; + return TQString(); } diff --git a/blinken/src/counter.cpp b/blinken/src/counter.cpp index 93c55109..c3ac7d29 100644 --- a/blinken/src/counter.cpp +++ b/blinken/src/counter.cpp @@ -17,7 +17,7 @@ void counter::paint(TQPainter &p, bool drawScore, int score, bool drawTimer, con { p.save(); p.translate(45, 15); - p.setPen(TQPen(Qt::black, 3)); + p.setPen(TQPen(TQt::black, 3)); p.setBrush(TQColor(40, 40, 40)); if (drawTimer) { diff --git a/blinken/src/fontutils.cpp b/blinken/src/fontutils.cpp index 10d3bc0d..1b4b3b2c 100644 --- a/blinken/src/fontutils.cpp +++ b/blinken/src/fontutils.cpp @@ -24,8 +24,8 @@ int fontUtils::fontSize(TQPainter &p, const TQString &s1, int w, int h) TQFont f = p.font(); f.setPointSize(size); p.setFont(f); - aux1 = p.boundingRect(TQRect(), Qt::AlignAuto, s1); - if (aux1.width() > w || aux1.height() > h) size = QMIN(w * size / aux1.width(), h * size / aux1.height()); + aux1 = p.boundingRect(TQRect(), TQt::AlignAuto, s1); + if (aux1.width() > w || aux1.height() > h) size = TQMIN(w * size / aux1.width(), h * size / aux1.height()); else done = true; } diff --git a/blinken/src/highscoredialog.cpp b/blinken/src/highscoredialog.cpp index 9c5a5287..b5dc749f 100644 --- a/blinken/src/highscoredialog.cpp +++ b/blinken/src/highscoredialog.cpp @@ -27,20 +27,20 @@ static const int namesFontSize = 25; /* scoresWidget */ -class scoresWidget : public QWidget +class scoresWidget : public TQWidget { public: - scoresWidget(TQWidget *parent, const TQValueList< QPair > &scores); + scoresWidget(TQWidget *tqparent, const TQValueList< TQPair > &scores); TQSize calcSize(); protected: void paintEvent(TQPaintEvent *); private: - const TQValueList< QPair > &m_scores; + const TQValueList< TQPair > &m_scores; }; -scoresWidget::scoresWidget(TQWidget *parent, const TQValueList< QPair > &scores) : TQWidget(parent, 0, WStaticContents | WNoAutoErase), m_scores(scores) +scoresWidget::scoresWidget(TQWidget *tqparent, const TQValueList< TQPair > &scores) : TQWidget(tqparent, 0, WStaticContents | WNoAutoErase), m_scores(scores) { } @@ -66,7 +66,7 @@ void scoresWidget::paintEvent(TQPaintEvent *) p.translate(margin, margin); - TQValueList< QPair >::const_iterator it; + TQValueList< TQPair >::const_iterator it; for (it = m_scores.begin(); it != m_scores.end(); ++it) { counter::paint(p, !(*it).second.isEmpty(), (*it).first, false, TQColor(), TQColor(), TQColor()); @@ -92,11 +92,11 @@ TQSize scoresWidget::calcSize() for (int i = 0; i < 3; i++) { lt = 0; - TQValueList< QPair >::const_iterator it; + TQValueList< TQPair >::const_iterator it; for (it = m_scores.begin(); it != m_scores.end(); ++it) { - r = p.boundingRect(TQRect(), Qt::AlignAuto, (*it).second); - lt = QMAX(lt, r.width()); + r = p.boundingRect(TQRect(), TQt::AlignAuto, (*it).second); + lt = TQMAX(lt, r.width()); } } @@ -112,20 +112,20 @@ TQSize scoresWidget::calcSize() /* myTabWidget */ -class myTabWidget : public QTabWidget +class myTabWidget : public TQTabWidget { public: - myTabWidget(TQWidget *parent) : TQTabWidget(parent) {} + myTabWidget(TQWidget *tqparent) : TQTabWidget(tqparent) {} TQSize tabBarSizeHint() const { - return tabBar() -> sizeHint(); + return tabBar() -> tqsizeHint(); } }; /* highScoreDialog */ -highScoreDialog::highScoreDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Highscores"), KDialogBase::Close) +highScoreDialog::highScoreDialog(TQWidget *tqparent) : KDialogBase(tqparent, 0, true, i18n("Highscores"), KDialogBase::Close) { m_tw = new myTabWidget(this); setMainWidget(m_tw); @@ -133,10 +133,10 @@ highScoreDialog::highScoreDialog(TQWidget *parent) : KDialogBase(parent, 0, true KConfig *cfg = kapp -> config(); for (int i = 1; i <= 3; i++) { - cfg -> setGroup(TQString("Level%1").arg(i)); + cfg -> setGroup(TQString("Level%1").tqarg(i)); for (int j = 1; j <= 5; j++) { - m_scores[i-1].append(qMakePair(cfg->readNumEntry(TQString("Score%1").arg(j)), cfg->readEntry(TQString("Name%1").arg(j)))); + m_scores[i-1].append(tqMakePair(cfg->readNumEntry(TQString("Score%1").tqarg(j)), cfg->readEntry(TQString("Name%1").tqarg(j)))); } } @@ -148,7 +148,7 @@ highScoreDialog::highScoreDialog(TQWidget *parent) : KDialogBase(parent, 0, true bool highScoreDialog::scoreGoodEnough(int level, int score) { level--; - TQValueList< QPair >::iterator it, itEnd; + TQValueList< TQPair >::iterator it, itEnd; it = m_scores[level].begin(); itEnd = m_scores[level].end(); while (it != itEnd && (*it).first >= score) it++; @@ -159,23 +159,23 @@ bool highScoreDialog::scoreGoodEnough(int level, int score) void highScoreDialog::addScore(int level, int score, const TQString &name) { level--; - TQValueList< QPair >::iterator it, itEnd; + TQValueList< TQPair >::iterator it, itEnd; it = m_scores[level].begin(); itEnd = m_scores[level].end(); while (it != itEnd && (*it).first >= score) it++; if (it != itEnd) { - m_scores[level].insert(it, qMakePair(score, name)); + m_scores[level].insert(it, tqMakePair(score, name)); m_scores[level].remove(--m_scores[level].end()); KConfig *cfg = kapp -> config(); - cfg -> setGroup(TQString("Level%1").arg(level + 1)); + cfg -> setGroup(TQString("Level%1").tqarg(level + 1)); int j; for (it = m_scores[level].begin(), j = 1; it != m_scores[level].end(); ++it, j++) { - cfg->writeEntry(TQString("Score%1").arg(j), (*it).first); - cfg->writeEntry(TQString("Name%1").arg(j), (*it).second); + cfg->writeEntry(TQString("Score%1").tqarg(j), (*it).first); + cfg->writeEntry(TQString("Name%1").tqarg(j), (*it).second); } cfg -> sync(); } diff --git a/blinken/src/highscoredialog.h b/blinken/src/highscoredialog.h index 484f392b..e4a9e38b 100644 --- a/blinken/src/highscoredialog.h +++ b/blinken/src/highscoredialog.h @@ -20,13 +20,13 @@ class myTabWidget; class highScoreDialog : private KDialogBase { public: - highScoreDialog(TQWidget *parent); + highScoreDialog(TQWidget *tqparent); bool scoreGoodEnough(int level, int score); void addScore(int level, int score, const TQString &name); void showLevel(int level); - TQValueList< QPair > m_scores[3]; + TQValueList< TQPair > m_scores[3]; myTabWidget *m_tw; }; diff --git a/blinken/src/number.cpp b/blinken/src/number.cpp index 2403f866..27621ee8 100644 --- a/blinken/src/number.cpp +++ b/blinken/src/number.cpp @@ -100,7 +100,7 @@ void number::paintDigit(TQPainter &p, int number) const { // make gcc happy const int *n = m_number0; - int shape; + int tqshape; switch (number) { @@ -141,31 +141,31 @@ void number::paintDigit(TQPainter &p, int number) const break; } - p.setBrush(Qt::red); - p.setPen(Qt::red); + p.setBrush(TQt::red); + p.setPen(TQt::red); for (int i = 0; i < 5; i++) { for (int j = 0; j < 4; j++) { - shape = n[j + i * 4]; - if (shape == 0) + tqshape = n[j + i * 4]; + if (tqshape == 0) { - p.fillRect(7 * (j-1), 7 * (i-1), 6, 6, Qt::red); + p.fillRect(7 * (j-1), 7 * (i-1), 6, 6, TQt::red); } - else if (shape != 5) + else if (tqshape != 5) { - if (shape == 1) p.translate(7 * (j-1), 7 * (i-1)); - else if (shape == 2) + if (tqshape == 1) p.translate(7 * (j-1), 7 * (i-1)); + else if (tqshape == 2) { p.translate(7 * j - 2, 7 * (i-1)); p.rotate(90); } - else if (shape == 3) + else if (tqshape == 3) { p.translate(7 * j - 2, 7 * i - 2); p.rotate(180); } - else if (shape == 4) + else if (tqshape == 4) { p.translate(7 * (j-1), 7 * i - 2); p.rotate(270); @@ -173,19 +173,19 @@ void number::paintDigit(TQPainter &p, int number) const p.drawPie(0, 0, 11, 11, 90 * 16, 16 * 90); - if (shape == 1) p.translate(-7 * (j-1), -7 * (i-1)); - else if (shape == 2) + if (tqshape == 1) p.translate(-7 * (j-1), -7 * (i-1)); + else if (tqshape == 2) { p.rotate(-90); p.translate(-(7 * j - 2), -7 * (i-1)); } - else if (shape == 3) + else if (tqshape == 3) { p.rotate(-180); p.translate(-(7 * j - 2), -(7 * i - 2)); } - else if (shape == 4) + else if (tqshape == 4) { p.rotate(-270); p.translate(- (7 * (j-1)), -(7 * i - 2)); diff --git a/kalzium/ChangeLog b/kalzium/ChangeLog index 61d29e3a..ce67fc51 100644 --- a/kalzium/ChangeLog +++ b/kalzium/ChangeLog @@ -19,7 +19,7 @@ Add: - The menustructure is now more consistent - One icon has been added - Make the mainwidget a QScrollView. This make sizehandling easier - - Improved layout of the detailed information dialog + - Improved tqlayout of the detailed information dialog - Added a widget which shows you a table of the isotopes - Added EqChem, a chemical equation solver - Added several glossary-items diff --git a/kalzium/RELEASE-PLAN b/kalzium/RELEASE-PLAN index f556379b..3554ccb1 100644 --- a/kalzium/RELEASE-PLAN +++ b/kalzium/RELEASE-PLAN @@ -1,7 +1,7 @@ Release plan ============ -Status: Under discussion +tqStatus: Under discussion Overview diff --git a/kalzium/src/detailedgraphicaloverview.cpp b/kalzium/src/detailedgraphicaloverview.cpp index d31e2579..67a4d231 100644 --- a/kalzium/src/detailedgraphicaloverview.cpp +++ b/kalzium/src/detailedgraphicaloverview.cpp @@ -28,14 +28,14 @@ email : cniehaus@kde.org #include #include -DetailedGraphicalOverview::DetailedGraphicalOverview( Element *el, TQWidget *parent, const char *name ) -: TQWidget( parent, name ) +DetailedGraphicalOverview::DetailedGraphicalOverview( Element *el, TQWidget *tqparent, const char *name ) +: TQWidget( tqparent, name ) { init( el ); } -DetailedGraphicalOverview::DetailedGraphicalOverview( TQWidget *parent, const char *name ) -: TQWidget( parent, name ) +DetailedGraphicalOverview::DetailedGraphicalOverview( TQWidget *tqparent, const char *name ) +: TQWidget( tqparent, name ) { init( 0L ); } @@ -59,12 +59,12 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) TQPainter p; p.begin( &pm ); - p.setBrush(Qt::SolidPattern); + p.setBrush(TQt::SolidPattern); if ( !m_element ) { pm.fill( paletteBackgroundColor() ); - p.drawText( 0, 0, w, h, Qt::AlignCenter | Qt::WordBreak, i18n( "No element selected" ) ); + p.drawText( 0, 0, w, h, TQt::AlignCenter | TQt::WordBreak, i18n( "No element selected" ) ); } else { @@ -80,8 +80,8 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) p.setBrush( m_element->elementColor() ); p.drawRect( x1 , y1 , x2 , y2 ); - p.setBrush( Qt::black ); - p.setBrush(Qt::NoBrush); + p.setBrush( TQt::black ); + p.setBrush(TQt::NoBrush); TQFont fA = KGlobalSettings::generalFont(); TQFont fB = KGlobalSettings::generalFont(); @@ -126,20 +126,20 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) p.setFont( fC ); //Name - p.drawText( 1, 0, w/2, h, Qt::AlignLeft, m_element->elname() ); + p.drawText( 1, 0, w/2, h, TQt::AlignLeft, m_element->elname() ); //Oxidationstates fC.setPointSize( size2 ); p.setFont( fC ); int offsetOx = KalziumUtils::StringHeight( strLocalizedMass , fC, &p ); - p.drawText( 1, h-offsetOx, w/2, offsetOx, Qt::AlignLeft, m_element->oxstage() ); + p.drawText( 1, h-offsetOx, w/2, offsetOx, TQt::AlignLeft, m_element->oxstage() ); //Mass fC.setPointSize( size3 ); p.setFont( fC ); int offset = KalziumUtils::StringHeight( strLocalizedMass, fC, &p ); - p.drawText( w/2, h-offset, w/2, offset, Qt::AlignRight, strLocalizedMass ); + p.drawText( w/2, h-offset, w/2, offset, TQt::AlignRight, strLocalizedMass ); drawBiologicalSymbol( &p ); } @@ -164,9 +164,9 @@ void DetailedGraphicalOverview::drawBiologicalSymbol( TQPainter *p ) if ( m_element->biological() > 0 ) { const int radius = db + 8; - p->setBrush( Qt::SolidPattern ); - p->setBrush( Qt::white ); - p->setPen( Qt::black ); + p->setBrush( TQt::SolidPattern ); + p->setBrush( TQt::white ); + p->setPen( TQt::black ); p->drawRoundRect( TQRect( width() - radius, -radius, 2 * radius, @@ -178,52 +178,52 @@ void DetailedGraphicalOverview::drawBiologicalSymbol( TQPainter *p ) case 0: //nothing break; case 1: //red, red - p->setBrush( Qt::red ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::red ); + p->setBrush( TQt::red ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::red ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::red ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::red ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 2: //green, red - p->setBrush( Qt::red ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::red ); + p->setBrush( TQt::red ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::red ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 3: //green - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 4: //green, blue - p->setBrush( Qt::blue ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::blue ); + p->setBrush( TQt::blue ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::blue ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 5: //blue - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::blue ); - p->setPen( Qt::blue ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::blue ); + p->setPen( TQt::blue ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 6: //blue, blue - p->setBrush( Qt::blue ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::blue ); + p->setBrush( TQt::blue ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::blue ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); + p->setBrush(TQt::SolidPattern); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; } diff --git a/kalzium/src/detailedgraphicaloverview.h b/kalzium/src/detailedgraphicaloverview.h index 6fb649dc..90658abc 100644 --- a/kalzium/src/detailedgraphicaloverview.h +++ b/kalzium/src/detailedgraphicaloverview.h @@ -25,13 +25,14 @@ class Element; * in one widget like a lot people know it from school * @author Carsten Niehaus */ -class DetailedGraphicalOverview : public QWidget +class DetailedGraphicalOverview : public TQWidget { Q_OBJECT + TQ_OBJECT public: - DetailedGraphicalOverview( Element *el, TQWidget *parent, const char *name=0 ); - DetailedGraphicalOverview( TQWidget *parent, const char *name=0 ); + DetailedGraphicalOverview( Element *el, TQWidget *tqparent, const char *name=0 ); + DetailedGraphicalOverview( TQWidget *tqparent, const char *name=0 ); /** * sets the elements whose data will be used to @p el diff --git a/kalzium/src/detailinfodlg.cpp b/kalzium/src/detailinfodlg.cpp index c4fc8899..7503c77d 100644 --- a/kalzium/src/detailinfodlg.cpp +++ b/kalzium/src/detailinfodlg.cpp @@ -44,8 +44,8 @@ //TODO add bondxx-radius (H-H-distance for example) -DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *parent, const char *name) - : KDialogBase( IconList, name, Help|User1|User2|Close, Close, parent, name, +DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *tqparent, const char *name) + : KDialogBase( IconList, name, Help|User1|User2|Close, Close, tqparent, name, false, //non modal false, KGuiItem(i18n("Next element", "Next"), "1rightarrow"), @@ -66,7 +66,7 @@ DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *parent, const char *na createContent(); m_actionCollection = new KActionCollection(this); - KStdAction::quit(this, TQT_SLOT(slotClose()), m_actionCollection); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), m_actionCollection); setButtonTip( User2, i18n( "Goes to the previous element" ) ); setButtonTip( User1, i18n( "Goes to the next element" ) ); @@ -94,10 +94,10 @@ void DetailedInfoDlg::setElement(Element *element) KHTMLPart* DetailedInfoDlg::addHTMLTab( const TQString& title, const TQString& icontext, const TQString& iconname ) { TQFrame *frame = addPage(title, icontext, BarIcon(iconname)); - TQVBoxLayout *layout = new TQVBoxLayout( frame ); - layout->setMargin( 0 ); - KHTMLPart *w = new KHTMLPart( frame, "html-part", frame ); - layout->addWidget( w->view() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( frame ); + tqlayout->setMargin( 0 ); + KHTMLPart *w = new KHTMLPart( frame, "html-part", TQT_TQOBJECT(frame) ); + tqlayout->addWidget( w->view() ); return w; } @@ -122,43 +122,43 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) html.append( "
" ); html.append( m_element->symbol() ); html.append( "" ); - html.append( i18n( "Block: %1" ).arg( m_element->block() ) ); + html.append( i18n( "Block: %1" ).tqarg( m_element->block() ) ); html.append( "
" ); html.append( ""); switch ( type ) { case CHEMICAL: html.append( "" ); html.append( "" ); html.append( "" ); if ( m_element->radius(Element::IONIC) > 0.0 ) { html.append( "" ); } if ( m_element->radius(Element::VDW) > 0.0 ) { html.append( "" ); } if ( m_element->radius(Element::ATOMIC) > 0.0 ) { html.append( "" ); } html.append( "" ); if ( !m_element->isotopes().isEmpty() ) { @@ -171,22 +171,22 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) html.append( "" ); if ( m_element->abundance() > 0 ){ html.append( "" ); } html.append( "" ); if ( !m_element->nameOrigin().isEmpty() ) { html.append( "" ); } if ( m_element->artificial() || m_element->radioactive() ) @@ -203,16 +203,16 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) break; case ENERGY: html.append( "" ); html.append( "" ); html.append( "" ); html.append( "" ); @@ -221,7 +221,7 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) { html.append( "" ); } break; @@ -264,13 +264,13 @@ TQString DetailedInfoDlg::isotopeTable() { html.append( "" ); @@ -379,7 +379,7 @@ void DetailedInfoDlg::reloadContent() const TQString element_symbol = m_element->symbol(); // updating caption - setCaption( i18n( "For example Carbon (6)" , "%1 (%2)" ).arg( element_name ).arg( m_elementNumber ) ); + setCaption( i18n( "For example Carbon (6)" , "%1 (%2)" ).tqarg( element_name ).tqarg( m_elementNumber ) ); // updating overview tab dTab->setElement( m_element ); @@ -389,21 +389,21 @@ void DetailedInfoDlg::reloadContent() if ( TQFile::exists( picpath ) ) { TQImage img( picpath, "JPEG" ); - img = img.smoothScale ( 400, 400, TQImage::ScaleMin ); + img = img.smoothScale ( 400, 400, TQ_ScaleMin ); TQPixmap pic; pic.convertFromImage( img ); piclabel->setPixmap( pic ); } else - piclabel->setText( i18n( "No picture of %1 found." ).arg( element_name ) ); + piclabel->setText( i18n( "No picture of %1 found." ).tqarg( element_name ) ); // updating atomic model tab wOrbits->setElementNumber( m_elementNumber ); TQWhatsThis::add( wOrbits, i18n( "Here you can see the atomic hull of %1. %2 has the configuration %3." ) - .arg( m_element->elname() ) - .arg( m_element->elname() ) - .arg( m_element->parsedOrbits() ) ); + .tqarg( m_element->elname() ) + .tqarg( m_element->elname() ) + .tqarg( m_element->parsedOrbits() ) ); // updating html tabs fillHTMLTab( m_htmlpages["chemical"], getHtml( CHEMICAL ) ); @@ -422,7 +422,7 @@ void DetailedInfoDlg::reloadContent() } else { - m_spectrumLabel->setText( i18n( "No spectrum of %1 found." ).arg( element_name ) ); + m_spectrumLabel->setText( i18n( "No spectrum of %1 found." ).tqarg( element_name ) ); m_spectrumStack->raiseWidget( m_spectrumLabel ); } } diff --git a/kalzium/src/detailinfodlg.h b/kalzium/src/detailinfodlg.h index a00c06a2..4087239d 100644 --- a/kalzium/src/detailinfodlg.h +++ b/kalzium/src/detailinfodlg.h @@ -39,9 +39,10 @@ class KHTMLPart; class DetailedInfoDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DetailedInfoDlg( Element *el , TQWidget *parent=0, const char *name=0); + DetailedInfoDlg( Element *el , TQWidget *tqparent=0, const char *name=0); void setElement(Element *el); diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index 3fc7e493..687f0ad8 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -68,8 +68,8 @@ TQString Element::parsedOrbits( bool canBeEmpty ) TQString orbits = m_orbits; TQRegExp rxs("([a-z])([0-9]+)"); TQRegExp rxb("([a-z]{2}) ",false); - orbits.replace(rxs,"\\1\\2"); //superscript around electron number - orbits.replace(rxb,"\\1 "); //bold around element symbols + orbits.tqreplace(rxs,"\\1\\2"); //superscript around electron number + orbits.tqreplace(rxb,"\\1 "); //bold around element symbols return orbits; } @@ -106,7 +106,7 @@ const TQString Element::adjustRadius( RADIUSTYPE rtype ) if ( val <= 0 ) v = i18n( "Value unknown" ); else - v = i18n( "%1 is a length, eg: 12.3 pm", "%1 pm" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 is a length, eg: 12.3 pm", "%1 pm" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); return v; } @@ -132,7 +132,7 @@ const TQString Element::adjustUnits( const int type, double value ) const TQString Element::adjustUnits( const int type ) { - TQString v = TQString::null; + TQString v = TQString(); double val = 0.0; //the value to convert @@ -151,19 +151,19 @@ const TQString Element::adjustUnits( const int type ) TQString strVal = KalziumUtils::localizedValue( newvalue, 6 ); switch (Prefs::temperature()) { case 0: //Kelvin - v = i18n( "%1 is the temperature in Kelvin", "%1 K" ).arg( strVal ); + v = i18n( "%1 is the temperature in Kelvin", "%1 K" ).tqarg( strVal ); break; case 1://Kelvin to Celsius - v = i18n( "%1 is the temperature in Celsius", "%1 %2C" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Celsius", "%1 %2C" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; case 2: // Kelvin to Fahrenheit - v = i18n( "%1 is the temperature in Fahrenheit", "%1 %2F" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Fahrenheit", "%1 %2F" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; case 3: // Kelvin to Rankine - v = i18n( "%1 is the temperature in Rankine", "%1 %2Ra" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Rankine", "%1 %2Ra" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; case 4: // Kelvin to Reaumur - v = i18n( "%1 is the temperature in Reaumur", "%1 %2R" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Reaumur", "%1 %2R" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; } } @@ -186,12 +186,12 @@ const TQString Element::adjustUnits( const int type ) { if ( Prefs::energies() == 0 ) { - v = i18n( "%1 kJ/mol" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 kJ/mol" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } else // use electronvolt { val/=96.6; - v = i18n( "%1 eV" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 eV" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } } } @@ -201,7 +201,7 @@ const TQString Element::adjustUnits( const int type ) if ( val <= 0 ) v = i18n( "Value unknown" ); else - v = i18n( "%1 u" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 u" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } else if ( type == DENSITY ) // its a density { @@ -213,11 +213,11 @@ const TQString Element::adjustUnits( const int type ) { if ( boiling() < 295.0 && melting() < 295.0)//gasoline { - v = i18n( "%1 g/L" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 g/L" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } else//liquid or solid { - v = i18n( "%1 g/cm3" ).arg( KalziumUtils::localizedValue( val, 6 )); + v = i18n( "%1 g/cm3" ).tqarg( KalziumUtils::localizedValue( val, 6 )); } } } @@ -230,7 +230,7 @@ const TQString Element::adjustUnits( const int type ) } else { - v = i18n( "This element was discovered in the year %1" ).arg( TQString::number( val ) ); + v = i18n( "This element was discovered in the year %1" ).tqarg( TQString::number( val ) ); } } @@ -263,18 +263,18 @@ void Element::drawStateOfMatter( TQPainter* p, double temp ) p->setFont( f ); //top left - p->setPen( Qt::black ); + p->setPen( TQt::black ); text = KalziumUtils::localizedValue( KalziumUtils::strippedValue( mass( ) ), 6 ); - p->drawText( X,Y ,ELEMENTSIZE,h_small,Qt::AlignCenter, text ); + p->drawText( X,Y ,ELEMENTSIZE,h_small,TQt::AlignCenter, text ); text = TQString::number( number() ); - p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,Qt::AlignCenter, text ); + p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,TQt::AlignCenter, text ); p->setFont( symbol_font ); - p->drawText( X,Y, ELEMENTSIZE,ELEMENTSIZE,Qt::AlignCenter, symbol() ); + p->drawText( X,Y, ELEMENTSIZE,ELEMENTSIZE,TQt::AlignCenter, symbol() ); //border - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } @@ -289,7 +289,7 @@ TQColor Element::currentColor( const double temp ) //If either the mp or bp is not known return //This is to avoid undefined behaviour // if ( iButton_boiling <= 0.0 || iButton_melting <= 0.0 ) -// return Qt::lightGray; +// return TQt::lightGray; if ( temp < iButton_melting ) { //the element is solid @@ -305,7 +305,7 @@ TQColor Element::currentColor( const double temp ) color= Prefs::color_vapor(); } else - color = Qt::lightGray; + color = TQt::lightGray; return color; } @@ -329,23 +329,23 @@ void Element::drawGradient( TQPainter* p, const TQString& value, const TQColor& p->setPen( c ); p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, c ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); TQFont symbol_font = p->font(); TQFont f = p->font(); f.setPointSize( KalziumUtils::maxSize(value, TQRect( X,Y+ELEMENTSIZE-h_small, ELEMENTSIZE, h_small ),f, p ) ); p->setFont( f ); - p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,Qt::AlignCenter, value ); + p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,TQt::AlignCenter, value ); const TQRect rect = TQRect( X,Y,ELEMENTSIZE-2,ELEMENTSIZE-10 ); int goodsize = KalziumUtils::maxSize( symbol(), rect, symbol_font, p ); symbol_font.setPointSize( goodsize ); p->setFont( symbol_font ); - p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,Qt::AlignCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,TQt::AlignCenter, symbol() ); //border - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } @@ -357,18 +357,18 @@ void Element::drawGrayedOut( TQPainter *p ) //The Y-coordinate int Y = yPos(); - p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, Qt::lightGray ); + p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, TQt::lightGray ); - p->setPen( Qt::darkGray ); + p->setPen( TQt::darkGray ); TQFont symbol_font = p->font(); const TQRect rect = TQRect( X,Y,ELEMENTSIZE-2,ELEMENTSIZE-10 ); int goodsize = KalziumUtils::maxSize( symbol(), rect, symbol_font, p ); symbol_font.setPointSize( goodsize ); p->setFont( symbol_font ); - p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,Qt::AlignCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,TQt::AlignCenter, symbol() ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } @@ -385,7 +385,7 @@ void Element::drawSelf( TQPainter* p, bool simple, bool isCrystal ) p->setPen( elementColor() ); p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, elementColor() ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); TQString text; TQFont symbol_font = p->font(); @@ -399,9 +399,9 @@ void Element::drawSelf( TQPainter* p, bool simple, bool isCrystal ) p->setFont( symbol_font ); if ( !simple ) - p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,Qt::AlignCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,TQt::AlignCenter, symbol() ); else - p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,Qt::AlignHCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,TQt::AlignHCenter, symbol() ); TQFont f = p->font(); @@ -441,11 +441,11 @@ void Element::drawSelf( TQPainter* p, bool simple, bool isCrystal ) } else text = KalziumUtils::localizedValue( KalziumUtils::strippedValue( mass( ) ), 6 ); - p->drawText( X+2,Y ,ELEMENTSIZE-4 ,h_small,Qt::AlignCenter, text ); + p->drawText( X+2,Y ,ELEMENTSIZE-4 ,h_small,TQt::AlignCenter, text ); } text = TQString::number( number() ); - p->drawText( X+2,Y+ELEMENTSIZE-h_small , ELEMENTSIZE-4, h_small,Qt::AlignCenter, text ); + p->drawText( X+2,Y+ELEMENTSIZE-h_small , ELEMENTSIZE-4, h_small,TQt::AlignCenter, text ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } diff --git a/kalzium/src/elementdataviewer.cpp b/kalzium/src/elementdataviewer.cpp index 108889cc..d14eb343 100644 --- a/kalzium/src/elementdataviewer.cpp +++ b/kalzium/src/elementdataviewer.cpp @@ -30,18 +30,18 @@ #include #include -ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) +ElementDataViewer::ElementDataViewer( TQWidget *tqparent, const char* name ) : KDialogBase( KDialogBase::Plain, i18n( "Plot Data") , Help | User1 | Close, User1, - parent, name ) + tqparent, name ) { d = KalziumDataObject::instance(); yData = new AxisData(); - TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), 0, KDialog::spacingHint() ); + TQHBoxLayout *tqlayout = new TQHBoxLayout(plainPage(), 0, KDialog::spacingHint() ); m_pPlotSetupWidget = new PlotSetupWidget( plainPage(), "plotsetup" ); m_pPlotSetupWidget->from->setMaxValue( d->numberOfElements() - 1 ); @@ -51,10 +51,10 @@ ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) m_pPlotWidget->setMinimumWidth( 200 ); m_pPlotWidget->resize( 400, m_pPlotWidget->height() ); - layout->addWidget( m_pPlotSetupWidget ); - layout->addWidget( m_pPlotWidget ); - layout->setStretchFactor( m_pPlotSetupWidget, 0 ); - layout->setStretchFactor( m_pPlotWidget, 1 ); + tqlayout->addWidget( m_pPlotSetupWidget ); + tqlayout->addWidget( m_pPlotWidget ); + tqlayout->setStretchFactor( m_pPlotSetupWidget, 0 ); + tqlayout->setStretchFactor( m_pPlotWidget, 1 ); // setup the list of names EList::iterator it = d->ElementList.begin(); @@ -69,7 +69,7 @@ ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) setButtonText( User1, i18n("&Plot") ); m_actionCollection = new KActionCollection(this); - KStdAction::quit(this, TQT_SLOT(slotClose()), m_actionCollection); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), m_actionCollection); connect ( m_pPlotSetupWidget->KCB_y, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( drawPlot()) ); @@ -294,7 +294,7 @@ void ElementDataViewer::drawPlot() /* * reserve the memory for the KPlotObjects */ - //TODO QT4 replace TQMemArray with QVector + //TODO QT4 replace TQMemArray with TQVector TQMemArray dataPoint(num); TQMemArray dataPointLabel(num); diff --git a/kalzium/src/elementdataviewer.h b/kalzium/src/elementdataviewer.h index 76fea4b1..062377ae 100644 --- a/kalzium/src/elementdataviewer.h +++ b/kalzium/src/elementdataviewer.h @@ -96,9 +96,10 @@ class AxisData class ElementDataViewer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ElementDataViewer( TQWidget *parent=0 , const char *name =0 ); + ElementDataViewer( TQWidget *tqparent=0 , const char *name =0 ); /** * the AxixData for the y-Axis diff --git a/kalzium/src/eqchemview.cpp b/kalzium/src/eqchemview.cpp index fee6e9c7..4a22cd20 100644 --- a/kalzium/src/eqchemview.cpp +++ b/kalzium/src/eqchemview.cpp @@ -46,11 +46,11 @@ extern "C" { char* solve_equation(const char *) { return NULL; } #endif -eqchemView::eqchemView(TQWidget *parent) : TQWidget(parent) +eqchemView::eqchemView(TQWidget *tqparent) : TQWidget(tqparent) { settingsChanged(); - TQGridLayout *l = new TQGridLayout(this, 2, 2, 11, 6, "eqchemView::eqchemView layout"); + TQGridLayout *l = new TQGridLayout(this, 2, 2, 11, 6, "eqchemView::eqchemView tqlayout"); m_eqResult = new EqResult(this); m_eqedit = new KLineEdit(this); @@ -89,8 +89,8 @@ void eqchemView::clear() void eqchemView::compute() { TQString equation( m_eqedit->text() ); - equation.replace("+", "+"); - equation.replace("->", " -> "); + equation.tqreplace("+", "+"); + equation.tqreplace("->", " -> "); equation.append(" "); equation.prepend(" "); @@ -104,13 +104,13 @@ void eqchemView::compute() m_eqResult->add( equation, disp ); } -EQChemDialog::EQChemDialog( TQWidget *parent ) - : KDialogBase(parent, "EQChemDialog", true, i18n( "Solve Chemical Equations" ), +ETQChemDialog::ETQChemDialog( TQWidget *tqparent ) + : KDialogBase(tqparent, "ETQChemDialog", true, i18n( "Solve Chemical Equations" ), KDialogBase::Apply|KDialogBase::Close|KDialogBase::Help, KDialogBase::Apply, true ) { } -void EQChemDialog::slotHelp() +void ETQChemDialog::slotHelp() { emit helpClicked(); if ( kapp ) diff --git a/kalzium/src/eqchemview.h b/kalzium/src/eqchemview.h index 0e1ad686..85a9dda8 100644 --- a/kalzium/src/eqchemview.h +++ b/kalzium/src/eqchemview.h @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _EQCHEMVIEW_H_ -#define _EQCHEMVIEW_H_ +#ifndef _ETQCHEMVIEW_H_ +#define _ETQCHEMVIEW_H_ #include #include @@ -40,14 +40,15 @@ class KPushButton; * @author Thomas Nagy * @version 0.1 */ -class eqchemView : public QWidget +class eqchemView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - eqchemView(TQWidget *parent); + eqchemView(TQWidget *tqparent); /** * Destructor @@ -82,17 +83,18 @@ private: /** * @author Carsten Niehaus */ -class EQChemDialog : public KDialogBase +class ETQChemDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * public constructor * - * @param parent the parent widget + * @param tqparent the tqparent widget */ - EQChemDialog( TQWidget *parent ); + ETQChemDialog( TQWidget *tqparent ); private slots: /** @@ -101,4 +103,4 @@ class EQChemDialog : public KDialogBase void slotHelp(); }; -#endif // _EQCHEMVIEW_H_ +#endif // _ETQCHEMVIEW_H_ diff --git a/kalzium/src/eqresult.cpp b/kalzium/src/eqresult.cpp index c128c93e..a4aad576 100644 --- a/kalzium/src/eqresult.cpp +++ b/kalzium/src/eqresult.cpp @@ -47,7 +47,7 @@ TQListBoxItem ( listBox ) void QuestionItem::paint( TQPainter* painter ) { - int tf = Qt::NoAccel | Qt::SingleLine | Qt::AlignVCenter; + int tf = TQt::NoAccel | TQt::SingleLine | TQt::AlignVCenter; TQRect r ( 0, 0, listBox()->contentsWidth(), height( listBox() ) ); painter->fillRect( r, m_bgcolor ); @@ -61,7 +61,7 @@ void AnswerItem::paint( TQPainter* painter ) TQRect r ( 0, 0, listBox()->contentsWidth(), height( listBox() ) ); painter->fillRect( r, m_bgcolor ); - TQColorGroup cg = listBox()->colorGroup(); + TQColorGroup cg = listBox()->tqcolorGroup(); cg.setColor( TQColorGroup::Background, m_bgcolor ); m_richtext->draw(painter, 0, 0, r, cg ); @@ -89,7 +89,7 @@ void AnswerItem::checkSize() m_richtext->setWidth( (t1>t2)?t1:t2 ); } -EqResult::EqResult(TQWidget *parent) : TQListBox(parent) +EqResult::EqResult(TQWidget *tqparent) : TQListBox(tqparent) { m_alternate_color = false; setMinimumWidth(140); @@ -101,7 +101,7 @@ EqResult::~EqResult() void EqResult::add(const TQString & question, const TQString & answer) { - TQColor bgcolor = colorGroup().base(); + TQColor bgcolor = tqcolorGroup().base(); if ( m_alternate_color ) bgcolor = bgcolor.dark( 120 ); diff --git a/kalzium/src/eqresult.h b/kalzium/src/eqresult.h index 39e7d85a..2b862d3b 100644 --- a/kalzium/src/eqresult.h +++ b/kalzium/src/eqresult.h @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _EQRESULT_H_ -#define _EQRESULT_H_ +#ifndef _ETQRESULT_H_ +#define _ETQRESULT_H_ #include #include @@ -27,7 +27,7 @@ /** * @author Thomas Nagy */ -class QuestionItem : public QListBoxItem +class QuestionItem : public TQListBoxItem { public: QuestionItem( TQListBox*, const TQString&, TQColor bg ); @@ -43,7 +43,7 @@ class QuestionItem : public QListBoxItem /** * @author Thomas Nagy */ -class AnswerItem : public QListBoxItem +class AnswerItem : public TQListBoxItem { public: AnswerItem( TQListBox*, const TQString&, const TQString&, TQColor bg ); @@ -69,12 +69,13 @@ class AnswerItem : public QListBoxItem /** * @author Thomas Nagy */ -class EqResult : public QListBox +class EqResult : public TQListBox { Q_OBJECT + TQ_OBJECT public: - EqResult(TQWidget *parent); + EqResult(TQWidget *tqparent); ~EqResult(); public slots: @@ -86,5 +87,5 @@ private: bool m_alternate_color; }; -#endif // _EQRESULT_H_ +#endif // _ETQRESULT_H_ diff --git a/kalzium/src/isotope.cpp b/kalzium/src/isotope.cpp index 268e99d4..3b2dbe63 100644 --- a/kalzium/src/isotope.cpp +++ b/kalzium/src/isotope.cpp @@ -52,24 +52,24 @@ TQString Isotope::halflifeAsString() if ( !seconds() )//years { if ( m_halflife > 1000000 ) - halflife = i18n("%1 million years").arg( KalziumUtils::localizedValue( m_halflife/1000000.0, 2 ) ); + halflife = i18n("%1 million years").tqarg( KalziumUtils::localizedValue( m_halflife/1000000.0, 2 ) ); if ( m_halflife > 1000000000 ) - halflife = i18n("%1 billion years").arg( KalziumUtils::localizedValue( m_halflife/1000000000.0, 2 ) ); + halflife = i18n("%1 billion years").tqarg( KalziumUtils::localizedValue( m_halflife/1000000000.0, 2 ) ); else - halflife = i18n("%1 years").arg( KalziumUtils::localizedValue( m_halflife, 2 ) ); + halflife = i18n("%1 years").tqarg( KalziumUtils::localizedValue( m_halflife, 2 ) ); } else { if ( m_halflife < 120 ) - halflife = i18n("%1 seconds").arg( KalziumUtils::localizedValue( m_halflife, 2 ) ); + halflife = i18n("%1 seconds").tqarg( KalziumUtils::localizedValue( m_halflife, 2 ) ); else if ( m_halflife > 1000 ) - halflife = i18n("%1 minutes").arg( KalziumUtils::localizedValue( m_halflife/60.0, 2 ) ); + halflife = i18n("%1 minutes").tqarg( KalziumUtils::localizedValue( m_halflife/60.0, 2 ) ); else if ( m_halflife > 3600 ) - halflife = i18n("%1 hours").arg( KalziumUtils::localizedValue( m_halflife/( 60*60 ), 2 ) ); + halflife = i18n("%1 hours").tqarg( KalziumUtils::localizedValue( m_halflife/( 60*60 ), 2 ) ); if ( m_halflife > 86400 ) //one day - halflife = i18n("%1 days").arg( KalziumUtils::localizedValue( m_halflife/( 60*60*24 ), 2 ) ); + halflife = i18n("%1 days").tqarg( KalziumUtils::localizedValue( m_halflife/( 60*60*24 ), 2 ) ); if ( m_halflife > ( 31536000 * 2 ) ) //two year - halflife = i18n("%1 years").arg( KalziumUtils::localizedValue( m_halflife/( 3600.0*365 ), 2 ) ); + halflife = i18n("%1 years").tqarg( KalziumUtils::localizedValue( m_halflife/( 3600.0*365 ), 2 ) ); } return halflife; diff --git a/kalzium/src/kalzium.cpp b/kalzium/src/kalzium.cpp index 84c2c984..747c230f 100644 --- a/kalzium/src/kalzium.cpp +++ b/kalzium/src/kalzium.cpp @@ -74,10 +74,10 @@ Kalzium::Kalzium() m_infoDialog = 0; m_toolboxCurrent = 0; - connect( m_PerodicTableView, TQT_SIGNAL( ElementClicked( int ) ), this, TQT_SLOT( openInformationDialog( int ) )); - connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), this, TQT_SLOT( slotStatusbar( int ) )); + connect( m_PerodicTableView, TQT_SIGNAL( ElementClicked( int ) ), TQT_TQOBJECT(this), TQT_SLOT( openInformationDialog( int ) )); + connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotStatusbar( int ) )); - // layouting + // tqlayouting setCentralWidget( centralWidget ); centralWidget->show(); @@ -107,14 +107,14 @@ Kalzium::Kalzium() void Kalzium::setupActions() { - m_actionNoScheme = new KToggleAction(i18n("&No Color Scheme"), 0, this, TQT_SLOT(slotNoLook()), actionCollection(), "view_look_noscheme"); + m_actionNoScheme = new KToggleAction(i18n("&No Color Scheme"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotNoLook()), actionCollection(), "view_look_noscheme"); // the actions for the color schemes - m_actionGroups = new KToggleAction(i18n("Show &Groups"), 0, this, TQT_SLOT(slotLookGroups()), actionCollection(), "view_look_groups"); - m_actionBlocks = new KToggleAction(i18n("Show &Blocks"), 0, this, TQT_SLOT(slotLookBlocks()), actionCollection(), "view_look_blocks"); - m_actionAcid = new KToggleAction(i18n("Show &Acid Behavior"), 0, this, TQT_SLOT(slotLookAcidBehavior()), actionCollection(), "view_look_acid"); - m_actionFamily = new KToggleAction(i18n("Show &Family"), 0, this, TQT_SLOT(slotLookFamily()), actionCollection(), "view_look_family"); - m_actionCrystal = new KToggleAction(i18n("Show &Crystal Structures"), 0, this, TQT_SLOT(slotLookCrystal()), actionCollection(), "view_look_crystal"); + m_actionGroups = new KToggleAction(i18n("Show &Groups"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookGroups()), actionCollection(), "view_look_groups"); + m_actionBlocks = new KToggleAction(i18n("Show &Blocks"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookBlocks()), actionCollection(), "view_look_blocks"); + m_actionAcid = new KToggleAction(i18n("Show &Acid Behavior"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookAcidBehavior()), actionCollection(), "view_look_acid"); + m_actionFamily = new KToggleAction(i18n("Show &Family"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookFamily()), actionCollection(), "view_look_family"); + m_actionCrystal = new KToggleAction(i18n("Show &Crystal Structures"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookCrystal()), actionCollection(), "view_look_crystal"); //the actions for switching PerodicTableView TQStringList gradientlist; @@ -127,9 +127,9 @@ void Kalzium::setupActions() gradientlist.append(i18n("Melting Point")); gradientlist.append(i18n("Electronegativity")); gradientlist.append(i18n("Electron Affinity")); - gradient_action = new KSelectAction(i18n("&Gradient"), 0, this, 0, actionCollection(), "view_look_gradmenu"); + gradient_action = new KSelectAction(i18n("&Gradient"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "view_look_gradmenu"); gradient_action->setItems(gradientlist); - connect (gradient_action, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSwitchtoGradient(int))); + connect (gradient_action, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSwitchtoGradient(int))); // the actions for switching PerodicTableView TQStringList numlist; @@ -137,28 +137,28 @@ void Kalzium::setupActions() numlist.append(i18n("Show &IUPAC")); numlist.append(i18n("Show &CAS")); numlist.append(i18n("Show &Old IUPAC")); - numeration_action = new KSelectAction (i18n("&Numeration"), 0, this, 0, actionCollection(), "view_numerationtype"); + numeration_action = new KSelectAction (i18n("&Numeration"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "view_numerationtype"); numeration_action->setItems(numlist); numeration_action->setCurrentItem(Prefs::numeration()); - connect (numeration_action, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSwitchtoNumeration(int))); + connect (numeration_action, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSwitchtoNumeration(int))); - m_SidebarAction = new KAction(i18n("Show &Sidebar"), "sidebar", 0, this, TQT_SLOT(slotShowHideSidebar()), actionCollection(), "view_sidebar"); + m_SidebarAction = new KAction(i18n("Show &Sidebar"), "sidebar", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowHideSidebar()), actionCollection(), "view_sidebar"); #ifdef HAVE_FACILE - m_EQSolverAction = new KAction(i18n("&Equation Solver..."), "eqchem", 0, this, TQT_SLOT(slotShowEQSolver()), actionCollection(), "tools_eqsolver"); + m_ETQSolverAction = new KAction(i18n("&Equation Solver..."), "eqchem", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowETQSolver()), actionCollection(), "tools_eqsolver"); #endif // tools actions - m_pPlotAction = new KAction(i18n("&Plot Data..."), "plot", 0, this, TQT_SLOT(slotPlotData()), actionCollection(), "tools_plotdata"); - m_pGlossaryAction = new KAction(i18n("&Glossary..."), "glossary", 0, this, TQT_SLOT(slotGlossary()), actionCollection(), "tools_glossary"); + m_pPlotAction = new KAction(i18n("&Plot Data..."), "plot", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPlotData()), actionCollection(), "tools_plotdata"); + m_pGlossaryAction = new KAction(i18n("&Glossary..."), "glossary", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGlossary()), actionCollection(), "tools_glossary"); // other period view options - m_pLegendAction = new KAction(i18n("Show &Legend"), "legend", 0, this, TQT_SLOT(slotShowLegend()), actionCollection(), "view_legend"); - m_pTooltipAction = new KAction(i18n("Show &Tooltip"), "tooltip", 0, this, TQT_SLOT(slotEnableTooltips()), actionCollection(), "view_tooltip"); + m_pLegendAction = new KAction(i18n("Show &Legend"), "legend", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowLegend()), actionCollection(), "view_legend"); + m_pTooltipAction = new KAction(i18n("Show &Tooltip"), "tooltip", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEnableTooltips()), actionCollection(), "view_tooltip"); // the standard actions - KStdAction::preferences(this, TQT_SLOT(showSettingsDialog()), actionCollection()); - KStdAction::quit( kapp, TQT_SLOT (closeAllWindows()),actionCollection() ); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettingsDialog()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT (closeAllWindows()),actionCollection() ); slotShowScheme( Prefs::colorschemebox() ); slotSwitchtoNumeration( Prefs::numeration() ); @@ -212,8 +212,8 @@ void Kalzium::setupSidebars() TQVBoxLayout *lay = new TQVBoxLayout( fake, 5 ); lay->activate(); m_detailWidget = new DetailedGraphicalOverview( fake, "DetailedGraphicalOverview" ); - m_detailWidget->setMinimumSize( 200, m_detailWidget->minimumSize().height() ); - connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), this, TQT_SLOT( slotSelectedNumber( int ) )); + m_detailWidget->setMinimumSize( 200, m_detailWidget->tqminimumSize().height() ); + connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotSelectedNumber( int ) )); lay->addWidget( m_detailWidget ); lay->addItem( new TQSpacerItem( 10, 10, TQSizePolicy::Fixed, TQSizePolicy::MinimumExpanding ) ); m_toolbox->addItem( fake, SmallIcon( "overview" ), i18n( "Overview" ) ); @@ -235,13 +235,13 @@ void Kalzium::setupSidebars() m_PerodicTableView, TQT_SLOT( setTemperature( int ) ) ); m_toolbox->addItem( m_somWidget, SmallIcon( "statematter" ), i18n( "State of Matter" ) ); - connect( m_toolbox, TQT_SIGNAL( currentChanged( int ) ), this, TQT_SLOT( slotToolboxCurrentChanged( int ) ) ); + connect( m_toolbox, TQT_SIGNAL( currentChanged( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolboxCurrentChanged( int ) ) ); moveDockWindow( m_dockWin, DockLeft ); setDockEnabled( /*m_dockWin, */DockTop, false ); setDockEnabled( /*m_dockWin, */DockBottom, false ); m_dockWin->hide(); - connect( m_dockWin, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(slotSidebarVisibilityChanged(bool))); + connect( m_dockWin, TQT_SIGNAL(visibilityChanged(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSidebarVisibilityChanged(bool))); } @@ -250,10 +250,10 @@ void Kalzium::slotGlossary() m_glossarydlg->show(); } -void Kalzium::slotShowEQSolver() +void Kalzium::slotShowETQSolver() { #ifdef HAVE_FACILE - EQChemDialog *dlg = new EQChemDialog( this ); + ETQChemDialog *dlg = new ETQChemDialog( this ); TQWidget *page = new TQWidget( dlg ); dlg->setMainWidget( page ); @@ -422,7 +422,7 @@ void Kalzium::setupStatusBar() void Kalzium::slotStatusbar( int num ) { Element *e = KalziumDataObject::instance()->element( num ); - statusBar()->changeItem( i18n( "For example: \"Carbon (6), Mass: 12.0107 u\"", "%1 (%2), Mass: %3 u" ).arg( e->elname() ).arg(e->number() ).arg( KalziumUtils::localizedValue( e->mass(), 6 ) ) , IDS_ELEMENTINFO ); + statusBar()->changeItem( i18n( "For example: \"Carbon (6), Mass: 12.0107 u\"", "%1 (%2), Mass: %3 u" ).tqarg( e->elname() ).tqarg(e->number() ).tqarg( KalziumUtils::localizedValue( e->mass(), 6 ) ) , IDS_ELEMENTINFO ); } void Kalzium::openInformationDialog( int number ) diff --git a/kalzium/src/kalzium.h b/kalzium/src/kalzium.h index 1a726fed..44b2583e 100644 --- a/kalzium/src/kalzium.h +++ b/kalzium/src/kalzium.h @@ -46,6 +46,7 @@ class GlossaryDialog; class Kalzium : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -95,7 +96,7 @@ class Kalzium : public KMainWindow KAction *m_pTooltipAction; KAction *m_pLegendAction; KAction *m_SidebarAction; - KAction *m_EQSolverAction; + KAction *m_ETQSolverAction; KToggleAction *m_actionNoScheme; KToggleAction *m_actionGroups; @@ -105,7 +106,7 @@ class Kalzium : public KMainWindow KToggleAction *m_actionCrystal; /** - * the layout of the central Widget ( CentralWidget ) + * the tqlayout of the central Widget ( CentralWidget ) */ TQVBoxLayout *m_pCentralLayout; @@ -138,7 +139,7 @@ class Kalzium : public KMainWindow */ void slotShowScheme(int); - void slotShowEQSolver(); + void slotShowETQSolver(); void slotShowLegend(); diff --git a/kalzium/src/kalziumdataobject.cpp b/kalzium/src/kalziumdataobject.cpp index a759fee2..f25cbfc4 100644 --- a/kalzium/src/kalziumdataobject.cpp +++ b/kalzium/src/kalziumdataobject.cpp @@ -46,29 +46,29 @@ KalziumDataObject::KalziumDataObject() KURL url; url.setPath( locate("data", "kalzium/data/")); url.setFileName( "data.xml" ); - TQFile layoutFile( url.path() ); + TQFile tqlayoutFile( url.path() ); - if (!layoutFile.exists()) + if (!tqlayoutFile.exists()) { kdDebug() << "data.xml not found, exiting" << endl; kapp->exit(0); return; } - if (!layoutFile.open(IO_ReadOnly)) + if (!tqlayoutFile.open(IO_ReadOnly)) { kdDebug() << "data.xml IO-error" << endl; return; } // Check if the document is well-formed - if (!doc.setContent(&layoutFile)) + if (!doc.setContent(&tqlayoutFile)) { kdDebug() << "wrong xml" << endl; - layoutFile.close(); + tqlayoutFile.close(); return; } - layoutFile.close(); + tqlayoutFile.close(); ElementList = readData( doc ); m_numOfElements = ElementList.count(); diff --git a/kalzium/src/kalziumtip.cpp b/kalzium/src/kalziumtip.cpp index ba2a8252..794c9f25 100644 --- a/kalzium/src/kalziumtip.cpp +++ b/kalzium/src/kalziumtip.cpp @@ -38,9 +38,9 @@ #include #include -KalziumTip::KalziumTip( TQWidget * parent, const char * name, WFlags f ) : TQWidget( parent, name, f ) +KalziumTip::KalziumTip( TQWidget * tqparent, const char * name, WFlags f ) : TQWidget( tqparent, name, f ) { - setFocusPolicy(NoFocus); //the widget don't get the keyboard focus + setFocusPolicy(TQ_NoFocus); //the widget don't get the keyboard focus setBackgroundMode(NoBackground); // widget has no background resize(0,0); hide(); //initailly hide it @@ -54,8 +54,8 @@ KalziumTip::KalziumTip( TQWidget * parent, const char * name, WFlags f ) : TQWid void KalziumTip::showTip( TQPoint mouse, Element* element, int visibleWidth, int visibleHeight ) { TQWidget *p = 0; - if ( dynamic_cast( parent() ) ) - p = static_cast( parent() ); + if ( dynamic_cast( tqparent() ) ) + p = TQT_TQWIDGET( tqparent() ); if ( p ) { @@ -82,8 +82,8 @@ void KalziumTip::showTip( TQPoint mouse, Element* element, int visibleWidth, int if( element == m_tippedElement ) { // Avoid moving out of the current screen - if (m_mousePointer.x()+width() > qApp->desktop()->width()) - m_mousePointer.setX(qApp->desktop()->width() - width()); + if (m_mousePointer.x()+width() > tqApp->desktop()->width()) + m_mousePointer.setX(tqApp->desktop()->width() - width()); move(m_mousePointer); //do not paint again if already painted } @@ -113,7 +113,7 @@ void KalziumTip::paintEvent(TQPaintEvent* e) void KalziumTip::mouseMoveEvent(TQMouseEvent * e) { - // delegate the mouse move event to the parent (actually the elements table) + // delegate the mouse move event to the tqparent (actually the elements table) // so that this tooltip doesn't stop to be updated e->ignore(); } @@ -128,10 +128,10 @@ void KalziumTip::display() TQString elementname = m_tippedElement->elname(); TQString number = i18n( "Number: %1" ) - .arg( TQString::number(m_tippedElement->number()) ); + .tqarg( TQString::number(m_tippedElement->number()) ); TQString mass = i18n( "Mass: %1" ) - .arg( KalziumUtils::localizedValue(m_tippedElement->mass(), 6) ); + .tqarg( KalziumUtils::localizedValue(m_tippedElement->mass(), 6) ); m_richText = new TQSimpleRichText("

" + elementname + "

" + number + "

" @@ -139,7 +139,7 @@ void KalziumTip::display() m_richText->setWidth(400); - m_maskEffect = isVisible() ? Plain : Dissolve; + m_tqmaskEffect = isVisible() ? Plain : Dissolve; m_dissolveSize = 24; m_dissolveDelta = -1; @@ -167,18 +167,18 @@ void KalziumTip::displayInternal() textRect.addCoords(0,0,2,2); int margin = KDialog::marginHint(); - int height = QMAX(m_icon.height(), textRect.height()) + 2 * margin; + int height = TQMAX(m_icon.height(), textRect.height()) + 2 * margin; int textX = 2 + m_icon.width() + 2 * margin; int width = textX + textRect.width() + margin; int textY = (height - textRect.height()) / 2; - //resize pixmap, mask and widget - m_mask.resize(width, height); + //resize pixmap, tqmask and widget + m_tqmask.resize(width, height); m_pixmap.resize(width, height); resize(width, height); - // create and set transparency mask - switch(m_maskEffect) + // create and set transparency tqmask + switch(m_tqmaskEffect) { case Plain: plainMask(); @@ -191,7 +191,7 @@ void KalziumTip::displayInternal() // draw background TQPainter bufferPainter(&m_pixmap); - bufferPainter.setPen(Qt::black); + bufferPainter.setPen(TQt::black); bufferPainter.setBrush(backgroundColor()); bufferPainter.drawRoundRect(0, 0, width, height, 1600 / width, 1600 / height); @@ -206,32 +206,32 @@ void KalziumTip::displayInternal() } // draw text shadow - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); cg.setColor(TQColorGroup::Text, cg.background().dark(115)); int shadowOffset = TQApplication::reverseLayout() ? -1 : 1; m_richText->draw(&bufferPainter, 5 + textX + shadowOffset, textY + 1, TQRect(), cg); // draw text - cg = colorGroup(); + cg = tqcolorGroup(); m_richText->draw(&bufferPainter, 5 + textX, textY, rect(), cg); } void KalziumTip::dissolveMask() { - TQPainter maskPainter(&m_mask); + TQPainter tqmaskPainter(&m_tqmask); - m_mask.fill(Qt::black); + m_tqmask.fill(TQt::black); - maskPainter.setBrush(Qt::white); - maskPainter.setPen(Qt::white); - maskPainter.drawRoundRect(m_mask.rect(), 1600 / m_mask.rect().width(), - 1600 / m_mask.rect().height()); + tqmaskPainter.setBrush(TQt::white); + tqmaskPainter.setPen(TQt::white); + tqmaskPainter.drawRoundRect(m_tqmask.rect(), 1600 / m_tqmask.rect().width(), + 1600 / m_tqmask.rect().height()); m_dissolveSize += m_dissolveDelta; if (m_dissolveSize > 0) { - maskPainter.setRasterOp(Qt::EraseROP); + tqmaskPainter.setRasterOp(TQt::EraseROP); int x, y, s; const int size = 16; @@ -247,7 +247,7 @@ void KalziumTip::dissolveMask() { s = 0; } - maskPainter.drawEllipse(x - s / 2, y - s / 2, s, s); + tqmaskPainter.drawEllipse(x - s / 2, y - s / 2, s, s); } } } @@ -257,7 +257,7 @@ void KalziumTip::dissolveMask() m_dissolveDelta = 1; } - setMask(m_mask); + setMask(m_tqmask); } void KalziumTip::hide() @@ -269,15 +269,15 @@ void KalziumTip::hide() void KalziumTip::plainMask() { - TQPainter maskPainter(&m_mask); + TQPainter tqmaskPainter(&m_tqmask); - m_mask.fill(Qt::black); + m_tqmask.fill(TQt::black); - maskPainter.setBrush(Qt::white); - maskPainter.setPen(Qt::white); - maskPainter.drawRoundRect(m_mask.rect(), 1600 / m_mask.rect().width(), - 1600 / m_mask.rect().height()); - setMask(m_mask); + tqmaskPainter.setBrush(TQt::white); + tqmaskPainter.setPen(TQt::white); + tqmaskPainter.drawRoundRect(m_tqmask.rect(), 1600 / m_tqmask.rect().width(), + 1600 / m_tqmask.rect().height()); + setMask(m_tqmask); m_frameTimer.stop(); } @@ -293,7 +293,7 @@ void KalziumTip::loadIcon() if ( !iconpath.isEmpty() ) { TQImage img ( iconpath, "JPEG" ); - img = img.smoothScale ( 128, 128, TQImage::ScaleMin ); + img = img.smoothScale ( 128, 128, TQ_ScaleMin ); m_icon.convertFromImage( img ); } diff --git a/kalzium/src/kalziumtip.h b/kalzium/src/kalziumtip.h index 0186529f..79923bd0 100644 --- a/kalzium/src/kalziumtip.h +++ b/kalzium/src/kalziumtip.h @@ -37,14 +37,15 @@ class TQTimer; * @short tooltip for kalzium * @author Martin Pfeiffer */ -class KalziumTip : public QWidget +class KalziumTip : public TQWidget { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: enum MaskEffect { Plain, Dissolve }; - KalziumTip( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + KalziumTip( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 ); void showTip( TQPoint, Element* element, int visibleWidth, int visibleHeight ); //show the tip void hide(); // hide it @@ -54,7 +55,7 @@ class KalziumTip : public QWidget void plainMask(); void dissolveMask(); - // if the mouse pointer hovers us, send the event to the parent + // if the mouse pointer hovers us, send the event to the tqparent // so we are some-what 'mouse transparent' void mouseMoveEvent(TQMouseEvent * e); void displayInternal(); @@ -66,20 +67,20 @@ class KalziumTip : public QWidget void internalUpdate(); private: - TQBitmap m_mask; + TQBitmap m_tqmask; TQPoint m_mousePointer; TQPixmap m_pixmap; TQPixmap m_icon; //icon shown on the tip TQPixmap m_noElemIcon; //icon for element wich have no image - MaskEffect m_maskEffect; //inidicates to show mask effect or plain + MaskEffect m_tqmaskEffect; //inidicates to show tqmask effect or plain TQSimpleRichText* m_richText; int m_dissolveSize; int m_dissolveDelta; TQTimer m_frameTimer; //timer for the dissolve effect - bool m_dirty; //indicates repainting the tooltip internal + bool m_dirty; //indicates tqrepainting the tooltip internal const Element* m_tippedElement; //the element the tip is about }; diff --git a/kalzium/src/kalziumutils.cpp b/kalzium/src/kalziumutils.cpp index 1522e495..f7ed9d09 100644 --- a/kalzium/src/kalziumutils.cpp +++ b/kalzium/src/kalziumutils.cpp @@ -35,10 +35,10 @@ int KalziumUtils::maxSize( const TQString& string, const TQRect& rect, TQFont fo { font.setPointSize( size ); p->setFont( font ); - r = p->boundingRect( TQRect(), Qt::AlignAuto, string ); + r = p->boundingRect( TQRect(), TQt::AlignAuto, string ); r.moveBy( rect.left(), rect.top() ); - if ( rect.contains( r ) ) + if ( rect.tqcontains( r ) ) goodSizeFound = true; else size--; @@ -50,12 +50,12 @@ int KalziumUtils::maxSize( const TQString& string, const TQRect& rect, TQFont fo int KalziumUtils::StringHeight( const TQString& string, const TQFont& font, TQPainter* p ) { - return p->boundingRect( TQRect(), Qt::AlignAuto, string ).height(); + return p->boundingRect( TQRect(), TQt::AlignAuto, string ).height(); } int KalziumUtils::StringWidth( const TQString& string, const TQFont& font, TQPainter* p ) { - return p->boundingRect( TQRect(), Qt::AlignAuto, string ).width(); + return p->boundingRect( TQRect(), TQt::AlignAuto, string ).width(); } double KalziumUtils::strippedValue( double num ) @@ -69,7 +69,7 @@ double KalziumUtils::strippedValue( double num ) power *= 10; num = num / power * 10000; - num = qRound( num ); + num = tqRound( num ); return num * power / 10000; } diff --git a/kalzium/src/molcalcwidget.cpp b/kalzium/src/molcalcwidget.cpp index 60eb5108..0bcc4f80 100644 --- a/kalzium/src/molcalcwidget.cpp +++ b/kalzium/src/molcalcwidget.cpp @@ -41,8 +41,8 @@ #include -MolcalcWidget::MolcalcWidget( TQWidget *parent, const char *name ) - : MolcalcWidgetBase( parent, name ) +MolcalcWidget::MolcalcWidget( TQWidget *tqparent, const char *name ) + : MolcalcWidgetBase( tqparent, name ) { clear(); } @@ -82,16 +82,16 @@ void MolcalcWidget::updateUI() for ( ; it != itEnd; ++it ) { // Update the resultLabel str += i18n( "For example: \"1 Carbon\" or \"3 Oxygen\"", "%1 %2\n" ) - .arg( (*it)->count() ) - .arg( (*it)->element()->elname() ); + .tqarg( (*it)->count() ) + .tqarg( (*it)->element()->elname() ); complexString += i18n( "For example: 1 Seaborgium. Cumulative Mass: 263.119 u (39.25%)", "%1 %2. Cumulative Mass: %3 u (%4%)\n" ) - .arg( (*it)->count() ) - .arg( (*it)->element()->elname() ) - .arg( (*it)->count() * (*it)->element()->mass() ) - .arg( KalziumUtils::strippedValue( (( (*it)->count() * (*it)->element()->mass() ) + .tqarg( (*it)->count() ) + .tqarg( (*it)->element()->elname() ) + .tqarg( (*it)->count() * (*it)->element()->mass() ) + .tqarg( KalziumUtils::strippedValue( (( (*it)->count() * (*it)->element()->mass() ) / m_mass ) * 100 ) ); } resultLabel->setText( str ); @@ -100,7 +100,7 @@ void MolcalcWidget::updateUI() resultComposition->setText( compositionString(m_elementMap) ); // The mass - resultMass->setText( i18n( "Molecular mass: %1 u" ).arg( m_mass ) ); + resultMass->setText( i18n( "Molecular mass: %1 u" ).tqarg( m_mass ) ); TQToolTip::add( resultMass, complexString ); TQToolTip::add( resultComposition, complexString ); @@ -126,8 +126,8 @@ TQString MolcalcWidget::compositionString( ElementCountMap &_map ) ElementCountMap::Iterator itEnd = _map.end(); for (; it != itEnd; ++it) { str += i18n( "%1%2 " ) - .arg( (*it)->element()->symbol() ) - .arg( (*it)->count() ); + .tqarg( (*it)->element()->symbol() ) + .tqarg( (*it)->count() ); } return str; diff --git a/kalzium/src/molcalcwidget.h b/kalzium/src/molcalcwidget.h index c86d41d3..27cb0269 100644 --- a/kalzium/src/molcalcwidget.h +++ b/kalzium/src/molcalcwidget.h @@ -41,13 +41,14 @@ class MoleculeParser; class MolcalcWidget : public MolcalcWidgetBase { Q_OBJECT + TQ_OBJECT public: /** * Constructor - * @param parent parent widget + * @param tqparent tqparent widget * @param name name of this widget */ - MolcalcWidget( TQWidget *parent = 0, const char *name = 0 ); + MolcalcWidget( TQWidget *tqparent = 0, const char *name = 0 ); protected slots: void slotCalcButtonClicked(); diff --git a/kalzium/src/molcalcwidgetbase.ui b/kalzium/src/molcalcwidgetbase.ui index a330b773..ab3f9f80 100644 --- a/kalzium/src/molcalcwidgetbase.ui +++ b/kalzium/src/molcalcwidgetbase.ui @@ -1,10 +1,10 @@ MolcalcWidgetBase - + MolcalcWidgetBase - + 0 0 @@ -22,7 +22,7 @@ 6 - + @@ -56,7 +56,7 @@ Horizontal - + resultComposition @@ -69,7 +69,7 @@ - + AlignCenter @@ -83,14 +83,14 @@ MinimumExpanding - + 20 10 - + resultLabel @@ -98,7 +98,7 @@ - + resultMass @@ -124,10 +124,10 @@ slotCalcButtonClicked() - + slotCalcButtonClicked() - - + + klineedit.h kpushbutton.h diff --git a/kalzium/src/moleculeparser.cpp b/kalzium/src/moleculeparser.cpp index 6780e65e..b3d19120 100644 --- a/kalzium/src/moleculeparser.cpp +++ b/kalzium/src/moleculeparser.cpp @@ -172,7 +172,7 @@ MoleculeParser::parseSubmolecule(double *_resultMass, // Parse a term within the molecule, i.e. a single atom or a -// submolecule within parenthesis followed by an optional number. +// submolecule within tqparenthesis followed by an optional number. // Examples: Bk, Mn2, (COOH)2 // // Return true if correct, otherwise return false. diff --git a/kalzium/src/orbitswidget.cpp b/kalzium/src/orbitswidget.cpp index 06824c0f..35e74bf7 100644 --- a/kalzium/src/orbitswidget.cpp +++ b/kalzium/src/orbitswidget.cpp @@ -24,7 +24,7 @@ static TQStringList hulllist; -OrbitsWidget::OrbitsWidget( TQWidget *parent, const char *name) : TQWidget( parent, name ) +OrbitsWidget::OrbitsWidget( TQWidget *tqparent, const char *name) : TQWidget( tqparent, name ) { if ( hulllist.count() == 0 ) { @@ -162,20 +162,20 @@ void OrbitsWidget::getNumberOfOrbits() int cut = 0; bool cont = true; - if ( !o.contains( rxb ) ) //only true for H and He + if ( !o.tqcontains( rxb ) ) //only true for H and He numOfElectrons.append( o.toInt() ); else //every other element { while ( cont ) { - pos = o.find( rxb ); + pos = o.tqfind( rxb ); cut = o.length()-pos-1; numOfElectrons.append(o.left( pos ).toInt()); o = o.right( cut ); num++; - if ( !o.contains( rxb ) ) + if ( !o.tqcontains( rxb ) ) { numOfElectrons.append( o.toInt() ); cont = false; diff --git a/kalzium/src/orbitswidget.h b/kalzium/src/orbitswidget.h index cd7279bf..14ab4752 100644 --- a/kalzium/src/orbitswidget.h +++ b/kalzium/src/orbitswidget.h @@ -26,12 +26,13 @@ * @short the widget which displays the Bohr-orbit of the element * @author Carsten Niehaus */ -class OrbitsWidget : public QWidget +class OrbitsWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - OrbitsWidget( TQWidget *parent=0 , const char *name =0 ); + OrbitsWidget( TQWidget *tqparent=0 , const char *name =0 ); void setElementNumber( const int num ); diff --git a/kalzium/src/parser.cpp b/kalzium/src/parser.cpp index d678885f..9edd9f1f 100644 --- a/kalzium/src/parser.cpp +++ b/kalzium/src/parser.cpp @@ -21,7 +21,7 @@ Parser::Parser() { - start(TQString::null); + start(TQString()); } @@ -48,7 +48,7 @@ Parser::start(const TQString& _str) } else { m_index = 0; - m_nextChar = m_str.at(0).latin1(); + m_nextChar = m_str.tqat(0).latin1(); getNextToken(); } } @@ -148,7 +148,7 @@ Parser::getNextChar() m_nextChar = -1; } else - m_nextChar = m_str.at(++m_index).latin1(); + m_nextChar = m_str.tqat(++m_index).latin1(); // Take care of null-terminated strings. if (m_nextChar == 0) { diff --git a/kalzium/src/periodictableview.cpp b/kalzium/src/periodictableview.cpp index a09dcf34..0e810aff 100644 --- a/kalzium/src/periodictableview.cpp +++ b/kalzium/src/periodictableview.cpp @@ -41,8 +41,8 @@ #include #include -PerodicTableView::PerodicTableView(TQWidget *parent, const char *name) - : TQWidget(parent, name), m_kalziumTip(0), table(0), table2(0) +PerodicTableView::PerodicTableView(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name), m_kalziumTip(0), table(0), table2(0) { d = KalziumDataObject::instance(); @@ -171,8 +171,8 @@ void PerodicTableView::slotToolTip( int number ) m_tooltipElementNumber = number; TQWidget *p = 0; - if ( dynamic_cast( parent() ) ) - p = static_cast( parent() ); + if ( dynamic_cast( tqparent() ) ) + p = TQT_TQWIDGET( tqparent() ); if( p ) m_kalziumTip->showTip( mapFromGlobal(TQCursor::pos()), @@ -328,7 +328,7 @@ void PerodicTableView::resizeEvent( TQResizeEvent * /*e*/ ) table->resize( width(), height() ); table2->resize( width(), height() ); // XXX: I know it isn't the best way, but otherwise the table won't be redrawn - // on repaint... Feel *free* to remove these two lines if you foind a better + // on tqrepaint... Feel *free* to remove these two lines if you foind a better // solution... doFullDraw = true; update(); @@ -417,14 +417,14 @@ void PerodicTableView::paintCurrentSelection() p.begin(table); TQPen pen; - pen.setStyle( DotLine ); + pen.setStyle( Qt::DotLine ); pen.setWidth( 4 ); - pen.setColor( Qt::blue ); + pen.setColor( TQt::blue ); p.setPen( pen ); p.drawEllipse( x-10,y-10,ELEMENTSIZE+20,ELEMENTSIZE+20 ); pen.setWidth( 3 ); - pen.setColor( Qt::red ); + pen.setColor( TQt::red ); p.setPen( pen ); p.drawEllipse( x-5,y-5,ELEMENTSIZE+10,ELEMENTSIZE+10 ); @@ -491,12 +491,12 @@ void PerodicTableView::drawLegendToolTip( TQPainter* p ) bRect.moveBy( 15, 0 ); } - p->setBrush(Qt::SolidPattern); + p->setBrush(TQt::SolidPattern); p->setBrush( TQColor( 255, 255, 220 ) ); p->drawRect( bRectExt ); - p->setBrush( Qt::black ); - p->setBrush(Qt::NoBrush); + p->setBrush( TQt::black ); + p->setBrush(TQt::NoBrush); p->drawText( bRect, AlignLeft|AlignTop, text ); } @@ -582,9 +582,9 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect(x1, fieldheight*3, square_w, square_h, c_liquid ); p->fillRect(x1, fieldheight*4, square_w, square_h, c_vapor ); - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Solid") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Liquid") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Vaporous") ); + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Solid") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Liquid") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Vaporous") ); return; } switch ( m_currentScheme ){ @@ -601,14 +601,14 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect( x2, fieldheight*4, square_w, square_h, color_7); p->fillRect( x2, fieldheight*5, square_w, square_h, color_8 ); - p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 1") ); - p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 2")); - p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 3")); - p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 4")); - p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 5")); - p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 6")); - p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 7")); - p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 8")); + p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 1") ); + p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 2")); + p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 3")); + p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 4")); + p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 5")); + p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 6")); + p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 7")); + p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 8")); break; case PerodicTableView::BLOCK: p->fillRect(x1, fieldheight*2, square_w, square_h, color_s ); @@ -616,10 +616,10 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect(x1, fieldheight*4, square_w, square_h, color_d ); p->fillRect(x1, fieldheight*5, square_w, square_h, color_f ); - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("s-Block") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("p-Block") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("d-Block") ); - p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("f-Block") ); + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("s-Block") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("p-Block") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("d-Block") ); + p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("f-Block") ); break; case PerodicTableView::ACIDIC: p->fillRect(x1, fieldheight*2, square_w, square_h, color_ba ); @@ -627,10 +627,10 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect(x1, fieldheight*4, square_w, square_h, color_ac ); p->fillRect(x1, fieldheight*5, square_w, square_h, color_amp ); - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Basic") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Neutral") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Acidic") ); - p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("both acidic and basic behaviour","Amphoteric") ); + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Basic") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Neutral") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Acidic") ); + p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("both acidic and basic behaviour","Amphoteric") ); break; case PerodicTableView::FAMILY: p->fillRect( x1, fieldheight*2, square_w, square_h, c_alkaline ); @@ -643,28 +643,28 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect( x2, fieldheight*5, square_w, square_h, c_noble_gas ); p->fillRect( x1, fieldheight*6, square_w, square_h, c_metalloid ); - p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Alkaline") ); - p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Rare Earth")); - p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Non-Metals")); - p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Alkalie-Metals")); - p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Other Metal")); - p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Halogene")); - p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Transition Metal")); - p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Noble Gas")); - p->drawText( x1 + textOffset , fieldheight*6, fieldsize, fieldheight, Qt::AlignLeft, i18n("Metalloid")); + p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Alkaline") ); + p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Rare Earth")); + p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Non-Metals")); + p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Alkalie-Metals")); + p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Other Metal")); + p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Halogene")); + p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Transition Metal")); + p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Noble Gas")); + p->drawText( x1 + textOffset , fieldheight*6, fieldsize, fieldheight, TQt::AlignLeft, i18n("Metalloid")); break; case PerodicTableView::CRYSTAL: - p->fillRect(x1, fieldheight*2, square_w, square_h, Qt::cyan ); - p->fillRect(x1, fieldheight*3, square_w, square_h, Qt::red ); - p->fillRect(x1, fieldheight*4, square_w, square_h, Qt::yellow ); - p->fillRect(x1, fieldheight*5, square_w, square_h, Qt::green ); - p->fillRect(x1, fieldheight*6, square_w, square_h, Qt::white ); - - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Own") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("bcc, body centered cubic") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("hdp, hexagonal") ); - p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("ccp, cubic close packed") ); - p->drawText(x1 + textOffset, fieldheight*6, fieldsize, fieldheight, Qt::AlignLeft, i18n("Unknown") ); + p->fillRect(x1, fieldheight*2, square_w, square_h, TQt::cyan ); + p->fillRect(x1, fieldheight*3, square_w, square_h, TQt::red ); + p->fillRect(x1, fieldheight*4, square_w, square_h, TQt::yellow ); + p->fillRect(x1, fieldheight*5, square_w, square_h, TQt::green ); + p->fillRect(x1, fieldheight*6, square_w, square_h, TQt::white ); + + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Own") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("bcc, body centered cubic") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("hdp, hexagonal") ); + p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("ccp, cubic close packed") ); + p->drawText(x1 + textOffset, fieldheight*6, fieldsize, fieldheight, TQt::AlignLeft, i18n("Unknown") ); break; } } @@ -679,19 +679,19 @@ void PerodicTableView::drawNumeration( TQPainter* p ) case PerodicTableView::CAS: for(int i = 0; i < 18 ; ++i ) { - p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, Qt::AlignCenter, TQString::number(i+1)); + p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, TQt::AlignCenter, TQString::number(i+1)); } break; case PerodicTableView::IUPAC: for(int i = 0; i < 18 ; ++i ) { - p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, Qt::AlignCenter, m_IUPAClist[i]); + p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, TQt::AlignCenter, m_IUPAClist[i]); } break; case PerodicTableView::IUPACOLD: for(int i = 0; i < 18 ; ++i ) { - p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, Qt::AlignCenter, m_IUPACOLDlist[i]); + p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, TQt::AlignCenter, m_IUPACOLDlist[i]); } break; } @@ -741,7 +741,7 @@ void PerodicTableView::mouseMoveEvent( TQMouseEvent * /*mouse*/ ) //JH: only update() if we were showing a tooltip if ( m_tooltipElementNumber || m_showLegendTooltip ) { - //this invalidates the number. If the mouse + //this tqinvalidates the number. If the mouse //is moved, the number is invalid. m_tooltipElementNumber = 0; m_showLegendTooltip = false; @@ -977,7 +977,7 @@ void PerodicTableView::calculateGradient( TQPainter *p ) void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double min, const double max ) { - TQString title = TQString::null; + TQString title = TQString(); const double var = max-min; EList::ConstIterator it = d->ElementList.begin(); @@ -1103,7 +1103,7 @@ void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double // Create the gradient image. TQSize s( ELEMENTSIZE*7+20, 20 ); - TQImage img = KImageEffect::gradient ( s, Qt::white, Qt::red, + TQImage img = KImageEffect::gradient ( s, TQt::white, TQt::red, KImageEffect::HorizontalGradient ); TQPixmap pm( img ); @@ -1122,7 +1122,7 @@ void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double font.setPointSize(maxSize); p->setFont(font); - p->drawText( x+5, y+50, ELEMENTSIZE*10,20, Qt::AlignCenter, title ); + p->drawText( x+5, y+50, ELEMENTSIZE*10,20, TQt::AlignCenter, title ); p->drawPixmap( x+50, y+80, pm ); if ( m_gradientType == Element::EA ) @@ -1130,13 +1130,13 @@ void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double // FIXME: In the lines below, "30" is the max allowed text // height. This should be calculated from the font // metrics, not hard coded. - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignRight, TQString::number( min ) ); - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignLeft, TQString::number( max ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignRight, TQString::number( min ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignLeft, TQString::number( max ) ); } else { - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignRight, TQString::number( max ) ); - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignLeft, TQString::number( min ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignRight, TQString::number( max ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignLeft, TQString::number( min ) ); } } @@ -1178,13 +1178,13 @@ void PerodicTableView::drawGradientButton( TQPainter *p, Element* e, double coef e->drawGradient( p, v, c ); } else - e->drawGradient( p, i18n("It means: Not Available. Translators: keep it as short as you can!", "N/A"), Qt::lightGray ); + e->drawGradient( p, i18n("It means: Not Available. Translators: keep it as short as you can!", "N/A"), TQt::lightGray ); } TQColor PerodicTableView::calculateColor( const double coeff ) { - const TQColor color2 = Qt::white; - const TQColor color1 = Qt::red; + const TQColor color2 = TQt::white; + const TQColor color1 = TQt::red; int red = (int)( (color1.red() - color2.red()) * coeff + color2.red() ); int green = (int)( (color1.green() - color2.green()) * coeff + color2.green() ); @@ -1347,15 +1347,15 @@ void PerodicTableView::setLook( PerodicTableView::SCHEMETYPE type, int which ) { structure = ( *it )->crystalstructure(); if ( structure == "own") - (*it)->setElementColor( Qt::cyan ); + (*it)->setElementColor( TQt::cyan ); else if ( structure == "bcc" ) - (*it)->setElementColor( Qt::red ); + (*it)->setElementColor( TQt::red ); else if ( structure == "hdp" ) - (*it)->setElementColor( Qt::yellow ); + (*it)->setElementColor( TQt::yellow ); else if ( structure == "ccp" ) - (*it)->setElementColor( Qt::green ); + (*it)->setElementColor( TQt::green ); else - (*it)->setElementColor( Qt::white ); + (*it)->setElementColor( TQt::white ); ++it; } setGradient( false ); diff --git a/kalzium/src/periodictableview.h b/kalzium/src/periodictableview.h index 6f373555..8115ebe2 100644 --- a/kalzium/src/periodictableview.h +++ b/kalzium/src/periodictableview.h @@ -38,17 +38,18 @@ class KalziumTip; * @short basic class for the specific PerodicTableViews * @author Carsten Niehaus */ -class PerodicTableView : public QWidget +class PerodicTableView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructor - * @param parent parent widget + * @param tqparent tqparent widget * @param name name of this widget */ - PerodicTableView( TQWidget *parent = 0, const char *name = 0); + PerodicTableView( TQWidget *tqparent = 0, const char *name = 0); ~PerodicTableView(); enum SCHEMETYPE diff --git a/kalzium/src/plotsetupwidget.ui b/kalzium/src/plotsetupwidget.ui index a395541d..f3de4fc9 100644 --- a/kalzium/src/plotsetupwidget.ui +++ b/kalzium/src/plotsetupwidget.ui @@ -1,10 +1,10 @@ PlotSetupWidget - + PlotSetupWidget - + 0 0 @@ -16,7 +16,7 @@ unnamed - + textLabel3 @@ -24,15 +24,15 @@ First element: - + - layout4 + tqlayout4 unnamed - + textLabel1_2 @@ -40,7 +40,7 @@ Average value: - + aValue @@ -67,15 +67,15 @@ Define the last element whose value should be plotted - + - layout2 + tqlayout2 unnamed - + textLabel3_2 @@ -83,7 +83,7 @@ Minimum value: - + minValue @@ -93,7 +93,7 @@ - + showNames @@ -104,7 +104,7 @@ Define whether the names of the plotted element should be displayed - + textLabel4 @@ -112,15 +112,15 @@ Last element: - + - layout3 + tqlayout3 unnamed - + textLabel2 @@ -128,7 +128,7 @@ Maximum value: - + maxValue @@ -138,7 +138,7 @@ - + connectPoints @@ -176,14 +176,14 @@ Expanding - + 20 60 - + groupBox1 @@ -248,7 +248,7 @@ - + knuminput.h kcombobox.h diff --git a/kalzium/src/plotwidget.cpp b/kalzium/src/plotwidget.cpp index 2619b504..6a5a9156 100644 --- a/kalzium/src/plotwidget.cpp +++ b/kalzium/src/plotwidget.cpp @@ -25,9 +25,9 @@ PlotWidget::PlotWidget( double x1, double x2, double y1, double y2, - TQWidget *parent, + TQWidget *tqparent, const char* name) - : KPlotWidget( x1, x2, y1, y2, parent, name ) + : KPlotWidget( x1, x2, y1, y2, tqparent, name ) { m_connectPoints = false; } @@ -63,7 +63,7 @@ void PlotWidget::drawObjects( TQPainter *p ) old.setX( q.x() ); old.setY( q.y() ); } - p->setBrush( Qt::NoBrush ); + p->setBrush( TQt::NoBrush ); } } diff --git a/kalzium/src/plotwidget.h b/kalzium/src/plotwidget.h index 44591f39..1c5ed5de 100644 --- a/kalzium/src/plotwidget.h +++ b/kalzium/src/plotwidget.h @@ -24,9 +24,10 @@ class PlotWidget : public KPlotWidget { Q_OBJECT + TQ_OBJECT public: - PlotWidget( double x1 = 0.0, double x2 = 0.0, double y1 = 0.0, double y2 = 0.0, TQWidget *parent=0 , const char *name =0 ); + PlotWidget( double x1 = 0.0, double x2 = 0.0, double y1 = 0.0, double y2 = 0.0, TQWidget *tqparent=0 , const char *name =0 ); /** * toggles if the points will be connected with diff --git a/kalzium/src/settings_colors.ui b/kalzium/src/settings_colors.ui index f32360d0..e2d338a1 100644 --- a/kalzium/src/settings_colors.ui +++ b/kalzium/src/settings_colors.ui @@ -1,10 +1,10 @@ setColors - + setColors - + 0 0 @@ -19,11 +19,11 @@ unnamed - + dfgdfg - + tab @@ -34,23 +34,23 @@ unnamed - + - layout32 + tqlayout32 unnamed - + - layout28 + tqlayout28 unnamed - + textLabel13 @@ -68,15 +68,15 @@ - + - layout29 + tqlayout29 unnamed - + textLabel14 @@ -94,15 +94,15 @@ - + - layout30 + tqlayout30 unnamed - + textLabel15 @@ -120,15 +120,15 @@ - + - layout31 + tqlayout31 unnamed - + textLabel16 @@ -150,7 +150,7 @@ - + tab @@ -161,23 +161,23 @@ unnamed - + - layout26 + tqlayout26 unnamed - + - layout23 + tqlayout23 unnamed - + textLabel9 @@ -195,15 +195,15 @@ - + - layout24 + tqlayout24 unnamed - + textLabel10 @@ -221,15 +221,15 @@ - + - layout25 + tqlayout25 unnamed - + textLabel11 @@ -247,15 +247,15 @@ - + - layout26 + tqlayout26 unnamed - + textLabel12 @@ -277,7 +277,7 @@ - + TabPage @@ -288,23 +288,23 @@ unnamed - + - layout22 + tqlayout22 unnamed - + - layout12 + tqlayout12 unnamed - + textLabel2_2_2 @@ -322,15 +322,15 @@ - + - layout19 + tqlayout19 unnamed - + textLabel8 @@ -348,15 +348,15 @@ - + - layout18 + tqlayout18 unnamed - + textLabel7 @@ -374,15 +374,15 @@ - + - layout17 + tqlayout17 unnamed - + textLabel6 @@ -400,15 +400,15 @@ - + - layout16 + tqlayout16 unnamed - + textLabel5_2 @@ -426,15 +426,15 @@ - + - layout15 + tqlayout15 unnamed - + textLabel4_2 @@ -452,15 +452,15 @@ - + - layout14 + tqlayout14 unnamed - + textLabel3_2 @@ -478,15 +478,15 @@ - + - layout13 + tqlayout13 unnamed - + textLabel2_2 @@ -508,7 +508,7 @@ - + TabPage @@ -519,23 +519,23 @@ unnamed - + - layout14 + tqlayout14 unnamed - + - layout13 + tqlayout13 unnamed - + textLabel1 @@ -556,15 +556,15 @@ - + - layout6 + tqlayout6 unnamed - + textLabel2 @@ -582,15 +582,15 @@ - + - layout7 + tqlayout7 unnamed - + textLabel3 @@ -612,7 +612,7 @@ - + TabPage @@ -623,23 +623,23 @@ unnamed - + - layout36 + tqlayout36 unnamed - + - layout12_2 + tqlayout12_2 unnamed - + textLabel2_2_2_2 @@ -657,15 +657,15 @@ - + - layout19_2 + tqlayout19_2 unnamed - + textLabel8_2 @@ -683,15 +683,15 @@ - + - layout18_2 + tqlayout18_2 unnamed - + textLabel7_2 @@ -709,15 +709,15 @@ - + - layout17_2 + tqlayout17_2 unnamed - + textLabel6_2 @@ -735,15 +735,15 @@ - + - layout16_2 + tqlayout16_2 unnamed - + textLabel5_2_2 @@ -761,15 +761,15 @@ - + - layout15_2 + tqlayout15_2 unnamed - + textLabel4_2_2 @@ -787,15 +787,15 @@ - + - layout14_2 + tqlayout14_2 unnamed - + textLabel3_2_2 @@ -813,15 +813,15 @@ - + - layout13_2 + tqlayout13_2 unnamed - + textLabel2_2_3 @@ -839,15 +839,15 @@ - + - layout35 + tqlayout35 unnamed - + textLabel2_2_3_2 @@ -869,7 +869,7 @@ - + TabPage @@ -901,7 +901,7 @@ - + kcolorbutton.h kcolorbutton.h diff --git a/kalzium/src/settings_misc.ui b/kalzium/src/settings_misc.ui index a66693dd..189dc1b9 100644 --- a/kalzium/src/settings_misc.ui +++ b/kalzium/src/settings_misc.ui @@ -1,10 +1,10 @@ setupMisc - + setupMisc - + 0 0 @@ -16,7 +16,7 @@ unnamed - + kcfg_pselook @@ -30,7 +30,7 @@ unnamed - + radioButton10 @@ -38,7 +38,7 @@ Display atomic &mass in the PSE - + radioButton13 @@ -58,7 +58,7 @@ Expanding - + 20 30 @@ -67,5 +67,5 @@ - + diff --git a/kalzium/src/settings_units.ui b/kalzium/src/settings_units.ui index e054021a..4888572f 100644 --- a/kalzium/src/settings_units.ui +++ b/kalzium/src/settings_units.ui @@ -1,10 +1,10 @@ setupUnits - + setupUnits - + 0 0 @@ -16,7 +16,7 @@ unnamed - + kcfg_temperature @@ -30,7 +30,7 @@ unnamed - + radioButton19 @@ -47,7 +47,7 @@ If selected, the temperatures will be displayed in Kelvin. This is then saved in configuration and restored next time you start Kalzium. - + radioButton11_2 @@ -64,7 +64,7 @@ If selected, the temperatures will be displayed in Degrees Fahrenheit. This is then saved in configuration and restored next time you start Kalzium. - + radioButton21 @@ -81,7 +81,7 @@ If selected, the temperatures will be displayed in Degrees Rankine. This is then saved in configuration and restored next time you start Kalzium. - + radioButton22 @@ -98,7 +98,7 @@ If selected, the temperatures will be displayed in Degrees Réaumur. This is then saved in configuration and restored next time you start Kalzium. - + radioButton20 @@ -117,7 +117,7 @@ - + kcfg_energies @@ -131,7 +131,7 @@ unnamed - + radioButton3_2_2_2 @@ -145,7 +145,7 @@ Check this if you prefer the energy unit in kJ/mol (kilojoule per mol). The other choice you have is eV (electronvolt). - + radioButton4_2_2_2 @@ -163,5 +163,5 @@ - + diff --git a/kalzium/src/somwidget.ui b/kalzium/src/somwidget.ui index 83e19209..d39b9a9b 100644 --- a/kalzium/src/somwidget.ui +++ b/kalzium/src/somwidget.ui @@ -1,10 +1,10 @@ SOMWidget - + SOMWidget - + 0 0 @@ -26,14 +26,14 @@ Fixed - + 21 10 - + text @@ -58,22 +58,22 @@ the state of matter Fixed - + 21 10 - + - layout3 + tqlayout3 unnamed - + lbl1 @@ -91,7 +91,7 @@ the state of matter Expanding - + 20 21 @@ -100,15 +100,15 @@ the state of matter - + - layout4 + tqlayout4 unnamed - + temp_slider @@ -141,7 +141,7 @@ the state of matter Fixed - + 5 20 @@ -162,7 +162,7 @@ the state of matter 295 - + lblUnit @@ -178,7 +178,7 @@ the state of matter - + knuminput.h diff --git a/kalzium/src/somwidget_impl.cpp b/kalzium/src/somwidget_impl.cpp index 6e3f4b71..a2b3da77 100644 --- a/kalzium/src/somwidget_impl.cpp +++ b/kalzium/src/somwidget_impl.cpp @@ -30,13 +30,13 @@ #include "prefs.h" #include "tempunit.h" -SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *parent, const char* name ) - : SOMWidget( parent,name ) +SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *tqparent, const char* name ) + : SOMWidget( tqparent,name ) { m_list = KalziumDataObject::instance()->ElementList; - text->setAlignment( text->alignment() | Qt::WordBreak ); - text->setTextFormat( Qt::RichText ); + text->tqsetAlignment( text->tqalignment() | TQt::WordBreak ); + text->setTextFormat( TQt::RichText ); text->setReadOnly( true ); text->setPaletteBackgroundColor( paletteBackgroundColor() ); text->setFrameStyle( TQFrame::NoFrame ); @@ -58,7 +58,7 @@ SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *parent, const char* name ) void SOMWidgetIMPL::reloadUnits() { lblUnit->setText( TempUnit::unitListSymbol( Prefs::temperature() ) ); - QPair range = TempUnit::rangeForUnit( Prefs::temperature() ); + TQPair range = TempUnit::rangeForUnit( Prefs::temperature() ); double newvalue = TempUnit::convert( Number1->value(), m_prevUnit, Prefs::temperature() ); Number1->setRange( range.first, range.second, 0.1, 1 ); @@ -70,7 +70,7 @@ kdDebug() << "min: " << Number1->minValue() << " - max: " << Number1->maxValue() void SOMWidgetIMPL::sliderValueChanged( int temp ) { -// TODO check if in Qt4 the RangeControl emits the signal again +// TODO check if in TQt4 the RangeControl emits the signal again disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( spinValueChanged( double ) ) ); disconnect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), @@ -139,7 +139,7 @@ void SOMWidgetIMPL::setNewTemp( double newtemp ) htmlcode += i18n( "Elements with melting point around this temperature:" ) + "
"; for ( uint i = 0; i < listMeltingPoint.count(); i++ ) { - htmlcode += " · " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).arg( listMeltingPoint[i] ).arg( listMeltingPointValue[i] ) + "
"; + htmlcode += " · " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).tqarg( listMeltingPoint[i] ).tqarg( listMeltingPointValue[i] ) + "
"; } htmlcode += "
"; } @@ -153,7 +153,7 @@ void SOMWidgetIMPL::setNewTemp( double newtemp ) htmlcode += i18n( "Elements with boiling point around this temperature:" ) + "
"; for ( uint i = 0; i < listBoilingPoint.count(); i++ ) { - htmlcode += " · " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).arg( listBoilingPoint[i] ).arg( listBoilingPointValue[i] ) + "
"; + htmlcode += " · " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).tqarg( listBoilingPoint[i] ).tqarg( listBoilingPointValue[i] ) + "
"; } htmlcode += "
"; } diff --git a/kalzium/src/somwidget_impl.h b/kalzium/src/somwidget_impl.h index ab616f54..5d32dbdc 100644 --- a/kalzium/src/somwidget_impl.h +++ b/kalzium/src/somwidget_impl.h @@ -29,13 +29,14 @@ class Element; class SOMWidgetIMPL : public SOMWidget { Q_OBJECT + TQ_OBJECT public: /** - * @param parent The parent of this widget + * @param tqparent The tqparent of this widget * @param name The name of this widget */ - SOMWidgetIMPL( TQWidget *parent = 0, const char* name = 0 ); + SOMWidgetIMPL( TQWidget *tqparent = 0, const char* name = 0 ); public slots: /** diff --git a/kalzium/src/spectrum.cpp b/kalzium/src/spectrum.cpp index dc8abb01..45c62180 100644 --- a/kalzium/src/spectrum.cpp +++ b/kalzium/src/spectrum.cpp @@ -97,7 +97,7 @@ void Spectrum::adjustIntensities() double curInt = ( ( double )( *it ).intensity ); double newInt = max*1000/curInt; - ( *it ).intensity = qRound( newInt ); + ( *it ).intensity = tqRound( newInt ); } } @@ -130,17 +130,17 @@ TQString Spectrum::bandsAsHtml() for (;it!=itEnd;++it) { html += TQString( "

" ) - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + "\n"; } diff --git a/kalzium/src/spectrum.h b/kalzium/src/spectrum.h index 090822a6..4d71837f 100644 --- a/kalzium/src/spectrum.h +++ b/kalzium/src/spectrum.h @@ -143,9 +143,9 @@ class Spectrum TQString bandsAsHtml(); /** - * @return the parent element of this spectrum + * @return the tqparent element of this spectrum */ - Element* parentElement() + Element* tqparentElement() { return m_parentElement; } private: diff --git a/kalzium/src/spectrumview.ui b/kalzium/src/spectrumview.ui index 2787ab66..c7d53dbb 100644 --- a/kalzium/src/spectrumview.ui +++ b/kalzium/src/spectrumview.ui @@ -1,10 +1,10 @@ SpectrumView - + SpectrumView - + 0 0 @@ -36,15 +36,15 @@ This is the spectrum of the element - + - layout2 + tqlayout2 unnamed - + label1 @@ -55,7 +55,7 @@ minimumValue - + minimumValue @@ -75,7 +75,7 @@ This sets the leftmost wavelength of the spectrum - + label2 @@ -86,7 +86,7 @@ maximumValue - + maximumValue @@ -108,9 +108,9 @@ - + - layout4 + tqlayout4 @@ -126,7 +126,7 @@ Expanding - + 211 21 @@ -159,7 +159,7 @@ Expanding - + 21 1 @@ -213,10 +213,10 @@ slotExportAsImage() - + slotExportAsImage() - - + + spectrumwidget.h kpushbutton.h diff --git a/kalzium/src/spectrumviewimpl.cpp b/kalzium/src/spectrumviewimpl.cpp index 89bc36ac..d862e5fd 100644 --- a/kalzium/src/spectrumviewimpl.cpp +++ b/kalzium/src/spectrumviewimpl.cpp @@ -22,10 +22,10 @@ #include "exporter.h" -SpectrumViewImpl::SpectrumViewImpl( TQWidget *parent, const char* name ) - : SpectrumView( parent, name ) +SpectrumViewImpl::SpectrumViewImpl( TQWidget *tqparent, const char* name ) + : SpectrumView( tqparent, name ) { - resize( minimumSizeHint() ); + resize( tqminimumSizeHint() ); // simulating an update m_spectrumWidget->setRightBorder( maximumValue->value() ); exportButton->setGuiItem( KGuiItem( i18n( "&Export Spectrum as Image" ), "fileexport" ) ); @@ -35,7 +35,7 @@ void SpectrumViewImpl::slotExportAsImage() { Exporter* exporter = new Exporter(); TQString fileName = KFileDialog::getSaveFileName( - TQString::null, exporter->supportedImageFormats(), + TQString(), exporter->supportedImageFormats(), this, i18n( "Save Spectrum" ) ); if( !fileName.isEmpty() ) { diff --git a/kalzium/src/spectrumviewimpl.h b/kalzium/src/spectrumviewimpl.h index ed02db85..aea5ad2a 100644 --- a/kalzium/src/spectrumviewimpl.h +++ b/kalzium/src/spectrumviewimpl.h @@ -23,13 +23,14 @@ class SpectrumViewImpl : public SpectrumView { Q_OBJECT + TQ_OBJECT public: /** - * @param parent the parent widget + * @param tqparent the tqparent widget * @param name the name used internally */ - SpectrumViewImpl( TQWidget* parent, const char* name ); + SpectrumViewImpl( TQWidget* tqparent, const char* name ); /** * sets the spectrum to @p spec diff --git a/kalzium/src/spectrumwidget.cpp b/kalzium/src/spectrumwidget.cpp index 54f70972..2431b407 100644 --- a/kalzium/src/spectrumwidget.cpp +++ b/kalzium/src/spectrumwidget.cpp @@ -39,7 +39,7 @@ #include #endif -SpectrumWidget::SpectrumWidget( TQWidget *parent, const char* name ) : TQWidget( parent, name ) +SpectrumWidget::SpectrumWidget( TQWidget *tqparent, const char* name ) : TQWidget( tqparent, name ) { startValue = 0; endValue = 0; @@ -57,7 +57,7 @@ SpectrumWidget::SpectrumWidget( TQWidget *parent, const char* name ) : TQWidget( setType( EmissionSpectrum ); setMinimumSize( 400, 230 ); - setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); + tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); setBackgroundMode( NoBackground ); } @@ -70,8 +70,8 @@ void SpectrumWidget::paintEvent( TQPaintEvent * /*e*/ ) m_pixmap.fill( this, width(), height() ); TQPainter p; - p.begin( &m_pixmap, this ); - p.fillRect( 0, 0, width(), m_realHeight, Qt::black ); + p.tqbegin( &m_pixmap, this ); + p.fillRect( 0, 0, width(), m_realHeight, TQt::black ); paintBands( &p ); @@ -89,7 +89,7 @@ void SpectrumWidget::paintEvent( TQPaintEvent * /*e*/ ) void SpectrumWidget::drawZoomLine( TQPainter* p ) { - p->setPen( Qt::white ); + p->setPen( TQt::white ); p->drawLine( m_LMBPointPress.x(), m_LMBPointPress.y(), m_LMBPointCurrent.x(), m_LMBPointPress.y() ); p->drawLine( m_LMBPointCurrent.x(), m_LMBPointPress.y()+10, m_LMBPointCurrent.x(), m_LMBPointPress.y()-10 ); p->drawLine( m_LMBPointPress.x(), m_LMBPointPress.y()+10, m_LMBPointPress.x(), m_LMBPointPress.y()-10 ); @@ -107,7 +107,7 @@ void SpectrumWidget::paintBands( TQPainter* p ) p->drawLine( x,0,x, m_realHeight ); } - p->setPen( Qt::black ); + p->setPen( TQt::black ); } int i = 0; @@ -131,12 +131,12 @@ void SpectrumWidget::paintBands( TQPainter* p ) p->setPen( linecolor( ( *it ).wavelength ) ); p->drawLine( x,0,x, m_realHeight-1 ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); // p->drawLine( x,m_realHeight,x, m_realHeight ); break; case AbsorptionSpectrum: - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawLine( x,0,x, m_realHeight-1 ); break; } @@ -223,7 +223,7 @@ int SpectrumWidget::Adjust( double color, double factor ) if ( color == 0.0 ) return 0; else - return qRound( IntensityMax * pow( color*factor, Gamma ) ); + return tqRound( IntensityMax * pow( color*factor, Gamma ) ); } void SpectrumWidget::drawTickmarks( TQPainter* p ) @@ -249,8 +249,8 @@ void SpectrumWidget::drawTickmarks( TQPainter* p ) i*d < width()-space ) { pos = ( double ) ( i*d )/width(); - p->fillRect( i*d-space, m_realHeight+12, 2*space, 15, Qt::white ); - p->drawText( i*d-space, m_realHeight+12, 2*space, 15, Qt::AlignCenter, KalziumUtils::localizedValue( KalziumUtils::strippedValue( Wavelength( pos ) ), 6 ) ); + p->fillRect( i*d-space, m_realHeight+12, 2*space, 15, TQt::white ); + p->drawText( i*d-space, m_realHeight+12, 2*space, 15, TQt::AlignCenter, KalziumUtils::localizedValue( KalziumUtils::strippedValue( Wavelength( pos ) ), 6 ) ); } } else {//small tickmarks @@ -320,9 +320,9 @@ void SpectrumWidget::mouseMoveEvent( TQMouseEvent *e ) void SpectrumWidget::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::LeftButton ) + if ( e->button() == Qt::LeftButton ) m_LMBPointPress = e->pos(); - if ( e->button() == TQMouseEvent::RightButton ) + if ( e->button() == Qt::RightButton ) slotZoomOut(); //FIXME //the tooltip is not really working. Better to not have it @@ -376,22 +376,22 @@ void SpectrumWidget::PrepareTooltip( double wavelength ) void SpectrumWidget::drawTooltip( TQPainter *p ) { - p->setPen( Qt::white ); + p->setPen( TQt::white ); TQPoint pt = mapFromGlobal( TQCursor::pos() ); - p->drawText( pt, i18n("Wavelength: %1").arg(m_band.wavelength) ); + p->drawText( pt, i18n("Wavelength: %1").tqarg(m_band.wavelength) ); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("Intensity: %1").arg(m_band.intensity) ); + p->drawText( pt, i18n("Intensity: %1").tqarg(m_band.intensity) ); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("Energy 1, Energy 2: %1, %2").arg(m_band.energy1).arg( m_band.energy2 )); + p->drawText( pt, i18n("Energy 1, Energy 2: %1, %2").tqarg(m_band.energy1).tqarg( m_band.energy2 )); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("Term 1, Term 2: %1, %2").arg(m_band.term1).arg( m_band.term2 )); + p->drawText( pt, i18n("Term 1, Term 2: %1, %2").tqarg(m_band.term1).tqarg( m_band.term2 )); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("J 1, J 2: %1, %2").arg(m_band.J1).arg( m_band.J2 )); + p->drawText( pt, i18n("J 1, J 2: %1, %2").tqarg(m_band.J1).tqarg( m_band.J2 )); } void SpectrumWidget::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::LeftButton ) + if ( e->button() == Qt::LeftButton ) { int left = (int)Wavelength( ( double )m_LMBPointPress.x()/width() ); int right = (int)Wavelength( ( double )e->pos().x()/width() ); @@ -415,12 +415,12 @@ TQPixmap SpectrumWidget::pixmap() TQString text; if( m_type == EmissionSpectrum ) - text = i18n( "Emission spectrum of %1" ).arg( m_spectrum->parentElement()->elname() ); + text = i18n( "Emission spectrum of %1" ).tqarg( m_spectrum->tqparentElement()->elname() ); else - text = i18n( "Absorption spectrum of %1" ).arg( m_spectrum->parentElement()->elname() ); + text = i18n( "Absorption spectrum of %1" ).tqarg( m_spectrum->tqparentElement()->elname() ); TQPainter p( &tmp ); - p.setPen( Qt::black ); + p.setPen( TQt::black ); p.drawText( 30, m_realHeight + 70, text ); return tmp; diff --git a/kalzium/src/spectrumwidget.h b/kalzium/src/spectrumwidget.h index c29e433c..f5c98099 100644 --- a/kalzium/src/spectrumwidget.h +++ b/kalzium/src/spectrumwidget.h @@ -31,12 +31,13 @@ * @author Carsten Niehaus * */ -class SpectrumWidget : public QWidget +class SpectrumWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SpectrumWidget( TQWidget *parent, const char* name = 0 ); + SpectrumWidget( TQWidget *tqparent, const char* name = 0 ); ~SpectrumWidget(){} diff --git a/kalzium/src/tempunit.cpp b/kalzium/src/tempunit.cpp index a4e18ef7..bab2461c 100644 --- a/kalzium/src/tempunit.cpp +++ b/kalzium/src/tempunit.cpp @@ -94,40 +94,40 @@ TQString TempUnit::unitListSymbol( int i ) return l[i]; } -QPair TempUnit::rangeForUnit( TempUnit::Unit u ) +TQPair TempUnit::rangeForUnit( TempUnit::Unit u ) { switch( u ) { case Kelvin: { - return QPair( 0.0, 5000.0 ); + return TQPair( 0.0, 5000.0 ); break; } case Celsius: { - return QPair( -273.16, 4726.84 ); + return TQPair( -273.16, 4726.84 ); break; } case Fahrenheit: { - return QPair( -459.67, 8540.33 ); + return TQPair( -459.67, 8540.33 ); break; } case Rankine: { - return QPair( 0.0, 9000.0 ); + return TQPair( 0.0, 9000.0 ); break; } case Reaumur: { - return QPair( -218.52, 3781.48 ); + return TQPair( -218.52, 3781.48 ); break; } } - return QPair( 0.0, 5000.0 ); + return TQPair( 0.0, 5000.0 ); } -QPair TempUnit::rangeForUnit( int u ) +TQPair TempUnit::rangeForUnit( int u ) { return rangeForUnit( (TempUnit::Unit)u ); } diff --git a/kalzium/src/tempunit.h b/kalzium/src/tempunit.h index 23629bb2..5c3e5e4e 100644 --- a/kalzium/src/tempunit.h +++ b/kalzium/src/tempunit.h @@ -81,12 +81,12 @@ class TempUnit */ static TQString unitListSymbol( int i ); - static QPair rangeForUnit( TempUnit::Unit u ); + static TQPair rangeForUnit( TempUnit::Unit u ); /** * @overload */ - static QPair rangeForUnit( int u ); + static TQPair rangeForUnit( int u ); }; #endif // TEMPUNIT_H diff --git a/kalzium/src/timewidget.ui b/kalzium/src/timewidget.ui index fcb46391..7466c21c 100644 --- a/kalzium/src/timewidget.ui +++ b/kalzium/src/timewidget.ui @@ -1,10 +1,10 @@ TimeWidget - + TimeWidget - + 0 0 @@ -26,22 +26,22 @@ Fixed - + 21 20 - + - layout3 + tqlayout3 unnamed - + lbl1_2 @@ -67,7 +67,7 @@ Expanding - + 20 21 @@ -76,15 +76,15 @@ - + - layout5 + tqlayout5 unnamed - + time_slider @@ -117,7 +117,7 @@ Fixed - + 5 21 @@ -150,14 +150,14 @@ Fixed - + 20 16 - + text @@ -194,7 +194,7 @@ of the elements setValue(int) - + knuminput.h diff --git a/kalzium/src/timewidget_impl.cpp b/kalzium/src/timewidget_impl.cpp index a5f186bc..576ab17d 100644 --- a/kalzium/src/timewidget_impl.cpp +++ b/kalzium/src/timewidget_impl.cpp @@ -20,11 +20,11 @@ #include -TimeWidgetIMPL::TimeWidgetIMPL( TQWidget *parent, const char* name ) - : TimeWidget( parent, name ) +TimeWidgetIMPL::TimeWidgetIMPL( TQWidget *tqparent, const char* name ) + : TimeWidget( tqparent, name ) { - text->setAlignment( text->alignment() | Qt::WordBreak ); - text->setTextFormat( Qt::RichText ); + text->tqsetAlignment( text->tqalignment() | TQt::WordBreak ); + text->setTextFormat( TQt::RichText ); text->setReadOnly( true ); text->setPaletteBackgroundColor( paletteBackgroundColor() ); text->setFrameStyle( TQFrame::NoFrame ); diff --git a/kalzium/src/timewidget_impl.h b/kalzium/src/timewidget_impl.h index 65030da1..b728b435 100644 --- a/kalzium/src/timewidget_impl.h +++ b/kalzium/src/timewidget_impl.h @@ -22,13 +22,14 @@ class TimeWidgetIMPL : public TimeWidget { Q_OBJECT + TQ_OBJECT public: /** - * @param parent The parent of this widget + * @param tqparent The tqparent of this widget * @param name The name of this widget */ - TimeWidgetIMPL( TQWidget *parent = 0, const char* name = 0 ); + TimeWidgetIMPL( TQWidget *tqparent = 0, const char* name = 0 ); public slots: /** diff --git a/kanagram/Doxyfile b/kanagram/Doxyfile index 27b7cf29..5ffa50d0 100644 --- a/kanagram/Doxyfile +++ b/kanagram/Doxyfile @@ -17,7 +17,7 @@ ABBREVIATE_BRIEF = "The $name class" \ is \ provides \ specifies \ - contains \ + tqcontains \ represents \ a \ an \ @@ -124,7 +124,7 @@ FILE_PATTERNS = *.c \ *.tlh \ *.diff \ *.patch \ - *.moc \ + *.tqmoc \ *.xpm \ *.dox RECURSIVE = yes diff --git a/kanagram/data/fruits.kvtml b/kanagram/data/fruits.kvtml index 60a8881a..22c838a8 100644 --- a/kanagram/data/fruits.kvtml +++ b/kanagram/data/fruits.kvtml @@ -93,7 +93,7 @@ Valid xml means: grapefruit - kiwi + kiwi lemon @@ -117,7 +117,7 @@ Valid xml means: peach - pear + pear pineapple diff --git a/kanagram/data/objects.kvtml b/kanagram/data/objects.kvtml index d9e52eb1..f1573de3 100644 --- a/kanagram/data/objects.kvtml +++ b/kanagram/data/objects.kvtml @@ -78,7 +78,7 @@ Valid xml means: cooker - fireplace + fitqreplace table diff --git a/kanagram/data/space.kvtml b/kanagram/data/space.kvtml index 97f6b813..8c86acf9 100644 --- a/kanagram/data/space.kvtml +++ b/kanagram/data/space.kvtml @@ -78,7 +78,7 @@ Valid xml means: comet - constellation + constellation cosmonaut diff --git a/kanagram/data/vegetables.kvtml b/kanagram/data/vegetables.kvtml index b3356f3f..4c2bdb9f 100644 --- a/kanagram/data/vegetables.kvtml +++ b/kanagram/data/vegetables.kvtml @@ -84,7 +84,7 @@ Valid xml means: chickpeas - cucumber + cucumber garlic diff --git a/kanagram/src/fontutils.cpp b/kanagram/src/fontutils.cpp index 14fff456..5b3dfdca 100644 --- a/kanagram/src/fontutils.cpp +++ b/kanagram/src/fontutils.cpp @@ -18,7 +18,7 @@ int fontUtils::fontSize(TQPainter &p, const TQString &s1, int w, int h) f.setPointSize(28); p.setFont(f); - aux1 = p.boundingRect(TQRect(), Qt::AlignAuto, s1); + aux1 = p.boundingRect(TQRect(), TQt::AlignAuto, s1); - return QMIN(w * 28 / aux1.width(), h * 28 / aux1.height()); + return TQMIN(w * 28 / aux1.width(), h * 28 / aux1.height()); } diff --git a/kanagram/src/kanagram.cpp b/kanagram/src/kanagram.cpp index 42cb90f9..df845ac6 100644 --- a/kanagram/src/kanagram.cpp +++ b/kanagram/src/kanagram.cpp @@ -180,8 +180,8 @@ void Kanagram::setupRects() //set appropriate yOffset for different fonts if(m_useStandardFonts) yOffset = 6; TQRect r = innerRect(m_blackboardRect, 6, yOffset); - m_hintRect = tmpp.boundingRect(r, Qt::AlignBottom|Qt::AlignLeft, i18n(m_textHint)); - m_revealRect = tmpp.boundingRect(r, Qt::AlignBottom|Qt::AlignRight, i18n(m_textRevealWord)); + m_hintRect = tmpp.boundingRect(r, TQt::AlignBottom|TQt::AlignLeft, i18n(m_textHint)); + m_revealRect = tmpp.boundingRect(r, TQt::AlignBottom|TQt::AlignRight, i18n(m_textRevealWord)); tmpp.end(); } @@ -210,14 +210,14 @@ void Kanagram::paintEvent(TQPaintEvent *) p.drawPixmap(520, 362, *m_quit); //draw main Anagram - drawTextNew(p, m_game->getAnagram(), Qt::AlignCenter, 10, 10, m_blackboardRect, true, 28); + drawTextNew(p, m_game->getAnagram(), TQt::AlignCenter, 10, 10, m_blackboardRect, true, 28); int yOffset = 0; //set appropriate yOffset for different fonts if(m_useStandardFonts) yOffset = 6; //draw text using appropriate yOffset - drawTextNew(p, i18n(m_textRevealWord), Qt::AlignBottom | Qt::AlignRight, 6, yOffset, m_blackboardRect, m_overReveal, 14); - drawTextNew(p, i18n(m_textHint), Qt::AlignBottom | Qt::AlignLeft, 6, yOffset, m_blackboardRect, m_overHint, 14); + drawTextNew(p, i18n(m_textRevealWord), TQt::AlignBottom | TQt::AlignRight, 6, yOffset, m_blackboardRect, m_overReveal, 14); + drawTextNew(p, i18n(m_textHint), TQt::AlignBottom | TQt::AlignLeft, 6, yOffset, m_blackboardRect, m_overHint, 14); //draw vocab switcher drawSwitcher(p, 9, 8); @@ -225,7 +225,7 @@ void Kanagram::paintEvent(TQPaintEvent *) p.setPen(TQPen(black, 3)); //Draw the border of the input box - TQRect borderRect = m_inputBox->geometry(); + TQRect borderRect = m_inputBox->tqgeometry(); borderRect.setLeft(borderRect.left() - 2); borderRect.setTop(borderRect.top() - 2); borderRect.setWidth(borderRect.width() + 2 * 1); @@ -340,7 +340,7 @@ void Kanagram::drawSwitcher(TQPainter &p, const int xMargin, const int yMargin) r.normalize(); r.moveBy(- padding - (m_overSwitcher ? m_arrowOver : m_arrow )->width(), yMargin); r.setHeight( (m_overSwitcher ? m_arrowOver : m_arrow )->height()); - m_switcherRect = p.boundingRect(r, Qt::AlignVCenter|Qt::AlignRight, text); + m_switcherRect = p.boundingRect(r, TQt::AlignVCenter|TQt::AlignRight, text); p.setFont(font); if (m_overSwitcher) { @@ -353,7 +353,7 @@ void Kanagram::drawSwitcher(TQPainter &p, const int xMargin, const int yMargin) p.drawPixmap(m_switcherRect.right() + padding, m_switcherRect.top(), *m_arrow); } m_switcherRect.moveBy(0, -2); - p.drawText(m_switcherRect, Qt::AlignVCenter|Qt::AlignRight, text); + p.drawText(m_switcherRect, TQt::AlignVCenter|TQt::AlignRight, text); } TQRect Kanagram::innerRect(const TQRect &rect, const int xMargin, const int yMargin) @@ -377,7 +377,7 @@ TQRect Kanagram::innerRect(const TQRect &rect, const int xMargin, const int yMar void Kanagram::mousePressEvent(TQMouseEvent *e) { - if (m_nextRect.contains(e->pos())) + if (m_nextRect.tqcontains(e->pos())) { hideHint(); m_game->nextAnagram(); @@ -386,53 +386,53 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_configRect.contains(e->pos())) + if(m_configRect.tqcontains(e->pos())) { showSettings(); } - if(m_quitRect.contains(e->pos())) + if(m_quitRect.tqcontains(e->pos())) { kapp->quit(); } - if(m_revealRect.contains(e->pos())) + if(m_revealRect.tqcontains(e->pos())) { m_game->restoreWord(); update(); } - if(m_logoRect.contains(e->pos())) + if(m_logoRect.tqcontains(e->pos())) { m_helpMenu->aboutApplication(); } if(!m_showHint && m_overHelp) { - if(m_handbookRect.contains(e->pos())) + if(m_handbookRect.tqcontains(e->pos())) { m_helpMenu->appHelpActivated(); } - if(m_aboutKDERect.contains(e->pos())) + if(m_aboutKDERect.tqcontains(e->pos())) { m_helpMenu->aboutKDE(); } - if(m_aboutAppRect.contains(e->pos())) + if(m_aboutAppRect.tqcontains(e->pos())) { m_helpMenu->aboutApplication(); } } - if(m_hintBoxRect.contains(e->pos())) + if(m_hintBoxRect.tqcontains(e->pos())) { hideHint(); } - if(m_switcherRect.contains(e->pos()) || m_arrowRect.contains(e->pos())) + if(m_switcherRect.tqcontains(e->pos()) || m_arrowRect.tqcontains(e->pos())) { - if(!(e->button() == RightButton)) + if(!(e->button() == Qt::RightButton)) m_game->nextVocab(); else m_game->previousVocab(); @@ -444,7 +444,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_hintRect.contains(e->pos())) + if(m_hintRect.tqcontains(e->pos())) { if(m_showHint == true) m_showHint = false; else @@ -459,7 +459,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_upRect.contains(e->pos()) && m_inputBox->text() != "") + if(m_upRect.tqcontains(e->pos()) && m_inputBox->text() != "") { if(m_inputBox->text().lower().stripWhiteSpace() == m_game->getWord()) { @@ -492,7 +492,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) bool haveToUpdate; haveToUpdate = false; - if (m_nextRect.contains(p)) + if (m_nextRect.tqcontains(p)) { if (!m_overNext) { @@ -506,7 +506,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_configRect.contains(p)) + if(m_configRect.tqcontains(p)) { if(!m_overConfig) { @@ -520,7 +520,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_helpRect.contains(p)) + if(m_helpRect.tqcontains(p)) { if(!m_overHelp) { @@ -534,7 +534,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_quitRect.contains(p)) + if(m_quitRect.tqcontains(p)) { if(!m_overQuit) { @@ -548,7 +548,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_hintRect.contains(p)) + if(m_hintRect.tqcontains(p)) { if(!m_overHint) { @@ -562,7 +562,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_hintBoxRect.contains(p)) + if(m_hintBoxRect.tqcontains(p)) { if(!m_overHintBox) { @@ -576,7 +576,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_revealRect.contains(p)) + if(m_revealRect.tqcontains(p)) { if(!m_overReveal) { @@ -590,7 +590,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_upRect.contains(p)) + if(m_upRect.tqcontains(p)) { if(!m_overUp) { @@ -604,7 +604,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_switcherRect.contains(p) || m_arrowRect.contains(p)) + if(m_switcherRect.tqcontains(p) || m_arrowRect.tqcontains(p)) { if(!m_overSwitcher) { @@ -618,7 +618,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_aboutAppRect.contains(p)) + if(m_aboutAppRect.tqcontains(p)) { if(!m_overAboutApp) { @@ -634,7 +634,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) if(!m_showHint) { - if(m_handbookRect.contains(p)) + if(m_handbookRect.tqcontains(p)) { if(!m_overHandbook) { @@ -648,7 +648,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_aboutKDERect.contains(p)) + if(m_aboutKDERect.tqcontains(p)) { if(!m_overAboutKDE) { @@ -679,7 +679,7 @@ void Kanagram::drawText(TQPainter &p, const TQString &text, const TQPoint ¢e font.setBold(true); p.setFont(font); - r = p.boundingRect(TQRect(), Qt::AlignAuto, text); + r = p.boundingRect(TQRect(), TQt::AlignAuto, text); r = TQRect(0, 0, r.width() + xMargin, r.height() + yMargin); r.moveBy(center.x() - r.width() / 2, center.y() - r.height() / 2); @@ -692,7 +692,7 @@ void Kanagram::drawText(TQPainter &p, const TQString &text, const TQPoint ¢e if (!highlight) p.setPen(m_chalkColor); else p.setPen(m_chalkHighlightColor); - p.drawText(r, Qt::AlignCenter, text); + p.drawText(r, TQt::AlignCenter, text); if(rect) *rect = r; } diff --git a/kanagram/src/kanagram.h b/kanagram/src/kanagram.h index db39fccc..504667c1 100644 --- a/kanagram/src/kanagram.h +++ b/kanagram/src/kanagram.h @@ -54,9 +54,10 @@ class KRandomSequence; class KanagramGame; class VocabSettings; -class Kanagram : public QWidget +class Kanagram : public TQWidget { Q_OBJECT + TQ_OBJECT public: Kanagram(); ~Kanagram(); diff --git a/kanagram/src/kanagramgame.cpp b/kanagram/src/kanagramgame.cpp index 67212168..972c4c19 100644 --- a/kanagram/src/kanagramgame.cpp +++ b/kanagram/src/kanagramgame.cpp @@ -34,9 +34,9 @@ #include -KanagramGame::KanagramGame(TQWidget* parent) : m_index(0) +KanagramGame::KanagramGame(TQWidget* tqparent) : m_index(0) { - m_parent = parent; + m_parent = tqparent; loadDefaultVocab(); } @@ -48,7 +48,7 @@ void KanagramGame::checkFile() { if (!TQFile::exists(locate("appdata", m_filename))) { TQString msg = i18n("File %1 cannot be found.\n Please ensure that Kanagram is properly installed.") - .arg(m_filename); + .tqarg(m_filename); KMessageBox::sorry(m_parent, msg, i18n("Error")); exit(0); } @@ -138,7 +138,7 @@ void KanagramGame::nextAnagram() { m_answeredWords.clear(); } - while(m_answeredWords.findIndex(doc->getEntry(wordNumber)->getOriginal()) != -1) + while(m_answeredWords.tqfindIndex(doc->getEntry(wordNumber)->getOriginal()) != -1) { wordNumber = m_random.getLong(totalWords); } diff --git a/kanagram/src/kanagramgame.h b/kanagram/src/kanagramgame.h index b7e30237..09b6c077 100644 --- a/kanagram/src/kanagramgame.h +++ b/kanagram/src/kanagramgame.h @@ -28,11 +28,12 @@ class TQWidget; -class KanagramGame : public QObject +class KanagramGame : public TQObject { Q_OBJECT + TQ_OBJECT public: - KanagramGame(TQWidget *parent); + KanagramGame(TQWidget *tqparent); ~KanagramGame(); void refreshVocabList(); void loadDefaultVocab(); diff --git a/kanagram/src/keduvocdocument.cpp b/kanagram/src/keduvocdocument.cpp index 4bfe29fc..49f5402c 100644 --- a/kanagram/src/keduvocdocument.cpp +++ b/kanagram/src/keduvocdocument.cpp @@ -44,7 +44,7 @@ using namespace std; // KEduVocDocument //******************************************************** -KEduVocDocument::KEduVocDocument(TQObject * /*parent*/) +KEduVocDocument::KEduVocDocument(TQObject * /*tqparent*/) { Init(); } @@ -99,7 +99,7 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/) if (!url.isEmpty()) doc_url = url; - // TODO EPT connect( this, TQT_SIGNAL(progressChanged(KEduVocDocument*,int)), parent, TQT_SLOT(slotProgress(KEduVocDocument*,int)) ); + // TODO EPT connect( this, TQT_SIGNAL(progressChanged(KEduVocDocument*,int)), tqparent, TQT_SLOT(slotProgress(KEduVocDocument*,int)) ); TQString tmpfile; if (KIO::NetAccess::download( url, tmpfile, 0 )) @@ -107,7 +107,7 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/) TQFile f(tmpfile); if (!f.open(IO_ReadOnly)) { - KMessageBox::error(0, i18n("Cannot open file
%1
").arg(url.path())); + KMessageBox::error(0, i18n("Cannot open file
%1
").tqarg(url.path())); return false; } @@ -163,7 +163,7 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/) // TODO new readers provide an explicite error message // the two messages should be merged TQString format = i18n("Could not load \"%1\"\nDo you want to try again?"); - TQString msg = format.arg(url.path()); + TQString msg = format.tqarg(url.path()); int result = KMessageBox::warningContinueCancel(0, msg, kapp->makeStdCaption(i18n("I/O Failure")), i18n("&Retry")); @@ -180,9 +180,9 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/) } -bool KEduVocDocument::saveAs(TQObject * /*parent*/, const KURL & url, FileType ft, const TQString & generator) +bool KEduVocDocument::saveAs(TQObject * /*tqparent*/, const KURL & url, FileType ft, const TQString & generator) { -// connect( this, TQT_SIGNAL(progressChanged(KEduVocDocument*,int)), parent, TQT_SLOT(slotProgress(KEduVocDocument*,int)) ); +// connect( this, TQT_SIGNAL(progressChanged(KEduVocDocument*,int)), tqparent, TQT_SLOT(slotProgress(KEduVocDocument*,int)) ); KURL tmp (url); @@ -211,7 +211,7 @@ bool KEduVocDocument::saveAs(TQObject * /*parent*/, const KURL & url, FileType f if (!f.open(IO_WriteOnly)) { - KMessageBox::error(0, i18n("Cannot write to file
%1
").arg(tmp.path())); + KMessageBox::error(0, i18n("Cannot write to file
%1
").tqarg(tmp.path())); return false; } @@ -253,7 +253,7 @@ bool KEduVocDocument::saveAs(TQObject * /*parent*/, const KURL & url, FileType f // TODO new writers provide an explicite error message // the two messages should be merged TQString format = i18n("Could not save \"%1\"\nDo you want to try again?"); - TQString msg = format.arg(tmp.path()); + TQString msg = format.tqarg(tmp.path()); int result = KMessageBox::warningContinueCancel(0, msg, kapp->makeStdCaption(i18n("I/O Failure")), i18n("&Retry")); @@ -717,7 +717,7 @@ void KEduVocDocument::setLeitnerSystem( LeitnerSystem* system ) { leitnerSystem = system; - /*KWordQuizApp* app = (KWordQuizApp*) parent(); + /*KWordQuizApp* app = (KWordQuizApp*) tqparent(); app->slotLeitnerSystem();*/ } @@ -901,11 +901,11 @@ int KEduVocDocument::search(TQString substr, int id, if (id == 0) { for (int i = first; i < last; i++) { if (word_start) { - if (getEntry(i)->getOriginal().find (substr, 0, false) == 0) // case insensitive + if (getEntry(i)->getOriginal().tqfind (substr, 0, false) == 0) // case insensitive return i; } else { - if (getEntry(i)->getOriginal().find (substr, 0, false) > -1) // case insensitive + if (getEntry(i)->getOriginal().tqfind (substr, 0, false) > -1) // case insensitive return i; } } @@ -913,11 +913,11 @@ int KEduVocDocument::search(TQString substr, int id, else { for (int i = first; i < last; i++) { if (word_start) { - if (getEntry(i)->getTranslation(id).find (substr, 0, false) == 0) // case insensitive + if (getEntry(i)->getTranslation(id).tqfind (substr, 0, false) == 0) // case insensitive return i; } else { - if (getEntry(i)->getTranslation(id).find (substr, 0, false) > -1) // case insensitive + if (getEntry(i)->getTranslation(id).tqfind (substr, 0, false) > -1) // case insensitive return i; } } @@ -972,7 +972,7 @@ KEduVocDocument::FileType KEduVocDocument::detectFT(const TQString &filename) TQDataStream is( &f ); - Q_INT8 c1, c2, c3, c4, c5; + TQ_INT8 c1, c2, c3, c4, c5; is >> c1 >> c2 >> c3 @@ -989,13 +989,13 @@ KEduVocDocument::FileType KEduVocDocument::detectFT(const TQString &filename) line.insert (0, c1); f.close(); - bool stat = is.device()->status(); + bool stat = is.tqdevice()->status(); if (stat != IO_Ok) return kvd_none; if (c1 == '<' && c2 == '?' && c3 == 'x' && c4 == 'm' && c5 == 'l') return kvtml; - if (line.find (VCB_SEPARATOR) >= 0) + if (line.tqfind (VCB_SEPARATOR) >= 0) return vt_vcb; if (line == LEX_IDENT_50) diff --git a/kanagram/src/keduvocdocument.h b/kanagram/src/keduvocdocument.h index ebc48010..468f3089 100644 --- a/kanagram/src/keduvocdocument.h +++ b/kanagram/src/keduvocdocument.h @@ -48,7 +48,7 @@ #define KV_ORG "o" // original expression in specified language #define KV_TRANS "t" // translated expression in specified language #define KV_LANG "l" // language: en, de, it, fr ... -#define KV_QUERY "q" // query: org or translation +#define KV_TQUERY "q" // query: org or translation #define KV_O "o" // org #define KV_T "t" // translation #define KV_GRADE "g" // grade of knowledge: 0=well known, x=not known for x times @@ -104,7 +104,7 @@ #define KV_LESS_GRP "lesson" // lesson descriptor group #define KV_LESS_CURR "current" // is current lesson #define KV_LESS_DESC "desc" // lesson descriptor -#define KV_LESS_QUERY "query" // lesson contained in query +#define KV_LESS_TQUERY "query" // lesson contained in query #define KV_LESS_NO "no" // lesson descriptor number /* @@ -232,7 +232,7 @@ #define KVTML_EXT "kvtml" #define VT5_LEX_EXT "lex" -#define QVOCAB_EXT "qvo" +#define TQVOCAB_EXT "qvo" #define VCB_EXT "vocab" #define KVL_EXT "vl" #define CSV_EXT "csv" @@ -249,9 +249,10 @@ class LeitnerSystem; * This class contains the expressions of your vocabulary ************************************************************/ -class KEduVocDocument : public QObject +class KEduVocDocument : public TQObject { Q_OBJECT + TQ_OBJECT friend class KEduVocKvtmlWriter; friend class KEduVocKvtmlReader; @@ -439,7 +440,7 @@ class KEduVocDocument : public QObject * @param url if url is empty (or NULL) actual name is preserved * @result true if successful */ - bool saveAs(TQObject *parent, const KURL & url, FileType ft, const TQString & generator); + bool saveAs(TQObject *tqparent, const KURL & url, FileType ft, const TQString & generator); /** returns count of entries */ diff --git a/kanagram/src/keduvocexpression.cpp b/kanagram/src/keduvocexpression.cpp index 8d01c8ba..0c82897b 100644 --- a/kanagram/src/keduvocexpression.cpp +++ b/kanagram/src/keduvocexpression.cpp @@ -55,7 +55,7 @@ KEduVocExpression::KEduVocExpression (TQString &s, TQString separator, int _less lesson = _lesson; if (separator.length() ) { - int pos = s.find(separator); + int pos = s.tqfind(separator); if (pos == -1) { setOriginal(s.stripWhiteSpace()); @@ -67,7 +67,7 @@ KEduVocExpression::KEduVocExpression (TQString &s, TQString separator, int _less // s.stripWhiteSpace(); // gather all translations - while ((pos = s.find(separator)) != -1) { + while ((pos = s.tqfind(separator)) != -1) { se = s.left(pos).stripWhiteSpace(); addTranslation(se, KV_NORM_GRADE, KV_NORM_GRADE); s.remove (0, pos+separator.length() ); diff --git a/kanagram/src/keduvocexpression.h b/kanagram/src/keduvocexpression.h index eb3ac4ec..c86acf8e 100644 --- a/kanagram/src/keduvocexpression.h +++ b/kanagram/src/keduvocexpression.h @@ -23,7 +23,7 @@ #define KV_MIN_GRADE 0 #define KV_NORM_GRADE 0 // not queried yet -#define KV_NORM_COLOR Qt::black +#define KV_NORM_COLOR TQt::black #define KV_NORM_TEXT I18N_NOOP("Not Queried Yet") #define KV_LEV1_GRADE 1 diff --git a/kanagram/src/keduvockvtmlreader.cpp b/kanagram/src/keduvockvtmlreader.cpp index fc1441f6..687fdaee 100644 --- a/kanagram/src/keduvockvtmlreader.cpp +++ b/kanagram/src/keduvockvtmlreader.cpp @@ -78,7 +78,7 @@ bool KEduVocKvtmlReader::readLesson(TQDomElement &domElementParent) if (isCurr && no != 0) m_doc->setCurrentLesson(no); - TQDomAttr domAttrQuery = domElementChild.attributeNode(KV_LESS_QUERY); + TQDomAttr domAttrQuery = domElementChild.attributeNode(KV_LESS_TQUERY); if (!domAttrQuery.isNull()) m_doc->lessons_in_query.push_back(domAttrQuery.value().toInt() != 0); else @@ -131,7 +131,7 @@ bool KEduVocKvtmlReader::readArticle(TQDomElement &domElementParent) { if (domElementEntry.tagName() != KV_ART_ENTRY) { - domError(i18n("expected tag <%1>").arg(KV_ART_ENTRY)); + domError(i18n("expected tag <%1>").tqarg(KV_ART_ENTRY)); return false; } @@ -331,7 +331,7 @@ bool KEduVocKvtmlReader::readConjug(TQDomElement &domElementParent, if (type.length() != 0 && type.left(1) == UL_USER_TENSE) { - int num = QMIN(type.mid (1, 40).toInt(), 1000); // paranoia check + int num = TQMIN(type.mid (1, 40).toInt(), 1000); // paranoia check if( num > (int) m_doc->tense_descr.size() ) { // description missing ? @@ -783,7 +783,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrGrade.isNull()) { TQString s = domAttrGrade.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { grade = s.left(pos).toInt(); rev_grade = s.mid(pos+1, s.length()).toInt(); @@ -798,7 +798,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrCount.isNull()) { TQString s = domAttrCount.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { count = s.left(pos).toInt(); rev_count = s.mid(pos+1, s.length()).toInt(); @@ -813,7 +813,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrBad.isNull()) { TQString s = domAttrBad.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { bcount = s.left(pos).toInt(); rev_bcount = s.mid(pos+1, s.length()).toInt(); @@ -828,7 +828,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrDate.isNull()) { TQString s = domAttrDate.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { date = s.left(pos).toInt(); rev_date = s.mid(pos+1, s.length()).toInt(); @@ -841,7 +841,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrDate2.isNull()) { TQString s = domAttrDate2.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { date = m_doc->decompressDate(s.left(pos)); rev_date = m_doc->decompressDate(s.mid(pos+1, s.length())); @@ -882,7 +882,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement usage = domAttrUsage.value(); if (usage.length() != 0 && usage.left(1) == UL_USER_USAGE) { - int num = QMIN(usage.mid (1, 40).toInt(), 1000); // paranioa check + int num = TQMIN(usage.mid (1, 40).toInt(), 1000); // paranioa check if( num > (int) m_doc->usage_descr.size() ) { // description missing ? @@ -912,15 +912,15 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement { type = domAttrExprType.value(); if (type == "1") - type = QM_VERB; + type = TQM_VERB; else if (type == "2") // convert from pre-0.5 versions - type = QM_NOUN; + type = TQM_NOUN; else if (type == "3") - type = QM_NAME; + type = TQM_NAME; - if (type.length() != 0 && type.left(1) == QM_USER_TYPE) + if (type.length() != 0 && type.left(1) == TQM_USER_TYPE) { - int num = QMIN(type.mid (1, 40).toInt(), 1000); // paranoia check + int num = TQMIN(type.mid (1, 40).toInt(), 1000); // paranoia check if( num > (int) m_doc->type_descr.size() ) { // description missing ? @@ -941,7 +941,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement pronunce = domAttrPronunce.value(); query_id = ""; - TQDomAttr domAttrQuery = domElementExpressionChild.attributeNode(KV_QUERY); + TQDomAttr domAttrQuery = domElementExpressionChild.attributeNode(KV_TQUERY); if (!domAttrQuery.isNull()) query_id = domAttrQuery.value(); @@ -1010,15 +1010,15 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { exprtype = !domAttrType.value().toInt(); if (exprtype == "1") - exprtype = QM_VERB; + exprtype = TQM_VERB; else if (exprtype == "2") // convert from pre-0.5 versions - exprtype = QM_NOUN; + exprtype = TQM_NOUN; else if (exprtype == "3") - exprtype = QM_NAME; + exprtype = TQM_NAME; - if (exprtype.length() != 0 && exprtype.left(1) == QM_USER_TYPE) + if (exprtype.length() != 0 && exprtype.left(1) == TQM_USER_TYPE) { - int num = QMIN(exprtype.mid (1, 40).toInt(), 1000); // paranoia check + int num = TQMIN(exprtype.mid (1, 40).toInt(), 1000); // paranoia check if( num > (int) m_doc->type_descr.size() ) { // description missing ? @@ -1059,7 +1059,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) if (domElementExpressionChild.tagName() != KV_ORG) { // must be preceded by "original" - domError(i18n("starting tag <%1> is missing").arg(KV_ORG)); + domError(i18n("starting tag <%1> is missing").tqarg(KV_ORG)); return false; } @@ -1139,7 +1139,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bConjug) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bConjug = true; @@ -1152,7 +1152,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bComparison) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bComparison = true; @@ -1165,7 +1165,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bMultipleChoice) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bMultipleChoice = true; @@ -1236,7 +1236,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) if (domElementExpressionChild.tagName() != KV_TRANS) { // "original" must be followed by "translations" - domError(i18n("starting tag <%1> is missing").arg(KV_TRANS)); + domError(i18n("starting tag <%1> is missing").tqarg(KV_TRANS)); return false; } @@ -1317,7 +1317,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bConjug) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bConjug = true; @@ -1330,7 +1330,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bComparison) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bComparison = true; @@ -1343,7 +1343,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bMultipleChoice) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bMultipleChoice = true; @@ -1456,7 +1456,7 @@ if (lines != 0) { if (lessgroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } lessgroup = true; @@ -1468,7 +1468,7 @@ if (lines != 0) { if (articlegroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } articlegroup = true; @@ -1480,7 +1480,7 @@ if (lines != 0) { if (conjuggroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } conjuggroup = true; @@ -1492,7 +1492,7 @@ if (lines != 0) { if (optgroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } optgroup = true; @@ -1504,7 +1504,7 @@ if (lines != 0) { if (attrgroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } attrgroup = true; @@ -1516,7 +1516,7 @@ if (lines != 0) { if (tensegroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } tensegroup = true; @@ -1528,7 +1528,7 @@ if (lines != 0) { if (usagegroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } usagegroup = true; @@ -1590,7 +1590,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) if( domElementKvtml.tagName() != KV_DOCTYPE ) { domError(i18n("Tag <%1> was expected " - "but tag <%2> was read." ).arg(KV_DOCTYPE).arg(domElementKvtml.tagName())); + "but tag <%2> was read." ).tqarg(KV_DOCTYPE).tqarg(domElementKvtml.tagName())); return false; } @@ -1602,7 +1602,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) if (!domAttrEncoding.isNull()) { // TODO handle old encodings - // Qt DOM API autodetects encoding, so is there anything to do ? + // TQt DOM API autodetects encoding, so is there anything to do ? } TQDomAttr domAttrTitle = domElementKvtml.attributeNode(KV_TITLE); @@ -1633,7 +1633,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) if (!domAttrGenerator.isNull()) { m_doc->generator = domAttrGenerator.value(); - int pos = m_doc->generator.findRev (KVD_VERS_PREFIX); + int pos = m_doc->generator.tqfindRev (KVD_VERS_PREFIX); if (pos >= 0) { m_doc->doc_version = m_doc->generator; @@ -1667,7 +1667,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) void KEduVocKvtmlReader::domErrorUnknownElement(const TQString &elem) { - TQString ln = i18n("File:\t%1\n").arg(m_doc->URL().path()); + TQString ln = i18n("File:\t%1\n").tqarg(m_doc->URL().path()); TQString format = i18n( "Your document contains an unknown tag <%1>. " // keep trailing space @@ -1676,7 +1676,7 @@ void KEduVocKvtmlReader::domErrorUnknownElement(const TQString &elem) "Loading is aborted because KVocTrain cannot " "read documents with unknown elements.\n" ); - TQString msg = format.arg(elem); + TQString msg = format.tqarg(elem); TQApplication::setOverrideCursor( arrowCursor, true ); TQString s = kapp->makeStdCaption(i18n("Unknown Element")); KMessageBox::sorry(0, ln+msg, s); @@ -1687,7 +1687,7 @@ void KEduVocKvtmlReader::domError(const TQString &text ) { TQApplication::setOverrideCursor( arrowCursor, true ); TQString s = kapp->makeStdCaption(i18n("Error")); - TQString ln = i18n("File:\t%1\n").arg(m_doc->URL().path()); + TQString ln = i18n("File:\t%1\n").tqarg(m_doc->URL().path()); TQString msg = text; KMessageBox::error(0, ln+msg, s); TQApplication::restoreOverrideCursor(); diff --git a/kanagram/src/keduvockvtmlreader.h b/kanagram/src/keduvockvtmlreader.h index a68d4575..acd29782 100644 --- a/kanagram/src/keduvockvtmlreader.h +++ b/kanagram/src/keduvockvtmlreader.h @@ -30,36 +30,36 @@ class KEduVocDocument; // internal types, indented are subtypes -#define QM_VERB "v" // go -#define QM_VERB_IRR "ir" -#define QM_VERB_REG "re" -#define QM_NOUN "n" // table, coffee -#define QM_NOUN_F "f" -#define QM_NOUN_M "m" -#define QM_NOUN_S "s" -#define QM_NAME "nm" -#define QM_ART "ar" // article -#define QM_ART_DEF "def" // definite a/an -#define QM_ART_IND "ind" // indefinite the -#define QM_ADJ "aj" // adjective expensive, good -#define QM_ADV "av" // adverb today, strongly -#define QM_PRON "pr" // pronoun you, she -#define QM_PRON_POS "pos" // possessive my, your -#define QM_PRON_PER "per" // personal -#define QM_PHRASE "ph" -#define QM_NUM "num" // numeral -#define QM_NUM_ORD "ord" // ordinal first, second -#define QM_NUM_CARD "crd" // cardinal one, two -#define QM_INFORMAL "ifm" -#define QM_FIG "fig" -#define QM_CON "con" // conjuncton and, but -#define QM_PREP "pre" // preposition behind, between -#define QM_QUEST "qu" // question who, what +#define TQM_VERB "v" // go +#define TQM_VERB_IRR "ir" +#define TQM_VERB_REG "re" +#define TQM_NOUN "n" // table, coffee +#define TQM_NOUN_F "f" +#define TQM_NOUN_M "m" +#define TQM_NOUN_S "s" +#define TQM_NAME "nm" +#define TQM_ART "ar" // article +#define TQM_ART_DEF "def" // definite a/an +#define TQM_ART_IND "ind" // indefinite the +#define TQM_ADJ "aj" // adjective expensive, good +#define TQM_ADV "av" // adverb today, strongly +#define TQM_PRON "pr" // pronoun you, she +#define TQM_PRON_POS "pos" // possessive my, your +#define TQM_PRON_PER "per" // personal +#define TQM_PHRASE "ph" +#define TQM_NUM "num" // numeral +#define TQM_NUM_ORD "ord" // ordinal first, second +#define TQM_NUM_CARD "crd" // cardinal one, two +#define TQM_INFORMAL "ifm" +#define TQM_FIG "fig" +#define TQM_CON "con" // conjuncton and, but +#define TQM_PREP "pre" // preposition behind, between +#define TQM_QUEST "qu" // question who, what // type delimiters -#define QM_USER_TYPE "#" // designates number of user type -#define QM_TYPE_DIV ":" // divide main from subtype +#define TQM_USER_TYPE "#" // designates number of user type +#define TQM_TYPE_DIV ":" // divide main from subtype // usage delimiters (also declared in UsageManager.h) @@ -68,7 +68,7 @@ class KEduVocDocument; /** @author Eric Pignet */ -class KEduVocKvtmlReader : public QObject +class KEduVocKvtmlReader : public TQObject { public: KEduVocKvtmlReader(TQFile *file); diff --git a/kanagram/src/keduvockvtmlwriter.cpp b/kanagram/src/keduvockvtmlwriter.cpp index 5aef1645..8789c7d6 100644 --- a/kanagram/src/keduvockvtmlwriter.cpp +++ b/kanagram/src/keduvockvtmlwriter.cpp @@ -126,7 +126,7 @@ bool KEduVocKvtmlWriter::saveLessonKvtMl (TQDomDocument &domDoc, TQDomElement &d if (m_doc->getCurrentLesson() == lfn+1) domElementDesc.setAttribute (KV_LESS_CURR, 1); if (lfn < (int) m_doc->lessons_in_query.size() && m_doc->lessons_in_query[lfn]) - domElementDesc.setAttribute (KV_LESS_QUERY, 1); + domElementDesc.setAttribute (KV_LESS_TQUERY, 1); domElementDesc.appendChild(domTextDesc); domElementLesson.appendChild(domElementDesc); @@ -268,7 +268,7 @@ bool KEduVocKvtmlWriter::saveConjugHeader(TQDomDocument &domDoc, TQDomElement &d TQDomElement domElementConjug = domDoc.createElement(KV_CONJUG_GRP); TQString s; - for (int ent = 0; ent < QMIN((int) curr_conjug.size(), m_doc->numLangs()); ent++) + for (int ent = 0; ent < TQMIN((int) curr_conjug.size(), m_doc->numLangs()); ent++) { TQDomElement domElementEntry = domDoc.createElement(KV_CON_ENTRY); @@ -478,7 +478,7 @@ bool KEduVocKvtmlWriter::saveArticleKvtMl(TQDomDocument &domDoc, TQDomElement &d TQDomElement domElementArticle = domDoc.createElement(KV_ARTICLE_GRP); TQString def, indef, s; - for (int lfn = 0; lfn < QMIN((int) m_doc->articles.size(), m_doc->numLangs()); lfn++) + for (int lfn = 0; lfn < TQMIN((int) m_doc->articles.size(), m_doc->numLangs()); lfn++) { TQDomElement domElementEntry = domDoc.createElement(KV_ART_ENTRY); if (lfn == 0) @@ -746,9 +746,9 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato s = "original"; domElementOriginal.setAttribute (KV_LANG, s); if (s == q_org) - domElementOriginal.setAttribute(KV_QUERY, (TQString) KV_O); + domElementOriginal.setAttribute(KV_TQUERY, (TQString) KV_O); else if (s == q_trans) - domElementOriginal.setAttribute(KV_QUERY, (TQString) KV_T); + domElementOriginal.setAttribute(KV_TQUERY, (TQString) KV_T); } @@ -781,20 +781,20 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato TQString s; TQString entype = s = (*first).getType(0); - int pos = s.find (QM_TYPE_DIV); + int pos = s.tqfind (TQM_TYPE_DIV); if (pos >= 0) entype = s.left (pos); else entype = s; - if (entype == QM_VERB + if (entype == TQM_VERB && (*first).getConjugation(0).numEntries() > 0) { Conjugation conj = (*first).getConjugation(0); if (!saveConjugEntry(domDoc, domElementOriginal, conj)) return false; } - else if (entype == QM_ADJ + else if (entype == TQM_ADJ && !(*first).getComparison(0).isEmpty()) { Comparison comp = (*first).getComparison(0); @@ -825,9 +825,9 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato } domElementTranslation.setAttribute(KV_LANG, s); if (s == q_org) - domElementTranslation.setAttribute(KV_QUERY, (TQString) KV_O); + domElementTranslation.setAttribute(KV_TQUERY, (TQString) KV_O); else if (s == q_trans) - domElementTranslation.setAttribute(KV_QUERY, (TQString) KV_T); + domElementTranslation.setAttribute(KV_TQUERY, (TQString) KV_T); } TQString s1, s2; @@ -901,13 +901,13 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato TQString s; TQString entype = s = (*first).getType(0); - int pos = s.find (QM_TYPE_DIV); + int pos = s.tqfind (TQM_TYPE_DIV); if (pos >= 0) entype = s.left (pos); else entype = s; - if (entype == QM_VERB + if (entype == TQM_VERB && (*first).getConjugation(trans).numEntries() > 0) { Conjugation conj = (*first).getConjugation(trans); @@ -915,7 +915,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato return false; } - if (entype == QM_ADJ + if (entype == TQM_ADJ && !(*first).getComparison(trans).isEmpty()) { Comparison comp = (*first).getComparison(trans); diff --git a/kanagram/src/keduvockvtmlwriter.h b/kanagram/src/keduvockvtmlwriter.h index 969cedf0..e8ff5de8 100644 --- a/kanagram/src/keduvockvtmlwriter.h +++ b/kanagram/src/keduvockvtmlwriter.h @@ -30,36 +30,36 @@ class KEduVocDocument; // internal types, indented are subtypes -#define QM_VERB "v" // go -#define QM_VERB_IRR "ir" -#define QM_VERB_REG "re" -#define QM_NOUN "n" // table, coffee -#define QM_NOUN_F "f" -#define QM_NOUN_M "m" -#define QM_NOUN_S "s" -#define QM_NAME "nm" -#define QM_ART "ar" // article -#define QM_ART_DEF "def" // definite a/an -#define QM_ART_IND "ind" // indefinite the -#define QM_ADJ "aj" // adjective expensive, good -#define QM_ADV "av" // adverb today, strongly -#define QM_PRON "pr" // pronoun you, she -#define QM_PRON_POS "pos" // possessive my, your -#define QM_PRON_PER "per" // personal -#define QM_PHRASE "ph" -#define QM_NUM "num" // numeral -#define QM_NUM_ORD "ord" // ordinal first, second -#define QM_NUM_CARD "crd" // cardinal one, two -#define QM_INFORMAL "ifm" -#define QM_FIG "fig" -#define QM_CON "con" // conjuncton and, but -#define QM_PREP "pre" // preposition behind, between -#define QM_QUEST "qu" // question who, what +#define TQM_VERB "v" // go +#define TQM_VERB_IRR "ir" +#define TQM_VERB_REG "re" +#define TQM_NOUN "n" // table, coffee +#define TQM_NOUN_F "f" +#define TQM_NOUN_M "m" +#define TQM_NOUN_S "s" +#define TQM_NAME "nm" +#define TQM_ART "ar" // article +#define TQM_ART_DEF "def" // definite a/an +#define TQM_ART_IND "ind" // indefinite the +#define TQM_ADJ "aj" // adjective expensive, good +#define TQM_ADV "av" // adverb today, strongly +#define TQM_PRON "pr" // pronoun you, she +#define TQM_PRON_POS "pos" // possessive my, your +#define TQM_PRON_PER "per" // personal +#define TQM_PHRASE "ph" +#define TQM_NUM "num" // numeral +#define TQM_NUM_ORD "ord" // ordinal first, second +#define TQM_NUM_CARD "crd" // cardinal one, two +#define TQM_INFORMAL "ifm" +#define TQM_FIG "fig" +#define TQM_CON "con" // conjuncton and, but +#define TQM_PREP "pre" // preposition behind, between +#define TQM_QUEST "qu" // question who, what // type delimiters -#define QM_USER_TYPE "#" // designates number of user type -#define QM_TYPE_DIV ":" // divide main from subtype +#define TQM_USER_TYPE "#" // designates number of user type +#define TQM_TYPE_DIV ":" // divide main from subtype /** @author Eric Pignet diff --git a/kanagram/src/leitnersystem.cpp b/kanagram/src/leitnersystem.cpp index 0705c5c2..6a44593b 100644 --- a/kanagram/src/leitnersystem.cpp +++ b/kanagram/src/leitnersystem.cpp @@ -79,7 +79,7 @@ const TQString& LeitnerSystem::getNextBox( TQString& previousBox ) return getBox( i ); } - return TQString::null; + return TQString(); } const TQString& LeitnerSystem::getCorrectBox( int box ) @@ -114,7 +114,7 @@ void LeitnerSystem::deleteBox( LeitnerBox* box ) bool LeitnerSystem::insertBox( const TQString& name, int correctWordBox, int wrongWordBox ) { - if( getBoxNameList().contains( name ) != 0 ) + if( getBoxNameList().tqcontains( name ) != 0 ) return false; LeitnerBox tmpBox; @@ -133,9 +133,9 @@ void LeitnerSystem::setSystemName( const TQString& name ) int LeitnerSystem::getNumber( LeitnerBox* box ) { - if( m_boxes.findIndex( *box ) == -1 ) + if( m_boxes.tqfindIndex( *box ) == -1 ) kdDebug() << "muhaha" << endl; - return m_boxes.findIndex( *box ); + return m_boxes.tqfindIndex( *box ); } bool LeitnerSystem::setBoxName( int box, const TQString& name ) @@ -164,7 +164,7 @@ bool LeitnerSystem::setBoxName( LeitnerBox* box, const TQString& name ) bool LeitnerSystem::insertBox( const TQString& name ) { - if( getBoxNameList().contains( name ) != 0 ) + if( getBoxNameList().tqcontains( name ) != 0 ) return false; LeitnerBox tmpBox; diff --git a/kanagram/src/leitnersystemview.cpp b/kanagram/src/leitnersystemview.cpp index cbbb0400..e49c0e07 100644 --- a/kanagram/src/leitnersystemview.cpp +++ b/kanagram/src/leitnersystemview.cpp @@ -20,8 +20,8 @@ #include -LeitnerSystemView::LeitnerSystemView(TQWidget * parent, const char* name, WFlags f) - : TQScrollView(parent, name, f) +LeitnerSystemView::LeitnerSystemView(TQWidget * tqparent, const char* name, WFlags f) + : TQScrollView(tqparent, name, f) { m_highlightedBox = -1; } @@ -116,7 +116,7 @@ void LeitnerSystemView::setSystem(LeitnerSystem* leitnersystem) //calculate the new sizes calculateSize(); updateContents(); - //repaint + //tqrepaint //update(); //TQPainter* p = new TQPainter(this); //drawContents( p, 0, 0, 0, 0 ); diff --git a/kanagram/src/leitnersystemview.h b/kanagram/src/leitnersystemview.h index 9f540cdf..11108f9f 100644 --- a/kanagram/src/leitnersystemview.h +++ b/kanagram/src/leitnersystemview.h @@ -22,12 +22,13 @@ class LeitnerSystem; @author Martin Pfeiffer */ -class LeitnerSystemView : public QScrollView +class LeitnerSystemView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - LeitnerSystemView(TQWidget* parent = 0, const char* name = 0, WFlags f = 0); + LeitnerSystemView(TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0); ~LeitnerSystemView(); diff --git a/kanagram/src/mainsettings.cpp b/kanagram/src/mainsettings.cpp index 1e026758..6ca548ee 100644 --- a/kanagram/src/mainsettings.cpp +++ b/kanagram/src/mainsettings.cpp @@ -35,11 +35,11 @@ #include "mainsettings.h" #include "kanagramsettings.h" -MainSettings::MainSettings(TQWidget *parent) : MainSettingsWidget(parent) +MainSettings::MainSettings(TQWidget *tqparent) : MainSettingsWidget(tqparent) { - m_parent = (KConfigDialog*)parent; + m_parent = (KConfigDialog*)tqparent; - connect(parent, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotChangeTranslation())); + connect(tqparent, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotChangeTranslation())); connect(cboxTranslation, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateParent())); setupTranslations(); @@ -109,7 +109,7 @@ void MainSettings::setupTranslations() temp_languages.remove(".."); for (TQStringList::const_iterator it2 = temp_languages.begin(); it2 != temp_languages.end(); ++it2 ) { - if (!languages.contains(*it2)) languages.append(*it2); + if (!languages.tqcontains(*it2)) languages.append(*it2); } } diff --git a/kanagram/src/mainsettings.h b/kanagram/src/mainsettings.h index 172b5276..c82d8fd6 100644 --- a/kanagram/src/mainsettings.h +++ b/kanagram/src/mainsettings.h @@ -30,8 +30,9 @@ class KConfigDialog; class MainSettings : public MainSettingsWidget { Q_OBJECT + TQ_OBJECT public: - MainSettings(TQWidget *parent); + MainSettings(TQWidget *tqparent); ~MainSettings(); public slots: diff --git a/kanagram/src/mainsettingswidget.ui b/kanagram/src/mainsettingswidget.ui index ef9d017e..2848bb43 100644 --- a/kanagram/src/mainsettingswidget.ui +++ b/kanagram/src/mainsettingswidget.ui @@ -1,10 +1,10 @@ MainSettingsWidget - + MainSettingsWidget - + 0 0 @@ -22,7 +22,7 @@ unnamed - + groupBox1 @@ -33,7 +33,7 @@ unnamed - + textLabel1_2 @@ -41,7 +41,7 @@ Auto-hide hints after: - + Do Not Auto-Hide Hints @@ -73,7 +73,7 @@ - + groupBox3 @@ -84,15 +84,15 @@ unnamed - + - layout2 + tqlayout2 unnamed - + textLabel1 @@ -103,7 +103,7 @@ cboxTranslation
- + cboxTranslation @@ -112,15 +112,15 @@ - + - layout2 + tqlayout2 unnamed - + kcfg_useStandardFonts @@ -134,7 +134,7 @@ Uses a standard font for the chalkboard/interface.
- + getFontsButton @@ -144,7 +144,7 @@
- + kcfg_useSounds @@ -165,7 +165,7 @@ Expanding - + 16 16 @@ -178,5 +178,5 @@ kcfg_hintHideTime kcfg_useSounds - +
diff --git a/kanagram/src/newstuff.cpp b/kanagram/src/newstuff.cpp index 7c72f938..d437f953 100644 --- a/kanagram/src/newstuff.cpp +++ b/kanagram/src/newstuff.cpp @@ -11,7 +11,7 @@ #include "kanagramsettings.h" #include "newstuffdialog.h" -NewStuff::NewStuff(TQWidget *parent) : NewStuffWidget(parent) +NewStuff::NewStuff(TQWidget *tqparent) : NewStuffWidget(tqparent) { connect(btnGetNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewVocabs())); } diff --git a/kanagram/src/newstuff.h b/kanagram/src/newstuff.h index cad963f7..880f5e7d 100644 --- a/kanagram/src/newstuff.h +++ b/kanagram/src/newstuff.h @@ -6,8 +6,9 @@ class NewStuff : public NewStuffWidget { Q_OBJECT + TQ_OBJECT public: - NewStuff(TQWidget *parent); + NewStuff(TQWidget *tqparent); ~NewStuff(); private slots: diff --git a/kanagram/src/newstuffwidget.ui b/kanagram/src/newstuffwidget.ui index f1b1bb23..d5670df2 100644 --- a/kanagram/src/newstuffwidget.ui +++ b/kanagram/src/newstuffwidget.ui @@ -1,10 +1,10 @@ NewStuffWidget - + NewStuffWidget - + 0 0 @@ -19,7 +19,7 @@ unnamed - + textLabel1 @@ -41,14 +41,14 @@ the button to get new vocabulary files. Expanding - + 20 20 - + btnGetNew @@ -58,5 +58,5 @@ the button to get new vocabulary files. - + diff --git a/kanagram/src/vocabedit.cpp b/kanagram/src/vocabedit.cpp index 46a81450..2315faa4 100644 --- a/kanagram/src/vocabedit.cpp +++ b/kanagram/src/vocabedit.cpp @@ -41,12 +41,12 @@ #include "kanagramsettings.h" -VocabEdit::VocabEdit(TQWidget *parent, TQString fileName) : VocabEditWidget(parent), m_fileName("") +VocabEdit::VocabEdit(TQWidget *tqparent, TQString fileName) : VocabEditWidget(tqparent), m_fileName("") { if(fileName != "") { m_fileName = fileName; - KEduVocDocument *doc = new KEduVocDocument(this); + KEduVocDocument *doc = new KEduVocDocument(TQT_TQOBJECT(this)); doc->open(KURL(m_fileName), false); for(int i = 0; i < doc->numEntries(); i++) { @@ -83,7 +83,7 @@ VocabEdit::~VocabEdit() void VocabEdit::slotSave() { - KEduVocDocument *doc = new KEduVocDocument(this); + KEduVocDocument *doc = new KEduVocDocument(TQT_TQOBJECT(this)); doc->setTitle(txtVocabName->text()); doc->setDocRemark(txtDescription->text()); for(uint i = 0; i < m_vocabList.size(); i++) @@ -94,15 +94,15 @@ void VocabEdit::slotSave() TQString fileName; if(m_fileName == "") { - fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().replace(" ", "") + ".kvtml"; + fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().tqreplace(" ", "") + ".kvtml"; } else { fileName = m_fileName; } - doc->saveAs(this, KURL(fileName), KEduVocDocument::automatic, "kanagram"); + doc->saveAs(TQT_TQOBJECT(this), KURL(fileName), KEduVocDocument::automatic, "kanagram"); - VocabSettings *settings = (VocabSettings*)this->parentWidget(); + VocabSettings *settings = (VocabSettings*)this->tqparentWidget(); settings->refreshView(); if(m_textChanged) diff --git a/kanagram/src/vocabedit.h b/kanagram/src/vocabedit.h index d4e84238..99b0e868 100644 --- a/kanagram/src/vocabedit.h +++ b/kanagram/src/vocabedit.h @@ -32,9 +32,10 @@ class KEduVocExpression; class VocabEdit : public VocabEditWidget { Q_OBJECT + TQ_OBJECT public: - VocabEdit(TQWidget *parent); - VocabEdit(TQWidget *parent, TQString fileName); + VocabEdit(TQWidget *tqparent); + VocabEdit(TQWidget *tqparent, TQString fileName); ~VocabEdit(); public slots: diff --git a/kanagram/src/vocabeditwidget.ui b/kanagram/src/vocabeditwidget.ui index d4d1229d..c80f8ba8 100644 --- a/kanagram/src/vocabeditwidget.ui +++ b/kanagram/src/vocabeditwidget.ui @@ -1,10 +1,10 @@ VocabEditWidget - + VocabEditWidget - + 0 0 @@ -19,23 +19,23 @@ unnamed - + - layout7 + tqlayout7 unnamed - + - layout6 + tqlayout6 unnamed - + btnSave @@ -43,7 +43,7 @@ Save - + btnClose @@ -53,23 +53,23 @@ - + - layout8 + tqlayout8 unnamed - + - layout5 + tqlayout5 unnamed - + textLabel2 @@ -80,15 +80,15 @@ txtDescription - The description of the vocabulary. If you're creating a new vocabulary, add a description so that users of your vocabulary will know what kinds of words it contains. + The description of the vocabulary. If you're creating a new vocabulary, add a description so that users of your vocabulary will know what kinds of words it tqcontains. - + txtVocabName - + textLabel1 @@ -102,30 +102,30 @@ The name of the vocabulary you are editing. - + txtDescription - + - layout7 + tqlayout7 unnamed - + - layout6 + tqlayout6 unnamed - + btnRemoveWord @@ -136,7 +136,7 @@ Removes the selected word. - + btnNewWord @@ -149,7 +149,7 @@ - + lboxWords @@ -159,15 +159,15 @@ - + - layout4 + tqlayout4 unnamed - + textLabel3 @@ -181,17 +181,17 @@ The selected word. This box allows you to edit the selected word. - + txtHint - + txtWord - + textLabel4 @@ -224,5 +224,5 @@ btnClose lboxWords - + diff --git a/kanagram/src/vocabsettings.cpp b/kanagram/src/vocabsettings.cpp index 730f9216..97d05162 100644 --- a/kanagram/src/vocabsettings.cpp +++ b/kanagram/src/vocabsettings.cpp @@ -16,7 +16,7 @@ #include "keduvocdocument.h" #include "kanagramsettings.h" -VocabSettings::VocabSettings(TQWidget *parent) : VocabSettingsWidget(parent) +VocabSettings::VocabSettings(TQWidget *tqparent) : VocabSettingsWidget(tqparent) { connect(btnCreateNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNew())); connect(btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit())); @@ -37,7 +37,7 @@ void VocabSettings::refreshView() m_fileList = KGlobal::dirs()->findAllResources("appdata", "data/" + KanagramSettings::dataLanguage() + "/" + "*.kvtml"); for(uint i = 0; i < m_fileList.size(); i++) { - KEduVocDocument *doc = new KEduVocDocument(this); + KEduVocDocument *doc = new KEduVocDocument(TQT_TQOBJECT(this)); doc->open(KURL(m_fileList[i]), false); TQListViewItem *item = new TQListViewItem(lviewVocab, 0); item->setText( 0, doc->getTitle() ); diff --git a/kanagram/src/vocabsettings.h b/kanagram/src/vocabsettings.h index 7b86720f..a2e30c1d 100644 --- a/kanagram/src/vocabsettings.h +++ b/kanagram/src/vocabsettings.h @@ -6,8 +6,9 @@ class VocabSettings : public VocabSettingsWidget { Q_OBJECT + TQ_OBJECT public: - VocabSettings(TQWidget *parent); + VocabSettings(TQWidget *tqparent); ~VocabSettings(); void refreshView(); diff --git a/kanagram/src/vocabsettingswidget.ui b/kanagram/src/vocabsettingswidget.ui index b329da4e..8a6c988e 100644 --- a/kanagram/src/vocabsettingswidget.ui +++ b/kanagram/src/vocabsettingswidget.ui @@ -1,10 +1,10 @@ VocabSettingsWidget - + VocabSettingsWidget - + 0 0 @@ -19,23 +19,23 @@ unnamed - + - layout3 + tqlayout3 unnamed - + - layout1 + tqlayout1 unnamed - + btnCreateNew @@ -46,7 +46,7 @@ Creates a new vocabulary. - + btnEdit @@ -57,7 +57,7 @@ Edits the selected vocabulary. - + btnDelete @@ -70,7 +70,7 @@ - + Title @@ -110,8 +110,8 @@ - + createNew() - - + + diff --git a/kbruch/ChangeLog b/kbruch/ChangeLog index 688ef69f..be301b7b 100644 --- a/kbruch/ChangeLog +++ b/kbruch/ChangeLog @@ -1,6 +1,6 @@ 2003-04-28 Sebastian Stein - * fixed layout problem with help of Dominique Devries + * fixed tqlayout problem with help of Dominique Devries * compiler warnings () removed by Dominique Devries @@ -10,7 +10,7 @@ 2003-04-24 Sebastian Stein - * experiments with the layout problem, but found no solution + * experiments with the tqlayout problem, but found no solution * removed #define TRUE, used type bool instead diff --git a/kbruch/src/exercisebase.cpp b/kbruch/src/exercisebase.cpp index 649bb6c8..f7be0fdc 100644 --- a/kbruch/src/exercisebase.cpp +++ b/kbruch/src/exercisebase.cpp @@ -25,8 +25,8 @@ /* ----- public member functions ----- */ /* constructor */ -ExerciseBase::ExerciseBase(TQWidget * parent, const char * name): - TQWidget(parent, name) +ExerciseBase::ExerciseBase(TQWidget * tqparent, const char * name): + TQWidget(tqparent, name) { #ifdef DEBUG kdDebug() << "constructor ExerciseBase()" << endl; diff --git a/kbruch/src/exercisebase.h b/kbruch/src/exercisebase.h index 87fe03b5..cd0428d9 100644 --- a/kbruch/src/exercisebase.h +++ b/kbruch/src/exercisebase.h @@ -33,13 +33,14 @@ * * \author Sebastian Stein * */ -class ExerciseBase : public QWidget +class ExerciseBase : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - ExerciseBase(TQWidget * parent = 0, const char * name = 0); + ExerciseBase(TQWidget * tqparent = 0, const char * name = 0); /** destructor */ ~ExerciseBase(); diff --git a/kbruch/src/exercisecompare.cpp b/kbruch/src/exercisecompare.cpp index f6652e56..295698fb 100644 --- a/kbruch/src/exercisecompare.cpp +++ b/kbruch/src/exercisecompare.cpp @@ -22,7 +22,7 @@ #include #include -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include #include @@ -35,8 +35,8 @@ /* ----- public member functions ----- */ /* constructor */ -ExerciseCompare::ExerciseCompare(TQWidget * parent, const char * name): - ExerciseBase(parent, name) +ExerciseCompare::ExerciseCompare(TQWidget * tqparent, const char * name): + ExerciseBase(tqparent, name) { #ifdef DEBUG kdDebug() << "constructor ExerciseCompare()" << endl; @@ -123,13 +123,13 @@ ExerciseCompare::ExerciseCompare(TQWidget * parent, const char * name): m_checkButton->setText(i18n("&Check Task")); m_checkButton->setDefault(true); // is the default button of the dialog TQToolTip::add(m_checkButton, i18n("Click on this button to check your result.")); - lowerHBox->addWidget(m_checkButton, 1, Qt::AlignRight); + lowerHBox->addWidget(m_checkButton, 1, TQt::AlignRight); TQObject::connect(m_checkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckButtonClicked())); // that the user can start typing without moving the focus m_signButton->setFocus(); - // show the whole layout + // show the whole tqlayout baseWidget->show(); // add tooltip and qwhatsthis help to the widget @@ -144,7 +144,7 @@ ExerciseCompare::~ExerciseCompare() kdDebug() << "destructor ExerciseCompare()" << endl; #endif - /* no need to delete any child widgets, Qt does it by itself */ + /* no need to delete any child widgets, TQt does it by itself */ } /** resets the current state, creates a new task and count the last task as @@ -300,10 +300,10 @@ void ExerciseCompare::slotCheckButtonClicked() void ExerciseCompare::slotSignButtonClicked() { // in RTL desktops, we still need to allign the - // execise to the left. On Qt4, you can set the direction - // of the layout to LTR (instead of inherit), but on Qt3 + // execise to the left. On TQt4, you can set the direction + // of the tqlayout to LTR (instead of inherit), but on TQt3 // the only way of fixing it is inserting the widgets in reversed - // order to the layout. + // order to the tqlayout. // // But... as an ugly hack, we can also display the "other" operation // thats damm ugly, but will work as well :) diff --git a/kbruch/src/exercisecompare.h b/kbruch/src/exercisecompare.h index 6ae8a4e5..bb944a8c 100644 --- a/kbruch/src/exercisecompare.h +++ b/kbruch/src/exercisecompare.h @@ -45,10 +45,11 @@ class TQVBoxLayout; class ExerciseCompare : public ExerciseBase { Q_OBJECT + TQ_OBJECT public: /** constructor */ - ExerciseCompare(TQWidget * parent = 0, const char * name = 0); + ExerciseCompare(TQWidget * tqparent = 0, const char * name = 0); /** destructor */ ~ExerciseCompare(); diff --git a/kbruch/src/exerciseconvert.cpp b/kbruch/src/exerciseconvert.cpp index 967c960d..6112db90 100644 --- a/kbruch/src/exerciseconvert.cpp +++ b/kbruch/src/exerciseconvert.cpp @@ -24,7 +24,7 @@ #include #include -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include #include @@ -41,8 +41,8 @@ /* ----- public member functions ----- */ /* constructor */ -ExerciseConvert::ExerciseConvert(TQWidget * parent, const char * name): - ExerciseBase(parent, name) +ExerciseConvert::ExerciseConvert(TQWidget * tqparent, const char * name): + ExerciseBase(tqparent, name) { #ifdef DEBUG kdDebug() << "constructor ExerciseConvert()" << endl; @@ -119,10 +119,10 @@ ExerciseConvert::ExerciseConvert(TQWidget * parent, const char * name): // --- that is the end of the horizontal line --- // in RTL desktops, we still need to allign the - // execise to the left. On Qt4, you can set the direction - // of the layout to LTR (instead of inherit), but on Qt3 + // execise to the left. On TQt4, you can set the direction + // of the tqlayout to LTR (instead of inherit), but on TQt3 // the only way of fixing it is inserting the widgets in reversed - // order to the layout. + // order to the tqlayout. // // if you need help with this feel free to contact me - Diego ) // This should fix parts of bug #116831 @@ -157,13 +157,13 @@ ExerciseConvert::ExerciseConvert(TQWidget * parent, const char * name): m_checkButton->setText(i18n("&Check Task")); m_checkButton->setDefault(true); // is the default button of the dialog TQToolTip::add(m_checkButton, i18n("Click on this button to check your result. The button will not work if you have not entered a result yet.")); - lowerHBox->addWidget(m_checkButton, 1, Qt::AlignRight); + lowerHBox->addWidget(m_checkButton, 1, TQt::AlignRight); TQObject::connect(m_checkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckButtonClicked())); // that the user can start typing without moving the focus numer_edit->setFocus(); - // show the whole layout + // show the whole tqlayout baseWidget->show(); // add tooltip and qwhatsthis help to the widget @@ -178,7 +178,7 @@ ExerciseConvert::~ExerciseConvert() kdDebug() << "destructor ExerciseConvert()" << endl; #endif - /* no need to delete any child widgets, Qt does it by itself */ + /* no need to delete any child widgets, TQt does it by itself */ } /** resets the current state, creates a new task and count the last task as diff --git a/kbruch/src/exerciseconvert.h b/kbruch/src/exerciseconvert.h index fcd733ec..9d7413cd 100644 --- a/kbruch/src/exerciseconvert.h +++ b/kbruch/src/exerciseconvert.h @@ -43,10 +43,11 @@ class TQVBoxLayout; class ExerciseConvert : public ExerciseBase { Q_OBJECT + TQ_OBJECT public: /** constructor */ - ExerciseConvert(TQWidget * parent = 0, const char * name = 0); + ExerciseConvert(TQWidget * tqparent = 0, const char * name = 0); /** destructor */ ~ExerciseConvert(); diff --git a/kbruch/src/exercisefactorize.cpp b/kbruch/src/exercisefactorize.cpp index 3a2d64dd..30c09de7 100644 --- a/kbruch/src/exercisefactorize.cpp +++ b/kbruch/src/exercisefactorize.cpp @@ -24,7 +24,7 @@ #include #include -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include #include @@ -44,8 +44,8 @@ /* ----- public member functions ----- */ /* constructor */ -ExerciseFactorize::ExerciseFactorize(TQWidget * parent, const char * name): - ExerciseBase(parent, name) +ExerciseFactorize::ExerciseFactorize(TQWidget * tqparent, const char * name): + ExerciseBase(tqparent, name) { TQPalette pal; TQColorGroup cg; @@ -64,40 +64,40 @@ ExerciseFactorize::ExerciseFactorize(TQWidget * parent, const char * name): Form1Layout = new TQVBoxLayout( this, 11, 6, "Form1Layout"); - layout9 = new TQVBoxLayout( 0, 0, 6, "layout9"); + tqlayout9 = new TQVBoxLayout( 0, 0, 6, "tqlayout9"); // The following method fix the problem in // bug #116831, reverse order in RTL desktops. // Amit Ramon amit.ramon@kdemail.net - layout4 = createFactorsLayout(); - layout9->addLayout(layout4); + tqlayout4 = createFactorsLayout(); + tqlayout9->addLayout(tqlayout4); spacer2 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); - layout9->addItem( spacer2 ); + tqlayout9->addItem( spacer2 ); - layout2 = new TQVBoxLayout( 0, 0, 6, "layout2"); + tqlayout2 = new TQVBoxLayout( 0, 0, 6, "tqlayout2"); // The following method fix the problem in // bug #116831, reverse order in RTL desktops. // Amit Ramon amit.ramon@kdemail.net - layout1 = createButtonsLayout(); - layout2->addLayout(layout1); + tqlayout1 = createButtonsLayout(); + tqlayout2->addLayout(tqlayout1); m_removeLastFactorButton = new TQPushButton( this, "m_removeLastFactorButton" ); - layout2->addWidget( m_removeLastFactorButton ); - layout9->addLayout( layout2 ); + tqlayout2->addWidget( m_removeLastFactorButton ); + tqlayout9->addLayout( tqlayout2 ); spacer4 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); - layout9->addItem( spacer4 ); + tqlayout9->addItem( spacer4 ); - layout7 = new TQHBoxLayout( 0, 0, 6, "layout7"); + tqlayout7 = new TQHBoxLayout( 0, 0, 6, "tqlayout7"); spacer3 = new TQSpacerItem( 361, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - layout7->addItem( spacer3 ); + tqlayout7->addItem( spacer3 ); m_checkButton = new TQPushButton( this, "m_checkButton" ); - layout7->addWidget( m_checkButton ); - layout9->addLayout( layout7 ); - Form1Layout->addLayout( layout9 ); + tqlayout7->addWidget( m_checkButton ); + tqlayout9->addLayout( tqlayout7 ); + Form1Layout->addLayout( tqlayout9 ); // the current task TQString tmp_str; @@ -181,7 +181,7 @@ ExerciseFactorize::~ExerciseFactorize() kdDebug() << "destructor ExerciseFactorize()" << endl; #endif - /* no need to delete any child widgets, Qt does it by itself */ + /* no need to delete any child widgets, TQt does it by itself */ } /** resets the current state, creates a new task and count the last task as @@ -228,16 +228,16 @@ void ExerciseFactorize::update() // // The following method was added to fix -// bug #116831 (reverse layout in RTL desktops) +// bug #116831 (reverse tqlayout in RTL desktops) // Amit Ramon amit.ramon@kdemail.net // -/** Create the layout that hold the exercise widgets +/** Create the tqlayout that hold the exercise widgets */ TQHBoxLayout* ExerciseFactorize::createFactorsLayout() { // first create all widgets - TQHBoxLayout* layout = new TQHBoxLayout( 0, 0, 6, "layout4"); + TQHBoxLayout* tqlayout = new TQHBoxLayout( 0, 0, 6, "tqlayout4"); m_taskLabel = new TQLabel( this, "m_taskLabel" ); @@ -258,46 +258,46 @@ TQHBoxLayout* ExerciseFactorize::createFactorsLayout() spacer1 = new TQSpacerItem( 25, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - // now add the widgets to the layout. + // now add the widgets to the tqlayout. // if we are in a RTL desktop, add them // in a reverse order if (TQApplication::reverseLayout()) { - layout->addItem( spacer1 ); - layout->addWidget( result_label ); - layout->addWidget( m_factorsWidget ); - layout->addWidget( m_factorsEnteredEdit ); - layout->addWidget( m_equalSignLabel ); - layout->addWidget( m_taskLabel ); + tqlayout->addItem( spacer1 ); + tqlayout->addWidget( result_label ); + tqlayout->addWidget( m_factorsWidget ); + tqlayout->addWidget( m_factorsEnteredEdit ); + tqlayout->addWidget( m_equalSignLabel ); + tqlayout->addWidget( m_taskLabel ); } else { - layout->addWidget( m_taskLabel ); - layout->addWidget( m_equalSignLabel ); - layout->addWidget( m_factorsEnteredEdit ); - layout->addWidget( m_factorsWidget ); - layout->addWidget( result_label ); - layout->addItem( spacer1 ); + tqlayout->addWidget( m_taskLabel ); + tqlayout->addWidget( m_equalSignLabel ); + tqlayout->addWidget( m_factorsEnteredEdit ); + tqlayout->addWidget( m_factorsWidget ); + tqlayout->addWidget( result_label ); + tqlayout->addItem( spacer1 ); } - return layout; + return tqlayout; } // // The following method was added to fix -// bug #116831 (reverse layout in RTL desktops) +// bug #116831 (reverse tqlayout in RTL desktops) // Amit Ramon amit.ramon@kdemail.net // -/** Create the layout that hold the exercise widgets +/** Create the tqlayout that hold the exercise widgets */ TQGridLayout* ExerciseFactorize::createButtonsLayout() { const int _COLS = 4; // number of buttons in each row const int _ROWS = 2; // number of rows - TQGridLayout* layout = new TQGridLayout( 0, 1, 1, 0, 6, "layout1"); + TQGridLayout* tqlayout = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayout1"); // first row buttons m_factor2Button = new TQPushButton( this, "m_factor2Button" ); @@ -348,12 +348,12 @@ TQGridLayout* ExerciseFactorize::createButtonsLayout() for (int col = 0; col < _COLS; col++) { - layout->addWidget(buttons[row][buttonIdx], row, col ); + tqlayout->addWidget(buttons[row][buttonIdx], row, col ); buttonIdx += step; } } - return layout; + return tqlayout; } diff --git a/kbruch/src/exercisefactorize.h b/kbruch/src/exercisefactorize.h index 41a89066..0e36d016 100644 --- a/kbruch/src/exercisefactorize.h +++ b/kbruch/src/exercisefactorize.h @@ -60,10 +60,11 @@ const uint possibleTasks[numberPossibleTasks] = {4, 6, 8, 9, 10, 12, 14, 15, 16, class ExerciseFactorize : public ExerciseBase { Q_OBJECT + TQ_OBJECT public: /** constructor */ - ExerciseFactorize(TQWidget * parent = 0, const char * name = 0); + ExerciseFactorize(TQWidget * tqparent = 0, const char * name = 0); /** destructor */ ~ExerciseFactorize(); @@ -115,14 +116,14 @@ private: // // the following two methods were added to fix - // bug #116831 (reverse layout in RTL desktops) + // bug #116831 (reverse tqlayout in RTL desktops) // Amit Ramon amit.ramon@kdemail.net // - /** create the factor widgets layout */ + /** create the factor widgets tqlayout */ TQHBoxLayout* createFactorsLayout(); - /** create the (answer) buttons layout */ + /** create the (answer) buttons tqlayout */ TQGridLayout* createButtonsLayout(); @@ -135,14 +136,14 @@ private: protected: TQVBoxLayout* Form1Layout; - TQVBoxLayout* layout9; + TQVBoxLayout* tqlayout9; TQSpacerItem* spacer4; - TQHBoxLayout* layout4; + TQHBoxLayout* tqlayout4; TQSpacerItem* spacer1; TQSpacerItem* spacer2; - TQVBoxLayout* layout2; - TQGridLayout* layout1; - TQHBoxLayout* layout7; + TQVBoxLayout* tqlayout2; + TQGridLayout* tqlayout1; + TQHBoxLayout* tqlayout7; TQSpacerItem* spacer3; private slots: diff --git a/kbruch/src/factorizedwidget.cpp b/kbruch/src/factorizedwidget.cpp index c6501d4e..4a106a0f 100644 --- a/kbruch/src/factorizedwidget.cpp +++ b/kbruch/src/factorizedwidget.cpp @@ -18,11 +18,11 @@ #include "factorizedwidget.h" #include "factorizedwidget.moc" -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include -FactorizedWidget::FactorizedWidget(TQWidget * parent, const char * name, const uintList para_factors) : - FractionBaseWidget(parent, name), m_factors(para_factors) +FactorizedWidget::FactorizedWidget(TQWidget * tqparent, const char * name, const uintList para_factors) : + FractionBaseWidget(tqparent, name), m_factors(para_factors) { #ifdef DEBUG kdDebug() << "constructor FactorizedWidget" << endl; @@ -57,7 +57,7 @@ void FactorizedWidget::paintEvent(TQPaintEvent* /* p_paintEvent */) paint.setFont(m_font); // set the pen for painting - TQPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); pen.setWidth(0); paint.setPen(pen); diff --git a/kbruch/src/factorizedwidget.h b/kbruch/src/factorizedwidget.h index 0ed79511..6c9f7bdf 100644 --- a/kbruch/src/factorizedwidget.h +++ b/kbruch/src/factorizedwidget.h @@ -35,10 +35,11 @@ typedef TQValueList uintList; class FactorizedWidget : public FractionBaseWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - FactorizedWidget(TQWidget * parent, const char * name, const uintList para_factors); + FactorizedWidget(TQWidget * tqparent, const char * name, const uintList para_factors); /** destructor */ ~FactorizedWidget(); diff --git a/kbruch/src/fractionbasewidget.cpp b/kbruch/src/fractionbasewidget.cpp index 07f60c84..0e1d4d0b 100644 --- a/kbruch/src/fractionbasewidget.cpp +++ b/kbruch/src/fractionbasewidget.cpp @@ -21,13 +21,13 @@ /* these includes are needed for KDE support */ #include -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include "settingsclass.h" -FractionBaseWidget::FractionBaseWidget(TQWidget * parent = 0, const char * name = 0) : - TQWidget(parent, name) +FractionBaseWidget::FractionBaseWidget(TQWidget * tqparent = 0, const char * name = 0) : + TQWidget(tqparent, name) { #ifdef DEBUG kdDebug() << "constructor FractionBaseWidget" << endl; @@ -68,14 +68,14 @@ void FractionBaseWidget::paintRatio(TQPainter & paint, ratio tmp_ratio, int & x_ // 5 5 int_numerator = tmp_ratio.numerator(); int_denominator = tmp_ratio.denominator(); - if (show_mixed == true && QABS(int_numerator) >= QABS(int_denominator)) + if (show_mixed == true && TQABS(int_numerator) >= TQABS(int_denominator)) { // calculate the mixed number int_mixed = int(int_numerator / int_denominator); // the negative sign is in front of the mixed number - int_numerator = QABS(int_numerator); - int_denominator = QABS(int_denominator); + int_numerator = TQABS(int_numerator); + int_denominator = TQABS(int_denominator); // we have to reduce the numerator by the mixed number * denominator int_numerator = int_numerator % int_denominator; @@ -92,7 +92,7 @@ void FractionBaseWidget::paintRatio(TQPainter & paint, ratio tmp_ratio, int & x_ // don't show the ratio as mixed number str_numerator.setNum(int_numerator); str_denominator.setNum(int_denominator); - } // if (show_mixed == true && QABS(int_numerator) > QABS(int_denominator)) + } // if (show_mixed == true && TQABS(int_numerator) > TQABS(int_denominator)) // get the text width of the current ratio fontWidth = fm.width(str_numerator); @@ -161,7 +161,7 @@ void FractionBaseWidget::setColorAndFont() /* set font */ m_font = SettingsClass::taskFont(); - // repaint + // tqrepaint update(); return; diff --git a/kbruch/src/fractionbasewidget.h b/kbruch/src/fractionbasewidget.h index 21b2fdc8..942c2780 100644 --- a/kbruch/src/fractionbasewidget.h +++ b/kbruch/src/fractionbasewidget.h @@ -33,18 +33,19 @@ /*! base class for painting fractions * * \author Sebastian Stein */ -class FractionBaseWidget : public QWidget +class FractionBaseWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - FractionBaseWidget(TQWidget * parent, const char * name); + FractionBaseWidget(TQWidget * tqparent, const char * name); /** destructor */ ~FractionBaseWidget(); - /** updates the widget by first getting the settings and then repainting */ + /** updates the widget by first getting the settings and then tqrepainting */ void updateAndRepaint(); protected: diff --git a/kbruch/src/kbruch.cpp b/kbruch/src/kbruch.cpp index df74101e..aaca2b02 100644 --- a/kbruch/src/kbruch.cpp +++ b/kbruch/src/kbruch.cpp @@ -23,7 +23,7 @@ #include #include -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include #include @@ -48,10 +48,10 @@ int main(int argc, char * argv[]) KApplication kbruch; - MainQtWidget * kbruchApp = new MainQtWidget(); + MainTQtWidget * kbruchApp = new MainTQtWidget(); kbruch.setMainWidget(kbruchApp); kbruchApp->show(); - /* lets execute the Qt GUI; it will handle all cmd options which are left */ + /* lets execute the TQt GUI; it will handle all cmd options which are left */ return kbruch.exec(); } diff --git a/kbruch/src/kbruch.h b/kbruch/src/kbruch.h index e0f5ca0e..a79dccb5 100644 --- a/kbruch/src/kbruch.h +++ b/kbruch/src/kbruch.h @@ -31,7 +31,7 @@ static const char description[] = I18N_NOOP("KBruch"); -class MainQtWidget; +class MainTQtWidget; class task; class ratio; class primzahl; diff --git a/kbruch/src/mainqtwidget.cpp b/kbruch/src/mainqtwidget.cpp index 3ac59d46..7212f56a 100644 --- a/kbruch/src/mainqtwidget.cpp +++ b/kbruch/src/mainqtwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - mainqtwidget.cpp - The main Qt/KDE window + mainqtwidget.cpp - The main TQt/KDE window ------------------- begin : Tue Mar 16 00:00:00 CET 2003 copyright : (C) 2003-2004 by Sebastian Stein @@ -46,10 +46,10 @@ /* ------ public member functions ------ */ -MainQtWidget::MainQtWidget() +MainTQtWidget::MainTQtWidget() { #ifdef DEBUG - kdDebug() << "constructor MainQtWidget" << endl; + kdDebug() << "constructor MainTQtWidget" << endl; #endif // get the settings @@ -62,7 +62,7 @@ MainQtWidget::MainQtWidget() // we split the main view into 2 parts, one for the tasks, one for the // statistics - TQSplitter* splitter = new TQSplitter(TQSplitter::Horizontal, this,"TQSplitter"); + TQSplitter* splitter = new TQSplitter(Qt::Horizontal, this,TQSPLITTER_OBJECT_NAME_STRING); setCentralWidget(splitter); // the iconlist, where the user can choose the different exercises @@ -109,21 +109,21 @@ MainQtWidget::MainQtWidget() #if (KDE_VERSION_MINOR>=3) && (KDE_VERSION_MAJOR>=3) #else - resize(TQSize(QMAX(toolBar()->sizeHint().width(), sizeHint().width()), sizeHint().height())); + resize(TQSize(TQMAX(toolBar()->tqsizeHint().width(), tqsizeHint().width()), tqsizeHint().height())); #endif // now show the last exercise m_exercises->showPage(SettingsClass::activeExercise()); slotAboutToShowPage(m_exercises->pageWidget(m_exercises->activePageIndex())); } -MainQtWidget::~MainQtWidget() +MainTQtWidget::~MainTQtWidget() { } /* ------ private member functions ------ */ -void MainQtWidget::readOptions() +void MainTQtWidget::readOptions() { m_addSub = SettingsClass::addsub(); m_mulDiv = SettingsClass::muldiv(); @@ -138,7 +138,7 @@ void MainQtWidget::readOptions() } } -void MainQtWidget::writeOptions() +void MainTQtWidget::writeOptions() { SettingsClass::setActiveExercise(m_exercises->activePageIndex()); @@ -151,23 +151,23 @@ void MainQtWidget::writeOptions() SettingsClass::writeConfig(); } -void MainQtWidget::setupActions() +void MainTQtWidget::setupActions() { // new task action m_NewTaskAction = new KAction(i18n("&New"), "filenew", KStdAccel::shortcut(KStdAccel::New), - this, TQT_SLOT(NewTask()), + TQT_TQOBJECT(this), TQT_SLOT(NewTask()), actionCollection(), "NewTask"); // quit action - KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); // - KStdAction::preferences(this, TQT_SLOT( slotPrefs() ), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotPrefs() ), actionCollection()); // a label just describing the Number of terms ComboBox m_NrOfTermsLabel = new TQLabel(i18n("Terms:"), 0, "kde toolbar widget"); m_NrOfTermsLabelAction = new KWidgetAction(m_NrOfTermsLabel, i18n("Terms:"), ALT+Key_E, - this, TQT_SLOT(NrOfTermsBoxSlot()), + TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsLabelAction"); // the ComboBox holding possible values for term number @@ -179,15 +179,15 @@ void MainQtWidget::setupActions() m_NrOfTermsBox->setCurrentItem(m_nrRatios - 2); TQToolTip::add( m_NrOfTermsBox, i18n( "The number of terms you want" ) ); TQWhatsThis::add( m_NrOfTermsBox, i18n( "Choose the number of terms (2, 3, 4 or 5) you want for calculating fractions." ) ); - m_NrOfTermsBoxAction = new KWidgetAction(m_NrOfTermsBox, i18n("Number of Terms"), ALT+Key_E, this, TQT_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsBoxAction"); + m_NrOfTermsBoxAction = new KWidgetAction(m_NrOfTermsBox, i18n("Number of Terms"), ALT+Key_E, TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsBoxAction"); // now connect the ComboBox's signal textChanged() to the slot function - TQObject::connect(m_NrOfTermsBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(NrOfTermsBoxSlot())); + TQObject::connect(m_NrOfTermsBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot())); // a label just describing the max. main denominator ComboBox m_MaxMainDenominatorLabel = new TQLabel(i18n("Max. main denominator:"), 0, "kde toolbar widget"); m_MaxMainDenominatorLabelAction = new KWidgetAction(m_MaxMainDenominatorLabel, i18n("Max. main denominator:"), ALT+Key_D, - this, TQT_SLOT(MaxMainDenominatorBoxSlot()), + TQT_TQOBJECT(this), TQT_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorLabelAction"); // the ComboBox holding possible values for the max. main denominator @@ -209,7 +209,7 @@ void MainQtWidget::setupActions() case 50 : m_MaxMainDenominatorBox->setCurrentItem(3); break; } - m_MaxMainDenominatorBoxAction = new KWidgetAction(m_MaxMainDenominatorBox, i18n("Maximal Main Denominator"), ALT+Key_D, this, TQT_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorBoxAction"); + m_MaxMainDenominatorBoxAction = new KWidgetAction(m_MaxMainDenominatorBox, i18n("Maximal Main Denominator"), ALT+Key_D, TQT_TQOBJECT(this), TQT_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorBoxAction"); // now connect the ComboBox's signal textChanged() to the slot function TQObject::connect(m_MaxMainDenominatorBox, TQT_SIGNAL(activated(int)), @@ -218,7 +218,7 @@ void MainQtWidget::setupActions() // a label just describing the operation ComboBox m_OperationLabel = new TQLabel(i18n("Operations:"), 0, "kde toolbar widget"); m_OperationLabelAction = new KWidgetAction(m_OperationLabel, i18n("Operations:"), ALT+Key_O, - this, TQT_SLOT(OperationBoxSlot()), + TQT_TQOBJECT(this), TQT_SLOT(OperationBoxSlot()), actionCollection(), "OperationLabelAction"); // the ComboBox holding possible combinations for operations @@ -236,14 +236,14 @@ void MainQtWidget::setupActions() } TQToolTip::add( m_OperationBox, i18n( "The operations you want" ) ); TQWhatsThis::add( m_OperationBox, i18n( "Choose the type of operations you want for calculating fractions: Addition/Substraction, Multiplication/Division or All Operations Mixed. If you choose All Operations Mixed, the program will randomly choose addition, substraction, multiplication and/or division." ) ); - m_OperationBoxAction = new KWidgetAction(m_OperationBox, i18n("Operations:"), ALT+Key_O, this, TQT_SLOT(OperationBoxSlot()), actionCollection(), "OperationBoxAction"); + m_OperationBoxAction = new KWidgetAction(m_OperationBox, i18n("Operations:"), ALT+Key_O, TQT_TQOBJECT(this), TQT_SLOT(OperationBoxSlot()), actionCollection(), "OperationBoxAction"); // now connect the ComboBox's signal textChanged() to the slot function TQObject::connect(m_OperationBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(OperationBoxSlot())); #if (KDE_VERSION_MINOR>=3) && (KDE_VERSION_MAJOR>=3) if (!initialGeometrySet()) - resize( TQSize(725, 330).expandedTo(minimumSizeHint())); + resize( TQSize(725, 330).expandedTo(tqminimumSizeHint())); setupGUI(ToolBar | Keys | StatusBar | Create); setAutoSaveSettings(); #endif @@ -252,10 +252,10 @@ void MainQtWidget::setupActions() /* ------ private slots ------ */ -void MainQtWidget::NewTask() +void MainTQtWidget::NewTask() { #ifdef DEBUG - kdDebug() << "NewTask MainQtWidget" << endl; + kdDebug() << "NewTask MainTQtWidget" << endl; kdDebug() << "pageIndex(m_taskview): " << m_exercises->pageIndex(m_taskview) << endl; kdDebug() << "pageIndex(m_exerciseCompare): " << m_exercises->pageIndex(m_exerciseCompare) << endl; kdDebug() << "pageIndex(m_exerciseConvert): " << m_exercises->pageIndex(m_exerciseConvert) << endl; @@ -307,10 +307,10 @@ void MainQtWidget::NewTask() return; } -void MainQtWidget::NrOfTermsBoxSlot() +void MainTQtWidget::NrOfTermsBoxSlot() { #ifdef DEBUG - kdDebug() << "MainQtWidget::NrOfTermsBoxSlot()" << endl; + kdDebug() << "MainTQtWidget::NrOfTermsBoxSlot()" << endl; #endif TQString curr_nr = m_NrOfTermsBox->currentText(); m_MaxMainDenominatorBox->clear(); @@ -363,10 +363,10 @@ void MainQtWidget::NrOfTermsBoxSlot() (void) m_taskview->setTaskParameters(m_addSub, m_mulDiv, m_nrRatios, m_maxMainDenominator); } -void MainQtWidget::MaxMainDenominatorBoxSlot() +void MainTQtWidget::MaxMainDenominatorBoxSlot() { #ifdef DEBUG - kdDebug() << "MainQtWidget::MaxMainDenominatorBoxSlot()" << endl; + kdDebug() << "MainTQtWidget::MaxMainDenominatorBoxSlot()" << endl; #endif // get the max. size from the ComboBox, convert it to a number and store @@ -378,10 +378,10 @@ void MainQtWidget::MaxMainDenominatorBoxSlot() (void) m_taskview->setTaskParameters(m_addSub, m_mulDiv, m_nrRatios, m_maxMainDenominator); } -void MainQtWidget::OperationBoxSlot() +void MainTQtWidget::OperationBoxSlot() { #ifdef DEBUG - kdDebug() << "MainQtWidget::OperationBoxSlot()" << endl; + kdDebug() << "MainTQtWidget::OperationBoxSlot()" << endl; #endif int index = m_OperationBox->currentItem(); // get selected item @@ -413,7 +413,7 @@ void MainQtWidget::OperationBoxSlot() (void) m_taskview->setTaskParameters(m_addSub, m_mulDiv, m_nrRatios, m_maxMainDenominator); } -void MainQtWidget::slotPrefs() +void MainTQtWidget::slotPrefs() { // do not show dialog twice if (KConfigDialog::showDialog("settings")) @@ -444,7 +444,7 @@ void MainQtWidget::slotPrefs() return; } -void MainQtWidget::slotApplySettings() +void MainTQtWidget::slotApplySettings() { // update the task view m_taskview->update(); @@ -455,10 +455,10 @@ void MainQtWidget::slotApplySettings() return; } -void MainQtWidget::slotAboutToShowPage(TQWidget * page) +void MainTQtWidget::slotAboutToShowPage(TQWidget * page) { #ifdef DEBUG - kdDebug() << "slotAboutToShowPage MainQtWidget" << endl; + kdDebug() << "slotAboutToShowPage MainTQtWidget" << endl; kdDebug() << "pageIndex(m_taskview): " << m_exercises->pageIndex(m_taskview) << endl; kdDebug() << "pageIndex(m_exerciseCompare): " << m_exercises->pageIndex(m_exerciseCompare) << endl; kdDebug() << "pageIndex(m_exerciseConvert): " << m_exercises->pageIndex(m_exerciseConvert) << endl; @@ -480,7 +480,7 @@ void MainQtWidget::slotAboutToShowPage(TQWidget * page) return; } -bool MainQtWidget::queryExit() +bool MainTQtWidget::queryExit() { writeOptions(); return true; diff --git a/kbruch/src/mainqtwidget.h b/kbruch/src/mainqtwidget.h index 2ecb96f4..989a998e 100644 --- a/kbruch/src/mainqtwidget.h +++ b/kbruch/src/mainqtwidget.h @@ -1,5 +1,5 @@ /*************************************************************************** - mainqtwidget.h - The main Qt/KDE window + mainqtwidget.h - The main TQt/KDE window ------------------- begin : Tue Mar 16 00:00:00 CET 2003 copyright : (C) 2003-2004 by Sebastian Stein @@ -14,8 +14,8 @@ * (at your option) any later version. * * * ***************************************************************************/ -#ifndef MAINQTWIDGET_H -#define MAINQTWIDGET_H +#ifndef MAINTQTWIDGET_H +#define MAINTQTWIDGET_H #include @@ -37,16 +37,17 @@ class TaskView; * \author Sebastian Stein * \author Eva Brucherseifer **/ -class MainQtWidget : public KMainWindow +class MainTQtWidget : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** constructor */ - MainQtWidget(); + MainTQtWidget(); /** destructor */ - ~MainQtWidget(); + ~MainTQtWidget(); private: /** read the config file */ @@ -142,4 +143,4 @@ class MainQtWidget : public KMainWindow bool queryExit(); }; -#endif // MainQtWidget +#endif // MainTQtWidget diff --git a/kbruch/src/ratio.cpp b/kbruch/src/ratio.cpp index e3a79a36..0ba1e1c4 100644 --- a/kbruch/src/ratio.cpp +++ b/kbruch/src/ratio.cpp @@ -192,9 +192,9 @@ bool ratio::operator==(ratio right) signed short orig_sign = 1, right_sign = 1; /* we do not check the presign at this point */ - if (QABS(m_numerator) != QABS(right.numerator())) + if (TQABS(m_numerator) != TQABS(right.numerator())) return false; - if (QABS(m_denominator) != QABS(right.denominator())) + if (TQABS(m_denominator) != TQABS(right.denominator())) return false; /* check if the signs of the ratios are equivalent */ diff --git a/kbruch/src/rationalwidget.cpp b/kbruch/src/rationalwidget.cpp index f930d882..d0d0d546 100644 --- a/kbruch/src/rationalwidget.cpp +++ b/kbruch/src/rationalwidget.cpp @@ -18,12 +18,12 @@ #include "rationalwidget.h" #include "rationalwidget.moc" -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include -RationalWidget::RationalWidget(TQWidget * parent, const char * name, const TQString pnumber, const uint pperiodStart, const uint pperiodLength): - FractionBaseWidget(parent, name), m_number(pnumber), +RationalWidget::RationalWidget(TQWidget * tqparent, const char * name, const TQString pnumber, const uint pperiodStart, const uint pperiodLength): + FractionBaseWidget(tqparent, name), m_number(pnumber), m_periodStart(pperiodStart), m_periodLength(pperiodLength) { #ifdef DEBUG @@ -64,7 +64,7 @@ void RationalWidget::paintEvent(TQPaintEvent* /* p_paintEvent */) paint.setFont(m_font); // set the pen for painting - TQPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); pen.setWidth(0); paint.setPen(pen); diff --git a/kbruch/src/rationalwidget.h b/kbruch/src/rationalwidget.h index f03598ba..cccae714 100644 --- a/kbruch/src/rationalwidget.h +++ b/kbruch/src/rationalwidget.h @@ -34,10 +34,11 @@ class TQString; class RationalWidget : public FractionBaseWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - RationalWidget(TQWidget * parent, const char * name, const TQString pnumber, const uint pperiodStart = 1, const uint pperiodLength = 0); + RationalWidget(TQWidget * tqparent, const char * name, const TQString pnumber, const uint pperiodStart = 1, const uint pperiodLength = 0); /** destructor */ ~RationalWidget(); diff --git a/kbruch/src/ratiowidget.cpp b/kbruch/src/ratiowidget.cpp index 17f1cf04..ae92f09c 100644 --- a/kbruch/src/ratiowidget.cpp +++ b/kbruch/src/ratiowidget.cpp @@ -18,12 +18,12 @@ #include "ratiowidget.h" #include "ratiowidget.moc" -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include -RatioWidget::RatioWidget(TQWidget * parent = 0, const char * name = 0, +RatioWidget::RatioWidget(TQWidget * tqparent = 0, const char * name = 0, const ratio para_ratio = *new ratio()) : - FractionBaseWidget(parent, name), m_ratio(para_ratio) + FractionBaseWidget(tqparent, name), m_ratio(para_ratio) { #ifdef DEBUG kdDebug() << "constructor RatioWidget" << endl; @@ -56,7 +56,7 @@ void RatioWidget::paintEvent(TQPaintEvent* /* p_paintEvent */) paint.setFont(m_font); // set the pen for painting - TQPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); pen.setWidth(0); paint.setPen(pen); diff --git a/kbruch/src/ratiowidget.h b/kbruch/src/ratiowidget.h index 8a64d3d4..c861741d 100644 --- a/kbruch/src/ratiowidget.h +++ b/kbruch/src/ratiowidget.h @@ -33,10 +33,11 @@ class RatioWidget : public FractionBaseWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - RatioWidget(TQWidget * parent, const char * name, const ratio para_ratio); + RatioWidget(TQWidget * tqparent, const char * name, const ratio para_ratio); /** destructor */ ~RatioWidget(); diff --git a/kbruch/src/resultwidget.cpp b/kbruch/src/resultwidget.cpp index 7f493408..853e73da 100644 --- a/kbruch/src/resultwidget.cpp +++ b/kbruch/src/resultwidget.cpp @@ -18,14 +18,14 @@ #include "resultwidget.h" #include "resultwidget.moc" -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include "settingsclass.h" -ResultWidget::ResultWidget(TQWidget * parent = 0, const char * name = 0, +ResultWidget::ResultWidget(TQWidget * tqparent = 0, const char * name = 0, const ratio para_result = *new ratio()) : - FractionBaseWidget(parent, name), m_result(para_result) + FractionBaseWidget(tqparent, name), m_result(para_result) { #ifdef DEBUG kdDebug() << "constructor ResultWidget" << endl; @@ -58,7 +58,7 @@ void ResultWidget::paintEvent(TQPaintEvent* /* p_paintEvent */) paint.setFont(m_font); // set the pen for painting - TQPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); pen.setWidth(0); paint.setPen(pen); @@ -73,7 +73,7 @@ void ResultWidget::paintEvent(TQPaintEvent* /* p_paintEvent */) paintMiddle(paint, TQString("="), old_x, fm, m_colorOperation); paintRatio(paint, m_result, old_x, fm, false); - if (SettingsClass::showSpecialRatioNotation() == true && QABS(m_result.numerator()) >= QABS(m_result.denominator())) + if (SettingsClass::showSpecialRatioNotation() == true && TQABS(m_result.numerator()) >= TQABS(m_result.denominator())) { // result as mixed number paintMiddle(paint, TQString("="), old_x, fm, m_colorOperation); diff --git a/kbruch/src/resultwidget.h b/kbruch/src/resultwidget.h index b42c3776..c742d1be 100644 --- a/kbruch/src/resultwidget.h +++ b/kbruch/src/resultwidget.h @@ -33,10 +33,11 @@ class ResultWidget : public FractionBaseWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - ResultWidget(TQWidget * parent, const char * name, const ratio para_result); + ResultWidget(TQWidget * tqparent, const char * name, const ratio para_result); /** destructor */ ~ResultWidget(); diff --git a/kbruch/src/statisticsview.cpp b/kbruch/src/statisticsview.cpp index d6b8ff37..b3fee887 100644 --- a/kbruch/src/statisticsview.cpp +++ b/kbruch/src/statisticsview.cpp @@ -18,7 +18,7 @@ #include "statisticsview.h" #include "statisticsview.moc" -/* the includes are needed for Qt support */ +/* the includes are needed for TQt support */ #include #include #include @@ -31,8 +31,8 @@ #include "settingsclass.h" /* constructor */ -StatisticsView::StatisticsView(TQWidget * parent, const char * name): - TQWidget(parent, name), m_count(0), m_correct(0) +StatisticsView::StatisticsView(TQWidget * tqparent, const char * name): + TQWidget(tqparent, name), m_count(0), m_correct(0) { #ifdef DEBUG kdDebug() << "constructor StatisticsView()" << endl; @@ -48,17 +48,17 @@ StatisticsView::StatisticsView(TQWidget * parent, const char * name): /* set the caption of the window */ // setCaption(i18n("Statistics")); - /* add a layout as a base */ - layout1 = new TQVBoxLayout(this); - layout1->setSpacing(6); - layout1->setMargin(6); + /* add a tqlayout as a base */ + tqlayout1 = new TQVBoxLayout(this); + tqlayout1->setSpacing(6); + tqlayout1->setMargin(6); /* now add a v-spacer */ TQSpacerItem * v_spacer = new TQSpacerItem(1, 1); - layout1->addItem(v_spacer); + tqlayout1->addItem(v_spacer); /* create a grid to show the labels */ - labelGrid = new TQGridLayout(layout1, 3, 2); + labelGrid = new TQGridLayout(tqlayout1, 3, 2); /* add 6 labels to the grid */ info1Label = new TQLabel(this); @@ -112,10 +112,10 @@ StatisticsView::StatisticsView(TQWidget * parent, const char * name): /* now add a v-spacer */ v_spacer = new TQSpacerItem(1, 1); - layout1->addItem(v_spacer); + tqlayout1->addItem(v_spacer); /* the Reset button */ - buttonLayout = new TQHBoxLayout(layout1); + buttonLayout = new TQHBoxLayout(tqlayout1); resetBtn = new TQPushButton(i18n("&Reset"), this); TQObject::connect(resetBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetStatistics())); buttonLayout->addWidget(resetBtn); @@ -142,7 +142,7 @@ StatisticsView::~StatisticsView() SettingsClass::setCorrect(m_correct); SettingsClass::writeConfig(); - /* no need to delete any child widgets, Qt does it by itself */ + /* no need to delete any child widgets, TQt does it by itself */ } /* called, if a task solved correctly */ @@ -150,14 +150,14 @@ void StatisticsView::addCorrect() { ++m_count; ++m_correct; - (void) calc(); /* repaint the statistics */ + (void) calc(); /* tqrepaint the statistics */ } /* called, if a task was solved wrong */ void StatisticsView::addWrong() { ++m_count; - (void) calc(); /* repaint the statistics */ + (void) calc(); /* tqrepaint the statistics */ } @@ -169,7 +169,7 @@ void StatisticsView::calc() TQString new_text; TQString number; - new_text = TQString("%1").arg(m_count); + new_text = TQString("%1").tqarg(m_count); result1Label->setText(new_text); /* we have to be careful with division by 0 */ @@ -179,11 +179,11 @@ void StatisticsView::calc() result3Label->setText("- (- %)"); } else { /* set the correct label */ - new_text = TQString("%1 (%2 %)").arg(m_correct).arg(int(double(m_correct) / m_count * 100)); + new_text = TQString("%1 (%2 %)").tqarg(m_correct).tqarg(int(double(m_correct) / m_count * 100)); result2Label->setText(new_text); /* set the incorrect label */ - new_text = TQString("%1 (%2 %)").arg(m_count - m_correct).arg(int(double(m_count - m_correct) / m_count * 100)); + new_text = TQString("%1 (%2 %)").tqarg(m_count - m_correct).tqarg(int(double(m_count - m_correct) / m_count * 100)); result3Label->setText(new_text); } } diff --git a/kbruch/src/statisticsview.h b/kbruch/src/statisticsview.h index b7948761..60ea147c 100644 --- a/kbruch/src/statisticsview.h +++ b/kbruch/src/statisticsview.h @@ -34,13 +34,14 @@ class TQGridLayout; * \author Eva Brucherseifer */ -class StatisticsView : public QWidget +class StatisticsView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - StatisticsView(TQWidget * parent = 0, const char * name = 0); + StatisticsView(TQWidget * tqparent = 0, const char * name = 0); /** destructor */ ~StatisticsView(); @@ -65,7 +66,7 @@ private: TQPushButton * resetBtn; TQHBoxLayout * buttonLayout; - TQVBoxLayout * layout1; + TQVBoxLayout * tqlayout1; TQGridLayout * labelGrid; TQLabel * result1Label; TQLabel * result2Label; diff --git a/kbruch/src/taskview.cpp b/kbruch/src/taskview.cpp index a15520a8..6318c7bf 100644 --- a/kbruch/src/taskview.cpp +++ b/kbruch/src/taskview.cpp @@ -24,7 +24,7 @@ #include #include -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include #include #include @@ -38,9 +38,9 @@ /* ----- public member functions ----- */ /* constructor */ -TaskView::TaskView(TQWidget * parent, const char * name, bool padd_sub, +TaskView::TaskView(TQWidget * tqparent, const char * name, bool padd_sub, bool pmul_div, unsigned int pnr_ratios, unsigned int pmax_md): - ExerciseBase(parent, name), add_sub(padd_sub), mul_div(pmul_div), + ExerciseBase(tqparent, name), add_sub(padd_sub), mul_div(pmul_div), nr_ratios(pnr_ratios), max_md(pmax_md) { #ifdef DEBUG @@ -113,10 +113,10 @@ TaskView::TaskView(TQWidget * parent, const char * name, bool padd_sub, // --- that is the end of the horizontal line --- // in RTL desktops, we still need to allign the - // execise to the left. On Qt4, you can set the direction - // of the layout to LTR (instead of inherit), but on Qt3 + // execise to the left. On TQt4, you can set the direction + // of the tqlayout to LTR (instead of inherit), but on TQt3 // the only way of fixing it is inserting the widgets in reversed - // order to the layout. + // order to the tqlayout. // // if you need help with this feel free to contact me - Diego ) // This should fix parts of bug #116831 @@ -152,16 +152,16 @@ TaskView::TaskView(TQWidget * parent, const char * name, bool padd_sub, m_checkButton->setText(i18n("&Check Task")); m_checkButton->setDefault(true); // is the default button of the dialog TQToolTip::add(m_checkButton, i18n("Click on this button to check your result. The button will not work if you have not entered a result yet.")); - lowerHBox->addWidget(m_checkButton, 1, Qt::AlignRight); + lowerHBox->addWidget(m_checkButton, 1, TQt::AlignRight); TQObject::connect(m_checkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckButtonClicked())); // that the user can start typing without moving the focus numer_edit->setFocus(); - // show the whole layout + // show the whole tqlayout baseWidget->show(); - // show the whole layout + // show the whole tqlayout m_taskWidget->show(); m_resultWidget->hide(); @@ -177,7 +177,7 @@ TaskView::~TaskView() kdDebug() << "destructor TaskView()" << endl; #endif - /* no need to delete any child widgets, Qt does it by itself */ + /* no need to delete any child widgets, TQt does it by itself */ } /** the parameters of task generation can be set with this function */ diff --git a/kbruch/src/taskview.h b/kbruch/src/taskview.h index 961adce2..91e650b2 100644 --- a/kbruch/src/taskview.h +++ b/kbruch/src/taskview.h @@ -51,10 +51,11 @@ class TQFrame; class TaskView : public ExerciseBase { Q_OBJECT + TQ_OBJECT public: /** constructor */ - TaskView(TQWidget * parent = 0, const char * name = 0, + TaskView(TQWidget * tqparent = 0, const char * name = 0, bool padd_sub = true, bool pmul_div = false, unsigned int pnr_ratios = 2, unsigned int pmax_md = 10); diff --git a/kbruch/src/taskvieweroptionsbase.ui b/kbruch/src/taskvieweroptionsbase.ui index 97cba6ed..92775120 100644 --- a/kbruch/src/taskvieweroptionsbase.ui +++ b/kbruch/src/taskvieweroptionsbase.ui @@ -1,10 +1,10 @@ TaskViewerOptionsBase - + TaskViewerOptionsBase - + 0 0 @@ -16,9 +16,9 @@ unnamed - + - layout2 + tqlayout2 @@ -40,9 +40,9 @@ Change the font of the numbers - + - colorGroupBox + tqcolorGroupBox @@ -55,11 +55,11 @@ Colors - + - layout7 + tqlayout7 - + 10 20 @@ -115,7 +115,7 @@ Change the color of the fraction bar - + fractionBarLabel @@ -131,7 +131,7 @@ Fraction bar: - + operationLabel @@ -165,7 +165,7 @@ Change the color of the numbers - + numberLabel @@ -184,7 +184,7 @@ - + groupBox2 @@ -195,7 +195,7 @@ unnamed - + kcfg_showSpecialRatioNotation @@ -214,7 +214,7 @@ - + kfontdialog.h kcolorbutton.h diff --git a/kbruch/src/taskwidget.cpp b/kbruch/src/taskwidget.cpp index 1807283e..795bc4cb 100644 --- a/kbruch/src/taskwidget.cpp +++ b/kbruch/src/taskwidget.cpp @@ -21,12 +21,12 @@ /* these includes are needed for KDE support */ #include -/* these includes are needed for Qt support */ +/* these includes are needed for TQt support */ #include -TaskWidget::TaskWidget(TQWidget * parent = 0, const char * name = 0, +TaskWidget::TaskWidget(TQWidget * tqparent = 0, const char * name = 0, const task para_task = *new task()) : - FractionBaseWidget(parent, name), m_task(para_task) + FractionBaseWidget(tqparent, name), m_task(para_task) { #ifdef DEBUG kdDebug() << "constructor TaskWidget" << endl; @@ -65,7 +65,7 @@ void TaskWidget::paintEvent(TQPaintEvent* /* p_paintEvent */) paint.setFont(m_font); // set the pen for painting - TQPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); pen.setWidth(0); paint.setPen(pen); diff --git a/kbruch/src/taskwidget.h b/kbruch/src/taskwidget.h index 2d7238ae..b2bd6f59 100644 --- a/kbruch/src/taskwidget.h +++ b/kbruch/src/taskwidget.h @@ -43,10 +43,11 @@ class TaskWidget : public FractionBaseWidget { Q_OBJECT + TQ_OBJECT public: /** constructor */ - TaskWidget(TQWidget * parent, const char * name, const task para_task); + TaskWidget(TQWidget * tqparent, const char * name, const task para_task); /** destructor */ ~TaskWidget(); diff --git a/kbruch/testcases/primenumber_test.cpp b/kbruch/testcases/primenumber_test.cpp index c0e322fb..0a5ee2b6 100644 --- a/kbruch/testcases/primenumber_test.cpp +++ b/kbruch/testcases/primenumber_test.cpp @@ -36,52 +36,52 @@ class primenumber_test /** test the prime number algorithm */ void test_isPrimeNumber() { - BOOST_REQUIRE(m_primenumber.isPrimeNumber(0) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(2) == 1); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(3) == 1); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(4) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(5) == 1); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(6) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(7) == 1); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(8) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(9) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(23) == 1); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(9) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(9) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(6) == 0); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(101) == 1); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(323) == 0); // 17 * 19 - BOOST_REQUIRE(m_primenumber.isPrimeNumber(1001) == 0); // 7 * 143 - BOOST_REQUIRE(m_primenumber.isPrimeNumber(1002) == 0); // 2 * 501 - BOOST_REQUIRE(m_primenumber.isPrimeNumber(3) == 1); - BOOST_REQUIRE(m_primenumber.isPrimeNumber(2) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(0) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(2) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(3) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(4) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(5) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(6) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(7) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(8) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(9) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(23) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(9) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(9) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(6) == 0); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(101) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(323) == 0); // 17 * 19 + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(1001) == 0); // 7 * 143 + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(1002) == 0); // 2 * 501 + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(3) == 1); + BOOST_RETQUIRE(m_primenumber.isPrimeNumber(2) == 1); } /** test the get_first() function */ void test_get_first() { - BOOST_REQUIRE(m_primenumber.get_first() == 2); + BOOST_RETQUIRE(m_primenumber.get_first() == 2); } /** test the move and get functions */ void test_move_get_func() { m_primenumber.move_first(); - BOOST_REQUIRE(m_primenumber.get_current() == 2); - BOOST_REQUIRE(m_primenumber.get_next() == 3); + BOOST_RETQUIRE(m_primenumber.get_current() == 2); + BOOST_RETQUIRE(m_primenumber.get_next() == 3); m_primenumber.move_forward(); - BOOST_REQUIRE(m_primenumber.get_current() == 5); + BOOST_RETQUIRE(m_primenumber.get_current() == 5); m_primenumber.move_back(); - BOOST_REQUIRE(m_primenumber.get_current() == 3); + BOOST_RETQUIRE(m_primenumber.get_current() == 3); unsigned int tmp = m_primenumber.get_last(); m_primenumber.move_last(); - BOOST_REQUIRE(m_primenumber.get_current() == tmp); + BOOST_RETQUIRE(m_primenumber.get_current() == tmp); m_primenumber.move_forward(); - BOOST_REQUIRE(m_primenumber.get_last() != tmp); + BOOST_RETQUIRE(m_primenumber.get_last() != tmp); } private: diff --git a/kbruch/testcases/ratio_test.cpp b/kbruch/testcases/ratio_test.cpp index bdc4419b..0dac9dfe 100644 --- a/kbruch/testcases/ratio_test.cpp +++ b/kbruch/testcases/ratio_test.cpp @@ -38,29 +38,29 @@ class ratio_test { // check basic initialisation ratio * ratio_a = new ratio(); - BOOST_REQUIRE(ratio_a->numerator() == 0); - BOOST_REQUIRE(ratio_a->denominator() == 1); + BOOST_RETQUIRE(ratio_a->numerator() == 0); + BOOST_RETQUIRE(ratio_a->denominator() == 1); // a denominator with value 0 is never allowed ratio * ratio_b = new ratio(2, 0); - BOOST_REQUIRE(ratio_b->numerator() == 2); - BOOST_REQUIRE(ratio_b->denominator() == 1); // division by zero not allowed + BOOST_RETQUIRE(ratio_b->numerator() == 2); + BOOST_RETQUIRE(ratio_b->denominator() == 1); // division by zero not allowed // a new ratio should always be reduced ratio * ratio_c = new ratio(2, 4); - BOOST_REQUIRE(ratio_c->numerator() == 1); - BOOST_REQUIRE(ratio_c->denominator() == 2); + BOOST_RETQUIRE(ratio_c->numerator() == 1); + BOOST_RETQUIRE(ratio_c->denominator() == 2); // check copy constructor ratio * ratio_d = new ratio(*ratio_c); - BOOST_REQUIRE(ratio_d->numerator() == 1); - BOOST_REQUIRE(ratio_d->denominator() == 2); + BOOST_RETQUIRE(ratio_d->numerator() == 1); + BOOST_RETQUIRE(ratio_d->denominator() == 2); // the copy constructor is not allowed to reduce the new ratio ratio_d->setNumerator(4, false); ratio * ratio_e = new ratio(*ratio_d); - BOOST_REQUIRE(ratio_e->numerator() == 4); - BOOST_REQUIRE(ratio_e->denominator() == 2); + BOOST_RETQUIRE(ratio_e->numerator() == 4); + BOOST_RETQUIRE(ratio_e->denominator() == 2); delete(ratio_a); delete(ratio_b); @@ -77,33 +77,33 @@ class ratio_test // check setNumerator() and numerator() (get) ratio * ratio_a = new ratio(); ratio_a->setNumerator(10); - BOOST_REQUIRE(ratio_a->numerator() == 10); - BOOST_REQUIRE(ratio_a->denominator() == 1); + BOOST_RETQUIRE(ratio_a->numerator() == 10); + BOOST_RETQUIRE(ratio_a->denominator() == 1); // check setDenominator() and denominator() (get) ratio_a->setDenominator(7); - BOOST_REQUIRE(ratio_a->numerator() == 10); - BOOST_REQUIRE(ratio_a->denominator() == 7); + BOOST_RETQUIRE(ratio_a->numerator() == 10); + BOOST_RETQUIRE(ratio_a->denominator() == 7); // now check if the ratio gets reduced ratio_a->setNumerator(14); - BOOST_REQUIRE(ratio_a->numerator() == 2); - BOOST_REQUIRE(ratio_a->denominator() == 1); + BOOST_RETQUIRE(ratio_a->numerator() == 2); + BOOST_RETQUIRE(ratio_a->denominator() == 1); // lets do the same, but with out reducing ratio_a->setNumerator(14, false); ratio_a->setDenominator(7, false); - BOOST_REQUIRE(ratio_a->numerator() == 14); - BOOST_REQUIRE(ratio_a->denominator() == 7); + BOOST_RETQUIRE(ratio_a->numerator() == 14); + BOOST_RETQUIRE(ratio_a->denominator() == 7); // now the = operator ratio * ratio_b = new ratio(); *ratio_b = *ratio_a; - BOOST_REQUIRE(ratio_b->numerator() == 14); - BOOST_REQUIRE(ratio_b->denominator() == 7); + BOOST_RETQUIRE(ratio_b->numerator() == 14); + BOOST_RETQUIRE(ratio_b->denominator() == 7); // make sure we didn't just copied the pointers - BOOST_REQUIRE(ratio_a != ratio_b); + BOOST_RETQUIRE(ratio_a != ratio_b); delete(ratio_a); delete(ratio_b); @@ -116,13 +116,13 @@ class ratio_test { ratio ratio_a; ratio_a = 8; - BOOST_REQUIRE(ratio_a.numerator() == 8); - BOOST_REQUIRE(ratio_a.denominator() == 1); + BOOST_RETQUIRE(ratio_a.numerator() == 8); + BOOST_RETQUIRE(ratio_a.denominator() == 1); ratio ratio_b(2, 3); ratio_a = ratio_b; - BOOST_REQUIRE(ratio_a.numerator() == 2); - BOOST_REQUIRE(ratio_a.denominator() == 3); + BOOST_RETQUIRE(ratio_a.numerator() == 2); + BOOST_RETQUIRE(ratio_a.denominator() == 3); return; } @@ -140,29 +140,29 @@ class ratio_test // check + operator ratio ratio_c = *ratio_a + *ratio_b; - BOOST_REQUIRE(ratio_c.numerator() == 5); - BOOST_REQUIRE(ratio_c.denominator() == 2); + BOOST_RETQUIRE(ratio_c.numerator() == 5); + BOOST_RETQUIRE(ratio_c.denominator() == 2); // it should be the same if we change the addends ratio_c = *ratio_b + *ratio_a; - BOOST_REQUIRE(ratio_c.numerator() == 5); - BOOST_REQUIRE(ratio_c.denominator() == 2); + BOOST_RETQUIRE(ratio_c.numerator() == 5); + BOOST_RETQUIRE(ratio_c.denominator() == 2); // check - operator ratio_c = *ratio_b - *ratio_a; - BOOST_REQUIRE(ratio_c.numerator() == -3); - BOOST_REQUIRE(ratio_c.denominator() == 2); + BOOST_RETQUIRE(ratio_c.numerator() == -3); + BOOST_RETQUIRE(ratio_c.denominator() == 2); // it should not be the same if we change the subtrahends ratio_c = *ratio_a - *ratio_b; - BOOST_REQUIRE(ratio_c.numerator() == 3); - BOOST_REQUIRE(ratio_c.denominator() == 2); + BOOST_RETQUIRE(ratio_c.numerator() == 3); + BOOST_RETQUIRE(ratio_c.denominator() == 2); // now check if we can get 0/1 *ratio_a = *ratio_b; ratio_c = *ratio_a - *ratio_b; - BOOST_REQUIRE(ratio_c.numerator() == 0); - BOOST_REQUIRE(ratio_c.denominator() == 1); + BOOST_RETQUIRE(ratio_c.numerator() == 0); + BOOST_RETQUIRE(ratio_c.denominator() == 1); delete(ratio_a); delete(ratio_b); @@ -183,32 +183,32 @@ class ratio_test // check * operator ratio ratio_c = *ratio_a * *ratio_b; - BOOST_REQUIRE(ratio_c.numerator() == 1); - BOOST_REQUIRE(ratio_c.denominator() == 2); + BOOST_RETQUIRE(ratio_c.numerator() == 1); + BOOST_RETQUIRE(ratio_c.denominator() == 2); // it should be the same if we change the addends ratio_c = *ratio_b * *ratio_a; - BOOST_REQUIRE(ratio_c.numerator() == 1); - BOOST_REQUIRE(ratio_c.denominator() == 2); + BOOST_RETQUIRE(ratio_c.numerator() == 1); + BOOST_RETQUIRE(ratio_c.denominator() == 2); // check / operator ratio_c = *ratio_b / *ratio_a; - BOOST_REQUIRE(ratio_c.numerator() == 1); - BOOST_REQUIRE(ratio_c.denominator() == 8); + BOOST_RETQUIRE(ratio_c.numerator() == 1); + BOOST_RETQUIRE(ratio_c.denominator() == 8); // it should not be the same if we change the subtrahends ratio_c = *ratio_a / *ratio_b; - BOOST_REQUIRE(ratio_c.numerator() == 8); - BOOST_REQUIRE(ratio_c.denominator() == 1); + BOOST_RETQUIRE(ratio_c.numerator() == 8); + BOOST_RETQUIRE(ratio_c.denominator() == 1); // now check if we can get 0/1 *ratio_a = 0; ratio_c = *ratio_a * *ratio_b; - BOOST_REQUIRE(ratio_c.numerator() == 0); - BOOST_REQUIRE(ratio_c.denominator() == 1); + BOOST_RETQUIRE(ratio_c.numerator() == 0); + BOOST_RETQUIRE(ratio_c.denominator() == 1); ratio_c = *ratio_a / *ratio_b; - BOOST_REQUIRE(ratio_c.numerator() == 0); - BOOST_REQUIRE(ratio_c.denominator() == 1); + BOOST_RETQUIRE(ratio_c.numerator() == 0); + BOOST_RETQUIRE(ratio_c.denominator() == 1); delete(ratio_a); delete(ratio_b); @@ -221,8 +221,8 @@ class ratio_test { ratio ratio_a(2, 3); ratio_a.reziproc(); - BOOST_REQUIRE(ratio_a.numerator() == 3); - BOOST_REQUIRE(ratio_a.denominator() == 2); + BOOST_RETQUIRE(ratio_a.numerator() == 3); + BOOST_RETQUIRE(ratio_a.denominator() == 2); return; } @@ -234,8 +234,8 @@ class ratio_test ratio_a.setNumerator(51, false); ratio_a.setDenominator(17, false); ratio_a.reduce(); - BOOST_REQUIRE(ratio_a.numerator() == 3); - BOOST_REQUIRE(ratio_a.denominator() == 1); + BOOST_RETQUIRE(ratio_a.numerator() == 3); + BOOST_RETQUIRE(ratio_a.denominator() == 1); return; } @@ -249,11 +249,11 @@ class ratio_test ratio ratio_d(2, -3); ratio ratio_e(-2, 3); - BOOST_REQUIRE((ratio_a == ratio_a) == true); - BOOST_REQUIRE((ratio_a == ratio_b) == true); - BOOST_REQUIRE((ratio_a == ratio_c) == true); - BOOST_REQUIRE((ratio_a == ratio_d) == false); - BOOST_REQUIRE((ratio_a == ratio_e) == false); + BOOST_RETQUIRE((ratio_a == ratio_a) == true); + BOOST_RETQUIRE((ratio_a == ratio_b) == true); + BOOST_RETQUIRE((ratio_a == ratio_c) == true); + BOOST_RETQUIRE((ratio_a == ratio_d) == false); + BOOST_RETQUIRE((ratio_a == ratio_e) == false); return; } @@ -267,21 +267,21 @@ class ratio_test ratio ratio_d(2, -3); ratio ratio_e(-2, 3); - BOOST_REQUIRE((ratio_a < ratio_a) == false); - BOOST_REQUIRE((ratio_a < ratio_b) == false); - BOOST_REQUIRE((ratio_a < ratio_c) == false); - BOOST_REQUIRE((ratio_a < ratio_d) == false); - BOOST_REQUIRE((ratio_a < ratio_e) == false); + BOOST_RETQUIRE((ratio_a < ratio_a) == false); + BOOST_RETQUIRE((ratio_a < ratio_b) == false); + BOOST_RETQUIRE((ratio_a < ratio_c) == false); + BOOST_RETQUIRE((ratio_a < ratio_d) == false); + BOOST_RETQUIRE((ratio_a < ratio_e) == false); ratio_a = ratio(-2, 3); - BOOST_REQUIRE((ratio_a < ratio_a) == false); - BOOST_REQUIRE((ratio_a < ratio_b) == true); - BOOST_REQUIRE((ratio_a < ratio_c) == true); - BOOST_REQUIRE((ratio_a < ratio_d) == false); - BOOST_REQUIRE((ratio_a < ratio_e) == false); + BOOST_RETQUIRE((ratio_a < ratio_a) == false); + BOOST_RETQUIRE((ratio_a < ratio_b) == true); + BOOST_RETQUIRE((ratio_a < ratio_c) == true); + BOOST_RETQUIRE((ratio_a < ratio_d) == false); + BOOST_RETQUIRE((ratio_a < ratio_e) == false); - BOOST_REQUIRE((ratio(5, 8) < ratio(2, 1)) == true); + BOOST_RETQUIRE((ratio(5, 8) < ratio(2, 1)) == true); return; } @@ -296,21 +296,21 @@ class ratio_test ratio ratio_e(-2, 3); ratio ratio_f(-4, 3); - BOOST_REQUIRE((ratio_a > ratio_a) == false); - BOOST_REQUIRE((ratio_a > ratio_b) == false); - BOOST_REQUIRE((ratio_a > ratio_c) == false); - BOOST_REQUIRE((ratio_a > ratio_d) == true); - BOOST_REQUIRE((ratio_a > ratio_e) == true); - BOOST_REQUIRE((ratio_a > ratio_f) == true); + BOOST_RETQUIRE((ratio_a > ratio_a) == false); + BOOST_RETQUIRE((ratio_a > ratio_b) == false); + BOOST_RETQUIRE((ratio_a > ratio_c) == false); + BOOST_RETQUIRE((ratio_a > ratio_d) == true); + BOOST_RETQUIRE((ratio_a > ratio_e) == true); + BOOST_RETQUIRE((ratio_a > ratio_f) == true); ratio_a = ratio(-2, 3); - BOOST_REQUIRE((ratio_a > ratio_a) == false); - BOOST_REQUIRE((ratio_a > ratio_b) == false); - BOOST_REQUIRE((ratio_a > ratio_c) == false); - BOOST_REQUIRE((ratio_a > ratio_d) == false); - BOOST_REQUIRE((ratio_a > ratio_e) == false); - BOOST_REQUIRE((ratio_a > ratio_f) == true); + BOOST_RETQUIRE((ratio_a > ratio_a) == false); + BOOST_RETQUIRE((ratio_a > ratio_b) == false); + BOOST_RETQUIRE((ratio_a > ratio_c) == false); + BOOST_RETQUIRE((ratio_a > ratio_d) == false); + BOOST_RETQUIRE((ratio_a > ratio_e) == false); + BOOST_RETQUIRE((ratio_a > ratio_f) == true); return; } diff --git a/keduca/keduca/Makefile.am b/keduca/keduca/Makefile.am index fb713daf..a1199e17 100644 --- a/keduca/keduca/Makefile.am +++ b/keduca/keduca/Makefile.am @@ -4,7 +4,7 @@ INCLUDES= -I../libkeduca $(all_includes) # The binary program keduca bin_PROGRAMS = keduca keduca_LDFLAGS = $(all_libraries) -keduca_LDADD = $(LIB_KFILE) $(LIB_KPARTS) ../libkeduca/libkeduca.la +keduca_LDADD = $(LIB_KFILE) $(LIB_KPARTS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) ../libkeduca/libkeduca.la keduca_SOURCES = main.cpp keduca.cpp # Convenience library @@ -17,7 +17,7 @@ keduca_SOURCES = main.cpp keduca.cpp # The KParts Component kde_module_LTLIBRARIES = libkeducapart.la -libkeducapart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) +libkeducapart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) libkeducapart_la_LIBADD = ../libkeduca/libkeduca.la $(LIB_KPARTS) libkeducapart_la_SOURCES = keduca_part.cpp kradioeduca.cpp kquestion.cpp \ kgroupeduca.cpp keducaview.cpp keducaprefs.cpp \ diff --git a/keduca/keduca/configdialogbase.ui b/keduca/keduca/configdialogbase.ui index bb526841..18446407 100644 --- a/keduca/keduca/configdialogbase.ui +++ b/keduca/keduca/configdialogbase.ui @@ -1,10 +1,10 @@ ConfigDialogBase - + ConfigDialogBase - + 0 0 @@ -19,7 +19,7 @@ unnamed - + kcfg_ResultFinish @@ -30,7 +30,7 @@ unnamed - + testEnd @@ -38,7 +38,7 @@ At the end of the test - + afterEachQuestion @@ -48,7 +48,7 @@ - + orderingButtonGroup @@ -59,7 +59,7 @@ unnamed - + kcfg_RandomQuestions @@ -67,7 +67,7 @@ Show questions in random order - + kcfg_RandomAnswers @@ -87,7 +87,7 @@ Expanding - + 41 51 @@ -96,5 +96,5 @@ - + diff --git a/keduca/keduca/kcheckeduca.cpp b/keduca/keduca/kcheckeduca.cpp index a75c8478..996bbe04 100644 --- a/keduca/keduca/kcheckeduca.cpp +++ b/keduca/keduca/kcheckeduca.cpp @@ -21,7 +21,7 @@ #include #include -KCheckEduca::KCheckEduca(TQWidget *parent, const char *name ) : TQCheckBox(parent,name) +KCheckEduca::KCheckEduca(TQWidget *tqparent, const char *name ) : TQCheckBox(tqparent,name) { _doc = 0; KAcceleratorManager::setNoAccel( this ); @@ -38,7 +38,7 @@ void KCheckEduca::drawButtonLabel( TQPainter *p){ int extra_width, indicator_width; extra_width = 8; - indicator_width = style().pixelMetric(TQStyle::PM_IndicatorWidth, 0); + indicator_width = tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth, 0); y = 0; x = indicator_width + extra_width; //### @@ -61,14 +61,14 @@ void KCheckEduca::drawButtonLabel( TQPainter *p){ yo = (cr.height()-rh)/2; if ( !isEnabled() ) { - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); cg.setColor( TQColorGroup::Text, cg.light() ); _doc->draw(p, cr.x()+xo+1, cr.y()+yo+1, cr, cg, 0); } - _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, colorGroup(), 0); + _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, tqcolorGroup(), 0); if ( hasFocus() ) { -// TQRect br = style().itemRect( p, x, y, rw, rh+yo, +// TQRect br = tqstyle().tqitemRect( p, x, y, rw, rh+yo, // AlignLeft|AlignVCenter|ShowPrefix, // isEnabled(), // pixmap(), text().visual() ); @@ -80,6 +80,6 @@ void KCheckEduca::drawButtonLabel( TQPainter *p){ br.setBottom( br.bottom()+2); br = br.intersect( TQRect(0,0,rw, rh+yo ) ); - style().drawPrimitive( TQStyle::PE_FocusRect, p, br, colorGroup()); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, p, br, tqcolorGroup()); } } diff --git a/keduca/keduca/kcheckeduca.h b/keduca/keduca/kcheckeduca.h index 32ff3b81..ba854242 100644 --- a/keduca/keduca/kcheckeduca.h +++ b/keduca/keduca/kcheckeduca.h @@ -28,9 +28,10 @@ class KCheckEduca : public TQCheckBox { Q_OBJECT + TQ_OBJECT public: - KCheckEduca(TQWidget *parent=0, const char *name=0); + KCheckEduca(TQWidget *tqparent=0, const char *name=0); ~KCheckEduca(); protected: diff --git a/keduca/keduca/keduca.cpp b/keduca/keduca/keduca.cpp index 2ab99ea0..a09c1b3a 100644 --- a/keduca/keduca/keduca.cpp +++ b/keduca/keduca/keduca.cpp @@ -1,7 +1,7 @@ /*************************************************************************** keduca.cpp - description ------------------- - begin : mié may 23 20:36:15 CEST 2001 + begin : mi� may 23 20:36:15 CEST 2001 copyright : (C) 2001 by Javier Campos email : javi@asyris.org ***************************************************************************/ @@ -30,13 +30,13 @@ #include -Keduca::Keduca( TQWidget* parent, const char *name, WFlags f ) - : KParts::MainWindow( parent, name, f ), _part( 0 ) +Keduca::Keduca( TQWidget* tqparent, const char *name, WFlags f ) + : KParts::MainWindow( tqparent, name, f ), _part( 0 ) { setXMLFile( "keducaui.rc" ); _part = KParts::ComponentFactory::createPartInstanceFromLibrary< KParts::ReadOnlyPart > - ( "libkeducapart", this, name, this, "KEducaPart" ); + ( "libkeducapart", this, name, TQT_TQOBJECT(this), "KEducaPart" ); if ( _part ) { @@ -53,7 +53,7 @@ Keduca::Keduca( TQWidget* parent, const char *name, WFlags f ) kdFatal() << "The library \"libkeducapart\" could not be found. Aborting." << endl; } if (!initialGeometrySet()) - resize( TQSize(550, 450).expandedTo(minimumSizeHint())); + resize( TQSize(550, 450).expandedTo(tqminimumSizeHint())); } Keduca::~Keduca() @@ -63,17 +63,17 @@ Keduca::~Keduca() void Keduca::setupActions() { - KStdAction::open( this, TQT_SLOT( slotFileOpen() ), actionCollection() ); - (void)new KAction( i18n( "Open &Gallery..." ), 0, 0, this, TQT_SLOT( slotGallery() ), + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection() ); + (void)new KAction( i18n( "Open &Gallery..." ), 0, 0, TQT_TQOBJECT(this), TQT_SLOT( slotGallery() ), actionCollection(), "open_gallery" ); - _recentFiles = KStdAction::openRecent(this, TQT_SLOT ( slotFileOpenURL(const KURL &) ), + _recentFiles = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT ( slotFileOpenURL(const KURL &) ), actionCollection()); - KStdAction::quit(kapp, TQT_SLOT( quit() ), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT( quit() ), actionCollection()); } void Keduca::slotFileOpen() { - KURL url = KFileDialog::getOpenURL( TQString::null, "application/x-edu", this, i18n("Open Educa File") ); + KURL url = KFileDialog::getOpenURL( TQString(), "application/x-edu", this, i18n("Open Educa File") ); if( !url.isEmpty() ) slotFileOpenURL( url ); } diff --git a/keduca/keduca/keduca.h b/keduca/keduca/keduca.h index a997d36e..ad2d8f58 100644 --- a/keduca/keduca/keduca.h +++ b/keduca/keduca/keduca.h @@ -34,10 +34,11 @@ class Keduca : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: /** construtor */ - Keduca(TQWidget* parent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose); + Keduca(TQWidget* tqparent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose); /** destructor */ ~Keduca(); /** Open gallery window */ diff --git a/keduca/keduca/keduca_part.cpp b/keduca/keduca/keduca_part.cpp index bc9e5485..6b0e17aa 100644 --- a/keduca/keduca/keduca_part.cpp +++ b/keduca/keduca/keduca_part.cpp @@ -34,14 +34,14 @@ typedef KParts::GenericFactory KEducaPartFactory; K_EXPORT_COMPONENT_FACTORY( libkeducapart, KEducaPartFactory ) -KEducaPart::KEducaPart( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +KEducaPart::KEducaPart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList &/*args*/ ) - : KParts::ReadOnlyPart( parent, name ) + : KParts::ReadOnlyPart( tqparent, name ) { setInstance( KEducaPartFactory::instance() ); - m_view = new KEducaView( parentWidget, widgetName ); + m_view = new KEducaView( tqparentWidget, widgetName ); m_view->show(); setWidget( m_view ); diff --git a/keduca/keduca/keduca_part.h b/keduca/keduca/keduca_part.h index 418209a8..d19d597c 100644 --- a/keduca/keduca/keduca_part.h +++ b/keduca/keduca/keduca_part.h @@ -36,11 +36,12 @@ class KAboutData; class KEducaPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: /* * Constructor. */ - KEducaPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, + KEducaPart( TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList &args ); /* diff --git a/keduca/keduca/keducaprefs.cpp b/keduca/keduca/keducaprefs.cpp index bdd07677..1546e9ce 100644 --- a/keduca/keduca/keducaprefs.cpp +++ b/keduca/keduca/keducaprefs.cpp @@ -27,7 +27,7 @@ #include -KEducaPrefs::KEducaPrefs(TQWidget *parent, const char *name, bool modal ) : KDialogBase(IconList, i18n("Configure"), Ok|Cancel, Ok, parent, name, modal, true) +KEducaPrefs::KEducaPrefs(TQWidget *tqparent, const char *name, bool modal ) : KDialogBase(IconList, i18n("Configure"), Ok|Cancel, Ok, tqparent, name, modal, true) { setPageGeneral(); configRead(); @@ -45,10 +45,10 @@ void KEducaPrefs::setPageGeneral() TQButtonGroup *buttonGroup1 = new TQButtonGroup( mainFrame, "ButtonGroup1" ); buttonGroup1->setTitle( i18n( "General" ) ); buttonGroup1->setColumnLayout(0, Qt::Vertical ); - buttonGroup1->layout()->setSpacing( 0 ); - buttonGroup1->layout()->setMargin( 0 ); - TQVBoxLayout *buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() ); - buttonGroup1Layout->setAlignment( Qt::AlignTop ); + buttonGroup1->tqlayout()->setSpacing( 0 ); + buttonGroup1->tqlayout()->setMargin( 0 ); + TQVBoxLayout *buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->tqlayout() ); + buttonGroup1Layout->tqsetAlignment( TQt::AlignTop ); buttonGroup1Layout->setSpacing( 6 ); buttonGroup1Layout->setMargin( 11 ); @@ -63,10 +63,10 @@ void KEducaPrefs::setPageGeneral() TQGroupBox *GroupBox1 = new TQGroupBox( mainFrame, "GroupBox7" ); GroupBox1->setTitle( i18n( "Order" ) ); GroupBox1->setColumnLayout(0, Qt::Vertical ); - GroupBox1->layout()->setSpacing( 0 ); - GroupBox1->layout()->setMargin( 0 ); - TQVBoxLayout *GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); + GroupBox1->tqlayout()->setSpacing( 0 ); + GroupBox1->tqlayout()->setMargin( 0 ); + TQVBoxLayout *GroupBox1Layout = new TQVBoxLayout( GroupBox1->tqlayout() ); + GroupBox1Layout->tqsetAlignment( TQt::AlignTop ); GroupBox1Layout->setSpacing( 6 ); GroupBox1Layout->setMargin( 11 ); diff --git a/keduca/keduca/keducaprefs.h b/keduca/keduca/keducaprefs.h index 39efb2e2..5693489d 100644 --- a/keduca/keduca/keducaprefs.h +++ b/keduca/keduca/keducaprefs.h @@ -29,9 +29,10 @@ class KEducaPrefs : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KEducaPrefs(TQWidget *parent=0, const char *name=0, bool modal=true); + KEducaPrefs(TQWidget *tqparent=0, const char *name=0, bool modal=true); ~KEducaPrefs(); private: diff --git a/keduca/keduca/keducaview.cpp b/keduca/keduca/keducaview.cpp index 5c07c9c3..6207760f 100644 --- a/keduca/keduca/keducaview.cpp +++ b/keduca/keduca/keducaview.cpp @@ -37,8 +37,8 @@ #include #include -KEducaView::KEducaView( TQWidget *parent, const char *name ) - : TQWidgetStack( parent, name ), _keducaFile( 0 ), _timeoutTimer( 0 ) +KEducaView::KEducaView( TQWidget *tqparent, const char *name ) + : TQWidgetStack( tqparent, name ), _keducaFile( 0 ), _timeoutTimer( 0 ) { init(); } @@ -59,8 +59,8 @@ void KEducaView::init() { // Intro Screen _introWidget = new TQLabel( this, "introScreen" ); - _introWidget->setBackgroundColor( Qt::white ); - _introWidget->setAlignment( AlignCenter ); + _introWidget->setBackgroundColor( TQt::white ); + _introWidget->tqsetAlignment( AlignCenter ); _introWidget->setPixmap( TQPixmap( locate("data","keduca/pics/keduca_init.png") ) ); addWidget( _introWidget, 0 ); @@ -74,7 +74,7 @@ void KEducaView::init() // Question Widget _questionWidget = new TQVBox( this, "questionWidget" ); - _split = new TQSplitter( TQSplitter::Vertical, _questionWidget ); + _split = new TQSplitter( Qt::Vertical, _questionWidget ); _questionText = new KQuestion( _split, "kquestion" ); _buttonGroup = new KGroupEduca( _split, "ButtonGroup" ); _buttonGroup->setRadioButtonExclusive( true ); @@ -121,7 +121,7 @@ void KEducaView::slotButtonNext() _questionText->countdown(0); } - if( ( visibleWidget() == _questionWidget ) && !_isInitStatus ) + if( ( visibleWidget() == _questionWidget ) && !_isInittqStatus ) setResults(); _buttonGroup->clearAnswers(); @@ -147,7 +147,7 @@ void KEducaView::slotButtonNext() /** Button Save action */ void KEducaView::slotButtonSave() { - KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, this, "file dialog", true); + KFileDialog *dialog=new KFileDialog(TQString(), TQString(), this, "file dialog", true); dialog->setCaption( i18n("Save Results As") ); dialog->setKeepLocation( true ); dialog->setOperationMode( KFileDialog::Saving ); @@ -209,16 +209,16 @@ void KEducaView::showRecord() // SHOW QUESTION ******************************************************************* _questionText->setPixmap( _keducaFile->getPicturePixmap() ); questionTextTemp = "
\"icon\"/" ); - html.append( "" + i18n( "Electronic configuration: %1" ).arg( m_element->parsedOrbits() ) + "" ); + html.append( "" + i18n( "Electronic configuration: %1" ).tqarg( m_element->parsedOrbits() ) + "" ); html.append( "
\"icon\"/" ); - html.append( "" + i18n( "Density: %1" ).arg( m_element->adjustUnits( Element::DENSITY ) ) + "" ); + html.append( "" + i18n( "Density: %1" ).tqarg( m_element->adjustUnits( Element::DENSITY ) ) + "" ); html.append( "
\"icon\"/" ); - html.append( "" + i18n( "Covalent Radius: %1" ).arg( m_element->adjustRadius( Element::COVALENT ) ) + "" ); + html.append( "" + i18n( "Covalent Radius: %1" ).tqarg( m_element->adjustRadius( Element::COVALENT ) ) + "" ); html.append( "
\"icon\"/" ); - html.append( i18n( "Ionic Radius (Charge): %1 (%2)" ).arg( m_element->adjustRadius(Element::IONIC) ).arg( m_element->ioncharge() ) ); + html.append( i18n( "Ionic Radius (Charge): %1 (%2)" ).tqarg( m_element->adjustRadius(Element::IONIC) ).tqarg( m_element->ioncharge() ) ); html.append( "
\"icon\"/" ); - html.append( "" + i18n( "van der Waals Radius: %1" ).arg( m_element->adjustRadius(Element::VDW) ) + "" ); + html.append( "" + i18n( "van der Waals Radius: %1" ).tqarg( m_element->adjustRadius(Element::VDW) ) + "" ); html.append( "
\"icon\"/" ); - html.append( "" + i18n( "Atomic Radius: %1" ).arg( m_element->adjustRadius(Element::ATOMIC) ) + "" ); + html.append( "" + i18n( "Atomic Radius: %1" ).tqarg( m_element->adjustRadius(Element::ATOMIC) ) + "" ); html.append( "
\"icon\"/" ); - html.append( "" + i18n( "Mass: %1" ).arg( m_element->adjustUnits( Element::MASS ) ) + "" ); + html.append( "" + i18n( "Mass: %1" ).tqarg( m_element->adjustUnits( Element::MASS ) ) + "" ); html.append( "
\"icon\"/" ); html.append( m_element->adjustUnits( Element::DATE ) ); if ( !m_element->scientist( ).isEmpty() ) - html += "
" + i18n("It was discovered by %1").arg(m_element->scientist() ); + html += "
" + i18n("It was discovered by %1").tqarg(m_element->scientist() ); html.append( "
\"icon\"/" ); - html.append( i18n( "Abundance in crustal rocks: %1 ppm" ).arg( KGlobal::locale()->formatLong( m_element->abundance() ) ) ); + html.append( i18n( "Abundance in crustal rocks: %1 ppm" ).tqarg( KGlobal::locale()->formatLong( m_element->abundance() ) ) ); html.append( "
\"icon\"/" ); - html.append( i18n( "Mean mass: %1 u" ).arg( KalziumUtils::localizedValue( m_element->meanmass(), 6 ) ) ); + html.append( i18n( "Mean mass: %1 u" ).tqarg( KalziumUtils::localizedValue( m_element->meanmass(), 6 ) ) ); html.append( "
\"icon\"/" ); - html.append( i18n( "Origin of the name: %1" ).arg( m_element->nameOrigin() ) ); + html.append( i18n( "Origin of the name: %1" ).tqarg( m_element->nameOrigin() ) ); html.append( "
\"icon\"/" ); - html.append( i18n( "Melting Point: %1" ).arg( m_element->adjustUnits( Element::MELTINGPOINT ) ) ); + html.append( i18n( "Melting Point: %1" ).tqarg( m_element->adjustUnits( Element::MELTINGPOINT ) ) ); html.append( "
\"icon\"/" ); - html.append( i18n( "Boiling Point: %1" ).arg( m_element->adjustUnits( Element::BOILINGPOINT ) ) ); + html.append( i18n( "Boiling Point: %1" ).tqarg( m_element->adjustUnits( Element::BOILINGPOINT ) ) ); html.append( "
\"icon\"/" ); - html.append( i18n( "Electronegativity: %1" ).arg( m_element->adjustUnits( Element::EN ) ) ); + html.append( i18n( "Electronegativity: %1" ).tqarg( m_element->adjustUnits( Element::EN ) ) ); html.append( "
\"icon\"/" ); - html.append( i18n( "Electron affinity: %1 " ).arg( m_element->adjustUnits(Element::EA) ) ); + html.append( i18n( "Electron affinity: %1 " ).tqarg( m_element->adjustUnits(Element::EA) ) ); html.append( "
\"icon\"/" ); html.append( i18n("the first variable is a number. The result is for example '1.' or '5.', the second is the value of the ionisation energy", - "%1. Ionization energy: %2" ).arg( TQString::number( i+1 ), m_element->adjustUnits( Element::IE, ionlist[i] ) ) ); + "%1. Ionization energy: %2" ).tqarg( TQString::number( i+1 ), m_element->adjustUnits( Element::IE, ionlist[i] ) ) ); html.append( "
" ); if ( ( *it )->weight() > 0.0 ) - html.append( i18n( "%1 u" ).arg( KalziumUtils::localizedValue( ( *it )->weight(), 6 ) ) ); - // html.append( i18n( "%1 u" ).arg( TQString::number( ( *it )->weight() ) )); + html.append( i18n( "%1 u" ).tqarg( KalziumUtils::localizedValue( ( *it )->weight(), 6 ) ) ); + // html.append( i18n( "%1 u" ).tqarg( TQString::number( ( *it )->weight() ) )); html.append( "" ); html.append( TQString::number( ( *it )->neutrons() ) ); html.append( "" ); if ( ( *it )->percentage() > 0.0 ) - html.append( i18n( "this can for example be '24%'", "%1%" ).arg( KalziumUtils::localizedValue( ( *it )->percentage(), 6 ) ) ); + html.append( i18n( "this can for example be '24%'", "%1%" ).tqarg( KalziumUtils::localizedValue( ( *it )->percentage(), 6 ) ) ); html.append( "" ); if ( ( *it )->halflife() > 0.0 ) { html.append( ( *it )->halflifeAsString() ); @@ -278,49 +278,49 @@ TQString DetailedInfoDlg::isotopeTable() html.append( "" ); if ( ( *it )->alphapercentage() > 0.0 ){ if ( ( *it )->alphadecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->alphadecay(), 6 ) ) ); - html.append( i18n( " %1" ).arg( TQChar( 945 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->alphadecay(), 6 ) ) ); + html.append( i18n( " %1" ).tqarg( TQChar( 945 ) ) ); if ( ( *it )->alphapercentage() < 100.0) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( (*it )->alphapercentage(), 6 ) ) ); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( (*it )->alphapercentage(), 6 ) ) ); if ( ( *it )->betaminuspercentage() > 0.0 || ( *it )->betapluspercentage() > 0.0 || ( *it )->ecpercentage() > 0.0) html.append( i18n( ", " ) ); } if ( ( *it )->betaminuspercentage() > 0.0 ){ if ( ( *it )->betaminusdecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->betaminusdecay(), 6 ) ) ); - html.append( i18n( " %1-" ).arg( TQChar( 946 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->betaminusdecay(), 6 ) ) ); + html.append( i18n( " %1-" ).tqarg( TQChar( 946 ) ) ); if ( ( *it )->betaminuspercentage() < 100.0) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( ( *it )->betaminuspercentage(), 6 ) )); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( ( *it )->betaminuspercentage(), 6 ) )); if ( ( *it )->betapluspercentage() > 0.0 || ( *it )->ecpercentage() > 0.0 ) html.append( i18n( ", " ) ); } if ( ( *it )->betapluspercentage() > 0.0 ){ if ( ( *it )->betaplusdecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->betaplusdecay(), 6 ) ) ); - html.append( i18n( " %1+" ).arg(TQChar( 946 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->betaplusdecay(), 6 ) ) ); + html.append( i18n( " %1+" ).tqarg(TQChar( 946 ) ) ); if ( ( *it )->betapluspercentage() == ( *it )->ecpercentage() ) { if ( ( *it )->ecdecay() > 0.0 ) { - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); } html.append( i18n( "Acronym of Electron Capture"," EC" ) ); } if ( ( *it )->betapluspercentage() < 100.0) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( ( *it )->betapluspercentage(), 6 ) ) ); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( ( *it )->betapluspercentage(), 6 ) ) ); html += " "; } if ( ( *it )->ecpercentage() > 0.0 && ( *it )->ecpercentage()!=( *it )->betapluspercentage()){ if ( ( *it )->ecdecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); html.append( i18n( "Acronym of Electron Capture"," EC" ) ); if ( ( *it )->ecpercentage() < 100.0 ) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( ( *it )->ecpercentage(), 6 ) ) ); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( ( *it )->ecpercentage(), 6 ) ) ); } html.append( "" ); html.append( ( *it )->spin() ); html.append( "" ); if ( !( *it )->magmoment().isEmpty() ) { TQString v = KGlobal::locale()->formatNumber( ( *it )->magmoment(), false, 6 ); - html.append( i18n( "%1 %2n" ).arg( v ).arg( TQChar( 956 ) ) ); + html.append( i18n( "%1 %2n" ).tqarg( v ).tqarg( TQChar( 956 ) ) ); } html.append( "
" + i18n( "Wavelength: %1 nm" ).arg( ( *it ).wavelength ) + "" + i18n( "Intensity: %1" ).arg( ( *it ).intensity ) + "" + i18n( "Probability: %1 108s-1" ).arg( ( *it ).aki ) + "" + i18n( "Energy 1: %1" ).arg( ( *it ).energy1 ) + "" + i18n( "Energy 2: %1" ).arg( ( *it ).energy2 ) + "" + i18n( "Electron Configuration 1: %1" ).arg( ( *it ).electronconfig1 ) + "" + i18n( "Electron Configuration 2: %1" ).arg( ( *it ).electronconfig2 ) + "" + i18n( "Term 1: %1" ).arg( ( *it ).term1 ) + "" + i18n( "Term 2: %1" ).arg( ( *it ).term2 ) + "" + i18n( "J 1: %1" ).arg( ( *it ).J1 ) + "" + i18n( "J 2: %1" ).arg( ( *it ).J2 ) + "" + i18n( "Wavelength: %1 nm" ).tqarg( ( *it ).wavelength ) + "" + i18n( "Intensity: %1" ).tqarg( ( *it ).intensity ) + "" + i18n( "Probability: %1 108s-1" ).tqarg( ( *it ).aki ) + "" + i18n( "Energy 1: %1" ).tqarg( ( *it ).energy1 ) + "" + i18n( "Energy 2: %1" ).tqarg( ( *it ).energy2 ) + "" + i18n( "Electron Configuration 1: %1" ).tqarg( ( *it ).electronconfig1 ) + "" + i18n( "Electron Configuration 2: %1" ).tqarg( ( *it ).electronconfig2 ) + "" + i18n( "Term 1: %1" ).tqarg( ( *it ).term1 ) + "" + i18n( "Term 2: %1" ).tqarg( ( *it ).term2 ) + "" + i18n( "J 1: %1" ).tqarg( ( *it ).J1 ) + "" + i18n( "J 2: %1" ).tqarg( ( *it ).J2 ) + "
" - + i18n("Question %1").arg(_keducaFileIndex) + ""; + + i18n("Question %1").tqarg(_keducaFileIndex) + ""; if( _keducaFile->getTotalPoints() > 0 ) questionTextTemp += "" - + _keducaFile->getQuestion( FileRead::QF_POINTS ) + + _keducaFile->getQuestion( FileRead::TQF_POINTS ) + " " + i18n("Points") + ""; questionTextTemp += "

" - + _keducaFile->getQuestion( FileRead::QF_TEXT ) + + _keducaFile->getQuestion( FileRead::TQF_TEXT ) + "
"; _questionText->setText( questionTextTemp ); @@ -261,15 +261,15 @@ void KEducaView::showRecord() // START THE TIMER ***************************************************************** - if( _keducaFile->getQuestionInt(FileRead::QF_TIME) > 0 ) + if( _keducaFile->getQuestionInt(FileRead::TQF_TIME) > 0 ) { KMessageBox::information( this, i18n( "You have %1 seconds to complete this question.\n\n" "Press OK when you are ready." ) - .arg( _keducaFile->getQuestion(FileRead::QF_TIME) ) ); + .tqarg( _keducaFile->getQuestion(FileRead::TQF_TIME) ) ); } - int timeout = _keducaFile->getQuestionInt(FileRead::QF_TIME); + int timeout = _keducaFile->getQuestionInt(FileRead::TQF_TIME); if (timeout > 0) { if (!_timeoutTimer) @@ -290,7 +290,7 @@ void KEducaView::showRecord() void KEducaView::questionTimedOut() { - _currentTime += _keducaFile->getQuestionInt(FileRead::QF_TIME); + _currentTime += _keducaFile->getQuestionInt(FileRead::TQF_TIME); slotButtonNext(); } @@ -353,13 +353,13 @@ void KEducaView::setResults() { _correctAnswer++; if( _keducaFile->getTotalPoints() > 0 ) - _correctPoints += _keducaFile->getQuestionInt(FileRead::QF_POINTS); + _correctPoints += _keducaFile->getQuestionInt(FileRead::TQF_POINTS); } else { _incorrectAnswer++; if( _keducaFile->getTotalPoints() > 0 ) - _incorrectPoints += _keducaFile->getQuestionInt(FileRead::QF_POINTS); + _incorrectPoints += _keducaFile->getQuestionInt(FileRead::TQF_POINTS); } _results += getTableQuestion( isCorrect, correctAnswer, yourAnswer ); @@ -404,7 +404,7 @@ bool KEducaView::openURL( const KURL &url) if ( !_keducaFile->openFile( url ) ) return false; - _isInitStatus = true; + _isInittqStatus = true; _results = ""; _correctAnswer = 0; _correctPoints = 0; @@ -436,12 +436,12 @@ void KEducaView::configWrite() Settings::writeConfig(); } -/** current Status Points */ +/** current tqStatus Points */ TQString KEducaView::currentStatusPoints() { - TQString tempStatus; + TQString temptqStatus; - tempStatus = insertTable() + temptqStatus = insertTable() + insertRow( i18n("Statistics"), true, 4) + insertRow( i18n("Correct questions"), TQString().setNum( _correctAnswer ), @@ -449,20 +449,20 @@ TQString KEducaView::currentStatusPoints() TQString().setNum( _incorrectAnswer ), true); if( _keducaFile->getTotalPoints() > 0 ) - tempStatus += insertRow( i18n("Total points"), true, 4 ) + temptqStatus += insertRow( i18n("Total points"), true, 4 ) + insertRow( i18n("Correct points"), TQString().setNum( _correctPoints ), i18n("Incorrect points"), TQString().setNum( _incorrectPoints ), true ); if( _keducaFile->getTotalTime() > 0 ) - tempStatus += insertRow( i18n("Time"), true, 4 ) + temptqStatus += insertRow( i18n("Time"), true, 4 ) + insertRow( i18n("Total time"), TQString().setNum( _keducaFile->getTotalTime() ), i18n("Time in tests"), TQString().setNum( _currentTime ), true ); - tempStatus += insertTableClose(); - return tempStatus; + temptqStatus += insertTableClose(); + return temptqStatus; } /** Set HTML table view with correct and incorrect answers */ @@ -476,10 +476,10 @@ TQString KEducaView::getTableQuestion( bool isCorrect, const TQString &correct, _currentResults += ">"; - _currentResults += "" + _keducaFile->getQuestion( FileRead::QF_TEXT ) + ""; + _currentResults += "" + _keducaFile->getQuestion( FileRead::TQF_TEXT ) + ""; - if( _keducaFile->getQuestionInt(FileRead::QF_POINTS) > 0 ) - _currentResults += " ( " + _keducaFile->getQuestion(FileRead::QF_POINTS) + " " + i18n("Points") + " )"; + if( _keducaFile->getQuestionInt(FileRead::TQF_POINTS) > 0 ) + _currentResults += " ( " + _keducaFile->getQuestion(FileRead::TQF_POINTS) + " " + i18n("Points") + " )"; _currentResults += "
"; @@ -503,15 +503,15 @@ TQString KEducaView::getTableQuestion( bool isCorrect, const TQString &correct, /** Define the next questions (random, secuencial) */ bool KEducaView::questionNext() { - if( !Settings::randomQuestions() && !_isInitStatus ) + if( !Settings::randomQuestions() && !_isInittqStatus ) { _keducaFile->recordNext(); return _keducaFile->recordEOF() ? false : true; } - if( _isInitStatus ) + if( _isInittqStatus ) { - _isInitStatus = false; + _isInittqStatus = false; if( !Settings::randomQuestions() ) return true; } diff --git a/keduca/keduca/keducaview.h b/keduca/keduca/keducaview.h index aa04df5e..0e70edd3 100644 --- a/keduca/keduca/keducaview.h +++ b/keduca/keduca/keducaview.h @@ -40,12 +40,13 @@ class KGroupEduca; *@author Javier Campos */ -class KEducaView : public QWidgetStack +class KEducaView : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: - KEducaView(TQWidget *parent=0, const char *name=0); + KEducaView(TQWidget *tqparent=0, const char *name=0); ~KEducaView(); /** Open url */ bool openURL( const KURL &url); @@ -114,7 +115,7 @@ private: /** Current results */ TQString _currentResults; /** If is init window */ - bool _isInitStatus; + bool _isInittqStatus; TQTimer *_timeoutTimer; /** Num of correct answers */ int _correctAnswer; diff --git a/keduca/keduca/kgroupeduca.cpp b/keduca/keduca/kgroupeduca.cpp index 9f7a2413..958134e2 100644 --- a/keduca/keduca/kgroupeduca.cpp +++ b/keduca/keduca/kgroupeduca.cpp @@ -22,7 +22,7 @@ #include -KGroupEduca::KGroupEduca(TQWidget *parent, const char *name ) : TQVButtonGroup(i18n("Answers"), parent, name) +KGroupEduca::KGroupEduca(TQWidget *tqparent, const char *name ) : TQVButtonGroup(i18n("Answers"), tqparent, name) { _sv = new TQScrollView(this); _sv->setVScrollBarMode(TQScrollView::Auto); @@ -54,7 +54,7 @@ void KGroupEduca::insertAnswer( const TQString& text) answer = new KCheckEduca( _vbox2 ); break; } - answer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0 ) ); + answer->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0 ) ); answer->setText( text ); answer->show(); insert(answer); @@ -73,7 +73,7 @@ void KGroupEduca::clearAnswers() for( unsigned int i=0 ; iisChecked(); } break; case Check: { - KCheckEduca *tmpCheckButton = (KCheckEduca*) find(id); + KCheckEduca *tmpCheckButton = (KCheckEduca*) tqfind(id); if(tmpCheckButton != 0) return tmpCheckButton->isChecked(); } break; diff --git a/keduca/keduca/kgroupeduca.h b/keduca/keduca/kgroupeduca.h index 532bb890..c7e574ca 100644 --- a/keduca/keduca/kgroupeduca.h +++ b/keduca/keduca/kgroupeduca.h @@ -27,11 +27,12 @@ */ class KGroupEduca : public TQVButtonGroup { Q_OBJECT + TQ_OBJECT public: enum ButtonType { Radio, Check }; - KGroupEduca(TQWidget *parent=0, const char *name=0); + KGroupEduca(TQWidget *tqparent=0, const char *name=0); ~KGroupEduca(); /** Insert a check or radio button */ void insertAnswer( const TQString& text); diff --git a/keduca/keduca/kquestion.cpp b/keduca/keduca/kquestion.cpp index 69a90fdd..d3473275 100644 --- a/keduca/keduca/kquestion.cpp +++ b/keduca/keduca/kquestion.cpp @@ -27,8 +27,8 @@ #include #include -KQuestion::KQuestion( TQWidget *parent, const char *name ) - : TQHBox( parent, name ), _countdownTimer( 0 ) +KQuestion::KQuestion( TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ), _countdownTimer( 0 ) { initGUI(); } @@ -42,16 +42,16 @@ void KQuestion::initGUI() { setFrameShape( TQFrame::Box ); setFrameShadow( TQFrame::Plain ); - setPalette( TQPalette( Qt::white ) ); + setPalette( TQPalette( TQt::white ) ); TQVBox *picBox = new TQVBox( this ); _picture = new TQLabel( picBox, "PixmapLabel1" ); _picture->setScaledContents( FALSE ); - _picture->setPalette( TQPalette( Qt::white ) ); + _picture->setPalette( TQPalette( TQt::white ) ); _countdownWidget = new KProgress( picBox ); - _countdownWidget->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, + _countdownWidget->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); _countdownWidget->setFormat( i18n( "%v seconds left" ) ); @@ -60,7 +60,7 @@ void KQuestion::initGUI() _view->setFrameShape( TQTextEdit::NoFrame ); _view->setHScrollBarMode( TQTextEdit::AlwaysOff ); _view->setTextFormat( TQTextEdit::RichText ); - _view->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, true ) ); + _view->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, true ) ); } /** Set text */ diff --git a/keduca/keduca/kquestion.h b/keduca/keduca/kquestion.h index 0f349580..b3368e5c 100644 --- a/keduca/keduca/kquestion.h +++ b/keduca/keduca/kquestion.h @@ -30,12 +30,13 @@ class KProgress; * The Widget that is used to display the Question. *@author Javier Campos Morales */ -class KQuestion : public QHBox +class KQuestion : public TQHBox { Q_OBJECT + TQ_OBJECT public: - KQuestion(TQWidget *parent=0, const char *name=0); + KQuestion(TQWidget *tqparent=0, const char *name=0); ~KQuestion(); /** Set pixmap */ void setPixmap( const TQPixmap pixmap); diff --git a/keduca/keduca/kradioeduca.cpp b/keduca/keduca/kradioeduca.cpp index 89b3e830..80c9cf89 100644 --- a/keduca/keduca/kradioeduca.cpp +++ b/keduca/keduca/kradioeduca.cpp @@ -20,7 +20,7 @@ #include #include -KRadioEduca::KRadioEduca(TQWidget *parent, const char *name) : TQRadioButton(parent,name) +KRadioEduca::KRadioEduca(TQWidget *tqparent, const char *name) : TQRadioButton(tqparent,name) { _doc=0; KAcceleratorManager::setNoAccel(this); @@ -37,7 +37,7 @@ void KRadioEduca::drawButtonLabel( TQPainter *p) int x, y, w, h; int extra_width, indicator_width; extra_width = 8; - indicator_width = style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); + indicator_width = tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); y = 0; x = indicator_width + extra_width; //### @@ -60,14 +60,14 @@ void KRadioEduca::drawButtonLabel( TQPainter *p) yo = (cr.height()-rh)/2; if (!isEnabled() ) { - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); cg.setColor( TQColorGroup::Text, cg.light() ); _doc->draw(p, cr.x()+xo+1, cr.y()+yo+1, cr, cg, 0); } - _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, colorGroup(), 0); + _doc->draw(p, cr.x()+xo, cr.y()+yo, cr, tqcolorGroup(), 0); if ( hasFocus() ) { -// TQRect br = style().itemRect( p, x, y, rw, rh+yo, +// TQRect br = tqstyle().tqitemRect( p, x, y, rw, rh+yo, // AlignLeft|AlignVCenter|ShowPrefix, // isEnabled(), // pixmap(), text().visual() ); @@ -78,6 +78,6 @@ void KRadioEduca::drawButtonLabel( TQPainter *p) br.setTop( br.top()-2 ); br.setBottom( br.bottom()+2); br = br.intersect( TQRect(0,0,rw, rh+yo ) ); - style().drawPrimitive( TQStyle::PE_FocusRect, p, br, colorGroup()); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, p, br, tqcolorGroup()); } } diff --git a/keduca/keduca/kradioeduca.h b/keduca/keduca/kradioeduca.h index f23c74a1..cf1a0b56 100644 --- a/keduca/keduca/kradioeduca.h +++ b/keduca/keduca/kradioeduca.h @@ -27,9 +27,10 @@ */ class KRadioEduca : public TQRadioButton { Q_OBJECT + TQ_OBJECT public: - KRadioEduca(TQWidget *parent=0, const char *name=0); + KRadioEduca(TQWidget *tqparent=0, const char *name=0); ~KRadioEduca(); protected: diff --git a/keduca/keducabuilder/kcontroladdedit.cpp b/keduca/keducabuilder/kcontroladdedit.cpp index f8b60562..c6182e8d 100644 --- a/keduca/keducabuilder/kcontroladdedit.cpp +++ b/keduca/keducabuilder/kcontroladdedit.cpp @@ -27,12 +27,12 @@ #include //#include <.h> -// Qt includes +// TQt includes #include #include -KControlAddEdit::KControlAddEdit(TQWidget *parent, const char *name, bool modal, WFlags f) - : KControlAddEditBase(parent, name, modal, f), +KControlAddEdit::KControlAddEdit(TQWidget *tqparent, const char *name, bool modal, WFlags f) + : KControlAddEditBase(tqparent, name, modal, f), _currentAnswerItem(0) { configRead(); @@ -72,19 +72,19 @@ void KControlAddEdit::init(FileRead *keducaFile, bool edit) /** Fill page of current record */ void KControlAddEdit::fillPage() { - _questionText->setText( _keducaFile->getQuestion( FileRead::QF_TEXT ) ); - if( !_keducaFile->getQuestion( FileRead::QF_PICTURE ).isEmpty() ) + _questionText->setText( _keducaFile->getQuestion( FileRead::TQF_TEXT ) ); + if( !_keducaFile->getQuestion( FileRead::TQF_PICTURE ).isEmpty() ) { - _questionPreview->setPixmap(_keducaFile->getQuestion(FileRead::QF_PICTURE)); - _answerPreview->setPixmap(_keducaFile->getQuestion(FileRead::QF_PICTURE)); - _questionPicture->setURL( _keducaFile->getQuestion( FileRead::QF_PICTURE ) ); + _questionPreview->setPixmap(_keducaFile->getQuestion(FileRead::TQF_PICTURE)); + _answerPreview->setPixmap(_keducaFile->getQuestion(FileRead::TQF_PICTURE)); + _questionPicture->setURL( _keducaFile->getQuestion( FileRead::TQF_PICTURE ) ); } - _questionType->setCurrentItem( _keducaFile->getQuestionInt( FileRead::QF_TYPE )-1 ); + _questionType->setCurrentItem( _keducaFile->getQuestionInt( FileRead::TQF_TYPE )-1 ); slotQuestionTypeChanged( _questionType->currentItem() ); - _questionPoint->setValue( _keducaFile->getQuestionInt( FileRead::QF_POINTS ) ); - _questionTip->setText( _keducaFile->getQuestion( FileRead::QF_TIP ) ); - _questionExplain->setText( _keducaFile->getQuestion( FileRead::QF_EXPLAIN ) ); - _questionTime->setValue( _keducaFile->getQuestionInt( FileRead::QF_TIME ) ); + _questionPoint->setValue( _keducaFile->getQuestionInt( FileRead::TQF_POINTS ) ); + _questionTip->setText( _keducaFile->getQuestion( FileRead::TQF_TIP ) ); + _questionExplain->setText( _keducaFile->getQuestion( FileRead::TQF_EXPLAIN ) ); + _questionTime->setValue( _keducaFile->getQuestionInt( FileRead::TQF_TIME ) ); _listAnswers->clear(); _keducaFile->recordAnswerFirst(); @@ -204,13 +204,13 @@ void KControlAddEdit::accept() /** Add question with form data */ void KControlAddEdit::addQuestion() { - _keducaFile->setQuestion( FileRead::QF_TEXT, _questionText->text() ); - _keducaFile->setQuestion( FileRead::QF_TYPE, _questionType->currentItem()+1 ); - _keducaFile->setQuestion( FileRead::QF_PICTURE, _questionPicture->url() ); - _keducaFile->setQuestion( FileRead::QF_POINTS, _questionPoint->value() ); - _keducaFile->setQuestion( FileRead::QF_TIME, _questionTime->value() ); - _keducaFile->setQuestion( FileRead::QF_TIP, _questionTip->text() ); - _keducaFile->setQuestion( FileRead::QF_EXPLAIN, _questionExplain->text() ); + _keducaFile->setQuestion( FileRead::TQF_TEXT, _questionText->text() ); + _keducaFile->setQuestion( FileRead::TQF_TYPE, _questionType->currentItem()+1 ); + _keducaFile->setQuestion( FileRead::TQF_PICTURE, _questionPicture->url() ); + _keducaFile->setQuestion( FileRead::TQF_POINTS, _questionPoint->value() ); + _keducaFile->setQuestion( FileRead::TQF_TIME, _questionTime->value() ); + _keducaFile->setQuestion( FileRead::TQF_TIP, _questionTip->text() ); + _keducaFile->setQuestion( FileRead::TQF_EXPLAIN, _questionExplain->text() ); _keducaFile->clearAnswers(); TQListViewItem *item = _listAnswers->firstChild(); diff --git a/keduca/keducabuilder/kcontroladdedit.h b/keduca/keducabuilder/kcontroladdedit.h index cb93329e..fb867c23 100644 --- a/keduca/keducabuilder/kcontroladdedit.h +++ b/keduca/keducabuilder/kcontroladdedit.h @@ -21,7 +21,7 @@ #include "../libkeduca/fileread.h" #include "kcontroladdeditbase.h" -// Qt forward declarations +// TQt forward declarations class TQListViewItem; /**Add or edit questions @@ -35,9 +35,10 @@ class TQListViewItem; class KControlAddEdit : public KControlAddEditBase { Q_OBJECT + TQ_OBJECT public: - KControlAddEdit(TQWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); + KControlAddEdit(TQWidget *tqparent = 0, const char *name = 0, bool modal = true, WFlags f = 0); ~KControlAddEdit(); /** Init keducaFile pointer and EditMode */ void init(FileRead *keducaFile, bool editMode); diff --git a/keduca/keducabuilder/kcontroladdeditbase.ui b/keduca/keducabuilder/kcontroladdeditbase.ui index 0292edf2..af9df10a 100644 --- a/keduca/keducabuilder/kcontroladdeditbase.ui +++ b/keduca/keducabuilder/kcontroladdeditbase.ui @@ -1,10 +1,10 @@ KControlAddEditBase - + KControlAddEditBase - + 0 0 @@ -12,7 +12,7 @@ 480 - + _pageQuestion @@ -26,17 +26,17 @@ 0 - + frame3 - + 125 0 - + 125 32767 @@ -55,17 +55,17 @@ unnamed - + _questionPreview - + 100 100 - + 100 100 @@ -101,14 +101,14 @@ Expanding - + 20 21 - + textLabel1 @@ -130,7 +130,7 @@ Expanding - + 20 41 @@ -139,7 +139,7 @@ - + frame5 @@ -153,42 +153,42 @@ unnamed - + textLabel2 &Question: - + AlignTop|AlignRight _questionText - + textLabel4 &Type: - + AlignVCenter|AlignRight _questionType - + textLabel3 &Picture: - + AlignVCenter|AlignRight @@ -220,80 +220,80 @@ _questionType - + textLabel5 P&oint: - + AlignVCenter|AlignRight _questionPoint - + textLabel6 Ti&me: - + AlignVCenter|AlignRight _questionTime - + textLabel7 T&ip: - + AlignVCenter|AlignRight _questionTip - + _questionTip - + textLabel8 &Explain: - + AlignTop|AlignRight _questionExplain - + _questionText - + _questionExplain - + - layout1 + tqlayout1 @@ -314,7 +314,7 @@ Expanding - + 81 20 @@ -323,9 +323,9 @@ - + - layout2 + tqlayout2 @@ -346,7 +346,7 @@ Expanding - + 131 20 @@ -359,7 +359,7 @@ - + _pageAnswer @@ -373,17 +373,17 @@ 0 - + frame3_2 - + 125 0 - + 125 32767 @@ -402,17 +402,17 @@ unnamed - + _answerPreview - + 100 100 - + 100 100 @@ -448,14 +448,14 @@ Expanding - + 20 21 - + textLabel2_2 @@ -477,7 +477,7 @@ Expanding - + 20 41 @@ -486,7 +486,7 @@ - + frame6 @@ -500,17 +500,17 @@ unnamed - + - layout11 + tqlayout11 unnamed - + - layout3 + tqlayout3 @@ -531,7 +531,7 @@ Expanding - + 31 20 @@ -540,48 +540,48 @@ - + _answerText - + textLabel1_2 &Answer: - + AlignTop|AlignRight _answerText - + textLabel2_3 &Value: - + AlignVCenter|AlignRight _answerValue - + - layout7 + tqlayout7 unnamed - + False @@ -598,14 +598,14 @@ - + textLabel3_2 &Points: - + AlignVCenter|AlignRight @@ -628,9 +628,9 @@ Horizontal - + - layout17 + tqlayout17 @@ -677,15 +677,15 @@ true - + - layout16 + tqlayout16 unnamed - + _buttonInsert @@ -696,7 +696,7 @@ &Add - + _buttonRemove @@ -717,14 +717,14 @@ Fixed - + 20 10 - + _buttonUp @@ -735,7 +735,7 @@ Move &Up - + _buttonDown @@ -756,7 +756,7 @@ Expanding - + 20 21 @@ -786,9 +786,9 @@ _questionPicture - urlSelected(const QString&) + urlSelected(const TQString&) KControlAddEditBase - slotPreviewImage(const QString&) + slotPreviewImage(const TQString&) _questionType @@ -822,9 +822,9 @@ _listAnswers - selectionChanged(QListViewItem*) + selectionChanged(TQListViewItem*) KControlAddEditBase - slotAnswerSelected(QListViewItem*) + slotAnswerSelected(TQListViewItem*) _answerText @@ -850,17 +850,17 @@ _questionTip _questionExplain - + slotAddAnswer() slotRemoveAnswer() slotMoveUpAnswer() slotMoveDownAnswer() - slotPreviewImage(const QString &) + slotPreviewImage(const TQString &) slotQuestionTypeChanged(int index) slotDataChanged() - slotAnswerSelected(QListViewItem *) - - + slotAnswerSelected(TQListViewItem *) + + kurlrequester.h klineedit.h diff --git a/keduca/keducabuilder/kcontrolheader.cpp b/keduca/keducabuilder/kcontrolheader.cpp index e46bfdc4..4c1081a2 100644 --- a/keduca/keducabuilder/kcontrolheader.cpp +++ b/keduca/keducabuilder/kcontrolheader.cpp @@ -27,7 +27,7 @@ #include #include -KControlHeader::KControlHeader(FileRead *keducaFile, TQWidget *parent, const char *name ) : KDialogBase(Swallow, i18n("Document Information"), Ok|Cancel, Ok, parent, name, true, true) +KControlHeader::KControlHeader(FileRead *keducaFile, TQWidget *tqparent, const char *name ) : KDialogBase(Swallow, i18n("Document Information"), Ok|Cancel, Ok, tqparent, name, true, true) { _keducaFile = keducaFile; init(); @@ -82,10 +82,10 @@ void KControlHeader::init() TQGroupBox *GroupBox7 = new TQGroupBox( mainView, "GroupBox7" ); GroupBox7->setTitle( i18n( "Description" ) ); GroupBox7->setColumnLayout(0, Qt::Vertical ); - GroupBox7->layout()->setSpacing( 0 ); - GroupBox7->layout()->setMargin( 0 ); - TQVBoxLayout *GroupBox7Layout = new TQVBoxLayout( GroupBox7->layout() ); - GroupBox7Layout->setAlignment( Qt::AlignTop ); + GroupBox7->tqlayout()->setSpacing( 0 ); + GroupBox7->tqlayout()->setMargin( 0 ); + TQVBoxLayout *GroupBox7Layout = new TQVBoxLayout( GroupBox7->tqlayout() ); + GroupBox7Layout->tqsetAlignment( TQt::AlignTop ); GroupBox7Layout->setSpacing( 6 ); GroupBox7Layout->setMargin( 11 ); @@ -95,7 +95,7 @@ void KControlHeader::init() TQLabel *TextLabel10 = new TQLabel( GroupBox7, "TextLabel10" ); TextLabel10->setText( i18n( "Type:" )); - TextLabel10->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel10->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); Layout13->addWidget( TextLabel10, 2, 0 ); @@ -108,7 +108,7 @@ void KControlHeader::init() TQLabel *TextLabel11 = new TQLabel( GroupBox7, "TextLabel11" ); TextLabel11->setText( i18n( "Level:" )); - TextLabel11->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel11->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); Layout12->addWidget( TextLabel11 ); _headerLevel = new KComboBox( FALSE, GroupBox7, "_headerLevel" ); @@ -117,7 +117,7 @@ void KControlHeader::init() TQLabel *TextLabel12 = new TQLabel( GroupBox7, "TextLabel12" ); TextLabel12->setText( i18n( "Language:" )); - TextLabel12->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel12->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); Layout13->addWidget( TextLabel12, 3, 0 ); _headerLang = new KLanguageCombo( GroupBox7, "_headerLang" ); @@ -126,7 +126,7 @@ void KControlHeader::init() TQLabel *TextLabel9 = new TQLabel( GroupBox7, "TextLabel9" ); TextLabel9->setText( i18n( "Category:" )); - TextLabel9->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel9->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); Layout13->addWidget( TextLabel9, 1, 0 ); @@ -138,7 +138,7 @@ void KControlHeader::init() TQLabel *TextLabel8 = new TQLabel( GroupBox7, "TextLabel8" ); TextLabel8->setText( i18n( "Title:" )); - TextLabel8->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel8->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); Layout13->addWidget( TextLabel8, 0, 0 ); GroupBox7Layout->addLayout( Layout13 ); @@ -147,10 +147,10 @@ void KControlHeader::init() TQGroupBox *GroupBox8 = new TQGroupBox( mainView, "GroupBox8" ); GroupBox8->setTitle( i18n( "Picture" ) ); GroupBox8->setColumnLayout(0, Qt::Vertical ); - GroupBox8->layout()->setSpacing( 0 ); - GroupBox8->layout()->setMargin( 0 ); - TQHBoxLayout *GroupBox8Layout = new TQHBoxLayout( GroupBox8->layout() ); - GroupBox8Layout->setAlignment( Qt::AlignTop ); + GroupBox8->tqlayout()->setSpacing( 0 ); + GroupBox8->tqlayout()->setMargin( 0 ); + TQHBoxLayout *GroupBox8Layout = new TQHBoxLayout( GroupBox8->tqlayout() ); + GroupBox8Layout->tqsetAlignment( TQt::AlignTop ); GroupBox8Layout->setSpacing( 6 ); GroupBox8Layout->setMargin( 11 ); @@ -165,10 +165,10 @@ void KControlHeader::init() TQGroupBox *GroupBox6 = new TQGroupBox( mainView, "GroupBox6" ); GroupBox6->setTitle( i18n( "Author" ) ); GroupBox6->setColumnLayout(0, Qt::Vertical ); - GroupBox6->layout()->setSpacing( 0 ); - GroupBox6->layout()->setMargin( 0 ); - TQGridLayout *GroupBox6Layout = new TQGridLayout( GroupBox6->layout() ); - GroupBox6Layout->setAlignment( Qt::AlignTop ); + GroupBox6->tqlayout()->setSpacing( 0 ); + GroupBox6->tqlayout()->setMargin( 0 ); + TQGridLayout *GroupBox6Layout = new TQGridLayout( GroupBox6->tqlayout() ); + GroupBox6Layout->tqsetAlignment( TQt::AlignTop ); GroupBox6Layout->setSpacing( 6 ); GroupBox6Layout->setMargin( 11 ); @@ -182,19 +182,19 @@ void KControlHeader::init() TQLabel *TextLabel7 = new TQLabel( GroupBox6, "TextLabel7" ); TextLabel7->setText( i18n( "Web page:" )); - TextLabel7->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel7->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); GroupBox6Layout->addWidget( TextLabel7, 2, 0 ); TQLabel *TextLabel6 = new TQLabel( GroupBox6, "TextLabel6" ); TextLabel6->setText( i18n( "Email:" )); - TextLabel6->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel6->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); GroupBox6Layout->addWidget( TextLabel6, 1, 0 ); TQLabel *TextLabel5 = new TQLabel( GroupBox6, "TextLabel5" ); TextLabel5->setText( i18n( "Name:" )); - TextLabel5->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + TextLabel5->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); GroupBox6Layout->addWidget( TextLabel5, 0, 0 ); @@ -246,12 +246,12 @@ void KControlHeader::insertHeader() /** Load country list */ void KControlHeader::loadCountryList(KLanguageCombo *combo) { - TQString sub = TQString::fromLatin1("l10n/"); + TQString sub = TQString::tqfromLatin1("l10n/"); // clear the list combo->clear(); - TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*.desktop")); + TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::tqfromLatin1("*.desktop")); regionlist.sort(); for ( TQStringList::ConstIterator it = regionlist.begin(); @@ -261,35 +261,35 @@ void KControlHeader::loadCountryList(KLanguageCombo *combo) TQString tag = *it; int index; - index = tag.findRev('/'); + index = tag.tqfindRev('/'); if (index != -1) tag = tag.mid(index + 1); - index = tag.findRev('.'); + index = tag.tqfindRev('.'); if (index != -1) tag.truncate(index); KSimpleConfig entry(*it); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::fromLatin1("Name")); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::tqfromLatin1("Name")); combo->insertSubmenu( name, '-' + tag, sub ); } // add all languages to the list - TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*/entry.desktop")); + TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::tqfromLatin1("*/entry.desktop")); countrylist.sort(); for ( TQStringList::ConstIterator it = countrylist.begin(); it != countrylist.end(); ++it ) { KSimpleConfig entry(*it); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::fromLatin1("Name")); - TQString submenu = '-' + entry.readEntry(TQString::fromLatin1("Region")); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::tqfromLatin1("Name")); + TQString submenu = '-' + entry.readEntry(TQString::tqfromLatin1("Region")); TQString tag = *it; - int index = tag.findRev('/'); + int index = tag.tqfindRev('/'); tag.truncate(index); - index = tag.findRev('/'); + index = tag.tqfindRev('/'); tag = tag.mid(index+1); combo->insertLanguage(tag, name, sub, submenu); } @@ -312,12 +312,12 @@ void KControlHeader::configRead() config->setGroup("UserInfo"); if( _keducaFile->getHeader( "name" ).isEmpty() ) - _headerName->setText(config->readEntry("FullName", TQString::null )); + _headerName->setText(config->readEntry("FullName", TQString() )); else _headerName->setText( _keducaFile->getHeader("name") ); if( _keducaFile->getHeader( "email" ).isEmpty() ) - _headerEmail->setText(config->readEntry("EmailAddress", TQString::null )); + _headerEmail->setText(config->readEntry("EmailAddress", TQString() )); else _headerEmail->setText( _keducaFile->getHeader("email") ); diff --git a/keduca/keducabuilder/kcontrolheader.h b/keduca/keducabuilder/kcontrolheader.h index ff1e64ff..8370758d 100644 --- a/keduca/keducabuilder/kcontrolheader.h +++ b/keduca/keducabuilder/kcontrolheader.h @@ -33,9 +33,10 @@ class KControlHeader : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KControlHeader(FileRead *keducaFile, TQWidget *parent=0, const char *name=0); + KControlHeader(FileRead *keducaFile, TQWidget *tqparent=0, const char *name=0); ~KControlHeader(); private: diff --git a/keduca/keducabuilder/kcontrolheaderbase.ui b/keduca/keducabuilder/kcontrolheaderbase.ui index 04f2411b..86fedce7 100644 --- a/keduca/keducabuilder/kcontrolheaderbase.ui +++ b/keduca/keducabuilder/kcontrolheaderbase.ui @@ -1,10 +1,10 @@ MyDialog - + MyDialog - + 0 0 @@ -19,17 +19,17 @@ unnamed - + frame3 - + 0 50 - + 32767 50 @@ -55,17 +55,17 @@ 2 - + frame4 - + 125 0 - + 125 32767 @@ -84,7 +84,7 @@ unnamed - + textLabel1 @@ -104,14 +104,14 @@ Expanding - + 60 21 - + textLabel6 @@ -121,7 +121,7 @@ - + groupBox1 @@ -132,47 +132,47 @@ unnamed - + textLabel11 Title: - + AlignVCenter|AlignRight - + textLabel9 Language: - + AlignVCenter|AlignRight - + textLabel10 Category: - + AlignVCenter|AlignRight - + textLabel7 Type: - + AlignVCenter|AlignRight @@ -186,9 +186,9 @@ _headerTitle - + - layout2 + tqlayout2 @@ -209,21 +209,21 @@ Expanding - + 61 21 - + textLabel8 Level: - + AlignVCenter|AlignRight @@ -244,7 +244,7 @@ - + groupBox2 @@ -255,14 +255,14 @@ unnamed - + textLabel2 Default picture: - + AlignJustify|AlignVCenter @@ -273,7 +273,7 @@ - + groupBox3 @@ -284,14 +284,14 @@ unnamed - + textLabel3 Name: - + AlignVCenter|AlignRight @@ -310,25 +310,25 @@ _headerEmail - + textLabel5 Web page: - + AlignVCenter|AlignRight - + textLabel4 Email: - + AlignVCenter|AlignRight @@ -344,7 +344,7 @@ Expanding - + 31 40 @@ -365,7 +365,7 @@ Horizontal - + Layout1 @@ -389,14 +389,14 @@ Expanding - + 20 20 - + buttonOk @@ -410,7 +410,7 @@ true - + buttonCancel @@ -459,7 +459,7 @@ buttonOk buttonCancel - + klineedit.h klineedit.h diff --git a/keduca/keducabuilder/keducabuilder.cpp b/keduca/keducabuilder/keducabuilder.cpp index fa7da986..93dbb334 100644 --- a/keduca/keducabuilder/keducabuilder.cpp +++ b/keduca/keducabuilder/keducabuilder.cpp @@ -60,8 +60,8 @@ static const char* const keducabuilder_data[] = { ".#############.", "..............."}; -KEducaBuilder::KEducaBuilder(TQWidget* parent, const char *name, WFlags f ) - : KMainWindow(parent,name,f), +KEducaBuilder::KEducaBuilder(TQWidget* tqparent, const char *name, WFlags f ) + : KMainWindow(tqparent,name,f), _nativeFormat("application/x-edu") { _keducaFile = new FileRead(); @@ -88,12 +88,12 @@ void KEducaBuilder::init() form2Layout->setMargin( 0 ); _split = new TQSplitter( mainView ); - _split->setOrientation( TQSplitter::Vertical ); + _split->setOrientation( Qt::Vertical ); _listAnswer = new KListBox( _split, "_listAnswer" ); - _listAnswer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, _listAnswer->sizePolicy().hasHeightForWidth() ) ); - connect( _listAnswer, TQT_SIGNAL( highlighted(TQListBoxItem *) ), this, TQT_SLOT( slotPreview(TQListBoxItem *) ) ); - connect( _listAnswer, TQT_SIGNAL( doubleClicked(TQListBoxItem *) ), this, TQT_SLOT( slotEditbyList(TQListBoxItem *) ) ); + _listAnswer->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, _listAnswer->sizePolicy().hasHeightForWidth() ) ); + connect( _listAnswer, TQT_SIGNAL( highlighted(TQListBoxItem *) ), TQT_TQOBJECT(this), TQT_SLOT( slotPreview(TQListBoxItem *) ) ); + connect( _listAnswer, TQT_SIGNAL( doubleClicked(TQListBoxItem *) ), TQT_TQOBJECT(this), TQT_SLOT( slotEditbyList(TQListBoxItem *) ) ); _preview = new TQTextView( _split, "_preview" ); _preview->setFrameShape( TQTextView::NoFrame ); @@ -103,7 +103,7 @@ void KEducaBuilder::init() setCentralWidget( mainView ); if (!initialGeometrySet()) - resize( TQSize(500, 400).expandedTo(minimumSizeHint())); + resize( TQSize(500, 400).expandedTo(tqminimumSizeHint())); setupGUI( ToolBar | Keys | StatusBar | Create, "keducabuilderui.rc" ); setAutoSaveSettings(); } @@ -111,21 +111,21 @@ void KEducaBuilder::init() /** Init menu bar settings */ void KEducaBuilder::initMenuBar() { - KStdAction::openNew(this, TQT_SLOT( slotFileOpenNew() ), actionCollection()); - KStdAction::open (this, TQT_SLOT( slotFileOpen() ), actionCollection()); - (void)new KAction(i18n("Open &Gallery..."), 0, 0, this, TQT_SLOT( slotGallery() ), actionCollection(), "open_gallery"); - _recentFiles = KStdAction::openRecent(this, TQT_SLOT ( slotFileOpenURL(const KURL &)), actionCollection()); - KStdAction::save (this, TQT_SLOT( slotFileSave() ), actionCollection()); - KStdAction::saveAs (this, TQT_SLOT( slotFileSaveAs() ), actionCollection()); - KStdAction::print (this, TQT_SLOT( slotFilePrint() ), actionCollection()); - (void)new KAction(i18n("Document Info"), "info", 0, this, TQT_SLOT( slotHeader() ), actionCollection(), "info_doc"); - KStdAction::quit(this, TQT_SLOT( close() ), actionCollection()); - - (void)new KAction(i18n("&Add..."), "addquestion", 0, this, TQT_SLOT( slotAdd() ), actionCollection(), "question_add"); - (void)new KAction(i18n("&Edit..."), "editquestion", 0, this, TQT_SLOT( slotEdit() ), actionCollection(), "question_edit"); - (void)new KAction(i18n("&Remove"), "delquestion", 0, this, TQT_SLOT( slotRemove() ), actionCollection(), "question_remove"); - (void)new KAction(i18n("&Up"), "up", 0, this, TQT_SLOT( slotUp() ), actionCollection(), "question_up"); - (void)new KAction(i18n("&Down"), "down", 0, this, TQT_SLOT( slotDown() ), actionCollection(), "question_down"); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT( slotFileOpenNew() ), actionCollection()); + KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection()); + (void)new KAction(i18n("Open &Gallery..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT( slotGallery() ), actionCollection(), "open_gallery"); + _recentFiles = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT ( slotFileOpenURL(const KURL &)), actionCollection()); + KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ), actionCollection()); + KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ), actionCollection()); + KStdAction::print (TQT_TQOBJECT(this), TQT_SLOT( slotFilePrint() ), actionCollection()); + (void)new KAction(i18n("Document Info"), "info", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHeader() ), actionCollection(), "info_doc"); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection()); + + (void)new KAction(i18n("&Add..."), "addquestion", 0, TQT_TQOBJECT(this), TQT_SLOT( slotAdd() ), actionCollection(), "question_add"); + (void)new KAction(i18n("&Edit..."), "editquestion", 0, TQT_TQOBJECT(this), TQT_SLOT( slotEdit() ), actionCollection(), "question_edit"); + (void)new KAction(i18n("&Remove"), "delquestion", 0, TQT_TQOBJECT(this), TQT_SLOT( slotRemove() ), actionCollection(), "question_remove"); + (void)new KAction(i18n("&Up"), "up", 0, TQT_TQOBJECT(this), TQT_SLOT( slotUp() ), actionCollection(), "question_up"); + (void)new KAction(i18n("&Down"), "down", 0, TQT_TQOBJECT(this), TQT_SLOT( slotDown() ), actionCollection(), "question_down"); } /** Delete current document and start new */ @@ -148,7 +148,7 @@ void KEducaBuilder::slotFileOpenNew() /** Open new document. */ void KEducaBuilder::slotFileOpen() { - KURL url = KFileDialog::getOpenURL( TQString::null, _nativeFormat, this, i18n("Open Educa File") ); + KURL url = KFileDialog::getOpenURL( TQString(), _nativeFormat, this, i18n("Open Educa File") ); if( !url.isEmpty() ) slotFileOpenURL( url ); @@ -171,7 +171,7 @@ void KEducaBuilder::slotFileOpenURL( const KURL &url ) _keducaFile->recordFirst(); while( !_keducaFile->recordEOF() ) { - _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::QF_TEXT ) ); + _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::TQF_TEXT ) ); _keducaFile->recordNext(); } } @@ -199,7 +199,7 @@ void KEducaBuilder::slotPreview( TQListBoxItem *item ) tmpListanswer += ""; tmpListanswer += "" : tmpListanswer += "#b84747>"; - if( _keducaFile->getQuestionInt( FileRead::QF_TYPE ) == 3 ) + if( _keducaFile->getQuestionInt( FileRead::TQF_TYPE ) == 3 ) { tmpListanswer += "" + _keducaFile->getAnswer( FileRead::AF_POINT ) @@ -214,40 +214,40 @@ void KEducaBuilder::slotPreview( TQListBoxItem *item ) }; tmpListanswer += ""; - if( !_keducaFile->getQuestion( FileRead::QF_PICTURE ).isEmpty() ) + if( !_keducaFile->getQuestion( FileRead::TQF_PICTURE ).isEmpty() ) { tmpListanswer += ""; tmpListanswer += "
" + i18n("Question Image") + "
"; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_PICTURE ) + "
"; + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_PICTURE ) + ""; }; - if( _keducaFile->getQuestionInt( FileRead::QF_POINTS ) > 0 ) + if( _keducaFile->getQuestionInt( FileRead::TQF_POINTS ) > 0 ) { tmpListanswer += "

" + i18n("Question point") + ": "; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_POINTS ); + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_POINTS ); } - if( _keducaFile->getQuestionInt( FileRead::QF_TIME ) > 0 ) + if( _keducaFile->getQuestionInt( FileRead::TQF_TIME ) > 0 ) { tmpListanswer += "

"+i18n("Time")+": "; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_TIME ); + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_TIME ); tmpListanswer += i18n(" seconds

"); } - if( !_keducaFile->getQuestion( FileRead::QF_TIP ).isEmpty() ) + if( !_keducaFile->getQuestion( FileRead::TQF_TIP ).isEmpty() ) { tmpListanswer += "

" + i18n("Tip") +": "; - tmpListanswer += _keducaFile->getQuestion( FileRead::QF_TIP ); + tmpListanswer += _keducaFile->getQuestion( FileRead::TQF_TIP ); tmpListanswer += "

"; } - if( !_keducaFile->getQuestion( FileRead::QF_EXPLAIN ).isEmpty() ) + if( !_keducaFile->getQuestion( FileRead::TQF_EXPLAIN ).isEmpty() ) { tmpListanswer += "

" + i18n("Explain") + ":" - + _keducaFile->getQuestion( FileRead::QF_EXPLAIN ) + + _keducaFile->getQuestion( FileRead::TQF_EXPLAIN ) + "

"; } @@ -284,7 +284,7 @@ bool KEducaBuilder::currentFileMayBeReplaced() int res = KMessageBox::warningYesNoCancel( widget(), // ask the user to save i18n( "The document \"%1\" has been modified.\n" - "Do you want to save it?" ).arg( _keducaFile->getCurrentURL().fileName() ), + "Do you want to save it?" ).tqarg( _keducaFile->getCurrentURL().fileName() ), i18n( "Save Document?" ), KStdGuiItem::save(), KStdGuiItem::discard() ); switch (res) { @@ -324,7 +324,7 @@ void KEducaBuilder::slotAdd() edit.init( _keducaFile, false ); if( !edit.exec() ) return; - _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::QF_TEXT ) ); + _listAnswer->insertItem( image0, _keducaFile->getQuestion( FileRead::TQF_TEXT ) ); _listAnswer->setCurrentItem( _listAnswer->count()-1 ); slotPreview( _listAnswer->item(_listAnswer->currentItem()) ); } @@ -340,7 +340,7 @@ void KEducaBuilder::slotEdit() edit.init( _keducaFile, true ); if( edit.exec() ) { - _listAnswer->changeItem( image0, _keducaFile->getQuestion( FileRead::QF_TEXT ), _listAnswer->currentItem() ); + _listAnswer->changeItem( image0, _keducaFile->getQuestion( FileRead::TQF_TEXT ), _listAnswer->currentItem() ); slotPreview( _listAnswer->item(_listAnswer->currentItem()) ); } } @@ -409,7 +409,7 @@ bool KEducaBuilder::fileSaveAs() TQCheckBox *saveCompressedCheckBox = new TQCheckBox( i18n( "Compress the file" ), 0 ); saveCompressedCheckBox->setChecked( true ); - KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, this, "file dialog", true, saveCompressedCheckBox); + KFileDialog *dialog=new KFileDialog(TQString(), TQString(), this, "file dialog", true, saveCompressedCheckBox); dialog->setCaption( i18n("Save Document As") ); dialog->setKeepLocation( true ); dialog->setOperationMode( KFileDialog::Saving ); @@ -485,7 +485,7 @@ void KEducaBuilder::slotFilePrint() TQString file = _keducaFile->getCurrentURL().fileName(); if (file.isEmpty()) file = i18n("Test"); - if(printer->setup(this, i18n("Print %1").arg(file))) + if(printer->setup(this, i18n("Print %1").tqarg(file))) { TQPaintDeviceMetrics metrics(printer); TQPainter p; @@ -502,7 +502,7 @@ void KEducaBuilder::slotFilePrint() while(!_keducaFile->recordEOF()) { p.drawText( 10, yPos+margin, metrics.width(), fm.lineSpacing(), - ExpandTabs | DontClip, _keducaFile->getQuestion(FileRead::QF_TEXT) ); + ExpandTabs | DontClip, _keducaFile->getQuestion(FileRead::TQF_TEXT) ); yPos += fm.lineSpacing(); p.drawLine(10, yPos+margin, metrics.width(), yPos+margin); @@ -533,7 +533,7 @@ bool KEducaBuilder::checkSave() _keducaFile->getHeader("level").isEmpty() || _keducaFile->getHeader("language").isEmpty() ) { - if (KMessageBox::warningContinueCancel(this, i18n("Unable to save file.\n\nYou must complete the Document Info\n(Only the description is necessary)"), TQString::null, i18n("Complete Document Info...")) + if (KMessageBox::warningContinueCancel(this, i18n("Unable to save file.\n\nYou must complete the Document Info\n(Only the description is necessary)"), TQString(), i18n("Complete Document Info...")) == KMessageBox::Continue) { if (slotHeader()!=KControlHeader::Accepted) return false; @@ -544,7 +544,7 @@ bool KEducaBuilder::checkSave() if( _listAnswer->count() < 1 ) { if (KMessageBox::warningContinueCancel(this, i18n("Unable to save file.\n\nYou must insert a question."), - TQString::null, i18n("Insert Question"))==KMessageBox::Continue) + TQString(), i18n("Insert Question"))==KMessageBox::Continue) slotAdd(); else return false; diff --git a/keduca/keducabuilder/keducabuilder.h b/keduca/keducabuilder/keducabuilder.h index c3a736a7..93d9cce1 100644 --- a/keduca/keducabuilder/keducabuilder.h +++ b/keduca/keducabuilder/keducabuilder.h @@ -36,9 +36,10 @@ class KEducaBuilder : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KEducaBuilder(TQWidget* parent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose); + KEducaBuilder(TQWidget* tqparent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose); ~KEducaBuilder(); /** start a dialog that asks the user what he wants to do to start*/ bool startChooser(); diff --git a/keduca/keducabuilder/keducaeditorstartdialog.cpp b/keduca/keducabuilder/keducaeditorstartdialog.cpp index 8528b6ba..a8fd5aaa 100644 --- a/keduca/keducabuilder/keducaeditorstartdialog.cpp +++ b/keduca/keducabuilder/keducaeditorstartdialog.cpp @@ -29,8 +29,8 @@ /** */ -KEducaEditorStartDialog::KEducaEditorStartDialog(KEducaBuilder * parent, const char* name, bool modal, WFlags fl) - :KEducaEditorStartDialogBase(parent, name, modal, fl), +KEducaEditorStartDialog::KEducaEditorStartDialog(KEducaBuilder * tqparent, const char* name, bool modal, WFlags fl) + :KEducaEditorStartDialogBase(tqparent, name, modal, fl), _choice(NewDoc), _maxRecentDocumentItems(20) { @@ -62,8 +62,8 @@ void KEducaEditorStartDialog::buildRecentFilesList() // read file list for( unsigned int i = 1 ; i <= _maxRecentDocumentItems ; i++ ) { - key = TQString( "File%1" ).arg( i ); - value = config->readEntry( key, TQString::null ); + key = TQString( "File%1" ).tqarg( i ); + value = config->readEntry( key, TQString() ); if (!value.isNull()) recentDocumentCB->insertURL( KURL(value) ); diff --git a/keduca/keducabuilder/keducaeditorstartdialog.h b/keduca/keducabuilder/keducaeditorstartdialog.h index dd163848..1823c3d7 100644 --- a/keduca/keducabuilder/keducaeditorstartdialog.h +++ b/keduca/keducabuilder/keducaeditorstartdialog.h @@ -31,11 +31,12 @@ class KEducaBuilder; */ class KEducaEditorStartDialog : public KEducaEditorStartDialogBase{ Q_OBJECT + TQ_OBJECT public: enum {Rejected=0, OpenDoc=1, OpenRecentDoc=2, Gallery=3, NewDoc=4}StartChoice; /** Constructor. */ - KEducaEditorStartDialog(KEducaBuilder * parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + KEducaEditorStartDialog(KEducaBuilder * tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); /** Destructor. */ virtual ~KEducaEditorStartDialog(); diff --git a/keduca/keducabuilder/keducaeditorstartdialogbase.ui b/keduca/keducabuilder/keducaeditorstartdialogbase.ui index 0cb69e39..65ad01f3 100644 --- a/keduca/keducabuilder/keducaeditorstartdialogbase.ui +++ b/keduca/keducabuilder/keducaeditorstartdialogbase.ui @@ -1,10 +1,10 @@ KEducaEditorStartDialogBase - + KEducaEditorStartDialogBase - + 0 0 @@ -28,7 +28,7 @@ 6 - + startChoiceBtnGrp @@ -51,7 +51,7 @@ 6 - + Layout13 @@ -65,7 +65,7 @@ 6 - + openDocumentRB @@ -76,7 +76,7 @@ Open an &existing document: - + Layout4 @@ -100,7 +100,7 @@ Fixed - + 20 20 @@ -116,7 +116,7 @@ - + openRecentDocumentRB @@ -130,7 +130,7 @@ false
- + Layout15 @@ -154,7 +154,7 @@ Fixed - + 20 21 @@ -168,7 +168,7 @@ - + radioButton4 @@ -176,7 +176,7 @@ Open with Internet gallery browser
- + newDocumentRB @@ -203,7 +203,7 @@ Horizontal
- + Layout1 @@ -217,7 +217,7 @@ 6 - + buttonHelp @@ -238,14 +238,14 @@ Expanding - + 20 20 - + buttonOk @@ -259,7 +259,7 @@ true - + buttonCancel @@ -312,7 +312,7 @@ openDocumentRB openRecentDocumentRB - + klineedit.h kpushbutton.h diff --git a/keduca/keducabuilder/klangcombo.cpp b/keduca/keducabuilder/klangcombo.cpp index 1d86c09e..0371b7af 100644 --- a/keduca/keducabuilder/klangcombo.cpp +++ b/keduca/keducabuilder/klangcombo.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -31,21 +31,21 @@ KLanguageCombo::~KLanguageCombo () { } -KLanguageCombo::KLanguageCombo (TQWidget * parent, const char *name) - : KTagComboBox(parent, name) +KLanguageCombo::KLanguageCombo (TQWidget * tqparent, const char *name) + : KTagComboBox(tqparent, name) { } void KLanguageCombo::insertLanguage(const TQString& path, const TQString& name, const TQString& sub, const TQString &submenu) { - TQString output = name + TQString::fromLatin1(" (") + path + TQString::fromLatin1(")"); - TQPixmap flag(locate("locale", sub + path + TQString::fromLatin1("/flag.png"))); + TQString output = name + TQString::tqfromLatin1(" (") + path + TQString::tqfromLatin1(")"); + TQPixmap flag(locate("locale", sub + path + TQString::tqfromLatin1("/flag.png"))); insertItem(TQIconSet(flag), output, path, submenu); } void KLanguageCombo::changeLanguage(const TQString& name, int i) { if (i < 0 || i >= count()) return; - TQString output = name + TQString::fromLatin1(" (") + tag(i) + TQString::fromLatin1(")"); + TQString output = name + TQString::tqfromLatin1(" (") + tag(i) + TQString::tqfromLatin1(")"); changeItem(output, i); } diff --git a/keduca/keducabuilder/klangcombo.h b/keduca/keducabuilder/klangcombo.h index 2aca5753..0dc13d01 100644 --- a/keduca/keducabuilder/klangcombo.h +++ b/keduca/keducabuilder/klangcombo.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -35,12 +35,13 @@ class KLanguageCombo : public KTagComboBox { Q_OBJECT + TQ_OBJECT public: - KLanguageCombo(TQWidget *parent=0, const char *name=0); + KLanguageCombo(TQWidget *tqparent=0, const char *name=0); ~KLanguageCombo(); - void insertLanguage(const TQString& path, const TQString& name, const TQString& sub = TQString::null, const TQString &submenu = TQString::null); + void insertLanguage(const TQString& path, const TQString& name, const TQString& sub = TQString(), const TQString &submenu = TQString()); void changeLanguage(const TQString& name, int i); }; diff --git a/keduca/keducabuilder/ktagcombobox.cpp b/keduca/keducabuilder/ktagcombobox.cpp index 5a84574c..f89f14df 100644 --- a/keduca/keducabuilder/ktagcombobox.cpp +++ b/keduca/keducabuilder/ktagcombobox.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -36,8 +36,8 @@ KTagComboBox::~KTagComboBox () delete _tags; } -KTagComboBox::KTagComboBox (TQWidget * parent, const char *name) - : TQComboBox(parent, name) +KTagComboBox::KTagComboBox (TQWidget * tqparent, const char *name) + : TQComboBox(tqparent, name) { _popup = new TQPopupMenu(this); _tags = new TQStringList; @@ -84,7 +84,7 @@ void KTagComboBox::internalActivate( int index ) if (_current == index) return; _current = index; emit activated( index ); - repaint(); + tqrepaint(); } void KTagComboBox::internalHighlight( int index ) @@ -105,12 +105,12 @@ int KTagComboBox::count() const static inline TQPopupMenu *checkInsertIndex(TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu, int *index) { - int pos = tags->findIndex(submenu); + int pos = tags->tqfindIndex(submenu); TQPopupMenu *pi = 0; if (pos != -1) { - TQMenuItem *p = popup->findItem(popup->idAt(pos)); + TQMenuItem *p = popup->tqfindItem(popup->idAt(pos)); pi = p?p->popup():0; } if (!pi) pi = popup; @@ -139,7 +139,7 @@ void KTagComboBox::insertSeparator(const TQString &submenu, int index) { TQPopupMenu *pi = checkInsertIndex(_popup, _tags, submenu, &index); pi->insertSeparator(index); - _tags->append(TQString::null); + _tags->append(TQString()); } void KTagComboBox::insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu, int index) @@ -158,7 +158,7 @@ void KTagComboBox::changeItem( const TQString &text, int index ) { _popup->changeItem( text, index); if (index == _current) - repaint(); + tqrepaint(); } void KTagComboBox::paintEvent( TQPaintEvent * ev) @@ -170,7 +170,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev) // Text TQRect clip(2, 2, width() - 4, height() - 4); if ( hasFocus()) - p.setPen( colorGroup().highlightedText() ); + p.setPen( tqcolorGroup().highlightedText() ); p.drawText(clip, AlignCenter | SingleLine, _popup->text( _current )); // Icon @@ -183,7 +183,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev) bool KTagComboBox::containsTag( const TQString &str ) const { - return _tags->contains(str) > 0; + return _tags->tqcontains(str) > 0; } TQString KTagComboBox::currentTag() const @@ -196,7 +196,7 @@ TQString KTagComboBox::tag(int i) const if (i < 0 || i >= count()) { kdDebug() << "KTagComboBox::tag(), unknown tag " << i << endl; - return TQString::null; + return TQString(); } return *_tags->at(i); } @@ -210,12 +210,12 @@ void KTagComboBox::setCurrentItem(int i) { if (i < 0 || i >= count()) return; _current = i; - repaint(); + tqrepaint(); } void KTagComboBox::setCurrentItem(const TQString &code) { - int i = _tags->findIndex(code); + int i = _tags->tqfindIndex(code); if (code.isNull()) i = 0; if (i != -1) diff --git a/keduca/keducabuilder/ktagcombobox.h b/keduca/keducabuilder/ktagcombobox.h index ffeb2cda..ef0042ec 100644 --- a/keduca/keducabuilder/ktagcombobox.h +++ b/keduca/keducabuilder/ktagcombobox.h @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -36,18 +36,19 @@ class TQStringList; * * It has also support for sub menues. */ -class KTagComboBox : public QComboBox +class KTagComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: - KTagComboBox(TQWidget *parent=0, const char *name=0); + KTagComboBox(TQWidget *tqparent=0, const char *name=0); ~KTagComboBox(); - void insertItem(const TQIconSet& icon, const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1 ); - void insertItem(const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1 ); - void insertSeparator(const TQString &submenu = TQString::null, int index=-1 ); - void insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1); + void insertItem(const TQIconSet& icon, const TQString &text, const TQString &tag, const TQString &submenu = TQString(), int index=-1 ); + void insertItem(const TQString &text, const TQString &tag, const TQString &submenu = TQString(), int index=-1 ); + void insertSeparator(const TQString &submenu = TQString(), int index=-1 ); + void insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu = TQString(), int index=-1); void changeItem( const TQString &text, int index ); int count() const; diff --git a/keduca/libkeduca/fileread.cpp b/keduca/libkeduca/fileread.cpp index 7632b6fd..1fb03518 100644 --- a/keduca/libkeduca/fileread.cpp +++ b/keduca/libkeduca/fileread.cpp @@ -29,8 +29,8 @@ #include #include -FileRead::FileRead( TQObject *parent, const char *name ) - :TQObject(parent, name), +FileRead::FileRead( TQObject *tqparent, const char *name ) + :TQObject(tqparent, name), _changed(false), _tmpfile(0) { @@ -79,7 +79,7 @@ bool FileRead::loadFile(const TQString &filename) } else { - doc.setContent(qUncompress(file.readAll())); + doc.setContent(tqUncompress(file.readAll())); } TQDomElement docElem = doc.documentElement(); @@ -118,21 +118,21 @@ bool FileRead::loadFile(const TQString &filename) insertQuestion(); // --------------------- QUESTION ATTRIBUTE------------------------ TQDomElement elementNODE = dnList.item(i).toElement(); - setQuestion( QF_TYPE, elementNODE.attribute( "type", "1" ).toInt() ); - setQuestion( QF_PICTURE, elementNODE.attribute( "image", "" ) ); - setQuestion( QF_TIME, elementNODE.attribute( "time", "0" ).toInt() ); - setQuestion( QF_POINTS, elementNODE.attribute( "points", "0" ).toInt() ); + setQuestion( TQF_TYPE, elementNODE.attribute( "type", "1" ).toInt() ); + setQuestion( TQF_PICTURE, elementNODE.attribute( "image", "" ) ); + setQuestion( TQF_TIME, elementNODE.attribute( "time", "0" ).toInt() ); + setQuestion( TQF_POINTS, elementNODE.attribute( "points", "0" ).toInt() ); TQDomNodeList quList = elementNODE.childNodes(); for( unsigned int x = 0; x < quList.count(); ++x) { // --------------------- QUESTION AND RESPONSES------------------ TQDomElement element = quList.item(x).toElement(); - if( element.tagName() == "text" ) setQuestion( QF_TEXT, element.text() ); + if( element.tagName() == "text" ) setQuestion( TQF_TEXT, element.text() ); if( element.tagName() == "true" ) setAnswer( element.text(), true, element.attribute( "points", "0" ).toInt() ); if( element.tagName() == "false" ) setAnswer( element.text(), false,element.attribute( "points", "0" ).toInt() ); - if( element.tagName() == "tip" ) setQuestion( QF_TIP, element.text() ); - if( element.tagName() == "explain" ) setQuestion( QF_EXPLAIN, element.text() ); + if( element.tagName() == "tip" ) setQuestion( TQF_TIP, element.text() ); + if( element.tagName() == "explain" ) setQuestion( TQF_EXPLAIN, element.text() ); } } @@ -164,19 +164,19 @@ bool FileRead::loadFile(const TQString &filename) void FileRead::setQuestion( QuestionField field, const TQString& text) { -// QF_text, QF_picture, QF_type, QF_time, QF_tip, QF_explain +// TQF_text, TQF_picture, TQF_type, TQF_time, TQF_tip, TQF_explain switch( field ) { - case QF_TEXT: + case TQF_TEXT: (*_recordQuestions).text = text; break; - case QF_PICTURE: + case TQF_PICTURE: (*_recordQuestions).picture = text; break; - case QF_TIP: + case TQF_TIP: (*_recordQuestions).tip = text; break; - case QF_EXPLAIN: + case TQF_EXPLAIN: (*_recordQuestions).explain = text; break; default: @@ -190,13 +190,13 @@ void FileRead::setQuestion( QuestionField field, int value ) { switch( field ) { - case QF_TYPE: + case TQF_TYPE: (*_recordQuestions).type = value; break; - case QF_TIME: + case TQF_TIME: (*_recordQuestions).time = value; break; - case QF_POINTS: + case TQF_POINTS: (*_recordQuestions).points = value; break; default: @@ -208,7 +208,7 @@ void FileRead::setQuestion( QuestionField field, int value ) void FileRead::setResult( ResultField field, const TQString& text) { -// RS_text, QF_picture +// RS_text, TQF_picture switch( field ) { case RS_TEXT: @@ -407,26 +407,26 @@ unsigned int FileRead::recordAnswerCount() TQString FileRead::getQuestion( QuestionField field ) { -// QF_text, QF_picture, QF_type, QF_time, QF_tip, QF_explain +// TQF_text, TQF_picture, TQF_type, TQF_time, TQF_tip, TQF_explain switch( field ) { - case QF_TEXT: + case TQF_TEXT: return (*_recordQuestions).text; break; - case QF_PICTURE: + case TQF_PICTURE: // return getPictureLocal( (*_recordQuestions).picture ); return( (*_recordQuestions).picture ); break; - case QF_POINTS: + case TQF_POINTS: return TQString().setNum( (*_recordQuestions).points ); break; - case QF_TIME: + case TQF_TIME: return TQString().setNum( (*_recordQuestions).time ); break; - case QF_TIP: + case TQF_TIP: return (*_recordQuestions).tip; break; - case QF_EXPLAIN: + case TQF_EXPLAIN: return (*_recordQuestions).explain; break; default: @@ -440,13 +440,13 @@ int FileRead::getQuestionInt( QuestionField field ) { switch( field ) { - case QF_TYPE: + case TQF_TYPE: return (*_recordQuestions).type; break; - case QF_TIME: + case TQF_TIME: return (*_recordQuestions).time; break; - case QF_POINTS: + case TQF_POINTS: return (*_recordQuestions).points; break; default: @@ -559,8 +559,8 @@ TQString FileRead::getPicture() { TQString picture; - if( !getQuestion(QF_PICTURE).isEmpty() ) - picture = getQuestion(QF_PICTURE); + if( !getQuestion(TQF_PICTURE).isEmpty() ) + picture = getQuestion(TQF_PICTURE); else if( !(_header["image"]).isEmpty() ) picture = _header["image"]; else @@ -689,7 +689,7 @@ bool FileRead::saveFile( const TQString &filename, bool copyimages, bool saveCom TQFile file(filename); TQStringList copyJOB; - stream.setDevice(&buffer); + stream.setDevice(TQT_TQIODEVICE(&buffer)); if ( (!file.open(IO_WriteOnly)) || (!buffer.open(IO_WriteOnly)) ) { @@ -750,20 +750,20 @@ bool FileRead::saveFile( const TQString &filename, bool copyimages, bool saveCom while ( !recordEOF() ) { TQDomElement question = doc.createElement("question"); - if( !getQuestion( QF_PICTURE ).isEmpty() ) + if( !getQuestion( TQF_PICTURE ).isEmpty() ) { if( copyimages ) { - copyJOB.append( getQuestion( QF_PICTURE ) ); - question.setAttribute("image", TQFileInfo( getQuestion( QF_PICTURE ) ).fileName() ); + copyJOB.append( getQuestion( TQF_PICTURE ) ); + question.setAttribute("image", TQFileInfo( getQuestion( TQF_PICTURE ) ).fileName() ); } else { - question.setAttribute("image", getQuestion( QF_PICTURE ) ); + question.setAttribute("image", getQuestion( TQF_PICTURE ) ); } } - question.setAttribute( "type", getQuestionInt( QF_TYPE ) ); - if( getQuestionInt( QF_POINTS ) > 0 ) question.setAttribute( "points", getQuestion( QF_POINTS ) ); - if( getQuestionInt( QF_TIME ) > 0 ) question.setAttribute( "time", getQuestion( QF_TIME ) ); - insertXML( doc, question, "text", getQuestion( QF_TEXT ) ); + question.setAttribute( "type", getQuestionInt( TQF_TYPE ) ); + if( getQuestionInt( TQF_POINTS ) > 0 ) question.setAttribute( "points", getQuestion( TQF_POINTS ) ); + if( getQuestionInt( TQF_TIME ) > 0 ) question.setAttribute( "time", getQuestion( TQF_TIME ) ); + insertXML( doc, question, "text", getQuestion( TQF_TEXT ) ); recordAnswerFirst(); while( !recordAnswerEOF() ) @@ -786,8 +786,8 @@ bool FileRead::saveFile( const TQString &filename, bool copyimages, bool saveCom recordAnswerNext(); }; - if( !getQuestion( QF_TIP ).isEmpty() ) insertXML( doc, question, "tip", getQuestion( QF_TIP ) ); - if( !getQuestion( QF_EXPLAIN ).isEmpty() ) insertXML( doc, question, "explain", getQuestion( QF_EXPLAIN ) ); + if( !getQuestion( TQF_TIP ).isEmpty() ) insertXML( doc, question, "tip", getQuestion( TQF_TIP ) ); + if( !getQuestion( TQF_EXPLAIN ).isEmpty() ) insertXML( doc, question, "explain", getQuestion( TQF_EXPLAIN ) ); NodeData.appendChild( question ); recordNext(); @@ -796,7 +796,7 @@ bool FileRead::saveFile( const TQString &filename, bool copyimages, bool saveCom doc.save( stream, 4); buffer.close(); if ( saveCompressed ) - file.writeBlock(qCompress(data)); + file.writeBlock(tqCompress(data)); else file.writeBlock(data); file.close(); @@ -862,7 +862,7 @@ bool FileRead::saveResults( const TQString &filename, const TQString &results ) TQFile file(filename); TQStringList copyJOB; - stream.setDevice(&file); + stream.setDevice(TQT_TQIODEVICE(&file)); if(!file.open(IO_WriteOnly)) { @@ -875,20 +875,20 @@ bool FileRead::saveResults( const TQString &filename, const TQString &results ) } /** Insert xml format data */ -void FileRead::insertXML( TQDomDocument &doc, TQDomElement &parent, const TQString &tagName, const TQString &data) +void FileRead::insertXML( TQDomDocument &doc, TQDomElement &tqparent, const TQString &tagName, const TQString &data) { TQDomElement domELEMENT = doc.createElement( tagName ); TQDomText DATAelement = doc.createTextNode( data ); - parent.appendChild( domELEMENT ); + tqparent.appendChild( domELEMENT ); domELEMENT.appendChild( DATAelement ); } /** Insert xml data format */ -void FileRead::insertXML( TQDomDocument &doc, TQDomElement &parent, const TQString &data) +void FileRead::insertXML( TQDomDocument &doc, TQDomElement &tqparent, const TQString &data) { TQDomText DATAelement = doc.createTextNode( data ); - parent.appendChild( DATAelement ); + tqparent.appendChild( DATAelement ); } /** Get Header */ @@ -905,7 +905,7 @@ void FileRead::setHeader( const TQString field, const TQString value) if( (_header[field]).isEmpty() ) _header.insert( field, value ); else - _header.replace( field, value ); + _header.tqreplace( field, value ); } /** is Multi Answer */ diff --git a/keduca/libkeduca/fileread.h b/keduca/libkeduca/fileread.h index cbc89449..9240f938 100644 --- a/keduca/libkeduca/fileread.h +++ b/keduca/libkeduca/fileread.h @@ -34,11 +34,12 @@ class TQFile; class FileRead : public TQObject { Q_OBJECT + TQ_OBJECT public: - FileRead( TQObject *parent=0, const char *name=0 ); + FileRead( TQObject *tqparent=0, const char *name=0 ); virtual ~FileRead(); - enum QuestionField { QF_TEXT, QF_PICTURE, QF_POINTS, QF_TYPE, QF_TIME, QF_TIP, QF_EXPLAIN }; + enum QuestionField { TQF_TEXT, TQF_PICTURE, TQF_POINTS, TQF_TYPE, TQF_TIME, TQF_TIP, TQF_EXPLAIN }; enum AnswerField { AF_TEXT, AF_VALUE, AF_POINT }; enum ResultField { RS_TEXT, RS_MIN, RS_MAX, RS_PICTURE }; @@ -218,9 +219,9 @@ private: // Private methods /** Insert xml format data */ - void insertXML( TQDomDocument &doc, TQDomElement &parent, const TQString &tagName, const TQString &data); + void insertXML( TQDomDocument &doc, TQDomElement &tqparent, const TQString &tagName, const TQString &data); /** Insert xml data format */ - void insertXML( TQDomDocument &doc, TQDomElement &parent, const TQString &data); + void insertXML( TQDomDocument &doc, TQDomElement &tqparent, const TQString &data); protected: /** Open keduca file. This function does the actual work and expects a local filename . */ diff --git a/keduca/libkeduca/kgallerydialog.cpp b/keduca/libkeduca/kgallerydialog.cpp index b1ec43e2..c7d6e4c9 100644 --- a/keduca/libkeduca/kgallerydialog.cpp +++ b/keduca/libkeduca/kgallerydialog.cpp @@ -30,8 +30,8 @@ #include #include -KGalleryDialog::KGalleryDialog(TQWidget *parent, const char *name ) - :KGalleryDialogBase(parent,name) +KGalleryDialog::KGalleryDialog(TQWidget *tqparent, const char *name ) + :KGalleryDialogBase(tqparent,name) { configRead(); } diff --git a/keduca/libkeduca/kgallerydialog.h b/keduca/libkeduca/kgallerydialog.h index 41383091..419834d3 100644 --- a/keduca/libkeduca/kgallerydialog.h +++ b/keduca/libkeduca/kgallerydialog.h @@ -35,8 +35,9 @@ namespace KIO { class Job; } class KGalleryDialog : public KGalleryDialogBase { Q_OBJECT + TQ_OBJECT public: - KGalleryDialog(TQWidget *parent=0, const char *name=0); + KGalleryDialog(TQWidget *tqparent=0, const char *name=0); ~KGalleryDialog(); /** Open keduca file. This function can open a remote or local url. */ bool openFile( const KURL &url ); diff --git a/keduca/libkeduca/kgallerydialogbase.ui b/keduca/libkeduca/kgallerydialogbase.ui index ccd51e46..3adb85ee 100644 --- a/keduca/libkeduca/kgallerydialogbase.ui +++ b/keduca/libkeduca/kgallerydialogbase.ui @@ -1,10 +1,10 @@ KGalleryDialogBase - + KGalleryDialogBase - + 0 0 @@ -22,49 +22,49 @@ unnamed - + - layout13 + tqlayout13 unnamed - + - layout4 + tqlayout4 unnamed - + textLabel1_2 Name: - + AlignVCenter - + lineName - + - layout3 + tqlayout3 unnamed - + textLabel2 @@ -72,16 +72,16 @@ Address: - + lineAddress - + - layout12 + tqlayout12 @@ -97,18 +97,18 @@ Preferred - + 20 10 - + buttonAdd - + 100 0 @@ -136,7 +136,7 @@ Horizontal - + _split @@ -151,7 +151,7 @@ Horizontal - + Servers @@ -184,7 +184,7 @@ true - + Description @@ -262,19 +262,19 @@ - + - layout2 + tqlayout2 unnamed - + buttonHelp - + 100 0 @@ -294,18 +294,18 @@ Expanding - + 40 20 - + buttonOpen - + 100 0 @@ -318,11 +318,11 @@ true - + buttonCancel - + 100 0 @@ -357,14 +357,14 @@ listServers - selectionChanged(QListViewItem*) + selectionChanged(TQListViewItem*) KGalleryDialogBase - slotServerSelected(QListViewItem*) + slotServerSelected(TQListViewItem*) - + slotButtonAdd() - slotServerSelected(QListViewItem*) - - + slotServerSelected(TQListViewItem*) + + diff --git a/kgeography/Changelog b/kgeography/Changelog index f54c280c..c4c23b7d 100644 --- a/kgeography/Changelog +++ b/kgeography/Changelog @@ -88,7 +88,7 @@ * RightWidget is really LeftWidget ¬.¬ * There is no need to store p_rightWidget as a class member * Bump version to 0.2.1 - * Improve layouting of mapasker + * Improve tqlayouting of mapasker * Make the scrollbar work also when clicking on the arrows (sliderMoved -> valueChanged) * Fix resizing bug in mapWidget that showed a inexistant part of the diff --git a/kgeography/data/africa.kgm b/kgeography/data/africa.kgm index a5654132..718997b6 100644 --- a/kgeography/data/africa.kgm +++ b/kgeography/data/africa.kgm @@ -138,7 +138,7 @@ - Democratic Republic of the Congo + Detqmocratic Republic of the Congo congo_kinshasa.png Kinshasa diff --git a/kgeography/data/world.kgm b/kgeography/data/world.kgm index 7d1701d7..2acca4f0 100644 --- a/kgeography/data/world.kgm +++ b/kgeography/data/world.kgm @@ -111,7 +111,7 @@ - Democratic Republic of the Congo + Detqmocratic Republic of the Congo congo_kinshasa.png Kinshasa @@ -1730,7 +1730,7 @@ - Democratic People's Republic of Korea + Detqmocratic People's Republic of Korea nkorea.png Pyeongyang diff --git a/kgeography/src/answer.cpp b/kgeography/src/answer.cpp index f4931df3..428ceb20 100644 --- a/kgeography/src/answer.cpp +++ b/kgeography/src/answer.cpp @@ -93,7 +93,7 @@ void userAnswer::putWidgets(TQWidget *w, TQGridLayout *lay, int row) const TQLabel *l; l = new TQLabel(w); l -> setPixmap(v -> toImage()); - l -> setAlignment(Qt::AlignHCenter); + l -> tqsetAlignment(TQt::AlignHCenter); l -> setMargin(KDialog::marginHint() / 2); widgets[i] = l; } @@ -104,8 +104,8 @@ void userAnswer::putWidgets(TQWidget *w, TQGridLayout *lay, int row) const if (!p_correct) { TQColor back, fore; - back = widgets[0] -> colorGroup().highlight(); - fore = widgets[0] -> colorGroup().highlightedText(); + back = widgets[0] -> tqcolorGroup().highlight(); + fore = widgets[0] -> tqcolorGroup().highlightedText(); for (int i = 0; i < 3; i++) { widgets[i] -> setPaletteBackgroundColor(back); diff --git a/kgeography/src/answersdialog.cpp b/kgeography/src/answersdialog.cpp index c6d9d292..fcc219dc 100644 --- a/kgeography/src/answersdialog.cpp +++ b/kgeography/src/answersdialog.cpp @@ -17,7 +17,7 @@ #include "answer.h" #include "answersdialog.h" -answersDialog::answersDialog(TQWidget *parent, const TQValueVector &userAnswers, TQString question, int correctAnswers) : KDialogBase(parent, 0, true, i18n("Your Answers Were"), Ok) +answersDialog::answersDialog(TQWidget *tqparent, const TQValueVector &userAnswers, TQString question, int correctAnswers) : KDialogBase(tqparent, 0, true, i18n("Your Answers Were"), Ok) { TQLabel *l1, *l2, *l3; TQFont boldFont, bigFont; @@ -40,7 +40,7 @@ answersDialog::answersDialog(TQWidget *parent, const TQValueVector & bigFont.setPointSize(24); l1 = new TQLabel(question, p_container); l1 -> setFont(bigFont); - l1 -> setAlignment(Qt::AlignCenter); + l1 -> tqsetAlignment(TQt::AlignCenter); lay->addMultiCellWidget(l1, 0, 0, 0, 4); // Headers @@ -67,8 +67,8 @@ answersDialog::answersDialog(TQWidget *parent, const TQValueVector & lay -> addItem(new TQSpacerItem(20, 20, TQSizePolicy::Fixed, TQSizePolicy::Fixed), totalAnswers + 3, 2); - l1 = new TQLabel(i18n("You answered correctly %1 out of %2 questions.").arg(correctAnswers).arg(totalAnswers), p_container); - l1 -> setAlignment(Qt::AlignCenter); + l1 = new TQLabel(i18n("You answered correctly %1 out of %2 questions.").tqarg(correctAnswers).tqarg(totalAnswers), p_container); + l1 -> tqsetAlignment(TQt::AlignCenter); lay->addMultiCellWidget(l1, totalAnswers + 4, totalAnswers + 4, 0, 4); p_sv -> addChild(p_container); diff --git a/kgeography/src/answersdialog.h b/kgeography/src/answersdialog.h index 1b3b754d..60686923 100644 --- a/kgeography/src/answersdialog.h +++ b/kgeography/src/answersdialog.h @@ -23,7 +23,7 @@ class userAnswer; class answersDialog : public KDialogBase { public: - answersDialog(TQWidget *parent, const TQValueVector &userAnswers, TQString question, int correctAnswers); + answersDialog(TQWidget *tqparent, const TQValueVector &userAnswers, TQString question, int correctAnswers); protected: void showEvent(TQShowEvent *e); diff --git a/kgeography/src/askwidget.cpp b/kgeography/src/askwidget.cpp index 87d1d09a..cd0d07a4 100644 --- a/kgeography/src/askwidget.cpp +++ b/kgeography/src/askwidget.cpp @@ -16,12 +16,12 @@ #include "askwidget.h" #include "map.h" -askWidget::askWidget(TQWidget *parent, KGmap *m, TQWidget *w, uint count, bool showLabel) : TQWidget(parent), p_map(m), p_count(count) +askWidget::askWidget(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count, bool showLabel) : TQWidget(tqparent), p_map(m), p_count(count) { if (showLabel) { p_answers = new TQLabel(w); - p_answers -> setAlignment(AlignTop | AlignHCenter); + p_answers -> tqsetAlignment(AlignTop | AlignHCenter); resetAnswers(); p_answers -> show(); } @@ -72,7 +72,7 @@ void askWidget::nextQuestion() if (p_asked.count() < p_count) { aux = p_map -> getRandomDivision(isClickOnDivision()); - while (p_asked.find(aux) != p_asked.end()) aux = p_map -> getRandomDivision(isClickOnDivision()); + while (p_asked.tqfind(aux) != p_asked.end()) aux = p_map -> getRandomDivision(isClickOnDivision()); p_asked << aux; nextQuestionHook(aux); } @@ -98,7 +98,7 @@ void askWidget::resetAnswers() void askWidget::updateLabel() { - p_answers -> setText(i18n("Correct answers: %1/%2").arg(p_correctAnswers).arg(p_correctAnswers + p_incorrectAnswers)); + p_answers -> setText(i18n("Correct answers: %1/%2").tqarg(p_correctAnswers).tqarg(p_correctAnswers + p_incorrectAnswers)); } #include "askwidget.moc" diff --git a/kgeography/src/askwidget.h b/kgeography/src/askwidget.h index 49c2ea2b..2627296c 100644 --- a/kgeography/src/askwidget.h +++ b/kgeography/src/askwidget.h @@ -20,11 +20,12 @@ class TQLabel; class KGmap; -class askWidget : public QWidget +class askWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - askWidget(TQWidget *parent, KGmap *m, TQWidget *w, uint count, bool showLabel = true); + askWidget(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count, bool showLabel = true); virtual ~askWidget(); virtual TQString getQuestionHook() const = 0; diff --git a/kgeography/src/boxasker.cpp b/kgeography/src/boxasker.cpp index dc6d526d..5774ba10 100644 --- a/kgeography/src/boxasker.cpp +++ b/kgeography/src/boxasker.cpp @@ -23,7 +23,7 @@ #include "boxasker.h" #include "map.h" -boxAsker::boxAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : askWidget(parent, m, w, count) +boxAsker::boxAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : askWidget(tqparent, m, w, count) { p_lay = new TQVBoxLayout(this); @@ -33,7 +33,7 @@ boxAsker::boxAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : askWid for(int i = 0; i < 4; i++) { p_rb[i] = new TQRadioButton(bg); - p_rb[i]->setFocusPolicy(TQWidget::StrongFocus); + p_rb[i]->setFocusPolicy(TQ_StrongFocus); } p_accept = new KPushButton(this); @@ -55,7 +55,7 @@ void boxAsker::setQuestion(const TQString &q) void boxAsker::keyReleaseEvent(TQKeyEvent *e) { - if (e -> key() == Qt::Key_Return || e -> key() == Qt::Key_Enter) checkAnswer(); + if (e -> key() == TQt::Key_Return || e -> key() == TQt::Key_Enter) checkAnswer(); else askWidget::keyReleaseEvent(e); } @@ -80,7 +80,7 @@ void boxAsker::nextQuestionHook(const TQString &division) { // false because boxaskers never are clickOnDivision otherDivision = p_map -> getRandomDivision(false); - while (auxList.find(otherDivision) != auxList.end()) otherDivision = p_map -> getRandomDivision(false); + while (auxList.tqfind(otherDivision) != auxList.end()) otherDivision = p_map -> getRandomDivision(false); if (i == p_position) i++; if (i < 4 && nextBoxAskerQuestionHook(otherDivision, i, false)) i++; auxList << otherDivision; diff --git a/kgeography/src/boxasker.h b/kgeography/src/boxasker.h index e6171d85..d4b2079a 100644 --- a/kgeography/src/boxasker.h +++ b/kgeography/src/boxasker.h @@ -22,8 +22,9 @@ class TQVBoxLayout; class boxAsker : public askWidget { Q_OBJECT + TQ_OBJECT public: - boxAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count); + boxAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count); ~boxAsker(); protected: diff --git a/kgeography/src/capitaldivisionasker.cpp b/kgeography/src/capitaldivisionasker.cpp index ffea1407..cd4c8a44 100644 --- a/kgeography/src/capitaldivisionasker.cpp +++ b/kgeography/src/capitaldivisionasker.cpp @@ -15,7 +15,7 @@ #include "capitaldivisionasker.h" #include "map.h" -capitalDivisionAsker::capitalDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count) +capitalDivisionAsker::capitalDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count) { init(); } @@ -34,11 +34,11 @@ bool capitalDivisionAsker::nextBoxAskerQuestionHook(const TQString &division, in { TQString capitalName = i18n(p_map -> getFileName().utf8(), p_capital.utf8()); TQString text = i18n("%1 is the capital of..."); - setQuestion(text.arg(capitalName)); + setQuestion(text.tqarg(capitalName)); } else { - TQString s = TQString("%1 is the capital of...").arg(p_capital); + TQString s = TQString("%1 is the capital of...").tqarg(p_capital); setQuestion(i18n(p_map -> getFileName().utf8(), s.utf8())); } p_rb[i] -> setText(i18n(p_map -> getFileName().utf8(), division.utf8())); diff --git a/kgeography/src/capitaldivisionasker.h b/kgeography/src/capitaldivisionasker.h index 3d8a5e1c..8d05b1cf 100644 --- a/kgeography/src/capitaldivisionasker.h +++ b/kgeography/src/capitaldivisionasker.h @@ -18,7 +18,7 @@ class TQLabel; class capitalDivisionAsker : public boxAsker { public: - capitalDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count); + capitalDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count); protected: bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer); diff --git a/kgeography/src/division.cpp b/kgeography/src/division.cpp index 7ef70353..c190fac5 100644 --- a/kgeography/src/division.cpp +++ b/kgeography/src/division.cpp @@ -16,7 +16,7 @@ division::division() { p_canAskAlways = true; p_canAskClickDivision = true; - p_flagFile = TQString::null; + p_flagFile = TQString(); } bool division::canAsk(bool clickDivisionMode) const @@ -30,7 +30,7 @@ TQString division::getName() const return p_name; } -QRgb division::getRGB() const +TQRgb division::getRGB() const { return p_color; } @@ -72,7 +72,7 @@ void division::setName(const TQString &name) void division::setRGB(int r, int g, int b) { - p_color = qRgb(r, g, b); + p_color = tqRgb(r, g, b); } bool division::setFlagFile(const TQString &path) diff --git a/kgeography/src/division.h b/kgeography/src/division.h index 69b347f3..7014fd0e 100644 --- a/kgeography/src/division.h +++ b/kgeography/src/division.h @@ -21,7 +21,7 @@ class division bool canAsk(bool clickDivisionMode) const; TQString getName() const; - QRgb getRGB() const; + TQRgb getRGB() const; TQString getFlagFile() const; TQString getCapital() const; @@ -33,7 +33,7 @@ class division private: TQString p_name, p_flagFile, p_capital; - QRgb p_color; + TQRgb p_color; bool p_canAskAlways, p_canAskClickDivision; }; diff --git a/kgeography/src/divisioncapitalasker.cpp b/kgeography/src/divisioncapitalasker.cpp index b87437a2..5614efa0 100644 --- a/kgeography/src/divisioncapitalasker.cpp +++ b/kgeography/src/divisioncapitalasker.cpp @@ -15,7 +15,7 @@ #include "divisioncapitalasker.h" #include "map.h" -divisionCapitalAsker::divisionCapitalAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count) +divisionCapitalAsker::divisionCapitalAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count) { init(); } @@ -30,11 +30,11 @@ bool divisionCapitalAsker::nextBoxAskerQuestionHook(const TQString &division, in { TQString divisionName = i18n(p_map -> getFileName().utf8(), division.utf8()); TQString text = i18n("The capital of %1 is..."); - setQuestion(text.arg(divisionName)); + setQuestion(text.tqarg(divisionName)); } else { - TQString s = TQString("The capital of %1 is...").arg(division); + TQString s = TQString("The capital of %1 is...").tqarg(division); setQuestion(i18n(p_map -> getFileName().utf8(), s.utf8())); } p_currentAnswer.setQuestion(i18n(p_map -> getFileName().utf8(), division.utf8())); diff --git a/kgeography/src/divisioncapitalasker.h b/kgeography/src/divisioncapitalasker.h index e4bc5514..8ec236e9 100644 --- a/kgeography/src/divisioncapitalasker.h +++ b/kgeography/src/divisioncapitalasker.h @@ -16,7 +16,7 @@ class divisionCapitalAsker : public boxAsker { public: - divisionCapitalAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count); + divisionCapitalAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count); protected: bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer); diff --git a/kgeography/src/divisionflagasker.cpp b/kgeography/src/divisionflagasker.cpp index 79641b25..ef90033d 100644 --- a/kgeography/src/divisionflagasker.cpp +++ b/kgeography/src/divisionflagasker.cpp @@ -16,7 +16,7 @@ #include "divisionflagasker.h" #include "map.h" -divisionFlagAsker::divisionFlagAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count) +divisionFlagAsker::divisionFlagAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count) { init(); } @@ -33,11 +33,11 @@ bool divisionFlagAsker::nextBoxAskerQuestionHook(const TQString &division, int i { TQString divisionName = i18n(p_map -> getFileName().utf8(), division.utf8()); TQString text = i18n("The flag of %1 is..."); - setQuestion(text.arg(divisionName)); + setQuestion(text.tqarg(divisionName)); } else { - TQString s = TQString("The flag of %1 is...").arg(division); + TQString s = TQString("The flag of %1 is...").tqarg(division); setQuestion(i18n(p_map -> getFileName().utf8(), s.utf8())); } p_currentAnswer.setCorrectAnswer(im); diff --git a/kgeography/src/divisionflagasker.h b/kgeography/src/divisionflagasker.h index 5e1eaef2..71d64149 100644 --- a/kgeography/src/divisionflagasker.h +++ b/kgeography/src/divisionflagasker.h @@ -16,7 +16,7 @@ class divisionFlagAsker : public boxAsker { public: - divisionFlagAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count); + divisionFlagAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count); protected: bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer); diff --git a/kgeography/src/flagdivisionasker.cpp b/kgeography/src/flagdivisionasker.cpp index f6c305ab..92f0b039 100644 --- a/kgeography/src/flagdivisionasker.cpp +++ b/kgeography/src/flagdivisionasker.cpp @@ -17,7 +17,7 @@ #include "flagdivisionasker.h" #include "map.h" -flagDivisionAsker::flagDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count) +flagDivisionAsker::flagDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count) { p_flag = new TQWidget(this); p_lay -> insertWidget(0, p_flag); @@ -31,7 +31,7 @@ bool flagDivisionAsker::nextBoxAskerQuestionHook(const TQString &division, int i { // we put the flag image TQImage image(p_map -> getDivisionFlagFile(division)); - p_flag -> setPaletteBackgroundPixmap(image); + p_flag -> setPaletteBackgroundPixmap(TQPixmap(image)); p_flag -> setFixedSize(image.size()); p_currentAnswer.setQuestion(image.smoothScale(image.width()/5, image.height()/5)); diff --git a/kgeography/src/flagdivisionasker.h b/kgeography/src/flagdivisionasker.h index dfd4f662..5d826835 100644 --- a/kgeography/src/flagdivisionasker.h +++ b/kgeography/src/flagdivisionasker.h @@ -16,7 +16,7 @@ class flagDivisionAsker : public boxAsker { public: - flagDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count); + flagDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count); protected: bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer); diff --git a/kgeography/src/kgeography.cpp b/kgeography/src/kgeography.cpp index 33740e66..de850afb 100644 --- a/kgeography/src/kgeography.cpp +++ b/kgeography/src/kgeography.cpp @@ -45,7 +45,7 @@ kgeography::kgeography() : KMainWindow(), p_firstShow(true), p_mustShowResultsDi TQVBox *p_leftWidget = new TQVBox(p_bigWidget); p_currentMap = new TQLabel(p_leftWidget); - p_currentMap -> setAlignment(AlignCenter); + p_currentMap -> tqsetAlignment(AlignCenter); p_consult = new KPushButton(i18n("&Browse Map"), p_leftWidget); TQWhatsThis::add(p_consult, i18n("In this section left click on any part of the map to learn about the divisions" )); p_askMap = new KPushButton(i18n("&Click Division in Map..."), p_leftWidget); @@ -59,22 +59,22 @@ kgeography::kgeography() : KMainWindow(), p_firstShow(true), p_mustShowResultsDi p_askDivisionFlags = new KPushButton(i18n("G&uess Flag of Division..."), p_leftWidget); TQWhatsThis::add(p_askDivisionFlags, i18n("In this quiz you have to guess the flag of a division given its name")); p_underLeftWidget = new TQVBox(p_leftWidget); - p_underLeftWidget -> layout() -> setSpacing(KDialog::spacingHint()); - p_underLeftWidget -> layout() -> setMargin(KDialog::marginHint()); + p_underLeftWidget -> tqlayout() -> setSpacing(KDialog::spacingHint()); + p_underLeftWidget -> tqlayout() -> setMargin(KDialog::marginHint()); p_leftWidget -> setStretchFactor(p_underLeftWidget, 1); setCentralWidget(p_bigWidget); - connect(p_consult, TQT_SIGNAL(clicked()), this, TQT_SLOT(consult())); - connect(p_askMap, TQT_SIGNAL(clicked()), this, TQT_SLOT(askMap())); - connect(p_askCapitalDivisions, TQT_SIGNAL(clicked()), this, TQT_SLOT(askCapitalDivisions())); - connect(p_askDivisionCapitals, TQT_SIGNAL(clicked()), this, TQT_SLOT(askDivisionCapitals())); - connect(p_askFlagDivisions, TQT_SIGNAL(clicked()), this, TQT_SLOT(askFlagDivisions())); - connect(p_askDivisionFlags, TQT_SIGNAL(clicked()), this, TQT_SLOT(askDivisionFlags())); + connect(p_consult, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(consult())); + connect(p_askMap, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askMap())); + connect(p_askCapitalDivisions, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askCapitalDivisions())); + connect(p_askDivisionCapitals, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askDivisionCapitals())); + connect(p_askFlagDivisions, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askFlagDivisions())); + connect(p_askDivisionFlags, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askDivisionFlags())); - KAction *a = KStdAction::open(this, TQT_SLOT(openMap()), actionCollection(), "openMap"); + KAction *a = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(openMap()), actionCollection(), "openMap"); a -> setText(i18n("&Open Map...")); - KStdAction::quit(this, TQT_SLOT(close()), actionCollection(), "quit"); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection(), "quit"); p_zoom = new KToggleAction(i18n("&Zoom"), "viewmagfit", 0, 0, 0, actionCollection(), "zoom_select"); p_zoom -> setEnabled(false); @@ -85,7 +85,7 @@ kgeography::kgeography() : KMainWindow(), p_firstShow(true), p_mustShowResultsDi p_move = new KToggleAction(i18n("&Move"), "move", 0, 0, 0, actionCollection(), "move"); p_move -> setEnabled(false); - new KAction(i18n("Disclaimer"), 0, this, TQT_SLOT(disclaimer()), actionCollection(), "disclaimer"); + new KAction(i18n("Disclaimer"), 0, TQT_TQOBJECT(this), TQT_SLOT(disclaimer()), actionCollection(), "disclaimer"); setupGUI(Keys | ToolBar | Save | Create); @@ -113,7 +113,7 @@ void kgeography::showEvent(TQShowEvent *) } else { - KMessageBox::error(this, i18n("Could not open last used map. Error parsing %1: %2").arg(file).arg(reader.getError())); + KMessageBox::error(this, i18n("Could not open last used map. Error parsing %1: %2").tqarg(file).tqarg(reader.getError())); delete reader.getMap(); openMap(); } @@ -132,7 +132,7 @@ void kgeography::showEvent(TQShowEvent *) } // if anyone can explain why with the slot works and now without // i'll be glad to learn - TQTimer::singleShot(0, this, TQT_SLOT(resizeMainWindow())); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(resizeMainWindow())); // resizeMainWindow(); p_firstShow = false; @@ -169,7 +169,7 @@ void kgeography::askCapitalDivisions() int i; bool ok; showResultsDialog(); - i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); + i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); if (ok) { removeOldAskWidget(); @@ -185,7 +185,7 @@ void kgeography::askDivisionCapitals() int i; bool ok; showResultsDialog(); - i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); + i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); if (ok) { removeOldAskWidget(); @@ -201,7 +201,7 @@ void kgeography::askMap() int i; bool ok; showResultsDialog(); - i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(true)), 1, 1, p_map -> count(true), 1, &ok); + i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(true)), 1, 1, p_map -> count(true), 1, &ok); if (ok) { removeOldAskWidget(); @@ -219,7 +219,7 @@ void kgeography::askFlagDivisions() int i; bool ok; showResultsDialog(); - i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); + i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); if (ok) { removeOldAskWidget(); @@ -235,7 +235,7 @@ void kgeography::askDivisionFlags() int i; bool ok; showResultsDialog(); - i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); + i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok); if (ok) { removeOldAskWidget(); @@ -275,7 +275,7 @@ void kgeography::putAskWidget() connect(p_askWidget, TQT_SIGNAL(setMoveActionEnabled(bool)), p_move, TQT_SLOT(setEnabled(bool))); connect(p_askWidget, TQT_SIGNAL(setMoveActionChecked(bool)), p_move, TQT_SLOT(setChecked(bool))); connect(p_move, TQT_SIGNAL(toggled(bool)), p_askWidget, TQT_SLOT(setMovement(bool))); - connect(p_askWidget, TQT_SIGNAL(questionsEnded()), this, TQT_SLOT(showResultsDialog())); + connect(p_askWidget, TQT_SIGNAL(questionsEnded()), TQT_TQOBJECT(this), TQT_SLOT(showResultsDialog())); } void kgeography::setMap(KGmap *m) @@ -292,11 +292,11 @@ void kgeography::setMap(KGmap *m) { TQString mapName = i18n(p_map -> getFileName().utf8(), p_map -> getName().utf8()); TQString text = i18n("Current map:
%1
"); - p_currentMap -> setText(text.arg(mapName)); + p_currentMap -> setText(text.tqarg(mapName)); } else { - TQString s = TQString("Current map:
%1
").arg(p_map -> getName()); + TQString s = TQString("Current map:
%1
").tqarg(p_map -> getName()); p_currentMap -> setText(i18n(p_map -> getFileName().utf8(), s.utf8())); } p_consult -> setEnabled(true); diff --git a/kgeography/src/kgeography.h b/kgeography/src/kgeography.h index fb66525a..0be945b7 100644 --- a/kgeography/src/kgeography.h +++ b/kgeography/src/kgeography.h @@ -27,6 +27,7 @@ class askWidget; class kgeography : public KMainWindow { Q_OBJECT + TQ_OBJECT public: kgeography(); ~kgeography(); diff --git a/kgeography/src/map.cpp b/kgeography/src/map.cpp index 9cef054f..57d79e9b 100644 --- a/kgeography/src/map.cpp +++ b/kgeography/src/map.cpp @@ -26,7 +26,7 @@ KGmap::KGmap() KGmap::~KGmap() { - TQMap::iterator it; + TQMap::iterator it; it = p_colorMap.begin(); while (it != p_colorMap.end()) { @@ -39,8 +39,8 @@ KGmap::~KGmap() bool KGmap::addDivision(division *c) { bool b; - if (p_nameMap.find(c -> getName()) == p_nameMap.end() && - p_colorMap.find(c -> getRGB()) == p_colorMap.end()) + if (p_nameMap.tqfind(c -> getName()) == p_nameMap.end() && + p_colorMap.tqfind(c -> getRGB()) == p_colorMap.end()) { p_colorMap.insert(c -> getRGB(), c); p_nameMap.insert(c -> getName(), c); @@ -125,11 +125,11 @@ TQString KGmap::getRandomDivision(bool clickDivisionMode) const else return aux[i] -> getName(); } -TQString KGmap::getWhatIs(QRgb c, bool all) const +TQString KGmap::getWhatIs(TQRgb c, bool all) const { // this is only asked from mapasker.cpp hence the true in canAsk - TQMap::const_iterator it; - it = p_colorMap.find(c); + TQMap::const_iterator it; + it = p_colorMap.tqfind(c); if (it == p_colorMap.end()) return "nothing"; else { @@ -142,7 +142,7 @@ TQString KGmap::getWhatIs(QRgb c, bool all) const TQColor KGmap::getColor(const TQString &s) const { TQValueList divisions; - TQValueList colors; + TQValueList colors; division *d; int i; diff --git a/kgeography/src/map.h b/kgeography/src/map.h index 7f606320..d2ed065e 100644 --- a/kgeography/src/map.h +++ b/kgeography/src/map.h @@ -38,11 +38,11 @@ class KGmap TQString getMapFile() const; TQString getName() const; TQString getRandomDivision(bool clickDivisionMode) const; - TQString getWhatIs(QRgb c, bool all) const; + TQString getWhatIs(TQRgb c, bool all) const; TQColor getColor(const TQString &s) const; private: - TQMap p_colorMap; + TQMap p_colorMap; TQMap p_nameMap; TQString p_name, p_file, p_mapFile; diff --git a/kgeography/src/mapasker.cpp b/kgeography/src/mapasker.cpp index 27c7c83d..2fb7c380 100644 --- a/kgeography/src/mapasker.cpp +++ b/kgeography/src/mapasker.cpp @@ -20,16 +20,16 @@ #include "mapasker.h" #include "mapwidget.h" -mapAsker::mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint count) : askWidget(parent, m, w, count, asker), p_popupManager(this), p_asker(asker), p_firstShow(true) +mapAsker::mapAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, bool asker, uint count) : askWidget(tqparent, m, w, count, asker), p_popupManager(this), p_asker(asker), p_firstShow(true) { TQGridLayout *lay = new TQGridLayout(this, 2, 2); p_mapWidget = new mapWidget(this); lay -> addWidget(p_mapWidget, 0, 0); - p_hsb = new TQScrollBar(Horizontal, this); + p_hsb = new TQScrollBar(Qt::Horizontal, this); lay -> addWidget(p_hsb, 1, 0); - p_vsb = new TQScrollBar(Vertical, this); + p_vsb = new TQScrollBar(Qt::Vertical, this); lay -> addWidget(p_vsb, 0, 1); lay -> setRowStretch(2, 1); @@ -37,7 +37,7 @@ mapAsker::mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint cou p_shouldClearPopup = false; - connect(p_mapWidget, TQT_SIGNAL(clicked(QRgb, const TQPoint&)), this, TQT_SLOT(handleMapClick(QRgb, const TQPoint&))); + connect(p_mapWidget, TQT_SIGNAL(clicked(TQRgb, const TQPoint&)), this, TQT_SLOT(handleMapClick(TQRgb, const TQPoint&))); connect(p_mapWidget, TQT_SIGNAL(setMoveActionChecked(bool)), this, TQT_SIGNAL(setMoveActionChecked(bool))); connect(p_mapWidget, TQT_SIGNAL(setZoomActionChecked(bool)), this, TQT_SIGNAL(setZoomActionChecked(bool))); connect(p_mapWidget, TQT_SIGNAL(setMoveActionEnabled(bool)), this, TQT_SIGNAL(setMoveActionEnabled(bool))); @@ -51,9 +51,9 @@ mapAsker::mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint cou if (asker) { - TQBoxLayout *vbl = dynamic_cast(w -> layout()); + TQBoxLayout *vbl = dynamic_cast(w -> tqlayout()); p_next = new TQLabel(w); - p_next -> setAlignment(AlignTop | AlignHCenter); + p_next -> tqsetAlignment(AlignTop | AlignHCenter); p_fill = new TQWidget(w); p_fill -> show(); vbl -> setStretchFactor(p_fill, 1); @@ -100,11 +100,11 @@ void mapAsker::setOriginalZoom() p_popupManager.clear(); } -void mapAsker::handleMapClick(QRgb c, const TQPoint &p) +void mapAsker::handleMapClick(TQRgb c, const TQPoint &p) { TQString aux, cap; aux = p_map -> getWhatIs(c, !p_asker); - if (aux == "nothing") KMessageBox::error(this, i18n("You have found a bug in a map. Please contact the author and tell the %1 map has nothing associated to color %2,%3,%4.").arg(p_map -> getFile()).arg(qRed(c)).arg(qGreen(c)).arg(qBlue(c))); + if (aux == "nothing") KMessageBox::error(this, i18n("You have found a bug in a map. Please contact the author and tell the %1 map has nothing associated to color %2,%3,%4.").tqarg(p_map -> getFile()).tqarg(tqRed(c)).tqarg(tqGreen(c)).tqarg(tqBlue(c))); else if (p_shouldClearPopup) { p_popupManager.clear(); @@ -175,11 +175,11 @@ void mapAsker::nextQuestionHook(const TQString &division) { TQString divisionName = i18n(p_map -> getFileName().utf8(), division.utf8()); TQString text = i18n("Please click on:\n%1"); - p_next -> setText(text.arg(divisionName)); + p_next -> setText(text.tqarg(divisionName)); } else { - TQString s = TQString("Please click on:\n%1").arg(division); + TQString s = TQString("Please click on:\n%1").tqarg(division); p_next -> setText(i18n(p_map -> getFileName().utf8(), s.utf8())); } p_currentAnswer.setQuestion(i18n(p_map -> getFileName().utf8(), division.utf8())); diff --git a/kgeography/src/mapasker.h b/kgeography/src/mapasker.h index 4843299a..2ce5d6f2 100644 --- a/kgeography/src/mapasker.h +++ b/kgeography/src/mapasker.h @@ -25,8 +25,9 @@ class mapWidget; class mapAsker : public askWidget { Q_OBJECT + TQ_OBJECT public: - mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint count = 0); + mapAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, bool asker, uint count = 0); ~mapAsker(); TQSize mapSize() const; @@ -45,7 +46,7 @@ Q_OBJECT void setOriginalZoom(); private slots: - void handleMapClick(QRgb c, const TQPoint &p); + void handleMapClick(TQRgb c, const TQPoint &p); void setScrollBarsPosition(int x, int y); void setScrollBarsVisibleSize(int w, int h); void setScrollBarsMaximumSize(int w, int h); diff --git a/kgeography/src/mapchooser.cpp b/kgeography/src/mapchooser.cpp index 11410d39..1920e328 100644 --- a/kgeography/src/mapchooser.cpp +++ b/kgeography/src/mapchooser.cpp @@ -19,7 +19,7 @@ #include "mapchooser.h" -mapChooser::mapChooser(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Choose Map to Use"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) +mapChooser::mapChooser(TQWidget *tqparent) : KDialogBase(tqparent, 0, true, i18n("Choose Map to Use"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) { TQHBox *mainHB; TQStringList list; @@ -36,7 +36,7 @@ mapChooser::mapChooser(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Ch { if (!p_reader.parseMap(*it)) { - KMessageBox::error(this, i18n("Error parsing %1: %2").arg(*it).arg(p_reader.getError())); + KMessageBox::error(this, i18n("Error parsing %1: %2").tqarg(*it).tqarg(p_reader.getError())); delete p_reader.getMap(); } else @@ -85,8 +85,8 @@ void mapChooser::putImage(const TQString &mapName) KGmap *m; m = p_maps[mapName]; TQImage image(m -> getMapFile()); - image = image.smoothScale(300, 225, TQImage::ScaleMin); - p_image -> setPaletteBackgroundPixmap(image); + image = image.smoothScale(300, 225, TQ_ScaleMin); + p_image -> setPaletteBackgroundPixmap(TQPixmap(image)); p_image -> setFixedSize(image.size()); } diff --git a/kgeography/src/mapchooser.h b/kgeography/src/mapchooser.h index a95d16ba..502adc4b 100644 --- a/kgeography/src/mapchooser.h +++ b/kgeography/src/mapchooser.h @@ -21,8 +21,9 @@ class mapChooser : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - mapChooser(TQWidget *parent); + mapChooser(TQWidget *tqparent); ~mapChooser(); KGmap *getMap(); diff --git a/kgeography/src/mapparser.cpp b/kgeography/src/mapparser.cpp index 8a4cf200..bf04f0dc 100644 --- a/kgeography/src/mapparser.cpp +++ b/kgeography/src/mapparser.cpp @@ -25,19 +25,19 @@ bool mapReader::parseMap(const TQString &path) TQString aux; p_map = new KGmap(); p_map -> setFile(path); - aux = path.left(path.findRev('/') + 1); // aux = path but without the file name + aux = path.left(path.tqfindRev('/') + 1); // aux = path but without the file name mapParser handler(p_map, aux); TQFile xmlFile(path); if (xmlFile.exists()) { - TQXmlInputSource source(&xmlFile); + TQXmlInputSource source(TQT_TQIODEVICE(&xmlFile)); setContentHandler(&handler); if (parse(source)) return true; p_error = handler.errorString(); } else { - p_error = i18n("%1 does not exist.").arg(path); + p_error = i18n("%1 does not exist.").tqarg(path); } return false; } @@ -74,19 +74,19 @@ bool mapParser::startElement(const TQString&, const TQString &name, const TQStri if (prev.isEmpty()) { b = name == "map"; - if (!b) p_error = i18n("The map description file should begin with the %1 tag").arg("map"); + if (!b) p_error = i18n("The map description file should begin with the %1 tag").tqarg("map"); } else if (prev == "map") { if (name != "mapFile" && name != "name" && name != "division") { b = false; - p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4 and %5").arg(name).arg(prev).arg("mapFile").arg("name").arg("division"); + p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4 and %5").tqarg(name).tqarg(prev).tqarg("mapFile").tqarg("name").tqarg("division"); } else if ((name == "mapFile" && p_mapFileSet) || (name == "name" && p_mapNameSet)) { b = false; - p_error = i18n("%1 tag has already been set").arg(name); + p_error = i18n("%1 tag has already been set").tqarg(name); } p_colorSet = false; if (name == "division") @@ -102,21 +102,21 @@ bool mapParser::startElement(const TQString&, const TQString &name, const TQStri prev == "ignore") { b = false; - p_error = i18n("There can not be a tag inside %1 tag").arg(prev); + p_error = i18n("There can not be a tag inside %1 tag").tqarg(prev); } else if (prev == "division") { if (name != "color" && name != "name" && name != "ignore" && name != "flag" && name != "capital") { b = false; - p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4, %5, %6 and %7").arg(name).arg(prev).arg("color").arg("name").arg("ignore").arg("capital").arg("flag"); + p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4, %5, %6 and %7").tqarg(name).tqarg(prev).tqarg("color").tqarg("name").tqarg("ignore").tqarg("capital").tqarg("flag"); } else if ((name == "name" && p_divisionNameSet) || (name == "color" && p_colorSet) || (name == "ignore" && p_divisionIgnoreSet) || (name == "flag" && p_flagFileSet) || (name == "capital" && p_capitalSet)) { b = false; - p_error = i18n("%1 tag has already been set").arg(name); + p_error = i18n("%1 tag has already been set").tqarg(name); } p_red = -1; p_green = -1; @@ -146,7 +146,7 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &) { b = p_map -> setMapFile(p_path + p_contents); p_mapFileSet = true; - if (!b) p_error = i18n("File %1 does not exist").arg(p_path + p_contents); + if (!b) p_error = i18n("File %1 does not exist").tqarg(p_path + p_contents); } else if (aux == "division") { @@ -154,9 +154,9 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &) b = p_divisionNameSet; if (!b) p_error = i18n("There is a division without name"); b = b && p_map -> addDivision(p_division); - if (!b) p_error = i18n("There is already either a division called %1 or a division with the same colors as %2").arg(p_division -> getName()).arg(p_division -> getName()); + if (!b) p_error = i18n("There is already either a division called %1 or a division with the same colors as %2").tqarg(p_division -> getName()).tqarg(p_division -> getName()); b = b && (p_capitalSet || !p_division -> canAsk(false)); - if (!b) p_error = i18n("Division %1 has no capital").arg(p_division -> getName()); + if (!b) p_error = i18n("Division %1 has no capital").tqarg(p_division -> getName()); } else if (p_previousTags == ":map:division:name") { @@ -173,17 +173,17 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &) if (p_red == -1) { b = false; - p_error = i18n("Tag %1 has not the %2 tag.").arg("").arg(""); + p_error = i18n("Tag %1 has not the %2 tag.").tqarg("").tqarg(""); } else if (p_green == -1) { b = false; - p_error = i18n("Tag %1 has not the %2 tag.").arg("").arg(""); + p_error = i18n("Tag %1 has not the %2 tag.").tqarg("").tqarg(""); } else if (p_blue == -1) { b = false; - p_error = i18n("Tag %1 has not the %2 tag.").arg("").arg(""); + p_error = i18n("Tag %1 has not the %2 tag.").tqarg("").tqarg(""); } else p_colorSet = true; } @@ -217,21 +217,21 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &) else { b = false; - p_error = i18n("Invalid value in tag %1").arg(""); + p_error = i18n("Invalid value in tag %1").tqarg(""); } } else if (aux == "flag") { b = p_division -> setFlagFile(p_path + "flags/" + p_contents); p_flagFileSet = true; - if (!b) p_error = i18n("Could not find flag file %1").arg(p_path + "flags/" + p_contents); + if (!b) p_error = i18n("Could not find flag file %1").tqarg(p_path + "flags/" + p_contents); } else if (aux == "map") { } else b = false; removeLastTag(); - p_contents = TQString::null; + p_contents = TQString(); return b; } @@ -258,7 +258,7 @@ bool mapParser::endDocument() } else if (!p_mapNameSet) aux = "name"; else if (!p_mapFileSet) aux = "mapFile"; - p_error = i18n("Tag %1 is missing.").arg(aux); + p_error = i18n("Tag %1 is missing.").tqarg(aux); return false; } @@ -270,10 +270,10 @@ TQString mapParser::errorString() TQString mapParser::getPreviousTag() const { - return p_previousTags.right(p_previousTags.length() - p_previousTags.findRev(':') - 1); + return p_previousTags.right(p_previousTags.length() - p_previousTags.tqfindRev(':') - 1); } void mapParser::removeLastTag() { - p_previousTags = p_previousTags.left(p_previousTags.findRev(':')); + p_previousTags = p_previousTags.left(p_previousTags.tqfindRev(':')); } diff --git a/kgeography/src/mapparser.h b/kgeography/src/mapparser.h index 9db844ae..4abe8e56 100644 --- a/kgeography/src/mapparser.h +++ b/kgeography/src/mapparser.h @@ -16,7 +16,7 @@ class division; class KGmap; -class mapReader : public QXmlSimpleReader +class mapReader : public TQXmlSimpleReader { public: mapReader(); @@ -30,7 +30,7 @@ class mapReader : public QXmlSimpleReader KGmap *p_map; }; -class mapParser : public QXmlDefaultHandler +class mapParser : public TQXmlDefaultHandler { public: mapParser(KGmap *m, const TQString &path); diff --git a/kgeography/src/mapsdatatranslation.cpp b/kgeography/src/mapsdatatranslation.cpp index 23fb3418..081ca98c 100644 --- a/kgeography/src/mapsdatatranslation.cpp +++ b/kgeography/src/mapsdatatranslation.cpp @@ -64,10 +64,10 @@ i18n("africa.kgm", "The flag of Côte d'Ivoire is..."); i18n("africa.kgm", "Yamoussoukro"); i18n("africa.kgm", "Yamoussoukro is the capital of..."); i18n("africa.kgm", "Cyprus"); -i18n("africa.kgm", "Democratic Republic of the Congo"); -i18n("africa.kgm", "The capital of Democratic Republic of the Congo is..."); -i18n("africa.kgm", "Please click on:\nDemocratic Republic of the Congo"); -i18n("africa.kgm", "The flag of Democratic Republic of the Congo is..."); +i18n("africa.kgm", "Detqmocratic Republic of the Congo"); +i18n("africa.kgm", "The capital of Detqmocratic Republic of the Congo is..."); +i18n("africa.kgm", "Please click on:\nDetqmocratic Republic of the Congo"); +i18n("africa.kgm", "The flag of Detqmocratic Republic of the Congo is..."); i18n("africa.kgm", "Kinshasa"); i18n("africa.kgm", "Kinshasa is the capital of..."); i18n("africa.kgm", "Djibouti"); @@ -3417,10 +3417,10 @@ i18n("world.kgm", "Please click on:\nCôte d'Ivoire"); i18n("world.kgm", "The flag of Côte d'Ivoire is..."); i18n("world.kgm", "Yamoussoukro"); i18n("world.kgm", "Yamoussoukro is the capital of..."); -i18n("world.kgm", "Democratic Republic of the Congo"); -i18n("world.kgm", "The capital of Democratic Republic of the Congo is..."); -i18n("world.kgm", "Please click on:\nDemocratic Republic of the Congo"); -i18n("world.kgm", "The flag of Democratic Republic of the Congo is..."); +i18n("world.kgm", "Detqmocratic Republic of the Congo"); +i18n("world.kgm", "The capital of Detqmocratic Republic of the Congo is..."); +i18n("world.kgm", "Please click on:\nDetqmocratic Republic of the Congo"); +i18n("world.kgm", "The flag of Detqmocratic Republic of the Congo is..."); i18n("world.kgm", "Kinshasa"); i18n("world.kgm", "Kinshasa is the capital of..."); i18n("world.kgm", "Djibouti"); @@ -4384,10 +4384,10 @@ i18n("world.kgm", "Please click on:\nSingapore"); i18n("world.kgm", "The flag of Singapore is..."); i18n("world.kgm", "Singapore"); i18n("world.kgm", "Singapore is the capital of..."); -i18n("world.kgm", "Democratic People's Republic of Korea"); -i18n("world.kgm", "The capital of Democratic People's Republic of Korea is..."); -i18n("world.kgm", "Please click on:\nDemocratic People's Republic of Korea"); -i18n("world.kgm", "The flag of Democratic People's Republic of Korea is..."); +i18n("world.kgm", "Detqmocratic People's Republic of Korea"); +i18n("world.kgm", "The capital of Detqmocratic People's Republic of Korea is..."); +i18n("world.kgm", "Please click on:\nDetqmocratic People's Republic of Korea"); +i18n("world.kgm", "The flag of Detqmocratic People's Republic of Korea is..."); i18n("world.kgm", "Pyeongyang"); i18n("world.kgm", "Pyeongyang is the capital of..."); i18n("world.kgm", "Republic of Korea"); diff --git a/kgeography/src/mapwidget.cpp b/kgeography/src/mapwidget.cpp index f551940f..2560f11a 100644 --- a/kgeography/src/mapwidget.cpp +++ b/kgeography/src/mapwidget.cpp @@ -19,7 +19,7 @@ #include "mapwidget.h" -mapWidget::mapWidget(TQWidget *parent) : TQWidget(parent) +mapWidget::mapWidget(TQWidget *tqparent) : TQWidget(tqparent) { p_wantZoom = false; p_zooming = false; @@ -61,9 +61,9 @@ void mapWidget::setMapZoom(bool b) } } -TQSize mapWidget::sizeHint() const +TQSize mapWidget::tqsizeHint() const { - return maximumSize(); + return tqmaximumSize(); } void mapWidget::updateHPosition(int value) @@ -91,12 +91,12 @@ void mapWidget::mousePressEvent(TQMouseEvent *e) else if (p_wantMove) { p_initial = e -> pos(); - setCursor(Qt::SizeAllCursor); + setCursor(TQt::SizeAllCursor); p_moving = true; } else { - QRgb rgb; + TQRgb rgb; TQImage *currentImage; currentImage = getCurrentImage(); @@ -121,8 +121,8 @@ void mapWidget::mouseMoveEvent(TQMouseEvent *e) { TQPainter p(this); - p.setRasterOp(Qt::XorROP); - p.setPen(TQPen(Qt::white, 1, Qt::DotLine)); + p.setRasterOp(TQt::XorROP); + p.setPen(TQPen(TQt::white, 1, TQt::DotLine)); // remove previous rectangle p.drawRect(TQRect(p_initial, p_prev)); @@ -176,8 +176,8 @@ void mapWidget::mouseReleaseEvent(TQMouseEvent *e) TQPainter p(this); TQRect r(p_initial, e -> pos()); - p.setRasterOp(Qt::XorROP); - p.setPen(TQPen(Qt::white, 1, Qt::DotLine)); + p.setRasterOp(TQt::XorROP); + p.setPen(TQPen(TQt::white, 1, TQt::DotLine)); // remove previous rectangle p.drawRect(r); @@ -279,7 +279,7 @@ TQImage *mapWidget::getCurrentImage() void mapWidget::setOriginalImage() { - setPaletteBackgroundPixmap(p_originalImage); + setPaletteBackgroundPixmap(TQPixmap(p_originalImage)); erase(); p_zoomedImageShown = TQImage(); p_lastFactorX = 1; @@ -314,7 +314,7 @@ void mapWidget::updateShownImage() { p_zoomedImageShown = p_originalImage.copy(p_zoomX, p_zoomY, p_zoomW, p_zoomH); p_zoomedImageShown = p_zoomedImageShown.scale(size()); - setPaletteBackgroundPixmap(p_zoomedImageShown); + setPaletteBackgroundPixmap(TQPixmap(p_zoomedImageShown)); erase(); p_oldZoomX = p_zoomX; p_oldZoomY = p_zoomY; diff --git a/kgeography/src/mapwidget.h b/kgeography/src/mapwidget.h index 1bc37cb3..3f6561dc 100644 --- a/kgeography/src/mapwidget.h +++ b/kgeography/src/mapwidget.h @@ -15,18 +15,19 @@ #include #include -class mapWidget : public QWidget +class mapWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - mapWidget(TQWidget *parent); + mapWidget(TQWidget *tqparent); void init(const TQString &path, int scrollBarWidth, int scrollBarHeight); void setMapMove(bool b); void setMapZoom(bool b); - TQSize sizeHint() const; + TQSize tqsizeHint() const; TQSize mapSize() const; public slots: @@ -38,7 +39,7 @@ Q_OBJECT void setMoveActionChecked(bool b); void setZoomActionChecked(bool b); void setMoveActionEnabled(bool b); - void clicked(QRgb, const TQPoint&); + void clicked(TQRgb, const TQPoint&); void updatePosition(int X, int Y); void updateVisibleSize(int w, int h); void updateMaximumSize(int w, int h); diff --git a/kgeography/src/mypopup.cpp b/kgeography/src/mypopup.cpp index b9f1c78e..d68e3a7e 100644 --- a/kgeography/src/mypopup.cpp +++ b/kgeography/src/mypopup.cpp @@ -16,7 +16,7 @@ #include "mypopup.h" -myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2, const TQString &flagFile) : TQFrame(parent) +myPopup::myPopup(TQWidget *tqparent, const TQString &text, const TQString &text2, const TQString &flagFile) : TQFrame(tqparent) { TQHBoxLayout *lay = new TQHBoxLayout(this); lay -> setMargin(4); @@ -33,7 +33,7 @@ myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2, if (!text2.isNull()) { TQLabel *l2 = new TQLabel(text2, vbox); - l2 -> setAlignment(Qt::AlignCenter); + l2 -> tqsetAlignment(TQt::AlignCenter); vboxLayout -> addWidget(l2); } @@ -43,10 +43,10 @@ myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2, lay -> addWidget(flag); TQImage flagImg(flagFile); flag -> setPixmap(flagImg.smoothScale(flagImg.width() / 5, flagImg. height() / 5)); - flag -> setAlignment(Qt::AlignCenter); + flag -> tqsetAlignment(TQt::AlignCenter); } - l -> setAlignment(Qt::AlignCenter); + l -> tqsetAlignment(TQt::AlignCenter); TQFont f = l -> font(); f.setBold(true); l -> setFont(f); @@ -55,7 +55,7 @@ myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2, setFrameStyle(TQFrame::Box | TQFrame::Plain); setLineWidth(2); - setFixedSize(sizeHint()); + setFixedSize(tqsizeHint()); } void myPopup::mousePressEvent(TQMouseEvent *) diff --git a/kgeography/src/mypopup.h b/kgeography/src/mypopup.h index c768a308..d840eb49 100644 --- a/kgeography/src/mypopup.h +++ b/kgeography/src/mypopup.h @@ -13,13 +13,14 @@ #include -class myPopup : public QFrame +class myPopup : public TQFrame { Q_OBJECT + TQ_OBJECT friend class popupManager; private: - myPopup(TQWidget *parent, const TQString &text, const TQString &text2 = TQString::null, const TQString &flagFile = TQString::null); + myPopup(TQWidget *tqparent, const TQString &text, const TQString &text2 = TQString(), const TQString &flagFile = TQString()); signals: void deleteMe(); diff --git a/kgeography/src/popupmanager.cpp b/kgeography/src/popupmanager.cpp index 1a457f81..1b19b44d 100644 --- a/kgeography/src/popupmanager.cpp +++ b/kgeography/src/popupmanager.cpp @@ -11,9 +11,9 @@ #include "mypopup.h" #include "popupmanager.h" -popupManager::popupManager(TQWidget *parent) +popupManager::popupManager(TQWidget *tqparent) { - p_parent = parent; + p_parent = tqparent; p_mp = 0; } diff --git a/kgeography/src/popupmanager.h b/kgeography/src/popupmanager.h index 8b28f56e..57dd68c8 100644 --- a/kgeography/src/popupmanager.h +++ b/kgeography/src/popupmanager.h @@ -17,11 +17,12 @@ class TQWidget; class myPopup; -class popupManager : public QObject +class popupManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - popupManager(TQWidget *parent); + popupManager(TQWidget *tqparent); // shows text at p and the flag void show(const TQString &text, const TQString &text2, const TQPoint &p, const TQString &flagFile); diff --git a/khangman/ChangeLog b/khangman/ChangeLog index 337a55d6..93419a47 100644 --- a/khangman/ChangeLog +++ b/khangman/ChangeLog @@ -1,5 +1,5 @@ June 23, 2005 -- add timers for KPassivePopup (Hint and Already Guessed) to allow young children to read (young children need more time) +- add timers for KPassivePopup (Hint and Already Guessed) to allow young tqchildren to read (young tqchildren need more time) - fixed hint position - tooltip if no Win dialog to say the game is finished (is displayed for 4 seconds) diff --git a/khangman/README.languages b/khangman/README.languages index d72a7a72..b0d2bf07 100644 --- a/khangman/README.languages +++ b/khangman/README.languages @@ -25,7 +25,7 @@ cd kdeedu/khangman ./add_language - Here you must replace with your language code. + Here you must tqreplace with your language code. The program will refuse a non-valid language code! diff --git a/khangman/khangman/advanced.ui b/khangman/khangman/advanced.ui index 02845c1a..20d03dac 100644 --- a/khangman/khangman/advanced.ui +++ b/khangman/khangman/advanced.ui @@ -1,10 +1,10 @@ advanced - + advanced - + 0 0 @@ -16,15 +16,15 @@ unnamed - + - layout2 + tqlayout2 unnamed - + groupBox5 @@ -35,7 +35,7 @@ unnamed - + kcfg_Hint @@ -55,7 +55,7 @@ If this is <b>enabled</b>, then hints are available and you can get - + groupBox6 @@ -66,7 +66,7 @@ If this is <b>enabled</b>, then hints are available and you can get unnamed - + kcfg_AccentedLetters @@ -91,5 +91,5 @@ For example, in Catalan, if this is unchecked and you type "o", the o and ò wil - + diff --git a/khangman/khangman/data/en/easy.kvtml b/khangman/khangman/data/en/easy.kvtml index 8e2521aa..58338d21 100644 --- a/khangman/khangman/data/en/easy.kvtml +++ b/khangman/khangman/data/en/easy.kvtml @@ -3,7 +3,7 @@ playtime - time assigned for children to play + time assigned for tqchildren to play furniture @@ -134,7 +134,7 @@ large group of persons - children + tqchildren young humans diff --git a/khangman/khangman/khangman.cpp b/khangman/khangman/khangman.cpp index 0b14829e..e478d804 100644 --- a/khangman/khangman/khangman.cpp +++ b/khangman/khangman/khangman.cpp @@ -74,30 +74,30 @@ KHangMan::~KHangMan() void KHangMan::setupActions() { // Game->New - KAction *action = new KAction(i18n("&New"), "filenew", CTRL+Key_N , m_view, TQT_SLOT(slotNewGame()), actionCollection(), "file_new"); + KAction *action = new KAction(i18n("&New"), "filenew", CTRL+Key_N , TQT_TQOBJECT(m_view), TQT_SLOT(slotNewGame()), actionCollection(), "file_new"); action->setToolTip(i18n( "Play with a new word" )); // Game->Get Words in New Language - new KAction( i18n("&Get Words in New Language..."), "knewstuff", CTRL+Key_G, this, TQT_SLOT( slotDownloadNewStuff() ), actionCollection(), "downloadnewstuff" ); + new KAction( i18n("&Get Words in New Language..."), "knewstuff", CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT( slotDownloadNewStuff() ), actionCollection(), "downloadnewstuff" ); - KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); m_levelAction = new KSelectAction(i18n("Le&vel"), 0, actionCollection(), "combo_level"); m_levelAction->setToolTip(i18n( "Choose the level" )); m_levelAction->setWhatsThis(i18n( "Choose the level of difficulty" )); - connect(m_levelAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChangeLevel(int))); + connect(m_levelAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeLevel(int))); // Action for selecting language. m_languageAction = new KSelectAction(i18n("&Language"), 0, actionCollection(), "languages"); m_languageAction->setItems(m_languageNames); - m_languageAction->setCurrentItem(m_languages.findIndex(Prefs::selectedLanguage())); - connect(m_languageAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChangeLanguage(int))); + m_languageAction->setCurrentItem(m_languages.tqfindIndex(Prefs::selectedLanguage())); + connect(m_languageAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeLanguage(int))); - KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection()); // Mode. Currently hard coded into Sea and Desert themes. TQStringList modes; - m_modeAction = new KSelectAction(i18n("L&ook"), 0, this, TQT_SLOT(slotChangeMode()), actionCollection(), "combo_mode"); + m_modeAction = new KSelectAction(i18n("L&ook"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeMode()), actionCollection(), "combo_mode"); modes += i18n("&Sea Theme"); modes += i18n("&Desert Theme"); m_modeAction->setItems(modes); @@ -150,7 +150,7 @@ void KHangMan::slotChangeLevel(int index) changeStatusbar("", IDS_ACCENTS); #endif Prefs::setCurrentLevel(index); - levelString.replace(0, 1, levelString.left(1).lower()); + levelString.tqreplace(0, 1, levelString.left(1).lower()); Prefs::setLevelFile(levelString +".kvtml"); Prefs::writeConfig(); m_view->slotNewGame(); @@ -159,12 +159,12 @@ void KHangMan::slotChangeLevel(int index) void KHangMan::slotChangeLanguage(int index) { //good when no in English - kdDebug() << "Change to " << m_languages[m_languageNames.findIndex(m_languageNames[index])] << endl; - Prefs::setSelectedLanguage(m_languages[m_languageNames.findIndex(m_languageNames[index])]); + kdDebug() << "Change to " << m_languages[m_languageNames.tqfindIndex(m_languageNames[index])] << endl; + Prefs::setSelectedLanguage(m_languages[m_languageNames.tqfindIndex(m_languageNames[index])]); Prefs::writeConfig(); loadLevels(); loadLangToolBar(); - changeStatusbar(m_languageNames[m_languages.findIndex(Prefs::selectedLanguage())], IDS_LANG); + changeStatusbar(m_languageNames[m_languages.tqfindIndex(Prefs::selectedLanguage())], IDS_LANG); setAccent(); setMessages(); m_view->slotNewGame(); @@ -196,8 +196,8 @@ void KHangMan::setLanguages() for (TQStringList::Iterator it =mdirs.begin(); it !=mdirs.end(); ++it ) { TQDir dir(*it); m_languages += dir.entryList(TQDir::Dirs, TQDir::Name); - m_languages.remove(m_languages.find(".")); - m_languages.remove(m_languages.find("..")); + m_languages.remove(m_languages.tqfind(".")); + m_languages.remove(m_languages.tqfind("..")); } m_languages.sort(); @@ -209,7 +209,7 @@ void KHangMan::setLanguages() TQStringList temp_languages; for (uint i=0; i1) { + if (m_languages.tqcontains(m_languages[i])>1) { temp_languages.append(m_languages[i]); m_languages.remove(m_languages[i]); } @@ -224,11 +224,11 @@ void KHangMan::setLanguages() // Write the present languages in config so they cannot be downloaded. KConfig *config=kapp->config(); - config->setGroup("KNewStuffStatus"); + config->setGroup("KNewStufftqStatus"); for (uint i=0; ireadEntry(tmp)) - config->writeEntry(tmp, TQDate::currentDate().toString(Qt::ISODate)); + config->writeEntry(tmp, TQString(TQDate::tqcurrentDate().toString(Qt::ISODate))); } // We look in $KDEDIR/share/locale/all_languages from @@ -261,7 +261,7 @@ void KHangMan::loadSettings() selectedLanguage = Prefs::selectedLanguage(); if (m_languages.grep(selectedLanguage).isEmpty()) selectedLanguage = "en"; - changeStatusbar(m_languageNames[m_languages.findIndex(Prefs::selectedLanguage())], IDS_LANG); + changeStatusbar(m_languageNames[m_languages.tqfindIndex(Prefs::selectedLanguage())], IDS_LANG); // Show/hide characters toolbar if (Prefs::showCharToolbar()) secondToolbar->show(); @@ -276,8 +276,8 @@ void KHangMan::setLevel() if (currentLevel > (uint) levels.count()) currentLevel= 0; levelString = levels[currentLevel]; - levelString.replace(0, 1, levelString.left(1).lower()); - levelString = levels[currentLevel].replace(0, 1, levels[currentLevel].left(1).lower()) ; + levelString.tqreplace(0, 1, levelString.left(1).lower()); + levelString = levels[currentLevel].tqreplace(0, 1, levels[currentLevel].left(1).lower()) ; } void KHangMan::loadLevels() @@ -292,14 +292,14 @@ void KHangMan::loadLevels() for (TQStringList::Iterator it = mfiles.begin(); it != mfiles.end(); ++it ) { TQFile f( *it); //find the last / in the file name - int location = f.name().findRev("/"); + int location = f.name().tqfindRev("/"); //strip the string to keep only the filename and not the path TQString mString = f.name().right(f.name().length()-location-1); if (mString == Prefs::levelFile()) levelBool = true; mString = mString.left(mString.length()-6); //Put the first letter in Upper case - mString = mString.replace(0, 1, mString.left(1).upper()); + mString = mString.tqreplace(0, 1, mString.left(1).upper()); levels+=mString; } //TODO else tell no files had been found @@ -307,13 +307,13 @@ void KHangMan::loadLevels() // Sort easy, medium, hard at bottom, with the other categories at the top levels.sort(); - TQString replace[3] = { "Easy", "Medium", "Hard" }; + TQString tqreplace[3] = { "Easy", "Medium", "Hard" }; for ( int i = 0; i < 3; ++i ) { - if ( levels.findIndex( replace[i] ) > -1 ) + if ( levels.tqfindIndex( tqreplace[i] ) > -1 ) { - levels.remove( replace[i] ); - levels.append( replace[i] ); + levels.remove( tqreplace[i] ); + levels.append( tqreplace[i] ); } } @@ -338,7 +338,7 @@ void KHangMan::loadLevels() if (levelBool == false) { - Prefs::setLevelFile(levels[0].replace(0, 1, levels[0].left(1).lower())+".kvtml"); + Prefs::setLevelFile(levels[0].tqreplace(0, 1, levels[0].left(1).lower())+".kvtml"); Prefs::setCurrentLevel(0); currentLevel =0; Prefs::writeConfig(); @@ -351,7 +351,7 @@ void KHangMan::loadLevels() setLevel(); TQString m_lstring = translatedLevels[currentLevel].utf8(); - m_lstring.replace(0, 1, m_lstring.left(1).upper()); + m_lstring.tqreplace(0, 1, m_lstring.left(1).upper()); changeStatusbar(m_lstring, IDS_LEVEL); } @@ -380,7 +380,7 @@ void KHangMan::optionsPreferences() Timer *m_timer = new Timer(); dialog->addPage(m_timer, i18n("Timers"), "clock"); - connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateSettings())); dialog->show(); } @@ -420,22 +420,22 @@ void KHangMan::loadLangToolBar() m_allData.clear(); if (!m_noSpecialChars) { - TQString myString=TQString("khangman/%1.txt").arg(Prefs::selectedLanguage()); + TQString myString=TQString("khangman/%1.txt").tqarg(Prefs::selectedLanguage()); TQFile myFile; myFile.setName(locate("data", myString)); // Let's look in local KDEHOME dir then if (!myFile.exists()) { TQString myString=TQString("khangman/data/%1/%1.txt") - .arg(Prefs::selectedLanguage()) - .arg(Prefs::selectedLanguage()); + .tqarg(Prefs::selectedLanguage()) + .tqarg(Prefs::selectedLanguage()); myFile.setName(locate("data",myString)); kdDebug() << myString << endl; } if (!myFile.exists()) { TQString mString=i18n("File $KDEDIR/share/apps/khangman/%1.txt not found;\n" - "check your installation.").arg(Prefs::selectedLanguage()); + "check your installation.").tqarg(Prefs::selectedLanguage()); KMessageBox::sorry( this, mString, i18n("Error") ); kapp->quit(); @@ -455,9 +455,9 @@ void KHangMan::loadLangToolBar() for (int i=0; i<(int) m_allData.count(); i++) secondToolbar->insertButton (charIcon(m_allData[i].at(0)), i, - TQT_SIGNAL( clicked() ), this, + TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotPasteChar()), true, - i18n("Inserts the character %1").arg(m_allData[i]), i+1 ); + i18n("Inserts the character %1").tqarg(m_allData[i]), i+1 ); } if (Prefs::showCharToolbar()) @@ -480,7 +480,7 @@ void KHangMan::slotPasteChar() TQString KHangMan::charIcon(const TQChar & c) { ///Create a name and path for the icon - TQString s = locateLocal("icon", "char" + TQString::number(c.unicode()) + ".png"); + TQString s = locateLocal("icon", "char" + TQString::number(c.tqunicode()) + ".png"); TQRect r(4, 4, 120, 120); @@ -492,19 +492,19 @@ TQString KHangMan::charIcon(const TQChar & c) ///Create the pixmap TQPixmap pm(128, 128); - pm.fill(Qt::white); + pm.fill(TQt::white); TQPainter p(&pm); p.setFont(font); - p.setPen(Qt::black); - p.drawText(r, Qt::AlignCenter, (TQString) c); + p.setPen(TQt::black); + p.drawText(r, TQt::AlignCenter, (TQString) c); - ///Create transparency mask + ///Create transparency tqmask TQBitmap bm(128, 128); - bm.fill(Qt::color0); + bm.fill(TQt::color0); TQPainter b(&bm); b.setFont(font); - b.setPen(Qt::color1); - b.drawText(r, Qt::AlignCenter, (TQString) c); + b.setPen(TQt::color1); + b.drawText(r, TQt::AlignCenter, (TQString) c); ///Mask the pixmap pm.setMask(bm); diff --git a/khangman/khangman/khangman.h b/khangman/khangman/khangman.h index 7c47711a..befebd3e 100644 --- a/khangman/khangman/khangman.h +++ b/khangman/khangman/khangman.h @@ -51,6 +51,7 @@ const int IDS_HINT = 103; class KHangMan : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor diff --git a/khangman/khangman/khangmanview.cpp b/khangman/khangman/khangmanview.cpp index 8fc5bcc5..f4165258 100644 --- a/khangman/khangman/khangmanview.cpp +++ b/khangman/khangman/khangmanview.cpp @@ -41,23 +41,23 @@ #include "khangmanview.h" -KHangManView::KHangManView(KHangMan*parent, const char *name) - : TQWidget(parent, name, WStaticContents | WNoAutoErase) +KHangManView::KHangManView(KHangMan*tqparent, const char *name) + : TQWidget(tqparent, name, WStaticContents | WNoAutoErase) { - khangman = parent; + khangman = tqparent; // The widget for entering letters. m_letterInput = new KLineEdit( this, "charWrite" ); - m_letterInput->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1, + m_letterInput->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1, (TQSizePolicy::SizeType) 0, 0, 0, m_letterInput->sizePolicy().hasHeightForWidth() ) ); m_letterInput->setMaxLength( 1 ); - m_letterInput->setAlignment( int( TQLineEdit::AlignHCenter ) ); + m_letterInput->tqsetAlignment( int( TQLineEdit::AlignHCenter ) ); // Press this button to enter a letter (or press enter) m_guessButton = new KPushButton( this, "guessButton" ); - m_guessButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1, + m_guessButton->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1, (TQSizePolicy::SizeType) 0, 0, 0, m_guessButton->sizePolicy().hasHeightForWidth() ) ); @@ -102,30 +102,30 @@ void KHangManView::replaceLetters(const TQString& sChar) // Replace letter in the word if (Prefs::oneLetter()) { // We just replace the next instance. - for (int count=0; count < m_word.contains(sChar, false); count++) { + for (int count=0; count < m_word.tqcontains(sChar, false); count++) { - index = m_word.find(sChar, index, false); + index = m_word.tqfind(sChar, index, false); if (m_goodWord.at(2*index)=='_') { - m_goodWord.replace((2*index), 1, m_word.at(index)); + m_goodWord.tqreplace((2*index), 1, m_word.at(index)); kdDebug() << "m_goodword " << m_goodWord << endl; - if (count == m_word.contains(sChar, false)-1) + if (count == m_word.tqcontains(sChar, false)-1) b_end = true; break; } else index++; - if (count == m_word.contains(sChar, false)-1) + if (count == m_word.tqcontains(sChar, false)-1) b_end = true; } } else { - for (int count=0; count < m_word.contains(sChar, false); count++) { + for (int count=0; count < m_word.tqcontains(sChar, false); count++) { //searching for letter location - index = m_word.find(sChar, index, false); + index = m_word.tqfind(sChar, index, false); //we replace it... - m_goodWord.replace((2*index), 1,m_word.at(index)); + m_goodWord.tqreplace((2*index), 1,m_word.at(index)); index++; } } @@ -146,7 +146,7 @@ void KHangManView::replaceLetters(const TQString& sChar) if (!Prefs::oneLetter()) m_guessedLetters << sChar; //appends the list only if not in One Letter only mode... - if (m_word.contains(sChar, false) == 1) + if (m_word.tqcontains(sChar, false) == 1) m_guessedLetters << sChar; //append if only one instance if (Prefs::oneLetter() && b_end) @@ -159,28 +159,28 @@ bool KHangManView::containsChar(const TQString &sChar) bool b = false; if (m_accentedLetters && !Prefs::accentedLetters()) { if (sChar=="i") - b = m_word.contains(TQString::fromUtf8("í"), false); + b = m_word.tqcontains(TQString::fromUtf8("í"), false); if (sChar=="a") - b = m_word.contains(TQString::fromUtf8("à"), false) - || m_word.contains(TQString::fromUtf8("á"), false) - || m_word.contains(TQString::fromUtf8("ã"), false); + b = m_word.tqcontains(TQString::fromUtf8("à"), false) + || m_word.tqcontains(TQString::fromUtf8("á"), false) + || m_word.tqcontains(TQString::fromUtf8("ã"), false); if (sChar=="u") - b = m_word.contains(TQString::fromUtf8("ü"), false) - || m_word.contains(TQString::fromUtf8("ù"), false); + b = m_word.tqcontains(TQString::fromUtf8("ü"), false) + || m_word.tqcontains(TQString::fromUtf8("ù"), false); if (sChar=="o") - b = m_word.contains(TQString::fromUtf8("ò"), false) - || m_word.contains(TQString::fromUtf8("ó"), false) - || m_word.contains(TQString::fromUtf8("õ"), false); + b = m_word.tqcontains(TQString::fromUtf8("ò"), false) + || m_word.tqcontains(TQString::fromUtf8("ó"), false) + || m_word.tqcontains(TQString::fromUtf8("õ"), false); if (sChar=="e") - b = m_word.contains(TQString::fromUtf8("è"), false) - || m_word.contains(TQString::fromUtf8("é"), false); + b = m_word.tqcontains(TQString::fromUtf8("è"), false) + || m_word.tqcontains(TQString::fromUtf8("é"), false); } - return (b || m_word.contains(sChar, false)); + return (b || m_word.tqcontains(sChar, false)); } @@ -190,7 +190,7 @@ bool KHangManView::containsChar(const TQString &sChar) void KHangManView::mousePressEvent(TQMouseEvent *mouse) { - if (mouse->button() == RightButton && m_hintExists && Prefs::hint()) { + if (mouse->button() == Qt::RightButton && m_hintExists && Prefs::hint()) { KPassivePopup *myPopup = new KPassivePopup( m_letterInput); myPopup->setView(i18n("Hint"), m_hint ); @@ -234,7 +234,7 @@ void KHangManView::setTheme() void KHangManView::paintEvent( TQPaintEvent * ) { // This pixmap implements double buffering to remove all forms of - // flicker in the repainting. + // flicker in the tqrepainting. TQPixmap buf(width(), height()); // Repaint the contents of the khangman view into the pixmap. @@ -379,7 +379,7 @@ void KHangManView::slotTry() } // Handle the guess. - if (!m_guessedLetters.contains(guess.lower())) { + if (!m_guessedLetters.tqcontains(guess.lower())) { // The letter is not already guessed. if (containsChar(guess)) { @@ -389,11 +389,11 @@ void KHangManView::slotTry() TQString stripWord = m_goodWord; TQString sword = m_word; if (dd > 0) { - stripWord.replace(2*c, 1, ""); - stripWord.replace(2*c-1, 1, ""); + stripWord.tqreplace(2*c, 1, ""); + stripWord.tqreplace(2*c-1, 1, ""); - stripWord.replace(2*(dd-1), 1, ""); - stripWord.replace(2*(dd-1)-1, 1, ""); + stripWord.tqreplace(2*(dd-1), 1, ""); + stripWord.tqreplace(2*(dd-1)-1, 1, ""); } TQStringList rightChars = TQStringList::split(" ", stripWord, true); @@ -431,7 +431,7 @@ void KHangManView::slotTry() popup->show(mapToGlobal(point)); TQTimer::singleShot( 4*1000, this, TQT_SLOT(slotNewGame()) ); } - else if (KMessageBox::questionYesNo(this, i18n("Congratulations! You won! Do you want to play again?"),TQString::null,i18n("Play Again"), i18n("Do Not Play")) == 3) + else if (KMessageBox::questionYesNo(this, i18n("Congratulations! You won! Do you want to play again?"),TQString(),i18n("Play Again"), i18n("Do Not Play")) == 3) slotNewGame(); else kapp->quit(); @@ -442,7 +442,7 @@ void KHangManView::slotTry() m_guessedLetters << guess.lower(); m_guessedLetters << guess.upper(); - m_missedLetters = m_missedLetters.replace((2 * m_numMissedLetters), + m_missedLetters = m_missedLetters.tqreplace((2 * m_numMissedLetters), 1, guess.lower()); m_numMissedLetters++; update(); @@ -467,7 +467,7 @@ void KHangManView::slotTry() TQLabel *popLabel = new TQLabel( vb); popLabel->setFont(TQFont("Sans Serif", 14, TQFont::Normal)); - popLabel->setText(i18n("You lost!\nThe word was\n%1").arg(m_word)); + popLabel->setText(i18n("You lost!\nThe word was\n%1").tqarg(m_word)); popup->setView( vb ); TQPoint abspos = popup->pos(); @@ -477,7 +477,7 @@ void KHangManView::slotTry() TQTimer::singleShot( 4 * 1000, this, TQT_SLOT(slotNewGame()) ); } - else if (KMessageBox::questionYesNo(this, newGameString, TQString::null, i18n("Play Again"), i18n("Do Not Play")) == 3) + else if (KMessageBox::questionYesNo(this, newGameString, TQString(), i18n("Play Again"), i18n("Do Not Play")) == 3) slotNewGame(); else kapp->quit(); @@ -496,7 +496,7 @@ void KHangManView::slotTry() int x = 0; int y = 0; - if (m_missedLetters.contains(guess, false) > 0) { + if (m_missedLetters.tqcontains(guess, false) > 0) { // FIXME: popup should be better placed. TQPoint abspos = popup->pos(); @@ -513,7 +513,7 @@ void KHangManView::slotTry() m_letterInput->setEnabled(false); } - if (m_goodWord.contains(guess, false) > 0) { + if (m_goodWord.tqcontains(guess, false) > 0) { TQPoint abspos = popup->pos(); if (Prefs::mode() == 0) { @@ -586,15 +586,15 @@ void KHangManView::game() // Check if the data files are installed in the correct dir. TQString myString = TQString("khangman/data/%1/%2") - .arg(Prefs::selectedLanguage()) - .arg(Prefs::levelFile()); + .tqarg(Prefs::selectedLanguage()) + .tqarg(Prefs::levelFile()); TQFile myFile; myFile.setName(locate("data", myString)); if (!myFile.exists()) { TQString mString = i18n("File $KDEDIR/share/apps/khangman/data/%1/%2 not found!\n" "Check your installation, please!") - .arg(Prefs::selectedLanguage()) - .arg(Prefs::levelFile()); + .tqarg(Prefs::selectedLanguage()) + .tqarg(Prefs::levelFile()); KMessageBox::sorry( this, mString, i18n("Error") ); kapp->quit(); } @@ -631,42 +631,42 @@ void KHangManView::game() // If needed, display white space or - if in word or semi dot. // 1. Find dashes. - int f = m_word.find( "-" ); + int f = m_word.tqfind( "-" ); if (f>0) { - m_goodWord.replace(2*f, 1, "-"); + m_goodWord.tqreplace(2*f, 1, "-"); - int g = m_word.find( "-", f+1); + int g = m_word.tqfind( "-", f+1); if (g>0) - m_goodWord.replace(2*g, 3, "-"); + m_goodWord.tqreplace(2*g, 3, "-"); if (g>1) m_goodWord.append("_"); } // 2. Find white space. - c = m_word.find( " " ); + c = m_word.tqfind( " " ); if (c > 0) { - m_goodWord.replace(2*c, 1, " "); - dd = m_word.find( " ", c+1); + m_goodWord.tqreplace(2*c, 1, " "); + dd = m_word.tqfind( " ", c+1); if (dd > 0) - m_goodWord.replace(2*dd, c+1, " "); + m_goodWord.tqreplace(2*dd, c+1, " "); } // 3. Find · - int e = m_word.find( TQString::fromUtf8("·") ); + int e = m_word.tqfind( TQString::fromUtf8("·") ); if (e>0) - m_goodWord.replace(2*e, 1, TQString::fromUtf8("·") ); + m_goodWord.tqreplace(2*e, 1, TQString::fromUtf8("·") ); // 4. Find ' - int h = m_word.find( "'" ); + int h = m_word.tqfind( "'" ); if (h>0) - m_goodWord.replace(2*h, 1, "'"); + m_goodWord.tqreplace(2*h, 1, "'"); } void KHangManView::readFile() { kdDebug() << "in read kvtml file " << endl; - TQString myString=TQString("khangman/data/%1/%2").arg(Prefs::selectedLanguage()).arg(Prefs::levelFile()); + TQString myString=TQString("khangman/data/%1/%2").tqarg(Prefs::selectedLanguage()).tqarg(Prefs::levelFile()); myString= locate("data", myString); KEduVocDataItemList verbs = KEduVocData::parse(myString); @@ -728,7 +728,7 @@ void KHangManView::loadAnimation() for (uint i = 0; i < 11; i++) { m_animationPics[i].load(locate( "data", TQString("khangman/pics/%1/animation%2.png") - .arg(m_themeName).arg(i) )); + .tqarg(m_themeName).tqarg(i) )); } } diff --git a/khangman/khangman/khangmanview.h b/khangman/khangman/khangmanview.h index 7ffffcf2..8f03f7c9 100644 --- a/khangman/khangman/khangmanview.h +++ b/khangman/khangman/khangmanview.h @@ -38,16 +38,17 @@ class KHangMan; * here. */ -class KHangManView : public QWidget +class KHangManView : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KHangManView(KHangMan *parent=0, const char *name=0); + KHangManView(KHangMan *tqparent=0, const char *name=0); virtual ~KHangManView(); - ///parent instance + ///tqparent instance KHangMan *khangman; void setTheme(); diff --git a/khangman/khangman/khnewstuff.cpp b/khangman/khangman/khnewstuff.cpp index f15fca87..efc816e5 100644 --- a/khangman/khangman/khnewstuff.cpp +++ b/khangman/khangman/khnewstuff.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include @@ -55,8 +55,8 @@ bool KHNewStuff::install( const TQString &fileName ) m_view->khangman->setLanguages(); //refresh Languages menu m_view->khangman->m_languageAction->setItems(m_view->khangman->m_languageNames); - m_view->khangman->slotChangeLanguage(m_view->khangman->m_languages.findIndex(Prefs::selectedLanguage())); - m_view->khangman->m_languageAction->setCurrentItem(m_view->khangman->m_languages.findIndex(Prefs::selectedLanguage())); + m_view->khangman->slotChangeLanguage(m_view->khangman->m_languages.tqfindIndex(Prefs::selectedLanguage())); + m_view->khangman->m_languageAction->setCurrentItem(m_view->khangman->m_languages.tqfindIndex(Prefs::selectedLanguage())); return true; } diff --git a/khangman/khangman/khnewstuff.h b/khangman/khangman/khnewstuff.h index 826300f2..a80652ed 100644 --- a/khangman/khangman/khnewstuff.h +++ b/khangman/khangman/khnewstuff.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef KHNEWSTUFF_H #define KHNEWSTUFF_H diff --git a/khangman/khangman/normal.ui b/khangman/khangman/normal.ui index f9673223..ad8dc9e9 100644 --- a/khangman/khangman/normal.ui +++ b/khangman/khangman/normal.ui @@ -1,10 +1,10 @@ normal - + normal - + 0 0 @@ -16,15 +16,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + kcfg_OneLetter @@ -41,7 +41,7 @@ For example, the word to guess is "potato". If this option is unchecked, when yo Default is that for one letter typed, all instances of that letter in the word are displayed. - + kcfg_WonDialog @@ -58,7 +58,7 @@ This is the default state. If this option is checked, this dialog will not appear and a new game will automatically start after four seconds. A passive popup tells you you have won the game. When this opton is checked you don't have an intrusive dialog each time you won a game.
- + groupBox3_2 @@ -69,7 +69,7 @@ If this option is checked, this dialog will not appear and a new game will autom unnamed - + kcfg_Sound @@ -90,5 +90,5 @@ Default is no sound. - +
diff --git a/khangman/khangman/prefs.kcfgc b/khangman/khangman/prefs.kcfgc index b7e804e6..8d9311bc 100644 --- a/khangman/khangman/prefs.kcfgc +++ b/khangman/khangman/prefs.kcfgc @@ -1,6 +1,6 @@ # Code generation options for kconfig_compiler File=khangman.kcfg -IncludeFiles=kstandarddirs.h,qdir.h +IncludeFiles=kstandarddirs.h,tqdir.h ClassName=Prefs Singleton=true Mutators=true diff --git a/khangman/khangman/timer.h b/khangman/khangman/timer.h index ad6b50bb..1d2d1738 100644 --- a/khangman/khangman/timer.h +++ b/khangman/khangman/timer.h @@ -33,6 +33,7 @@ class Timer : public timerdlg { Q_OBJECT + TQ_OBJECT public: ///Constructor diff --git a/khangman/khangman/timerdlg.ui b/khangman/khangman/timerdlg.ui index facfaaa1..2e803f1d 100644 --- a/khangman/khangman/timerdlg.ui +++ b/khangman/khangman/timerdlg.ui @@ -1,10 +1,10 @@ timerdlg - + timerdlg - + 0 0 @@ -16,7 +16,7 @@ unnamed - + groupBox5 @@ -27,15 +27,15 @@ unnamed - + - layout5 + tqlayout5 unnamed - + kcfg_HintTimer @@ -64,7 +64,7 @@ Time during which the Hint is displayed - You can set the time for displaying the Hint tooltip. Default is 3 seconds but younger children might need longer time to be able to read the Hint. + You can set the time for displaying the Hint tooltip. Default is 3 seconds but younger tqchildren might need longer time to be able to read the Hint. @@ -77,7 +77,7 @@ Expanding - + 295 20 @@ -94,14 +94,14 @@ Expanding - + 25 16 - + timeHintLabel @@ -122,9 +122,9 @@ - + - layout6 + tqlayout6 @@ -138,7 +138,7 @@ Set the time for displaying the Already Guessed Letter: - + timeMissedLabel @@ -149,7 +149,7 @@ kcfg_MissedTimer - + kcfg_MissedTimer @@ -178,7 +178,7 @@ Time during which the Already Guessed tooltip is displayed - You can set the time for displaying the Already Guessed tooltip after you try a letter that was already guessed. Default is 3 seconds but younger children might need longer time to be able to understand they are trying a letter that was already guessed. + You can set the time for displaying the Already Guessed tooltip after you try a letter that was already guessed. Default is 3 seconds but younger tqchildren might need longer time to be able to understand they are trying a letter that was already guessed. @@ -191,7 +191,7 @@ Expanding - + 25 16 @@ -208,7 +208,7 @@ Expanding - + 295 20 @@ -221,7 +221,7 @@ - + kactivelabel.h kactivelabel.h diff --git a/kig/ChangeLog b/kig/ChangeLog index ec8d6042..8c60c89f 100644 --- a/kig/ChangeLog +++ b/kig/ChangeLog @@ -10,7 +10,7 @@ 2005-09-16 Pino Toscano * Move a text label by (2,2), so the attached ones should be less - sticky to the "parent" object. + sticky to the "tqparent" object. 2005-09-08 Pino Toscano @@ -936,7 +936,7 @@ and made a sort of skeleton to modify type's data. * Made buttons of some dialogs like other KDE dialogs ones (with - icons and correct alignment). + icons and correct tqalignment). * Kig now ask the user when exporting type(s) to an already existant file. @@ -1142,8 +1142,8 @@ * Fix the moving system again, it now only redraws exactly those objects that need to be redrawn. E.g. when a constrained point - was moved, before it was assumed that all of its parents, and - their children would move, whereas in reality, a constrained point + was moved, before it was assumed that all of its tqparents, and + their tqchildren would move, whereas in reality, a constrained point does not move the curve it is constrained to. This is now taken into account for. This much optimizes the case where we move the constrained point in examples/sine-curve.kig. @@ -1200,7 +1200,7 @@ could not open.. I'm backporting this into Kig 0.6.0 and informing the packager.. - * clean up: Objects now store their parents in order, so that no + * clean up: Objects now store their tqparents in order, so that no parsing has to be done in the calc() function.. Also some more modifications making that function a bit simpler are included. Specifically, ArgsParser now does the checking of the arguments, @@ -1218,7 +1218,7 @@ 2003-09-01 Dominique Devriese - * only move an object if its parents are not yet moving.. This + * only move an object if its tqparents are not yet moving.. This fixes bug #63250. * remove the defective operator| and operator& implementations for @@ -1399,7 +1399,7 @@ * show an appropriate error when trying to open an non-existing file.. - * clean up the object parent-child relation mechanism. Rather + * clean up the object tqparent-child relation mechanism. Rather large code cleanup, that simplifies a lot of code.. Needed a backwards-compatible file format extension. This commit now also adds proper treatment of internal objects, because it no longer @@ -1438,7 +1438,7 @@ 2003-05-24 Dominique Devriese * when the user tries to construct a macro that constructs an - object from its children, warn him instead of + object from its tqchildren, warn him instead of crashing... Thanks to Stephan Binner for the bug report * improve the export to image dialog, as suggested by Stephan Binner @@ -1516,7 +1516,7 @@ * organise the filters directory more sanely - * fix for deleting: remove deleted objects from their children, so + * fix for deleting: remove deleted objects from their tqchildren, so they don't appear in saved files 2003-05-07 Dominique Devriese diff --git a/kig/DESIGN b/kig/DESIGN index fd887779..6d4a8c37 100644 --- a/kig/DESIGN +++ b/kig/DESIGN @@ -19,7 +19,7 @@ An ObjectImp represents the current state of an object in Kig. It keeps information about what type of object it is ( e.g. a line, a point, a circle etc. ), and its exact data ( e.g. the center and radius of the circle ). It is *not* in any way aware of how the -object was calculated from its parents (e.g. is this a line that is +object was calculated from its tqparents (e.g. is this a line that is constructed as the parallel of another line, or as the line going through two given points ? ) or how it is drawn on the window ( e.g. the thickness of the line, its color etc. ). @@ -50,21 +50,21 @@ calculating an ObjectImp from other ObjectImp's. It is also a node in the dependency graph of a certain document. E.g. a LineImp can be calculated from the two PointImp's it has to go through; every time either of them moves, this calculation is redone. In this case, there -would be an ObjectCalcer that keeps a reference to its two parents ( +would be an ObjectCalcer that keeps a reference to its two tqparents ( the ObjectCalcer's representing the points ), and that will calculate its ObjectImp value every time it is asked to do so ( i.e. every time -one of its parents moves.. ). +one of its tqparents moves.. ). Because of the complex relations that ObjectCalcer's hold to other ObjectCalcer's and to other classes, they have been made reference-counted. This means that they keep a count internally of how much times a pointer to them is held. If this count reaches 0, this means that nobody needs them anymore, and they delete themselves. -E.g. an ObjectCalcer always keeps a reference to its parents, to +E.g. an ObjectCalcer always keeps a reference to its tqparents, to ensure that those aren't deleted before it is deleted. In the inheritance graph of a document, the lowermost objects keep -references to their parents and those keep reference to their parents, +references to their tqparents and those keep reference to their tqparents, so that all of the top of the graph is kept alive. Of course, someone needs to keep a reference to the bottommost objects in the graph, because otherwise, the entire graph would be deleted. As we will see @@ -76,7 +76,7 @@ At the end of the program, this reference is released, and all the objects are deleted. A special case of an ObjectCalcer is the ObjectConstCalcer. This is -an ObjectCalcer that has no parents, and only holds some data. The +an ObjectCalcer that has no tqparents, and only holds some data. The data is held as an ObjectImp of some type, and it will remain constant, and no calculation needs to be done to get it, it is just returned every time it is needed. @@ -158,10 +158,10 @@ Most of this is handled by the TextType class. 2.1.2 TextType -The TextType class is an implementation of an ObjectType. It contains -code specifying how to calculate a TextImp from its parents, and for +The TextType class is an implementation of an ObjectType. It tqcontains +code specifying how to calculate a TextImp from its tqparents, and for how it behaves on user input. A text object has at least three -parents, and can handle any number of optional arguments. The three +tqparents, and can handle any number of optional arguments. The three mandatory arguments are an int, which is set to 1 or 0 depending on whether the label needs a surrounding box, a PointImp, containing the location of the text label, and a string containing the text of the @@ -170,7 +170,7 @@ additional argument is used to replace the lowest-numbered of those tokens, with its string representation. The function ObjectImp::fillInNextEscape is used for this. -For example, if a TextType has the following parents: +For example, if a TextType has the following tqparents: a IntImp with value 0 a PointImp with value (0,0) a String with value "This segment is %1 units long." @@ -185,7 +185,7 @@ All this gives labels in Kig a lot of flexibility. 2.2 Locuses Locuses are a mathematical concept that has been modelled in Kig. -Loosely defined, a locus is the mathematical shape defined by the set +Loosely defined, a locus is the mathematical tqshape defined by the set of points that a certain point moves through while another point is moved over its constraints. This can be used to define mathematical objects like conics, and various other things. It has been modelled @@ -197,7 +197,7 @@ proud of this design. In the implementation of this, we use the concept of constrained points. This is a point that is attached to a certain curve. It is implemented in Kig by the ConstrainedPointType, which takes a CurveImp -and a DoubleImp as parents and calculates a Point from these by using +and a DoubleImp as tqparents and calculates a Point from these by using the CurveImp::getPoint function. 2.2.2 The Implementation @@ -213,7 +213,7 @@ smallest part of the hierarchy that contains all paths from the first point to the second point. We then determine all objects that are not *on* one of those paths ( meaning that they are not calculated from the first point, or another object that is on one of those paths ), -but that are parents of one or more objects that are on those paths. +but that are tqparents of one or more objects that are on those paths. I call this set of objects the "side of the path" sometimes in the code. The function that finds them is called sideOfTreePath. @@ -221,7 +221,7 @@ Next, an ObjectHierarchy object is constructed, which stores the way to calculate the second point from the first point and the objects from the previous paragraph. -An object is then constructed that has as parent the curve parent that +An object is then constructed that has as tqparent the curve tqparent that the first point is constrained to, the HierarchyImp containing the ObjectHierarchy from the previous paragraph, and all the objects from the "side of the tree". This new object is an ObjectTypeCalcer with @@ -258,9 +258,9 @@ the constrained point. This is wrong because when the constrained point moves within the limits of the curve constraining it, the locus does by definition not change. Also, if the constrained point is redefined so that it is no longer constrained to any curve, this is a -major problem, because it would invalidate the locus. Another point +major problem, because it would tqinvalidate the locus. Another point is that in practice, the locus depends on more objects than its -parents alone. This is not a good thing, because it makes it +tqparents alone. This is not a good thing, because it makes it impossible to optimise drawing of the objects, using the information about which objects depend on which others, because this information is invalid. diff --git a/kig/FEATURES b/kig/FEATURES index 012f49f1..054ce9bc 100644 --- a/kig/FEATURES +++ b/kig/FEATURES @@ -16,7 +16,7 @@ here are some nice Kig features i'd like to show off :) - is a KPart: try opening macrotest.kig from konqueror, if it doesn't work yet, open your kcontrol, then go to "File Browsing"->"File Associations", click add, group:"application", name:"x-kig", open - the "embedding" tab page for the new type, click "add", find + the "embedding" tab page for the new type, click "add", tqfind "KigPart" (if you installed Kig correctly (did you get the "--prefix" on your configure right?) , it should be there), and add it. then try opening macrotest.kig again @@ -30,7 +30,7 @@ here are some nice Kig features i'd like to show off :) Moreover, the other supported formats are: XFig files, and SVG and LaTeX documents. These are useful since not all other programs support Kig files yet... ;) -- Kig is very compatible with the program it was intended to replace, +- Kig is very compatible with the program it was intended to tqreplace, KGeo. It supports all of its Object types and most of its file format... - There is a very flexible mechanism for supporting TextLabels with diff --git a/kig/Makefile.am b/kig/Makefile.am index b2483db0..66724ec2 100644 --- a/kig/Makefile.am +++ b/kig/Makefile.am @@ -1,3 +1,5 @@ +INCLUDES = $(all_includes) + if KIG_COMPILE_PYTHON_SCRIPTING scriptingdir = scripting scriptinglib = scripting/libscripting.la @@ -23,7 +25,7 @@ SUBDIRS = \ kde_module_LTLIBRARIES = libkigpart.la libkigpart_la_SOURCES = dummy.cpp -libkigpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +libkigpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) -lktexteditor libkigpart_la_LIBADD = $(LIB_KPARTS) \ misc/libmisc.la objects/libobjects.la filters/libfilters.la \ modes/libmodes.la kig/libkigparttemp.la $(scriptinglib) diff --git a/kig/README.boost-python1.30-gcc3.2 b/kig/README.boost-python1.30-gcc3.2 index cafda75e..959d5264 100644 --- a/kig/README.boost-python1.30-gcc3.2 +++ b/kig/README.boost-python1.30-gcc3.2 @@ -12,7 +12,7 @@ be applied in the following way. Open a console window, and go to the directory containing the Boost.Python headers. This will most likely be called something like "/usr/include/boost/python/". Then execute the following commands ( -before giving these commands, replace "/dir/to/kig/distribution/" by +before giving these commands, tqreplace "/dir/to/kig/distribution/" by the directory where you put the downloaded kig distribution ): cd object diff --git a/kig/TODO b/kig/TODO index 8acd9949..a6f97fe3 100644 --- a/kig/TODO +++ b/kig/TODO @@ -50,7 +50,7 @@ - make DoubleImp a "visible" object with uses like Dr. Geo numeric values. -- Provide some nice stuff for differential geometry: velocity vector +- Provide some nice stuff for differential tqgeometry: velocity vector of a curve, curvature vector, osculating parabole. Most of this is not too difficult to implement, but very cool :) @@ -58,9 +58,9 @@ allow for importing from/exporting to other formula formats such as KFormula, OOFormula and MathML. -- other types of fillable shapes, like arc sector, arc segment... +- other types of fillable tqshapes, like arc sector, arc segment... -- defined integrals, as a particular case of filled shapes. +- defined integrals, as a particular case of filled tqshapes. - improve *a lot* the transformation support for cubics. @@ -102,8 +102,8 @@ - extend ObjectFactory::sensiblePointCalcer to also construct intersection points of stuff... (pino: done for lines) -- when moving an object that wants to move its parents, try to check if - it is itself not an indirect child of one of the parents it is +- when moving an object that wants to move its tqparents, try to check if + it is itself not an indirect child of one of the tqparents it is trying to move, and forbid the move in that case, as it will lead to chaotic behaviour. I am not sure if this is really well possible, but I have to look at it. @@ -141,7 +141,7 @@ - write cabri-filter-status.txt. -- add "Tools": easy tools designed for geometry, like Angle converter and +- add "Tools": easy tools designed for tqgeometry, like Angle converter and so on... - save a "session", i.e.: record how a document is moved, and save it to diff --git a/kig/configure.in.in b/kig/configure.in.in index 33986af8..b9884199 100644 --- a/kig/configure.in.in +++ b/kig/configure.in.in @@ -121,6 +121,12 @@ AC_DEFUN([REGINA_LIB_BOOST_PYTHON], [ "$prefix/include/$pyver" "$prefix/$pyver/include"; do CXXFLAGS="$__regina_py_save_cxxflags -I$incdir" LDFLAGS="$__regina_py_save_ldflags -shared" + if test -z "$qt_libraries"; then + LDFLAGS="$LDFLAGS" + else + LDFLAGS="$LDFLAGS -L$qt_libraries" + fi + LDFLAGS="$LDFLAGS -ltqt" # Check for python includes. AC_TRY_COMPILE([ @@ -146,6 +152,12 @@ AC_DEFUN([REGINA_LIB_BOOST_PYTHON], [ for extralibs in "" "-lpthread -lm -lutil -ldl"; do AC_MSG_CHECKING([for $pylibdir/lib$pylib and $extralibs with $incdir/Python.h]) LDFLAGS="$__regina_py_save_ldflags -L$pylibdir" + if test -z "$qt_libraries"; then + LDFLAGS="$LDFLAGS" + else + LDFLAGS="$LDFLAGS -L$qt_libraries" + fi + LDFLAGS="$LDFLAGS -ltqt" LIBS="-l$pylib $extralibs" AC_TRY_LINK([ #include @@ -156,6 +168,12 @@ AC_DEFUN([REGINA_LIB_BOOST_PYTHON], [ for bplib in "-lboost_python-mt" "-lboost_python-gcc-mt-1_32" "-lboost_python-gcc-mt-1_31" "-lboost_python-gcc-mt" "-lboost_python"; do AC_MSG_CHECKING([compilation of a boost.python program with $bplib]) LDFLAGS="$__regina_py_save_ldflags -L$pylibdir" + if test -z "$qt_libraries"; then + LDFLAGS="$LDFLAGS" + else + LDFLAGS="$LDFLAGS -L$qt_libraries" + fi + LDFLAGS="$LDFLAGS -ltqt" LIBS="-l$pylib $bplib $extralibs" AC_TRY_LINK([ #include diff --git a/kig/examples/figure_angle.fgeo b/kig/examples/figure_angle.fgeo index 22db1113..47076564 100644 --- a/kig/examples/figure_angle.fgeo +++ b/kig/examples/figure_angle.fgeo @@ -1,30 +1,30 @@ - + -5.833333 2.950000 - + -4.666666 -0.783334 - + 2.333334 -0.216667 - - - + + + - - - + + + - - - - + + + + diff --git a/kig/examples/figure_manyobjects.fgeo b/kig/examples/figure_manyobjects.fgeo index c03634e3..c89c976f 100644 --- a/kig/examples/figure_manyobjects.fgeo +++ b/kig/examples/figure_manyobjects.fgeo @@ -1,72 +1,72 @@ - + -6.700000 2.250000 - + 0.266667 2.083333 - + -0.800000 -2.516667 - + -2.766667 1.883333 - - - + + + - - - + + + - + -2.833333 -0.983334 - + 1.500000 1.883333 - + -0.566667 3.983333 - - - + + + - - - + + + - + -5.533333 -0.383333 - + -2.800000 1.883333 - - + + - + 3.166667 -0.683333 - - - + + + - - - - + + + + diff --git a/kig/examples/session_alotofthings.fgeo b/kig/examples/session_alotofthings.fgeo index 967dada9..dc8bb729 100644 --- a/kig/examples/session_alotofthings.fgeo +++ b/kig/examples/session_alotofthings.fgeo @@ -1,69 +1,69 @@ - + 0.766667 2.450000 - + -3.300000 2.650000 - + -7.900000 -2.583333 - + -7.800000 0.116667 - + -4.533333 1.216667 - + -8.566667 3.116667 - + -7.066667 1.783334 - - - + + + - - - - + + + + - - - + + + - + -1.066667 -0.416667 - - - + + + - - - + + + - - - + + + - - - + + + - Figure 1 contains: + Figure 1 tqcontains: - some points; - an arc; - a line; @@ -72,91 +72,91 @@ - an intersection point; - a reflection point; -Figure 2 contains: +Figure 2 tqcontains: - some points; - 2 lines; - a midpoint; - a parallel; - 2 intersection points; -Figure 3 contains: +Figure 3 tqcontains: - some points; - a circle; - a vector; - a moved circle; - + -5.200000 0.216667 - + 1.200000 3.116667 - + -7.666667 1.650000 - - - + + + - - - + + + - - - + + + - + -6.200000 -1.483334 - - - + + + - - - + + + - - - + + + - + -6.433334 2.050000 - + -1.400000 2.583333 - + -1.300000 -0.350000 - + -3.433333 -0.883333 - + -6.433334 2.050000 - - + + - - - + + + - - - + + + diff --git a/kig/filters/cabri-filter.cc b/kig/filters/cabri-filter.cc index 3cadf522..55ecf939 100644 --- a/kig/filters/cabri-filter.cc +++ b/kig/filters/cabri-filter.cc @@ -56,7 +56,7 @@ * * Nr: Simple sequential numbering of the objects in a file. * Type: seen so far: Pt, Axes, Line, Cir - * NumberOfParents: The number of parents that will be specified in + * NumberOfParents: The number of tqparents that will be specified in * Parents * Color: * R -> red @@ -96,7 +96,7 @@ * Visible: * V means visible, I means invisible * Fixed: - * St means fix this object ( if you move one of its parents, it + * St means fix this object ( if you move one of its tqparents, it * won't move ), nSt ( the default ) means don't fix this object. * Parents: * The numbers of the objects this object depends on @@ -118,7 +118,7 @@ struct CabriObject int specialAppearanceSwitch; bool visible; bool fixed; - std::vector parents; + std::vector tqparents; std::vector data; }; @@ -151,25 +151,25 @@ static TQString readLine( TQFile& file ) static TQColor translatecolor( const TQString& s ) { - if ( s == "R" ) return Qt::red; - if ( s == "O" ) return Qt::magenta; - if ( s == "Y" ) return Qt::yellow; - if ( s == "P" ) return Qt::darkMagenta; - if ( s == "V" ) return Qt::darkBlue; - if ( s == "Bl" ) return Qt::blue; - if ( s == "lBl" ) return Qt::cyan; // TODO: bright blue - if ( s == "G" ) return Qt::green; - if ( s == "dG" ) return Qt::darkGreen; + if ( s == "R" ) return TQt::red; + if ( s == "O" ) return TQt::magenta; + if ( s == "Y" ) return TQt::yellow; + if ( s == "P" ) return TQt::darkMagenta; + if ( s == "V" ) return TQt::darkBlue; + if ( s == "Bl" ) return TQt::blue; + if ( s == "lBl" ) return TQt::cyan; // TODO: bright blue + if ( s == "G" ) return TQt::green; + if ( s == "dG" ) return TQt::darkGreen; if ( s == "Br" ) return TQColor( 165, 42, 42 ); if ( s == "dBr" ) return TQColor( 128, 128, 0 ); - if ( s == "lGr" ) return Qt::lightGray; - if ( s == "Gr" ) return Qt::gray; - if ( s == "dGr" ) return Qt::darkGray; - if ( s == "B" ) return Qt::black; - if ( s == "W" ) return Qt::white; + if ( s == "lGr" ) return TQt::lightGray; + if ( s == "Gr" ) return TQt::gray; + if ( s == "dGr" ) return TQt::darkGray; + if ( s == "B" ) return TQt::black; + if ( s == "W" ) return TQt::white; kdDebug() << k_funcinfo << "unknown color: " << s << endl; - return Qt::black; + return TQt::black; } bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) @@ -246,14 +246,14 @@ bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) KIG_FILTER_PARSE_ERROR; tmp = thirdlinere.cap( 2 ); - TQStringList parentsids = TQStringList::split( ' ', tmp ); - for ( TQStringList::iterator i = parentsids.begin(); - i != parentsids.end(); ++i ) + TQStringList tqparentsids = TQStringList::split( ' ', tmp ); + for ( TQStringList::iterator i = tqparentsids.begin(); + i != tqparentsids.end(); ++i ) { - myobj.parents.push_back( ( *i ).toInt( &ok ) ); + myobj.tqparents.push_back( ( *i ).toInt( &ok ) ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; } - if ( myobj.parents.size() != myobj.numberOfParents ) + if ( myobj.tqparents.size() != myobj.numberOfParents ) KIG_FILTER_PARSE_ERROR; tmp = thirdlinere.cap( 4 ); @@ -277,8 +277,8 @@ bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) // << "specialAppearanceSwitch = " << myobj.specialAppearanceSwitch << endl // << "visible = " << visible << endl // << "fixed = " << myobj.fixed << endl -// << "parents =" << endl; -// for ( std::vector::iterator i = myobj.parents.begin(); i != myobj.parents.end(); ++i ) +// << "tqparents =" << endl; +// for ( std::vector::iterator i = myobj.tqparents.begin(); i != myobj.tqparents.end(); ++i ) // kdDebug() << " " << *i << endl; // kdDebug() << "vals = " << endl; // for ( std::vector::iterator i = myobj.data.begin(); i != myobj.data.end(); ++i ) @@ -352,8 +352,8 @@ KigDocument* KigFilterCabri::load( const TQString& file ) int ps = 0; args.clear(); - for ( std::vector::iterator i = obj.parents.begin(); - i != obj.parents.end(); ++i ) + for ( std::vector::iterator i = obj.tqparents.begin(); + i != obj.tqparents.end(); ++i ) args.push_back( calcers[*i-3] ); // two fake objects at the start ( origin and axes.. ) @@ -441,10 +441,10 @@ KigDocument* KigFilterCabri::load( const TQString& file ) obj.thick *= 2; if ( args.size() != 1 || obj.data.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = args[0]; - if ( !parent->imp()->inherits( CurveImp::stype() ) ) + ObjectCalcer* tqparent = args[0]; + if ( !tqparent->imp()->inherits( CurveImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - const CurveImp* curve = static_cast( parent->imp() ); + const CurveImp* curve = static_cast( tqparent->imp() ); Coordinate pt = Coordinate( obj.data[0], obj.data[1] ); double param = curve->getParam( pt, *ret ); args.push_back( new ObjectConstCalcer( new DoubleImp( param ) ) ); @@ -486,11 +486,11 @@ KigDocument* KigFilterCabri::load( const TQString& file ) // points, or a vector... if ( args.size() != 1 || !obj.data.empty() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = args[0]; - if ( parent->imp()->inherits( SegmentImp::stype() ) ) - oc = fact->propertyObjectCalcer( parent, "mid-point" ) ; - else if ( parent->imp()->inherits( VectorImp::stype() ) ) - oc = fact->propertyObjectCalcer( parent, "vect-mid-point" ); + ObjectCalcer* tqparent = args[0]; + if ( tqparent->imp()->inherits( SegmentImp::stype() ) ) + oc = fact->propertyObjectCalcer( tqparent, "mid-point" ) ; + else if ( tqparent->imp()->inherits( VectorImp::stype() ) ) + oc = fact->propertyObjectCalcer( tqparent, "vect-mid-point" ); else KIG_FILTER_PARSE_ERROR; } else if ( obj.type == "PBiss" ) @@ -505,12 +505,12 @@ KigDocument* KigFilterCabri::load( const TQString& file ) } if ( args.size() != 1 || !obj.data.empty() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = args[0]; + ObjectCalcer* tqparent = args[0]; ObjectCalcer* midpoint = 0; - if ( parent->imp()->inherits( SegmentImp::stype() ) ) - midpoint = fact->propertyObjectCalcer( parent, "mid-point" ) ; -// else if ( parent->imp()->inherits( VectorImp::stype() ) ) -// midpoint = fact->propertyObjectCalcer( parent, "vect-mid-point" ); + if ( tqparent->imp()->inherits( SegmentImp::stype() ) ) + midpoint = fact->propertyObjectCalcer( tqparent, "mid-point" ) ; +// else if ( tqparent->imp()->inherits( VectorImp::stype() ) ) +// midpoint = fact->propertyObjectCalcer( tqparent, "vect-mid-point" ); else KIG_FILTER_PARSE_ERROR; midpoint->calc( *ret ); args.push_back( midpoint ); @@ -549,7 +549,7 @@ KigDocument* KigFilterCabri::load( const TQString& file ) else { notSupported( file, i18n( "This Cabri file contains a \"%1\" object, " - "which Kig does not currently support." ).arg( obj.type ) ); + "which Kig does not currently support." ).tqarg( TQString(obj.type) ) ); return 0; } diff --git a/kig/filters/drgeo-filter-chooser.h b/kig/filters/drgeo-filter-chooser.h index f5057361..1adb47c0 100644 --- a/kig/filters/drgeo-filter-chooser.h +++ b/kig/filters/drgeo-filter-chooser.h @@ -28,6 +28,7 @@ class KigFilterDrgeoChooser : public KigFilterDrgeoChooserBase { Q_OBJECT + TQ_OBJECT public: KigFilterDrgeoChooser( const TQStringList& l ); diff --git a/kig/filters/drgeo-filter-chooserbase.ui b/kig/filters/drgeo-filter-chooserbase.ui index 829d84cc..aa4361ee 100644 --- a/kig/filters/drgeo-filter-chooserbase.ui +++ b/kig/filters/drgeo-filter-chooserbase.ui @@ -1,10 +1,10 @@ KigFilterDrgeoChooserBase - + KigFilterDrgeoChooserBase - + 0 0 @@ -25,7 +25,7 @@ 6 - + ExplanationTextLabel @@ -33,11 +33,11 @@ The current Dr. Geo file contains more than one figure. Please select which to import: - + WordBreak|AlignVCenter - + Layout1 @@ -72,7 +72,7 @@ Please select which to import: Horizontal - + Layout7 @@ -96,7 +96,7 @@ Please select which to import: Expanding - + 20 20 @@ -131,7 +131,7 @@ Please select which to import: - + klistbox.h kpushbutton.h diff --git a/kig/filters/drgeo-filter.cc b/kig/filters/drgeo-filter.cc index 82438a57..3f213146 100644 --- a/kig/filters/drgeo-filter.cc +++ b/kig/filters/drgeo-filter.cc @@ -62,7 +62,7 @@ struct DrGeoHierarchyElement { TQString id; - std::vector parents; + std::vector tqparents; }; KigFilterDrgeo::KigFilterDrgeo() @@ -106,9 +106,9 @@ KigDocument* KigFilterDrgeo::load( const TQString& file ) if ( figures.isEmpty() ) { if( nmacros > 0 ) warning( i18n( "The Dr. Geo file \"%1\" is a macro file so it contains no " - "figures." ).arg( file ) ); + "figures." ).tqarg( file ) ); else - warning( i18n( "There are no figures in Dr. Geo file \"%1\"." ).arg( file ) ); + warning( i18n( "There are no figures in Dr. Geo file \"%1\"." ).tqarg( file ) ); return false; } @@ -201,8 +201,8 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co { TQDomElement ce = c.toElement(); if ( ce.isNull() ) continue; - else if ( ce.tagName() == "parent" ) - elem.parents.push_back( ce.attribute( "ref" ) ); + else if ( ce.tagName() == "tqparent" ) + elem.tqparents.push_back( ce.attribute( "ref" ) ); } TQString curid = domelem.attribute( "id" ); elem.id = !curid.isNull() ? curid : TQString::number( withoutid++ ) ; @@ -216,9 +216,9 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co for ( uint i = 0; i < elems.size(); ++i ) { x = ""; - for ( uint j = 0; j < elems[i].parents.size(); ++j ) + for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) { - x += elems[i].parents[j] + "_"; + x += elems[i].tqparents[j] + "_"; } kdDebug() << " --> " << i << " - " << elems[i].id << " - " << x << endl; } @@ -241,25 +241,25 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co kdDebug() << "+++ id: " << curid << endl; #endif const DrGeoHierarchyElement& el = elems[curid]; - std::vector parents; - for ( uint j = 0; j < el.parents.size(); ++j ) + std::vector tqparents; + for ( uint j = 0; j < el.tqparents.size(); ++j ) { - int parentid = convertDrgeoIndex( elems, el.parents[j] ); - if ( parentid == -1 ) + int tqparentid = convertDrgeoIndex( elems, el.tqparents[j] ); + if ( tqparentid == -1 ) KIG_FILTER_PARSE_ERROR; - parents.push_back( holders[parentid-nignored]->calcer() ); + tqparents.push_back( holders[tqparentid-nignored]->calcer() ); }; TQDomElement domelem = a.toElement(); #ifdef DRGEO_DEBUG - if ( parents.size() > 0 ) - for ( uint j = 0; j < parents.size(); ++j ) + if ( tqparents.size() > 0 ) + for ( uint j = 0; j < tqparents.size(); ++j ) { - kdDebug() << "+++++++++ parent[" << j << "]: " << parents[j] << " - " - << parents[j]->imp()->type()->internalName() << endl; + kdDebug() << "+++++++++ tqparent[" << j << "]: " << tqparents[j] << " - " + << tqparents[j]->imp()->type()->internalName() << endl; } else - kdDebug() << "+++++++++ parents: NO" << endl; + kdDebug() << "+++++++++ tqparents: NO" << endl; kdDebug() << "+++++++++ " << domelem.tagName() << " - " << domelem.attribute("type") << endl; #endif @@ -291,15 +291,15 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co oc = fact->fixedPointCalcer( Coordinate( x, y ) ); } else if ( domelem.attribute( "type" ) == "Middle_2pts" ) - oc = new ObjectTypeCalcer( MidPointType::instance(), parents ); + oc = new ObjectTypeCalcer( MidPointType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Middle_segment" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - if ( !parents[0]->imp()->inherits( SegmentImp::stype() ) ) + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( !tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - ObjectPropertyCalcer* o1 = fact->propertyObjectCalcer( parents[0], "end-point-A" ); + ObjectPropertyCalcer* o1 = fact->propertyObjectCalcer( tqparents[0], "end-point-A" ); o1->calc( *ret ); - ObjectPropertyCalcer* o2 = fact->propertyObjectCalcer( parents[0], "end-point-B" ); + ObjectPropertyCalcer* o2 = fact->propertyObjectCalcer( tqparents[0], "end-point-B" ); o2->calc( *ret ); std::vector args; args.push_back( o1 ); @@ -312,37 +312,37 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co double value = values.toDouble( &ok3 ); if ( ! ok3 ) KIG_FILTER_PARSE_ERROR; - if ( ( parents[0]->imp()->inherits( CircleImp::stype() ) ) || - ( parents[0]->imp()->inherits( SegmentImp::stype() ) ) ) - oc = fact->constrainedPointCalcer( parents[0], value ); - else if ( parents[0]->imp()->inherits( LineImp::stype() ) ) + if ( ( tqparents[0]->imp()->inherits( CircleImp::stype() ) ) || + ( tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) ) + oc = fact->constrainedPointCalcer( tqparents[0], value ); + else if ( tqparents[0]->imp()->inherits( LineImp::stype() ) ) { - const LineData l = static_cast( parents[0]->imp() )->data(); + const LineData l = static_cast( tqparents[0]->imp() )->data(); const Coordinate p = convertDrgeoLineParam( value, l ); - oc = fact->constrainedPointCalcer( parents[0], p, *ret ); + oc = fact->constrainedPointCalcer( tqparents[0], p, *ret ); } - else if ( parents[0]->imp()->inherits( RayImp::stype() ) ) + else if ( tqparents[0]->imp()->inherits( RayImp::stype() ) ) { - const LineData l = static_cast( parents[0]->imp() )->data(); + const LineData l = static_cast( tqparents[0]->imp() )->data(); const Coordinate p = convertDrgeoHalflineParam( value, l ); - oc = fact->constrainedPointCalcer( parents[0], p, *ret ); + oc = fact->constrainedPointCalcer( tqparents[0], p, *ret ); } - else if ( parents[0]->imp()->inherits( ArcImp::stype() ) ) - oc = fact->constrainedPointCalcer( parents[0], 1 - value ); + else if ( tqparents[0]->imp()->inherits( ArcImp::stype() ) ) + oc = fact->constrainedPointCalcer( tqparents[0], 1 - value ); else { -// oc = fact->constrainedPointCalcer( parents[0], value ); +// oc = fact->constrainedPointCalcer( tqparents[0], value ); notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } } else if ( domelem.attribute( "type" ) == "Intersection" ) { - if ( ( parents[0]->imp()->inherits( AbstractLineImp::stype() ) ) && - ( parents[1]->imp()->inherits( AbstractLineImp::stype() ) ) ) - oc = new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ); + if ( ( tqparents[0]->imp()->inherits( AbstractLineImp::stype() ) ) && + ( tqparents[1]->imp()->inherits( AbstractLineImp::stype() ) ) ) + oc = new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ); else { bool ok; @@ -351,21 +351,21 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co if ( which == 1 ) which = -1; else if ( which == 0 ) which = 1; else KIG_FILTER_PARSE_ERROR; - std::vector args = parents; + std::vector args = tqparents; const ObjectType* type = 0; args.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - if ( ( parents[0]->imp()->inherits( CircleImp::stype() ) ) && - ( parents[1]->imp()->inherits( CircleImp::stype() ) ) ) + if ( ( tqparents[0]->imp()->inherits( CircleImp::stype() ) ) && + ( tqparents[1]->imp()->inherits( CircleImp::stype() ) ) ) type = CircleCircleIntersectionType::instance(); - else if ( ( parents[0]->imp()->inherits( CircleImp::stype() ) && - parents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || - ( parents[1]->imp()->inherits( CircleImp::stype() ) && - parents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) + else if ( ( tqparents[0]->imp()->inherits( CircleImp::stype() ) && + tqparents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || + ( tqparents[1]->imp()->inherits( CircleImp::stype() ) && + tqparents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) type = ConicLineIntersectionType::instance(); - else if ( ( parents[0]->imp()->inherits( ArcImp::stype() ) && - parents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || - ( parents[1]->imp()->inherits( ArcImp::stype() ) && - parents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) + else if ( ( tqparents[0]->imp()->inherits( ArcImp::stype() ) && + tqparents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || + ( tqparents[1]->imp()->inherits( ArcImp::stype() ) && + tqparents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) type = ArcLineIntersectionType::instance(); else { @@ -377,17 +377,17 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co } } else if ( domelem.attribute( "type" ) == "Reflexion" ) - oc = new ObjectTypeCalcer( LineReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( LineReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Symmetry" ) - oc = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Translation" ) - oc = new ObjectTypeCalcer( TranslatedType::instance(), parents ); + oc = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Rotation" ) - oc = new ObjectTypeCalcer( RotationType::instance(), parents ); + oc = new ObjectTypeCalcer( RotationType::instance(), tqparents ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -419,11 +419,11 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if( domelem.attribute( "type" ) == "3pts" ) { @@ -432,65 +432,65 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if( domelem.attribute( "type" ) == "segment" ) { if( domelem.tagName() == "circle" ) { type = CircleBPRType::instance(); - ObjectPropertyCalcer* o = fact->propertyObjectCalcer( parents[1], "length" ); + ObjectPropertyCalcer* o = fact->propertyObjectCalcer( tqparents[1], "length" ); o->calc( *ret ); - ObjectCalcer* a = parents[0]; - parents.clear(); - parents.push_back( a ); - parents.push_back( o ); + ObjectCalcer* a = tqparents[0]; + tqparents.clear(); + tqparents.push_back( a ); + tqparents.push_back( o ); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if( domelem.attribute( "type" ) == "npts" ) { if( domelem.tagName() == "polygon" ) { - if ( parents.size() < 3 ) KIG_FILTER_PARSE_ERROR; + if ( tqparents.size() < 3 ) KIG_FILTER_PARSE_ERROR; type = PolygonBNPType::instance(); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if ( domelem.attribute( "type" ) == "perpendicular" ) - oc = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); + oc = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "parallel" ) - oc = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); + oc = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Reflexion" ) - oc = new ObjectTypeCalcer( LineReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( LineReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Symmetry" ) - oc = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Translation" ) - oc = new ObjectTypeCalcer( TranslatedType::instance(), parents ); + oc = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Rotation" ) - oc = new ObjectTypeCalcer( RotationType::instance(), parents ); + oc = new ObjectTypeCalcer( RotationType::instance(), tqparents ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -529,76 +529,76 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co bool ok3; double dvalue = value.toDouble( &ok3 ); if ( ok3 ) - value = TQString( "%1" ).arg( dvalue, 0, 'g', 3 ); + value = TQString( "%1" ).tqarg( dvalue, 0, 'g', 3 ); oc = fact->labelCalcer( value, m, false, std::vector(), *ret ); } else if ( domelem.attribute( "type" ) == "pt_abscissa" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "coordinate-x", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "coordinate-x", *ret, false ); } else if ( domelem.attribute( "type" ) == "pt_ordinate" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "coordinate-y", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "coordinate-y", *ret, false ); } else if ( domelem.attribute( "type" ) == "segment_length" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "circle_perimeter" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "circumference", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "circumference", *ret, false ); } else if ( domelem.attribute( "type" ) == "arc_length" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "arc-length", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "arc-length", *ret, false ); } else if ( domelem.attribute( "type" ) == "distance_2pts" ) { - if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); so->calc( *ret ); oc = filtersConstructTextObject( m, so, "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_norm" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_abscissa" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length-x", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length-x", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_ordinate" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length-y", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length-y", *ret, false ); } else if ( domelem.attribute( "type" ) == "slope" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "slope", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "slope", *ret, false ); } else if ( domelem.attribute( "type" ) == "distance_pt_line" ) { - if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; std::vector args; - args.push_back( parents[1] ); - args.push_back( parents[0] ); + args.push_back( tqparents[1] ); + args.push_back( tqparents[0] ); ObjectTypeCalcer* po = new ObjectTypeCalcer( LinePerpendLPType::instance(), args ); po->calc( *ret ); args.clear(); - args.push_back( parents[1] ); + args.push_back( tqparents[1] ); args.push_back( po ); ObjectTypeCalcer* io = new ObjectTypeCalcer( LineLineIntersectionType::instance(), args ); io->calc( *ret ); args.clear(); - args.push_back( parents[0] ); + args.push_back( tqparents[0] ); args.push_back( io ); ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), args ); so->calc( *ret ); @@ -607,18 +607,18 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co // types of 'equation' else if ( domelem.attribute( "type" ) == "line" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "equation", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "equation", *ret, false ); } else if ( domelem.attribute( "type" ) == "circle" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "simply-cartesian-equation", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "simply-cartesian-equation", *ret, false ); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -630,13 +630,13 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co { if ( domelem.attribute( "type" ) == "3pts" ) { - if ( parents.size() != 3 ) KIG_FILTER_PARSE_ERROR; - oc = new ObjectTypeCalcer( HalfAngleType::instance(), parents ); + if ( tqparents.size() != 3 ) KIG_FILTER_PARSE_ERROR; + oc = new ObjectTypeCalcer( HalfAngleType::instance(), tqparents ); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -669,7 +669,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co // since Kig doesn't support Guile scripts, it will write script's text // in a label, so the user can freely see the code and make whatever // he/she wants - // possible idea: construct a new script object with the parents of Guile + // possible idea: construct a new script object with the tqparents of Guile // one and the Guile code inserted commented... depends on a better // handling of arguments in scripts? if ( domelem.attribute( "type" ) == "nitems" ) @@ -677,7 +677,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -685,11 +685,11 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else if ( domelem.tagName() == "locus" ) { if ( domelem.attribute( "type" ) == "None" ) - oc = fact->locusCalcer( parents[0], parents[1] ); + oc = fact->locusCalcer( tqparents[0], tqparents[1] ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -709,7 +709,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co kdDebug() << ">>>>>>>>> UNKNOWN OBJECT" << endl; #endif notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -723,7 +723,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co if ( domelem.attribute( "color" ) == "Bordeaux" ) co.setRgb( 145, 0, 0 ); else - co = Qt::blue; + co = TQt::blue; // reading width and style // Dashed -> the little one // Normal -> the medium @@ -747,8 +747,8 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co TQString ps = domelem.attribute( "style" ); int pointstyle = ObjectDrawer::pointStyleFromString( ps ); // show this object? - bool show = ( ( domelem.attribute( "masked" ) != "True" ) && - ( domelem.attribute( "masked" ) != "Alway" ) ); + bool show = ( ( domelem.attribute( "tqmasked" ) != "True" ) && + ( domelem.attribute( "tqmasked" ) != "Alway" ) ); // costructing the ObjectDrawer* ObjectDrawer* d = new ObjectDrawer( co, w, show, s, pointstyle ); // reading object name @@ -770,16 +770,16 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co { std::vector args2; args2.push_back( o->nameCalcer() ); - oc2 = fact->attachedLabelCalcer( TQString::fromLatin1( "%1" ), oc, + oc2 = fact->attachedLabelCalcer( TQString::tqfromLatin1( "%1" ), oc, static_cast( oc->imp() )->coordinate(), false, args2, *ret ); - co = Qt::black; + co = TQt::black; } } else if ( domelem.tagName() == "angle" ) { oc2 = filtersConstructTextObject( - static_cast( holders[curid-1-nignored]->calcer()->parents()[1]->imp() )->coordinate(), + static_cast( holders[curid-1-nignored]->calcer()->tqparents()[1]->imp() )->coordinate(), holders[curid-1-nignored]->calcer(), "angle-degrees", *ret, false ); } diff --git a/kig/filters/drgeo-filter.h b/kig/filters/drgeo-filter.h index 9b0ef369..ddd2359e 100644 --- a/kig/filters/drgeo-filter.h +++ b/kig/filters/drgeo-filter.h @@ -26,7 +26,7 @@ class KigDocument; class TQString; /** - * This is an import filter for the GNOME geometry program DrGeo. + * This is an import filter for the GNOME tqgeometry program DrGeo. */ class KigFilterDrgeo : public KigFilter diff --git a/kig/filters/exporter.cc b/kig/filters/exporter.cc index b44888f0..f2847c0a 100644 --- a/kig/filters/exporter.cc +++ b/kig/filters/exporter.cc @@ -65,13 +65,13 @@ class ExporterAction KigWidget* mw; public: ExporterAction( const KigPart* doc, KigWidget* w, - KActionCollection* parent, KigExporter* exp ); + KActionCollection* tqparent, KigExporter* exp ); void slotActivated(); }; ExporterAction::ExporterAction( const KigPart* doc, KigWidget* w, - KActionCollection* parent, KigExporter* exp ) - : KAction( exp->menuEntryName(), KShortcut(), 0, 0, parent ), + KActionCollection* tqparent, KigExporter* exp ) + : KAction( exp->menuEntryName(), KShortcut(), 0, 0, tqparent ), mexp( exp ), mdoc( doc ), mw( w ) { TQString iconstr = exp->menuIcon(); @@ -121,7 +121,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) } KigFileDialog* kfd = new KigFileDialog( - TQString::null, KImageIO::pattern( KImageIO::Writing ), + TQString(), KImageIO::pattern( KImageIO::Writing ), i18n( "Export as Image" ), &w ); kfd->setOptionCaption( i18n( "Image Options" ) ); ImageExporterOptions* opts = new ImageExporterOptions( 0L, w.size() ); @@ -156,20 +156,20 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please check if the file permissions are set correctly." ) - .arg( filename ) ); + .tqarg( filename ) ); return; }; TQPixmap img( TQSize( width, height ) ); - img.fill( Qt::white ); - KigPainter p( ScreenInfo( w.screenInfo().shownRect(), img.rect() ), &img, doc.document() ); + img.fill( TQt::white ); + KigPainter p( ScreenInfo( w.screenInfo().shownRect(), img.rect() ), TQT_TQPAINTDEVICE(&img), doc.document() ); p.setWholeWinOverlay(); p.drawGrid( doc.document().coordinateSystem(), showgrid, showaxes ); // FIXME: show the selections ? p.drawObjects( doc.document().objects(), false ); if ( ! img.save( filename, type.latin1() ) ) { - KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to image \"%1\"" ).arg( filename ) ); + KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to image \"%1\"" ).tqarg( filename ) ); } } @@ -244,7 +244,7 @@ class XFigExportImpVisitor // << "c: " << c << endl; ret *= 9450; ret /= msr.width(); - return ret.toQPoint(); + return ret.toTQPoint(); } void emitLine( const Coordinate& a, const Coordinate& b, int width, bool vector = false ); @@ -257,14 +257,14 @@ public: mnextcolorid( 32 ) { // predefined colors in XFig.. - mcolormap[Qt::black] = 0; - mcolormap[Qt::blue] = 1; - mcolormap[Qt::green] = 2; - mcolormap[Qt::cyan] = 3; - mcolormap[Qt::red] = 4; - mcolormap[Qt::magenta] = 5; - mcolormap[Qt::yellow] = 6; - mcolormap[Qt::white] = 7; + mcolormap[TQt::black] = 0; + mcolormap[TQt::blue] = 1; + mcolormap[TQt::green] = 2; + mcolormap[TQt::cyan] = 3; + mcolormap[TQt::red] = 4; + mcolormap[TQt::magenta] = 5; + mcolormap[TQt::yellow] = 6; + mcolormap[TQt::white] = 7; } void visit( const LineImp* imp ); void visit( const PointImp* imp ); @@ -297,7 +297,7 @@ void XFigExportImpVisitor::mapColor( const ObjectDrawer* obj ) void XFigExportImpVisitor::visit( ObjectHolder* obj ) { if ( ! obj->drawer()->shown() ) return; - assert( mcolormap.find( obj->drawer()->color() ) != mcolormap.end() ); + assert( mcolormap.tqfind( obj->drawer()->color() ) != mcolormap.end() ); mcurcolorid = mcolormap[ obj->drawer()->color() ]; mcurobj = obj; obj->imp()->visit( this ); @@ -593,7 +593,7 @@ void XFigExporter::run( const KigPart& doc, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " "check if the file permissions are set correctly." ) - .arg( file_name ) ); + .tqarg( file_name ) ); return; }; TQTextStream stream( &file ); diff --git a/kig/filters/filter.cc b/kig/filters/filter.cc index 81cd1ef4..0cfe1479 100644 --- a/kig/filters/filter.cc +++ b/kig/filters/filter.cc @@ -31,7 +31,7 @@ KigFilters* KigFilters::sThis; -KigFilter* KigFilters::find(const TQString& mime) +KigFilter* KigFilters::tqfind(const TQString& mime) { for (vect::iterator i = mFilters.begin(); i != mFilters.end(); ++i) { @@ -73,14 +73,14 @@ void KigFilter::fileNotFound( const TQString& file ) const i18n( "The file \"%1\" could not be opened. " "This probably means that it does not " "exist, or that it cannot be opened due to " - "its permissions" ).arg( file ) ); + "its permissions" ).tqarg( file ) ); } void KigFilter::parseError( const TQString& file, const TQString& explanation ) const { const TQString text = i18n( "An error was encountered while parsing the file \"%1\". It " - "cannot be opened." ).arg( file ); + "cannot be opened." ).tqarg( file ); const TQString title = i18n( "Parse Error" ); if ( explanation.isNull() ) @@ -92,7 +92,7 @@ void KigFilter::parseError( const TQString& file, const TQString& explanation ) void KigFilter::notSupported( const TQString& file, const TQString& explanation ) const { KMessageBox::detailedSorry( 0, - i18n( "Kig cannot open the file \"%1\"." ).arg( file ), + i18n( "Kig cannot open the file \"%1\"." ).tqarg( file ), explanation, i18n( "Not Supported" ) ); } diff --git a/kig/filters/filter.h b/kig/filters/filter.h index c887b05c..af087818 100644 --- a/kig/filters/filter.h +++ b/kig/filters/filter.h @@ -34,7 +34,7 @@ class KigFilters { public: static KigFilters* instance(); - KigFilter* find (const TQString& mime); + KigFilter* tqfind (const TQString& mime); // bool save ( const KigDocument& data, TQTextStream& stream ); /** @@ -55,7 +55,7 @@ protected: { \ TQString locs = i18n( "An error was encountered at " \ "line %1 in file %2." ) \ - .arg( __LINE__ ).arg( __FILE__ ); \ + .tqarg( __LINE__ ).tqarg( __FILE__ ); \ parseError( file, locs ); \ return 0; \ } @@ -71,7 +71,7 @@ class KigFilter protected: // shows errors to the user.. void fileNotFound( const TQString& file ) const; - void parseError( const TQString& file, const TQString& explanation = TQString::null ) const; + void parseError( const TQString& file, const TQString& explanation = TQString() ) const; void notSupported( const TQString& file, const TQString& explanation ) const; void warning( const TQString& explanation ) const; public: diff --git a/kig/filters/filters-common.cc b/kig/filters/filters-common.cc index 4ba24e9f..6ae6cef9 100644 --- a/kig/filters/filters-common.cc +++ b/kig/filters/filters-common.cc @@ -34,6 +34,6 @@ ObjectTypeCalcer* filtersConstructTextObject( propo->calc( doc ); std::vector args; args.push_back( propo ); - return fact->labelCalcer( TQString::fromLatin1( "%1" ), c, needframe, + return fact->labelCalcer( TQString::tqfromLatin1( "%1" ), c, needframe, args, doc ); } diff --git a/kig/filters/imageexporteroptions.cc b/kig/filters/imageexporteroptions.cc index cd68a0af..d88792fc 100644 --- a/kig/filters/imageexporteroptions.cc +++ b/kig/filters/imageexporteroptions.cc @@ -23,8 +23,8 @@ #include -ImageExporterOptions::ImageExporterOptions( TQWidget* parent, const TQSize& s ) - : ImageExporterOptionsBase( parent, "imageexporteroptions" ), msize( s ), +ImageExporterOptions::ImageExporterOptions( TQWidget* tqparent, const TQSize& s ) + : ImageExporterOptionsBase( tqparent, "imageexporteroptions" ), msize( s ), minternallysettingstuff( false ) { keepAspectRatio->setChecked( true ); diff --git a/kig/filters/imageexporteroptions.h b/kig/filters/imageexporteroptions.h index eacbe859..82db4950 100644 --- a/kig/filters/imageexporteroptions.h +++ b/kig/filters/imageexporteroptions.h @@ -26,6 +26,7 @@ class ImageExporterOptions : public ImageExporterOptionsBase { Q_OBJECT + TQ_OBJECT TQSize msize; @@ -34,7 +35,7 @@ class ImageExporterOptions // value like to user changes... bool minternallysettingstuff; public: - ImageExporterOptions( TQWidget* parent, const TQSize& s ); + ImageExporterOptions( TQWidget* tqparent, const TQSize& s ); ~ImageExporterOptions(); protected slots: diff --git a/kig/filters/imageexporteroptionsbase.ui b/kig/filters/imageexporteroptionsbase.ui index 03145dec..6399fd7e 100644 --- a/kig/filters/imageexporteroptionsbase.ui +++ b/kig/filters/imageexporteroptionsbase.ui @@ -1,10 +1,10 @@ ImageExporterOptionsBase - + ImageExporterOptionsBase - + 0 0 @@ -22,7 +22,7 @@ 6 - + groupBox1 @@ -33,7 +33,7 @@ unnamed - + Layout2_2 @@ -47,7 +47,7 @@ 6 - + WidthLabel_2 @@ -68,7 +68,7 @@ - + Layout3_2 @@ -82,7 +82,7 @@ 6 - + HeightLabel_2 @@ -103,7 +103,7 @@ - + keepAspectRatio @@ -113,7 +113,7 @@ - + groupBox2 @@ -124,7 +124,7 @@ unnamed - + showGridCheckBox @@ -132,7 +132,7 @@ Show grid - + showAxesCheckBox @@ -144,7 +144,7 @@ - + knuminput.h knuminput.h diff --git a/kig/filters/kgeo-filter.cc b/kig/filters/kgeo-filter.cc index 02c1efde..379af11d 100644 --- a/kig/filters/kgeo-filter.cc +++ b/kig/filters/kgeo-filter.cc @@ -74,7 +74,7 @@ void KigFilterKGeo::loadMetrics(KSimpleConfig* c ) struct KGeoHierarchyElement { int id; - std::vector parents; + std::vector tqparents; }; static void visitElem( std::vector& ret, @@ -84,8 +84,8 @@ static void visitElem( std::vector& ret, { if ( !seen[i] ) { - for ( uint j = 0; j < elems[i].parents.size(); ++j ) - visitElem( ret, elems, seen, elems[i].parents[j] ); + for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) + visitElem( ret, elems, seen, elems[i].tqparents[j] ); ret.push_back( elems[i] ); seen[i] = true; }; @@ -111,10 +111,10 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c c->setGroup("Main"); int number = c->readNumEntry ("Number"); - // first we determine the parent relationships, and sort the + // first we determine the tqparent relationships, and sort the // elements in an order that we can be sure all of an object's - // parents will have been handled before it is handled itself.. - // ( aka topological sort of the parent relations graph.. + // tqparents will have been handled before it is handled itself.. + // ( aka topological sort of the tqparent relations graph.. std::vector elems; elems.reserve( number ); @@ -125,15 +125,15 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c group.setNum( i + 1 ); group.prepend( "Object " ); c->setGroup( group ); - TQStrList parents; - c->readListEntry( "Parents", parents ); + TQStrList tqparents; + c->readListEntry( "Parents", tqparents ); elems.push_back( elem ); - for ( const char* parent = parents.first(); parent; parent = parents.next() ) + for ( const char* tqparent = tqparents.first(); tqparent; tqparent = tqparents.next() ) { - int parentIndex = TQString::fromLatin1( parent ).toInt( &ok ); + int tqparentIndex = TQString::tqfromLatin1( tqparent ).toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; - if ( parentIndex != 0 ) - elems[i].parents.push_back( parentIndex - 1 ); + if ( tqparentIndex != 0 ) + elems[i].tqparents.push_back( tqparentIndex - 1 ); }; }; @@ -153,11 +153,11 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c c->setGroup( group ); int objID = c->readNumEntry( "Geo" ); - std::vector parents; - for ( uint j = 0; j < e.parents.size(); ++j ) + std::vector tqparents; + for ( uint j = 0; j < e.tqparents.size(); ++j ) { - int parentid = e.parents[j]; - parents.push_back( os[parentid]->calcer() ); + int tqparentid = e.tqparents[j]; + tqparents.push_back( os[tqparentid]->calcer() ); }; ObjectCalcer* o = 0; @@ -166,84 +166,84 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c case ID_point: { // fetch the coordinates... - TQString strX = c->readEntry("QPointX"); - TQString strY = c->readEntry("QPointY"); + TQString strX = c->readEntry("TQPointX"); + TQString strY = c->readEntry("TQPointY"); double x = strX.toDouble(&ok); if (!ok) KIG_FILTER_PARSE_ERROR; double y = strY.toDouble(&ok); if (!ok) KIG_FILTER_PARSE_ERROR; Coordinate m( x, y ); - uint nparents = parents.size(); - if ( nparents == 0 ) + uint ntqparents = tqparents.size(); + if ( ntqparents == 0 ) o = factory->fixedPointCalcer( m ); - else if ( nparents == 1 ) - o = factory->constrainedPointCalcer( parents[0], m, *ret ); + else if ( ntqparents == 1 ) + o = factory->constrainedPointCalcer( tqparents[0], m, *ret ); else KIG_FILTER_PARSE_ERROR; break; } case ID_segment: { - o = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + o = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); break; } case ID_circle: { - o = new ObjectTypeCalcer( CircleBCPType::instance(), parents ); + o = new ObjectTypeCalcer( CircleBCPType::instance(), tqparents ); break; } case ID_line: { - o = new ObjectTypeCalcer( LineABType::instance(), parents ); + o = new ObjectTypeCalcer( LineABType::instance(), tqparents ); break; } case ID_bisection: { // if this is the bisection of two points, first build a segment // between them.. - if ( parents.size() == 2 ) + if ( tqparents.size() == 2 ) { - ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), parents ); - parents.clear(); - parents.push_back( seg ); + ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); + tqparents.clear(); + tqparents.push_back( seg ); } - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - o = factory->propertyObjectCalcer( parents[0], "mid-point" ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + o = factory->propertyObjectCalcer( tqparents[0], "mid-point" ); break; }; case ID_perpendicular: { - o = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); + o = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); break; } case ID_parallel: { - o = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); + o = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); break; } case ID_vector: { - o = new ObjectTypeCalcer( VectorType::instance(), parents ); + o = new ObjectTypeCalcer( VectorType::instance(), tqparents ); break; } case ID_ray: { - o = new ObjectTypeCalcer( RayABType::instance(), parents ); + o = new ObjectTypeCalcer( RayABType::instance(), tqparents ); break; } case ID_move: { - o = new ObjectTypeCalcer( TranslatedType::instance(), parents ); + o = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); break; } case ID_mirrorPoint: { - o = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); + o = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); break; } case ID_pointOfConc: { - o = new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ); + o = new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ); break; } case ID_text: @@ -264,79 +264,79 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c case ID_fixedCircle: { double r = c->readDoubleNumEntry( "Radius" ); - parents.push_back( new ObjectConstCalcer( new DoubleImp( r ) ) ); - o = new ObjectTypeCalcer( CircleBPRType::instance(), parents ); + tqparents.push_back( new ObjectConstCalcer( new DoubleImp( r ) ) ); + o = new ObjectTypeCalcer( CircleBPRType::instance(), tqparents ); break; } case ID_angle: { - if ( parents.size() == 3 ) + if ( tqparents.size() == 3 ) { - ObjectTypeCalcer* ao = new ObjectTypeCalcer( AngleType::instance(), parents ); + ObjectTypeCalcer* ao = new ObjectTypeCalcer( AngleType::instance(), tqparents ); ao->calc( *ret ); - parents.clear(); - parents.push_back( ao ); + tqparents.clear(); + tqparents.push_back( ao ); }; - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* angle = parents[0]; - parents.clear(); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* angle = tqparents[0]; + tqparents.clear(); const Coordinate c = - static_cast( angle->parents()[1]->imp() )->coordinate(); + static_cast( angle->tqparents()[1]->imp() )->coordinate(); o = filtersConstructTextObject( c, angle, "angle-degrees", *ret, true ); break; } case ID_distance: { - if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectTypeCalcer* segment = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + ObjectTypeCalcer* segment = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); segment->calc( *ret ); - Coordinate m = ( static_cast( parents[0]->imp() )->coordinate() + - static_cast( parents[1]->imp() )->coordinate() ) / 2; + Coordinate m = ( static_cast( tqparents[0]->imp() )->coordinate() + + static_cast( tqparents[1]->imp() )->coordinate() ) / 2; o = filtersConstructTextObject( m, segment, "length", *ret, true ); break; } case ID_arc: { - o = new ObjectTypeCalcer( AngleType::instance(), parents ); + o = new ObjectTypeCalcer( AngleType::instance(), tqparents ); break; } case ID_area: { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - const CircleImp* circle = static_cast( parents[0]->imp() ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + const CircleImp* circle = static_cast( tqparents[0]->imp() ); const Coordinate c = circle->center() + Coordinate( circle->radius(), 0 ); - o = filtersConstructTextObject( c, parents[0], "surface", *ret, true ); + o = filtersConstructTextObject( c, tqparents[0], "surface", *ret, true ); break; } case ID_slope: { - // if parents contains a segment, line, vector or whatever, we - // take its parents cause we want points.. - if ( parents.size() == 1 ) parents = parents[0]->parents(); - if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + // if tqparents contains a segment, line, vector or whatever, we + // take its tqparents cause we want points.. + if ( tqparents.size() == 1 ) tqparents = tqparents[0]->tqparents(); + if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; const Coordinate c = ( - static_cast( parents[0]->imp() )->coordinate() + - static_cast( parents[1]->imp() )->coordinate() ) / 2; - ObjectTypeCalcer* line = new ObjectTypeCalcer( LineABType::instance(), parents ); + static_cast( tqparents[0]->imp() )->coordinate() + + static_cast( tqparents[1]->imp() )->coordinate() ) / 2; + ObjectTypeCalcer* line = new ObjectTypeCalcer( LineABType::instance(), tqparents ); line->calc( *ret ); o = filtersConstructTextObject( c, line, "slope", *ret, true ); break; } case ID_circumference: { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - const CircleImp* c = static_cast( parents[0]->imp() ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + const CircleImp* c = static_cast( tqparents[0]->imp() ); const Coordinate m = c->center() + Coordinate( c->radius(), 0 ); - o = filtersConstructTextObject( m, parents[0], "circumference", *ret, true ); + o = filtersConstructTextObject( m, tqparents[0], "circumference", *ret, true ); break; } case ID_rotation: { // in kig, the rotated object should be last.. - ObjectCalcer* t = parents[2]; - parents[2] = parents[0]; - parents[0] = t; - o = new ObjectTypeCalcer( RotationType::instance(), parents ); + ObjectCalcer* t = tqparents[2]; + tqparents[2] = tqparents[0]; + tqparents[0] = t; + o = new ObjectTypeCalcer( RotationType::instance(), tqparents ); break; } default: @@ -346,7 +346,7 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c // set the color... TQColor co = c->readColorEntry( "Color" ); if( !co.isValid() ) - co = Qt::blue; + co = TQt::blue; ObjectDrawer* d = new ObjectDrawer( co ); os[i] = new ObjectHolder( o, d ); diff --git a/kig/filters/kgeo-filter.h b/kig/filters/kgeo-filter.h index f8accd91..0eb8d462 100644 --- a/kig/filters/kgeo-filter.h +++ b/kig/filters/kgeo-filter.h @@ -25,11 +25,11 @@ class KSimpleConfig; /** * This is an import filter for files generated by the program KGeo, - * which was an interactive geometry program in kdeedu. Kig is + * which was an interactive tqgeometry program in kdeedu. Kig is * supposed to be its successor, and this import filter is part of my * attempt to achieve that :) * - * Status: a significant part of KGeo's format is supported, not all + * tqStatus: a significant part of KGeo's format is supported, not all * yet, though.. */ class KigFilterKGeo diff --git a/kig/filters/kgeo-resource.h b/kig/filters/kgeo-resource.h index f7af0f64..9a392ac8 100644 --- a/kig/filters/kgeo-resource.h +++ b/kig/filters/kgeo-resource.h @@ -71,7 +71,7 @@ #define ID_FILE_PRINT 10080 -#define ID_FILE_QUIT 10090 +#define ID_FILE_TQUIT 10090 /////////////////////////////////////////////////////////////////// // Edit-menu entries diff --git a/kig/filters/kseg-defs.h b/kig/filters/kseg-defs.h index 59dd3e4c..5319afaf 100644 --- a/kig/filters/kseg-defs.h +++ b/kig/filters/kseg-defs.h @@ -58,10 +58,10 @@ using namespace std; inline int ROUND(double x) { return ((int)(x + 0.5)); } inline int SIGN(double x) { return (x < 0) ? -1 : 1; } -inline int INTRAND(int a, int b) { return QMIN(a, b) + rand() % abs(a - b); } +inline int INTRAND(int a, int b) { return TQMIN(a, b) + rand() % abs(a - b); } #define SQR(x) ((x) * (x)) #define CUBE(x) ((x) * (x) * (x)) -#define QUAD(x) (((x) * (x)) * ((x) * (x))) +#define TQUAD(x) (((x) * (x)) * ((x) * (x))) enum G_Type { @@ -254,9 +254,9 @@ enum MenuIDs ID_CONSTRUCTION_MAKE_INITIAL, ID_CONSTRUCTION_RECURSE, - ID_PLAY_QUICKPLAY, + ID_PLAY_TQUICKPLAY, - ID_QUICKPLAY_SET_DIRECTORY, + ID_TQUICKPLAY_SET_DIRECTORY, ID_FILE_RECENTLIST_START //should be the last entry }; diff --git a/kig/filters/kseg-filter.cc b/kig/filters/kseg-filter.cc index fb96c25c..6f784759 100644 --- a/kig/filters/kseg-filter.cc +++ b/kig/filters/kseg-filter.cc @@ -67,7 +67,7 @@ bool KigFilterKSeg::supportMime( const TQString& mime ) struct drawstyle { - Q_INT8 pointstyle; + TQ_INT8 pointstyle; TQFont font; TQPen pen; TQBrush brush; @@ -93,50 +93,50 @@ static Coordinate readKSegCoordinate( TQDataStream& stream ) return t + Coordinate( -7, -7 ); } -static ObjectTypeCalcer* intersectionPoint( const std::vector& parents, int which ) +static ObjectTypeCalcer* intersectionPoint( const std::vector& tqparents, int which ) { - if ( parents.size() != 2 ) return 0; + if ( tqparents.size() != 2 ) return 0; int nlines = 0; int nconics = 0; int narcs = 0; for ( int i = 0; i < 2; ++i ) { - if ( parents[i]->imp()->inherits( AbstractLineImp::stype() ) ) ++nlines; - else if ( parents[i]->imp()->inherits( ConicImp::stype() ) ) ++nconics; - else if ( parents[i]->imp()->inherits( ArcImp::stype() ) ) ++narcs; + if ( tqparents[i]->imp()->inherits( AbstractLineImp::stype() ) ) ++nlines; + else if ( tqparents[i]->imp()->inherits( ConicImp::stype() ) ) ++nconics; + else if ( tqparents[i]->imp()->inherits( ArcImp::stype() ) ) ++narcs; else return 0; }; if ( nlines == 2 ) - return which == -1 ? new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ) : 0; + return which == -1 ? new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ) : 0; else if ( nlines == 1 && nconics == 1 ) { - std::vector intparents( parents ); - intparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), intparents ); + std::vector inttqparents( tqparents ); + inttqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), inttqparents ); } else if ( nlines == 0 && nconics == 2 ) { - std::vector rparents( parents ); - rparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); - rparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); - rparents.push_back( new ObjectTypeCalcer( ConicRadicalType::instance(), rparents ) ); - std::vector iparents; - iparents.push_back( parents[0] ); - iparents.push_back( rparents.back() ); - iparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), iparents ); + std::vector rtqparents( tqparents ); + rtqparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); + rtqparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); + rtqparents.push_back( new ObjectTypeCalcer( ConicRadicalType::instance(), rtqparents ) ); + std::vector itqparents; + itqparents.push_back( tqparents[0] ); + itqparents.push_back( rtqparents.back() ); + itqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), itqparents ); } else if ( nlines == 1 && narcs == 1 ) { - std::vector intparents( parents ); - intparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ArcLineIntersectionType::instance(), intparents ); + std::vector inttqparents( tqparents ); + inttqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ArcLineIntersectionType::instance(), inttqparents ); } else return 0; } ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& kigdoc, - std::vector& parents, + std::vector& tqparents, int subtype, bool& ok ) { ok = true; @@ -145,34 +145,34 @@ ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& { case G_TRANSLATED: { - std::vector vectorparents( parents.begin() + 1, parents.end() ); - ObjectTypeCalcer* vector = new ObjectTypeCalcer( VectorType::instance(), vectorparents ); + std::vector vectortqparents( tqparents.begin() + 1, tqparents.end() ); + ObjectTypeCalcer* vector = new ObjectTypeCalcer( VectorType::instance(), vectortqparents ); vector->calc( kigdoc ); std::vector transparents; - transparents.push_back( parents[0] ); + transparents.push_back( tqparents[0] ); transparents.push_back( vector ); retobj = new ObjectTypeCalcer( TranslatedType::instance(), transparents ); break; } case G_ROTATED: { - std::vector angleparents( parents.begin() + 2, parents.end() ); - ObjectTypeCalcer* angle = new ObjectTypeCalcer( AngleType::instance(), angleparents ); + std::vector angletqparents( tqparents.begin() + 2, tqparents.end() ); + ObjectTypeCalcer* angle = new ObjectTypeCalcer( AngleType::instance(), angletqparents ); angle->calc( kigdoc ); - std::vector rotparents; - rotparents.push_back( parents[0] ); - rotparents.push_back( parents[1] ); - rotparents.push_back( angle ); - retobj = new ObjectTypeCalcer( RotationType::instance(), rotparents ); + std::vector rottqparents; + rottqparents.push_back( tqparents[0] ); + rottqparents.push_back( tqparents[1] ); + rottqparents.push_back( angle ); + retobj = new ObjectTypeCalcer( RotationType::instance(), rottqparents ); break; } case G_SCALED: { - if ( parents.size() == 4 ) + if ( tqparents.size() == 4 ) { - retobj = new ObjectTypeCalcer( ScalingOverCenter2Type::instance(), parents ); + retobj = new ObjectTypeCalcer( ScalingOverCenter2Type::instance(), tqparents ); } else { @@ -187,8 +187,8 @@ ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& } case G_REFLECTED: { - std::vector mirparents( parents.begin(), parents.end() ); - retobj = new ObjectTypeCalcer( LineReflectionType::instance(), mirparents ); + std::vector mirtqparents( tqparents.begin(), tqparents.end() ); + retobj = new ObjectTypeCalcer( LineReflectionType::instance(), mirtqparents ); break; } } @@ -250,14 +250,14 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) { short styleid; stream >> styleid; - short nparents; - stream >> nparents; - std::vector parents( nparents, 0 ); - for ( short j = 0; j < nparents; ++j ) + short ntqparents; + stream >> ntqparents; + std::vector tqparents( ntqparents, 0 ); + for ( short j = 0; j < ntqparents; ++j ) { - int parent; - stream >> parent; - parents[j] = ret[parent]->calcer(); + int tqparent; + stream >> tqparent; + tqparents[j] = ret[tqparent]->calcer(); }; // read the object.. @@ -318,13 +318,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_FREE_POINT: { // fixed point - if ( nparents != 0 ) KIG_FILTER_PARSE_ERROR; + if ( ntqparents != 0 ) KIG_FILTER_PARSE_ERROR; Coordinate c = readKSegCoordinate( stream ); o = fact->fixedPointCalcer( c ); break; @@ -334,37 +334,37 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) // constrained point double p; stream >> p; - if ( nparents != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = parents[0]; - assert( parent ); - o = fact->constrainedPointCalcer( parent, p ); + if ( ntqparents != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = tqparents[0]; + assert( tqparent ); + o = fact->constrainedPointCalcer( tqparent, p ); break; } case G_INTERSECTION_POINT: { // KSeg has somewhat weird intersection objects.. // for all objects G_INTERSECTION_POINT gets the - // first intersection of its parents, G_INTERSECTION2_POINT + // first intersection of its tqparents, G_INTERSECTION2_POINT // represents the second, if present. - o = intersectionPoint( parents, -1 ); + o = intersectionPoint( tqparents, -1 ); if ( ! o ) KIG_FILTER_PARSE_ERROR; break; } case G_INTERSECTION2_POINT: { - o = intersectionPoint( parents, 1 ); + o = intersectionPoint( tqparents, 1 ); if ( ! o ) KIG_FILTER_PARSE_ERROR; break; } case G_MID_POINT: { // midpoint of a segment.. - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - if ( !parents[0]->imp()->inherits( SegmentImp::stype() ) ) + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( !tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - int index = parents[0]->imp()->propertiesInternalNames().findIndex( "mid-point" ); + int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( "mid-point" ); assert( index != -1 ); - o = new ObjectPropertyCalcer( parents[0], index ); + o = new ObjectPropertyCalcer( tqparents[0], index ); break; } default: @@ -383,13 +383,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_ENDPOINTS_SEGMENT: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); break; } default: @@ -406,18 +406,18 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_TWOPOINTS_RAY: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( RayABType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( RayABType::instance(), tqparents ); break; } case G_BISECTOR_RAY: { - ObjectTypeCalcer* angle = new ObjectTypeCalcer( HalfAngleType::instance(), parents ); + ObjectTypeCalcer* angle = new ObjectTypeCalcer( HalfAngleType::instance(), tqparents ); angle->calc( *retdoc ); o = fact->propertyObjectCalcer( angle, "angle-bisector" ); break; @@ -436,25 +436,25 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_TWOPOINTS_LINE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LineABType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LineABType::instance(), tqparents ); break; } case G_PARALLEL_LINE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); break; } case G_PERPENDICULAR_LINE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); break; } default: @@ -471,37 +471,37 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_CENTERPOINT_CIRCLE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( CircleBCPType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( CircleBCPType::instance(), tqparents ); break; } case G_CENTERRADIUS_CIRCLE: { ObjectCalcer* point; ObjectCalcer* segment; - if ( parents[0]->imp()->inherits( PointImp::stype() ) ) + if ( tqparents[0]->imp()->inherits( PointImp::stype() ) ) { - point = parents[0]; - segment = parents[1]; + point = tqparents[0]; + segment = tqparents[1]; } else { - point = parents[1]; - segment = parents[0]; + point = tqparents[1]; + segment = tqparents[0]; }; - int index = segment->imp()->propertiesInternalNames().findIndex( "length" ); + int index = segment->imp()->propertiesInternalNames().tqfindIndex( "length" ); if ( index == -1 ) KIG_FILTER_PARSE_ERROR; ObjectPropertyCalcer* length = new ObjectPropertyCalcer( segment, index ); length->calc( *retdoc ); - std::vector cparents; - cparents.push_back( point ); - cparents.push_back( length ); - o = new ObjectTypeCalcer( CircleBPRType::instance(), cparents ); + std::vector ctqparents; + ctqparents.push_back( point ); + ctqparents.push_back( length ); + o = new ObjectTypeCalcer( CircleBPRType::instance(), ctqparents ); break; } default: @@ -518,13 +518,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_THREEPOINTS_ARC: { - if ( nparents != 3 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( ArcBTPType::instance(), parents ); + if ( ntqparents != 3 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( ArcBTPType::instance(), tqparents ); break; } default: @@ -541,13 +541,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } default: { - if ( nparents < 3 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( PolygonBNPType::instance(), parents ); + if ( ntqparents < 3 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( PolygonBNPType::instance(), tqparents ); } } // default: @@ -581,13 +581,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_OBJECT_LOCUS: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = fact->locusCalcer( parents[0], parents[1] ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = fact->locusCalcer( tqparents[0], tqparents[1] ); break; } default: @@ -636,7 +636,7 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) std::vector args2; args2.push_back( object->nameCalcer() ); ObjectCalcer* oc2 = fact->attachedLabelCalcer( - TQString::fromLatin1( "%1" ), object->calcer(), + TQString::tqfromLatin1( "%1" ), object->calcer(), static_cast( object->imp() )->coordinate(), false, args2, *retdoc ); oc2->calc( *retdoc ); diff --git a/kig/filters/kseg-filter.h b/kig/filters/kseg-filter.h index 03d03958..d8909282 100644 --- a/kig/filters/kseg-filter.h +++ b/kig/filters/kseg-filter.h @@ -29,7 +29,7 @@ class KigFilterKSeg ~KigFilterKSeg(); ObjectCalcer* transformObject( const TQString& file, KigDocument& kigdoc, - std::vector& parents, + std::vector& tqparents, int subtype, bool& ok ); public: diff --git a/kig/filters/latexexporter.cc b/kig/filters/latexexporter.cc index 98d3fc2e..811cfd9b 100644 --- a/kig/filters/latexexporter.cc +++ b/kig/filters/latexexporter.cc @@ -194,7 +194,7 @@ void LatexExportImpVisitor::mapColor( TQColor color ) ColorMap newcolor; newcolor.color = color; TQString tmpname = color.name(); - tmpname.replace( "#", "" ); + tmpname.tqreplace( "#", "" ); newcolor.name = tmpname; mcolors.push_back( newcolor ); mstream << "\\newrgbcolor{" << tmpname << "}{" @@ -213,9 +213,9 @@ double LatexExportImpVisitor::dimRealToCoord( int dim ) TQString LatexExportImpVisitor::writeStyle( Qt::PenStyle style ) { TQString ret( "linestyle=" ); - if ( style == Qt::DashLine ) + if ( style == TQt::DashLine ) ret += "dashed"; - else if ( style == Qt::DotLine ) + else if ( style == TQt::DotLine ) ret += "dotted,dotsep=2pt"; else ret += "solid"; @@ -228,9 +228,9 @@ void LatexExportImpVisitor::plotGenericCurve( const CurveImp* imp ) if ( width == -1 ) width = 1; TQString prefix = TQString( "\\pscurve[linecolor=%1,linewidth=%2,%3]" ) - .arg( mcurcolorid ) - .arg( width / 100.0 ) - .arg( writeStyle( mcurobj->drawer()->style() ) ); + .tqarg( mcurcolorid ) + .tqarg( width / 100.0 ) + .tqarg( writeStyle( mcurobj->drawer()->style() ) ); std::vector< std::vector< Coordinate > > coordlist; coordlist.push_back( std::vector< Coordinate >() ); @@ -483,7 +483,7 @@ void LatexExportImpVisitor::visit( const PolygonImp* imp ) void LatexExporter::run( const KigPart& doc, KigWidget& w ) { KigFileDialog* kfd = new KigFileDialog( - TQString::null, i18n( "*.tex|Latex Documents (*.tex)" ), + TQString(), i18n( "*.tex|Latex Documents (*.tex)" ), i18n( "Export as Latex" ), &w ); kfd->setOptionCaption( i18n( "Latex Options" ) ); LatexExporterOptions* opts = new LatexExporterOptions( 0L ); @@ -507,7 +507,7 @@ void LatexExporter::run( const KigPart& doc, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " "check if the file permissions are set correctly." ) - .arg( file_name ) ); + .tqarg( file_name ) ); return; }; diff --git a/kig/filters/latexexporteroptions.ui b/kig/filters/latexexporteroptions.ui index d2e60c5b..04275dd7 100644 --- a/kig/filters/latexexporteroptions.ui +++ b/kig/filters/latexexporteroptions.ui @@ -1,10 +1,10 @@ LatexExporterOptions - + LatexExporterOptions - + 0 0 @@ -22,7 +22,7 @@ 6 - + groupBox1 @@ -33,7 +33,7 @@ unnamed - + showGridCheckBox @@ -41,7 +41,7 @@ Show grid - + showAxesCheckBox @@ -49,7 +49,7 @@ Show axes - + showExtraFrameCheckBox @@ -63,7 +63,7 @@ - + diff --git a/kig/filters/native-filter.cc b/kig/filters/native-filter.cc index a5378263..4a3d0a04 100644 --- a/kig/filters/native-filter.cc +++ b/kig/filters/native-filter.cc @@ -51,7 +51,7 @@ struct HierElem { int id; - std::vector parents; + std::vector tqparents; TQDomElement el; }; @@ -73,8 +73,8 @@ static void visitElem( std::vector& ret, { if ( !seen[i] ) { - for ( uint j = 0; j < elems[i].parents.size(); ++j ) - visitElem( ret, elems, seen, elems[i].parents[j] - 1); + for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) + visitElem( ret, elems, seen, elems[i].tqparents[j] - 1); ret.push_back( elems[i] ); seen[i] = true; }; @@ -114,7 +114,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) TQFile kigdoc( file ); #ifndef KIG_NO_COMPRESSED_FILES bool iscompressed = false; - if ( !file.endsWith( ".kig", false ) ) + if ( !file.tqendsWith( ".kig", false ) ) { // the file is compressed, so we have to decompress it and fetch the // kig file inside it... @@ -125,7 +125,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) KIG_FILTER_PARSE_ERROR; TQString tempname = file.section( '/', -1 ); - if ( file.endsWith( ".kigz", false ) ) + if ( file.tqendsWith( ".kigz", false ) ) { tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); } @@ -193,7 +193,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) if ( major > 0 || minor > 9 ) { notSupported( file, i18n( "This file was created by Kig version \"%1\", " - "which this version cannot open." ).arg( version ) ); + "which this version cannot open." ).tqarg( version ) ); return false; } else if ( major == 0 && minor <= 3 ) @@ -204,7 +204,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) "You can try to open this file with an older Kig " "version (0.4 to 0.6),\n" "and then save it again, which will save it in the " - "new format." ).arg( version ) ); + "new format." ).tqarg( version ) ); return false; } else if ( major == 0 && minor <= 6 ) @@ -226,7 +226,7 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& if ( e.tagName() == "CoordinateSystem" ) { const TQCString type = e.text().latin1(); - CoordinateSystem* s = CoordinateSystemFactory::build( type ); + CoordinateSystem* s = CoordinateSystemFactory::build( type.data() ); if ( ! s ) { warning( i18n( "This Kig file has a coordinate system " @@ -273,7 +273,7 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& if ( ! ok ) KIG_FILTER_PARSE_ERROR; extendVect( elems, id ); - elems[id-1].parents.push_back( pid ); + elems[id-1].tqparents.push_back( pid ); } } }; @@ -315,14 +315,14 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& propname = ec.text().latin1(); }; - if ( i->parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = retcalcers[i->parents[0] -1]; - QCStringList propnames = parent->imp()->propertiesInternalNames(); - int propid = propnames.findIndex( propname ); + if ( i->tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = retcalcers[i->tqparents[0] -1]; + QCStringList propnames = tqparent->imp()->propertiesInternalNames(); + int propid = propnames.tqfindIndex( propname ); if ( propid == -1 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectPropertyCalcer( parent, propid ); + o = new ObjectPropertyCalcer( tqparent, propid ); } else if ( e.tagName() == "Object" ) { @@ -331,23 +331,23 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& KIG_FILTER_PARSE_ERROR; const ObjectType* type = - ObjectTypeFactory::instance()->find( tmp.latin1() ); + ObjectTypeFactory::instance()->tqfind( tmp.latin1() ); if ( !type ) { notSupported( file, i18n( "This Kig file uses an object of type \"%1\", " "which this Kig version does not support." "Perhaps you have compiled Kig without support " "for this object type," - "or perhaps you are using an older Kig version." ).arg( tmp ) ); + "or perhaps you are using an older Kig version." ).tqarg( tmp ) ); return false; }; - std::vector parents; - for ( std::vector::iterator j = i->parents.begin(); - j != i->parents.end(); ++j ) - parents.push_back( retcalcers[*j - 1] ); + std::vector tqparents; + for ( std::vector::iterator j = i->tqparents.begin(); + j != i->tqparents.end(); ++j ) + tqparents.push_back( retcalcers[*j - 1] ); - o = new ObjectTypeCalcer( type, parents ); + o = new ObjectTypeCalcer( type, tqparents ); } else continue; @@ -415,7 +415,7 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& ret->setAxes( false ); } const TQCString type = tmptype.latin1(); - CoordinateSystem* s = CoordinateSystemFactory::build( type ); + CoordinateSystem* s = CoordinateSystemFactory::build( type.data() ); if ( ! s ) { warning( i18n( "This Kig file has a coordinate system " @@ -434,25 +434,25 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& uint id = tmp.toInt( &ok ); if ( id <= 0 ) KIG_FILTER_PARSE_ERROR; - std::vector parents; - for ( TQDomElement parentel = e.firstChild().toElement(); ! parentel.isNull(); - parentel = parentel.nextSibling().toElement() ) + std::vector tqparents; + for ( TQDomElement tqparentel = e.firstChild().toElement(); ! tqparentel.isNull(); + tqparentel = tqparentel.nextSibling().toElement() ) { - if ( parentel.tagName() != "Parent" ) continue; - TQString tmp = parentel.attribute( "id" ); - uint parentid = tmp.toInt( &ok ); + if ( tqparentel.tagName() != "Parent" ) continue; + TQString tmp = tqparentel.attribute( "id" ); + uint tqparentid = tmp.toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; - if ( parentid == 0 || parentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = calcers[parentid - 1].get(); - if ( ! parent ) KIG_FILTER_PARSE_ERROR; - parents.push_back( parent ); + if ( tqparentid == 0 || tqparentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = calcers[tqparentid - 1].get(); + if ( ! tqparent ) KIG_FILTER_PARSE_ERROR; + tqparents.push_back( tqparent ); } ObjectCalcer* o = 0; if ( e.tagName() == "Data" ) { - if ( !parents.empty() ) KIG_FILTER_PARSE_ERROR; + if ( !tqparents.empty() ) KIG_FILTER_PARSE_ERROR; TQString tmp = e.attribute( "type" ); TQString error; ObjectImp* imp = ObjectImpFactory::instance()->deserialize( tmp, e, error ); @@ -465,42 +465,42 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& } else if ( e.tagName() == "Property" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; TQCString propname = e.attribute( "which" ).latin1(); - ObjectCalcer* parent = parents[0]; - int propid = parent->imp()->propertiesInternalNames().findIndex( propname ); + ObjectCalcer* tqparent = tqparents[0]; + int propid = tqparent->imp()->propertiesInternalNames().tqfindIndex( propname ); if ( propid == -1 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectPropertyCalcer( parent, propid ); + o = new ObjectPropertyCalcer( tqparent, propid ); } else if ( e.tagName() == "Object" ) { TQString tmp = e.attribute( "type" ); const ObjectType* type = - ObjectTypeFactory::instance()->find( tmp.latin1() ); + ObjectTypeFactory::instance()->tqfind( tmp.latin1() ); if ( ! type ) { notSupported( file, i18n( "This Kig file uses an object of type \"%1\", " "which this Kig version does not support." "Perhaps you have compiled Kig without support " "for this object type," - "or perhaps you are using an older Kig version." ).arg( tmp ) ); + "or perhaps you are using an older Kig version." ).tqarg( tmp ) ); return false; } // mp: (I take the responsibility for this!) explanation: the usual ObjectTypeCalcer - // constructor also "sortArgs" the parents. I believe that this *must not* be done + // constructor also "sortArgs" the tqparents. I believe that this *must not* be done // when loading from a saved kig file for the following reasons: // 1. the arguments should already be in their intended order, since the file was // saved from a working hierarchy; furthermore we actually want to restore the original // hierarchy, not really to also fix possible problems with the original hierarchy; // 2. calling sortArgs could have undesirable side effects in particular situations, // since kig actually allow an ObjectType to produce different type of ObjectImp's - // it may happen that the parents of an object do not satisfy the requirements + // it may happen that the tqparents of an object do not satisfy the requirements // enforced by sortArgs (while moving around the free objects) but still be // perfectly valid - o = new ObjectTypeCalcer( type, parents, false ); + o = new ObjectTypeCalcer( type, tqparents, false ); } else KIG_FILTER_PARSE_ERROR; @@ -604,8 +604,8 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) const ObjectPropertyCalcer* o = static_cast( *i ); objectelem = doc.createElement( "Property" ); - TQCString propname = o->parent()->imp()->propertiesInternalNames()[o->propId()]; - objectelem.setAttribute( "which", propname ); + TQCString propname = o->tqparent()->imp()->propertiesInternalNames()[o->propId()]; + objectelem.setAttribute( TQString("which"), TQString(propname) ); } else if ( dynamic_cast( *i ) ) { @@ -615,8 +615,8 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) } else assert( false ); - const std::vector parents = ( *i )->parents(); - for ( std::vector::const_iterator i = parents.begin(); i != parents.end(); ++i ) + const std::vector tqparents = ( *i )->tqparents(); + for ( std::vector::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) { std::map::const_iterator idp = idmap.find( *i ); assert( idp != idmap.end() ); @@ -642,7 +642,7 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) TQDomElement drawelem = doc.createElement( "Draw" ); drawelem.setAttribute( "object", id ); drawelem.setAttribute( "color", d->color().name() ); - drawelem.setAttribute( "shown", TQString::fromLatin1( d->shown() ? "true" : "false" ) ); + drawelem.setAttribute( "shown", TQString::tqfromLatin1( d->shown() ? "true" : "false" ) ); drawelem.setAttribute( "width", TQString::number( d->width() ) ); drawelem.setAttribute( "style", d->styleToString() ); drawelem.setAttribute( "point-style", d->pointStyleToString() ); @@ -683,7 +683,7 @@ bool KigFilterNative::save07( const KigDocument& data, const TQString& outfile ) return save07( data, stdoutstream ); } #ifndef KIG_NO_COMPRESSED_FILES - if ( !outfile.endsWith( ".kig", false ) ) + if ( !outfile.tqendsWith( ".kig", false ) ) { // the user wants to save a compressed file, so we have to save our kig // file to a temp file and then compress it... @@ -693,7 +693,7 @@ bool KigFilterNative::save07( const KigDocument& data, const TQString& outfile ) return false; TQString tempname = outfile.section( '/', -1 ); - if ( outfile.endsWith( ".kigz", false ) ) + if ( outfile.tqendsWith( ".kigz", false ) ) tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); else return false; diff --git a/kig/filters/svgexporter.cc b/kig/filters/svgexporter.cc index 57413004..93801b3b 100644 --- a/kig/filters/svgexporter.cc +++ b/kig/filters/svgexporter.cc @@ -59,7 +59,7 @@ TQString SVGExporter::menuIcon() const void SVGExporter::run( const KigPart& part, KigWidget& w ) { KigFileDialog* kfd = new KigFileDialog( - TQString::null, i18n( "*.svg|Scalable Vector Graphics (*.svg)" ), + TQString(), i18n( "*.svg|Scalable Vector Graphics (*.svg)" ), i18n( "Export as SVG" ), &w ); kfd->setOptionCaption( i18n( "SVG Options" ) ); SVGExporterOptions* opts = new SVGExporterOptions( 0L ); @@ -81,7 +81,7 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " "check if the file permissions are set correctly." ) - .arg( file_name ) ); + .tqarg( file_name ) ); return; }; @@ -91,12 +91,12 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) TQPicture pic; pic.setBoundingRect( r ); KigPainter* p = new KigPainter( ScreenInfo( w.screenInfo().shownRect(), viewrect ), - &pic, part.document() ); + TQT_TQPAINTDEVICE(&pic), part.document() ); // p->setWholeWinOverlay(); -// p->setBrushColor( Qt::white ); -// p->setBrushStyle( Qt::SolidPattern ); +// p->setBrushColor( TQt::white ); +// p->setBrushStyle( TQt::SolidPattern ); // p->drawRect( r ); -// p->setBrushStyle( Qt::NoBrush ); +// p->setBrushStyle( TQt::NoBrush ); // p->setWholeWinOverlay(); p->drawGrid( part.document().coordinateSystem(), showgrid, showaxes ); p->drawObjects( part.document().objects(), false ); @@ -105,7 +105,7 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) if ( !pic.save( file_name, "SVG" ) ) { - KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to SVG file \"%1\"" ).arg( file_name ) ); + KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to SVG file \"%1\"" ).tqarg( file_name ) ); } } diff --git a/kig/filters/svgexporteroptions.ui b/kig/filters/svgexporteroptions.ui index 2de679cb..58176edf 100644 --- a/kig/filters/svgexporteroptions.ui +++ b/kig/filters/svgexporteroptions.ui @@ -1,10 +1,10 @@ SVGExporterOptions - + SVGExporterOptions - + 0 0 @@ -22,7 +22,7 @@ 6 - + groupBox1 @@ -33,7 +33,7 @@ unnamed - + showGridCheckBox @@ -41,7 +41,7 @@ Show grid - + showAxesCheckBox @@ -55,7 +55,7 @@ - + diff --git a/kig/filters/tests/locus.fgeo b/kig/filters/tests/locus.fgeo index a914068c..4ad79bbd 100644 --- a/kig/filters/tests/locus.fgeo +++ b/kig/filters/tests/locus.fgeo @@ -1,2 +1,2 @@ --1.6666663.216667-2.7666670.5500000.0806913.0000003.0166672.866667-0.7500002.6000003.816667 +-1.6666663.216667-2.7666670.5500000.0806913.0000003.0166672.866667-0.7500002.6000003.816667 diff --git a/kig/kfile/Makefile.am b/kig/kfile/Makefile.am index b8de2d3d..f2cc337f 100644 --- a/kig/kfile/Makefile.am +++ b/kig/kfile/Makefile.am @@ -9,11 +9,11 @@ kde_module_LTLIBRARIES = \ kfile_kig.la kfile_drgeo_la_SOURCES = kfile_drgeo.cpp -kfile_drgeo_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kfile_drgeo_la_LDFLAGS = $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) -module $(KDE_PLUGIN) kfile_drgeo_la_LIBADD = $(LIB_KIO) kfile_kig_la_SOURCES = kfile_kig.cpp -kfile_kig_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kfile_kig_la_LDFLAGS = $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) -module $(KDE_PLUGIN) kfile_kig_la_LIBADD = $(LIB_KIO) METASOURCES = AUTO diff --git a/kig/kfile/kfile_drgeo.cpp b/kig/kfile/kfile_drgeo.cpp index b921131b..bbdc6869 100644 --- a/kig/kfile/kfile_drgeo.cpp +++ b/kig/kfile/kfile_drgeo.cpp @@ -29,8 +29,8 @@ typedef KGenericFactory drgeoFactory; K_EXPORT_COMPONENT_FACTORY( kfile_drgeo, drgeoFactory( "kfile_drgeo" ) ) -DrgeoPlugin::DrgeoPlugin( TQObject *parent, const char *name, const TQStringList &args ) - : KFilePlugin( parent, name, args ) +DrgeoPlugin::DrgeoPlugin( TQObject *tqparent, const char *name, const TQStringList &args ) + : KFilePlugin( tqparent, name, args ) { info = addMimeTypeInfo( "application/x-drgeo" ); @@ -41,7 +41,7 @@ DrgeoPlugin::DrgeoPlugin( TQObject *parent, const char *name, const TQStringList item = addItemInfo( group, "NumOfMacros", i18n( "Macros" ), TQVariant::Int ); group_contents = addGroupInfo( info, "DrgeoContents", i18n( "Translators: what this drgeo " - "file contains", "Contents" ) ); + "file tqcontains", "Contents" ) ); } bool DrgeoPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) diff --git a/kig/kfile/kfile_drgeo.h b/kig/kfile/kfile_drgeo.h index 4495cd17..19b28e5b 100644 --- a/kig/kfile/kfile_drgeo.h +++ b/kig/kfile/kfile_drgeo.h @@ -28,9 +28,10 @@ class TQStringList; class DrgeoPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - DrgeoPlugin( TQObject *parent, const char *name, const TQStringList& args ); + DrgeoPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& metainfo, uint what); protected: diff --git a/kig/kfile/kfile_kig.cpp b/kig/kfile/kfile_kig.cpp index bd54a036..defae8c2 100644 --- a/kig/kfile/kfile_kig.cpp +++ b/kig/kfile/kfile_kig.cpp @@ -35,8 +35,8 @@ typedef KGenericFactory kigFactory; K_EXPORT_COMPONENT_FACTORY( kfile_kig, kigFactory( "kfile_kig" ) ) -KigPlugin::KigPlugin( TQObject *parent, const char *name, const TQStringList &args ) - : KFilePlugin( parent, name, args ) +KigPlugin::KigPlugin( TQObject *tqparent, const char *name, const TQStringList &args ) + : KFilePlugin( tqparent, name, args ) { KFileMimeTypeInfo::ItemInfo* item; @@ -58,7 +58,7 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) TQString sfile = metainfo.path(); bool iscompressed = false; TQFile f( sfile ); - if ( !sfile.endsWith( ".kig", false ) ) + if ( !sfile.tqendsWith( ".kig", false ) ) { iscompressed = true; @@ -67,7 +67,7 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) return false; TQString tempname = sfile.section( '/', -1 ); - if ( sfile.endsWith( ".kigz", false ) ) + if ( sfile.tqendsWith( ".kigz", false ) ) { tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); } @@ -114,7 +114,7 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) TQString compatversion = main.attribute( "CompatibilityVersion" ); if ( compatversion.isEmpty() ) compatversion = i18n( "%1 represents Kig version", - "%1 (as the version)" ).arg( version ); + "%1 (as the version)" ).tqarg( version ); appendItem( metagroup, "CompatVersion", compatversion ); // reading the Coordinate System... diff --git a/kig/kfile/kfile_kig.h b/kig/kfile/kfile_kig.h index d5238a4f..7c0512be 100644 --- a/kig/kfile/kfile_kig.h +++ b/kig/kfile/kfile_kig.h @@ -28,9 +28,10 @@ class TQStringList; class KigPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KigPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KigPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& metainfo, uint what); protected: diff --git a/kig/kig/kig.cpp b/kig/kig/kig.cpp index ed954d26..dc63b2dc 100644 --- a/kig/kig/kig.cpp +++ b/kig/kig/kig.cpp @@ -69,7 +69,7 @@ Kig::Kig() // now that the Part is loaded, we cast it to a Part to get // our hands on it m_part = static_cast - (factory->create(this, "kig_part", "KParts::ReadWritePart" )); + (factory->create(TQT_TQOBJECT(this), "kig_part", "KParts::ReadWritePart" )); if (m_part) { // tell the KParts::MainWindow that this is indeed the main widget @@ -105,30 +105,30 @@ Kig::~Kig() void Kig::setupActions() { - KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES - m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection()); + m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); #else createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); #endif // FIXME: this (recent files) should be app-wide, not specific to each window... - m_recentFilesAction = KStdAction::openRecent(this, TQT_SLOT(openURL(const KURL&)), actionCollection()); + m_recentFilesAction = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openURL(const KURL&)), actionCollection()); m_recentFilesAction->loadEntries(config); #if KDE_IS_VERSION( 3, 2, 90 ) KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() ); #else - KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); #endif - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::tipOfDay( this, TQT_SLOT( tipOfDay() ), actionCollection(), "help_tipofday" ); + KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( tipOfDay() ), actionCollection(), "help_tipofday" ); } void Kig::saveProperties(KConfig* config) @@ -219,7 +219,7 @@ bool Kig::queryClose() switch( KMessageBox::warningYesNoCancel ( widget(), - i18n("Save changes to document %1?").arg(m_part->url().path()), + i18n("Save changes to document %1?").tqarg(m_part->url().path()), i18n("Save Changes?"),KStdGuiItem::save(),KStdGuiItem::discard() )) { @@ -272,7 +272,7 @@ void Kig::fileOpen() if (!file_name.isEmpty()) openURL(file_name); } -// ifdef's disabled, cause Qt moc doesn't handle ifdef's.. +// ifdef's disabled, cause TQt tqmoc doesn't handle ifdef's.. // #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES void Kig::optionsShowToolbar() { diff --git a/kig/kig/kig.h b/kig/kig/kig.h index 51c236f2..71176db8 100644 --- a/kig/kig/kig.h +++ b/kig/kig/kig.h @@ -49,6 +49,7 @@ class KRecentFilesAction; class Kig : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -114,7 +115,7 @@ class Kig : public KParts::MainWindow private slots: void fileNew(); void fileOpen(); - // Qt moc doesn't handle ifdef's, so i'm disabling it.. + // TQt tqmoc doesn't handle ifdef's, so i'm disabling it.. // #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES void optionsShowToolbar(); void optionsShowStatusbar(); diff --git a/kig/kig/kig_commands.cpp b/kig/kig/kig_commands.cpp index d4668f55..d6b79805 100644 --- a/kig/kig/kig_commands.cpp +++ b/kig/kig/kig_commands.cpp @@ -97,7 +97,7 @@ KigCommand* KigCommand::removeCommand( KigPart& doc, const std::vectorimp()->type()->removeAStatement(); else - text = i18n( "Remove %1 Objects" ).arg( os.size() ); + text = i18n( "Remove %1 Objects" ).tqarg( os.size() ); KigCommand* ret = new KigCommand( doc, text ); ret->addTask( new RemoveObjectsTask( os ) ); return ret; @@ -109,7 +109,7 @@ KigCommand* KigCommand::addCommand( KigPart& doc, const std::vectorimp()->type()->addAStatement(); else - text = i18n( "Add %1 Objects" ).arg( os.size() ); + text = i18n( "Add %1 Objects" ).tqarg( os.size() ); KigCommand* ret = new KigCommand( doc, text ); ret->addTask( new AddObjectsTask( os ) ); return ret; @@ -181,11 +181,11 @@ void ChangeObjectConstCalcerTask::execute( KigPart& doc ) { mnewimp = mcalcer->switchImp( mnewimp ); - std::set allchildren = getAllChildren( mcalcer.get() ); - std::vector allchildrenvect( allchildren.begin(), allchildren.end() ); - allchildrenvect = calcPath( allchildrenvect ); - for ( std::vector::iterator i = allchildrenvect.begin(); - i != allchildrenvect.end(); ++i ) + std::set alltqchildren = getAllChildren( mcalcer.get() ); + std::vector alltqchildrenvect( alltqchildren.begin(), alltqchildren.end() ); + alltqchildrenvect = calcPath( alltqchildrenvect ); + for ( std::vector::iterator i = alltqchildrenvect.begin(); + i != alltqchildrenvect.end(); ++i ) ( *i )->calc( doc.document() ); } @@ -274,7 +274,7 @@ class ChangeParentsAndTypeTask::Private { public: ObjectTypeCalcer* o; - std::vector newparents; + std::vector newtqparents; const ObjectType* newtype; }; @@ -284,13 +284,13 @@ ChangeParentsAndTypeTask::~ChangeParentsAndTypeTask() } ChangeParentsAndTypeTask::ChangeParentsAndTypeTask( - ObjectTypeCalcer* o, const std::vector& newparents, + ObjectTypeCalcer* o, const std::vector& newtqparents, const ObjectType* newtype ) : KigCommandTask(), d( new Private ) { d->o = o; - std::copy( newparents.begin(), newparents.end(), - std::back_inserter( d->newparents ) ); + std::copy( newtqparents.begin(), newtqparents.end(), + std::back_inserter( d->newtqparents ) ); d->newtype = newtype; } @@ -300,24 +300,24 @@ void ChangeParentsAndTypeTask::execute( KigPart& doc ) d->o->setType( d->newtype ); d->newtype = oldtype; - std::vector oldparentso = d->o->parents(); - std::vector oldparents( - oldparentso.begin(), oldparentso.end() ); - std::vector newparents; - for ( std::vector::iterator i = d->newparents.begin(); - i != d->newparents.end(); ++i ) - newparents.push_back( i->get() ); - d->o->setParents( newparents ); - d->newparents = oldparents; - - for ( std::vector::iterator i = newparents.begin(); i != newparents.end(); ++i ) + std::vector oldtqparentso = d->o->tqparents(); + std::vector oldtqparents( + oldtqparentso.begin(), oldtqparentso.end() ); + std::vector newtqparents; + for ( std::vector::iterator i = d->newtqparents.begin(); + i != d->newtqparents.end(); ++i ) + newtqparents.push_back( i->get() ); + d->o->setParents( newtqparents ); + d->newtqparents = oldtqparents; + + for ( std::vector::iterator i = newtqparents.begin(); i != newtqparents.end(); ++i ) ( *i )->calc( doc.document() ); d->o->calc( doc.document() ); - std::set allchildren = getAllChildren( d->o ); - std::vector allchildrenvect( allchildren.begin(), allchildren.end() ); - allchildrenvect = calcPath( allchildrenvect ); - for ( std::vector::iterator i = allchildrenvect.begin(); - i != allchildrenvect.end(); ++i ) + std::set alltqchildren = getAllChildren( d->o ); + std::vector alltqchildrenvect( alltqchildren.begin(), alltqchildren.end() ); + alltqchildrenvect = calcPath( alltqchildrenvect ); + for ( std::vector::iterator i = alltqchildrenvect.begin(); + i != alltqchildrenvect.end(); ++i ) ( *i )->calc( doc.document() ); } diff --git a/kig/kig/kig_commands.h b/kig/kig/kig_commands.h index 0dd7c93a..e9df77c1 100644 --- a/kig/kig/kig_commands.h +++ b/kig/kig/kig_commands.h @@ -44,6 +44,7 @@ class KigCommand : public TQObject, public KNamedCommand { Q_OBJECT + TQ_OBJECT class Private; Private* d; public: @@ -58,7 +59,7 @@ public: static KigCommand* addCommand( KigPart& doc, ObjectHolder* os ); /** * make sure that when you delete something, you are also deleting - * its parents. This class assumes you've done that. + * its tqparents. This class assumes you've done that. * \ref KigDocument::delObjects() takes care of this for you. */ static KigCommand* removeCommand( KigPart& doc, const std::vector& os ); @@ -123,7 +124,7 @@ protected: * this class monitors a set of DataObjects for changes and returns an * appropriate ChangeObjectImpsCommand if necessary.. * E.g. MovingMode wants to move certain objects, so it monitors all - * the parents of the explicitly moving objects: + * the tqparents of the explicitly moving objects: * \code * MonitorDataObjects mon( getAllParents( emo ) ); * \endcode @@ -180,7 +181,7 @@ class ChangeParentsAndTypeTask class Private; Private* d; public: - ChangeParentsAndTypeTask( ObjectTypeCalcer* o, const std::vector& newparents, + ChangeParentsAndTypeTask( ObjectTypeCalcer* o, const std::vector& newtqparents, const ObjectType* newtype ); ~ChangeParentsAndTypeTask(); diff --git a/kig/kig/kig_document.cc b/kig/kig/kig_document.cc index 884b41c5..04f1e7fa 100644 --- a/kig/kig/kig_document.cc +++ b/kig/kig/kig_document.cc @@ -69,7 +69,7 @@ std::vector KigDocument::whatAmIOn( const Coordinate& p, const Ki for ( std::set::const_iterator i = mobjects.begin(); i != mobjects.end(); ++i ) { - if(!(*i)->contains(p, w, mnightvision)) continue; + if(!(*i)->tqcontains(p, w, mnightvision)) continue; if ( (*i)->imp()->inherits( PointImp::stype() ) ) ret.push_back( *i ); else if ( !(*i)->imp()->inherits( PolygonImp::stype() ) ) curves.push_back( *i ); diff --git a/kig/kig/kig_part.cpp b/kig/kig/kig_part.cpp index 1f891bb9..137d0096 100644 --- a/kig/kig/kig_part.cpp +++ b/kig/kig/kig_part.cpp @@ -67,9 +67,7 @@ #include #include #include -#if QT_VERSION >= 0x030100 #include -#endif using namespace std; @@ -89,13 +87,13 @@ class SetCoordinateSystemAction { KigPart& md; public: - SetCoordinateSystemAction( KigPart& d, KActionCollection* parent ); + SetCoordinateSystemAction( KigPart& d, KActionCollection* tqparent ); void slotActivated( int index ); }; SetCoordinateSystemAction::SetCoordinateSystemAction( - KigPart& d, KActionCollection* parent ) - : KSelectAction( i18n( "&Set Coordinate System" ), 0, parent, "settings_set_coordinate_system" ), + KigPart& d, KActionCollection* tqparent ) + : KSelectAction( i18n( "&Set Coordinate System" ), 0, tqparent, "settings_set_coordinate_system" ), md( d ) { setItems( CoordinateSystemFactory::names() ); @@ -114,7 +112,7 @@ class KigPrintDialogPage : public KPrintDialogPage { public: - KigPrintDialogPage( TQWidget* parent = 0, const char* name = 0 ); + KigPrintDialogPage( TQWidget* tqparent = 0, const char* name = 0 ); ~KigPrintDialogPage(); void getOptions( TQMap& opts, bool ); @@ -126,8 +124,8 @@ private: TQCheckBox *showaxes; }; -KigPrintDialogPage::KigPrintDialogPage( TQWidget* parent, const char* name ) - : KPrintDialogPage( parent, name ) +KigPrintDialogPage::KigPrintDialogPage( TQWidget* tqparent, const char* name ) + : KPrintDialogPage( tqparent, name ) { setTitle( i18n( "Kig Options" ) ); @@ -167,10 +165,10 @@ bool KigPrintDialogPage::isValid( TQString& ) return true; } -KigPart::KigPart( TQWidget *parentWidget, const char *, - TQObject *parent, const char *name, +KigPart::KigPart( TQWidget *tqparentWidget, const char *, + TQObject *tqparent, const char *name, const TQStringList& ) - : KParts::ReadWritePart( parent, name ), + : KParts::ReadWritePart( tqparent, name ), mMode( 0 ), mdocument( new KigDocument() ) { // we need an instance @@ -179,7 +177,7 @@ KigPart::KigPart( TQWidget *parentWidget, const char *, mMode = new NormalMode( *this ); // we need a widget, to actually show the document - m_widget = new KigView(this, false, parentWidget, "kig_view"); + m_widget = new KigView(this, false, tqparentWidget, "kig_view"); // notify the part that this is our internal widget setWidget( m_widget ); @@ -260,17 +258,17 @@ void KigPart::setupActions() KigExportManager::instance()->addMenuAction( this, m_widget->realWidget(), actionCollection() ); - KAction* a = KStdAction::zoomIn( m_widget, TQT_SLOT( slotZoomIn() ), + KAction* a = KStdAction::zoomIn( TQT_TQOBJECT(m_widget), TQT_SLOT( slotZoomIn() ), actionCollection() ); a->setToolTip( i18n( "Zoom in on the document" ) ); a->setWhatsThis( i18n( "Zoom in on the document" ) ); - a = KStdAction::zoomOut( m_widget, TQT_SLOT( slotZoomOut() ), + a = KStdAction::zoomOut( TQT_TQOBJECT(m_widget), TQT_SLOT( slotZoomOut() ), actionCollection() ); a->setToolTip( i18n( "Zoom out of the document" ) ); a->setWhatsThis( i18n( "Zoom out of the document" ) ); - a = KStdAction::fitToPage( m_widget, TQT_SLOT( slotRecenterScreen() ), + a = KStdAction::fitToPage( TQT_TQOBJECT(m_widget), TQT_SLOT( slotRecenterScreen() ), actionCollection() ); // grr.. why isn't there an icon for this.. a->setIconSet( TQIconSet( l->loadIcon( "view_fit_to_page", KIcon::Toolbar ) ) ); @@ -283,7 +281,7 @@ void KigPart::setupActions() #endif #endif #ifdef KIG_PART_CPP_STD_FULLSCREEN_ACTION - a = KStdAction::fullScreen( m_widget, TQT_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->parent()),"fullscreen" ); + a = KStdAction::fullScreen( TQT_TQOBJECT(m_widget), TQT_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->tqparent()),"fullscreen" ); #else tmp = l->loadIcon( "window_fullscreen", KIcon::Toolbar ); a = new KAction( @@ -296,13 +294,13 @@ void KigPart::setupActions() // TODO: an icon for this.. a = new KAction( - i18n( "&Select Shown Area" ), "viewmagfit", 0, m_widget, TQT_SLOT( zoomRect() ), + i18n( "&Select Shown Area" ), "viewmagfit", 0, TQT_TQOBJECT(m_widget), TQT_SLOT( zoomRect() ), actionCollection(), "view_select_shown_rect" ); a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) ); a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) ); a = new KAction( - i18n( "S&elect Zoom Area" ), "viewmag", 0, m_widget, TQT_SLOT( zoomArea() ), + i18n( "S&elect Zoom Area" ), "viewmag", 0, TQT_TQOBJECT(m_widget), TQT_SLOT( zoomArea() ), actionCollection(), "view_zoom_area" ); // a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) ); // a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) ); @@ -371,7 +369,7 @@ bool KigPart::openFile() { KMessageBox::sorry( widget(), i18n( "The file \"%1\" you tried to open does not exist. " - "Please verify that you entered the correct path." ).arg( m_file ), + "Please verify that you entered the correct path." ).tqarg( m_file ), i18n( "File Not Found" ) ); return false; }; @@ -380,7 +378,7 @@ bool KigPart::openFile() // findByURL... KMimeType::Ptr mimeType = KMimeType::findByPath ( m_file ); kdDebug() << k_funcinfo << "mimetype: " << mimeType->name() << endl; - KigFilter* filter = KigFilters::instance()->find( mimeType->name() ); + KigFilter* filter = KigFilters::instance()->tqfind( mimeType->name() ); if ( !filter ) { // we don't support this mime type... @@ -392,7 +390,7 @@ bool KigPart::openFile() "question would be worth implementing support for, you can " "always ask us nicely on mailto:toscano.pino@tiscali.it " "or do the work yourself and send me a patch." - ).arg(mimeType->name()), + ).tqarg(mimeType->name()), i18n( "Format Not Supported" ) ); return false; @@ -468,7 +466,7 @@ void KigPart::_addObject( ObjectHolder* o ) void KigPart::delObject( ObjectHolder* o ) { - // we delete all children and their children etc. too... + // we delete all tqchildren and their tqchildren etc. too... std::vector os; os.push_back( o ); delObjects( os ); @@ -621,7 +619,7 @@ bool KigPart::internalSaveAs() { int ret = KMessageBox::warningContinueCancel( m_widget, i18n( "The file \"%1\" already exists. Do you wish to overwrite it?" ) - .arg( file_name ), i18n( "Overwrite File?" ), i18n("Overwrite") ); + .tqarg( file_name ), i18n( "Overwrite File?" ), i18n("Overwrite") ); if ( ret != KMessageBox::Continue ) { return false; @@ -637,11 +635,7 @@ void KigPart::runMode( KigMode* m ) setMode( m ); -#if QT_VERSION >= 0x030100 (void) kapp->eventLoop()->enterLoop(); -#else - (void) kapp->enter_loop(); -#endif setMode( prev ); redrawScreen(); @@ -652,11 +646,7 @@ void KigPart::doneMode( KigMode* d ) assert( d == mMode ); // pretend to use this var.. (void)d; -#if QT_VERSION >= 0x030100 kapp->eventLoop()->exitLoop(); -#else - kapp->exit_loop(); -#endif } void KigPart::actionRemoved( GUIAction* a, GUIUpdateToken& t ) @@ -932,7 +922,7 @@ extern "C" int convertToNative( const KURL& url, const TQCString& outfile ) KMimeType::Ptr mimeType = KMimeType::findByPath ( file ); kdDebug() << k_funcinfo << "mimetype: " << mimeType->name() << endl; - KigFilter* filter = KigFilters::instance()->find( mimeType->name() ); + KigFilter* filter = KigFilters::instance()->tqfind( mimeType->name() ); if ( !filter ) { kdError() << "The file \"" << file << "\" is of a filetype not currently supported by Kig." << endl; @@ -952,7 +942,7 @@ extern "C" int convertToNative( const KURL& url, const TQCString& outfile ) for ( std::vector::iterator i = tmp.begin(); i != tmp.end(); ++i ) ( *i )->calc( *doc ); - TQString out = ( outfile == "-" ) ? TQString::null : outfile; + TQString out = ( outfile == "-" ) ? TQString() : outfile; bool success = KigFilters::instance()->save( *doc, out ); if ( !success ) { diff --git a/kig/kig/kig_part.h b/kig/kig/kig_part.h index 3245f38b..187f559e 100644 --- a/kig/kig/kig_part.h +++ b/kig/kig/kig_part.h @@ -61,12 +61,13 @@ class ScreenInfo; class KigPart : public KParts::ReadWritePart { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - KigPart( TQWidget* parentWidget, const char* widgetName, - TQObject* parent = 0, const char* name = 0, + KigPart( TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent = 0, const char* name = 0, const TQStringList& = TQStringList() ); diff --git a/kig/kig/kig_view.cpp b/kig/kig/kig_view.cpp index fbf16517..9eda893b 100644 --- a/kig/kig/kig_view.cpp +++ b/kig/kig/kig_view.cpp @@ -55,10 +55,10 @@ kdbgstream& operator<< ( kdbgstream& s, const TQPoint& t ) KigWidget::KigWidget( KigPart* part, KigView* view, - TQWidget* parent, + TQWidget* tqparent, const char* name, bool fullscreen ) - : TQWidget( parent, name, + : TQWidget( tqparent, name, fullscreen ? WStyle_Customize | WStyle_NoBorder : 0 ), mpart( part ), mview( view ), @@ -69,8 +69,8 @@ KigWidget::KigWidget( KigPart* part, { part->addWidget(this); - setFocusPolicy(ClickFocus); - setBackgroundMode( Qt::NoBackground ); + setFocusPolicy(TQ_ClickFocus); + setBackgroundMode( TQt::NoBackground ); setMouseTracking(true); curPix.resize( size() ); @@ -123,7 +123,7 @@ void KigWidget::updateWidget( const std::vector& overlay ) #undef SHOW_OVERLAY_RECTS #ifdef SHOW_OVERLAY_RECTS TQPainter debug (this, this); - debug.setPen(Qt::yellow); + debug.setPen(TQt::yellow); #endif // SHOW_OVERLAY_RECTS // we undo our old changes... for ( std::vector::const_iterator i = oldOverlay.begin(); i != oldOverlay.end(); ++i ) @@ -193,7 +193,7 @@ void KigWidget::recenterScreen() Rect KigWidget::matchScreenShape( const Rect& r ) const { - return r.matchShape( Rect::fromQRect( rect() ) ); + return r.matchShape( Rect::fromTQRect( rect() ) ); } void KigWidget::slotZoomIn() @@ -231,7 +231,7 @@ void KigWidget::slotZoomOut() void KigWidget::clearStillPix() { - stillPix.fill(Qt::white); + stillPix.fill(TQt::white); oldOverlay.clear(); oldOverlay.push_back ( TQRect( TQPoint(0,0), size() ) ); } @@ -245,7 +245,7 @@ void KigWidget::redrawScreen( const std::vector& selection, bool // update the screen... clearStillPix(); - KigPainter p( msi, &stillPix, mpart->document() ); + KigPainter p( msi, TQT_TQPAINTDEVICE(&stillPix), mpart->document() ); p.drawGrid( mpart->document().coordinateSystem(), mpart->document().grid(), mpart->document().axes() ); p.drawObjects( selection, true ); @@ -287,34 +287,34 @@ void KigWidget::updateScrollBars() KigView::KigView( KigPart* part, bool fullscreen, - TQWidget* parent, + TQWidget* tqparent, const char* name ) - : TQWidget( parent, name ), - mlayout( 0 ), mrightscroll( 0 ), mbottomscroll( 0 ), + : TQWidget( tqparent, name ), + mtqlayout( 0 ), mrightscroll( 0 ), mbottomscroll( 0 ), mupdatingscrollbars( false ), mrealwidget( 0 ), mpart( part ) { connect( part, TQT_SIGNAL( recenterScreen() ), this, TQT_SLOT( slotInternalRecenterScreen() ) ); - mlayout = new TQGridLayout( this, 2, 2 ); - mrightscroll = new TQScrollBar( Vertical, this, "Right Scrollbar" ); + mtqlayout = new TQGridLayout( this, 2, 2 ); + mrightscroll = new TQScrollBar(Qt::Vertical, this, "Right Scrollbar" ); // TODO: make this configurable... mrightscroll->setTracking( true ); connect( mrightscroll, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotRightScrollValueChanged( int ) ) ); connect( mrightscroll, TQT_SIGNAL( sliderReleased() ), this, TQT_SLOT( updateScrollBars() ) ); - mbottomscroll = new TQScrollBar( Horizontal, this, "Bottom Scrollbar" ); + mbottomscroll = new TQScrollBar(Qt::Horizontal, this, "Bottom Scrollbar" ); connect( mbottomscroll, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotBottomScrollValueChanged( int ) ) ); connect( mbottomscroll, TQT_SIGNAL( sliderReleased() ), this, TQT_SLOT( updateScrollBars() ) ); mrealwidget = new KigWidget( part, this, this, "Kig Widget", fullscreen ); - mlayout->addWidget( mbottomscroll, 1, 0 ); - mlayout->addWidget( mrealwidget, 0, 0 ); - mlayout->addWidget( mrightscroll, 0, 1 ); + mtqlayout->addWidget( mbottomscroll, 1, 0 ); + mtqlayout->addWidget( mrealwidget, 0, 0 ); + mtqlayout->addWidget( mrightscroll, 0, 1 ); - resize( sizeHint() ); + resize( tqsizeHint() ); mrealwidget->recenterScreen(); part->redrawScreen( mrealwidget ); updateScrollBars(); @@ -336,7 +336,7 @@ void KigView::updateScrollBars() Rect er = mrealwidget->entireDocumentRect(); Rect sr = mrealwidget->screenInfo().shownRect(); - // we define the total rect to be the smallest rect that contains + // we define the total rect to be the smallest rect that tqcontains // both er and sr... er |= sr; @@ -360,7 +360,7 @@ void KigView::updateScrollBars() mrightscroll->setLineStep( (int)( sr.height() / pw / 10 ) ); mrightscroll->setPageStep( (int)( sr.height() / pw / 1.2 ) ); - // note that since Qt has a coordinate system with the lowest y + // note that since TQt has a coordinate system with the lowest y // values at the top, and we have it the other way around ( i know i // shouldn't have done this.. :( ), we invert the value that the // scrollbar shows. This is inverted again in @@ -443,7 +443,7 @@ const KigDocument& KigWidget::document() const return mpart->document(); } -TQSize KigWidget::sizeHint() const +TQSize KigWidget::tqsizeHint() const { return TQSize( 630, 450 ); } @@ -508,9 +508,9 @@ void KigView::toggleFullScreen() { mrealwidget->setFullScreen( ! mrealwidget->isFullScreen() ); if ( mrealwidget->isFullScreen() ) - topLevelWidget()->showFullScreen(); + tqtopLevelWidget()->showFullScreen(); else - topLevelWidget()->showNormal(); + tqtopLevelWidget()->showNormal(); } void KigWidget::setFullScreen( bool f ) @@ -545,7 +545,7 @@ void KigView::zoomRect() void KigWidget::setShowingRect( const Rect& r ) { - msi.setShownRect( r.matchShape( Rect::fromQRect( rect() ) ) ); + msi.setShownRect( r.matchShape( Rect::fromTQRect( rect() ) ) ); } void KigView::slotRecenterScreen() @@ -568,7 +568,7 @@ void KigWidget::zoomArea() KigInputDialog::getTwoCoordinates( i18n( "Select Zoom Area" ), i18n( "Select the zoom area by entering the coordinates of " "the upper left corner and the lower right corner." ) + - TQString::fromLatin1("
") + + TQString::tqfromLatin1("
") + mpart->document().coordinateSystem().coordinateFormatNoticeMarkup(), this, &ok, mpart->document(), &tl, &br ); if ( ok ) diff --git a/kig/kig/kig_view.h b/kig/kig/kig_view.h index a60e3ee5..4c167d7a 100644 --- a/kig/kig/kig_view.h +++ b/kig/kig/kig_view.h @@ -41,15 +41,16 @@ class KigView; /** * This class is the real widget showing the document. The other is a - * wrapper, that has the scrollbars... I'm not using QScrollView + * wrapper, that has the scrollbars... I'm not using TQScrollView * cause i've been having problems with that, and it's easier to do * the work myself... * Internally, this is basically a dumb class, which is manipulated by * KigMode's. All events are forwarded to them. */ -class KigWidget : public QWidget +class KigWidget : public TQWidget { Q_OBJECT + TQ_OBJECT KigPart* mpart; KigView* mview; @@ -61,7 +62,7 @@ class KigWidget : public QWidget void paintEvent( TQPaintEvent* e ); void wheelEvent( TQWheelEvent* e ); void resizeEvent( TQResizeEvent* ); - TQSize sizeHint() const; + TQSize tqsizeHint() const; /** * this is called to match a rect's dimensions to the dimensions of @@ -104,7 +105,7 @@ public: */ KigWidget( KigPart* doc, KigView* view, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char* name = 0, bool fullscreen = false ); @@ -224,16 +225,17 @@ public: * most of its functionality to KigWidget... */ class KigView - : public QWidget + : public TQWidget { Q_OBJECT + TQ_OBJECT - TQGridLayout* mlayout; + TQGridLayout* mtqlayout; TQScrollBar* mrightscroll; TQScrollBar* mbottomscroll; /** - * apparently, TQScrollBar also emits its signals when you update it + * aptqparently, TQScrollBar also emits its signals when you update it * manually, so we ignore them while we're in \ref updateScrollBars()... */ bool mupdatingscrollbars; @@ -244,7 +246,7 @@ class KigView public: KigView( KigPart* part, bool fullscreen = false, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char* name = 0 ); ~KigView(); diff --git a/kig/misc/argsparser.cpp b/kig/misc/argsparser.cpp index c2387970..9d722752 100644 --- a/kig/misc/argsparser.cpp +++ b/kig/misc/argsparser.cpp @@ -152,15 +152,15 @@ ArgsParser ArgsParser::without( const ObjectImpType* type ) const return ArgsParser( ret ); } -ArgsParser::spec ArgsParser::findSpec( const ObjectImp* obj, const Args& parents ) const +ArgsParser::spec ArgsParser::findSpec( const ObjectImp* obj, const Args& tqparents ) const { spec ret; ret.type = 0; std::vector found( margs.size(), false ); - for ( Args::const_iterator o = parents.begin(); - o != parents.end(); ++o ) + for ( Args::const_iterator o = tqparents.begin(); + o != tqparents.end(); ++o ) { for ( uint i = 0; i < margs.size(); ++i ) { @@ -183,9 +183,9 @@ ArgsParser::spec ArgsParser::findSpec( const ObjectImp* obj, const Args& parents } const ObjectImpType* ArgsParser::impRequirement( - const ObjectImp* o, const Args& parents ) const + const ObjectImp* o, const Args& tqparents ) const { - spec s = findSpec( o, parents ); + spec s = findSpec( o, tqparents ); return s.type; } @@ -233,9 +233,9 @@ ArgsParser::~ArgsParser() { } -bool ArgsParser::isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const +bool ArgsParser::isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const { - spec s = findSpec( o, parents ); + spec s = findSpec( o, tqparents ); return s.onOrThrough; } diff --git a/kig/misc/argsparser.h b/kig/misc/argsparser.h index 001d9359..a3aff562 100644 --- a/kig/misc/argsparser.h +++ b/kig/misc/argsparser.h @@ -26,7 +26,7 @@ class ObjectImpType; /** * This class is meant to take care of checking the types of the - * parents to ObjectCalcer's, and to put them in the correct order. + * tqparents to ObjectCalcer's, and to put them in the correct order. * An ObjectType should construct an ArgsParser with a specification * of the arguments it wants. This specification is given as an array * of ArgsParser::spec structs. This struct contains a pointer to an @@ -117,7 +117,7 @@ private: */ std::vector margs; - spec findSpec( const ObjectImp* o, const Args& parents ) const; + spec findSpec( const ObjectImp* o, const Args& tqparents ) const; public: ArgsParser( const struct spec* args, int n ); ArgsParser( const std::vector& args ); @@ -137,7 +137,7 @@ public: int check( const std::vector& os ) const; /** * returns the usetext for the argument that o would be used for, - * if sel were used as parents.. + * if sel were used as tqparents.. * \p o should be in \p sel ... */ std::string usetext( const ObjectImp* o, const Args& sel ) const; @@ -155,16 +155,16 @@ public: /** * returns the minimal ObjectImp ID that \p o needs to inherit in order - * to be useful.. \p o should be part of \p parents . + * to be useful.. \p o should be part of \p tqparents . */ - const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const; + const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const; /** - * Supposing that \p parents would be given as parents, this function + * Supposing that \p tqparents would be given as tqparents, this function * returns whether the returned ObjectImp will be, by construction, * on \p o ( if \p o is a curve ), or through \p o ( if \p o is a point ). */ - bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const; + bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const; // Checks the args according to this args specification. If the // objects should never have occurred, then an assertion failure diff --git a/kig/misc/builtin_stuff.cc b/kig/misc/builtin_stuff.cc index e162e7ac..432721cf 100644 --- a/kig/misc/builtin_stuff.cc +++ b/kig/misc/builtin_stuff.cc @@ -59,14 +59,14 @@ void setupBuiltinStuff() I18N_NOOP( "A segment constructed from its start and end point" ), "segment" ); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_segment", Qt::Key_S ) ); + actions->add( new ConstructibleAction( c, "objects_new_segment", TQt::Key_S ) ); // line by two points.. c = new SimpleObjectTypeConstructor( LineABType::instance(), I18N_NOOP( "Line by Two Points" ), I18N_NOOP( "A line constructed through two points"), "line" ); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_linettp", Qt::Key_L ) ); + actions->add( new ConstructibleAction( c, "objects_new_linettp", TQt::Key_L ) ); // ray by two points.. c = new SimpleObjectTypeConstructor( @@ -74,7 +74,7 @@ void setupBuiltinStuff() I18N_NOOP( "A half-line by its start point, and another point somewhere on it." ), "ray" ); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_ray", Qt::Key_R ) ); + actions->add( new ConstructibleAction( c, "objects_new_ray", TQt::Key_R ) ); // perpendicular line c = new SimpleObjectTypeConstructor( @@ -98,7 +98,7 @@ void setupBuiltinStuff() I18N_NOOP( "A circle constructed by its center and a point that pertains to it" ), "circlebcp" ); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_circlebcp", Qt::Key_C ) ); + actions->add( new ConstructibleAction( c, "objects_new_circlebcp", TQt::Key_C ) ); c = new SimpleObjectTypeConstructor( CircleBTPType::instance(), I18N_NOOP( "Circle by Three Points" ), @@ -227,7 +227,7 @@ void setupBuiltinStuff() I18N_NOOP( "An angle defined by three points" ), "angle" ); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_angle", Qt::Key_A ) ); + actions->add( new ConstructibleAction( c, "objects_new_angle", TQt::Key_A ) ); c = new SimpleObjectTypeConstructor( EquilateralHyperbolaB4PType::instance(), @@ -260,7 +260,7 @@ void setupBuiltinStuff() "bisection" ); m.merge( mpotp ); m.merge( mpos ); - actions->add( new ConstructibleAction( &m, "objects_new_midpoint", Qt::Key_M ) ); + actions->add( new ConstructibleAction( &m, "objects_new_midpoint", TQt::Key_M ) ); }; c = new SimpleObjectTypeConstructor( @@ -269,7 +269,7 @@ void setupBuiltinStuff() I18N_NOOP( "Construct a vector from two given points." ), "vector" ); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_vector", Qt::Key_V ) ); + actions->add( new ConstructibleAction( c, "objects_new_vector", TQt::Key_V ) ); c = new SimpleObjectTypeConstructor( VectorSumType::instance(), @@ -509,7 +509,7 @@ void setupBuiltinStuff() ContainsTestType::instance(), I18N_NOOP( "Contains Test" ), I18N_NOOP( "Test whether a given curve contains a given point" ), - "testcontains" ); + "testtqcontains" ); ctors->add( c ); actions->add( new ConstructibleAction( c, "objects_new_containstest" ) ); @@ -562,12 +562,12 @@ void setupBuiltinStuff() // the generic intersection constructor.. c = new GenericIntersectionConstructor(); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_intersection", Qt::Key_I ) ); + actions->add( new ConstructibleAction( c, "objects_new_intersection", TQt::Key_I ) ); // the generic tangent constructor c = new TangentConstructor(); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_tangent", Qt::Key_T ) ); + actions->add( new ConstructibleAction( c, "objects_new_tangent", TQt::Key_T ) ); // the generic center of curvature constructor c = new CocConstructor(); diff --git a/kig/misc/calcpaths.cc b/kig/misc/calcpaths.cc index 1532715b..55787518 100644 --- a/kig/misc/calcpaths.cc +++ b/kig/misc/calcpaths.cc @@ -33,7 +33,7 @@ // I previously misunderstood the semantics of this function // and thought that the os vector had to be completed with all // the subtree generated by it. On the contrary, the os vector -// contains *all* the objects that we want, we only have to +// tqcontains *all* the objects that we want, we only have to // reorder them. Now it *should* work, however we postpone // activating this to a more proper moment @@ -75,7 +75,7 @@ void localdfs( ObjectCalcer* obj, std::vector& all) { visited.push_back( obj ); - const std::vector o = obj->children(); + const std::vector o = obj->tqchildren(); for ( std::vector::const_iterator i = o.begin(); i != o.end(); ++i ) { if ( std::find( visited.begin(), visited.end(), *i ) == visited.end() ) @@ -98,7 +98,7 @@ std::vector calcPath( const std::vector& os ) // the general idea here: // first we build a new Objects variable. For every object in os, - // we put all of its children at the end of it, and we do the same + // we put all of its tqchildren at the end of it, and we do the same // for the ones we add.. // "all" is the Objects var we're building... @@ -115,7 +115,7 @@ std::vector calcPath( const std::vector& os ) { for ( std::vector::const_iterator i = tmp.begin(); i != tmp.end(); ++i ) { - const std::vector o = (*i)->children(); + const std::vector o = (*i)->tqchildren(); std::copy( o.begin(), o.end(), std::back_inserter( all ) ); std::copy( o.begin(), o.end(), std::back_inserter( tmp2 ) ); }; @@ -124,7 +124,7 @@ std::vector calcPath( const std::vector& os ) }; // now we know that if all objects appear at least once after all of - // their parents. So, we take all, and of every object, we remove + // their tqparents. So, we take all, and of every object, we remove // every reference except the last one... std::vector ret; ret.reserve( os.size() ); @@ -148,7 +148,7 @@ bool addBranch( const std::vector& o, const ObjectCalcer* to, std if ( *i == to ) rb = true; else - if ( addBranch( (*i)->children(), to, ret ) ) + if ( addBranch( (*i)->tqchildren(), to, ret ) ) { rb = true; ret.push_back( *i ); @@ -163,7 +163,7 @@ std::vector calcPath( const std::vector& from, con for ( std::vector::const_iterator i = from.begin(); i != from.end(); ++i ) { - (void) addBranch( (*i)->children(), to, all ); + (void) addBranch( (*i)->tqchildren(), to, all ); }; std::vector ret; @@ -182,9 +182,9 @@ static void addNonCache( ObjectCalcer* o, std::vector& ret ) ret.push_back( o ); else { - std::vector parents = o->parents(); - for ( uint i = 0; i < parents.size(); ++i ) - addNonCache( parents[i], ret ); + std::vector tqparents = o->tqparents(); + for ( uint i = 0; i < tqparents.size(); ++i ) + addNonCache( tqparents[i], ret ); }; } @@ -193,16 +193,16 @@ static bool visit( const ObjectCalcer* o, const std::vector& from // this function returns true if the visited object depends on one // of the objects in from. If we encounter objects that are on the // side of the tree path ( they do not depend on from themselves, - // but their direct children do ), then we add them to ret. + // but their direct tqchildren do ), then we add them to ret. if ( std::find( from.begin(), from.end(), o ) != from.end() ) return true; - std::vector deps( o->parents().size(), false ); + std::vector deps( o->tqparents().size(), false ); bool somedepend = false; bool alldepend = true; - std::vector parents = o->parents(); - for ( uint i = 0; i < parents.size(); ++i ) + std::vector tqparents = o->tqparents(); + for ( uint i = 0; i < tqparents.size(); ++i ) { - bool v = visit( parents[i], from, ret ); + bool v = visit( tqparents[i], from, ret ); somedepend |= v; alldepend &= v; deps[i] = v; @@ -211,7 +211,7 @@ static bool visit( const ObjectCalcer* o, const std::vector& from { for ( uint i = 0; i < deps.size(); ++i ) if ( ! deps[i] ) - addNonCache( parents[i], ret ); + addNonCache( tqparents[i], ret ); }; return somedepend; @@ -234,8 +234,8 @@ std::vector getAllParents( const std::vector& objs std::set next; for ( std::set::const_iterator i = cur.begin(); i != cur.end(); ++i ) { - std::vector parents = (*i)->parents(); - next.insert( parents.begin(), parents.end() ); + std::vector tqparents = (*i)->tqparents(); + next.insert( tqparents.begin(), tqparents.end() ); }; ret.insert( next.begin(), next.end() ); @@ -253,16 +253,16 @@ std::vector getAllParents( ObjectCalcer* obj ) bool isChild( const ObjectCalcer* o, const std::vector& os ) { - std::vector parents = o->parents(); - std::set cur( parents.begin(), parents.end() ); + std::vector tqparents = o->tqparents(); + std::set cur( tqparents.begin(), tqparents.end() ); while ( ! cur.empty() ) { std::set next; for ( std::set::const_iterator i = cur.begin(); i != cur.end(); ++i ) { if ( std::find( os.begin(), os.end(), *i ) != os.end() ) return true; - std::vector parents = (*i)->parents(); - next.insert( parents.begin(), parents.end() ); + std::vector tqparents = (*i)->tqparents(); + next.insert( tqparents.begin(), tqparents.end() ); }; cur = next; }; @@ -289,8 +289,8 @@ std::set getAllChildren( const std::vector objs ) i != cur.end(); ++i ) { ret.insert( *i ); - std::vector children = (*i)->children(); - next.insert( children.begin(), children.end() ); + std::vector tqchildren = (*i)->tqchildren(); + next.insert( tqchildren.begin(), tqchildren.end() ); }; cur = next; }; diff --git a/kig/misc/calcpaths.h b/kig/misc/calcpaths.h index 620558a3..3abf19a6 100644 --- a/kig/misc/calcpaths.h +++ b/kig/misc/calcpaths.h @@ -23,14 +23,14 @@ /** * This function sorts \p os such that they're in the right order for * calc()-ing. This means that child objects must appear after their - * parents ( for you graph people, this is just a topological sort.. ) + * tqparents ( for you graph people, this is just a topological sort.. ) */ std::vector calcPath( const std::vector& os ); /** * This is a different function for more or less the same purpose. It * takes a few Objects, which are considered to have been calced - * already. Then, it puts the necessary part of their children in the + * already. Then, it puts the necessary part of their tqchildren in the * right order, so that calc()-ing correctly updates all of their data * ( they're calc'ed in the right order, i mean... ). The objects in * from are normally not included in the output, unless they appear @@ -42,7 +42,7 @@ std::vector calcPath( const std::vector& from, con * This function returns all objects on the side of the path through * the dependency tree from from down to to. This means that we look * for any objects that don't depend on any of the objects in from - * themselves, but of which one of the direct children does. We need + * themselves, but of which one of the direct tqchildren does. We need * this function for Locus stuff... */ std::vector sideOfTreePath( const std::vector& from, const ObjectCalcer* to ); diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp index b41b9284..83fdd077 100644 --- a/kig/misc/common.cpp +++ b/kig/misc/common.cpp @@ -347,7 +347,7 @@ Coordinate calcCircleRadicalStartPoint( const Coordinate& ca, const Coordinate& } double getDoubleFromUser( const TQString& caption, const TQString& label, double value, - TQWidget* parent, bool* ok, double min, double max, int decimals ) + TQWidget* tqparent, bool* ok, double min, double max, int decimals ) { #ifdef KIG_USE_KDOUBLEVALIDATOR KDoubleValidator vtor( min, max, decimals, 0, 0 ); @@ -357,12 +357,12 @@ double getDoubleFromUser( const TQString& caption, const TQString& label, double #if KDE_IS_VERSION( 3, 1, 90 ) TQString input = KInputDialog::getText( caption, label, KGlobal::locale()->formatNumber( value, decimals ), - ok, parent, "getDoubleFromUserDialog", &vtor ); + ok, tqparent, "getDoubleFromUserDialog", &vtor ); #else TQString input = KLineEditDlg::getText( caption, label, KGlobal::locale()->formatNumber( value, decimals ), - ok, parent, &vtor ); + ok, tqparent, &vtor ); #endif bool myok = true; @@ -422,7 +422,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, // if ( fabs( a.x - b.x ) <= 1e-7 ) // { // // too small to be useful.. -// return r.contains( Coordinate( a.x, r.center().y ), miss ); +// return r.tqcontains( Coordinate( a.x, r.center().y ), miss ); // } // in case we have a segment we need also to check for the case when @@ -433,7 +433,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, // - if the midpoint is in the rect than returning true is safe (also // in the cases where we have a ray or a line) - if ( r.contains( 0.5*( a + b ), miss ) ) return true; + if ( r.tqcontains( 0.5*( a + b ), miss ) ) return true; Coordinate dir = b - a; double m = dir.y / dir.x; @@ -455,10 +455,10 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, // intersection is not between the begin and end point.. ) and if // the rect contains the intersection.. If it does, we have a winner.. return - ( imp->contains( leftint, width, w ) && r.contains( leftint, miss ) ) || - ( imp->contains( rightint, width, w ) && r.contains( rightint, miss ) ) || - ( imp->contains( bottomint, width, w ) && r.contains( bottomint, miss ) ) || - ( imp->contains( topint, width, w ) && r.contains( topint, miss ) ); + ( imp->tqcontains( leftint, width, w ) && r.tqcontains( leftint, miss ) ) || + ( imp->tqcontains( rightint, width, w ) && r.tqcontains( rightint, miss ) ) || + ( imp->tqcontains( bottomint, width, w ) && r.tqcontains( bottomint, miss ) ) || + ( imp->tqcontains( topint, width, w ) && r.tqcontains( topint, miss ) ); } bool operator==( const LineData& l, const LineData& r ) diff --git a/kig/misc/common.h b/kig/misc/common.h index d1969df3..d4f388fb 100644 --- a/kig/misc/common.h +++ b/kig/misc/common.h @@ -52,7 +52,7 @@ extern const double double_inf; */ double getDoubleFromUser( const TQString& caption, const TQString& label, double value, - TQWidget* parent, bool* ok, double min, double max, int decimals ); + TQWidget* tqparent, bool* ok, double min, double max, int decimals ); /** * Simple class representing a line. Used by various functions in Kig. diff --git a/kig/misc/coordinate.cpp b/kig/misc/coordinate.cpp index f2c272f2..86cf8eab 100644 --- a/kig/misc/coordinate.cpp +++ b/kig/misc/coordinate.cpp @@ -25,7 +25,7 @@ using namespace std; -Coordinate Coordinate::fromQPoint( const TQPoint& p ) +Coordinate Coordinate::fromTQPoint( const TQPoint& p ) { return Coordinate( p.x(), p.y() ); } @@ -159,10 +159,10 @@ const Coordinate Coordinate::normalize( double l ) const const Coordinate Coordinate::round() const { - return Coordinate( qRound( x ), qRound( y ) ); + return Coordinate( tqRound( x ), tqRound( y ) ); } -TQPoint Coordinate::toQPoint() const +TQPoint Coordinate::toTQPoint() const { Coordinate t = round(); return TQPoint( (int) t.x, (int) t.y ); diff --git a/kig/misc/coordinate.h b/kig/misc/coordinate.h index 8e19eb5e..745d64a7 100644 --- a/kig/misc/coordinate.h +++ b/kig/misc/coordinate.h @@ -33,7 +33,7 @@ class kdbgstream; class Coordinate { public: - static Coordinate fromQPoint( const TQPoint& p ); + static Coordinate fromTQPoint( const TQPoint& p ); /** Constructor. Construct a new Coordinate, with a given x and y * value. @@ -102,7 +102,7 @@ public: * x/y ratio untouched... */ const Coordinate normalize( double length = 1 ) const; - TQPoint toQPoint() const; + TQPoint toTQPoint() const; Coordinate& operator= ( const Coordinate& c ); /** Add. Add c to this Coordinate diff --git a/kig/misc/coordinate_system.cpp b/kig/misc/coordinate_system.cpp index 859ed81d..deefe954 100644 --- a/kig/misc/coordinate_system.cpp +++ b/kig/misc/coordinate_system.cpp @@ -40,7 +40,7 @@ #include class CoordinateValidator - : public QValidator + : public TQValidator { bool mpolar; #ifdef KIG_USE_KDOUBLEVALIDATOR @@ -80,7 +80,7 @@ TQValidator::State CoordinateValidator::validate( TQString & input, int & pos ) if( tinput[tinput.length() - 1 ] == ' ' ) tinput.truncate( tinput.length() - 1 ); if ( tinput[0] == '(' ) tinput = tinput.mid( 1 ); if( tinput[0] == ' ' ) tinput = tinput.mid( 1 ); - int scp = tinput.find( ';' ); + int scp = tinput.tqfind( ';' ); if ( scp == -1 ) return mdv.validate( tinput, pos ) == Invalid ? Invalid : Valid; else { @@ -101,34 +101,34 @@ TQValidator::State CoordinateValidator::validate( TQString & input, int & pos ) void CoordinateValidator::fixup( TQString & input ) const { - int nsc = input.contains( ';' ); + int nsc = input.tqcontains( ';' ); if ( nsc > 1 ) { // where is the second ';' - int i = input.find( ';' ); - i = input.find( ';', i ); + int i = input.tqfind( ';' ); + i = input.tqfind( ';', i ); input = input.left( i ); }; // now the string has at most one semicolon left.. - int sc = input.find( ';' ); + int sc = input.tqfind( ';' ); if ( sc == -1 ) { sc = input.length(); KLocale* l = KGlobal::locale(); if ( mpolar ) - input.append( TQString::fromLatin1( ";" ) + l->positiveSign() + - TQString::fromLatin1( "0°" ) ); + input.append( TQString::tqfromLatin1( ";" ) + l->positiveSign() + + TQString::tqfromLatin1( "0°" ) ); else - input.append( TQString::fromLatin1( ";" ) + l->positiveSign() + - TQString::fromLatin1( "0" ) + l->decimalSymbol() + - TQString::fromLatin1( "0" ) ); + input.append( TQString::tqfromLatin1( ";" ) + l->positiveSign() + + TQString::tqfromLatin1( "0" ) + l->decimalSymbol() + + TQString::tqfromLatin1( "0" ) ); }; mre.exactMatch( input ); TQString ds1 = mre.cap( 1 ); mdv.fixup( ds1 ); TQString ds2 = mre.cap( 2 ); mdv.fixup( ds2 ); - input = ds1 + TQString::fromLatin1( "; " ) + ds2; + input = ds1 + TQString::tqfromLatin1( "; " ) + ds2; } EuclideanCoords::EuclideanCoords() @@ -146,7 +146,7 @@ TQString EuclideanCoords::fromScreen( const Coordinate& p, const KigDocument& d int l = kigMax( 0, (int) ( 3 - log10( m ) ) ); TQString xs = KGlobal::locale()->formatNumber( p.x, l ); TQString ys = KGlobal::locale()->formatNumber( p.y, l ); - return TQString::fromLatin1( "( %1; %2 )" ).arg( xs ).arg( ys ); + return TQString::tqfromLatin1( "( %1; %2 )" ).tqarg( xs ).tqarg( ys ); } Coordinate EuclideanCoords::toScreen(const TQString& s, bool& ok) const @@ -255,7 +255,7 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co /****** the axes ******/ if ( showaxes ) { - p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); + p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) ); // x axis p.drawSegment( Coordinate( hmin, 0 ), Coordinate( hmax, 0 ) ); // y axis @@ -286,8 +286,8 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co ); }; // arrows on the ends of the axes... - p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); - p.setBrush( TQBrush( Qt::gray ) ); + p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) ); + p.setBrush( TQBrush( TQt::gray ) ); std::vector a; // the arrow on the right end of the X axis... @@ -354,7 +354,7 @@ TQString PolarCoords::fromScreen( const Coordinate& pt, const KigDocument& d ) c TQString rs = KGlobal::locale()->formatNumber( r, l ); TQString ts = KGlobal::locale()->formatNumber( theta, 0 ); - return TQString::fromLatin1("( %1; %2° )").arg( rs ).arg( ts ); + return TQString::tqfromLatin1("( %1; %2° )").tqarg( rs ).tqarg( ts ); } TQString PolarCoords::coordinateFormatNotice() const @@ -450,7 +450,7 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const /****** the axes ******/ if ( showaxes ) { - p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); + p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) ); // x axis p.drawSegment( Coordinate( hmin, 0 ), Coordinate( hmax, 0 ) ); // y axis @@ -482,8 +482,8 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const ); }; // arrows on the ends of the axes... - p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); - p.setBrush( TQBrush( Qt::gray ) ); + p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) ); + p.setBrush( TQBrush( TQt::gray ) ); std::vector a; // the arrow on the right end of the X axis... @@ -575,7 +575,7 @@ TQString CoordinateSystemFactory::setCoordinateSystemStatement( int id ) return i18n( "Set Polar Coordinate System" ); default: assert( false ); - return TQString::null; + return TQString(); } } @@ -608,15 +608,15 @@ Coordinate EuclideanCoords::snapToGrid( const Coordinate& c, const double hgraphmin = ceil( hmin / hd) * hd; const double vgraphmin = ceil( vmin / vd ) * vd; - const double nx = qRound( ( c.x - hgraphmin ) / hd ) * hd + hgraphmin; - const double ny = qRound( ( c.y - vgraphmin ) / vd ) * vd + vgraphmin; + const double nx = tqRound( ( c.x - hgraphmin ) / hd ) * hd + hgraphmin; + const double ny = tqRound( ( c.y - vgraphmin ) / vd ) * vd + vgraphmin; return Coordinate( nx, ny ); } Coordinate PolarCoords::snapToGrid( const Coordinate& c, const KigWidget& w ) const { - // we reuse the drawGrid code to find + // we reuse the drawGrid code to tqfind // we multiply by sqrt( 2 ) cause we don't want to miss circles in // the corners, that intersect with the axes outside of the @@ -643,7 +643,7 @@ Coordinate PolarCoords::snapToGrid( const Coordinate& c, double d = kigMin( hd, vd ); double dist = c.length(); - double ndist = qRound( dist / d ) * d; + double ndist = tqRound( dist / d ) * d; return c.normalize( ndist ); } diff --git a/kig/misc/coordinate_system.h b/kig/misc/coordinate_system.h index 44eaf6d6..f6c8cc7d 100644 --- a/kig/misc/coordinate_system.h +++ b/kig/misc/coordinate_system.h @@ -59,7 +59,7 @@ public: * KigWidget... ) */ class CoordinateSystem - : public Qt + : public TQt { public: CoordinateSystem(); diff --git a/kig/misc/cubic-common.cc b/kig/misc/cubic-common.cc index 029f1194..6bdf3aca 100644 --- a/kig/misc/cubic-common.cc +++ b/kig/misc/cubic-common.cc @@ -486,7 +486,7 @@ const CubicCartesianData calcCubicTransformation ( // assert (fabs(b[0][1][2] - b[1][2][0]) < 1e-8); // test a couple of cases // assert (fabs(b[0][1][1] - b[1][1][0]) < 1e-8); - // apparently, the above assertions are wrong ( due to rounding + // aptqparently, the above assertions are wrong ( due to rounding // errors, Maurizio and I hope :) ), so since the symmetry is not // present, we just take the sum of the parts of the matrix elements // that should be symmetric, instead of taking one of them, and diff --git a/kig/misc/guiaction.cc b/kig/misc/guiaction.cc index c9435d2b..d17501c2 100644 --- a/kig/misc/guiaction.cc +++ b/kig/misc/guiaction.cc @@ -81,19 +81,19 @@ void ConstructibleAction::act( KigPart& d ) KigGUIAction::KigGUIAction( GUIAction* act, KigPart& doc, - TQObject* parent ) + TQObject* tqparent ) : KAction( act->descriptiveName(), doc.instance()->iconLoader()->loadIcon( act->iconFileName(), KIcon::Toolbar, 0, KIcon::DefaultState, 0L, true ), act->shortcut(), 0, 0, // no slot connection - parent, act->actionName() ), + tqparent, act->actionName() ), mact( act ), mdoc( doc ) { setWhatsThis( act->description() ); TQString tooltip = act->descriptiveName(); - tooltip.replace( TQRegExp( "&&" ), "&" ); + tooltip.tqreplace( TQRegExp( "&&" ), "&" ); setToolTip( tooltip ); } @@ -136,7 +136,7 @@ const char* ConstructPointAction::actionName() const int ConstructPointAction::shortcut() const { - return Qt::Key_P; + return TQt::Key_P; } void ConstructPointAction::act( KigPart& d ) @@ -223,7 +223,7 @@ void AddFixedPointAction::act( KigPart& doc ) KigInputDialog::getCoordinate( i18n( "Fixed Point" ), i18n( "Enter the coordinates for the new point." ) + - TQString::fromLatin1( "
" ) + + TQString::tqfromLatin1( "
" ) + doc.document().coordinateSystem().coordinateFormatNoticeMarkup(), doc.widget(), &ok, doc.document(), &c ); if ( ! ok ) return; @@ -252,12 +252,12 @@ int ConstructibleAction::shortcut() const int ConstructTextLabelAction::shortcut() const { - return Qt::Key_B; + return TQt::Key_B; } int AddFixedPointAction::shortcut() const { - return Qt::Key_F; + return TQt::Key_F; } #if 0 @@ -272,7 +272,7 @@ TestAction::~TestAction() TQString TestAction::description() const { - return TQString::fromLatin1( "Test stuff !!!" ); + return TQString::tqfromLatin1( "Test stuff !!!" ); } TQCString TestAction::iconFileName() const @@ -282,7 +282,7 @@ TQCString TestAction::iconFileName() const TQString TestAction::descriptiveName() const { - return TQString::fromLatin1( "Test stuff !!!" ); + return TQString::tqfromLatin1( "Test stuff !!!" ); } const char* TestAction::actionName() const @@ -297,7 +297,7 @@ void TestAction::act( KigPart& doc ) Object* constantpoint = ObjectFactory::instance()->fixedPoint( Coordinate( -1, -1 ) ); constantpoint->calc( doc ); - Object* codeobject = new DataObject( new StringImp( TQString::fromLatin1( script ) ) ); + Object* codeobject = new DataObject( new StringImp( TQString::tqfromLatin1( script ) ) ); Object* compiledcode = new RealObject( PythonCompileType::instance(), Objects( codeobject ) ); compiledcode->calc( doc ); diff --git a/kig/misc/guiaction.h b/kig/misc/guiaction.h index e2e3de54..e9595605 100644 --- a/kig/misc/guiaction.h +++ b/kig/misc/guiaction.h @@ -35,12 +35,13 @@ class KigGUIAction : public KAction { Q_OBJECT + TQ_OBJECT GUIAction* mact; KigPart& mdoc; public: KigGUIAction( GUIAction* act, KigPart& doc, - TQObject* parent ); + TQObject* tqparent ); void slotActivated(); GUIAction* guiAction(); diff --git a/kig/misc/kigfiledialog.cc b/kig/misc/kigfiledialog.cc index 2d7ea08f..cdfe2196 100644 --- a/kig/misc/kigfiledialog.cc +++ b/kig/misc/kigfiledialog.cc @@ -25,8 +25,8 @@ #include KigFileDialog::KigFileDialog( const TQString& startDir, const TQString& filter, - const TQString& caption, TQWidget* parent ) - : KFileDialog( startDir, filter, parent, "kigfiledialog", true ), + const TQString& caption, TQWidget* tqparent ) + : KFileDialog( startDir, filter, tqparent, "kigfiledialog", true ), mow( 0L ) { setCaption( caption ); @@ -53,7 +53,7 @@ void KigFileDialog::accept() { int ret = KMessageBox::warningContinueCancel( this, i18n( "The file \"%1\" already exists. Do you wish to overwrite it?" ) - .arg( sFile ), i18n( "Overwrite File?" ), i18n("Overwrite") ); + .tqarg( sFile ), i18n( "Overwrite File?" ), i18n("Overwrite") ); if ( ret != KMessageBox::Continue ) { KFileDialog::reject(); diff --git a/kig/misc/kigfiledialog.h b/kig/misc/kigfiledialog.h index 8c243131..5fb65949 100644 --- a/kig/misc/kigfiledialog.h +++ b/kig/misc/kigfiledialog.h @@ -28,6 +28,7 @@ class KigFileDialog : public KFileDialog { Q_OBJECT + TQ_OBJECT private: /** @@ -45,17 +46,17 @@ public: * documentation of KFileDialog for more help about this * \param filter the filter for the file dialog * \param caption the caption of this file dialog - * \param parent the parent for this file dialog + * \param tqparent the tqparent for this file dialog */ KigFileDialog( const TQString& startDir, const TQString& filter, - const TQString& caption, TQWidget *parent ); + const TQString& caption, TQWidget *tqparent ); /** * Use this to set the widget containing the options of eg an export filter. * The option widget will be popped up in a dialog right after the user * presses OK and before the dialog is closed. * - * You can construct the option widget with no parent, as it will be + * You can construct the option widget with no tqparent, as it will be * reparented. * * \param w the option widget diff --git a/kig/misc/kiginputdialog.cc b/kig/misc/kiginputdialog.cc index ea0aeb66..de8f691d 100644 --- a/kig/misc/kiginputdialog.cc +++ b/kig/misc/kiginputdialog.cc @@ -65,8 +65,8 @@ KigInputDialogPrivate::KigInputDialogPrivate() } KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label, - TQWidget* parent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 ) - : KDialogBase( parent, "kigdialog", true, caption, Ok|Cancel, Cancel, true ), + TQWidget* tqparent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 ) + : KDialogBase( tqparent, "kigdialog", true, caption, Ok|Cancel, Cancel, true ), d( new KigInputDialogPrivate() ) { d->m_coord1 = c1 ? Coordinate( *c1 ) : Coordinate::invalidCoord(); @@ -84,8 +84,8 @@ KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label, d->m_textEdit = new KTextEdit( frame ); d->m_textEdit->setText( label ); d->m_textEdit->setReadOnly( true ); - d->m_textEdit->setFocusPolicy( NoFocus ); -// d->m_textEdit->setAlignment( d->m_textEdit->alignment() | Qt::WordBreak ); + d->m_textEdit->setFocusPolicy( TQ_NoFocus ); +// d->m_textEdit->tqsetAlignment( d->m_textEdit->tqalignment() | TQt::WordBreak ); d->m_textEdit->setFrameStyle( TQFrame::NoFrame ); mainlay->addWidget( d->m_textEdit ); @@ -121,8 +121,8 @@ KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label, enableButtonOK( ok ); } -KigInputDialog::KigInputDialog( TQWidget* parent, const Goniometry& g ) - : KDialogBase( parent, "kigdialog", true, i18n( "Set Angle Size" ), Ok|Cancel, Cancel, true ), +KigInputDialog::KigInputDialog( TQWidget* tqparent, const Goniometry& g ) + : KDialogBase( tqparent, "kigdialog", true, i18n( "Set Angle Size" ), Ok|Cancel, Cancel, true ), d( new KigInputDialogPrivate() ) { d->m_gonio = g; @@ -171,7 +171,7 @@ KigInputDialog::KigInputDialog( TQWidget* parent, const Goniometry& g ) void KigInputDialog::keyPressEvent( TQKeyEvent* e ) { - if ( ( e->key() == Qt::Key_Return ) && ( e->state() == 0 ) ) + if ( ( e->key() == TQt::Key_Return ) && ( e->state() == 0 ) ) { if ( actionButton( Ok )->isEnabled() ) { @@ -180,7 +180,7 @@ void KigInputDialog::keyPressEvent( TQKeyEvent* e ) return; } } - else if ( ( e->key() == Qt::Key_Escape ) && ( e->state() == 0 ) ) + else if ( ( e->key() == TQt::Key_Escape ) && ( e->state() == 0 ) ) { actionButton( Cancel )->animateClick(); e->accept(); @@ -247,16 +247,16 @@ Goniometry KigInputDialog::goniometry() const } void KigInputDialog::getCoordinate( const TQString& caption, const TQString& label, - TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue ) + TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue ) { - getTwoCoordinates( caption, label, parent, ok, doc, cvalue, 0 ); + getTwoCoordinates( caption, label, tqparent, ok, doc, cvalue, 0 ); } void KigInputDialog::getTwoCoordinates( const TQString& caption, const TQString& label, - TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue, + TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue, Coordinate* cvalue2 ) { - KigInputDialog dlg( caption, label, parent, doc, cvalue, cvalue2 ); + KigInputDialog dlg( caption, label, tqparent, doc, cvalue, cvalue2 ); *ok = ( dlg.exec() == Accepted ); @@ -273,9 +273,9 @@ void KigInputDialog::getTwoCoordinates( const TQString& caption, const TQString& } -Goniometry KigInputDialog::getAngle( TQWidget* parent, bool* ok, const Goniometry& g ) +Goniometry KigInputDialog::getAngle( TQWidget* tqparent, bool* ok, const Goniometry& g ) { - KigInputDialog dlg( parent, g ); + KigInputDialog dlg( tqparent, g ); *ok = ( dlg.exec() == Accepted ); diff --git a/kig/misc/kiginputdialog.h b/kig/misc/kiginputdialog.h index c7b29e73..60f2ba54 100644 --- a/kig/misc/kiginputdialog.h +++ b/kig/misc/kiginputdialog.h @@ -41,13 +41,14 @@ class KigInputDialog : KDialogBase { Q_OBJECT + TQ_OBJECT public: private: - KigInputDialog( const TQString& caption, const TQString& label, TQWidget* parent, + KigInputDialog( const TQString& caption, const TQString& label, TQWidget* tqparent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 ); - KigInputDialog( TQWidget* parent, const Goniometry& g ); + KigInputDialog( TQWidget* tqparent, const Goniometry& g ); virtual void keyPressEvent( TQKeyEvent* e ); @@ -69,7 +70,7 @@ public: * * \param caption caption of the dialog * \param label text of the label of the dialog - * \param parent parent of the dialog widget + * \param tqparent tqparent of the dialog widget * \param ok it will be set to true if the user pressed Ok after inserting a * well-formatted Coordinate * \param doc the actual Kig document @@ -79,14 +80,14 @@ public: * displayed as initial value of the correspondenting text edit */ static void getCoordinate( const TQString& caption, const TQString& label, - TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue ); + TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue ); /** * Static convenience function to get two Coordinates at once from the user. * * \param caption caption of the dialog * \param label text of the label of the dialog - * \param parent parent of the dialog widget + * \param tqparent tqparent of the dialog widget * \param ok it will be set to true if the user pressed Ok after inserting * well-formatted Coordinates * \param doc the actual Kig document @@ -102,14 +103,14 @@ public: * the text edit representing the second Coordinate. */ static void getTwoCoordinates( const TQString& caption, const TQString& label, - TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue, + TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue, Coordinate* cvalue2 ); /** * Static convenience function to get an angle incapsulated in a Goniometry * class. * - * \param parent parent of the dialog widget + * \param tqparent tqparent of the dialog widget * \param ok it will be set to true if the user pressed Ok after inserting a * well-formatted angle * \param g the Goniometry class containing the original angle we are going @@ -117,7 +118,7 @@ public: * * \return a Goniometry class containing the new angle */ - static Goniometry getAngle( TQWidget* parent, bool* ok, const Goniometry& g ); + static Goniometry getAngle( TQWidget* tqparent, bool* ok, const Goniometry& g ); }; #endif diff --git a/kig/misc/kigpainter.cpp b/kig/misc/kigpainter.cpp index 98594ecb..95be1837 100644 --- a/kig/misc/kigpainter.cpp +++ b/kig/misc/kigpainter.cpp @@ -42,18 +42,18 @@ KigPainter::KigPainter( const ScreenInfo& si, TQPaintDevice* device, const KigDocument& doc, bool no ) : mP ( device ), - color( Qt::blue ), + color( TQt::blue ), style( Qt::SolidLine ), pointstyle( 0 ), width( -1 ), brushStyle( Qt::NoBrush ), - brushColor( Qt::blue ), + brushColor( TQt::blue ), mdoc( doc ), msi( si ), mNeedOverlay( no ), overlayenlarge( 0 ) { - mP.setBackgroundColor( Qt::white ); + mP.setBackgroundColor( TQt::white ); } KigPainter::~KigPainter() @@ -136,7 +136,7 @@ void KigPainter::drawFatPoint( const Coordinate& p ) Rect r( tl, br ); TQRect qr = toScreen( r ); mP.drawRect( qr ); - mP.fillRect( qr, TQBrush( color, Qt::SolidPattern ) ); + mP.fillRect( qr, TQBrush( color, TQt::SolidPattern ) ); if( mNeedOverlay ) mOverlay.push_back( qr ); break; } @@ -196,7 +196,7 @@ void KigPainter::drawText( const Rect p, const TQString s, int textFlags, int le void KigPainter::textOverlay( const TQRect& r, const TQString s, int textFlags, int len ) { - // kdDebug() << Rect::fromQRect( mP.boundingRect( r, textFlags, s, len ) ) << endl; + // kdDebug() << Rect::fromTQRect( mP.boundingRect( r, textFlags, s, len ) ) << endl; TQRect newr( mP.boundingRect( r, textFlags, s, len ) ); newr.setWidth( newr.width() + 4 ); newr.setHeight( newr.height() + 4 ); @@ -218,7 +218,7 @@ void KigPainter::setColor( const TQColor& c ) mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); } -void KigPainter::setStyle( const PenStyle c ) +void KigPainter::setStyle( const Qt::PenStyle c ) { style = c; mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); @@ -251,7 +251,7 @@ void KigPainter::setBrush( const TQBrush& b ) mP.setBrush( b ); } -void KigPainter::setBrushStyle( const BrushStyle c ) +void KigPainter::setBrushStyle( const Qt::BrushStyle c ) { brushStyle = c; mP.setBrush( TQBrush( brushColor, brushStyle ) ); @@ -292,7 +292,7 @@ void KigPainter::drawPolygon( const std::vector& pts, TQBrush oldbrush = mP.brush(); setBrush( TQBrush( color, Dense4Pattern ) ); setPen( Qt::NoPen ); - // i know this isn't really fast, but i blame it all on Qt with its + // i know this isn't really fast, but i blame it all on TQt with its // stupid container classes... what's wrong with the STL ? TQPointArray t( pts.size() ); int c = 0; @@ -300,7 +300,7 @@ void KigPainter::drawPolygon( const std::vector& pts, { t.putPoints( c++, 1, i->x(), i->y() ); }; - mP.drawPolygon( t, winding, index, npoints ); + mP.tqdrawPolygon( t, winding, index, npoints ); setPen( oldpen ); setBrush( oldbrush ); if( mNeedOverlay ) mOverlay.push_back( t.boundingRect() ); @@ -499,9 +499,9 @@ void KigPainter::drawObjects( const std::vector& os, bool sel ) void KigPainter::drawFilledRect( const TQRect& r ) { - TQPen pen( Qt::black, 1, Qt::DotLine ); + TQPen pen( TQt::black, 1, TQt::DotLine ); setPen( pen ); - setBrush( TQBrush( Qt::cyan, Dense6Pattern ) ); + setBrush( TQBrush( TQt::cyan, Dense6Pattern ) ); drawRect( r.normalize() ); } @@ -511,7 +511,7 @@ void KigPainter::drawTextStd( const TQPoint& p, const TQString& s ) // tf = text formatting flags int tf = AlignLeft | AlignTop | DontClip | WordBreak; // we need the rect where we're going to paint text - setPen(TQPen(Qt::blue, 1, SolidLine)); + setPen(TQPen(TQt::blue, 1, SolidLine)); setBrush(Qt::NoBrush); drawText( Rect( msi.fromScreen(p), window().bottomRight() @@ -645,7 +645,7 @@ void KigPainter::drawAngle( const Coordinate& cpoint, const double dstartangle, setBrushStyle( Qt::SolidPattern ); // drawPolygon( arrow ); - mP.drawPolygon( arrow, false, 0, -1 ); + mP.tqdrawPolygon( arrow, false, 0, -1 ); // if ( mNeedOverlay ) mOverlay.push_back( toScreen( r ) ); setWholeWinOverlay(); //mp: ugly! why not compute a correct overlay? @@ -679,7 +679,7 @@ void KigPainter::drawVector( const Coordinate& a, const Coordinate& b ) Coordinate c = b - dir + perp; Coordinate d = b - dir - perp; // draw the arrow lines with a normal style - mP.setPen( TQPen( color, width == -1 ? 1 : width, Qt::SolidLine ) ); + mP.setPen( TQPen( color, width == -1 ? 1 : width, TQt::SolidLine ) ); drawSegment( b, c ); drawSegment( b, d ); // setting again the original style @@ -835,7 +835,7 @@ void KigPainter::drawCurve( const CurveImp* curve ) bool dooverlay = ! overlaypt && h < hmaxoverlay && valid0 && valid1 && fabs( p0.x - p1.x ) <= overlayRectSize() && fabs( p0.y - p1.y ) <= overlayRectSize(); - bool addn = sr.contains( p2 ) || h >= hmax; + bool addn = sr.tqcontains( p2 ) || h >= hmax; // estimated error between the curve and the segments double errsq = 1e21; if ( allvalid ) errsq = (0.5*p0 + 0.5*p1 - p2).squareLength(); @@ -859,7 +859,7 @@ void KigPainter::drawCurve( const CurveImp* curve ) if ( curpolylinenextfree > 0 && curpolyline[curpolylinenextfree - 1] != tp1 ) { // flush the current part of the curve - mP.drawPolyline( curpolyline, 0, curpolylinenextfree ); + mP.tqdrawPolyline( curpolyline, 0, curpolylinenextfree ); curpolylinenextfree = 0; } if ( curpolylinenextfree == 0 ) @@ -870,10 +870,10 @@ void KigPainter::drawCurve( const CurveImp* curve ) else if ( h >= hmin ) // we do not continue to subdivide indefinitely! { // push into stack in order to process both subintervals - if ( addn || ( valid0 && sr.contains( p0 ) ) ) + if ( addn || ( valid0 && sr.tqcontains( p0 ) ) ) workstack.push( workitem( curitem.first, coordparampair( t2, p2 ), overlaypt ) ); - if ( addn || ( valid1 && sr.contains( p1 ) ) ) + if ( addn || ( valid1 && sr.tqcontains( p1 ) ) ) { curitem = workitem( coordparampair( t2, p2 ), curitem.second , overlaypt ); @@ -883,7 +883,7 @@ void KigPainter::drawCurve( const CurveImp* curve ) } } // flush the rest of the curve - mP.drawPolyline( curpolyline, 0, curpolylinenextfree ); + mP.tqdrawPolyline( curpolyline, 0, curpolylinenextfree ); curpolylinenextfree = 0; if ( ! workstack.empty () ) @@ -912,10 +912,10 @@ void KigPainter::drawTextFrame( const Rect& frame, { // inspired upon kgeo, thanks to Marc Bartsch, i've taken some of // his code too.. - setPen( TQPen( Qt::black, 1 ) ); + setPen( TQPen( TQt::black, 1 ) ); setBrush( TQBrush( TQColor( 255, 255, 222 ) ) ); drawRect( frame ); - setPen( TQPen( TQColor( 197, 194, 197 ), 1, Qt::SolidLine ) ); + setPen( TQPen( TQColor( 197, 194, 197 ), 1, TQt::SolidLine ) ); TQRect qr = toScreen( frame ); @@ -924,7 +924,7 @@ void KigPainter::drawTextFrame( const Rect& frame, }; setPen( oldpen ); setBrush( oldbrush ); - drawText( frame, s, Qt::AlignVCenter | Qt::AlignLeft ); + drawText( frame, s, TQt::AlignVCenter | TQt::AlignLeft ); } void KigPainter::drawArc( const Coordinate& center, const double radius, diff --git a/kig/misc/kigpainter.h b/kig/misc/kigpainter.h index 70b4cd9a..ee3b14c1 100644 --- a/kig/misc/kigpainter.h +++ b/kig/misc/kigpainter.h @@ -51,7 +51,7 @@ class ObjectHolder; * It calls KigWidget::appendOverlay() for all of the places it draws in... */ class KigPainter - : public Qt + : public TQt { protected: // don't blaim me for this mutable hack. It's TT that hasn't got @@ -59,10 +59,10 @@ protected: mutable TQPainter mP; TQColor color; - PenStyle style; + Qt::PenStyle style; int pointstyle; int width; - BrushStyle brushStyle; + Qt::BrushStyle brushStyle; TQColor brushColor; const KigDocument& mdoc; @@ -94,7 +94,7 @@ public: Rect fromScreen( const TQRect& r ) const; // colors and stuff... - void setStyle( const PenStyle c ); + void setStyle( const Qt::PenStyle c ); void setColor( const TQColor& c ); /** * setting this to -1 means to use the default width for the object @@ -103,7 +103,7 @@ public: void setWidth( const int c ); void setPointStyle( const int p ); void setPen( const TQPen& p ); - void setBrushStyle( const BrushStyle c ); + void setBrushStyle( const Qt::BrushStyle c ); void setBrush( const TQBrush& b ); void setBrushColor( const TQColor& c ); diff --git a/kig/misc/lists.cc b/kig/misc/lists.cc index d3a4fb4d..7d2bee62 100644 --- a/kig/misc/lists.cc +++ b/kig/misc/lists.cc @@ -301,13 +301,13 @@ bool MacroList::load( const TQString& f, std::vector& ret, const KigPart TQFile file( f ); if ( ! file.open( IO_ReadOnly ) ) { - KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).arg( f ) ); + KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).tqarg( f ) ); return false; } TQDomDocument doc( "KigMacroFile" ); if ( !doc.setContent( &file ) ) { - KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).arg( f ) ); + KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).tqarg( f ) ); return false; } file.close(); @@ -318,7 +318,7 @@ bool MacroList::load( const TQString& f, std::vector& ret, const KigPart else { KMessageBox::detailedSorry( - 0, i18n( "Kig cannot open the macro file \"%1\"." ).arg( f ), + 0, i18n( "Kig cannot open the macro file \"%1\"." ).tqarg( f ), i18n( "This file was created by a very old Kig version (pre-0.4). " "Support for this format has been removed from recent Kig versions. " "You can try to import this macro using a previous Kig version " @@ -372,7 +372,7 @@ bool MacroList::loadNew( const TQDomElement& docelem, std::vector& ret, assert( hierarchy ); // if the macro has no name, we give it a bogus name... if ( name.isEmpty() ) - name = i18n( "Unnamed Macro #%1" ).arg( unnamedindex++ ); + name = i18n( "Unnamed Macro #%1" ).tqarg( unnamedindex++ ); MacroConstructor* ctor = new MacroConstructor( *hierarchy, i18n( name.latin1() ), i18n( description.latin1() ), iconfile ); delete hierarchy; diff --git a/kig/misc/object_constructor.cc b/kig/misc/object_constructor.cc index ce48a636..a5802d45 100644 --- a/kig/misc/object_constructor.cc +++ b/kig/misc/object_constructor.cc @@ -102,12 +102,12 @@ void StandardConstructorBase::handlePrelim( assert ( margsparser.check( os ) != ArgsParser::Invalid ); std::vector args = margsparser.parse( os ); p.setBrushStyle( Qt::NoBrush ); - p.setBrushColor( Qt::red ); - p.setPen( TQPen ( Qt::red, 1) ); + p.setBrushColor( TQt::red ); + p.setPen( TQPen ( TQt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. - ObjectDrawer drawer( Qt::red ); + ObjectDrawer drawer( TQt::red ); drawprelim( drawer, p, args, d ); } @@ -124,12 +124,12 @@ SimpleObjectTypeConstructor::~SimpleObjectTypeConstructor() { } -void SimpleObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void SimpleObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& doc ) const { Args args; using namespace std; - transform( parents.begin(), parents.end(), + transform( tqparents.begin(), tqparents.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); ObjectImp* data = mtype->calc( args, doc ); drawer.draw( *data, p, true ); @@ -178,12 +178,12 @@ MultiObjectTypeConstructor::~MultiObjectTypeConstructor() { } -void MultiObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void MultiObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& doc ) const { Args args; using namespace std; - transform( parents.begin(), parents.end(), + transform( tqparents.begin(), tqparents.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); for ( vector::const_iterator i = mparams.begin(); i != mparams.end(); ++i ) @@ -305,7 +305,7 @@ TQString StandardConstructorBase::useText( const ObjectCalcer& o, const std::vec transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = margsparser.usetext( o.imp(), args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); return i18n( ret.c_str() ); } @@ -318,7 +318,7 @@ TQString StandardConstructorBase::selectStatement( transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = margsparser.selectStatement( args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); return i18n( ret.c_str() ); } @@ -331,7 +331,7 @@ TQString MergeObjectConstructor::useText( const ObjectCalcer& o, const std::vect int w = (*i)->wantArgs( args, d, v ); if ( w != ArgsParser::Invalid ) return (*i)->useText( o, sel, d, v ); }; - return TQString::null; + return TQString(); } TQString MergeObjectConstructor::selectStatement( @@ -344,7 +344,7 @@ TQString MergeObjectConstructor::selectStatement( int wa = (*i)->wantArgs( args, d, w ); if ( wa != ArgsParser::Invalid ) return (*i)->selectStatement( sel, d, w ); }; - return TQString::null; + return TQString(); } MacroConstructor::MacroConstructor( const ObjectHierarchy& hier, const TQString& name, @@ -421,7 +421,7 @@ TQString MacroConstructor::selectStatement( transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = mparser.selectStatement( args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); else return i18n( ret.c_str() ); } @@ -434,7 +434,7 @@ TQString MacroConstructor::useText( const ObjectCalcer& o, const std::vector& parents, + const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& d ) const { - int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname ); + int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname ); assert ( index != -1 ); - ObjectImp* imp = parents[0]->imp()->property( index, d ); + ObjectImp* imp = tqparents[0]->imp()->property( index, d ); drawer.draw( *imp, p, true ); delete imp; } std::vector PropertyObjectConstructor::build( - const std::vector& parents, KigDocument&, + const std::vector& tqparents, KigDocument&, KigWidget& ) const { - int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname ); + int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname ); assert( index != -1 ); std::vector ret; ret.push_back( new ObjectHolder( - new ObjectPropertyCalcer( parents[0], index ) ) ); + new ObjectPropertyCalcer( tqparents[0], index ) ) ); return ret; } diff --git a/kig/misc/object_constructor.h b/kig/misc/object_constructor.h index 9b03ece0..9233426f 100644 --- a/kig/misc/object_constructor.h +++ b/kig/misc/object_constructor.h @@ -165,7 +165,7 @@ public: const KigDocument& d, const KigWidget& v ) const; - virtual void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + virtual void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const = 0; TQString useText( const ObjectCalcer& o, const std::vector& sel, @@ -196,7 +196,7 @@ public: ~SimpleObjectTypeConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, @@ -225,7 +225,7 @@ public: ~PropertyObjectConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, @@ -265,7 +265,7 @@ public: int a, int b, int c = -999, int d = -999 ); ~MultiObjectTypeConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( diff --git a/kig/misc/object_hierarchy.cc b/kig/misc/object_hierarchy.cc index c2365aaa..7a977e63 100644 --- a/kig/misc/object_hierarchy.cc +++ b/kig/misc/object_hierarchy.cc @@ -47,14 +47,14 @@ public: // on the given objects. The dependsstack contains a set of // booleans telling which parts of the hierarchy certainly depend on // the given objects. In this function, the node should check - // whether any of its parents have true set, and if so, set its own + // whether any of its tqparents have true set, and if so, set its own // value to true. virtual void checkDependsOnGiven( std::vector& dependsstack, int loc ) const = 0; // this function is used to check whether the given objects are all - // used by one or more of the final objects. The usedstack contains + // used by one or more of the final objects. The usedstack tqcontains // a set of booleans telling which parts of the hierarchy are // certainly ancestors of the final objects. In this function, the - // node should set all of its parents' booleans to true. + // node should set all of its tqparents' booleans to true. virtual void checkArgumentsUsed( std::vector& usedstack ) const = 0; }; @@ -118,15 +118,15 @@ class ApplyTypeNode : public ObjectHierarchy::Node { const ObjectType* mtype; - std::vector mparents; + std::vector mtqparents; public: - ApplyTypeNode( const ObjectType* type, const std::vector& parents ) - : mtype( type ), mparents( parents ) {} + ApplyTypeNode( const ObjectType* type, const std::vector& tqparents ) + : mtype( type ), mtqparents( tqparents ) {} ~ApplyTypeNode(); Node* copy() const; const ObjectType* type() const { return mtype; } - const std::vector& parents() const { return mparents; } + const std::vector& tqparents() const { return mtqparents; } int id() const; void apply( std::vector& stack, @@ -141,17 +141,17 @@ int ApplyTypeNode::id() const { return ID_ApplyType; } void ApplyTypeNode::checkArgumentsUsed( std::vector& usedstack ) const { - for ( uint i = 0; i < mparents.size(); ++i ) + for ( uint i = 0; i < mtqparents.size(); ++i ) { - usedstack[mparents[i]] = true; + usedstack[mtqparents[i]] = true; } } void ApplyTypeNode::checkDependsOnGiven( std::vector& dependsstack, int loc ) const { bool result = false; - for ( uint i = 0; i < mparents.size(); ++i ) - if ( dependsstack[mparents[i]] == true ) result = true; + for ( uint i = 0; i < mtqparents.size(); ++i ) + if ( dependsstack[mtqparents[i]] == true ) result = true; dependsstack[loc] = result; } @@ -161,23 +161,23 @@ ApplyTypeNode::~ApplyTypeNode() ObjectHierarchy::Node* ApplyTypeNode::copy() const { - return new ApplyTypeNode( mtype, mparents ); + return new ApplyTypeNode( mtype, mtqparents ); } void ApplyTypeNode::apply( std::vector& stack, int loc ) const { - std::vector parents; - for ( uint i = 0; i < mparents.size(); ++i ) - parents.push_back( stack[ mparents[i] ] ); - stack[loc] = new ObjectTypeCalcer( mtype, parents ); + std::vector tqparents; + for ( uint i = 0; i < mtqparents.size(); ++i ) + tqparents.push_back( stack[ mtqparents[i] ] ); + stack[loc] = new ObjectTypeCalcer( mtype, tqparents ); } void ApplyTypeNode::apply( std::vector& stack, int loc, const KigDocument& doc ) const { Args args; - for ( uint i = 0; i < mparents.size(); ++i ) - args.push_back( stack[mparents[i]] ); + for ( uint i = 0; i < mtqparents.size(); ++i ) + args.push_back( stack[mtqparents[i]] ); args = mtype->sortArgs( args ); stack[loc] = mtype->calc( args, doc ); } @@ -186,21 +186,21 @@ class FetchPropertyNode : public ObjectHierarchy::Node { mutable int mpropid; - int mparent; + int mtqparent; const TQCString mname; public: - // propid is a cache of the location of name in the parent's + // propid is a cache of the location of name in the tqparent's // propertiesInternalNames(), just as it is in PropertyObject. We // don't want to ever save this value, since we cannot guarantee it // remains consistent if we add properties some place.. - FetchPropertyNode( const int parent, const TQCString& name, const int propid = -1 ) - : mpropid( propid ), mparent( parent ), mname( name ) {} + FetchPropertyNode( const int tqparent, const TQCString& name, const int propid = -1 ) + : mpropid( propid ), mtqparent( tqparent ), mname( name ) {} ~FetchPropertyNode(); Node* copy() const; void checkDependsOnGiven( std::vector& dependsstack, int loc ) const; void checkArgumentsUsed( std::vector& usedstack ) const; - int parent() const { return mparent; } + int tqparent() const { return mtqparent; } const TQCString& propinternalname() const { return mname; } int id() const; @@ -215,17 +215,17 @@ FetchPropertyNode::~FetchPropertyNode() void FetchPropertyNode::checkArgumentsUsed( std::vector& usedstack ) const { - usedstack[mparent] = true; + usedstack[mtqparent] = true; } void FetchPropertyNode::checkDependsOnGiven( std::vector& dependsstack, int loc ) const { - dependsstack[loc] = dependsstack[mparent]; + dependsstack[loc] = dependsstack[mtqparent]; } ObjectHierarchy::Node* FetchPropertyNode::copy() const { - return new FetchPropertyNode( mparent, mname, mpropid ); + return new FetchPropertyNode( mtqparent, mname, mpropid ); } int FetchPropertyNode::id() const @@ -236,10 +236,10 @@ int FetchPropertyNode::id() const void FetchPropertyNode::apply( std::vector& stack, int loc, const KigDocument& d ) const { - assert( stack[mparent] ); - if ( mpropid == -1 ) mpropid = stack[mparent]->propertiesInternalNames().findIndex( mname ); + assert( stack[mtqparent] ); + if ( mpropid == -1 ) mpropid = stack[mtqparent]->propertiesInternalNames().tqfindIndex( mname ); if ( mpropid != -1 ) - stack[loc] = stack[mparent]->property( mpropid, d ); + stack[loc] = stack[mtqparent]->property( mpropid, d ); else stack[loc] = new InvalidImp(); } @@ -247,9 +247,9 @@ void FetchPropertyNode::apply( std::vector& stack, void FetchPropertyNode::apply( std::vector& stack, int loc ) const { if ( mpropid == -1 ) - mpropid = stack[mparent]->imp()->propertiesInternalNames().findIndex( mname ); + mpropid = stack[mtqparent]->imp()->propertiesInternalNames().tqfindIndex( mname ); assert( mpropid != -1 ); - stack[loc] = new ObjectPropertyCalcer( stack[mparent], mpropid ); + stack[loc] = new ObjectPropertyCalcer( stack[mtqparent], mpropid ); } std::vector ObjectHierarchy::calc( const Args& a, const KigDocument& doc ) const @@ -297,23 +297,23 @@ int ObjectHierarchy::visit( const ObjectCalcer* o, std::map parents; - parents.push_back( smi->second ); - mnodes.push_back( new ApplyTypeNode( CopyObjectType::instance(), parents ) ); + std::vector tqparents; + tqparents.push_back( smi->second ); + mnodes.push_back( new ApplyTypeNode( CopyObjectType::instance(), tqparents ) ); return ret; } else return smi->second; } - std::vector p( o->parents() ); + std::vector p( o->tqparents() ); // we check if o descends from the given objects.. bool descendsfromgiven = false; - std::vector parents; - parents.resize( p.size(), -1 ); + std::vector tqparents; + tqparents.resize( p.size(), -1 ); for ( uint i = 0; i < p.size(); ++i ) { int v = visit( p[i], seenmap, false ); - parents[i] = v; + tqparents[i] = v; descendsfromgiven |= (v != -1); }; @@ -335,7 +335,7 @@ int ObjectHierarchy::visit( const ObjectCalcer* o, std::map& from, const std::v seenmap[from[i]] = i; for ( std::vector::const_iterator i = to.begin(); i != to.end(); ++i ) { - std::vector parents = (*i)->parents(); - for ( std::vector::const_iterator j = parents.begin(); - j != parents.end(); ++j ) + std::vector tqparents = (*i)->tqparents(); + for ( std::vector::const_iterator j = tqparents.begin(); + j != tqparents.end(); ++j ) visit( *j, seenmap, true ); } for ( std::vector::const_iterator i = to.begin(); i != to.end(); ++i ) @@ -408,7 +408,7 @@ ObjectHierarchy::ObjectHierarchy( const std::vector& from, const init( from, to ); } -void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) const +void ObjectHierarchy::serialize( TQDomElement& tqparent, TQDomDocument& doc ) const { int id = 1; for ( uint i = 0; i < mnumberofargs; ++i ) @@ -419,12 +419,12 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons // we don't save these atm, since the user can't define them. // we only load them from builtin macro's. // TQDomElement ut = doc.createElement( "UseText" ); -// ut.appendChild( doc.createTextNode( TQString::fromLatin1(musetexts[i].c_str() ) ) ); +// ut.appendChild( doc.createTextNode( TQString::tqfromLatin1(musetexts[i].c_str() ) ) ); // e.appendChild( ut ); // TQDomElement ss = doc.createElement( "SelectStatement" ); -// ss.appendChild( doc.createTextNode( TQString::fromLatin1(mselectstatements[i].c_str() ) ) ); +// ss.appendChild( doc.createTextNode( TQString::tqfromLatin1(mselectstatements[i].c_str() ) ) ); // e.appendChild( ss ); - parent.appendChild( e ); + tqparent.appendChild( e ); } for ( uint i = 0; i < mnodes.size(); ++i ) @@ -437,12 +437,12 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons { const ApplyTypeNode* node = static_cast( mnodes[i] ); e.setAttribute( "action", "calc" ); - e.setAttribute( "type", TQString::fromLatin1( node->type()->fullName() ) ); - for ( uint i = 0; i < node->parents().size(); ++i ) + e.setAttribute( "type", TQString::tqfromLatin1( node->type()->fullName() ) ); + for ( uint i = 0; i < node->tqparents().size(); ++i ) { - int parent = node->parents()[i] + 1; + int tqparent = node->tqparents()[i] + 1; TQDomElement arge = doc.createElement( "arg" ); - arge.appendChild( doc.createTextNode( TQString::number( parent ) ) ); + arge.appendChild( doc.createTextNode( TQString::number( tqparent ) ) ); e.appendChild( arge ); }; } @@ -450,9 +450,9 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons { const FetchPropertyNode* node = static_cast( mnodes[i] ); e.setAttribute( "action", "fetch-property" ); - e.setAttribute( "property", node->propinternalname() ); + e.setAttribute( TQString("property"), TQString(node->propinternalname()) ); TQDomElement arge = doc.createElement( "arg" ); - arge.appendChild( doc.createTextNode( TQString::number( node->parent() + 1 ) ) ); + arge.appendChild( doc.createTextNode( TQString::number( node->tqparent() + 1 ) ) ); e.appendChild( arge ); } else @@ -464,7 +464,7 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons e.setAttribute( "type", type ); }; - parent.appendChild( e ); + tqparent.appendChild( e ); }; } @@ -473,12 +473,12 @@ ObjectHierarchy::ObjectHierarchy() { } -ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& parent, TQString& error ) +ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& tqparent, TQString& error ) { #define KIG_GENERIC_PARSE_ERROR \ { \ error = i18n( "An error was encountered at line %1 in file %2." ) \ - .arg( __LINE__ ).arg( __FILE__ ); \ + .tqarg( __LINE__ ).tqarg( __FILE__ ); \ return 0; \ } @@ -486,7 +486,7 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& bool ok = true; TQString tmp; - TQDomElement e = parent.firstChild().toElement(); + TQDomElement e = tqparent.firstChild().toElement(); for (; !e.isNull(); e = e.nextSibling().toElement() ) { if ( e.tagName() != "input" ) break; @@ -537,18 +537,18 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& { // ApplyTypeNode TQCString typen = e.attribute( "type" ).latin1(); - const ObjectType* type = ObjectTypeFactory::instance()->find( typen ); + const ObjectType* type = ObjectTypeFactory::instance()->tqfind( typen ); if ( ! type ) { error = i18n( "This Kig file uses an object of type \"%1\", " "which this Kig version does not support." "Perhaps you have compiled Kig without support " "for this object type," - "or perhaps you are using an older Kig version." ).arg( typen ); + "or perhaps you are using an older Kig version." ).tqarg( TQString(typen) ); return 0; } - std::vector parents; + std::vector tqparents; for ( TQDomNode p = e.firstChild(); !p.isNull(); p = p.nextSibling() ) { TQDomElement q = p.toElement(); @@ -556,18 +556,18 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& if ( q.tagName() != "arg" ) KIG_GENERIC_PARSE_ERROR; int pid = q.text().toInt(&ok ); if ( !ok ) KIG_GENERIC_PARSE_ERROR; - parents.push_back( pid - 1 ); + tqparents.push_back( pid - 1 ); }; - newnode = new ApplyTypeNode( type, parents ); + newnode = new ApplyTypeNode( type, tqparents ); } else if ( tmp == "fetch-property" ) { // FetchPropertyNode TQCString propname = e.attribute( "property" ).latin1(); TQDomElement arge = e.firstChild().toElement(); - int parent = arge.text().toInt( &ok ); + int tqparent = arge.text().toInt( &ok ); if ( !ok ) KIG_GENERIC_PARSE_ERROR; - newnode = new FetchPropertyNode( parent - 1, propname ); + newnode = new FetchPropertyNode( tqparent - 1, propname ); } else { @@ -640,11 +640,11 @@ ObjectHierarchy ObjectHierarchy::transformFinalObject( const Transformation& t ) ObjectHierarchy ret( *this ); ret.mnodes.push_back( new PushStackNode( new TransformationImp( t ) ) ); - std::vector parents; - parents.push_back( ret.mnodes.size() - 1); - parents.push_back( ret.mnodes.size() ); + std::vector tqparents; + tqparents.push_back( ret.mnodes.size() - 1); + tqparents.push_back( ret.mnodes.size() ); const ObjectType* type = ApplyTransformationObjectType::instance(); - ret.mnodes.push_back( new ApplyTypeNode( type, parents ) ); + ret.mnodes.push_back( new ApplyTypeNode( type, tqparents ) ); return ret; } @@ -696,7 +696,7 @@ const ObjectImpType* lowermost( const ObjectImpType* a, const ObjectImpType* b ) // this function is part of the visit procedure really. It is // factored out, because it recurses for cache ObjectImp's. What this // does is, it makes sure that object o is calcable, by putting -// appropriate Node's in mnodes.. po is o->parents() and pl contains +// appropriate Node's in mnodes.. po is o->tqparents() and pl tqcontains // the location of objects that are already in mnodes and -1 // otherwise.. -1 means we have to store their ObjectImp, unless // they're cache ObjectImp's etc. @@ -723,12 +723,12 @@ int ObjectHierarchy::storeObject( const ObjectCalcer* o, const std::vectorparents()[i]; - std::vector opl = o->parents(); + ObjectCalcer* tqparent = o->tqparents()[i]; + std::vector opl = o->tqparents(); margrequirements[pl[i]] = lowermost( margrequirements[pl[i]], - o->impRequirement( parent, opl ) ); + o->impRequirement( tqparent, opl ) ); musetexts[pl[i]] = margrequirements[pl[i]]->selectStatement(); }; }; @@ -737,12 +737,12 @@ int ObjectHierarchy::storeObject( const ObjectCalcer* o, const std::vector( o ) ) { assert( pl.size() == 1 ); - int parent = pl.front(); + int tqparent = pl.front(); ObjectCalcer* op = po.front(); assert( op ); uint propid = static_cast( o )->propId(); assert( propid < op->imp()->propertiesInternalNames().size() ); - mnodes.push_back( new FetchPropertyNode( parent, op->imp()->propertiesInternalNames()[propid], propid ) ); + mnodes.push_back( new FetchPropertyNode( tqparent, op->imp()->propertiesInternalNames()[propid], propid ) ); } else assert( false ); diff --git a/kig/misc/object_hierarchy.h b/kig/misc/object_hierarchy.h index 60df8a59..cda2615f 100644 --- a/kig/misc/object_hierarchy.h +++ b/kig/misc/object_hierarchy.h @@ -73,22 +73,22 @@ public: std::vector calc( const Args& a, const KigDocument& doc ) const; /** - * saves the ObjectHierarchy data in children xml tags of \p parent .. + * saves the ObjectHierarchy data in tqchildren xml tags of \p tqparent .. */ - void serialize( TQDomElement& parent, TQDomDocument& doc ) const; + void serialize( TQDomElement& tqparent, TQDomDocument& doc ) const; /** - * Deserialize the ObjectHierarchy data from the xml element \p parent .. + * Deserialize the ObjectHierarchy data from the xml element \p tqparent .. * Since this operation can fail for some reasons, we provide it as a * static to return 0 in case of error. */ - static ObjectHierarchy* buildSafeObjectHierarchy( const TQDomElement& parent, TQString& error ); -// ObjectHierarchy( const TQDomElement& parent ); + static ObjectHierarchy* buildSafeObjectHierarchy( const TQDomElement& tqparent, TQString& error ); +// ObjectHierarchy( const TQDomElement& tqparent ); /** * build a set of objects that interdepend according to this * ObjectHierarchy.. Only the result objects are returned. Helper * objects that connect the given objects with the returned objects, - * can only be found by following the returned objects' parents() + * can only be found by following the returned objects' tqparents() * methods.. */ std::vector buildObjects( const std::vector& os, const KigDocument& ) const; diff --git a/kig/misc/rect.cc b/kig/misc/rect.cc index 183f50f8..652fae2d 100644 --- a/kig/misc/rect.cc +++ b/kig/misc/rect.cc @@ -153,9 +153,9 @@ void Rect::scale( const double r ) } -TQRect Rect::toQRect() const +TQRect Rect::toTQRect() const { - return TQRect(mBottomLeft.toQPoint(), topRight().toQPoint()); + return TQRect(mBottomLeft.toTQPoint(), topRight().toTQPoint()); } Coordinate Rect::bottomLeft() const @@ -211,7 +211,7 @@ double Rect::height() const return mheight; } -bool Rect::contains( const Coordinate& p, double allowed_miss ) const +bool Rect::tqcontains( const Coordinate& p, double allowed_miss ) const { return p.x - left() >= - allowed_miss && p.y - bottom() >= - allowed_miss && @@ -219,7 +219,7 @@ bool Rect::contains( const Coordinate& p, double allowed_miss ) const p.y - bottom() - height() <= allowed_miss; } -bool Rect::contains( const Coordinate& p ) const +bool Rect::tqcontains( const Coordinate& p ) const { return p.x >= left() && p.y >= bottom() && @@ -253,7 +253,7 @@ Rect Rect::normalized() const return t; } -Rect Rect::fromQRect( const TQRect& r ) +Rect Rect::fromTQRect( const TQRect& r ) { return Rect( r.left(), r.top(), r.right(), r.bottom() ); } diff --git a/kig/misc/rect.h b/kig/misc/rect.h index 1fe0b071..52958dd8 100644 --- a/kig/misc/rect.h +++ b/kig/misc/rect.h @@ -103,7 +103,7 @@ public: */ Rect matchShape( const Rect& rhs, bool shrink = false ) const; - TQRect toQRect() const; + TQRect toTQRect() const; Coordinate bottomLeft() const; Coordinate bottomRight() const; Coordinate topLeft() const; @@ -115,13 +115,13 @@ public: double top() const; double width() const; double height() const; - bool contains( const Coordinate& p ) const; - bool contains( const Coordinate& p, double allowed_miss ) const; + bool tqcontains( const Coordinate& p ) const; + bool tqcontains( const Coordinate& p, double allowed_miss ) const; bool intersects( const Rect& p ) const; Rect normalized() const; friend kdbgstream& operator<<( kdbgstream& s, const Rect& t ); - static Rect fromQRect( const TQRect& ); + static Rect fromTQRect( const TQRect& ); protected: Coordinate mBottomLeft; double mwidth; diff --git a/kig/misc/special_constructors.cc b/kig/misc/special_constructors.cc index d419a546..ccb92ac6 100644 --- a/kig/misc/special_constructors.cc +++ b/kig/misc/special_constructors.cc @@ -68,7 +68,7 @@ public: ConicConicIntersectionConstructor(); ~ConicConicIntersectionConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); @@ -109,13 +109,13 @@ ConicRadicalConstructor::~ConicRadicalConstructor() } void ConicRadicalConstructor::drawprelim( - const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& doc ) const + const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& doc ) const { - if ( parents.size() == 2 && parents[0]->imp()->inherits( ConicImp::stype() ) && - parents[1]->imp()->inherits( ConicImp::stype() ) ) + if ( tqparents.size() == 2 && tqparents[0]->imp()->inherits( ConicImp::stype() ) && + tqparents[1]->imp()->inherits( ConicImp::stype() ) ) { Args args; - std::transform( parents.begin(), parents.end(), + std::transform( tqparents.begin(), tqparents.end(), std::back_inserter( args ), std::mem_fun( &ObjectCalcer::imp ) ); for ( int i = -1; i < 2; i += 2 ) { @@ -170,27 +170,27 @@ LocusConstructor::~LocusConstructor() { } -void LocusConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void LocusConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const { // this function is rather ugly, but it is necessary to do it this // way in order to play nice with Kig's design.. - if ( parents.size() != 2 ) return; - const ObjectTypeCalcer* constrained = dynamic_cast( parents.front() ); - const ObjectCalcer* moving = parents.back(); + if ( tqparents.size() != 2 ) return; + const ObjectTypeCalcer* constrained = dynamic_cast( tqparents.front() ); + const ObjectCalcer* moving = tqparents.back(); if ( ! constrained || ! constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) ) { // moving is in fact the constrained point.. swap them.. - moving = parents.front(); - constrained = dynamic_cast( parents.back() ); + moving = tqparents.front(); + constrained = dynamic_cast( tqparents.back() ); assert( constrained ); }; assert( constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) ); - const ObjectImp* oimp = constrained->parents().back()->imp(); + const ObjectImp* oimp = constrained->tqparents().back()->imp(); if( !oimp->inherits( CurveImp::stype() ) ) - oimp = constrained->parents().front()->imp(); + oimp = constrained->tqparents().front()->imp(); assert( oimp->inherits( CurveImp::stype() ) ); const CurveImp* cimp = static_cast( oimp ); @@ -210,30 +210,30 @@ const int LocusConstructor::wantArgs( if ( dynamic_cast( os.front() ) && static_cast( os.front() )->type()->inherits( ObjectType::ID_ConstrainedPointType ) ) { - std::set children = getAllChildren( os.front() ); - return children.find( os.back() ) != children.end() ? ret : ArgsParser::Invalid; + std::set tqchildren = getAllChildren( os.front() ); + return tqchildren.find( os.back() ) != tqchildren.end() ? ret : ArgsParser::Invalid; } if ( dynamic_cast( os.back() ) && static_cast( os.back() )->type()->inherits( ObjectType::ID_ConstrainedPointType ) ) { - std::set children = getAllChildren( os.back() ); - return children.find( os.front() ) != children.end() ? ret : ArgsParser::Invalid; + std::set tqchildren = getAllChildren( os.back() ); + return tqchildren.find( os.front() ) != tqchildren.end() ? ret : ArgsParser::Invalid; } return ArgsParser::Invalid; } -std::vector LocusConstructor::build( const std::vector& parents, KigDocument&, KigWidget& ) const +std::vector LocusConstructor::build( const std::vector& tqparents, KigDocument&, KigWidget& ) const { std::vector ret; - assert( parents.size() == 2 ); + assert( tqparents.size() == 2 ); - ObjectTypeCalcer* constrained = dynamic_cast( parents.front() ); - ObjectCalcer* moving = parents.back(); + ObjectTypeCalcer* constrained = dynamic_cast( tqparents.front() ); + ObjectCalcer* moving = tqparents.back(); if ( ! constrained || ! constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) ) { // moving is in fact the constrained point.. swap them.. - moving = parents.front(); - constrained = dynamic_cast( parents.back() ); + moving = tqparents.front(); + constrained = dynamic_cast( tqparents.back() ); assert( constrained ); }; assert( constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) ); @@ -350,12 +350,12 @@ void PolygonBNPTypeConstructor::handlePrelim( std::vector args = os; p.setBrushStyle( Qt::NoBrush ); - p.setBrushColor( Qt::red ); - p.setPen( TQPen ( Qt::red, 1) ); + p.setBrushColor( TQt::red ); + p.setPen( TQPen ( TQt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. - ObjectDrawer drawer( Qt::red ); + ObjectDrawer drawer( TQt::red ); drawprelim( drawer, p, args, d ); } @@ -374,21 +374,21 @@ TQString PolygonBNPTypeConstructor::selectStatement( return i18n("Select a point to be a vertex of the new polygon..."); } -void PolygonBNPTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void PolygonBNPTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const { - if ( parents.size() < 2 ) return; + if ( tqparents.size() < 2 ) return; std::vector points; - for ( uint i = 0; i < parents.size(); ++i ) + for ( uint i = 0; i < tqparents.size(); ++i ) { const Coordinate vertex = - static_cast( parents[i]->imp() )->coordinate(); + static_cast( tqparents[i]->imp() )->coordinate(); points.push_back( vertex ); } - if ( parents.size() == 2 ) + if ( tqparents.size() == 2 ) { SegmentImp segment = SegmentImp( points[0], points[1] ); drawer.draw( segment, p, true ); @@ -398,12 +398,12 @@ void PolygonBNPTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPaint } } -std::vector PolygonBNPTypeConstructor::build( const std::vector& parents, KigDocument&, KigWidget& ) const +std::vector PolygonBNPTypeConstructor::build( const std::vector& tqparents, KigDocument&, KigWidget& ) const { - uint count = parents.size() - 1; + uint count = tqparents.size() - 1; assert ( count >= 3 ); std::vector args; - for ( uint i = 0; i < count; ++i ) args.push_back( parents[i] ); + for ( uint i = 0; i < count; ++i ) args.push_back( tqparents[i] ); ObjectTypeCalcer* calcer = new ObjectTypeCalcer( mtype, args ); ObjectHolder* h = new ObjectHolder( calcer ); std::vector ret; @@ -443,12 +443,12 @@ PolygonVertexTypeConstructor::~PolygonVertexTypeConstructor() { } -void PolygonVertexTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void PolygonVertexTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const { - if ( parents.size() != 1 ) return; + if ( tqparents.size() != 1 ) return; - const PolygonImp* polygon = dynamic_cast( parents.front()->imp() ); + const PolygonImp* polygon = dynamic_cast( tqparents.front()->imp() ); const std::vector points = polygon->points(); int sides = points.size(); @@ -459,11 +459,11 @@ void PolygonVertexTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPa } } -std::vector PolygonVertexTypeConstructor::build( const std::vector& parents, KigDocument&, KigWidget& ) const +std::vector PolygonVertexTypeConstructor::build( const std::vector& tqparents, KigDocument&, KigWidget& ) const { std::vector ret; - assert( parents.size() == 1 ); - const PolygonImp* polygon = dynamic_cast( parents.front()->imp() ); + assert( tqparents.size() == 1 ); + const PolygonImp* polygon = dynamic_cast( tqparents.front()->imp() ); const std::vector points = polygon->points(); int sides = points.size(); @@ -471,7 +471,7 @@ std::vector PolygonVertexTypeConstructor::build( const std::vecto for ( int i = 0; i < sides; ++i ) { ObjectConstCalcer* d = new ObjectConstCalcer( new IntImp( i ) ); - std::vector args( parents ); + std::vector args( tqparents ); args.push_back( d ); ret.push_back( new ObjectHolder( new ObjectTypeCalcer( mtype, args ) ) ); } @@ -510,12 +510,12 @@ PolygonSideTypeConstructor::~PolygonSideTypeConstructor() { } -void PolygonSideTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void PolygonSideTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const { - if ( parents.size() != 1 ) return; + if ( tqparents.size() != 1 ) return; - const PolygonImp* polygon = dynamic_cast( parents.front()->imp() ); + const PolygonImp* polygon = dynamic_cast( tqparents.front()->imp() ); const std::vector points = polygon->points(); uint sides = points.size(); @@ -527,11 +527,11 @@ void PolygonSideTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPain } } -std::vector PolygonSideTypeConstructor::build( const std::vector& parents, KigDocument&, KigWidget& ) const +std::vector PolygonSideTypeConstructor::build( const std::vector& tqparents, KigDocument&, KigWidget& ) const { std::vector ret; - assert( parents.size() == 1 ); - const PolygonImp* polygon = dynamic_cast( parents.front()->imp() ); + assert( tqparents.size() == 1 ); + const PolygonImp* polygon = dynamic_cast( tqparents.front()->imp() ); const std::vector points = polygon->points(); uint sides = points.size(); @@ -539,7 +539,7 @@ std::vector PolygonSideTypeConstructor::build( const std::vector< for ( uint i = 0; i < sides; ++i ) { ObjectConstCalcer* d = new ObjectConstCalcer( new IntImp( i ) ); - std::vector args( parents ); + std::vector args( tqparents ); args.push_back( d ); ret.push_back( new ObjectHolder( new ObjectTypeCalcer( mtype, args ) ) ); } @@ -659,12 +659,12 @@ void PolygonBCVConstructor::handlePrelim( } p.setBrushStyle( Qt::NoBrush ); - p.setBrushColor( Qt::red ); - p.setPen( TQPen ( Qt::red, 1) ); + p.setBrushColor( TQt::red ); + p.setPen( TQPen ( TQt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. - ObjectDrawer drawer( Qt::red ); + ObjectDrawer drawer( TQt::red ); drawprelim( drawer, p, args, d ); if ( moreinfo ) { @@ -682,7 +682,7 @@ void PolygonBCVConstructor::handlePrelim( ptn = PointImp( where ); ptn.draw( p ); if ( i > 5 ) continue; - text = TextImp( TQString( "(%1)" ).arg(i), where, false ); + text = TextImp( TQString( "(%1)" ).tqarg(i), where, false ); text.draw( p ); } p.setStyle( Qt::DotLine ); @@ -700,17 +700,17 @@ void PolygonBCVConstructor::handlePrelim( delete_all( args.begin() + 2, args.end() ); } -std::vector PolygonBCVConstructor::build( const std::vector& parents, KigDocument&, KigWidget& ) const +std::vector PolygonBCVConstructor::build( const std::vector& tqparents, KigDocument&, KigWidget& ) const { - assert ( parents.size() == 3 ); + assert ( tqparents.size() == 3 ); std::vector args; - Coordinate c = static_cast( parents[0]->imp() )->coordinate(); - Coordinate v = static_cast( parents[1]->imp() )->coordinate(); - Coordinate cntrl = static_cast( parents[2]->imp() )->coordinate(); + Coordinate c = static_cast( tqparents[0]->imp() )->coordinate(); + Coordinate v = static_cast( tqparents[1]->imp() )->coordinate(); + Coordinate cntrl = static_cast( tqparents[2]->imp() )->coordinate(); - args.push_back( parents[0] ); - args.push_back( parents[1] ); + args.push_back( tqparents[0] ); + args.push_back( tqparents[1] ); int winding = 0; int nsides = computeNsides( c, v, cntrl, winding ); ObjectConstCalcer* d = new ObjectConstCalcer( new IntImp( nsides ) ); @@ -752,13 +752,13 @@ TQString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector< { TQString result = TQString( i18n( "Adjust the number of sides (%1/%2)" ) - ).arg( nsides ).arg( winding ); + ).tqarg( nsides ).tqarg( winding ); return result; } else { TQString result = TQString( i18n( "Adjust the number of sides (%1)" ) - ).arg( nsides ); + ).tqarg( nsides ); return result; } break; @@ -789,20 +789,20 @@ TQString PolygonBCVConstructor::selectStatement( return ""; } -void PolygonBCVConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void PolygonBCVConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& doc ) const { - if ( parents.size() < 3 || parents.size() > 4 ) return; + if ( tqparents.size() < 3 || tqparents.size() > 4 ) return; - assert ( parents[0]->imp()->inherits( PointImp::stype() ) && - parents[1]->imp()->inherits( PointImp::stype() ) && - parents[2]->imp()->inherits( IntImp::stype() ) ); + assert ( tqparents[0]->imp()->inherits( PointImp::stype() ) && + tqparents[1]->imp()->inherits( PointImp::stype() ) && + tqparents[2]->imp()->inherits( IntImp::stype() ) ); - if ( parents.size() == 4 ) - assert ( parents[3]->imp()->inherits( IntImp::stype() ) ); + if ( tqparents.size() == 4 ) + assert ( tqparents[3]->imp()->inherits( IntImp::stype() ) ); Args args; - std::transform( parents.begin(), parents.end(), + std::transform( tqparents.begin(), tqparents.end(), std::back_inserter( args ), std::mem_fun( &ObjectCalcer::imp ) ); ObjectImp* data = mtype->calc( args, doc ); @@ -878,16 +878,16 @@ ConicConicIntersectionConstructor::~ConicConicIntersectionConstructor() { } -void ConicConicIntersectionConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, +void ConicConicIntersectionConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const { - if ( parents.size() != 2 ) return; - assert ( parents[0]->imp()->inherits( ConicImp::stype() ) && - parents[1]->imp()->inherits( ConicImp::stype() ) ); + if ( tqparents.size() != 2 ) return; + assert ( tqparents[0]->imp()->inherits( ConicImp::stype() ) && + tqparents[1]->imp()->inherits( ConicImp::stype() ) ); const ConicCartesianData conica = - static_cast( parents[0]->imp() )->cartesianData(); + static_cast( tqparents[0]->imp() )->cartesianData(); const ConicCartesianData conicb = - static_cast( parents[1]->imp() )->cartesianData(); + static_cast( tqparents[1]->imp() )->cartesianData(); bool ok = true; for ( int wr = -1; wr < 2; wr += 2 ) { @@ -1179,23 +1179,23 @@ void MeasureTransportConstructor::handlePrelim( ) const { p.setBrushStyle( Qt::NoBrush ); - p.setBrushColor( Qt::red ); - p.setPen( TQPen ( Qt::red, 1) ); + p.setBrushColor( TQt::red ); + p.setPen( TQPen ( TQt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. - ObjectDrawer drawer( Qt::red ); + ObjectDrawer drawer( TQt::red ); drawprelim( drawer, p, os, d ); } void MeasureTransportConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, - const std::vector& parents, + const std::vector& tqparents, const KigDocument& doc ) const { Args args; using namespace std; - transform( parents.begin(), parents.end(), + transform( tqparents.begin(), tqparents.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); ObjectImp* data = mtype->calc( args, doc ); drawer.draw( *data, p, true ); @@ -1236,13 +1236,13 @@ TQString MeasureTransportConstructor::selectStatement( } std::vector MeasureTransportConstructor::build( - const std::vector& parents, + const std::vector& tqparents, KigDocument&, KigWidget& ) const { - assert ( parents.size() == 3 ); + assert ( tqparents.size() == 3 ); // std::vector args; -// for ( uint i = 0; i < count; ++i ) args.push_back( parents[i] ); - ObjectTypeCalcer* calcer = new ObjectTypeCalcer( mtype, parents ); +// for ( uint i = 0; i < count; ++i ) args.push_back( tqparents[i] ); + ObjectTypeCalcer* calcer = new ObjectTypeCalcer( mtype, tqparents ); ObjectHolder* h = new ObjectHolder( calcer ); std::vector ret; ret.push_back( h ); @@ -1362,7 +1362,7 @@ TQString GenericIntersectionConstructor::useText( break; } - return TQString::null; + return TQString(); } static const ArgsParser::spec argsspecMidPointOfTwoPoints[] = @@ -1386,15 +1386,15 @@ MidPointOfTwoPointsConstructor::~MidPointOfTwoPointsConstructor() } void MidPointOfTwoPointsConstructor::drawprelim( - const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const { - if ( parents.size() != 2 ) return; - assert( parents[0]->imp()->inherits( PointImp::stype() ) ); - assert( parents[1]->imp()->inherits( PointImp::stype() ) ); + if ( tqparents.size() != 2 ) return; + assert( tqparents[0]->imp()->inherits( PointImp::stype() ) ); + assert( tqparents[1]->imp()->inherits( PointImp::stype() ) ); const Coordinate m = - ( static_cast( parents[0]->imp() )->coordinate() + - static_cast( parents[1]->imp() )->coordinate() ) / 2; + ( static_cast( tqparents[0]->imp() )->coordinate() + + static_cast( tqparents[1]->imp() )->coordinate() ) / 2; drawer.draw( PointImp( m ), p, true ); } @@ -1403,7 +1403,7 @@ std::vector MidPointOfTwoPointsConstructor::build( { ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), os ); seg->calc( d ); - int index = seg->imp()->propertiesInternalNames().findIndex( "mid-point" ); + int index = seg->imp()->propertiesInternalNames().tqfindIndex( "mid-point" ); assert( index != -1 ); ObjectPropertyCalcer* prop = new ObjectPropertyCalcer( seg, index ); prop->calc( d ); @@ -1542,7 +1542,7 @@ TQString TangentConstructor::useText( else if ( o.imp()->inherits( PointImp::stype() ) ) return i18n( "Tangent at This Point" ); // else assert( false ); - return TQString::null; + return TQString(); } //TQString TangentConstructor::selectStatement( @@ -1604,7 +1604,7 @@ TQString CocConstructor::useText( return i18n( "Center of Curvature of This Curve" ); else if ( o.imp()->inherits( PointImp::stype() ) ) return i18n( "Center of Curvature at This Point" ); - return TQString::null; + return TQString(); } bool relativePrimes( int n, int p ) diff --git a/kig/misc/special_constructors.h b/kig/misc/special_constructors.h index 5b80693c..796c8cd0 100644 --- a/kig/misc/special_constructors.h +++ b/kig/misc/special_constructors.h @@ -29,7 +29,7 @@ public: PolygonVertexTypeConstructor(); ~PolygonVertexTypeConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); bool isTransform() const; @@ -44,7 +44,7 @@ public: PolygonSideTypeConstructor(); ~PolygonSideTypeConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); bool isTransform() const; @@ -83,7 +83,7 @@ public: const KigWidget& v ) const; - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); bool isTransform() const; @@ -121,7 +121,7 @@ public: const KigDocument& d, const KigWidget& v ) const; - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); bool isTransform() const; @@ -163,7 +163,7 @@ public: const KigWidget& v ) const; - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); bool isTransform() const; @@ -179,7 +179,7 @@ public: ~ConicRadicalConstructor(); TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); @@ -205,7 +205,7 @@ public: TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; void plug( KigPart* doc, KigGUIAction* kact ); @@ -259,7 +259,7 @@ class MidPointOfTwoPointsConstructor public: MidPointOfTwoPointsConstructor(); ~MidPointOfTwoPointsConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; @@ -275,7 +275,7 @@ public: TestConstructor( const ArgsParserObjectType* type, const char* descname, const char* desc, const char* iconfile ); ~TestConstructor(); - void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, + void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& tqparents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; diff --git a/kig/modes/base_mode.cc b/kig/modes/base_mode.cc index d968566b..e470f938 100644 --- a/kig/modes/base_mode.cc +++ b/kig/modes/base_mode.cc @@ -38,7 +38,7 @@ BaseMode::~BaseMode() void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v ) { // touch screens don't send a mouseMoved event before a click event, - // apparently, so we simulate it. + // aptqparently, so we simulate it. mouseMoved( e, v ); // get rid of text still showing... @@ -46,9 +46,9 @@ void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v ) v->updateWidget(); mplc = e->pos(); - moco = mdoc.document().whatAmIOn( v->fromScreen( mplc ), *v ); + tqmoco = mdoc.document().whatAmIOn( v->fromScreen( mplc ), *v ); - if( moco.empty() ) + if( tqmoco.empty() ) { // clicked on an empty spot --> we show the rectangle for // selecting stuff... @@ -66,8 +66,8 @@ void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v ) void BaseMode::leftMouseMoved( TQMouseEvent* e, KigWidget* w ) { - if( !moco.empty() && ( mplc - e->pos() ).manhattanLength() > 3 ) - dragObject( moco, mplc, *w, + if( !tqmoco.empty() && ( mplc - e->pos() ).manhattanLength() > 3 ) + dragObject( tqmoco, mplc, *w, ( e->state() & (ShiftButton | ControlButton ) ) != 0 ); } @@ -79,16 +79,16 @@ void BaseMode::leftReleased( TQMouseEvent* e, KigWidget* v ) ObjectHolder* o = 0; bool keyCtrl = ( e->state() & ControlButton ) != 0; bool keyShift = ( e->state() & ShiftButton ) != 0; - if ( ! moco.empty() ) + if ( ! tqmoco.empty() ) { if ( keyShift ) { - int id = ObjectChooserPopup::getObjectFromList( e->pos(), v, moco ); + int id = ObjectChooserPopup::getObjectFromList( e->pos(), v, tqmoco ); if ( id >= 0 ) - o = moco[id]; + o = tqmoco[id]; } else - o = moco.front(); + o = tqmoco.front(); } leftClickedObject( o, e->pos(), *v, keyCtrl ); } @@ -100,7 +100,7 @@ void BaseMode::midClicked( TQMouseEvent* e, KigWidget* v ) v->updateWidget(); mplc = e->pos(); - moco = mdoc.document().whatAmIOn( v->fromScreen( e->pos() ), *v ); + tqmoco = mdoc.document().whatAmIOn( v->fromScreen( e->pos() ), *v ); } void BaseMode::midReleased( TQMouseEvent* e, KigWidget* v ) @@ -119,15 +119,15 @@ void BaseMode::rightClicked( TQMouseEvent* e, KigWidget* w ) w->setCursor( KCursor::arrowCursor() ); mplc = e->pos(); - moco = mdoc.document().whatAmIOn( w->fromScreen( mplc ), *w ); + tqmoco = mdoc.document().whatAmIOn( w->fromScreen( mplc ), *w ); - rightClicked( moco, mplc, *w ); + rightClicked( tqmoco, mplc, *w ); } void BaseMode::mouseMoved( TQMouseEvent* e, KigWidget* w ) { std::vector os = mdoc.document().whatAmIOn( w->fromScreen( e->pos() ), *w ); - mouseMoved( os, e->pos(), *w, e->state() & Qt::ShiftButton ); + mouseMoved( os, e->pos(), *w, e->state() & TQt::ShiftButton ); } void BaseMode::dragRect( const TQPoint&, KigWidget& ) @@ -151,7 +151,7 @@ void BaseMode::enableActions() std::vector BaseMode::oco() { - return moco; + return tqmoco; } TQPoint BaseMode::pointLocation() diff --git a/kig/modes/base_mode.h b/kig/modes/base_mode.h index cb029abf..044b8b65 100644 --- a/kig/modes/base_mode.h +++ b/kig/modes/base_mode.h @@ -31,7 +31,7 @@ class BaseMode : public KigMode { TQPoint mplc; - std::vector moco; + std::vector tqmoco; void leftClicked( TQMouseEvent* e, KigWidget* v ); void leftMouseMoved( TQMouseEvent*, KigWidget* ); diff --git a/kig/modes/construct_mode.cc b/kig/modes/construct_mode.cc index b535ee5c..67f83632 100644 --- a/kig/modes/construct_mode.cc +++ b/kig/modes/construct_mode.cc @@ -69,20 +69,20 @@ void BaseConstructMode::leftReleased( TQMouseEvent* e, KigWidget* v ) ObjectHolder* o = 0; bool keyCtrlOrShift = ( e->state() & ( ControlButton | ShiftButton) ) != 0; - std::vector moco = oco(); - if ( ! moco.empty() ) + std::vector tqmoco = oco(); + if ( ! tqmoco.empty() ) { std::vector goodargs; - if ( !moco.empty() ) + if ( !tqmoco.empty() ) { std::vector::const_iterator it; - std::vector testargs = getCalcers( mparents ); - for ( std::vector::const_iterator i = moco.begin(); i != moco.end(); ++i ) + std::vector testargs = getCalcers( mtqparents ); + for ( std::vector::const_iterator i = tqmoco.begin(); i != tqmoco.end(); ++i ) { - it = std::find( mparents.begin(), mparents.end(), *i ); + it = std::find( mtqparents.begin(), mtqparents.end(), *i ); bool newdup = - ( it == mparents.end() ) || - isAlreadySelectedOK( testargs, it - mparents.begin() ); + ( it == mtqparents.end() ) || + isAlreadySelectedOK( testargs, it - mtqparents.begin() ); if ( newdup ) { testargs.push_back( ( *i )->calcer() ); @@ -103,16 +103,16 @@ void BaseConstructMode::leftReleased( TQMouseEvent* e, KigWidget* v ) void BaseConstructMode::leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ) { - std::vector::iterator it = std::find( mparents.begin(), mparents.end(), o ); - std::vector nargs = getCalcers( mparents ); + std::vector::iterator it = std::find( mtqparents.begin(), mtqparents.end(), o ); + std::vector nargs = getCalcers( mtqparents ); // // mp: duplicationchecked controls whether the arguments list is // free of duplications or if a duplication is safe (asking this to // the Constructor class through the "isAlreadySelectedOK" method). // bool duplicationchecked = - ( it == mparents.end() ) || - isAlreadySelectedOK( nargs, it - mparents.begin() ); + ( it == mtqparents.end() ) || + isAlreadySelectedOK( nargs, it - mtqparents.begin() ); if ( o && duplicationchecked ) { nargs.push_back( o->calcer() ); @@ -123,7 +123,7 @@ void BaseConstructMode::leftClickedObject( } } - nargs = getCalcers( mparents ); + nargs = getCalcers( mtqparents ); nargs.push_back( mpt.get() ); if ( wantArgs( nargs, mdoc.document(), w ) ) { @@ -137,7 +137,7 @@ void BaseConstructMode::leftClickedObject( return; } - nargs = getCalcers( mparents ); + nargs = getCalcers( mtqparents ); nargs.push_back( mcursor ); if ( wantArgs( nargs, mdoc.document(), w ) ) @@ -157,7 +157,7 @@ void BaseConstructMode::leftClickedObject( void BaseConstructMode::midClicked( const TQPoint& p, KigWidget& w ) { - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); args.push_back( mpt.get() ); if ( wantArgs( args, mdoc.document(), w ) ) { @@ -179,10 +179,10 @@ void BaseConstructMode::rightClicked( const std::vector&, const T void BaseConstructMode::mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ) { - mdoc.emitStatusBarText( selectStatement( getCalcers( mparents ), w ) ); + mdoc.emitStatusBarText( selectStatement( getCalcers( mtqparents ), w ) ); w.updateCurPix(); - KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); Coordinate ncoord = w.fromScreen( p ); if ( shiftpressed ) @@ -192,19 +192,19 @@ void BaseConstructMode::mouseMoved( const std::vector& os, const mcursor->move( ncoord, mdoc.document() ); mcursor->calc( mdoc.document() ); - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); bool duplicationchecked = false; std::vector goodargs; if ( ! os.empty() ) { std::vector::const_iterator it; - std::vector testargs = getCalcers( mparents ); + std::vector testargs = getCalcers( mtqparents ); for ( std::vector::const_iterator i = os.begin(); i != os.end(); ++i ) { - it = std::find( mparents.begin(), mparents.end(), *i ); + it = std::find( mtqparents.begin(), mtqparents.end(), *i ); bool newdup = - ( it == mparents.end() ) || - isAlreadySelectedOK( args, it - mparents.begin() ); + ( it == mtqparents.end() ) || + isAlreadySelectedOK( args, it - mtqparents.begin() ); if ( newdup ) { testargs.push_back( ( *i )->calcer() ); @@ -229,9 +229,9 @@ void BaseConstructMode::mouseMoved( const std::vector& os, const } else { - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); args.push_back( mpt.get() ); - std::vector argscursor = getCalcers( mparents ); + std::vector argscursor = getCalcers( mtqparents ); argscursor.push_back( mcursor ); bool text = true; if ( wantArgs( args, mdoc.document(), w ) ) @@ -274,15 +274,15 @@ void BaseConstructMode::mouseMoved( const std::vector& os, const void BaseConstructMode::selectObject( ObjectHolder* o, KigWidget& w ) { - mparents.push_back( o ); - std::vector args = getCalcers( mparents ); + mtqparents.push_back( o ); + std::vector args = getCalcers( mtqparents ); if ( wantArgs( args, mdoc.document(), w ) == ArgsParser::Complete ) { handleArgs( args, w ); }; - w.redrawScreen( mparents ); + w.redrawScreen( mtqparents ); } PointConstructMode::PointConstructMode( KigPart& d ) @@ -308,7 +308,7 @@ void PointConstructMode::leftClickedObject( mdoc.addObject( new ObjectHolder( mpt.get() ) ); w.redrawScreen( std::vector() ); - mdoc.emitStatusBarText( TQString::null ); + mdoc.emitStatusBarText( TQString() ); mdoc.doneMode( this ); } @@ -330,7 +330,7 @@ void PointConstructMode::mouseMoved( bool shiftpressed ) { w.updateCurPix(); - KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); Coordinate ncoord = w.fromScreen( p ); if ( shiftpressed ) @@ -373,7 +373,7 @@ void BaseConstructMode::selectObjects( const std::vector& os, Kig { for ( std::vector::const_iterator i = os.begin(); i != os.end(); ++i ) { - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); assert( wantArgs( args, mdoc.document(), w ) != ArgsParser::Complete ); selectObject( *i, w ); }; @@ -482,22 +482,22 @@ void TestConstructMode::leftClickedObject( ObjectHolder* o, const TQPoint& p, TQPoint qloc = p + TQPoint( -40, 0 ); Coordinate loc = w.fromScreen( qloc ); - std::vector parents; - parents.push_back( new ObjectConstCalcer( new IntImp( test_has_frame_dflt ) ) ); - parents.push_back( new ObjectConstCalcer( new PointImp( loc ) ) ); - parents.push_back( new ObjectConstCalcer( new StringImp( TQString::fromLatin1( "%1" ) ) ) ); + std::vector tqparents; + tqparents.push_back( new ObjectConstCalcer( new IntImp( test_has_frame_dflt ) ) ); + tqparents.push_back( new ObjectConstCalcer( new PointImp( loc ) ) ); + tqparents.push_back( new ObjectConstCalcer( new StringImp( TQString::tqfromLatin1( "%1" ) ) ) ); assert( mresult->imp()->inherits( TestResultImp::stype() ) ); - parents.push_back( + tqparents.push_back( new ObjectPropertyCalcer( - mresult.get(), mresult->imp()->propertiesInternalNames().findIndex( "test-result" ) ) ); - parents.back()->calc( mdoc.document() ); + mresult.get(), mresult->imp()->propertiesInternalNames().tqfindIndex( "test-result" ) ) ); + tqparents.back()->calc( mdoc.document() ); - ObjectCalcer* ret = new ObjectTypeCalcer( TextType::instance(), parents ); + ObjectCalcer* ret = new ObjectTypeCalcer( TextType::instance(), tqparents ); ret->calc( mdoc.document() ); mdoc.addObject( new ObjectHolder( ret ) ); w.unsetCursor(); - mdoc.emitStatusBarText( TQString::null ); + mdoc.emitStatusBarText( TQString() ); finish(); } @@ -529,7 +529,7 @@ void TestConstructMode::mouseMoved( const std::vector& os, const w.setCursor( KCursor::blankCursor() ); w.updateCurPix(); - KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); TQPoint qloc = p + TQPoint( -40, 0 ); Coordinate loc = w.fromScreen( qloc ); @@ -557,7 +557,7 @@ TQString TestConstructMode::selectStatement( const std::vector& s transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = mtype->argsParser().selectStatement( args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); return i18n( ret.c_str() ); } diff --git a/kig/modes/construct_mode.h b/kig/modes/construct_mode.h index be937723..67fe5e28 100644 --- a/kig/modes/construct_mode.h +++ b/kig/modes/construct_mode.h @@ -71,7 +71,7 @@ class BaseConstructMode // only sensible place where to deallocate it is in the destructor // of this class // ObjectHolder* mcursorholder; - std::vector mparents; + std::vector mtqparents; void leftReleased( TQMouseEvent* e, KigWidget* v ); diff --git a/kig/modes/dragrectmode.cc b/kig/modes/dragrectmode.cc index 3a827009..8091f8cb 100644 --- a/kig/modes/dragrectmode.cc +++ b/kig/modes/dragrectmode.cc @@ -48,7 +48,7 @@ void DragRectMode::moved( const TQPoint& p, KigWidget& w ) std::vector overlay; if ( mstartselected ) { - KigPainter pt( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pt( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); pt.drawFilledRect( TQRect( p, mstart ) ); overlay = pt.overlay(); }; diff --git a/kig/modes/edittype.cc b/kig/modes/edittype.cc index f4ed323e..e9776204 100644 --- a/kig/modes/edittype.cc +++ b/kig/modes/edittype.cc @@ -31,8 +31,8 @@ #include #include -EditType::EditType( TQWidget* parent, TQString name, TQString desc, TQString icon ) - : EditTypeBase( parent, "edittype", true ), mname( name ), mdesc( desc ), micon( icon ) +EditType::EditType( TQWidget* tqparent, TQString name, TQString desc, TQString icon ) + : EditTypeBase( tqparent, "edittype", true ), mname( name ), mdesc( desc ), micon( icon ) { // improving GUI look'n'feel... buttonHelp->setGuiItem( KStdGuiItem::help() ); @@ -50,8 +50,8 @@ EditType::~EditType() void EditType::helpSlot() { - kapp->invokeHelp( TQString::fromLatin1( "working-with-types" ), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "working-with-types" ), + TQString::tqfromLatin1( "kig" ) ); } void EditType::okSlot() diff --git a/kig/modes/edittype.h b/kig/modes/edittype.h index c6f40783..ac578808 100644 --- a/kig/modes/edittype.h +++ b/kig/modes/edittype.h @@ -28,12 +28,13 @@ class EditType : public EditTypeBase { Q_OBJECT + TQ_OBJECT TQString mname; TQString mdesc; TQString micon; public: - EditType( TQWidget* parent, TQString name = TQString::null, TQString desc = TQString::null, TQString icon = TQString::null ); + EditType( TQWidget* tqparent, TQString name = TQString(), TQString desc = TQString(), TQString icon = TQString() ); ~EditType(); const TQString name() const; const TQString description() const; diff --git a/kig/modes/edittypebase.ui b/kig/modes/edittypebase.ui index 0dc8129d..705bc92d 100644 --- a/kig/modes/edittypebase.ui +++ b/kig/modes/edittypebase.ui @@ -1,10 +1,10 @@ EditTypeBase - + EditTypeBase - + 0 0 @@ -33,7 +33,7 @@ 6 - + label15 @@ -41,23 +41,23 @@ Here you can modify the name, the description and the icon of this macro type. - + - layout8 + tqlayout8 unnamed - + - layout8 + tqlayout8 unnamed - + Layout2 @@ -71,7 +71,7 @@ 6 - + label16 @@ -89,7 +89,7 @@ - + Layout1 @@ -103,7 +103,7 @@ 6 - + label17 @@ -123,9 +123,9 @@ - + - layout23 + tqlayout23 @@ -152,7 +152,7 @@ Expanding - + 20 20 @@ -177,9 +177,9 @@ Horizontal - + - layout24 + tqlayout24 @@ -212,7 +212,7 @@ Expanding - + 20 20 @@ -270,12 +270,12 @@ cancelSlot() - + helpSlot() okSlot() cancelSlot() - - + + klineedit.h klineedit.h diff --git a/kig/modes/label.cc b/kig/modes/label.cc index 578e15dd..3471d6dc 100644 --- a/kig/modes/label.cc +++ b/kig/modes/label.cc @@ -55,8 +55,8 @@ public: TQPoint plc; // the currently selected coordinate Coordinate mcoord; - // the possible parent object that defines the location of the label.. - ObjectCalcer* locationparent; + // the possible tqparent object that defines the location of the label.. + ObjectCalcer* locationtqparent; // the text is only kept in the text input widget, not here // TQString mtext; @@ -64,8 +64,8 @@ public: // the property objects we'll be using as args, we keep a reference // to them in the args object, and keep a pointer to them ( or 0 ) // in the correct order in args ( separately, because we can't use - // the order of the parents of a ReferenceObject, and certainly - // can't give 0 as a parent.. + // the order of the tqparents of a ReferenceObject, and certainly + // can't give 0 as a tqparent.. argvect args; // if we're ReallySelectingArgs, then this var points to the arg @@ -90,7 +90,7 @@ TextLabelModeBase::~TextLabelModeBase() TextLabelModeBase::TextLabelModeBase( KigPart& doc ) : KigMode( doc ), d( new Private ) { - d->locationparent = 0; + d->locationtqparent = 0; d->lpc = 0; d->mwawd = SelectingLocation; d->wiz = new TextLabelWizard( doc.widget(), this ); @@ -212,7 +212,7 @@ void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w ) { std::vector os = mdoc.document().whatAmIOn( w->fromScreen( e->pos() ), *w ); bool attachable = false; - d->locationparent = 0; + d->locationtqparent = 0; for ( std::vector::iterator i = os.begin(); i != os.end(); ++i ) { if( (*i)->imp()->attachPoint().valid() || @@ -220,7 +220,7 @@ void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w ) (*i)->imp()->inherits( CurveImp::stype() ) ) { attachable = true; - d->locationparent = (*i)->calcer(); + d->locationtqparent = (*i)->calcer(); break; }; }; @@ -228,10 +228,10 @@ void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w ) if ( attachable ) { w->setCursor( KCursor::handCursor() ); - TQString s = d->locationparent->imp()->type()->attachToThisStatement(); + TQString s = d->locationtqparent->imp()->type()->attachToThisStatement(); mdoc.emitStatusBarText( s ); - KigPainter p( w->screenInfo(), &w->curPix, mdoc.document() ); + KigPainter p( w->screenInfo(), TQT_TQPAINTDEVICE(&w->curPix), mdoc.document() ); // set the text next to the arrow cursor TQPoint point = e->pos(); @@ -296,7 +296,7 @@ void TextLabelModeBase::finishPressed() "value for. Please remove them or select enough arguments." ) ); else { - finish( d->mcoord, s, d->args, needframe, d->locationparent ); + finish( d->mcoord, s, d->args, needframe, d->locationtqparent ); killMode(); }; } @@ -376,7 +376,7 @@ void TextLabelModeBase::updateLinksLabel() } else // otherwise, we show a stub... - linktext = i18n( "argument %1" ).arg( count + 1 ); + linktext = i18n( "argument %1" ).tqarg( count + 1 ); d->wiz->myCustomWidget1->addLink( linktext, buf ); // set pos and prevpos to the next char after the last match, so @@ -391,7 +391,7 @@ void TextLabelModeBase::updateLinksLabel() d->wiz->myCustomWidget1->addText( s.mid( prevpos ), buf ); d->wiz->myCustomWidget1->applyEdit( buf ); - d->wiz->relayoutArgsPage(); + d->wiz->retqlayoutArgsPage(); d->wiz->resize( d->wiz->size() ); } @@ -406,7 +406,7 @@ void TextLabelModeBase::linkClicked( int i ) d->mwawd = ReallySelectingArgs; d->mwaaws = i; - mdoc.emitStatusBarText( i18n( "Selecting argument %1" ).arg( i + 1 ) ); + mdoc.emitStatusBarText( i18n( "Selecting argument %1" ).tqarg( i + 1 ) ); } void TextLabelModeBase::redrawScreen( KigWidget* w ) @@ -452,7 +452,7 @@ TextLabelConstructionMode::~TextLabelConstructionMode() void TextLabelConstructionMode::finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ) + ObjectCalcer* locationtqparent ) { std::vector args; for ( argvect::const_iterator i = props.begin(); @@ -460,8 +460,8 @@ void TextLabelConstructionMode::finish( args.push_back( i->get() ); ObjectHolder* label = 0; - if ( locationparent ) - label = ObjectFactory::instance()->attachedLabel( s, locationparent, coord, needframe, args, mdoc.document() ); + if ( locationtqparent ) + label = ObjectFactory::instance()->attachedLabel( s, locationtqparent, coord, needframe, args, mdoc.document() ); else label = ObjectFactory::instance()->label( s, coord, needframe, args, mdoc.document() ); mdoc.addObject( label ); @@ -471,10 +471,10 @@ TextLabelRedefineMode::TextLabelRedefineMode( KigPart& d, ObjectTypeCalcer* labe : TextLabelModeBase( d ), mlabel( label ) { assert( label->imp()->inherits( TextImp::stype() ) ); - std::vector parents = label->parents(); - assert( parents.size() >= 3 ); - std::vector firstthree( parents.begin(), parents.begin() + 3 ); - std::vector rest( parents.begin() + 3, parents.end() ); + std::vector tqparents = label->tqparents(); + assert( tqparents.size() >= 3 ); + std::vector firstthree( tqparents.begin(), tqparents.begin() + 3 ); + std::vector rest( tqparents.begin() + 3, tqparents.end() ); firstthree = TextType::instance()->argParser().parse( firstthree ); assert( firstthree[0]->imp()->inherits( IntImp::stype() ) ); @@ -507,12 +507,12 @@ TextLabelRedefineMode::~TextLabelRedefineMode() void TextLabelRedefineMode::finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ) + ObjectCalcer* locationtqparent ) { - std::vector parents = mlabel->parents(); - assert( parents.size() >= 3 ); - std::vector firstthree( parents.begin(), parents.begin() + 3 ); - std::vector rest( parents.begin() + 3, parents.end() ); + std::vector tqparents = mlabel->tqparents(); + assert( tqparents.size() >= 3 ); + std::vector firstthree( tqparents.begin(), tqparents.begin() + 3 ); + std::vector rest( tqparents.begin() + 3, tqparents.end() ); firstthree = TextType::instance()->argParser().parse( firstthree ); KigCommand* kc = new KigCommand( mdoc, i18n( "Change Label" ) ); @@ -538,7 +538,7 @@ void TextLabelRedefineMode::finish( static_cast( firstthree[2] )->setImp( new StringImp( s ) ); mon.finish( kc ); - std::vector oldparents = mlabel->parents(); + std::vector oldtqparents = mlabel->tqparents(); std::vector p; for ( argvect::const_iterator i = props.begin(); i != props.end(); ++i ) @@ -552,19 +552,19 @@ void TextLabelRedefineMode::finish( * take advantage of the method "getAttachPoint" that should * do all the work; it is also used when creating a new label */ - np[1] = ObjectFactory::instance()->getAttachPoint( locationparent, coord, mdoc.document() ); + np[1] = ObjectFactory::instance()->getAttachPoint( locationtqparent, coord, mdoc.document() ); /* this is the old code, just in case... */ -// if ( locationparent && locationparent->imp()->inherits( CurveImp::stype() ) ) +// if ( locationtqparent && locationtqparent->imp()->inherits( CurveImp::stype() ) ) // { -// double param = static_cast( locationparent->imp() )->getParam( coord, mdoc.document() ); -// np[1] = ObjectFactory::instance()->constrainedPointCalcer( locationparent, param ); +// double param = static_cast( locationtqparent->imp() )->getParam( coord, mdoc.document() ); +// np[1] = ObjectFactory::instance()->constrainedPointCalcer( locationtqparent, param ); // np[1]->calc( mdoc.document() ); // } -// else if ( locationparent ) +// else if ( locationtqparent ) // { -// assert( locationparent->imp()->inherits( PointImp::stype() ) ); -// np[1] = locationparent; +// assert( locationtqparent->imp()->inherits( PointImp::stype() ) ); +// np[1] = locationtqparent; // } // else // np[1] = new ObjectConstCalcer( new PointImp( coord ) ); @@ -585,5 +585,5 @@ void TextLabelModeBase::setFrame( bool f ) void TextLabelModeBase::setLocationParent( ObjectCalcer* o ) { - d->locationparent = o; + d->locationtqparent = o; } diff --git a/kig/modes/label.h b/kig/modes/label.h index 828c2e29..7d8f842a 100644 --- a/kig/modes/label.h +++ b/kig/modes/label.h @@ -35,7 +35,7 @@ class ObjectCalcer; /** * this is the base class for TextLabelConstructionMode and * TextLabelRedefineMode.. most of the work is done in this class, - * with some specific things delegated to the children.. Template + * with some specific things delegated to the tqchildren.. Template * method pattern, right ? :) */ class TextLabelModeBase @@ -65,14 +65,14 @@ protected: void setLocationParent( ObjectCalcer* o ); /** * objects you pass here, should be newly created property objects, - * that have no children.. + * that have no tqchildren.. */ void setPropertyObjects( const argvect& props ); void setFrame( bool f ); virtual void finish( const Coordinate& c, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ) = 0; + ObjectCalcer* locationtqparent ) = 0; private: // the KigMode interface.. @@ -111,7 +111,7 @@ public: void finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ); + ObjectCalcer* locationtqparent ); }; class TextLabelRedefineMode @@ -120,7 +120,7 @@ class TextLabelRedefineMode ObjectTypeCalcer* mlabel; void finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ); + ObjectCalcer* locationtqparent ); public: TextLabelRedefineMode( KigPart& d, ObjectTypeCalcer* label ); ~TextLabelRedefineMode(); diff --git a/kig/modes/linkslabel.cpp b/kig/modes/linkslabel.cpp index 96a73a8f..8d711d65 100644 --- a/kig/modes/linkslabel.cpp +++ b/kig/modes/linkslabel.cpp @@ -33,31 +33,31 @@ using namespace std; class LinksLabel::Private { public: - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; std::vector labels; std::vector urllabels; }; -LinksLabel::LinksLabel( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +LinksLabel::LinksLabel( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { p = new Private; - p->layout = new TQHBoxLayout( this ); + p->tqlayout = new TQHBoxLayout( this ); TQLabel* l = new TQLabel( TQString::fromUtf8( "Dit is een " ), this ); p->labels.push_back( l ); - p->layout->addWidget( l ); + p->tqlayout->addWidget( l ); KURLLabel* u = new KURLLabel( TQString::fromUtf8( "http://www.kde.org/" ), TQString::fromUtf8( "url"), this ); p->urllabels.push_back( u ); - p->layout->addWidget( u ); + p->tqlayout->addWidget( u ); l = new TQLabel( TQString::fromUtf8( " !" ), this ); p->labels.push_back( l ); - p->layout->addWidget(l ); + p->tqlayout->addWidget(l ); - p->layout->activate(); + p->tqlayout->activate(); } LinksLabel::~LinksLabel() @@ -67,8 +67,8 @@ LinksLabel::~LinksLabel() void LinksLabel::urlClicked() { - const TQObject* o = sender(); - std::vector::iterator i = std::find( p->urllabels.begin(), p->urllabels.end(), static_cast( o ) ); + const TQObject* o = TQT_TQOBJECT_CONST(const_cast(sender())); + std::vector::iterator i = std::find( p->urllabels.begin(), p->urllabels.end(), static_cast(TQT_TQWIDGET_CONST( o )) ); assert( i != p->urllabels.end() ); emit linkClicked( i - p->urllabels.begin() ); } @@ -89,7 +89,7 @@ void LinksLabel::addLink( const TQString& s, LinksLabelEditBuf& buf ) } namespace { - void deleteObj( TQObject* o ) { delete o; } + void deleteObj( TQWidget* o ) { delete o; } } void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) @@ -99,8 +99,8 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) p->urllabels.clear(); p->labels.clear(); - delete p->layout; - p->layout = new TQHBoxLayout( this ); + delete p->tqlayout; + p->tqlayout = new TQHBoxLayout( this ); for ( LinksLabelEditBuf::vec::iterator i = buf.data.begin(); i != buf.data.end(); ++i ) { @@ -111,7 +111,7 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) KURLLabel* l = new KURLLabel( TQString::fromUtf8( "http://edu.kde.org/kig" ), i->second, this ); p->urllabels.push_back( l ); - p->layout->addWidget( l ); + p->tqlayout->addWidget( l ); connect( l, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( urlClicked() ) ); } else @@ -119,15 +119,15 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) // we need a normal label... TQLabel* l = new TQLabel( i->second, this ); p->labels.push_back( l ); - p->layout->addWidget( l ); + p->tqlayout->addWidget( l ); }; }; TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - p->layout->addItem( spacer ); + p->tqlayout->addItem( spacer ); - p->layout->activate(); + p->tqlayout->activate(); std::for_each( p->urllabels.begin(), p->urllabels.end(), mem_fun( &TQWidget::show ) ); std::for_each( p->labels.begin(), p->labels.end(), mem_fun( &TQWidget::show ) ); diff --git a/kig/modes/linkslabel.h b/kig/modes/linkslabel.h index 89d1c76e..8ed8b04a 100644 --- a/kig/modes/linkslabel.h +++ b/kig/modes/linkslabel.h @@ -27,12 +27,13 @@ * this widget shows a line of text, with some links underlined, and * emits a signal if one of the links is clicked... */ -class LinksLabel : public QWidget +class LinksLabel : public TQWidget { Q_OBJECT + TQ_OBJECT public: - LinksLabel( TQWidget* parent = 0, const char* name = 0 ); + LinksLabel( TQWidget* tqparent = 0, const char* name = 0 ); ~LinksLabel(); class LinksLabelEditBuf diff --git a/kig/modes/macro.cc b/kig/modes/macro.cc index bc6f5dc5..ba6f98ab 100644 --- a/kig/modes/macro.cc +++ b/kig/modes/macro.cc @@ -167,7 +167,7 @@ void DefineMacroMode::dragRect( const TQPoint& p, KigWidget& w ) std::vector* objs = mwizard->currentPage() == mwizard->mpgiven ? &mgiven : &mfinal; DragRectMode dm( p, mdoc, w ); mdoc.runMode( &dm ); - KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); if ( ! dm.cancelled() ) { std::vector ret = dm.ret(); @@ -196,7 +196,7 @@ void DefineMacroMode::leftClickedObject( ObjectHolder* o, const TQPoint&, if ( isselected ) objs->erase( iter ); else objs->push_back( o ); - KigPainter p( w.screenInfo(), &w.stillPix, mdoc.document() ); + KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); p.drawObject( o, !isselected ); w.updateCurPix( p.overlay() ); w.updateWidget(); @@ -224,7 +224,7 @@ void DefineMacroMode::mouseMoved( const std::vector& os, const TQ // statusbar text mdoc.emitStatusBarText( selectstat ); - KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); // set the text next to the arrow cursor TQPoint point = pt; diff --git a/kig/modes/macrowizard.cc b/kig/modes/macrowizard.cc index 662e3a0d..4a240b74 100644 --- a/kig/modes/macrowizard.cc +++ b/kig/modes/macrowizard.cc @@ -24,8 +24,8 @@ #include #include -MacroWizard::MacroWizard( TQWidget* parent, DefineMacroMode* m ) - : MacroWizardBase( parent, "Define Macro Wizard", false ), mmode( m ) +MacroWizard::MacroWizard( TQWidget* tqparent, DefineMacroMode* m ) + : MacroWizardBase( tqparent, "Define Macro Wizard", false ), mmode( m ) { connect( KLineEdit2, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( nameTextChanged( const TQString& ) ) ); @@ -85,6 +85,6 @@ void MacroWizard::accept() void MacroWizard::slotHelpClicked() { - kapp->invokeHelp( TQString::fromLatin1( "defining-macros"), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "defining-macros"), + TQString::tqfromLatin1( "kig" ) ); } diff --git a/kig/modes/macrowizard.h b/kig/modes/macrowizard.h index 96318ec9..b3b59c66 100644 --- a/kig/modes/macrowizard.h +++ b/kig/modes/macrowizard.h @@ -25,8 +25,9 @@ class DefineMacroMode; class MacroWizard : public MacroWizardBase { Q_OBJECT + TQ_OBJECT public: - MacroWizard( TQWidget* parent, DefineMacroMode* m ); + MacroWizard( TQWidget* tqparent, DefineMacroMode* m ); ~MacroWizard(); void back(); diff --git a/kig/modes/macrowizardbase.ui b/kig/modes/macrowizardbase.ui index d3929ad8..db62a8b1 100644 --- a/kig/modes/macrowizardbase.ui +++ b/kig/modes/macrowizardbase.ui @@ -1,10 +1,10 @@ MacroWizardBase - + MacroWizardBase - + 4 0 @@ -23,7 +23,7 @@ Define New Macro - + mpgiven @@ -40,7 +40,7 @@ 6 - + TextLabel1 @@ -55,13 +55,13 @@ Select the "given" objects for your new macro and press "Next". - + WordBreak|AlignVCenter - + mpfinal @@ -78,7 +78,7 @@ 6 - + TextLabel2 @@ -88,7 +88,7 @@ - + mpname @@ -105,7 +105,7 @@ 6 - + TextLabel1_2 @@ -113,7 +113,7 @@ Enter a name and description for your new type. - + Layout2 @@ -127,7 +127,7 @@ 6 - + TextLabel2_2 @@ -145,7 +145,7 @@ - + Layout1 @@ -159,7 +159,7 @@ 6 - + TextLabel2_2_2 @@ -180,7 +180,7 @@ - + klineedit.h klineedit.h diff --git a/kig/modes/mode.h b/kig/modes/mode.h index 18425d2d..e9fdd9ea 100644 --- a/kig/modes/mode.h +++ b/kig/modes/mode.h @@ -34,7 +34,7 @@ class StdConstructionMode; * document... It tells us how to respond to a certain event. */ class KigMode - : public Qt + : public TQt { public: virtual ~KigMode(); diff --git a/kig/modes/moving.cc b/kig/modes/moving.cc index 533b15d4..980a5feb 100644 --- a/kig/modes/moving.cc +++ b/kig/modes/moving.cc @@ -55,13 +55,13 @@ void MovingModeBase::initScreen( const std::vector& in ) std::inserter( notmovingobjs, notmovingobjs.begin() ) ); mview.clearStillPix(); - KigPainter p( mview.screenInfo(), &mview.stillPix, mdoc.document() ); + KigPainter p( mview.screenInfo(), TQT_TQPAINTDEVICE(&mview.stillPix), mdoc.document() ); p.drawGrid( mdoc.document().coordinateSystem(), mdoc.document().grid(), mdoc.document().axes() ); p.drawObjects( notmovingobjs.begin(), notmovingobjs.end(), false ); mview.updateCurPix(); - KigPainter p2( mview.screenInfo(), &mview.curPix, mdoc.document() ); + KigPainter p2( mview.screenInfo(), TQT_TQPAINTDEVICE(&mview.curPix), mdoc.document() ); p2.drawObjects( drawableset.begin(), drawableset.end(), true ); } @@ -86,12 +86,12 @@ void MovingModeBase::mouseMoved( TQMouseEvent* e, KigWidget* v ) v->updateCurPix(); Coordinate c = v->fromScreen( e->pos() ); - bool snaptogrid = e->state() & Qt::ShiftButton; + bool snaptogrid = e->state() & TQt::ShiftButton; moveTo( c, snaptogrid ); for ( std::vector::iterator i = mcalcable.begin(); i != mcalcable.end(); ++i ) ( *i )->calc( mdoc.document() ); - KigPainter p( v->screenInfo(), &v->curPix, mdoc.document() ); + KigPainter p( v->screenInfo(), TQT_TQPAINTDEVICE(&v->curPix), mdoc.document() ); // TODO: only draw the explicitly moving objects as selected, the // other ones as deselected.. Needs some support from the // subclasses.. @@ -129,8 +129,8 @@ MovingMode::MovingMode( const std::vector& os, const Coordinate& emo.push_back( ( *i )->calcer() ); d->refmap[( *i )->calcer()] = (*i)->moveReferencePoint(); objs.insert( ( *i )->calcer() ); - std::vector parents = ( *i )->calcer()->movableParents(); - objs.insert( parents.begin(), parents.end() ); + std::vector tqparents = ( *i )->calcer()->movableParents(); + objs.insert( tqparents.begin(), tqparents.end() ); }; emo = calcPath( emo ); @@ -143,8 +143,8 @@ MovingMode::MovingMode( const std::vector& os, const Coordinate& std::set tmp = objs; for ( std::set::const_iterator i = tmp.begin(); i != tmp.end(); ++i ) { - std::set children = getAllChildren(*i); - objs.insert( children.begin(), children.end() ); + std::set tqchildren = getAllChildren(*i); + objs.insert( tqchildren.begin(), tqchildren.end() ); } initScreen( calcPath( std::vector( objs.begin(), objs.end() ) ) ); @@ -154,7 +154,7 @@ void MovingMode::stopMove() { TQString text = d->emo.size() == 1 ? d->emo[0]->imp()->type()->moveAStatement() : - i18n( "Move %1 Objects" ).arg( d->emo.size() ); + i18n( "Move %1 Objects" ).tqarg( d->emo.size() ); KigCommand* mc = new KigCommand( mdoc, text ); d->mon->finish( mc ); mdoc.history()->addCommand( mc ); @@ -164,7 +164,7 @@ void MovingMode::moveTo( const Coordinate& o, bool snaptogrid ) { for( std::vector::iterator i = d->emo.begin(); i != d->emo.end(); ++i ) { - assert( d->refmap.find( *i ) != d->refmap.end() ); + assert( d->refmap.tqfind( *i ) != d->refmap.end() ); Coordinate nc = d->refmap[*i] + ( o - d->pwwsm ); if ( snaptogrid ) nc = mdoc.document().coordinateSystem().snapToGrid( nc, mview ); (*i)->move( nc, mdoc.document() ); @@ -176,14 +176,14 @@ PointRedefineMode::PointRedefineMode( ObjectHolder* p, KigPart& d, KigWidget& v { assert( dynamic_cast( p->calcer() ) ); moldtype = static_cast( p->calcer() )->type(); - std::vector oldparents = p->calcer()->parents(); - std::copy( oldparents.begin(), oldparents.end(), std::back_inserter( moldparents ) ); - - std::vector parents = getAllParents( mp->calcer() ); - mmon = new MonitorDataObjects( parents ); - std::vector moving = parents; - std::set children = getAllChildren( mp->calcer() ); - std::copy( children.begin(), children.end(), std::back_inserter( moving ) ); + std::vector oldtqparents = p->calcer()->tqparents(); + std::copy( oldtqparents.begin(), oldtqparents.end(), std::back_inserter( moldtqparents ) ); + + std::vector tqparents = getAllParents( mp->calcer() ); + mmon = new MonitorDataObjects( tqparents ); + std::vector moving = tqparents; + std::set tqchildren = getAllChildren( mp->calcer() ); + std::copy( tqchildren.begin(), tqchildren.end(), std::back_inserter( moving ) ); initScreen( moving ); } @@ -224,22 +224,22 @@ void PointRedefineMode::stopMove() assert( dynamic_cast( mp->calcer() ) ); ObjectTypeCalcer* mpcalc = static_cast( mp->calcer() ); - std::vector newparents = mpcalc->parents(); - std::vector newparentsref( - newparents.begin(), newparents.end() ); + std::vector newtqparents = mpcalc->tqparents(); + std::vector newtqparentsref( + newtqparents.begin(), newtqparents.end() ); const ObjectType* newtype = mpcalc->type(); - std::vector oldparents; - for( std::vector::iterator i = moldparents.begin(); - i != moldparents.end(); ++i ) - oldparents.push_back( i->get() ); + std::vector oldtqparents; + for( std::vector::iterator i = moldtqparents.begin(); + i != moldtqparents.end(); ++i ) + oldtqparents.push_back( i->get() ); mpcalc->setType( moldtype ); - mpcalc->setParents( oldparents ); + mpcalc->setParents( oldtqparents ); mp->calc( mdoc.document() ); KigCommand* command = new KigCommand( mdoc, i18n( "Redefine Point" ) ); command->addTask( - new ChangeParentsAndTypeTask( mpcalc, newparents, newtype ) ); + new ChangeParentsAndTypeTask( mpcalc, newtqparents, newtype ) ); mmon->finish( command ); mdoc.history()->addCommand( command ); } diff --git a/kig/modes/moving.h b/kig/modes/moving.h index 7c27aa4e..8a75e62a 100644 --- a/kig/modes/moving.h +++ b/kig/modes/moving.h @@ -88,7 +88,7 @@ class PointRedefineMode : public MovingModeBase { ObjectHolder* mp; - std::vector moldparents; + std::vector moldtqparents; const ObjectType* moldtype; MonitorDataObjects* mmon; void stopMove(); diff --git a/kig/modes/normal.cc b/kig/modes/normal.cc index 1fa45d00..c4dd7f4f 100644 --- a/kig/modes/normal.cc +++ b/kig/modes/normal.cc @@ -133,7 +133,7 @@ void NormalMode::dragRect( const TQPoint& p, KigWidget& w ) DragRectMode d( p, mdoc, w ); mdoc.runMode( &d ); - KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); if ( ! d.cancelled() ) { @@ -174,7 +174,7 @@ void NormalMode::dragObject( const std::vector& oco, const TQPoin void NormalMode::leftClickedObject( ObjectHolder* o, const TQPoint&, KigWidget& w, bool ctrlOrShiftDown ) { - KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); if ( ! o ) { @@ -269,7 +269,7 @@ void NormalMode::mouseMoved( const std::vector& os, // statusbar text mdoc.emitStatusBarText( stat ); - KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); // set the text next to the arrow cursor TQPoint point = plc; diff --git a/kig/modes/popup.cc b/kig/modes/popup.cc index 489b4985..8a3d05e1 100644 --- a/kig/modes/popup.cc +++ b/kig/modes/popup.cc @@ -198,12 +198,12 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, else if ( single ) { if ( !objs[0]->name().isNull() ) - title = TQString::fromLatin1( "%1 %2" ).arg( objs[0]->imp()->type()->translatedName() ).arg( objs[0]->name() ); + title = TQString::tqfromLatin1( "%1 %2" ).tqarg( objs[0]->imp()->type()->translatedName() ).tqarg( objs[0]->name() ); else title = objs[0]->imp()->type()->translatedName(); } else - title = i18n( "%1 Objects" ).arg( objs.size() ); + title = i18n( "%1 Objects" ).tqarg( objs.size() ); insertTitle( title, 1 ); if ( !empty ) @@ -281,22 +281,22 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, i18n( "Set Co&lor" ), i18n( "Set &Pen Width" ), i18n( "Set St&yle" ), - TQString::null, + TQString(), i18n( "Set Coordinate S&ystem" ) }; static const TQString menuicons[NumberOfMenus] = { "centralsymmetry", "test", - TQString::null, + TQString(), "launch", "kig_text", "color_fill", // "colorize", "sizer", "paintbrush", - TQString::null, - TQString::null + TQString(), + TQString() }; int index = 1; for ( int i = 0; i < NumberOfMenus; ++i ) @@ -360,14 +360,14 @@ NormalModePopupObjects::~NormalModePopupObjects() static const TQColor* colors[] = { - &Qt::blue, - &Qt::black, - &Qt::gray, - &Qt::red, - &Qt::green, - &Qt::cyan, - &Qt::yellow, - &Qt::darkRed + &TQt::blue, + &TQt::black, + &TQt::gray, + &TQt::red, + &TQt::green, + &TQt::cyan, + &TQt::yellow, + &TQt::darkRed }; static const int numberofcolors = sizeof( colors ) / sizeof( TQColor* ); @@ -424,14 +424,14 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in point = false; if ( (*i)->drawer()->color() != color ) samecolor = false; }; - if ( ! samecolor ) color = Qt::blue; + if ( ! samecolor ) color = TQt::blue; TQPixmap p( point ? 20 : 50, 20 ); for ( int i = 1; i < 8; ++i ) { p.fill( popup.eraseColor() ); TQPainter ptr( &p ); ptr.setPen( TQPen( color, 1 ) ); - ptr.setBrush( TQBrush( color, Qt::SolidPattern ) ); + ptr.setBrush( TQBrush( color, TQt::SolidPattern ) ); if ( point ) { int size = 2*i; @@ -463,14 +463,14 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in if ( (*i)->drawer()->color() != color ) samecolor = false; }; bool point = ( npoints > nothers ); - if ( ! samecolor ) color = Qt::blue; + if ( ! samecolor ) color = TQt::blue; if ( point ) for ( int i = 0; i < 5; ++i ) { TQPixmap p( 20, 20 ); p.fill( popup.eraseColor() ); ScreenInfo si( Rect( -1, -1, 2, 2 ), p.rect() ); - KigPainter ptr( si, &p, popup.part().document(), false ); + KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false ); PointImp pt( Coordinate( 0, 0 ) ); ObjectDrawer d( color, -1, true, Qt::SolidLine, i ); d.draw( pt, ptr, false ); @@ -484,7 +484,7 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in TQPixmap p( 50, 20 ); p.fill( popup.eraseColor() ); ScreenInfo si( Rect( -2.5, -1, 5, 2 ), p.rect() ); - KigPainter ptr( si, &p, popup.part().document(), false ); + KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false ); LineImp line( Coordinate( -1, 0 ), Coordinate( 1, 0 ) ); Qt::PenStyle ps = penstyles[i]; ObjectDrawer d( color, -1, true, ps, 1 ); @@ -518,7 +518,7 @@ static void addNameLabel( ObjectCalcer* object, ObjectCalcer* namecalcer, const object->imp()->inherits( CurveImp::stype() ) ) attachto = object; ObjectHolder* label = ObjectFactory::instance()->attachedLabel( - TQString::fromLatin1( "%1" ), attachto, loc, namelabelneedsframe, args, doc.document() ); + TQString::tqfromLatin1( "%1" ), attachto, loc, namelabelneedsframe, args, doc.document() ); doc.addObject( label ); } @@ -871,7 +871,7 @@ void PropertiesActionsProvider::fillUpMenu( NormalModePopupObjects& popup, add &= ! prop->inherits( BogusImp::stype() ); // we don't want to construct PointImp's coordinate property, // since it would construct a point at the same place as its - // parent.. + // tqparent.. add &= ! ( o->imp()->inherits( PointImp::stype() ) && prop->inherits( PointImp::stype() ) ); } @@ -909,11 +909,11 @@ bool PropertiesActionsProvider::executeAction( } int propid = mprops[menu-1][id]; assert( os.size() == 1 ); - ObjectHolder* parent = os[0]; + ObjectHolder* tqparent = os[0]; if ( menu == NormalModePopupObjects::ShowMenu ) { std::vector args; - args.push_back( new ObjectPropertyCalcer( parent->calcer(), propid ) ); + args.push_back( new ObjectPropertyCalcer( tqparent->calcer(), propid ) ); args.back()->calc( doc.document() ); // TODO: recover the cursor position somehow... the following does not work // in general... @@ -924,14 +924,14 @@ bool PropertiesActionsProvider::executeAction( // /////// Coordinate c = Coordinate::invalidCoord(); Coordinate c = w.fromScreen( popup.plc() ); ObjectHolder* label = ObjectFactory::instance()->attachedLabel( - TQString::fromLatin1( "%1" ), parent->calcer(), c, + TQString::tqfromLatin1( "%1" ), tqparent->calcer(), c, false, args, doc.document() ); doc.addObject( label ); } else { ObjectHolder* h = new ObjectHolder( - new ObjectPropertyCalcer( parent->calcer(), propid ) ); + new ObjectPropertyCalcer( tqparent->calcer(), propid ) ); h->calc( doc.document() ); doc.addObject( h ); }; @@ -1182,7 +1182,7 @@ ObjectChooserPopup::ObjectChooserPopup( const TQPoint& p, KigWidget& view, for ( uint i = 0; i < mobjs.size(); i++ ) { insertItem( !mobjs[i]->name().isEmpty() - ? TQString::fromLatin1( "%1 %2" ).arg( mobjs[i]->imp()->type()->translatedName() ).arg( mobjs[i]->name() ) + ? TQString::tqfromLatin1( "%1 %2" ).tqarg( mobjs[i]->imp()->type()->translatedName() ).tqarg( mobjs[i]->name() ) : mobjs[i]->imp()->type()->translatedName(), i ); } diff --git a/kig/modes/popup.h b/kig/modes/popup.h index 76574b74..4db6838f 100644 --- a/kig/modes/popup.h +++ b/kig/modes/popup.h @@ -47,6 +47,7 @@ class NormalModePopupObjects : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: NormalModePopupObjects( KigPart& part, KigWidget& view, @@ -117,6 +118,7 @@ class ObjectChooserPopup : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kig/modes/textlabelwizard.cc b/kig/modes/textlabelwizard.cc index d562bbf3..70f484d8 100644 --- a/kig/modes/textlabelwizard.cc +++ b/kig/modes/textlabelwizard.cc @@ -26,8 +26,8 @@ #include -TextLabelWizard::TextLabelWizard( TQWidget* parent, TextLabelModeBase* mode ) - : TextLabelWizardBase( parent, "TextLabelWizard", false ), mmode( mode ) +TextLabelWizard::TextLabelWizard( TQWidget* tqparent, TextLabelModeBase* mode ) + : TextLabelWizardBase( tqparent, "TextLabelWizard", false ), mmode( mode ) { connect( labelTextInput, TQT_SIGNAL( textChanged() ), TQT_SLOT( textChanged() ) ); @@ -81,15 +81,15 @@ void TextLabelWizard::linkClicked( int which ) mmode->linkClicked( which ); } -void TextLabelWizard::relayoutArgsPage() +void TextLabelWizard::retqlayoutArgsPage() { select_arguments_pageLayout->activate(); - repaint(); + tqrepaint(); } void TextLabelWizard::slotHelpClicked() { - kapp->invokeHelp( TQString::fromLatin1( "text-labels" ), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "text-labels" ), + TQString::tqfromLatin1( "kig" ) ); } diff --git a/kig/modes/textlabelwizard.h b/kig/modes/textlabelwizard.h index bd51c1e0..2d192e7c 100644 --- a/kig/modes/textlabelwizard.h +++ b/kig/modes/textlabelwizard.h @@ -25,8 +25,9 @@ class TextLabelModeBase; class TextLabelWizard : public TextLabelWizardBase { Q_OBJECT + TQ_OBJECT public: - TextLabelWizard( TQWidget* parent, TextLabelModeBase* mode ); + TextLabelWizard( TQWidget* tqparent, TextLabelModeBase* mode ); ~TextLabelWizard(); void back(); @@ -34,7 +35,7 @@ public: void reject(); void accept(); - void relayoutArgsPage(); + void retqlayoutArgsPage(); private slots: void textChanged(); void linkClicked( int which ); diff --git a/kig/modes/textlabelwizardbase.ui b/kig/modes/textlabelwizardbase.ui index 4e195b0d..5cbace2c 100644 --- a/kig/modes/textlabelwizardbase.ui +++ b/kig/modes/textlabelwizardbase.ui @@ -1,10 +1,10 @@ TextLabelWizardBase - + TextLabelWizardBase - + 0 0 @@ -15,7 +15,7 @@ Construct Label - + enter_text_page @@ -26,7 +26,7 @@ unnamed - + enterTextLabel @@ -34,16 +34,16 @@ Enter the text for your label here and press "Next". If you want to show variable parts, then put %1, %2, ... at the appropriate places (e.g. "This segment is %1 units long."). - + WordBreak|AlignVCenter - + labelTextInput - + needFrameCheckBox @@ -53,7 +53,7 @@ If you want to show variable parts, then put %1, %2, ... at the appropriate plac - + select_arguments_page @@ -64,14 +64,14 @@ If you want to show variable parts, then put %1, %2, ... at the appropriate plac unnamed - + selectArgsLabel Now select the argument(s) you need. For every argument, click on it, select an object and a property in the Kig window, and click finish when you are done... - + WordBreak|AlignVCenter @@ -106,7 +106,7 @@ If you want to show variable parts, then put %1, %2, ... at the appropriate plac 789c9d97c76e24490e86effd1442f3d65870d2451a0ce6206f5adeb4cc620f8c34f2553225b5a4c1befb46927fe6a1d4c0ccac4287fa8a0c26834193f5dbb785b3fd9d856fbf7d799ec9ecba5ea8afe469e15bf3727ffffeeffffcf1e797af49b2d0ffc7d142f2f55f5fbe1ecc16ea85dde9a4ed81290045faa77ca49cf4ab67ba1e3953969173651ab9d4fdf1c8a27c3872ad7c3c72d3b32c2a67c3f3444636fbef23eb7e590267e68fcc4656395d8dacf6d938ef97eaef289781cddebdb2846fccff44b989ba58e3411f3dc75158e6df1d3889539517ca49bf54fe43398d1dec4f46567f685fd9c539f43fc025f80c1c3ce8d93f28e77185f8bf0c6cfae4c0b5f9c3c6e5c0542a4b5876fe13708df39d2bd7716372aa8c93c4e4723bb2f977aadc26ceec4bdb7310e6b0bfab9c2445ecd49f1370694cebca65d260ffa6711a41aef14d24e94cee6be3348e0ae5e9c8765f07ca3e8db17f0f9c825794eb3489351fe9bb7217e4969f29388bd51ee9fda5715a19730696b852fea95c6471647ca95cf64bcf43e0cef4657b647bfe6acf213d6bb32f9a9f5992b5a64f9a8f990b6cf9ecc15d6cf9acf6b2da55a8a75cb973dee4b2d1b38b5c05de02434e87e01aacfb351df5bebddea74b5c67f9c795711ea15e357e2ecde358fb87efc0a867df8cac728a074e62e527706afb59f3cf6583be5c28bb3c35f693812d1fbdc6dbe57966fec932d899ffa4f7e38adca17e34beaeca4b9c271a18f1d5fc739257b0d70d9c68be7bed7fcee7827ab91cd8e4740cf6b19d4ffb87ab07b9bf516e72d4a3ac821b9cef6e60d84f47367ded2fae1d9f7704f6163f79000ffde27660f387ed3c5dbf54dfeebb0bf6acbe6b706bfa5ef32f8f8b18f5bf0f463f20edb77956a4e68fbc80b3c4facd163847be6bfde72ec86dbeac82715fbc0286be683cf3bc081d44f7df80d344fb0b6b7de64581fb916765297263d6fccd9b7ee97e566e8b06cfdb1f59cf2bda2f8bbc2c11df0c5c41aefdb328ca22b1feb0012eedbce24736f91b18fb796d64eb87cb60817dcdafb07d906bfd14d22f659d8785ef97b2f6d7b2df6ef1d6fb2babaac6f92e8c25b27ecc1f239b7f3a5fca5a8678ea7c2d9bc0e6ef1238b3fca2c7814d5f4cbf9334b5f833384bed3c7a5f5514f4adbe2ec07962e7590457f06f6f649b977afe2a16f42f5e070bfc591e18f7a5f1a812a9e0df39d827da4fbd8c6ccfd7785569bf945f953371a9d5a3de67950bfa2d75c63eb2fb15bdcfaaf011e6c7263846bf8f4636f91618f3c7d3c0f047fb69550efab2074e12bd6fd27957553ec33c5b043bcc7f9d0795f818fdb501a3df8ae673e507ff69021eea37063bc45ffb73550736ff36c0a84f3e0317a86f8b5f139e6ffe1f821de6d9127898ff3be00a7c3ab2cd03e3d697560ff40016e47b3bb2e96bbd559d8f32bbff4b7065f193042c98873acf240af6adbf3c83c5f2954bb0c7bcd77c107d81d2fdebc63e33ff640aaecc9e1c8151df5c803dfaadc64b52dfa03ed64636ffb4ff4b2867f453ede7227586fcd3f9264ded91fffafe236d5da37fe83c91ceb7b9e5b7f6731ff92ed7f747d6fbf7e185cf58347e3e6932e47b3430fa893edf87d795c2fc3f003b67f5f902cec17abfde0dfa3c053b3c5ffb832fc2eb8fddcf233887fc195c801f46b6f3cdc02558fba72f7d2d1a7f7e321ee58fe0cad86bbff24dd3e2fe74fef836b0c6eb60d62fa6bf5e07b3419f853dd7dc70fb8bd5f1255fd90ed30f9f3c5ff30ddff21ddff384a7fcc08ffcc4cf61cdf8855ff9e79c7e1db4dff89d3f7891977899577895d7789d377893b7f83b6fcfe937bc13b477798ff7f9800ff928ac633ee11f7cca6761d7f99c7e1b3cb908da11c7413be1943376e153cc39175c72f549ff9e17c31744429e6a6aa8a58e2ee98aaee9866e7f617fc24b7417a4f734a1293dd0233dd133cd8285177aa5f9f3b63ca5377aa78f607b919668995682e62aadd17ab0b1419b9ff41f682b48bed336edd02eed05ed7d5ea3033a0cdf1ed1f127fd273ae123fa41a774a6b685cee982228a837e42e927fd47caf8985c38651eb40b2ac38e4a5842658a97fab33fd248cb87d2c9a55cc9b5dcc82d1fc99ddccb44a6f230af2f8ff224cf417f262ff22a3fe54ddee543166549966545567f617f4dd66523dc6b2c9bb225df655b7682f692ecca9eeccfe97772c09b722847722c27c1f3eb70f66bf9116c9fca999ccbc59cfe25bf4a143a5ef8992561324a78bd92522acf9ebc78efe7cf7b153276db37bef59dbff457fedadff85b7f27abfede4ffcd4cf9ff76faeff4fffefeff8c7f5fedfdfbffc0fa355c495 - + linkslabel.h diff --git a/kig/modes/typesdialog.cpp b/kig/modes/typesdialog.cpp index e14ceee8..0371ca7f 100644 --- a/kig/modes/typesdialog.cpp +++ b/kig/modes/typesdialog.cpp @@ -44,7 +44,7 @@ #include class MacroListElement - : public QListViewItem + : public TQListViewItem { Macro* macro; public: @@ -53,13 +53,13 @@ public: }; MacroListElement::MacroListElement( KListView* lv, Macro* m ) - : TQListViewItem( lv, TQString::null, m->action->descriptiveName(), m->action->description() ), + : TQListViewItem( lv, TQString(), m->action->descriptiveName(), m->action->description() ), macro( m ) { } -TypesDialog::TypesDialog( TQWidget* parent, KigPart& part ) - : TypesDialogBase( parent, "types_dialog", true ), mpart( part ) +TypesDialog::TypesDialog( TQWidget* tqparent, KigPart& part ) + : TypesDialogBase( tqparent, "types_dialog", true ), mpart( part ) { // improving GUI look'n'feel... buttonHelp->setGuiItem( KStdGuiItem::help() ); @@ -106,8 +106,8 @@ TypesDialog::~TypesDialog() void TypesDialog::helpSlot() { - kapp->invokeHelp( TQString::fromLatin1( "working-with-types" ), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "working-with-types" ), + TQString::tqfromLatin1( "kig" ) ); } void TypesDialog::okSlot() @@ -171,7 +171,7 @@ void TypesDialog::exportType() TQFile fi( file_name ); if ( fi.exists() ) if ( KMessageBox::warningContinueCancel( this, i18n( "The file \"%1\" already exists. " - "Do you wish to overwrite it?" ).arg( fi.name() ), + "Do you wish to overwrite it?" ).tqarg( fi.name() ), i18n( "Overwrite File?" ), i18n("Overwrite") ) == KMessageBox::Cancel ) return; MacroList::instance()->save( types, file_name ); diff --git a/kig/modes/typesdialog.h b/kig/modes/typesdialog.h index 2e914bcd..8275b653 100644 --- a/kig/modes/typesdialog.h +++ b/kig/modes/typesdialog.h @@ -39,13 +39,14 @@ class KigDocument; class TypesDialog : public TypesDialogBase { Q_OBJECT + TQ_OBJECT // necessary because some MacroList functions need it.. KigPart& mpart; const KIconLoader* il; TQPopupMenu* popup; public: - TypesDialog( TQWidget* parent, KigPart& ); + TypesDialog( TQWidget* tqparent, KigPart& ); ~TypesDialog(); public slots: diff --git a/kig/modes/typesdialogbase.ui b/kig/modes/typesdialogbase.ui index 7cc7effb..7d3e012f 100644 --- a/kig/modes/typesdialogbase.ui +++ b/kig/modes/typesdialogbase.ui @@ -1,10 +1,10 @@ TypesDialogBase - + TypesDialogBase - + 0 0 @@ -28,9 +28,9 @@ 6 - + - layout1 + tqlayout1 @@ -88,17 +88,17 @@ - + - layout4 + tqlayout4 unnamed - + - layout3 + tqlayout3 @@ -138,16 +138,16 @@ Expanding - + 20 20 - + - layout4 + tqlayout4 @@ -193,7 +193,7 @@ Horizontal - + Layout1 @@ -228,7 +228,7 @@ Expanding - + 20 20 @@ -302,9 +302,9 @@ typeList - contextMenuRequested(QListViewItem*,const QPoint&,int) + contextMenuRequested(TQListViewItem*,const QPoint&,int) TypesDialogBase - contextMenuRequested(QListViewItem*,const QPoint&,int) + contextMenuRequested(TQListViewItem*,const QPoint&,int) buttonCancel @@ -313,17 +313,17 @@ cancelSlot() - + deleteType() exportType() helpSlot() importTypes() okSlot() editType() - contextMenuRequested( QListViewItem* i, const QPoint& p, int c ) + contextMenuRequested( TQListViewItem* i, const QPoint& p, int c ) cancelSlot() - - + + klistview.h kpushbutton.h diff --git a/kig/objects/angle_type.cc b/kig/objects/angle_type.cc index 7b86411b..b0dc09c1 100644 --- a/kig/objects/angle_type.cc +++ b/kig/objects/angle_type.cc @@ -65,14 +65,14 @@ const AngleType* AngleType::instance() return &t; } -ObjectImp* AngleType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* AngleType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp; std::vector points; - for ( uint i = 0; i < parents.size(); ++i ) + for ( uint i = 0; i < tqparents.size(); ++i ) points.push_back( - static_cast( parents[i] )->coordinate() ); + static_cast( tqparents[i] )->coordinate() ); Coordinate lvect = points[0] - points[1]; Coordinate rvect; @@ -112,13 +112,13 @@ void AngleType::executeAction( // pretend to use this var.. (void) i; - std::vector parents = t.parents(); + std::vector tqparents = t.tqparents(); - assert( margsparser.checkArgs( parents ) ); + assert( margsparser.checkArgs( tqparents ) ); - Coordinate a = static_cast( parents[0]->imp() )->coordinate(); - Coordinate b = static_cast( parents[1]->imp() )->coordinate(); - Coordinate c = static_cast( parents[2]->imp() )->coordinate(); + Coordinate a = static_cast( tqparents[0]->imp() )->coordinate(); + Coordinate b = static_cast( tqparents[1]->imp() )->coordinate(); + Coordinate c = static_cast( tqparents[2]->imp() )->coordinate(); Coordinate lvect = a - b; Coordinate rvect = c - b; @@ -142,8 +142,8 @@ void AngleType::executeAction( Coordinate cdir( cos( newcangle ), sin( newcangle ) ); Coordinate nc = b + cdir.normalize( rvect.length() ); - MonitorDataObjects mon( getAllParents( parents ) ); - parents[2]->move( nc, d.document() ); + MonitorDataObjects mon( getAllParents( tqparents ) ); + tqparents[2]->move( nc, d.document() ); KigCommand* kc = new KigCommand( d, i18n( "Resize Angle" ) ); mon.finish( kc ); d.history()->addCommand( kc ); @@ -166,14 +166,14 @@ const HalfAngleType* HalfAngleType::instance() return &t; } -ObjectImp* HalfAngleType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* HalfAngleType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp; std::vector points; - for ( uint i = 0; i < parents.size(); ++i ) + for ( uint i = 0; i < tqparents.size(); ++i ) points.push_back( - static_cast( parents[i] )->coordinate() ); + static_cast( tqparents[i] )->coordinate() ); Coordinate lvect = points[0] - points[1]; Coordinate rvect; diff --git a/kig/objects/arc_type.h b/kig/objects/arc_type.h index cdfe0294..cb0a4c5f 100644 --- a/kig/objects/arc_type.h +++ b/kig/objects/arc_type.h @@ -35,7 +35,7 @@ public: ObjectImp* calc( const Args& args, const KigDocument& ) const; - const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const; + const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const; bool inherits( int type ) const; const ObjectImpType* resultId() const; @@ -55,7 +55,7 @@ public: ObjectImp* calc( const Args& args, const KigDocument& ) const; - const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const; + const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const; bool inherits( int type ) const; const ObjectImpType* resultId() const; diff --git a/kig/objects/base_type.cc b/kig/objects/base_type.cc index 0f8eecec..77b9dc6a 100644 --- a/kig/objects/base_type.cc +++ b/kig/objects/base_type.cc @@ -33,13 +33,13 @@ ObjectABType::~ObjectABType() { } -ObjectImp* ObjectABType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ObjectABType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - Coordinate a = static_cast( parents[0] )->coordinate(); - Coordinate b = static_cast( parents[1] )->coordinate(); + Coordinate a = static_cast( tqparents[0] )->coordinate(); + Coordinate b = static_cast( tqparents[1] )->coordinate(); return calc( a, b ); } @@ -57,22 +57,22 @@ bool ObjectABType::canMove( const ObjectTypeCalcer& o ) const bool ObjectABType::isFreelyTranslatable( const ObjectTypeCalcer& o ) const { - std::vector parents = o.parents(); - return parents[0]->isFreelyTranslatable() && parents[1]->isFreelyTranslatable(); + std::vector tqparents = o.tqparents(); + return tqparents[0]->isFreelyTranslatable() && tqparents[1]->isFreelyTranslatable(); } void ObjectABType::move( ObjectTypeCalcer& o, const Coordinate& to, const KigDocument& d ) const { - std::vector parents = o.parents(); - assert( margsparser.checkArgs( parents ) ); - const Coordinate a = static_cast( parents[0]->imp() )->coordinate(); - const Coordinate b = static_cast( parents[1]->imp() )->coordinate(); + std::vector tqparents = o.tqparents(); + assert( margsparser.checkArgs( tqparents ) ); + const Coordinate a = static_cast( tqparents[0]->imp() )->coordinate(); + const Coordinate b = static_cast( tqparents[1]->imp() )->coordinate(); const Coordinate dist = b - a; - if ( parents[0]->canMove() ) - parents[0]->move( to, d ); - if ( parents[1]->canMove() ) - parents[1]->move( to + dist, d ); + if ( tqparents[0]->canMove() ) + tqparents[0]->move( to, d ); + if ( tqparents[1]->canMove() ) + tqparents[1]->move( to + dist, d ); } ObjectLPType::ObjectLPType( const char* fullname, const ArgsParser::spec* spec, int n ) @@ -94,19 +94,19 @@ ObjectImp* ObjectLPType::calc( const Args& args, const KigDocument& ) const const Coordinate ObjectABType::moveReferencePoint( const ObjectTypeCalcer& o ) const { - std::vector parents = o.parents(); - assert( margsparser.checkArgs( parents ) ); - return static_cast( parents[0]->imp() )->coordinate(); + std::vector tqparents = o.tqparents(); + assert( margsparser.checkArgs( tqparents ) ); + return static_cast( tqparents[0]->imp() )->coordinate(); } std::vector ObjectABType::movableParents( const ObjectTypeCalcer& ourobj ) const { - std::vector parents = ourobj.parents(); + std::vector tqparents = ourobj.tqparents(); std::set ret; - std::vector tmp = parents[0]->movableParents(); + std::vector tmp = tqparents[0]->movableParents(); ret.insert( tmp.begin(), tmp.end() ); - tmp = parents[1]->movableParents(); + tmp = tqparents[1]->movableParents(); ret.insert( tmp.begin(), tmp.end() ); - ret.insert( parents.begin(), parents.end() ); + ret.insert( tqparents.begin(), tqparents.end() ); return std::vector( ret.begin(), ret.end() ); } diff --git a/kig/objects/bogus_imp.cc b/kig/objects/bogus_imp.cc index b7b8f41e..6e688b1b 100644 --- a/kig/objects/bogus_imp.cc +++ b/kig/objects/bogus_imp.cc @@ -32,7 +32,7 @@ void BogusImp::draw( KigPainter& ) const { } -bool BogusImp::contains( const Coordinate&, int, const KigWidget& ) const +bool BogusImp::tqcontains( const Coordinate&, int, const KigWidget& ) const { return false; } @@ -88,22 +88,22 @@ InvalidImp::InvalidImp() void InvalidImp::fillInNextEscape( TQString& s, const KigDocument& ) const { - s = s.arg( "[invalid]" ); + s = s.tqarg( "[invalid]" ); } void DoubleImp::fillInNextEscape( TQString& s, const KigDocument& ) const { - s = s.arg( mdata ); + s = s.tqarg( mdata ); } void IntImp::fillInNextEscape( TQString& s, const KigDocument& ) const { - s = s.arg( mdata ); + s = s.tqarg( mdata ); } void StringImp::fillInNextEscape( TQString& s, const KigDocument& ) const { - s = s.arg( mdata ); + s = s.tqarg( mdata ); } HierarchyImp::HierarchyImp( const ObjectHierarchy& h ) diff --git a/kig/objects/bogus_imp.h b/kig/objects/bogus_imp.h index c8f3ee2b..3ab32809 100644 --- a/kig/objects/bogus_imp.h +++ b/kig/objects/bogus_imp.h @@ -46,7 +46,7 @@ public: Coordinate attachPoint( ) const; void draw( KigPainter& p ) const; - bool contains( const Coordinate& p, int width, const KigWidget& w ) const; + bool tqcontains( const Coordinate& p, int width, const KigWidget& w ) const; bool inRect( const Rect& r, int width, const KigWidget& w ) const; Rect surroundingRect() const; diff --git a/kig/objects/circle_imp.cc b/kig/objects/circle_imp.cc index 38522c22..059ff592 100644 --- a/kig/objects/circle_imp.cc +++ b/kig/objects/circle_imp.cc @@ -63,7 +63,7 @@ void CircleImp::draw( KigPainter& p ) const p.drawCircle( mcenter, mradius ); } -bool CircleImp::contains( const Coordinate& p, int width, const KigWidget& w ) const +bool CircleImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const { return fabs((mcenter - p).length() - mradius) <= w.screenInfo().normalMiss( width ); } @@ -72,10 +72,10 @@ bool CircleImp::inRect( const Rect& r, int width, const KigWidget& w ) const { // first we check if the rect contains at least one of the // north/south/east/west points of the circle - if ( r.contains( mcenter + Coordinate( 0, -mradius ) ) ) return true; - if ( r.contains( mcenter + Coordinate( mradius, 0 ) ) ) return true; - if ( r.contains( mcenter + Coordinate( 0, mradius ) ) ) return true; - if ( r.contains( mcenter + Coordinate( -mradius, 0 ) ) ) return true; + if ( r.tqcontains( mcenter + Coordinate( 0, -mradius ) ) ) return true; + if ( r.tqcontains( mcenter + Coordinate( mradius, 0 ) ) ) return true; + if ( r.tqcontains( mcenter + Coordinate( 0, mradius ) ) ) return true; + if ( r.tqcontains( mcenter + Coordinate( -mradius, 0 ) ) ) return true; // we allow a miss of some pixels .. double miss = w.screenInfo().normalMiss( width ); @@ -235,8 +235,8 @@ TQString CircleImp::polarEquationString( const KigDocument& w ) const { TQString ret = i18n( "rho = %1 [centered at %2]" ); ConicPolarData data = polarData(); - ret = ret.arg( data.pdimen, 0, 'g', 3 ); - ret = ret.arg( w.coordinateSystem().fromScreen( data.focus1, w ) ); + ret = ret.tqarg( data.pdimen, 0, 'g', 3 ); + ret = ret.tqarg( w.coordinateSystem().fromScreen( data.focus1, w ) ); return ret; } @@ -244,18 +244,18 @@ TQString CircleImp::cartesianEquationString( const KigDocument& ) const { TQString ret = i18n( "x² + y² + %1 x + %2 y + %3 = 0" ); ConicCartesianData data = cartesianData(); - ret = ret.arg( data.coeffs[3], 0, 'g', 3 ); - ret = ret.arg( data.coeffs[4], 0, 'g', 3 ); - ret = ret.arg( data.coeffs[5], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[3], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[4], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[5], 0, 'g', 3 ); return ret; } TQString CircleImp::simplyCartesianEquationString( const KigDocument& ) const { TQString ret = i18n( "( x - %1 )² + ( y - %2 )² = %3" ); - ret = ret.arg( mcenter.x, 0, 'g', 3 ); - ret = ret.arg( mcenter.y, 0, 'g', 3 ); - ret = ret.arg( mradius * mradius, 0, 'g', 3 ); + ret = ret.tqarg( mcenter.x, 0, 'g', 3 ); + ret = ret.tqarg( mcenter.y, 0, 'g', 3 ); + ret = ret.tqarg( mradius * mradius, 0, 'g', 3 ); return ret; } diff --git a/kig/objects/circle_imp.h b/kig/objects/circle_imp.h index 1ccede6a..98fa391d 100644 --- a/kig/objects/circle_imp.h +++ b/kig/objects/circle_imp.h @@ -46,7 +46,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool contains( const Coordinate& p, int width, const KigWidget& ) const; + bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; bool valid() const; Rect surroundingRect() const; diff --git a/kig/objects/conic_imp.cc b/kig/objects/conic_imp.cc index 81331522..11e01c28 100644 --- a/kig/objects/conic_imp.cc +++ b/kig/objects/conic_imp.cc @@ -47,7 +47,7 @@ bool ConicImp::valid() const return true; } -bool ConicImp::contains( const Coordinate& o, int width, const KigWidget& w ) const +bool ConicImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const { return internalContainsPoint( o, w.screenInfo().normalMiss( width ) ); } @@ -204,12 +204,12 @@ TQString ConicImp::cartesianEquationString( const KigDocument& ) const { TQString ret = i18n( "%1 x² + %2 y² + %3 xy + %4 x + %5 y + %6 = 0" ); ConicCartesianData data = cartesianData(); - ret = ret.arg( data.coeffs[0], 0, 'g', 3 ); - ret = ret.arg( data.coeffs[1], 0, 'g', 3 ); - ret = ret.arg( data.coeffs[2], 0, 'g', 3 ); - ret = ret.arg( data.coeffs[3], 0, 'g', 3 ); - ret = ret.arg( data.coeffs[4], 0, 'g', 3 ); - ret = ret.arg( data.coeffs[5], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[0], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[1], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[2], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[3], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[4], 0, 'g', 3 ); + ret = ret.tqarg( data.coeffs[5], 0, 'g', 3 ); return ret; } @@ -218,11 +218,11 @@ TQString ConicImp::polarEquationString( const KigDocument& w ) const TQString ret = i18n( "rho = %1/(1 + %2 cos theta + %3 sin theta)\n [centered at %4]" ); const ConicPolarData data = polarData(); - ret = ret.arg( data.pdimen, 0, 'g', 3 ); - ret = ret.arg( -data.ecostheta0, 0, 'g', 3 ); - ret = ret.arg( -data.esintheta0, 0, 'g', 3 ); + ret = ret.tqarg( data.pdimen, 0, 'g', 3 ); + ret = ret.tqarg( -data.ecostheta0, 0, 'g', 3 ); + ret = ret.tqarg( -data.esintheta0, 0, 'g', 3 ); - ret = ret.arg( w.coordinateSystem().fromScreen( data.focus1, w ) ); + ret = ret.tqarg( w.coordinateSystem().fromScreen( data.focus1, w ) ); return ret; } diff --git a/kig/objects/conic_imp.h b/kig/objects/conic_imp.h index 29068a7b..d1cfa3f9 100644 --- a/kig/objects/conic_imp.h +++ b/kig/objects/conic_imp.h @@ -51,7 +51,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool contains( const Coordinate& p, int width, const KigWidget& ) const; + bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; bool valid() const; Rect surroundingRect() const; diff --git a/kig/objects/conic_types.cc b/kig/objects/conic_types.cc index 34396369..58209011 100644 --- a/kig/objects/conic_types.cc +++ b/kig/objects/conic_types.cc @@ -57,12 +57,12 @@ ConicB5PType::~ConicB5PType() { } -ObjectImp* ConicB5PType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicB5PType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp; std::vector points; - for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i ) + for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) points.push_back( static_cast( *i )->coordinate() ); ConicCartesianData d = @@ -105,23 +105,23 @@ const ConicBAAPType* ConicBAAPType::instance() return &t; } -ObjectImp* ConicBAAPType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicBAAPType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - const LineData la = static_cast( parents[0] )->data(); - const LineData lb = static_cast( parents[1] )->data(); - const Coordinate c = static_cast( parents[2] )->coordinate(); + const LineData la = static_cast( tqparents[0] )->data(); + const LineData lb = static_cast( tqparents[1] )->data(); + const Coordinate c = static_cast( tqparents[2] )->coordinate(); return new ConicImpCart( calcConicByAsymptotes( la, lb, c ) ); } -ObjectImp* ConicBFFPType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicBFFPType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp; std::vector cs; - for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i ) + for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) cs.push_back( static_cast( *i )->coordinate() ); return new ConicImpPolar( calcConicBFFP( cs, type() ) ); @@ -233,17 +233,17 @@ ConicBDFPType::~ConicBDFPType() { } -ObjectImp* ConicBDFPType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicBDFPType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp; - const LineData line = static_cast( parents[0] )->data(); + const LineData line = static_cast( tqparents[0] )->data(); const Coordinate focus = - static_cast( parents[1] )->coordinate(); + static_cast( tqparents[1] )->coordinate(); Coordinate point; - if ( parents.size() == 3 ) - point = static_cast( parents[2] )->coordinate(); + if ( tqparents.size() == 3 ) + point = static_cast( tqparents[2] )->coordinate(); else { /* !!!! costruisci point come punto medio dell'altezza tra fuoco e d. */ @@ -286,12 +286,12 @@ const ParabolaBTPType* ParabolaBTPType::instance() return &t; } -ObjectImp* ParabolaBTPType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ParabolaBTPType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp; std::vector points; - for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i ) + for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) points.push_back( static_cast( *i )->coordinate() ); ConicCartesianData d = @@ -327,12 +327,12 @@ const ConicPolarPointType* ConicPolarPointType::instance() return &t; } -ObjectImp* ConicPolarPointType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicPolarPointType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - const ConicCartesianData c = static_cast( parents[0] )->cartesianData(); - const LineData l = static_cast( parents[1] )->data(); + const ConicCartesianData c = static_cast( tqparents[0] )->cartesianData(); + const LineData l = static_cast( tqparents[1] )->data(); const Coordinate p = calcConicPolarPoint( c, l ); if ( p.valid() ) return new PointImp( p ); else return new InvalidImp; @@ -363,12 +363,12 @@ const ConicPolarLineType* ConicPolarLineType::instance() return &t; } -ObjectImp* ConicPolarLineType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicPolarLineType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - const ConicCartesianData c = static_cast( parents[0] )->cartesianData(); - const Coordinate p = static_cast( parents[1] )->coordinate(); + const ConicCartesianData c = static_cast( tqparents[0] )->cartesianData(); + const Coordinate p = static_cast( tqparents[1] )->coordinate(); bool valid = true; const LineData l = calcConicPolarLine( c, p, valid ); if ( valid ) return new LineImp( l ); @@ -398,12 +398,12 @@ const ConicDirectrixType* ConicDirectrixType::instance() return &t; } -ObjectImp* ConicDirectrixType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicDirectrixType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; const ConicPolarData data = - static_cast( parents[0] )->polarData(); + static_cast( tqparents[0] )->polarData(); double ec = data.ecostheta0; double es = data.esintheta0; @@ -445,12 +445,12 @@ const EquilateralHyperbolaB4PType* EquilateralHyperbolaB4PType::instance() return &t; } -ObjectImp* EquilateralHyperbolaB4PType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* EquilateralHyperbolaB4PType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp; std::vector pts; - for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i ) + for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) pts.push_back( static_cast( *i )->coordinate() ); ConicCartesianData d = calcConicThroughPoints( pts, equilateral ); @@ -524,14 +524,14 @@ const ConicAsymptoteType* ConicAsymptoteType::instance() return &t; } -ObjectImp* ConicAsymptoteType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicAsymptoteType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; bool valid = true; const LineData ret = calcConicAsymptote( - static_cast( parents[0] )->cartesianData(), - static_cast( parents[1] )->data(), + static_cast( tqparents[0] )->cartesianData(), + static_cast( tqparents[1] )->data(), valid ); if ( valid ) @@ -565,18 +565,18 @@ const ConicRadicalType* ConicRadicalType::instance() return &t; } -ObjectImp* ConicRadicalType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicRadicalType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; - if ( parents[0]->inherits( CircleImp::stype() ) && - parents[1]->inherits( CircleImp::stype() ) ) + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; + if ( tqparents[0]->inherits( CircleImp::stype() ) && + tqparents[1]->inherits( CircleImp::stype() ) ) { - if( static_cast( parents[2] )->data() != 1 ) + if( static_cast( tqparents[2] )->data() != 1 ) return new InvalidImp; else { - const CircleImp* c1 = static_cast( parents[0] ); - const CircleImp* c2 = static_cast( parents[1] ); + const CircleImp* c1 = static_cast( tqparents[0] ); + const CircleImp* c2 = static_cast( tqparents[1] ); const Coordinate a = calcCircleRadicalStartPoint( c1->center(), c2->center(), c1->squareRadius(), c2->squareRadius() ); @@ -588,10 +588,10 @@ ObjectImp* ConicRadicalType::calc( const Args& parents, const KigDocument& ) con { bool valid = true; const LineData l = calcConicRadical( - static_cast( parents[0] )->cartesianData(), - static_cast( parents[1] )->cartesianData(), - static_cast( parents[2] )->data(), - static_cast( parents[3] )->data(), valid ); + static_cast( tqparents[0] )->cartesianData(), + static_cast( tqparents[1] )->cartesianData(), + static_cast( tqparents[2] )->data(), + static_cast( tqparents[3] )->data(), valid ); if ( valid ) return new LineImp( l ); else @@ -674,9 +674,9 @@ void ConicRadicalType::executeAction( int i, ObjectHolder&, ObjectTypeCalcer& t, KigPart& d, KigWidget&, NormalMode& ) const { assert( i == 0 ); - std::vector parents = t.parents(); - assert( dynamic_cast( parents[3] ) ); - ObjectConstCalcer* zeroindexo = static_cast( parents[3] ); + std::vector tqparents = t.tqparents(); + assert( dynamic_cast( tqparents[3] ) ); + ObjectConstCalcer* zeroindexo = static_cast( tqparents[3] ); MonitorDataObjects mon( zeroindexo ); assert( zeroindexo->imp()->inherits( IntImp::stype() ) ); int oldzeroindex = static_cast( zeroindexo->imp() )->data(); diff --git a/kig/objects/conic_types.h b/kig/objects/conic_types.h index 858ca057..e3c44c01 100644 --- a/kig/objects/conic_types.h +++ b/kig/objects/conic_types.h @@ -27,7 +27,7 @@ class ConicB5PType ~ConicB5PType(); public: static const ConicB5PType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -38,7 +38,7 @@ class ConicBAAPType ~ConicBAAPType(); public: static const ConicBAAPType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -49,7 +49,7 @@ protected: ConicBFFPType( const char* fullname, const ArgsParser::spec*, int n ); ~ConicBFFPType(); public: - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; /** * -1 for hyperbola, 1 for ellipse.. @@ -85,7 +85,7 @@ class ConicBDFPType ~ConicBDFPType(); public: static const ConicBDFPType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -96,7 +96,7 @@ class ParabolaBTPType ~ParabolaBTPType(); public: static const ParabolaBTPType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -107,7 +107,7 @@ class EquilateralHyperbolaB4PType ~EquilateralHyperbolaB4PType(); public: static const EquilateralHyperbolaB4PType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -118,7 +118,7 @@ class ConicPolarPointType ~ConicPolarPointType(); public: static const ConicPolarPointType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -129,7 +129,7 @@ class ConicPolarLineType ~ConicPolarLineType(); public: static const ConicPolarLineType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -140,7 +140,7 @@ class ConicDirectrixType ~ConicDirectrixType(); public: static const ConicDirectrixType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -162,7 +162,7 @@ class ConicAsymptoteType ~ConicAsymptoteType(); public: static const ConicAsymptoteType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -173,7 +173,7 @@ class ConicRadicalType ~ConicRadicalType(); public: static const ConicRadicalType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; TQStringList specialActions() const; void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& t, diff --git a/kig/objects/cubic_imp.cc b/kig/objects/cubic_imp.cc index 3879c5d9..f727f49a 100644 --- a/kig/objects/cubic_imp.cc +++ b/kig/objects/cubic_imp.cc @@ -50,7 +50,7 @@ void CubicImp::draw( KigPainter& p ) const p.drawCurve( this ); } -bool CubicImp::contains( const Coordinate& o, int width, const KigWidget& w ) const +bool CubicImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const { return internalContainsPoint( o, w.screenInfo().normalMiss( width ) ); } @@ -409,7 +409,7 @@ Rect CubicImp::surroundingRect() const TQString CubicImp::cartesianEquationString( const KigDocument& ) const { /* - * unfortunately QStrings.arg method is limited to %1, %9, so we cannot + * unfortunately TQStrings.arg method is limited to %1, %9, so we cannot * treat all 10 arguments! Let's split the equation in two parts... * Now this ends up also in the translation machinery, is this really * necessary? Otherwise we could do a little bit of tidy up on the @@ -417,21 +417,21 @@ TQString CubicImp::cartesianEquationString( const KigDocument& ) const */ TQString ret = i18n( "%6 x³ + %9 y³ + %7 x²y + %8 xy² + %5 y² + %3 x² + %4 xy + %1 x + %2 y" ); - ret = ret.arg( mdata.coeffs[1], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[2], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[3], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[4], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[5], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[6], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[7], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[8], 0, 'g', 3 ); - ret = ret.arg( mdata.coeffs[9], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[1], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[2], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[3], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[4], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[5], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[6], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[7], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[8], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[9], 0, 'g', 3 ); ret.append( i18n( " + %1 = 0" ) ); - ret = ret.arg( mdata.coeffs[0], 0, 'g', 3 ); + ret = ret.tqarg( mdata.coeffs[0], 0, 'g', 3 ); // we should find a common place to do this... - ret.replace( "+ -", "- " ); - ret.replace( "+-", "-" ); + ret.tqreplace( "+ -", "- " ); + ret.tqreplace( "+-", "-" ); return ret; } diff --git a/kig/objects/cubic_imp.h b/kig/objects/cubic_imp.h index 5e9e6a2c..65dc25ad 100644 --- a/kig/objects/cubic_imp.h +++ b/kig/objects/cubic_imp.h @@ -40,7 +40,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool contains( const Coordinate& p, int width, const KigWidget& ) const; + bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; Rect surroundingRect() const; TQString cartesianEquationString( const KigDocument& ) const; diff --git a/kig/objects/cubic_type.cc b/kig/objects/cubic_type.cc index c322b8c3..1878128a 100644 --- a/kig/objects/cubic_type.cc +++ b/kig/objects/cubic_type.cc @@ -112,12 +112,12 @@ const CubicNodeB6PType* CubicNodeB6PType::instance() return &t; } -ObjectImp* CubicNodeB6PType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* CubicNodeB6PType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp; std::vector points; - for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i ) + for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) points.push_back( static_cast( *i )->coordinate() ); CubicCartesianData d = calcCubicNodeThroughPoints( points ); @@ -156,12 +156,12 @@ const CubicCuspB4PType* CubicCuspB4PType::instance() return &t; } -ObjectImp* CubicCuspB4PType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* CubicCuspB4PType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp; std::vector points; - for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i ) + for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) points.push_back( static_cast( *i )->coordinate() ); CubicCartesianData d = calcCubicCuspThroughPoints( points ); diff --git a/kig/objects/cubic_type.h b/kig/objects/cubic_type.h index 39be7387..439c7367 100644 --- a/kig/objects/cubic_type.h +++ b/kig/objects/cubic_type.h @@ -27,7 +27,7 @@ class CubicB9PType ~CubicB9PType(); public: static const CubicB9PType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -38,7 +38,7 @@ class CubicNodeB6PType ~CubicNodeB6PType(); public: static const CubicNodeB6PType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -49,7 +49,7 @@ class CubicCuspB4PType ~CubicCuspB4PType(); public: static const CubicCuspB4PType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; diff --git a/kig/objects/intersection_types.cc b/kig/objects/intersection_types.cc index 804d498d..92cbefff 100644 --- a/kig/objects/intersection_types.cc +++ b/kig/objects/intersection_types.cc @@ -55,19 +55,19 @@ const ConicLineIntersectionType* ConicLineIntersectionType::instance() return &t; } -ObjectImp* ConicLineIntersectionType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicLineIntersectionType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - int side = static_cast( parents[2] )->data(); + int side = static_cast( tqparents[2] )->data(); assert( side == 1 || side == -1 ); - const LineData line = static_cast( parents[1] )->data(); + const LineData line = static_cast( tqparents[1] )->data(); Coordinate ret; - if ( parents[0]->inherits( CircleImp::stype() ) ) + if ( tqparents[0]->inherits( CircleImp::stype() ) ) { // easy case.. - const CircleImp* c = static_cast( parents[0] ); + const CircleImp* c = static_cast( tqparents[0] ); ret = calcCircleLineIntersect( c->center(), c->squareRadius(), line, side ); } @@ -75,7 +75,7 @@ ObjectImp* ConicLineIntersectionType::calc( const Args& parents, const KigDocume { // harder case.. ret = calcConicLineIntersect( - static_cast( parents[0] )->cartesianData(), + static_cast( tqparents[0] )->cartesianData(), line, 0.0, side ); } if ( ret.valid() ) return new PointImp( ret ); @@ -109,18 +109,18 @@ const ConicLineOtherIntersectionType* ConicLineOtherIntersectionType::instance() return &t; } -ObjectImp* ConicLineOtherIntersectionType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ConicLineOtherIntersectionType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - Coordinate p = static_cast( parents[2] )->coordinate(); - const LineData line = static_cast( parents[1] )->data(); + Coordinate p = static_cast( tqparents[2] )->coordinate(); + const LineData line = static_cast( tqparents[1] )->data(); Coordinate ret; -// if ( parents[0]->inherits( CircleImp::stype() ) ) +// if ( tqparents[0]->inherits( CircleImp::stype() ) ) // { // // easy case.. -// const CircleImp* c = static_cast( parents[0] ); +// const CircleImp* c = static_cast( tqparents[0] ); // ret = calcCircleLineIntersect( // c->center(), c->squareRadius(), line, side, valid ); // } @@ -133,7 +133,7 @@ ObjectImp* ConicLineOtherIntersectionType::calc( const Args& parents, const KigD double bay = line.b.y - line.a.y; double knownparam = (pax*bax + pay*bay)/(bax*bax + bay*bay); ret = calcConicLineIntersect( - static_cast( parents[0] )->cartesianData(), + static_cast( tqparents[0] )->cartesianData(), line, knownparam, 0 ); // } if ( ret.valid() ) return new PointImp( ret ); @@ -164,16 +164,16 @@ const LineLineIntersectionType* LineLineIntersectionType::instance() return &t; } -ObjectImp* LineLineIntersectionType::calc( const Args& parents, const KigDocument& d ) const +ObjectImp* LineLineIntersectionType::calc( const Args& tqparents, const KigDocument& d ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; Coordinate p = calcIntersectionPoint( - static_cast( parents[0] )->data(), - static_cast( parents[1] )->data() ); - if ( static_cast( parents[0] )->containsPoint( p, d ) && - static_cast( parents[1] )->containsPoint( p, d ) ) + static_cast( tqparents[0] )->data(), + static_cast( tqparents[1] )->data() ); + if ( static_cast( tqparents[0] )->containsPoint( p, d ) && + static_cast( tqparents[1] )->containsPoint( p, d ) ) return new PointImp( p ); else return new InvalidImp(); } @@ -204,15 +204,15 @@ const LineCubicIntersectionType* LineCubicIntersectionType::instance() return &t; } -ObjectImp* LineCubicIntersectionType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* LineCubicIntersectionType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - int which = static_cast( parents[2] )->data(); + int which = static_cast( tqparents[2] )->data(); bool valid = true; const Coordinate c = calcCubicLineIntersect( - static_cast( parents[0] )->data(), - static_cast( parents[1] )->data(), + static_cast( tqparents[0] )->data(), + static_cast( tqparents[1] )->data(), which, valid ); if ( valid ) return new PointImp( c ); else return new InvalidImp; @@ -265,14 +265,14 @@ const CircleCircleIntersectionType* CircleCircleIntersectionType::instance() return &t; } -ObjectImp* CircleCircleIntersectionType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* CircleCircleIntersectionType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - int side = static_cast( parents[2] )->data(); + int side = static_cast( tqparents[2] )->data(); assert( side == 1 || side == -1 ); - const CircleImp* c1 = static_cast( parents[0] ); - const CircleImp* c2 = static_cast( parents[1] ); + const CircleImp* c1 = static_cast( tqparents[0] ); + const CircleImp* c2 = static_cast( tqparents[1] ); const Coordinate o1 = c1->center(); const Coordinate o2 = c2->center(); const double r1sq = c1->squareRadius(); @@ -316,15 +316,15 @@ const ArcLineIntersectionType* ArcLineIntersectionType::instance() return &t; } -ObjectImp* ArcLineIntersectionType::calc( const Args& parents, const KigDocument& ) const +ObjectImp* ArcLineIntersectionType::calc( const Args& tqparents, const KigDocument& ) const { - if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp; + if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp; - int side = static_cast( parents[2] )->data(); + int side = static_cast( tqparents[2] )->data(); assert( side == 1 || side == -1 ); - const LineData line = static_cast( parents[1] )->data(); + const LineData line = static_cast( tqparents[1] )->data(); - const ArcImp* c = static_cast( parents[0] ); + const ArcImp* c = static_cast( tqparents[0] ); const double r = c->radius(); Coordinate ret = calcArcLineIntersect( c->center(), r*r, c->startAngle(), c->angle(), line, side ); diff --git a/kig/objects/intersection_types.h b/kig/objects/intersection_types.h index 9e1df62e..46d60199 100644 --- a/kig/objects/intersection_types.h +++ b/kig/objects/intersection_types.h @@ -36,7 +36,7 @@ class ConicLineIntersectionType ~ConicLineIntersectionType(); public: static const ConicLineIntersectionType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -51,7 +51,7 @@ class ConicLineOtherIntersectionType ~ConicLineOtherIntersectionType(); public: static const ConicLineOtherIntersectionType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -62,7 +62,7 @@ class LineLineIntersectionType ~LineLineIntersectionType(); public: static const LineLineIntersectionType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -73,7 +73,7 @@ class LineCubicIntersectionType ~LineCubicIntersectionType(); public: static const LineCubicIntersectionType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -84,7 +84,7 @@ class CircleCircleIntersectionType ~CircleCircleIntersectionType(); public: static const CircleCircleIntersectionType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; @@ -98,7 +98,7 @@ class ArcLineIntersectionType ~ArcLineIntersectionType(); public: static const ArcLineIntersectionType* instance(); - ObjectImp* calc( const Args& parents, const KigDocument& ) const; + ObjectImp* calc( const Args& tqparents, const KigDocument& ) const; const ObjectImpType* resultId() const; }; diff --git a/kig/objects/line_imp.cc b/kig/objects/line_imp.cc index a49078a1..0cb8a985 100644 --- a/kig/objects/line_imp.cc +++ b/kig/objects/line_imp.cc @@ -186,8 +186,8 @@ const TQString AbstractLineImp::equationString() const TQString::fromUtf8( r > 0 ? "+" : "-" ) + TQString::fromUtf8( " %2" ); - ret = ret.arg( m, 0, 'g', 3 ); - ret = ret.arg( abs( r ), 0, 'g', 3 ); + ret = ret.tqarg( m, 0, 'g', 3 ); + ret = ret.tqarg( abs( r ), 0, 'g', 3 ); return ret; } @@ -197,7 +197,7 @@ void SegmentImp::draw( KigPainter& p ) const p.drawSegment( mdata ); } -bool SegmentImp::contains( const Coordinate& p, int width, const KigWidget& w ) const +bool SegmentImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ) ); } @@ -207,7 +207,7 @@ void RayImp::draw( KigPainter& p ) const p.drawRay( mdata ); } -bool RayImp::contains( const Coordinate& p, int width, const KigWidget& w ) const +bool RayImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ) ); } @@ -217,7 +217,7 @@ void LineImp::draw( KigPainter& p ) const p.drawLine( mdata ); } -bool LineImp::contains( const Coordinate& p, int width, const KigWidget& w ) const +bool LineImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ) ); } diff --git a/kig/objects/line_imp.h b/kig/objects/line_imp.h index b12c045d..c52d8afd 100644 --- a/kig/objects/line_imp.h +++ b/kig/objects/line_imp.h @@ -99,7 +99,7 @@ public: SegmentImp( const LineData& d ); void draw( KigPainter& p ) const; - bool contains( const Coordinate& p, int width, const KigWidget& si ) const; + bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const; Rect surroundingRect() const; ObjectImp* transform( const Transformation& ) const; @@ -154,7 +154,7 @@ public: RayImp( const LineData& d ); void draw( KigPainter& p ) const; - bool contains( const Coordinate& p, int width, const KigWidget& si ) const; + bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const; Rect surroundingRect() const; ObjectImp* transform( const Transformation& ) const; @@ -195,7 +195,7 @@ public: */ LineImp( const LineData& d ); void draw( KigPainter& p ) const; - bool contains( const Coordinate& p, int width, const KigWidget& si ) const; + bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const; Rect surroundingRect() const; ObjectImp* transform( const Transformation& ) const; diff --git a/kig/objects/line_type.cc b/kig/objects/line_type.cc index a02cc80b..84deb46e 100644 --- a/kig/objects/line_type.cc +++ b/kig/objects/line_type.cc @@ -232,11 +232,11 @@ void SegmentABType::executeAction( int i, ObjectHolder&, ObjectTypeCalcer& c, // pretend to use this var.. (void) i; - std::vector parents = c.parents(); - assert( margsparser.checkArgs( parents ) ); + std::vector tqparents = c.tqparents(); + assert( margsparser.checkArgs( tqparents ) ); - Coordinate a = static_cast( parents[0]->imp() )->coordinate(); - Coordinate b = static_cast( parents[1]->imp() )->coordinate(); + Coordinate a = static_cast( tqparents[0]->imp() )->coordinate(); + Coordinate b = static_cast( tqparents[1]->imp() )->coordinate(); bool ok = true; double length = getDoubleFromUser( @@ -246,8 +246,8 @@ void SegmentABType::executeAction( int i, ObjectHolder&, ObjectTypeCalcer& c, Coordinate nb = a + ( b - a ).normalize( length ); - MonitorDataObjects mon( getAllParents( parents ) ); - parents[1]->move( nb, d.document() ); + MonitorDataObjects mon( getAllParents( tqparents ) ); + tqparents[1]->move( nb, d.document() ); KigCommand* cd = new KigCommand( d, i18n( "Resize Segment" ) ); mon.finish( cd ); d.history()->addCommand( cd ); diff --git a/kig/objects/locus_imp.cc b/kig/objects/locus_imp.cc index edbdc88b..3bf85a9e 100644 --- a/kig/objects/locus_imp.cc +++ b/kig/objects/locus_imp.cc @@ -49,7 +49,7 @@ void LocusImp::draw( KigPainter& p ) const p.drawCurve( this ); } -bool LocusImp::contains( const Coordinate& p, int width, const KigWidget& w ) const +bool LocusImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ), w.document() ); } diff --git a/kig/objects/locus_imp.h b/kig/objects/locus_imp.h index 568e0e7c..b2100634 100644 --- a/kig/objects/locus_imp.h +++ b/kig/objects/locus_imp.h @@ -24,7 +24,7 @@ /** * LocusImp is an imp that consists of a copy of the curveimp that the * moving point moves over, and an ObjectHierarchy that can calc ( - * given a point, and optionally some more parent objects the position + * given a point, and optionally some more tqparent objects the position * of the moving point. The hierarchy should take the moving point as * its *first* argument and all others after that. The others are