From e69e8b1d09fb579316595b4e6a850e717358a8b1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 19 Jun 2011 19:03:33 +0000 Subject: TQt4 port kdegraphics This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kamera/kcontrol/kamera.cpp | 50 +- kamera/kcontrol/kamera.h | 3 +- kamera/kcontrol/kameraconfigdialog.cpp | 36 +- kamera/kcontrol/kameraconfigdialog.h | 5 +- kamera/kcontrol/kameradevice.cpp | 28 +- kamera/kcontrol/kameradevice.h | 6 +- kamera/kioslave/kamera.cpp | 16 +- kcoloredit/colorselector.cpp | 16 +- kcoloredit/colorselector.h | 3 +- kcoloredit/editablestreamhistory.h | 4 +- kcoloredit/gradientselection.cpp | 16 +- kcoloredit/gradientselection.h | 3 +- kcoloredit/imageselection.cpp | 2 +- kcoloredit/imageselection.h | 3 +- kcoloredit/kcolorchooser.cpp | 4 +- kcoloredit/kcoloredit.cpp | 30 +- kcoloredit/kcoloredit.h | 5 +- kcoloredit/kcoloreditdoc.cpp | 18 +- kcoloredit/kcoloreditdoc.h | 7 +- kcoloredit/kcoloreditview.cpp | 20 +- kcoloredit/kcoloreditview.h | 7 +- kcoloredit/kxycolorselector.cpp | 44 +- kcoloredit/kxycolorselector.h | 3 +- kcoloredit/kzcolorselector.cpp | 42 +- kcoloredit/kzcolorselector.h | 3 +- kcoloredit/loadpalettedlg.cpp | 6 +- kcoloredit/loadpalettedlg.h | 3 +- kcoloredit/palette.cpp | 8 +- kcoloredit/paletteview.cpp | 6 +- kcoloredit/paletteview.h | 5 +- kcoloredit/paletteviewscrolledarea.cpp | 24 +- kcoloredit/paletteviewscrolledarea.h | 9 +- kcoloredit/texteditselection.cpp | 10 +- kcoloredit/texteditselection.h | 5 +- kcoloredit/textselection.cpp | 2 +- kdvi/TeXFont.h | 10 +- kdvi/TeXFontDefinition.cpp | 16 +- kdvi/TeXFontDefinition.h | 14 +- kdvi/TeXFont_PFB.cpp | 64 +-- kdvi/TeXFont_PFB.h | 6 +- kdvi/TeXFont_PK.cpp | 106 ++--- kdvi/TeXFont_PK.h | 4 +- kdvi/TeXFont_TFM.cpp | 24 +- kdvi/TeXFont_TFM.h | 10 +- kdvi/bigEndianByteReader.cpp | 28 +- kdvi/bigEndianByteReader.h | 16 +- kdvi/dviFile.cpp | 44 +- kdvi/dviFile.h | 28 +- kdvi/dviPageCache.h | 1 + kdvi/dviRenderer.cpp | 110 ++--- kdvi/dviRenderer.h | 27 +- kdvi/dviRenderer_draw.cpp | 26 +- kdvi/dviRenderer_export.cpp | 74 +-- kdvi/dviRenderer_prescan.cpp | 132 +++--- kdvi/dviWidget.cpp | 14 +- kdvi/dviWidget.h | 3 +- kdvi/dvisourcesplitter.cpp | 4 +- kdvi/dvisourcesplitter.h | 4 +- kdvi/examples/dvistd0.dvi | Bin 141240 -> 141242 bytes kdvi/fontEncoding.cpp | 4 +- kdvi/fontEncoding.h | 4 +- kdvi/fontEncodingPool.cpp | 2 +- kdvi/fontMap.cpp | 22 +- kdvi/fontMap.h | 10 +- kdvi/fontpool.cpp | 82 ++-- kdvi/fontpool.h | 11 +- kdvi/fontprogress.cpp | 14 +- kdvi/fontprogress.h | 5 +- kdvi/glyph.h | 6 +- kdvi/infodialog.cpp | 32 +- kdvi/infodialog.h | 3 +- kdvi/kdvi_multipage.cpp | 26 +- kdvi/kdvi_multipage.h | 3 +- kdvi/main.cpp | 6 +- kdvi/optionDialogFontsWidget.cpp | 6 +- kdvi/optionDialogFontsWidget.h | 3 +- kdvi/optionDialogFontsWidget_base.ui | 14 +- kdvi/optionDialogSpecialWidget.cpp | 6 +- kdvi/optionDialogSpecialWidget.h | 3 +- kdvi/optionDialogSpecialWidget_base.ui | 20 +- kdvi/prebookmark.h | 6 +- kdvi/psgs.cpp | 66 +-- kdvi/psgs.h | 3 +- kdvi/psheader.txt | 6 +- kdvi/renderedDviPagePixmap.h | 1 + kdvi/special.cpp | 60 +-- kdvi/vf.cpp | 16 +- kfax/faxinput.cpp | 14 +- kfax/kfax.cpp | 116 ++--- kfax/kfax.h | 5 +- kfax/kfax_printsettings.cpp | 4 +- kfax/kfax_printsettings.h | 9 +- kfax/options.cpp | 18 +- kfax/options.h | 7 +- kfaxview/faxmultipage.cpp | 4 +- kfaxview/faxmultipage.h | 3 +- kfaxview/faxrenderer.cpp | 20 +- kfaxview/faxrenderer.h | 3 +- kfaxview/libkfaximage/faxexpand.h | 4 +- kfaxview/libkfaximage/kfaximage.cpp | 28 +- kfaxview/libkfaximage/kfaximage.h | 5 +- kfaxview/main.cpp | 6 +- kfile-plugins/RETURNED_ITEMS | 2 +- kfile-plugins/bmp/kfile_bmp.cpp | 6 +- kfile-plugins/bmp/kfile_bmp.h | 3 +- kfile-plugins/configure.in.bot | 14 +- kfile-plugins/dds/kfile_dds.cpp | 34 +- kfile-plugins/dds/kfile_dds.h | 3 +- kfile-plugins/dvi/kfile_dvi.cpp | 16 +- kfile-plugins/dvi/kfile_dvi.h | 3 +- kfile-plugins/exr/kfile_exr.cpp | 22 +- kfile-plugins/exr/kfile_exr.h | 3 +- kfile-plugins/gif/gif-info.1 | 2 +- kfile-plugins/gif/kfile_gif.cpp | 12 +- kfile-plugins/gif/kfile_gif.h | 3 +- kfile-plugins/ico/kfile_ico.cpp | 6 +- kfile-plugins/ico/kfile_ico.h | 3 +- kfile-plugins/jpeg/exif.cpp | 20 +- kfile-plugins/jpeg/kfile_jpeg.cpp | 30 +- kfile-plugins/jpeg/kfile_jpeg.h | 5 +- kfile-plugins/pcx/kfile_pcx.cpp | 4 +- kfile-plugins/pcx/kfile_pcx.h | 43 +- kfile-plugins/pdf/Makefile.am | 1 + kfile-plugins/pdf/kfile_pdf.cpp | 14 +- kfile-plugins/pdf/kfile_pdf.h | 3 +- kfile-plugins/pdf/poppler-qt/poppler-document.cc | 54 +-- kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc | 6 +- kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h | 40 +- kfile-plugins/pdf/poppler-qt/poppler-link.cc | 52 +-- .../pdf/poppler-qt/poppler-page-transition.cc | 2 +- .../pdf/poppler-qt/poppler-page-transition.h | 4 +- kfile-plugins/pdf/poppler-qt/poppler-page.cc | 48 +- kfile-plugins/pdf/poppler-qt/poppler-private.cc | 44 +- kfile-plugins/pdf/poppler-qt/poppler-private.h | 10 +- kfile-plugins/pdf/poppler-qt/poppler-qt.h | 72 +-- kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp | 38 +- kfile-plugins/png/kfile_png.cpp | 4 +- kfile-plugins/png/kfile_png.h | 3 +- kfile-plugins/pnm/kfile_pnm.cpp | 4 +- kfile-plugins/pnm/kfile_pnm.h | 3 +- kfile-plugins/ps/gscreator.cpp | 12 +- kfile-plugins/ps/kfile_ps.cpp | 4 +- kfile-plugins/ps/kfile_ps.h | 3 +- kfile-plugins/raw/kcamerarawplugin.cpp | 4 +- kfile-plugins/raw/kcamerarawplugin.h | 3 +- kfile-plugins/raw/parse.c | 2 +- kfile-plugins/rgb/kfile_rgb.cpp | 56 +-- kfile-plugins/rgb/kfile_rgb.h | 5 +- kfile-plugins/tga/kfile_tga.cpp | 6 +- kfile-plugins/tga/kfile_tga.h | 3 +- kfile-plugins/tiff/kfile_tiff.cpp | 8 +- kfile-plugins/tiff/kfile_tiff.h | 3 +- kfile-plugins/xbm/kfile_xbm.cpp | 6 +- kfile-plugins/xbm/kfile_xbm.h | 3 +- kfile-plugins/xpm/kfile_xpm.cpp | 6 +- kfile-plugins/xpm/kfile_xpm.h | 3 +- kgamma/configure.in.in | 2 +- kgamma/kcmkgamma/displaynumber.cpp | 10 +- kgamma/kcmkgamma/displaynumber.h | 3 +- kgamma/kcmkgamma/gammactrl.cpp | 6 +- kgamma/kcmkgamma/gammactrl.h | 3 +- kgamma/kcmkgamma/kgamma.cpp | 34 +- kgamma/kcmkgamma/kgamma.h | 3 +- kgamma/xf86gammacfg/Makefile.am | 1 + kghostview/displayoptions.cpp | 12 +- kghostview/displayoptions.h | 6 +- kghostview/dscparse/dscparse.cpp | 26 +- kghostview/dscparse/dscparse.h | 14 +- kghostview/dscparse/dscparse_adapter.cpp | 2 +- kghostview/dscparse/dscparse_adapter.h | 12 +- kghostview/fullscreenfilter.cpp | 18 +- kghostview/fullscreenfilter.h | 5 +- kghostview/generalsettingswidget.ui | 20 +- kghostview/generalsettingswidget.ui.h | 2 +- kghostview/gssettingswidget.ui | 28 +- kghostview/gssettingswidget.ui.h | 4 +- kghostview/infodialog.cpp | 6 +- kghostview/infodialog.h | 3 +- kghostview/kdscerrordialog.cpp | 6 +- kghostview/kdscerrordialog.h | 3 +- kghostview/kgv_miniwidget.cpp | 22 +- kghostview/kgv_miniwidget.h | 3 +- kghostview/kgv_view.cpp | 68 +-- kghostview/kgv_view.h | 11 +- kghostview/kgvconfigdialog.cpp | 12 +- kghostview/kgvdocument.cpp | 62 +-- kghostview/kgvdocument.h | 10 +- kghostview/kgvfactory.cpp | 10 +- kghostview/kgvfactory.h | 4 +- kghostview/kgvmainwidget.cpp | 4 +- kghostview/kgvmainwidget.h | 5 +- kghostview/kgvpagedecorator.cpp | 6 +- kghostview/kgvpagedecorator.h | 8 +- kghostview/kgvpageview.cpp | 24 +- kghostview/kgvpageview.h | 5 +- kghostview/kgvshell.cpp | 26 +- kghostview/kgvshell.h | 1 + kghostview/kpswidget.cpp | 18 +- kghostview/kpswidget.h | 5 +- kghostview/logwindow.cpp | 8 +- kghostview/logwindow.h | 3 +- kghostview/marklist.cpp | 25 +- kghostview/marklist.h | 12 +- kghostview/scrollbox.cpp | 29 +- kghostview/scrollbox.h | 5 +- kghostview/thumbnailservice.cpp | 8 +- kghostview/thumbnailservice.h | 3 +- kghostview/viewcontrol.cpp | 40 +- kghostview/viewcontrol.h | 5 +- kiconedit/kcolorgrid.cpp | 26 +- kiconedit/kcolorgrid.h | 9 +- kiconedit/kicon.cpp | 32 +- kiconedit/kicon.h | 5 +- kiconedit/kiconcolors.cpp | 12 +- kiconedit/kiconcolors.h | 9 +- kiconedit/kiconconfig.cpp | 46 +- kiconedit/kiconconfig.h | 17 +- kiconedit/kiconedit.cpp | 94 ++-- kiconedit/kiconedit.h | 3 +- kiconedit/kiconeditslots.cpp | 18 +- kiconedit/kicongrid.cpp | 188 ++++---- kiconedit/kicongrid.h | 12 +- kiconedit/knew.cpp | 18 +- kiconedit/knew.h | 16 +- kiconedit/kresize.cpp | 16 +- kiconedit/kresize.h | 8 +- kiconedit/palettetoolbar.cpp | 54 +-- kiconedit/palettetoolbar.h | 5 +- kiconedit/properties.h | 2 +- kmrml/kmrml.spec | 6 +- kmrml/kmrml/algorithmcombo.cpp | 6 +- kmrml/kmrml/algorithmcombo.h | 3 +- kmrml/kmrml/algorithmdialog.cpp | 18 +- kmrml/kmrml/algorithmdialog.h | 3 +- kmrml/kmrml/browser.cpp | 6 +- kmrml/kmrml/browser.h | 3 +- kmrml/kmrml/collectioncombo.cpp | 4 +- kmrml/kmrml/collectioncombo.h | 3 +- kmrml/kmrml/kcontrol/indexcleaner.cpp | 14 +- kmrml/kmrml/kcontrol/indexcleaner.h | 5 +- kmrml/kmrml/kcontrol/indexer.cpp | 22 +- kmrml/kmrml/kcontrol/indexer.h | 5 +- kmrml/kmrml/kcontrol/indextest.h | 3 +- kmrml/kmrml/kcontrol/kcmkmrml.cpp | 18 +- kmrml/kmrml/kcontrol/kcmkmrml.h | 3 +- kmrml/kmrml/kcontrol/mainpage.cpp | 18 +- kmrml/kmrml/kcontrol/mainpage.h | 5 +- kmrml/kmrml/kcontrol/serverconfigwidget.ui | 34 +- kmrml/kmrml/lib/kmrml_config.cpp | 34 +- kmrml/kmrml/lib/kmrml_config.h | 2 +- kmrml/kmrml/lib/mrml_shared.cpp | 6 +- kmrml/kmrml/lib/mrml_shared.h | 4 +- kmrml/kmrml/lib/mrml_utils.h | 2 +- kmrml/kmrml/lib/watcher_stub.cpp | 2 +- kmrml/kmrml/loader.cpp | 4 +- kmrml/kmrml/loader.h | 3 +- kmrml/kmrml/mrml.cpp | 14 +- kmrml/kmrml/mrml.h | 2 +- kmrml/kmrml/mrml_creator.cpp | 4 +- kmrml/kmrml/mrml_creator.h | 4 +- kmrml/kmrml/mrml_elements.cpp | 18 +- kmrml/kmrml/mrml_elements.h | 6 +- kmrml/kmrml/mrml_part.cpp | 68 +-- kmrml/kmrml/mrml_part.h | 18 +- kmrml/kmrml/mrml_view.cpp | 54 +-- kmrml/kmrml/mrml_view.h | 16 +- kmrml/kmrml/propertysheet.cpp | 10 +- kmrml/kmrml/propertysheet.h | 6 +- kmrml/kmrml/propertywidgets.cpp | 20 +- kmrml/kmrml/propertywidgets.h | 25 +- kmrml/kmrml/server/watcher.cpp | 16 +- kmrml/kmrml/server/watcher.h | 1 + kolourpaint/BUGS | 6 +- kolourpaint/cursors/kpcursorlightcross.cpp | 24 +- kolourpaint/kolourpaint.cpp | 2 +- kolourpaint/kpcolor.cpp | 52 +-- kolourpaint/kpcolor.h | 16 +- kolourpaint/kpcommandhistory.cpp | 12 +- kolourpaint/kpcommandhistory.h | 10 +- kolourpaint/kpdefs.h | 98 ++-- kolourpaint/kpdocument.cpp | 148 +++--- kolourpaint/kpdocument.h | 13 +- kolourpaint/kpdocumentmetainfo.cpp | 10 +- kolourpaint/kpdocumentsaveoptions.cpp | 38 +- kolourpaint/kpdocumentsaveoptions.h | 4 +- kolourpaint/kpdocumentsaveoptionswidget.cpp | 70 +-- kolourpaint/kpdocumentsaveoptionswidget.h | 14 +- kolourpaint/kpmainwindow.cpp | 34 +- kolourpaint/kpmainwindow.h | 5 +- kolourpaint/kpmainwindow_edit.cpp | 88 ++-- kolourpaint/kpmainwindow_file.cpp | 80 ++-- kolourpaint/kpmainwindow_help.cpp | 8 +- kolourpaint/kpmainwindow_image.cpp | 42 +- kolourpaint/kpmainwindow_settings.cpp | 16 +- kolourpaint/kpmainwindow_statusbar.cpp | 20 +- kolourpaint/kpmainwindow_text.cpp | 14 +- kolourpaint/kpmainwindow_tools.cpp | 18 +- kolourpaint/kpmainwindow_view.cpp | 76 +-- kolourpaint/kpselection.cpp | 140 +++--- kolourpaint/kpselection.h | 13 +- kolourpaint/kpselectiondrag.cpp | 24 +- kolourpaint/kpselectiondrag.h | 5 +- kolourpaint/kpselectiontransparency.cpp | 4 +- kolourpaint/kpsinglekeytriggersaction.cpp | 4 +- kolourpaint/kpsinglekeytriggersaction.h | 3 +- kolourpaint/kptemppixmap.h | 2 +- kolourpaint/kpthumbnail.cpp | 60 +-- kolourpaint/kpthumbnail.h | 5 +- kolourpaint/kptool.cpp | 126 ++--- kolourpaint/kptool.h | 11 +- kolourpaint/kpview.cpp | 170 +++---- kolourpaint/kpview.h | 29 +- kolourpaint/kpviewmanager.cpp | 16 +- kolourpaint/kpviewmanager.h | 13 +- kolourpaint/kpviewscrollablecontainer.cpp | 134 +++--- kolourpaint/kpviewscrollablecontainer.h | 16 +- kolourpaint/patches/doc_resize_no_flicker.diff | 44 +- kolourpaint/pixmapfx/kpcoloreffect.cpp | 10 +- kolourpaint/pixmapfx/kpcoloreffect.h | 5 +- kolourpaint/pixmapfx/kpeffectbalance.cpp | 58 +-- kolourpaint/pixmapfx/kpeffectbalance.h | 3 +- kolourpaint/pixmapfx/kpeffectblursharpen.cpp | 22 +- kolourpaint/pixmapfx/kpeffectblursharpen.h | 3 +- kolourpaint/pixmapfx/kpeffectemboss.cpp | 18 +- kolourpaint/pixmapfx/kpeffectemboss.h | 3 +- kolourpaint/pixmapfx/kpeffectflatten.cpp | 8 +- kolourpaint/pixmapfx/kpeffectflatten.h | 3 +- kolourpaint/pixmapfx/kpeffectinvert.cpp | 20 +- kolourpaint/pixmapfx/kpeffectinvert.h | 3 +- kolourpaint/pixmapfx/kpeffectreducecolors.cpp | 20 +- kolourpaint/pixmapfx/kpeffectreducecolors.h | 5 +- kolourpaint/pixmapfx/kpeffectsdialog.cpp | 30 +- kolourpaint/pixmapfx/kpeffectsdialog.h | 3 +- kolourpaint/pixmapfx/kpfloodfill.cpp | 30 +- kolourpaint/pixmapfx/kppixmapfx.cpp | 222 ++++----- kolourpaint/pixmapfx/kppixmapfx.h | 36 +- kolourpaint/tools/kptoolaction.cpp | 4 +- kolourpaint/tools/kptoolaction.h | 3 +- kolourpaint/tools/kptoolairspray.cpp | 28 +- kolourpaint/tools/kptoolairspray.h | 1 + kolourpaint/tools/kptoolautocrop.cpp | 64 +-- kolourpaint/tools/kptoolautocrop.h | 2 +- kolourpaint/tools/kptoolbrush.cpp | 4 +- kolourpaint/tools/kptoolbrush.h | 1 + kolourpaint/tools/kptoolclear.cpp | 2 +- kolourpaint/tools/kptoolcolorpicker.cpp | 2 +- kolourpaint/tools/kptoolcolorpicker.h | 1 + kolourpaint/tools/kptoolcolorwasher.cpp | 2 +- kolourpaint/tools/kptoolcolorwasher.h | 1 + kolourpaint/tools/kptoolconverttograyscale.cpp | 2 +- kolourpaint/tools/kptoolcrop.cpp | 10 +- kolourpaint/tools/kptoolcurve.cpp | 2 +- kolourpaint/tools/kptoolcurve.h | 1 + kolourpaint/tools/kptoolellipse.cpp | 2 +- kolourpaint/tools/kptoolellipse.h | 1 + kolourpaint/tools/kptoolellipticalselection.cpp | 2 +- kolourpaint/tools/kptooleraser.cpp | 2 +- kolourpaint/tools/kptooleraser.h | 3 +- kolourpaint/tools/kptoolflip.cpp | 8 +- kolourpaint/tools/kptoolflip.h | 3 +- kolourpaint/tools/kptoolfloodfill.cpp | 4 +- kolourpaint/tools/kptoolfloodfill.h | 1 + kolourpaint/tools/kptoolfreeformselection.cpp | 2 +- kolourpaint/tools/kptoolline.cpp | 2 +- kolourpaint/tools/kptoolline.h | 1 + kolourpaint/tools/kptoolpen.cpp | 136 +++--- kolourpaint/tools/kptoolpen.h | 5 +- kolourpaint/tools/kptoolpolygon.cpp | 90 ++-- kolourpaint/tools/kptoolpolygon.h | 1 + kolourpaint/tools/kptoolpolyline.cpp | 2 +- kolourpaint/tools/kptoolpolyline.h | 1 + kolourpaint/tools/kptoolpreviewdialog.cpp | 30 +- kolourpaint/tools/kptoolpreviewdialog.h | 5 +- kolourpaint/tools/kptoolrectangle.cpp | 114 ++--- kolourpaint/tools/kptoolrectangle.h | 15 +- kolourpaint/tools/kptoolrectselection.cpp | 2 +- kolourpaint/tools/kptoolresizescale.cpp | 52 +-- kolourpaint/tools/kptoolresizescale.h | 1 + kolourpaint/tools/kptoolrotate.cpp | 12 +- kolourpaint/tools/kptoolrotate.h | 3 +- kolourpaint/tools/kptoolroundedrectangle.cpp | 2 +- kolourpaint/tools/kptoolroundedrectangle.h | 1 + kolourpaint/tools/kptoolselection.cpp | 66 +-- kolourpaint/tools/kptoolselection.h | 2 + kolourpaint/tools/kptoolskew.cpp | 8 +- kolourpaint/tools/kptoolskew.h | 3 +- kolourpaint/tools/kptooltext.cpp | 46 +- kolourpaint/tools/kptooltext.h | 1 + kolourpaint/views/kpthumbnailview.cpp | 6 +- kolourpaint/views/kpthumbnailview.h | 5 +- kolourpaint/views/kpunzoomedthumbnailview.cpp | 16 +- kolourpaint/views/kpunzoomedthumbnailview.h | 5 +- kolourpaint/views/kpzoomedthumbnailview.cpp | 8 +- kolourpaint/views/kpzoomedthumbnailview.h | 5 +- kolourpaint/views/kpzoomedview.cpp | 4 +- kolourpaint/views/kpzoomedview.h | 3 +- kolourpaint/widgets/kpcolorsimilaritycube.cpp | 32 +- kolourpaint/widgets/kpcolorsimilaritycube.h | 6 +- kolourpaint/widgets/kpcolorsimilaritydialog.cpp | 8 +- kolourpaint/widgets/kpcolorsimilaritydialog.h | 3 +- kolourpaint/widgets/kpcolortoolbar.cpp | 114 ++--- kolourpaint/widgets/kpcolortoolbar.h | 26 +- kolourpaint/widgets/kpresizesignallinglabel.cpp | 10 +- kolourpaint/widgets/kpresizesignallinglabel.h | 7 +- kolourpaint/widgets/kpsqueezedtextlabel.cpp | 48 +- kolourpaint/widgets/kpsqueezedtextlabel.h | 9 +- kolourpaint/widgets/kptooltoolbar.cpp | 16 +- kolourpaint/widgets/kptooltoolbar.h | 1 + kolourpaint/widgets/kptoolwidgetbase.cpp | 36 +- kolourpaint/widgets/kptoolwidgetbase.h | 13 +- kolourpaint/widgets/kptoolwidgetbrush.cpp | 44 +- kolourpaint/widgets/kptoolwidgetbrush.h | 5 +- kolourpaint/widgets/kptoolwidgeterasersize.cpp | 38 +- kolourpaint/widgets/kptoolwidgeterasersize.h | 3 +- kolourpaint/widgets/kptoolwidgetfillstyle.cpp | 40 +- kolourpaint/widgets/kptoolwidgetfillstyle.h | 7 +- kolourpaint/widgets/kptoolwidgetlinewidth.cpp | 22 +- kolourpaint/widgets/kptoolwidgetlinewidth.h | 3 +- .../widgets/kptoolwidgetopaqueortransparent.cpp | 4 +- .../widgets/kptoolwidgetopaqueortransparent.h | 3 +- kolourpaint/widgets/kptoolwidgetspraycansize.cpp | 20 +- kolourpaint/widgets/kptoolwidgetspraycansize.h | 3 +- kooka/CHANGES | 2 +- kooka/dwmenuaction.cpp | 8 +- kooka/dwmenuaction.h | 9 +- kooka/formathelp.h | 4 +- kooka/imageselectline.cpp | 8 +- kooka/imageselectline.h | 9 +- kooka/img_saver.cpp | 42 +- kooka/img_saver.h | 14 +- kooka/imgnamecombo.cpp | 16 +- kooka/imgnamecombo.h | 5 +- kooka/imgprintdialog.cpp | 24 +- kooka/imgprintdialog.h | 7 +- kooka/kadmosocr.cpp | 10 +- kooka/kadmosocr.h | 7 +- kooka/kocrbase.cpp | 20 +- kooka/kocrbase.h | 7 +- kooka/kocrgocr.cpp | 10 +- kooka/kocrgocr.h | 5 +- kooka/kocrkadmos.cpp | 20 +- kooka/kocrkadmos.h | 7 +- kooka/kocrocrad.cpp | 22 +- kooka/kocrocrad.h | 9 +- kooka/kooka.cpp | 52 +-- kooka/kooka.h | 7 +- kooka/kookaimage.cpp | 20 +- kooka/kookaimage.h | 16 +- kooka/kookaimagemeta.cpp | 4 +- kooka/kookaimagemeta.h | 4 +- kooka/kookapref.cpp | 34 +- kooka/kookapref.h | 5 +- kooka/kookaprint.cpp | 18 +- kooka/kookaprint.h | 7 +- kooka/kookarc | 30 +- kooka/kookaview.cpp | 52 +-- kooka/kookaview.h | 9 +- kooka/ksaneocr.cpp | 40 +- kooka/ksaneocr.h | 11 +- kooka/main.cpp | 8 +- kooka/ocrresedit.cpp | 16 +- kooka/ocrresedit.h | 9 +- kooka/ocrword.cpp | 10 +- kooka/ocrword.h | 6 +- kooka/resource.h | 6 +- kooka/scanpackager.cpp | 42 +- kooka/scanpackager.h | 9 +- kooka/thumbview.cpp | 16 +- kooka/thumbview.h | 7 +- kooka/thumbviewitem.cpp | 8 +- kooka/thumbviewitem.h | 6 +- kpdf/conf/dlgaccessibility.ui | 68 +-- kpdf/conf/dlggeneral.ui | 34 +- kpdf/conf/dlggeneral.ui.h | 2 +- kpdf/conf/dlgperformance.ui | 52 +-- kpdf/conf/dlgpresentation.ui | 46 +- kpdf/conf/preferencesdialog.cpp | 4 +- kpdf/conf/preferencesdialog.h | 2 +- kpdf/configure.in.in | 3 + kpdf/core/document.cpp | 44 +- kpdf/core/document.h | 7 +- kpdf/core/generator.h | 2 +- kpdf/core/generator_pdf/generator_pdf.cpp | 58 +-- kpdf/core/generator_pdf/generator_pdf.h | 4 +- kpdf/core/generator_pdf/gp_outputdev.cpp | 8 +- kpdf/core/generator_pdf/gp_outputdev.h | 4 +- kpdf/core/link.cpp | 6 +- kpdf/core/link.h | 2 +- kpdf/core/page.cpp | 20 +- kpdf/core/page.h | 4 +- kpdf/core/pagetransition.cpp | 2 +- kpdf/core/pagetransition.h | 6 +- kpdf/error.cpp | 2 +- kpdf/part.cpp | 76 +-- kpdf/part.h | 8 +- kpdf/shell/shell.cpp | 16 +- kpdf/shell/shell.h | 1 + kpdf/ui/minibar.cpp | 60 +-- kpdf/ui/minibar.h | 3 +- kpdf/ui/pagepainter.cpp | 30 +- kpdf/ui/pageview.cpp | 254 +++++----- kpdf/ui/pageview.h | 7 +- kpdf/ui/pageviewutils.cpp | 66 +-- kpdf/ui/pageviewutils.h | 10 +- kpdf/ui/presentationwidget.cpp | 156 +++---- kpdf/ui/presentationwidget.h | 5 +- kpdf/ui/propertiesdialog.cpp | 30 +- kpdf/ui/propertiesdialog.h | 2 +- kpdf/ui/searchwidget.cpp | 20 +- kpdf/ui/searchwidget.h | 5 +- kpdf/ui/thumbnaillist.cpp | 40 +- kpdf/ui/thumbnaillist.h | 11 +- kpdf/ui/toc.cpp | 20 +- kpdf/ui/toc.h | 5 +- kpdf/xpdf/xpdf/GlobalParams.cc | 2 +- kpovmodeler/StyleConvention | 8 +- kpovmodeler/baseinsertrules.xml | 144 +++--- kpovmodeler/pm2dcontrolpoint.cpp | 2 +- kpovmodeler/pmactions.cpp | 48 +- kpovmodeler/pmactions.h | 9 +- kpovmodeler/pmaddcommand.cpp | 20 +- kpovmodeler/pmaddcommand.h | 10 +- kpovmodeler/pmbicubicpatch.cpp | 16 +- kpovmodeler/pmbicubicpatch.h | 4 +- kpovmodeler/pmbicubicpatchedit.cpp | 32 +- kpovmodeler/pmbicubicpatchedit.h | 5 +- kpovmodeler/pmblendmapmodifiers.cpp | 8 +- kpovmodeler/pmblendmapmodifiers.h | 4 +- kpovmodeler/pmblendmapmodifiersedit.cpp | 4 +- kpovmodeler/pmblendmapmodifiersedit.h | 5 +- kpovmodeler/pmblob.cpp | 8 +- kpovmodeler/pmblob.h | 4 +- kpovmodeler/pmblobcylinder.cpp | 8 +- kpovmodeler/pmblobcylinder.h | 4 +- kpovmodeler/pmblobcylinderedit.cpp | 12 +- kpovmodeler/pmblobcylinderedit.h | 5 +- kpovmodeler/pmblobedit.cpp | 4 +- kpovmodeler/pmblobedit.h | 5 +- kpovmodeler/pmblobsphere.cpp | 8 +- kpovmodeler/pmblobsphere.h | 4 +- kpovmodeler/pmblobsphereedit.cpp | 18 +- kpovmodeler/pmblobsphereedit.h | 5 +- kpovmodeler/pmboundedby.cpp | 8 +- kpovmodeler/pmboundedby.h | 4 +- kpovmodeler/pmboundedbyedit.cpp | 4 +- kpovmodeler/pmboundedbyedit.h | 5 +- kpovmodeler/pmbox.cpp | 8 +- kpovmodeler/pmbox.h | 4 +- kpovmodeler/pmboxedit.cpp | 4 +- kpovmodeler/pmboxedit.h | 5 +- kpovmodeler/pmbumpmap.cpp | 8 +- kpovmodeler/pmbumpmap.h | 4 +- kpovmodeler/pmbumpmapedit.cpp | 6 +- kpovmodeler/pmbumpmapedit.h | 5 +- kpovmodeler/pmcamera.cpp | 8 +- kpovmodeler/pmcamera.h | 4 +- kpovmodeler/pmcameraedit.cpp | 66 +-- kpovmodeler/pmcameraedit.h | 5 +- kpovmodeler/pmclippedby.cpp | 8 +- kpovmodeler/pmclippedby.h | 4 +- kpovmodeler/pmclippedbyedit.cpp | 4 +- kpovmodeler/pmclippedbyedit.h | 5 +- kpovmodeler/pmcolor.cpp | 2 +- kpovmodeler/pmcolor.h | 4 +- kpovmodeler/pmcoloredit.cpp | 6 +- kpovmodeler/pmcoloredit.h | 5 +- kpovmodeler/pmcolorsettings.cpp | 84 ++-- kpovmodeler/pmcolorsettings.h | 3 +- kpovmodeler/pmcommand.h | 4 +- kpovmodeler/pmcommandmanager.cpp | 8 +- kpovmodeler/pmcommandmanager.h | 3 +- kpovmodeler/pmcomment.cpp | 8 +- kpovmodeler/pmcomment.h | 4 +- kpovmodeler/pmcommentedit.cpp | 8 +- kpovmodeler/pmcommentedit.h | 5 +- kpovmodeler/pmcompositeobject.cpp | 12 +- kpovmodeler/pmcompositeobject.h | 12 +- kpovmodeler/pmcone.cpp | 8 +- kpovmodeler/pmcone.h | 4 +- kpovmodeler/pmconeedit.cpp | 12 +- kpovmodeler/pmconeedit.h | 5 +- kpovmodeler/pmcsg.cpp | 8 +- kpovmodeler/pmcsg.h | 4 +- kpovmodeler/pmcsgedit.cpp | 14 +- kpovmodeler/pmcsgedit.h | 5 +- kpovmodeler/pmcylinder.cpp | 8 +- kpovmodeler/pmcylinder.h | 4 +- kpovmodeler/pmcylinderedit.cpp | 18 +- kpovmodeler/pmcylinderedit.h | 5 +- kpovmodeler/pmdatachangecommand.cpp | 2 +- kpovmodeler/pmdeclare.cpp | 14 +- kpovmodeler/pmdeclare.h | 4 +- kpovmodeler/pmdeclareedit.cpp | 24 +- kpovmodeler/pmdeclareedit.h | 5 +- kpovmodeler/pmdeletecommand.cpp | 46 +- kpovmodeler/pmdeletecommand.h | 8 +- kpovmodeler/pmdensity.cpp | 8 +- kpovmodeler/pmdensity.h | 4 +- kpovmodeler/pmdensityedit.cpp | 4 +- kpovmodeler/pmdensityedit.h | 5 +- kpovmodeler/pmdetailobject.cpp | 4 +- kpovmodeler/pmdetailobject.h | 2 +- kpovmodeler/pmdetailobjectedit.cpp | 14 +- kpovmodeler/pmdetailobjectedit.h | 5 +- kpovmodeler/pmdialogeditbase.cpp | 34 +- kpovmodeler/pmdialogeditbase.h | 13 +- kpovmodeler/pmdialogview.cpp | 20 +- kpovmodeler/pmdialogview.h | 12 +- kpovmodeler/pmdisc.cpp | 8 +- kpovmodeler/pmdisc.h | 4 +- kpovmodeler/pmdiscedit.cpp | 18 +- kpovmodeler/pmdiscedit.h | 5 +- kpovmodeler/pmdockwidget.cpp | 514 +++++++++++---------- kpovmodeler/pmdockwidget.h | 133 +++--- kpovmodeler/pmdockwidget_private.cpp | 100 ++-- kpovmodeler/pmdockwidget_private.h | 19 +- kpovmodeler/pmdocumentationmap.cpp | 2 +- kpovmodeler/pmdragwidget.cpp | 4 +- kpovmodeler/pmdragwidget.h | 5 +- kpovmodeler/pmenumproperty.cpp | 6 +- kpovmodeler/pmerrordialog.cpp | 10 +- kpovmodeler/pmerrordialog.h | 5 +- kpovmodeler/pmfactory.cpp | 8 +- kpovmodeler/pmfactory.h | 5 +- kpovmodeler/pmfiledialog.cpp | 12 +- kpovmodeler/pmfiledialog.h | 7 +- kpovmodeler/pmfinish.cpp | 8 +- kpovmodeler/pmfinish.h | 4 +- kpovmodeler/pmfinishedit.cpp | 72 +-- kpovmodeler/pmfinishedit.h | 5 +- kpovmodeler/pmfog.cpp | 8 +- kpovmodeler/pmfog.h | 4 +- kpovmodeler/pmfogedit.cpp | 4 +- kpovmodeler/pmfogedit.h | 5 +- kpovmodeler/pmformulalabel.cpp | 30 +- kpovmodeler/pmformulalabel.h | 12 +- kpovmodeler/pmglobalphotons.cpp | 8 +- kpovmodeler/pmglobalphotons.h | 4 +- kpovmodeler/pmglobalphotonsedit.cpp | 4 +- kpovmodeler/pmglobalphotonsedit.h | 5 +- kpovmodeler/pmglobalsettings.cpp | 8 +- kpovmodeler/pmglobalsettings.h | 4 +- kpovmodeler/pmglobalsettingsedit.cpp | 60 +-- kpovmodeler/pmglobalsettingsedit.h | 5 +- kpovmodeler/pmglview.cpp | 114 ++--- kpovmodeler/pmglview.h | 18 +- kpovmodeler/pmgraphicalobject.cpp | 4 +- kpovmodeler/pmgraphicalobject.h | 6 +- kpovmodeler/pmgraphicalobjectedit.cpp | 10 +- kpovmodeler/pmgraphicalobjectedit.h | 5 +- kpovmodeler/pmgridsettings.cpp | 48 +- kpovmodeler/pmgridsettings.h | 3 +- kpovmodeler/pmheightfield.cpp | 8 +- kpovmodeler/pmheightfield.h | 4 +- kpovmodeler/pmheightfieldedit.cpp | 6 +- kpovmodeler/pmheightfieldedit.h | 5 +- kpovmodeler/pmheightfieldroam.cpp | 6 +- kpovmodeler/pmimagemap.cpp | 8 +- kpovmodeler/pmimagemap.h | 4 +- kpovmodeler/pmimagemapedit.cpp | 22 +- kpovmodeler/pmimagemapedit.h | 5 +- kpovmodeler/pminserterrordialog.cpp | 6 +- kpovmodeler/pminserterrordialog.h | 5 +- kpovmodeler/pminsertpopup.cpp | 8 +- kpovmodeler/pminsertpopup.h | 8 +- kpovmodeler/pminsertrules.dtd | 16 +- kpovmodeler/pminsertrulesystem.cpp | 100 ++-- kpovmodeler/pminsertrulesystem.h | 30 +- kpovmodeler/pminterior.cpp | 8 +- kpovmodeler/pminterior.h | 4 +- kpovmodeler/pminterioredit.cpp | 30 +- kpovmodeler/pminterioredit.h | 5 +- kpovmodeler/pminteriortexture.cpp | 8 +- kpovmodeler/pminteriortexture.h | 4 +- kpovmodeler/pminteriortextureedit.cpp | 4 +- kpovmodeler/pminteriortextureedit.h | 5 +- kpovmodeler/pmiomanager.cpp | 6 +- kpovmodeler/pmiomanager.h | 2 +- kpovmodeler/pmisosurface.cpp | 8 +- kpovmodeler/pmisosurface.h | 4 +- kpovmodeler/pmisosurfaceedit.cpp | 6 +- kpovmodeler/pmisosurfaceedit.h | 5 +- kpovmodeler/pmjuliafractal.cpp | 8 +- kpovmodeler/pmjuliafractal.h | 4 +- kpovmodeler/pmjuliafractaledit.cpp | 4 +- kpovmodeler/pmjuliafractaledit.h | 5 +- kpovmodeler/pmlathe.cpp | 16 +- kpovmodeler/pmlathe.h | 4 +- kpovmodeler/pmlatheedit.cpp | 4 +- kpovmodeler/pmlatheedit.h | 5 +- kpovmodeler/pmlayoutsettings.cpp | 36 +- kpovmodeler/pmlayoutsettings.h | 13 +- kpovmodeler/pmlibrarybrowser.cpp | 8 +- kpovmodeler/pmlibrarybrowser.h | 14 +- kpovmodeler/pmlibraryentrypreview.cpp | 22 +- kpovmodeler/pmlibraryentrypreview.h | 5 +- kpovmodeler/pmlibraryhandle.cpp | 10 +- kpovmodeler/pmlibraryhandle.h | 6 +- kpovmodeler/pmlibraryhandleedit.cpp | 4 +- kpovmodeler/pmlibraryhandleedit.h | 3 +- kpovmodeler/pmlibraryiconview.cpp | 34 +- kpovmodeler/pmlibraryiconview.h | 12 +- kpovmodeler/pmlibrarymanager.cpp | 2 +- kpovmodeler/pmlibrarymanager.h | 2 +- kpovmodeler/pmlibraryobject.cpp | 6 +- kpovmodeler/pmlibraryobjectsearch.cpp | 4 +- kpovmodeler/pmlibraryobjectsearch.h | 5 +- kpovmodeler/pmlight.cpp | 8 +- kpovmodeler/pmlight.h | 4 +- kpovmodeler/pmlightedit.cpp | 4 +- kpovmodeler/pmlightedit.h | 5 +- kpovmodeler/pmlightgroup.cpp | 8 +- kpovmodeler/pmlightgroup.h | 4 +- kpovmodeler/pmlightgroupedit.cpp | 12 +- kpovmodeler/pmlightgroupedit.h | 5 +- kpovmodeler/pmlineedits.cpp | 24 +- kpovmodeler/pmlineedits.h | 10 +- kpovmodeler/pmlinkedit.cpp | 20 +- kpovmodeler/pmlinkedit.h | 15 +- kpovmodeler/pmlistpattern.cpp | 32 +- kpovmodeler/pmlistpattern.h | 16 +- kpovmodeler/pmlistpatternedit.cpp | 38 +- kpovmodeler/pmlistpatternedit.h | 5 +- kpovmodeler/pmlookslike.cpp | 8 +- kpovmodeler/pmlookslike.h | 4 +- kpovmodeler/pmmaterial.cpp | 8 +- kpovmodeler/pmmaterial.h | 4 +- kpovmodeler/pmmaterialedit.cpp | 4 +- kpovmodeler/pmmaterialedit.h | 5 +- kpovmodeler/pmmaterialmap.cpp | 8 +- kpovmodeler/pmmaterialmap.h | 4 +- kpovmodeler/pmmaterialmapedit.cpp | 6 +- kpovmodeler/pmmaterialmapedit.h | 5 +- kpovmodeler/pmmedia.cpp | 8 +- kpovmodeler/pmmedia.h | 4 +- kpovmodeler/pmmediaedit.cpp | 4 +- kpovmodeler/pmmediaedit.h | 5 +- kpovmodeler/pmmemento.cpp | 2 +- kpovmodeler/pmmesh.cpp | 20 +- kpovmodeler/pmmesh.h | 4 +- kpovmodeler/pmmeshedit.cpp | 20 +- kpovmodeler/pmmeshedit.h | 5 +- kpovmodeler/pmmetaobject.h | 2 +- kpovmodeler/pmmovecommand.cpp | 84 ++-- kpovmodeler/pmmovecommand.h | 10 +- kpovmodeler/pmnamedobject.cpp | 4 +- kpovmodeler/pmnamedobject.h | 2 +- kpovmodeler/pmnamedobjectedit.cpp | 10 +- kpovmodeler/pmnamedobjectedit.h | 5 +- kpovmodeler/pmnormal.cpp | 8 +- kpovmodeler/pmnormal.h | 4 +- kpovmodeler/pmnormaledit.cpp | 4 +- kpovmodeler/pmnormaledit.h | 5 +- kpovmodeler/pmobject.cpp | 22 +- kpovmodeler/pmobject.h | 44 +- kpovmodeler/pmobjectdrag.cpp | 10 +- kpovmodeler/pmobjectdrag.h | 4 +- kpovmodeler/pmobjectlibrarysettings.cpp | 18 +- kpovmodeler/pmobjectlibrarysettings.h | 3 +- kpovmodeler/pmobjectlink.cpp | 10 +- kpovmodeler/pmobjectlink.h | 4 +- kpovmodeler/pmobjectlinkedit.cpp | 4 +- kpovmodeler/pmobjectlinkedit.h | 5 +- kpovmodeler/pmobjectselect.cpp | 40 +- kpovmodeler/pmobjectselect.h | 15 +- kpovmodeler/pmobjectsettings.cpp | 214 ++++----- kpovmodeler/pmobjectsettings.h | 3 +- kpovmodeler/pmopenglsettings.cpp | 12 +- kpovmodeler/pmopenglsettings.h | 3 +- kpovmodeler/pmoutputdevice.cpp | 8 +- kpovmodeler/pmpalettevalueedit.cpp | 22 +- kpovmodeler/pmpalettevalueedit.h | 5 +- kpovmodeler/pmpalettevaluememento.cpp | 4 +- kpovmodeler/pmparser.cpp | 72 +-- kpovmodeler/pmparser.h | 18 +- kpovmodeler/pmpart.cpp | 126 ++--- kpovmodeler/pmpart.h | 16 +- kpovmodeler/pmpattern.cpp | 8 +- kpovmodeler/pmpattern.h | 4 +- kpovmodeler/pmpatternedit.cpp | 58 +-- kpovmodeler/pmpatternedit.h | 5 +- kpovmodeler/pmphotons.cpp | 8 +- kpovmodeler/pmphotons.h | 4 +- kpovmodeler/pmphotonsedit.cpp | 6 +- kpovmodeler/pmphotonsedit.h | 5 +- kpovmodeler/pmpigment.cpp | 8 +- kpovmodeler/pmpigment.h | 4 +- kpovmodeler/pmpigmentedit.cpp | 4 +- kpovmodeler/pmpigmentedit.h | 5 +- kpovmodeler/pmplane.cpp | 8 +- kpovmodeler/pmplane.h | 4 +- kpovmodeler/pmplaneedit.cpp | 26 +- kpovmodeler/pmplaneedit.h | 5 +- kpovmodeler/pmpluginmanager.cpp | 2 +- kpovmodeler/pmpluginsettings.cpp | 28 +- kpovmodeler/pmpluginsettings.h | 3 +- kpovmodeler/pmpolynom.cpp | 8 +- kpovmodeler/pmpolynom.h | 4 +- kpovmodeler/pmpolynomedit.cpp | 8 +- kpovmodeler/pmpolynomedit.h | 5 +- kpovmodeler/pmpovray31serialization.cpp | 342 +++++++------- kpovmodeler/pmpovray31serialization.h | 150 +++--- kpovmodeler/pmpovray35serialization.cpp | 104 ++--- kpovmodeler/pmpovray35serialization.h | 44 +- kpovmodeler/pmpovrayformat.cpp | 4 +- kpovmodeler/pmpovraymatrix.cpp | 8 +- kpovmodeler/pmpovraymatrix.h | 4 +- kpovmodeler/pmpovraymatrixedit.cpp | 4 +- kpovmodeler/pmpovraymatrixedit.h | 5 +- kpovmodeler/pmpovrayoutputwidget.cpp | 8 +- kpovmodeler/pmpovrayoutputwidget.h | 3 +- kpovmodeler/pmpovrayparser.cpp | 98 ++-- kpovmodeler/pmpovrayparser.h | 10 +- kpovmodeler/pmpovrayrenderwidget.cpp | 22 +- kpovmodeler/pmpovrayrenderwidget.h | 5 +- kpovmodeler/pmpovraysettings.cpp | 68 ++- kpovmodeler/pmpovraysettings.h | 3 +- kpovmodeler/pmpovraywidget.cpp | 30 +- kpovmodeler/pmpovraywidget.h | 5 +- kpovmodeler/pmpreviewsettings.cpp | 62 +-- kpovmodeler/pmpreviewsettings.h | 3 +- kpovmodeler/pmprism.cpp | 12 +- kpovmodeler/pmprism.h | 4 +- kpovmodeler/pmprismedit.cpp | 20 +- kpovmodeler/pmprismedit.h | 5 +- kpovmodeler/pmprismmemento.cpp | 2 +- kpovmodeler/pmprojectedthrough.cpp | 8 +- kpovmodeler/pmprojectedthrough.h | 4 +- kpovmodeler/pmprototypemanager.cpp | 40 +- kpovmodeler/pmprototypemanager.h | 4 +- kpovmodeler/pmquickcolor.cpp | 8 +- kpovmodeler/pmquickcolor.h | 8 +- kpovmodeler/pmquickcoloredit.cpp | 10 +- kpovmodeler/pmquickcoloredit.h | 9 +- kpovmodeler/pmradiosity.cpp | 8 +- kpovmodeler/pmradiosity.h | 4 +- kpovmodeler/pmradiosityedit.cpp | 4 +- kpovmodeler/pmradiosityedit.h | 5 +- kpovmodeler/pmrainbow.cpp | 8 +- kpovmodeler/pmrainbow.h | 4 +- kpovmodeler/pmrainbowedit.cpp | 4 +- kpovmodeler/pmrainbowedit.h | 5 +- kpovmodeler/pmraw.cpp | 8 +- kpovmodeler/pmraw.h | 4 +- kpovmodeler/pmrawedit.cpp | 8 +- kpovmodeler/pmrawedit.h | 5 +- kpovmodeler/pmrecursiveobjectiterator.cpp | 2 +- kpovmodeler/pmrendermanager.cpp | 70 +-- kpovmodeler/pmrendermanager.h | 3 +- kpovmodeler/pmrendermode.cpp | 18 +- kpovmodeler/pmrendermode.h | 2 +- kpovmodeler/pmrendermodesdialog.cpp | 8 +- kpovmodeler/pmrendermodesdialog.h | 6 +- kpovmodeler/pmresourcelocator.cpp | 6 +- kpovmodeler/pmrotate.cpp | 8 +- kpovmodeler/pmrotate.h | 4 +- kpovmodeler/pmrotateedit.cpp | 4 +- kpovmodeler/pmrotateedit.h | 5 +- kpovmodeler/pmscale.cpp | 8 +- kpovmodeler/pmscale.h | 4 +- kpovmodeler/pmscaleedit.cpp | 4 +- kpovmodeler/pmscaleedit.h | 5 +- kpovmodeler/pmscanner.cpp | 20 +- kpovmodeler/pmscanner.h | 8 +- kpovmodeler/pmscene.cpp | 4 +- kpovmodeler/pmscene.h | 4 +- kpovmodeler/pmserializer.cpp | 4 +- kpovmodeler/pmsettingsdialog.cpp | 20 +- kpovmodeler/pmsettingsdialog.h | 12 +- kpovmodeler/pmshell.cpp | 82 ++-- kpovmodeler/pmshell.h | 7 +- kpovmodeler/pmskysphere.cpp | 8 +- kpovmodeler/pmskysphere.h | 4 +- kpovmodeler/pmskysphereedit.cpp | 4 +- kpovmodeler/pmskysphereedit.h | 5 +- kpovmodeler/pmslope.cpp | 8 +- kpovmodeler/pmslope.h | 4 +- kpovmodeler/pmslopeedit.cpp | 4 +- kpovmodeler/pmslopeedit.h | 5 +- kpovmodeler/pmsolidcolor.cpp | 8 +- kpovmodeler/pmsolidcolor.h | 4 +- kpovmodeler/pmsolidcoloredit.cpp | 10 +- kpovmodeler/pmsolidcoloredit.h | 5 +- kpovmodeler/pmsolidobject.cpp | 4 +- kpovmodeler/pmsolidobject.h | 4 +- kpovmodeler/pmsolidobjectedit.cpp | 4 +- kpovmodeler/pmsolidobjectedit.h | 5 +- kpovmodeler/pmsor.cpp | 12 +- kpovmodeler/pmsor.h | 4 +- kpovmodeler/pmsoredit.cpp | 6 +- kpovmodeler/pmsoredit.h | 5 +- kpovmodeler/pmsphere.cpp | 8 +- kpovmodeler/pmsphere.h | 4 +- kpovmodeler/pmsphereedit.cpp | 20 +- kpovmodeler/pmsphereedit.h | 5 +- kpovmodeler/pmspheresweep.cpp | 18 +- kpovmodeler/pmspheresweep.h | 4 +- kpovmodeler/pmspheresweepedit.cpp | 4 +- kpovmodeler/pmspheresweepedit.h | 5 +- kpovmodeler/pmsplinememento.cpp | 2 +- kpovmodeler/pmsqe.cpp | 8 +- kpovmodeler/pmsqe.h | 10 +- kpovmodeler/pmsqeedit.cpp | 4 +- kpovmodeler/pmsqeedit.h | 9 +- kpovmodeler/pmsymboltable.cpp | 6 +- kpovmodeler/pmtext.cpp | 8 +- kpovmodeler/pmtext.h | 4 +- kpovmodeler/pmtextedit.cpp | 6 +- kpovmodeler/pmtextedit.h | 5 +- kpovmodeler/pmtexture.cpp | 8 +- kpovmodeler/pmtexture.h | 4 +- kpovmodeler/pmtexturebase.cpp | 6 +- kpovmodeler/pmtexturebase.h | 2 +- kpovmodeler/pmtexturebaseedit.cpp | 4 +- kpovmodeler/pmtexturebaseedit.h | 5 +- kpovmodeler/pmtextureedit.cpp | 4 +- kpovmodeler/pmtextureedit.h | 5 +- kpovmodeler/pmtexturemap.cpp | 34 +- kpovmodeler/pmtexturemap.h | 16 +- kpovmodeler/pmtexturemapedit.cpp | 4 +- kpovmodeler/pmtexturemapedit.h | 5 +- kpovmodeler/pmtokens.h | 16 +- kpovmodeler/pmtorus.cpp | 8 +- kpovmodeler/pmtorus.h | 4 +- kpovmodeler/pmtorusedit.cpp | 4 +- kpovmodeler/pmtorusedit.h | 5 +- kpovmodeler/pmtranslate.cpp | 8 +- kpovmodeler/pmtranslate.h | 4 +- kpovmodeler/pmtranslateedit.cpp | 4 +- kpovmodeler/pmtranslateedit.h | 5 +- kpovmodeler/pmtreeview.cpp | 84 ++-- kpovmodeler/pmtreeview.h | 13 +- kpovmodeler/pmtreeviewitem.cpp | 30 +- kpovmodeler/pmtreeviewitem.h | 32 +- kpovmodeler/pmtriangle.cpp | 8 +- kpovmodeler/pmtriangle.h | 4 +- kpovmodeler/pmtriangleedit.cpp | 10 +- kpovmodeler/pmtriangleedit.h | 5 +- kpovmodeler/pmtruetypecache.cpp | 6 +- kpovmodeler/pmunknownview.cpp | 8 +- kpovmodeler/pmunknownview.h | 2 +- kpovmodeler/pmvariant.cpp | 6 +- kpovmodeler/pmvector.cpp | 2 +- kpovmodeler/pmvectoredit.cpp | 90 ++-- kpovmodeler/pmvectoredit.h | 11 +- kpovmodeler/pmvectorlistedit.cpp | 32 +- kpovmodeler/pmvectorlistedit.h | 17 +- kpovmodeler/pmview.cpp | 10 +- kpovmodeler/pmview.h | 7 +- kpovmodeler/pmviewbase.h | 16 +- kpovmodeler/pmviewfactory.cpp | 10 +- kpovmodeler/pmviewfactory.h | 4 +- kpovmodeler/pmviewlayoutmanager.cpp | 38 +- kpovmodeler/pmviewlayoutmanager.h | 49 +- kpovmodeler/pmwarp.cpp | 8 +- kpovmodeler/pmwarp.h | 4 +- kpovmodeler/pmwarpedit.cpp | 6 +- kpovmodeler/pmwarpedit.h | 5 +- kpovmodeler/pmxmlhelper.h | 4 +- kpovmodeler/pmxmlparser.cpp | 6 +- kpovmodeler/pmxmlparser.h | 6 +- kruler/klineal.cpp | 26 +- kruler/klineal.h | 3 +- ksnapshot/ksnapshot.cpp | 64 +-- ksnapshot/ksnapshot.h | 24 +- ksnapshot/ksnapshotwidget.ui | 38 +- ksnapshot/ksnapshotwidget.ui.h | 8 +- ksnapshot/regiongrabber.cpp | 22 +- ksnapshot/regiongrabber.h | 7 +- ksnapshot/windowgrabber.cpp | 98 ++-- ksnapshot/windowgrabber.h | 3 +- ksvg/configure.in.in | 2 +- ksvg/core/CanvasFactory.cpp | 2 +- ksvg/core/CanvasItems.cpp | 32 +- ksvg/core/CanvasItems.h | 8 +- ksvg/core/KSVGCanvas.cpp | 86 ++-- ksvg/core/KSVGCanvas.h | 7 +- ksvg/core/KSVGHelper.h | 4 +- ksvg/core/KSVGLoader.cpp | 18 +- ksvg/core/KSVGLoader.h | 3 +- ksvg/core/KSVGReader.cc | 52 +-- ksvg/core/KSVGReader.h | 3 +- ksvg/data/SVGEcma.lut.h | 4 +- ksvg/data/SVGGlyphElementImpl.lut.h | 2 +- ksvg/data/SVGMaskElementImpl.lut.h | 4 +- ksvg/data/SVGPathSegImpl.lut.h | 16 +- ksvg/data/SVGStylableImpl.lut.h | 4 +- ksvg/dom/SVGCircleElement.h | 2 +- ksvg/dom/SVGElementInstance.cc | 4 +- ksvg/dom/SVGElementInstance.h | 2 +- ksvg/dom/SVGEllipseElement.h | 2 +- ksvg/dom/SVGLength.cc | 2 +- ksvg/dom/SVGLineElement.h | 2 +- ksvg/dom/SVGLocatable.h | 4 +- ksvg/dom/SVGMaskElement.cc | 8 +- ksvg/dom/SVGMaskElement.h | 4 +- ksvg/dom/SVGPathSeg.h | 8 +- ksvg/dom/SVGPolygonElement.h | 6 +- ksvg/dom/SVGPolylineElement.h | 6 +- ksvg/dom/SVGRectElement.h | 6 +- ksvg/dom/SVGSVGElement.h | 10 +- ksvg/dom/SVGTextElement.h | 6 +- ksvg/ecma/ksvg_ecma.cpp | 18 +- ksvg/ecma/ksvg_helper.cpp | 4 +- ksvg/ecma/ksvg_lookup.h | 22 +- ksvg/ecma/ksvg_window.cpp | 40 +- ksvg/ecma/ksvg_window.h | 17 +- ksvg/impl/LRUCache.h | 12 +- ksvg/impl/SVGAnimateElementImpl.cc | 2 +- ksvg/impl/SVGAnimateMotionElementImpl.cc | 2 +- ksvg/impl/SVGAnimateTransformElementImpl.cc | 4 +- ksvg/impl/SVGAnimatedPointsImpl.cc | 8 +- ksvg/impl/SVGAnimationElementImpl.cc | 38 +- ksvg/impl/SVGColorImpl.cc | 4 +- ksvg/impl/SVGColorProfileElementImpl.cc | 12 +- ksvg/impl/SVGColorProfileElementImpl.h | 2 +- ksvg/impl/SVGContainerImpl.cc | 36 +- ksvg/impl/SVGContainerImpl.h | 2 +- ksvg/impl/SVGDocumentImpl.cc | 22 +- ksvg/impl/SVGDocumentImpl.h | 5 +- ksvg/impl/SVGEcma.cc | 30 +- ksvg/impl/SVGElementImpl.cc | 14 +- ksvg/impl/SVGElementInstanceImpl.cc | 2 +- ksvg/impl/SVGElementInstanceImpl.h | 2 +- ksvg/impl/SVGEventImpl.cc | 106 ++--- ksvg/impl/SVGFitToViewBoxImpl.cc | 2 +- ksvg/impl/SVGGlyphElementImpl.cc | 4 +- ksvg/impl/SVGHelperImpl.cc | 10 +- ksvg/impl/SVGImageElementImpl.cc | 18 +- ksvg/impl/SVGImageElementImpl.h | 3 +- ksvg/impl/SVGLangSpaceImpl.cc | 12 +- ksvg/impl/SVGLengthImpl.cc | 12 +- ksvg/impl/SVGLocatableImpl.cc | 26 +- ksvg/impl/SVGLocatableImpl.h | 6 +- ksvg/impl/SVGMarkerElementImpl.cc | 12 +- ksvg/impl/SVGMaskElementImpl.cc | 156 +++---- ksvg/impl/SVGMaskElementImpl.h | 26 +- ksvg/impl/SVGPathElementImpl.cc | 8 +- ksvg/impl/SVGPathSegArcImpl.h | 4 +- ksvg/impl/SVGPathSegCurvetoCubicImpl.h | 4 +- ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h | 4 +- ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h | 8 +- ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h | 8 +- ksvg/impl/SVGPathSegImpl.cc | 8 +- ksvg/impl/SVGPathSegLinetoHorizontalImpl.h | 4 +- ksvg/impl/SVGPathSegLinetoImpl.h | 4 +- ksvg/impl/SVGPathSegLinetoVerticalImpl.h | 4 +- ksvg/impl/SVGPathSegMovetoImpl.h | 4 +- ksvg/impl/SVGPatternElementImpl.cc | 16 +- ksvg/impl/SVGSVGElementImpl.cc | 42 +- ksvg/impl/SVGSVGElementImpl.h | 2 +- ksvg/impl/SVGScriptElementImpl.cc | 2 +- ksvg/impl/SVGScriptElementImpl.h | 1 + ksvg/impl/SVGShapeImpl.cc | 10 +- ksvg/impl/SVGShapeImpl.h | 2 +- ksvg/impl/SVGStylableImpl.cc | 210 ++++----- ksvg/impl/SVGStylableImpl.h | 6 +- ksvg/impl/SVGSwitchElementImpl.cc | 4 +- ksvg/impl/SVGTextContentElementImpl.cc | 2 +- ksvg/impl/SVGTextContentElementImpl.h | 2 +- ksvg/impl/SVGTextElementImpl.cc | 2 +- ksvg/impl/SVGTextPathElementImpl.cc | 4 +- ksvg/impl/SVGTextPathElementImpl.h | 2 +- ksvg/impl/SVGTimeScheduler.cc | 8 +- ksvg/impl/SVGTimeScheduler.h | 3 +- ksvg/impl/SVGTransformableImpl.cc | 16 +- ksvg/impl/SVGURIReferenceImpl.cc | 10 +- ksvg/impl/SVGUnitConverter.h | 4 +- ksvg/impl/SVGUseElementImpl.cc | 52 +-- ksvg/impl/SVGUseElementImpl.h | 2 +- ksvg/impl/SVGWindowImpl.cc | 4 +- ksvg/impl/generateddata.cpp | 2 +- ksvg/impl/libs/art_support/art_misc.c | 110 ++--- ksvg/impl/libs/art_support/art_misc.h | 4 +- ksvg/impl/libs/art_support/art_rgba_svp.c | 58 +-- ksvg/impl/libs/art_support/art_rgba_svp.h | 6 +- ksvg/impl/libs/libtext2path/libtext2path.spec | 4 +- ksvg/impl/libs/libtext2path/src/Cache.h | 2 +- ksvg/impl/libs/libtext2path/src/Converter.cpp | 36 +- ksvg/impl/libs/libtext2path/src/Font.cpp | 6 +- ksvg/impl/libs/libtext2path/src/Glyph.cpp | 9 +- ksvg/impl/libs/libtext2path/src/Glyph.h | 6 +- ksvg/impl/libs/libtext2path/src/QtUnicode.cpp | 12 +- ksvg/impl/libs/libtext2path/src/QtUnicode.h | 4 +- .../libs/libtext2path/src/myboost/shared_ptr.hpp | 2 +- .../libs/xrgbrender/gdk-pixbuf-xlib-drawable.c | 14 +- ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h | 4 +- ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c | 2 +- ksvg/impl/svgpathparser.cc | 2 +- ksvg/plugin/backends/agg/AggCanvasFactory.h | 2 +- ksvg/plugin/backends/agg/AggCanvasItems.cpp | 36 +- ksvg/plugin/backends/agg/AggCanvasItems.h | 10 +- ksvg/plugin/backends/libart/LibartCanvas.cpp | 50 +- ksvg/plugin/backends/libart/LibartCanvas.h | 2 +- ksvg/plugin/backends/libart/LibartCanvasFactory.h | 2 +- ksvg/plugin/backends/libart/LibartCanvasItems.cpp | 142 +++--- ksvg/plugin/backends/libart/LibartCanvasItems.h | 20 +- ksvg/plugin/ksvg_factory.cpp | 10 +- ksvg/plugin/ksvg_factory.h | 8 +- ksvg/plugin/ksvg_plugin.cpp | 14 +- ksvg/plugin/ksvg_plugin.h | 3 +- ksvg/plugin/ksvg_widget.cpp | 28 +- ksvg/plugin/ksvg_widget.h | 5 +- ksvg/plugin/svgcreator.cpp | 4 +- ksvg/plugin/svgcreator.h | 1 + ksvg/scripts/check_hashtablesize.pl | 12 +- ksvg/scripts/generate.pl | 2 +- ksvg/test/W3C_TESTSUITE_1.1 | 26 +- ksvg/test/ZVON-TEST-PASSED | 36 +- ksvg/test/ecma/bbox/bbox.js | 14 +- ksvg/test/external/SVGTestWidget.cc | 20 +- ksvg/test/external/SVGTestWidget.h | 3 +- ksvg/test/external/printnodetest.h | 3 +- kuickshow/kuickshow.spec | 6 +- kuickshow/src/aboutwidget.cpp | 18 +- kuickshow/src/aboutwidget.h | 5 +- kuickshow/src/defaultswidget.cpp | 14 +- kuickshow/src/defaultswidget.h | 5 +- kuickshow/src/filecache.cpp | 6 +- kuickshow/src/filecache.h | 2 +- kuickshow/src/filefinder.cpp | 8 +- kuickshow/src/filefinder.h | 3 +- kuickshow/src/filewidget.cpp | 20 +- kuickshow/src/filewidget.h | 5 +- kuickshow/src/generalwidget.cpp | 22 +- kuickshow/src/generalwidget.h | 5 +- kuickshow/src/imagewindow.cpp | 114 ++--- kuickshow/src/imagewindow.h | 7 +- kuickshow/src/imlibwidget.cpp | 50 +- kuickshow/src/imlibwidget.h | 24 +- kuickshow/src/kuickconfigdlg.cpp | 4 +- kuickshow/src/kuickconfigdlg.h | 3 +- kuickshow/src/kuickdata.cpp | 4 +- kuickshow/src/kuickfile.cpp | 18 +- kuickshow/src/kuickfile.h | 7 +- kuickshow/src/kuickimage.cpp | 62 +-- kuickshow/src/kuickimage.h | 7 +- kuickshow/src/kuickshow.cpp | 60 +-- kuickshow/src/kuickshow.h | 7 +- kuickshow/src/kurlwidget.cpp | 4 +- kuickshow/src/kurlwidget.h | 1 + kuickshow/src/mainwidget.cpp | 6 +- kuickshow/src/mainwidget.h | 5 +- kuickshow/src/printing.cpp | 58 +-- kuickshow/src/printing.h | 7 +- kuickshow/src/slideshowwidget.cpp | 18 +- kuickshow/src/slideshowwidget.h | 5 +- kview/config/kviewconfmodules.cpp | 10 +- kview/config/kviewconfmodules.h | 3 +- kview/config/plugins/kviewpluginsconfig.cpp | 6 +- kview/config/plugins/kviewpluginsconfig.h | 3 +- kview/kimageviewer/canvas.h | 6 +- kview/kimageviewer/viewer.cpp | 4 +- kview/kimageviewer/viewer.h | 3 +- kview/kview.cpp | 72 +-- kview/kview.h | 1 + kview/kviewcanvas/config/confmodules.cpp | 8 +- kview/kviewcanvas/config/confmodules.h | 3 +- kview/kviewcanvas/config/defaults.h | 2 +- kview/kviewcanvas/config/generalconfigwidget.ui | 34 +- kview/kviewcanvas/kimagecanvas.cpp | 20 +- kview/kviewcanvas/kimagecanvas.h | 3 +- kview/kviewcanvas/kimageholder.cpp | 32 +- kview/kviewcanvas/kimageholder.h | 7 +- kview/kviewcanvas/test/test.cpp | 2 +- kview/kviewcanvas/test/test.h | 1 + .../config/kviewviewerpluginsconfig.cpp | 6 +- .../kviewviewer/config/kviewviewerpluginsconfig.h | 3 +- kview/kviewviewer/imagesettings.cpp | 12 +- kview/kviewviewer/imagesettings.h | 3 +- kview/kviewviewer/kviewkonqextension.cpp | 10 +- kview/kviewviewer/kviewkonqextension.h | 3 +- kview/kviewviewer/kviewviewer.cpp | 64 +-- kview/kviewviewer/kviewviewer.h | 5 +- kview/kviewviewer/printimagesettings.ui | 38 +- kview/kviewviewer/test/test.h | 1 + kview/modules/browser/kviewbrowser.cpp | 8 +- kview/modules/browser/kviewbrowser.h | 3 +- kview/modules/effects/kvieweffects.cpp | 6 +- kview/modules/effects/kvieweffects.h | 3 +- .../presenter/config/kviewpresenterconfig.cpp | 8 +- .../presenter/config/kviewpresenterconfig.h | 3 +- kview/modules/presenter/imagelistdialog.ui | 22 +- kview/modules/presenter/imagelistdialog.ui.h | 2 +- kview/modules/presenter/imagelistitem.cpp | 12 +- kview/modules/presenter/imagelistitem.h | 2 +- kview/modules/presenter/kviewpresenter.cpp | 42 +- kview/modules/presenter/kviewpresenter.h | 3 +- .../modules/presenter/kviewpresenterconfmodule.cpp | 8 +- kview/modules/presenter/kviewpresenterconfmodule.h | 3 +- kview/modules/scale/kfloatspinbox.cpp | 8 +- kview/modules/scale/kfloatspinbox.h | 5 +- kview/modules/scale/kview_scale.cpp | 42 +- kview/modules/scale/kview_scale.h | 3 +- kview/modules/scale/scaledlg.cpp | 42 +- kview/modules/scale/scaledlg.h | 5 +- kview/modules/scanner/kviewscanner.cpp | 6 +- kview/modules/scanner/kviewscanner.h | 3 +- kview/modules/template/kviewtemplate.cpp | 6 +- kview/modules/template/kviewtemplate.h | 3 +- kview/photobook/photobook.cpp | 28 +- kview/photobook/photobook.h | 17 +- kviewshell/anchor.h | 2 +- kviewshell/documentPageCache.cpp | 8 +- kviewshell/documentPageCache.h | 5 +- kviewshell/documentRenderer.cpp | 4 +- kviewshell/documentRenderer.h | 17 +- kviewshell/documentWidget.cpp | 64 +-- kviewshell/documentWidget.h | 13 +- kviewshell/emptyRenderer.cpp | 4 +- kviewshell/emptyRenderer.h | 3 +- kviewshell/empty_multipage.cpp | 4 +- kviewshell/empty_multipage.h | 5 +- kviewshell/history.cpp | 4 +- kviewshell/history.h | 11 +- kviewshell/hyperlink.h | 4 +- kviewshell/kmultipage.cpp | 142 +++--- kviewshell/kmultipage.h | 23 +- kviewshell/kprintDialogPage_pageoptions.cpp | 8 +- kviewshell/kprintDialogPage_pageoptions.h | 2 +- kviewshell/kviewpart.cpp | 160 +++---- kviewshell/kviewpart.h | 6 +- kviewshell/kviewpart_iface.h | 5 +- kviewshell/kviewshell.cpp | 24 +- kviewshell/kviewshell.h | 3 +- kviewshell/main.cpp | 6 +- kviewshell/marklist.cpp | 56 +-- kviewshell/marklist.h | 19 +- kviewshell/optionDialogAccessibilityWidget.ui | 60 +-- kviewshell/optionDialogGUIWidget_base.ui | 20 +- kviewshell/pageNumber.h | 16 +- kviewshell/pageSize.cpp | 12 +- kviewshell/pageSize.h | 7 +- kviewshell/pageSizeDialog.cpp | 6 +- kviewshell/pageSizeDialog.h | 3 +- kviewshell/pageSizeWidget.cpp | 16 +- kviewshell/pageSizeWidget.h | 3 +- kviewshell/pageSizeWidget_base.ui | 24 +- kviewshell/pageView.cpp | 102 ++-- kviewshell/pageView.h | 23 +- kviewshell/plugins/djvu/djvumultipage.cpp | 30 +- kviewshell/plugins/djvu/djvumultipage.h | 3 +- kviewshell/plugins/djvu/djvurenderer.cpp | 62 +-- kviewshell/plugins/djvu/djvurenderer.h | 5 +- .../kprintDialogPage_DJVUconversionoptions.cpp | 6 +- .../djvu/kprintDialogPage_DJVUconversionoptions.h | 2 +- ...tDialogPage_DJVUconversionoptions_basewidget.ui | 14 +- .../djvu/kprintDialogPage_DJVUpageoptions.cpp | 8 +- .../djvu/kprintDialogPage_DJVUpageoptions.h | 2 +- kviewshell/plugins/djvu/libdjvu/Arrays.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/Arrays.h | 2 +- .../plugins/djvu/libdjvu/BSEncodeByteStream.cpp | 16 +- kviewshell/plugins/djvu/libdjvu/DataPool.cpp | 14 +- kviewshell/plugins/djvu/libdjvu/DataPool.h | 2 +- kviewshell/plugins/djvu/libdjvu/DjVmDir.cpp | 28 +- kviewshell/plugins/djvu/libdjvu/DjVmDir0.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/DjVmDoc.cpp | 24 +- kviewshell/plugins/djvu/libdjvu/DjVmNav.cpp | 4 +- kviewshell/plugins/djvu/libdjvu/DjVmNav.h | 4 +- kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp | 64 +-- kviewshell/plugins/djvu/libdjvu/DjVuAnno.h | 16 +- kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.cpp | 126 ++--- kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.h | 2 +- kviewshell/plugins/djvu/libdjvu/DjVuDocument.cpp | 14 +- kviewshell/plugins/djvu/libdjvu/DjVuDocument.h | 2 +- kviewshell/plugins/djvu/libdjvu/DjVuDumpHelper.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/DjVuErrorList.cpp | 14 +- kviewshell/plugins/djvu/libdjvu/DjVuErrorList.h | 20 +- kviewshell/plugins/djvu/libdjvu/DjVuFile.cpp | 40 +- kviewshell/plugins/djvu/libdjvu/DjVuFile.h | 12 +- kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp | 18 +- kviewshell/plugins/djvu/libdjvu/DjVuGlobal.h | 2 +- kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp | 40 +- kviewshell/plugins/djvu/libdjvu/DjVuImage.h | 18 +- kviewshell/plugins/djvu/libdjvu/DjVuMessage.cpp | 12 +- .../plugins/djvu/libdjvu/DjVuMessageLite.cpp | 10 +- kviewshell/plugins/djvu/libdjvu/DjVuNavDir.cpp | 6 +- kviewshell/plugins/djvu/libdjvu/DjVuPalette.cpp | 14 +- kviewshell/plugins/djvu/libdjvu/DjVuPalette.h | 12 +- kviewshell/plugins/djvu/libdjvu/DjVuPort.cpp | 48 +- kviewshell/plugins/djvu/libdjvu/DjVuPort.h | 22 +- kviewshell/plugins/djvu/libdjvu/DjVuText.cpp | 128 ++--- kviewshell/plugins/djvu/libdjvu/DjVuText.h | 20 +- kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp | 92 ++-- kviewshell/plugins/djvu/libdjvu/DjVuToPS.h | 4 +- kviewshell/plugins/djvu/libdjvu/GBitmap.cpp | 28 +- kviewshell/plugins/djvu/libdjvu/GBitmap.h | 4 +- kviewshell/plugins/djvu/libdjvu/GContainer.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/GContainer.h | 16 +- kviewshell/plugins/djvu/libdjvu/GIFFManager.cpp | 42 +- kviewshell/plugins/djvu/libdjvu/GIFFManager.h | 14 +- kviewshell/plugins/djvu/libdjvu/GMapAreas.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/GMapAreas.h | 32 +- kviewshell/plugins/djvu/libdjvu/GOS.cpp | 6 +- kviewshell/plugins/djvu/libdjvu/GPixmap.h | 4 +- kviewshell/plugins/djvu/libdjvu/GRect.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/GRect.h | 10 +- kviewshell/plugins/djvu/libdjvu/GSmartPointer.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/GSmartPointer.h | 2 +- kviewshell/plugins/djvu/libdjvu/GString.cpp | 10 +- kviewshell/plugins/djvu/libdjvu/GString.h | 16 +- kviewshell/plugins/djvu/libdjvu/GThreads.cpp | 26 +- kviewshell/plugins/djvu/libdjvu/GThreads.h | 58 +-- kviewshell/plugins/djvu/libdjvu/GURL.h | 2 +- kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp | 2 +- .../plugins/djvu/libdjvu/IW44EncodeCodec.cpp | 90 ++-- kviewshell/plugins/djvu/libdjvu/IW44Image.cpp | 4 +- kviewshell/plugins/djvu/libdjvu/IW44Image.h | 22 +- kviewshell/plugins/djvu/libdjvu/JB2EncodeCodec.cpp | 138 +++--- kviewshell/plugins/djvu/libdjvu/JB2Image.cpp | 192 ++++---- kviewshell/plugins/djvu/libdjvu/JB2Image.h | 188 ++++---- kviewshell/plugins/djvu/libdjvu/MMRDecoder.cpp | 16 +- kviewshell/plugins/djvu/libdjvu/MMRDecoder.h | 4 +- kviewshell/plugins/djvu/libdjvu/XMLParser.cpp | 130 +++--- kviewshell/plugins/djvu/libdjvu/XMLTags.cpp | 6 +- kviewshell/plugins/djvu/libdjvu/XMLTags.h | 6 +- kviewshell/plugins/djvu/libdjvu/ZPCodec.h | 4 +- kviewshell/plugins/djvu/libdjvu/configure.in.in | 9 +- kviewshell/plugins/djvu/pageRangeWidget.cpp | 2 +- kviewshell/plugins/djvu/pageRangeWidget.h | 7 +- kviewshell/plugins/djvu/pageRangeWidget_base.ui | 8 +- kviewshell/renderedDocumentPage.cpp | 14 +- kviewshell/renderedDocumentPage.h | 9 +- kviewshell/renderedDocumentPagePixmap.cpp | 6 +- kviewshell/renderedDocumentPagePixmap.h | 3 +- kviewshell/searchWidget.cpp | 26 +- kviewshell/searchWidget.h | 7 +- kviewshell/selection.cpp | 16 +- kviewshell/selection.h | 10 +- kviewshell/simplePageSize.cpp | 6 +- kviewshell/simplePageSize.h | 4 +- kviewshell/sizePreview.cpp | 14 +- kviewshell/sizePreview.h | 5 +- kviewshell/tableOfContents.cpp | 18 +- kviewshell/tableOfContents.h | 9 +- kviewshell/units.cpp | 2 +- kviewshell/zoom.cpp | 18 +- kviewshell/zoom.h | 3 +- libkscan/COPYING.LIB | 4 +- libkscan/devselector.cpp | 22 +- libkscan/devselector.h | 5 +- libkscan/dispgamma.cpp | 14 +- libkscan/dispgamma.h | 5 +- libkscan/gammadialog.cpp | 6 +- libkscan/gammadialog.h | 7 +- libkscan/img_canvas.cpp | 34 +- libkscan/img_canvas.h | 21 +- libkscan/imgscaledialog.cpp | 6 +- libkscan/imgscaledialog.h | 5 +- libkscan/kgammatable.h | 9 +- libkscan/kscandevice.cpp | 82 ++-- libkscan/kscandevice.h | 25 +- libkscan/kscandoc.h | 2 +- libkscan/kscanoption.cpp | 36 +- libkscan/kscanoption.h | 15 +- libkscan/kscanoptset.cpp | 4 +- libkscan/kscanslider.cpp | 30 +- libkscan/kscanslider.h | 37 +- libkscan/massscandialog.cpp | 4 +- libkscan/massscandialog.h | 5 +- libkscan/previewer.cpp | 28 +- libkscan/previewer.h | 7 +- libkscan/scandialog.cpp | 38 +- libkscan/scandialog.h | 7 +- libkscan/scanparams.cpp | 42 +- libkscan/scanparams.h | 11 +- libkscan/scansourcedialog.cpp | 4 +- libkscan/scansourcedialog.h | 3 +- libkscan/sizeindicator.cpp | 10 +- libkscan/sizeindicator.h | 7 +- 1370 files changed, 12296 insertions(+), 11863 deletions(-) diff --git a/kamera/kcontrol/kamera.cpp b/kamera/kcontrol/kamera.cpp index 97338181..50d7fc12 100644 --- a/kamera/kcontrol/kamera.cpp +++ b/kamera/kcontrol/kamera.cpp @@ -48,8 +48,8 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kamera, KKameraConfigFactory( "kcmkamera" ) ) KKameraConfig *KKameraConfig::m_instance = NULL; -KKameraConfig::KKameraConfig(TQWidget *parent, const char *name, const TQStringList &) - : KCModule(KKameraConfigFactory::instance(), parent, name) +KKameraConfig::KKameraConfig(TQWidget *tqparent, const char *name, const TQStringList &) + : KCModule(KKameraConfigFactory::instance(), tqparent, name) { m_devicePopup = new KPopupMenu(this); m_actions = new KActionCollection(this); @@ -96,7 +96,7 @@ void KKameraConfig::displayGPSuccessDialogue(void) // set the kcontrol module buttons setButtons(Help | Apply | Cancel | Ok); - // create a layout with two vertical boxes + // create a tqlayout with two vertical boxes TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, 0); topLayout->setAutoAdd(true); @@ -113,29 +113,29 @@ void KKameraConfig::displayGPSuccessDialogue(void) connect(m_deviceSel, TQT_SIGNAL(selectionChanged(TQIconViewItem *)), TQT_SLOT(slot_deviceSelected(TQIconViewItem *))); - m_deviceSel->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + m_deviceSel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); // create actions KAction *act; - act = new KAction(i18n("Add"), "camera", 0, this, TQT_SLOT(slot_addCamera()), m_actions, "camera_add"); + act = new KAction(i18n("Add"), "camera", 0, TQT_TQOBJECT(this), TQT_SLOT(slot_addCamera()), m_actions, "camera_add"); act->setWhatsThis(i18n("Click this button to add a new camera.")); act->plug(m_toolbar); m_toolbar->insertLineSeparator(); - act = new KAction(i18n("Test"), "camera_test", 0, this, TQT_SLOT(slot_testCamera()), m_actions, "camera_test"); + act = new KAction(i18n("Test"), "camera_test", 0, TQT_TQOBJECT(this), TQT_SLOT(slot_testCamera()), m_actions, "camera_test"); act->setWhatsThis(i18n("Click this button to remove the selected camera from the list.")); act->plug(m_toolbar); - act = new KAction(i18n("Remove"), "edittrash", 0, this, TQT_SLOT(slot_removeCamera()), m_actions, "camera_remove"); + act = new KAction(i18n("Remove"), "edittrash", 0, TQT_TQOBJECT(this), TQT_SLOT(slot_removeCamera()), m_actions, "camera_remove"); act->setWhatsThis(i18n("Click this button to remove the selected camera from the list.")); act->plug(m_toolbar); - act = new KAction(i18n("Configure..."), "configure", 0, this, TQT_SLOT(slot_configureCamera()), m_actions, "camera_configure"); + act = new KAction(i18n("Configure..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slot_configureCamera()), m_actions, "camera_configure"); act->setWhatsThis(i18n("Click this button to change the configuration of the selected camera.

The availability of this feature and the contents of the Configuration dialog depend on the camera model.")); act->plug(m_toolbar); - act = new KAction(i18n("Information"), "hwinfo", 0, this, TQT_SLOT(slot_cameraSummary()), m_actions, "camera_summary"); + act = new KAction(i18n("Information"), "hwinfo", 0, TQT_TQOBJECT(this), TQT_SLOT(slot_cameraSummary()), m_actions, "camera_summary"); act->setWhatsThis(i18n("Click this button to view a summary of the current status of the selected camera.

The availability of this feature and the contents of the Configuration dialog depend on the camera model.")); act->plug(m_toolbar); m_toolbar->insertLineSeparator(); - act = new KAction(i18n("Cancel"), "stop", 0, this, TQT_SLOT(slot_cancelOperation()), m_actions, "camera_cancel"); + act = new KAction(i18n("Cancel"), "stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slot_cancelOperation()), m_actions, "camera_cancel"); act->setWhatsThis(i18n("Click this button to cancel the current camera operation.")); act->setEnabled(false); act->plug(m_toolbar); @@ -184,7 +184,7 @@ void KKameraConfig::load(bool useDefaults ) for (it = groupList.begin(); it != groupList.end(); it++) { if (*it != "") { m_config->setGroup(*it); - if (m_config->readEntry("Path").contains("usb:")) + if (m_config->readEntry("Path").tqcontains("usb:")) continue; kcamera = new KCamera(*it,m_config->readEntry("Path")); @@ -218,7 +218,7 @@ void KKameraConfig::load(bool useDefaults ) if (!strcmp(value,"usb:")) names[model] = value; } - if (ports.contains("usb:") && names[ports["usb:"]]!="usb:") + if (ports.tqcontains("usb:") && names[ports["usb:"]]!="usb:") ports.remove("usb:"); TQMap::iterator portit; @@ -256,7 +256,7 @@ void KKameraConfig::afterCameraOperation(void) // if we're regaining control after a Cancel... if (m_cancelPending) { - qApp->restoreOverrideCursor(); + tqApp->restoreOverrideCursor(); m_cancelPending = false; } @@ -268,23 +268,23 @@ void KKameraConfig::afterCameraOperation(void) TQString KKameraConfig::suggestName(const TQString &name) { TQString new_name = name; - new_name.replace("/", ""); // we cannot have a slash in a URI's host + new_name.tqreplace("/", ""); // we cannot have a slash in a URI's host - if (!m_devices.contains(new_name)) return new_name; + if (!m_devices.tqcontains(new_name)) return new_name; // try new names with a number appended until we find a free one int i = 1; while (i++ < 0xffff) { new_name = name + " (" + TQString::number(i) + ")"; - if (!m_devices.contains(new_name)) return new_name; + if (!m_devices.tqcontains(new_name)) return new_name; } - return TQString::null; + return TQString(); } void KKameraConfig::slot_addCamera() { - KCamera *m_device = new KCamera(TQString::null,TQString::null); + KCamera *m_device = new KCamera(TQString(),TQString()); connect(m_device, TQT_SIGNAL(error(const TQString &)), TQT_SLOT(slot_error(const TQString &))); connect(m_device, TQT_SIGNAL(error(const TQString &, const TQString &)), TQT_SLOT(slot_error(const TQString &, const TQString &))); KameraDeviceSelectDialog dialog(this, m_device); @@ -302,7 +302,7 @@ void KKameraConfig::slot_addCamera() void KKameraConfig::slot_removeCamera() { TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; m_devices.remove(name); delete m_device; @@ -317,7 +317,7 @@ void KKameraConfig::slot_testCamera() beforeCameraOperation(); TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; if (m_device->test()) KMessageBox::information(this, i18n("Camera test was successful.")); @@ -329,7 +329,7 @@ void KKameraConfig::slot_testCamera() void KKameraConfig::slot_configureCamera() { TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; m_device->configure(); } @@ -339,7 +339,7 @@ void KKameraConfig::slot_cameraSummary() { TQString summary; TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; summary = m_device->summary(); if (!summary.isNull()) { @@ -354,7 +354,7 @@ void KKameraConfig::slot_cancelOperation() // Prevent the user from keeping clicking Cancel m_actions->action("camera_cancel")->setEnabled(false); // and indicate that the click on Cancel did have some effect - qApp->setOverrideCursor(Qt::WaitCursor); + tqApp->setOverrideCursor(TQt::WaitCursor); } void KKameraConfig::slot_deviceMenu(TQIconViewItem *item, const TQPoint &point) @@ -381,7 +381,7 @@ void KKameraConfig::cbGPIdle(GPContext * /*context*/, void * /*data*/) { /*KKameraConfig *self( reinterpret_cast(data) );*/ - qApp->processEvents(); + tqApp->processEvents(); } GPContextFeedback KKameraConfig::cbGPCancel(GPContext * /*context*/, void *data) @@ -390,7 +390,7 @@ GPContextFeedback KKameraConfig::cbGPCancel(GPContext * /*context*/, void *data) // Since in practice no camera driver supports idle callbacks yet, // we'll use the cancel callback as opportunity to process events - qApp->processEvents(); + tqApp->processEvents(); // If a cancel request is pending, ask gphoto to cancel if (self->m_cancelPending) diff --git a/kamera/kcontrol/kamera.h b/kamera/kcontrol/kamera.h index 6e66d642..537522f6 100644 --- a/kamera/kcontrol/kamera.h +++ b/kamera/kcontrol/kamera.h @@ -47,10 +47,11 @@ class KPopupMenu; class KKameraConfig : public KCModule { Q_OBJECT + TQ_OBJECT friend class KameraDeviceSelectDialog; public: - KKameraConfig(TQWidget *parent, const char *name, const TQStringList &); + KKameraConfig(TQWidget *tqparent, const char *name, const TQStringList &); virtual ~KKameraConfig(); // KCModule interface methods diff --git a/kamera/kcontrol/kameraconfigdialog.cpp b/kamera/kcontrol/kameraconfigdialog.cpp index 124ea991..914e17ab 100644 --- a/kamera/kcontrol/kameraconfigdialog.cpp +++ b/kamera/kcontrol/kameraconfigdialog.cpp @@ -42,9 +42,9 @@ KameraConfigDialog::KameraConfigDialog(Camera */*camera*/, CameraWidget *widget, - TQWidget *parent, + TQWidget *tqparent, const char *name) : -KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok ), +KDialogBase(tqparent, name, true, TQString(), Ok|Cancel, Ok ), m_widgetRoot(widget) { TQFrame *main = makeMainWidget(); @@ -56,9 +56,9 @@ m_widgetRoot(widget) appendWidget(main, widget); } -void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) +void KameraConfigDialog::appendWidget(TQWidget *tqparent, CameraWidget *widget) { - TQWidget *newParent = parent; + TQWidget *newParent = tqparent; CameraWidgetType widget_type; const char *widget_name; @@ -74,7 +74,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) TQString whats_this = TQString::fromLocal8Bit(widget_info); // gphoto2 doesn't seem to have any standard for i18n - // Add this widget to parent + // Add this widget to tqparent switch(widget_type) { case GP_WIDGET_WINDOW: { @@ -85,7 +85,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) case GP_WIDGET_SECTION: { if (!m_tabWidget) - m_tabWidget = new TQTabWidget(parent); + m_tabWidget = new TQTabWidget(tqparent); TQWidget *tab = new TQWidget(m_tabWidget); // widgets are to be aligned vertically in the tab TQVBoxLayout *tabLayout = new TQVBoxLayout(tab, marginHint(), @@ -104,7 +104,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) { gp_widget_get_value(widget, &widget_value_string); - TQGrid *grid = new TQGrid(2, Horizontal, parent); + TQGrid *grid = new TQGrid(2,Qt::Horizontal, tqparent); grid->setSpacing(spacingHint()); new TQLabel(TQString::fromLocal8Bit( widget_label )+":", grid); TQLineEdit *lineEdit = new TQLineEdit(widget_value_string, grid); @@ -123,13 +123,13 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) gp_widget_get_range(widget, &widget_low, &widget_high, &widget_increment); gp_widget_get_value(widget, &widget_value_float); - TQGroupBox *groupBox = new TQVGroupBox(widget_label, parent); + TQGroupBox *groupBox = new TQVGroupBox(widget_label, tqparent); TQSlider *slider = new TQSlider( ( int )widget_low, ( int )widget_high, ( int )widget_increment, ( int )widget_value_float, - TQSlider::Horizontal, + Qt::Horizontal, groupBox ); m_wmap.insert(widget, slider); @@ -142,7 +142,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) { gp_widget_get_value(widget, &widget_value_int); - TQCheckBox *checkBox = new TQCheckBox(widget_label, parent); + TQCheckBox *checkBox = new TQCheckBox(widget_label, tqparent); checkBox->setChecked(widget_value_int); m_wmap.insert(widget, checkBox); @@ -160,9 +160,9 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) // for less than 5 options, align them horizontally TQButtonGroup *buttonGroup; if (count > 4) - buttonGroup = new TQVButtonGroup(widget_label, parent); + buttonGroup = new TQVButtonGroup(widget_label, tqparent); else - buttonGroup = new TQHButtonGroup(widget_label, parent); + buttonGroup = new TQHButtonGroup(widget_label, tqparent); for(int i = 0; i < count; ++i) { const char *widget_choice; @@ -183,7 +183,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) { gp_widget_get_value(widget, &widget_value_string); - TQComboBox *comboBox = new TQComboBox(FALSE, parent); + TQComboBox *comboBox = new TQComboBox(FALSE, tqparent); comboBox->clear(); for(int i = 0; i < gp_widget_count_choices(widget); ++i) { const char *widget_choice; @@ -206,14 +206,14 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) // I can't see a way of implementing this. Since there is // no way of telling which button sent you a signal, we // can't map to the appropriate widget->callback - new TQLabel(i18n("Button (not supported by KControl)"), parent); + new TQLabel(i18n("Button (not supported by KControl)"), tqparent); break; } case GP_WIDGET_DATE: { // TODO - new TQLabel(i18n("Date (not supported by KControl)"), parent); + new TQLabel(i18n("Date (not supported by KControl)"), tqparent); break; } @@ -221,14 +221,14 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) return; } - // Append all this widgets children + // Append all this widgets tqchildren for(int i = 0; i < gp_widget_count_children(widget); ++i) { CameraWidget *widget_child; gp_widget_get_child(widget, i, &widget_child); appendWidget(newParent, widget_child); } - // Things that must be done after all children were added + // Things that must be done after all tqchildren were added /* switch (widget_type) { case GP_WIDGET_SECTION: @@ -309,7 +309,7 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget) void KameraConfigDialog::slotOk() { - // Copy Qt widget values into CameraWidget hierarchy + // Copy TQt widget values into CameraWidget hierarchy updateWidgetValue(m_widgetRoot); // 'ok' dialog diff --git a/kamera/kcontrol/kameraconfigdialog.h b/kamera/kcontrol/kameraconfigdialog.h index 575f4aad..d02a6ed1 100644 --- a/kamera/kcontrol/kameraconfigdialog.h +++ b/kamera/kcontrol/kameraconfigdialog.h @@ -34,15 +34,16 @@ extern "C" { class KameraConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KameraConfigDialog(Camera *camera, CameraWidget *widget, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); private slots: void slotOk(); private: - void appendWidget(TQWidget *parent, CameraWidget *widget); + void appendWidget(TQWidget *tqparent, CameraWidget *widget); void updateWidgetValue(CameraWidget *widget); TQMap m_wmap; diff --git a/kamera/kcontrol/kameradevice.cpp b/kamera/kcontrol/kameradevice.cpp index 9492934b..2e8e45e2 100644 --- a/kamera/kcontrol/kameradevice.cpp +++ b/kamera/kcontrol/kameradevice.cpp @@ -86,7 +86,7 @@ bool KCamera::initInformation() int index = gp_abilities_list_lookup_model(m_abilitylist, m_model.local8Bit().data()); if(index < 0) { emit error(i18n("Description of abilities for camera %1 is not available." - " Configuration options may be incorrect.").arg(m_model)); + " Configuration options may be incorrect.").tqarg(m_model)); return false; } gp_abilities_list_get_abilities(m_abilitylist, index, &m_abilities); @@ -197,7 +197,7 @@ void KCamera::load(KConfig *config) m_model = config->readEntry("Model"); if (m_path.isNull()) m_path = config->readEntry("Path"); - invalidateCamera(); + tqinvalidateCamera(); } void KCamera::save(KConfig *config) @@ -209,7 +209,7 @@ void KCamera::save(KConfig *config) TQString KCamera::portName() { - TQString port = m_path.left(m_path.find(":")).lower(); + TQString port = m_path.left(m_path.tqfind(":")).lower(); if (port == "serial") return i18n("Serial"); if (port == "usb") return i18n("USB"); return i18n("Unknown port"); @@ -223,17 +223,17 @@ void KCamera::setName(const TQString &name) void KCamera::setModel(const TQString &model) { m_model = model; - invalidateCamera(); + tqinvalidateCamera(); initInformation(); } void KCamera::setPath(const TQString &path) { m_path = path; - invalidateCamera(); + tqinvalidateCamera(); } -void KCamera::invalidateCamera() +void KCamera::tqinvalidateCamera() { if (m_camera) { gp_camera_free(m_camera); @@ -270,8 +270,8 @@ CameraAbilities KCamera::abilities() // ---------- KameraSelectCamera ------------ -KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *device) - : KDialogBase(parent, "kkameradeviceselect", true, i18n("Select Camera Device"), Ok | Cancel, Ok, true) +KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *tqparent, KCamera *device) + : KDialogBase(tqparent, "kkameradeviceselect", true, i18n("Select Camera Device"), Ok | Cancel, Ok, true) { m_device = device; connect(m_device, TQT_SIGNAL(error(const TQString &)), @@ -282,7 +282,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *de TQWidget *page = new TQWidget( this ); setMainWidget(page); - // a layout with vertical boxes + // a tqlayout with vertical boxes TQHBoxLayout *topLayout = new TQHBoxLayout(page, 0, KDialog::spacingHint()); // the models list @@ -293,7 +293,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *de connect(m_modelSel, TQT_SIGNAL(selectionChanged(TQListViewItem *)), TQT_SLOT(slot_setModel(TQListViewItem *))); // make sure listview only as wide as it needs to be - m_modelSel->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, + m_modelSel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); TQVBoxLayout *rightLayout = new TQVBoxLayout(0L, 0, KDialog::spacingHint()); @@ -347,7 +347,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *de for (int i = 0; i < gphoto_ports; i++) { if (gp_port_info_list_get_info(list, i, &info) >= 0) { if (strncmp(info.path, "serial:", 7) == 0) - m_serialPortCombo->insertItem(TQString::fromLatin1(info.path).mid(7)); + m_serialPortCombo->insertItem(TQString::tqfromLatin1(info.path).mid(7)); } } gp_port_info_list_free(list); @@ -403,7 +403,7 @@ void KameraDeviceSelectDialog::save() void KameraDeviceSelectDialog::load() { TQString path = m_device->path(); - TQString port = path.left(path.find(":")).lower(); + TQString port = path.left(path.tqfind(":")).lower(); if (port == "serial") setPortType(INDEX_SERIAL); if (port == "usb") setPortType(INDEX_USB); @@ -432,7 +432,7 @@ void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item) int index = gp_abilities_list_lookup_model(m_device->m_abilitylist, model.local8Bit().data()); if(index < 0) { slot_error(i18n("Description of abilities for camera %1 is not available." - " Configuration options may be incorrect.").arg(model)); + " Configuration options may be incorrect.").tqarg(model)); } int result = gp_abilities_list_get_abilities(m_device->m_abilitylist, index, &abilities); if (result == GP_OK) { @@ -452,7 +452,7 @@ void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item) setPortType(INDEX_USB); } else { slot_error(i18n("Description of abilities for camera %1 is not available." - " Configuration options may be incorrect.").arg(model)); + " Configuration options may be incorrect.").tqarg(model)); } } diff --git a/kamera/kcontrol/kameradevice.h b/kamera/kcontrol/kameradevice.h index 34594f4e..4b8205b7 100644 --- a/kamera/kcontrol/kameradevice.h +++ b/kamera/kcontrol/kameradevice.h @@ -40,10 +40,11 @@ class TQRadioButton; class KCamera : public TQObject { friend class KameraDeviceSelectDialog; Q_OBJECT + TQ_OBJECT public: KCamera(const TQString &name, const TQString &path); ~KCamera(); - void invalidateCamera(); + void tqinvalidateCamera(); bool configure(); void load(KConfig *m_config); void save(KConfig *m_config); @@ -88,8 +89,9 @@ protected: class KameraDeviceSelectDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KameraDeviceSelectDialog(TQWidget *parent, KCamera *device); + KameraDeviceSelectDialog(TQWidget *tqparent, KCamera *device); void save(); void load(); protected slots: diff --git a/kamera/kioslave/kamera.cpp b/kamera/kioslave/kamera.cpp index 5aefd632..05917e3c 100644 --- a/kamera/kioslave/kamera.cpp +++ b/kamera/kioslave/kamera.cpp @@ -55,7 +55,7 @@ extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); - static void frontendCameraStatus(GPContext *context, const char *format, va_list args, void *data); + static void frontendCameratqStatus(GPContext *context, const char *format, va_list args, void *data); static unsigned int frontendProgressStart( GPContext *context, float totalsize, const char *format, va_list args, void *data @@ -242,7 +242,7 @@ void KameraProtocol::get(const KURL &url) #undef GPHOTO_TEXT_FILE // emit info message - infoMessage( i18n("Retrieving data from camera %1").arg(url.user()) ); + infoMessage( i18n("Retrieving data from camera %1").tqarg(url.user()) ); // Note: There's no need to re-read directory for each get() anymore gp_file_new(&m_file); @@ -574,7 +574,7 @@ void KameraProtocol::listDir(const KURL &url) gp_list_free (list); /* Avoid duplicated entry for usb: and usb:001,042 entries. */ - if (ports.contains("usb:") && names[ports["usb:"]]!="usb:") + if (ports.tqcontains("usb:") && names[ports["usb:"]]!="usb:") ports.remove("usb:"); for (it = groupList.begin(); it != groupList.end(); it++) { @@ -606,7 +606,7 @@ void KameraProtocol::listDir(const KURL &url) xurl.setProtocol("camera"); xurl.setUser(*it); /* Avoid setting usb:xxx,yyy. */ - if (m_cfgPath.contains("usb:")>0) { + if (m_cfgPath.tqcontains("usb:")>0) { names[*it] = "usb:"; xurl.setHost("usb:"); } else { @@ -795,7 +795,7 @@ void KameraProtocol::setHost(const TQString& host, int port, const TQString& use } // register gphoto2 callback functions - gp_context_set_status_func(m_context, frontendCameraStatus, this); + gp_context_set_status_func(m_context, frontendCameratqStatus, this); gp_context_set_progress_funcs(m_context, frontendProgressStart, frontendProgressUpdate, NULL, this); // gp_camera_set_message_func(m_camera, ..., this) @@ -881,7 +881,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo if (info.file.fields & GP_FILE_INFO_TYPE) { atom.m_uds = UDS_MIME_TYPE; - atom.m_str = TQString::fromLatin1(info.file.type); + atom.m_str = TQString::tqfromLatin1(info.file.type); udsEntry.append(atom); } @@ -890,7 +890,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo atom.m_long = 0; atom.m_long |= (info.file.permissions & GP_FILE_PERM_READ) ? (S_IRUSR | S_IRGRP | S_IROTH) : 0; // we cannot represent individual FP_FILE_PERM_DELETE permission in the Unix access scheme - // since the parent directory's write permission defines that + // since the tqparent directory's write permission defines that udsEntry.append(atom); } else { // basic permissions, in case the camera doesn't provide permissions info @@ -1028,7 +1028,7 @@ unsigned int frontendProgressStart( } // this callback function is activated on every status message from gphoto2 -static void frontendCameraStatus(GPContext * /*context*/, const char *format, va_list args, void *data) +static void frontendCameratqStatus(GPContext * /*context*/, const char *format, va_list args, void *data) { KameraProtocol *object = (KameraProtocol*)data; char *status; diff --git a/kcoloredit/colorselector.cpp b/kcoloredit/colorselector.cpp index 50288313..af209147 100644 --- a/kcoloredit/colorselector.cpp +++ b/kcoloredit/colorselector.cpp @@ -30,7 +30,7 @@ #include "texteditselection.h" #include "colorselector.h" -ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(parent, name) { +ColorSelector::ColorSelector(TQWidget *tqparent, const char *name ) : TQWidget(tqparent, name) { fComponentsMode = false; TQVBoxLayout* topLayout = new TQVBoxLayout(this, 4); /* @@ -53,7 +53,7 @@ ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(par topLayout->addWidget(gradientSelection, 10); KSeparator* hLine = new KSeparator(KSeparator::HLine, this); topLayout->addWidget(hLine); - TQHBoxLayout* layout = new TQHBoxLayout(); + TQHBoxLayout* tqlayout = new TQHBoxLayout(); TextEditSelection* textEditSelection = new TextEditSelection(this); connect(textEditSelection, TQT_SIGNAL( valueChanged(Color*) ), TQT_SLOT( slotSetColor(Color*) )); connect(this, TQT_SIGNAL( valueChanged(Color*) ), textEditSelection, TQT_SLOT( slotSetValue(Color*) )); @@ -73,7 +73,7 @@ ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(par TQVBoxLayout* colorChangeSliderLayout = new TQVBoxLayout(colorChangeSliderWidget, 1); colorChangeSliderLayout->setMargin(0); TQSlider* colorChangeSlider = new TQSlider(0, MAX_COLOR_CHANGE_VALUE, - MAX_COLOR_CHANGE_VALUE/4, colorChangeValue, TQSlider::Horizontal, colorChangeSliderWidget); + MAX_COLOR_CHANGE_VALUE/4, colorChangeValue, Qt::Horizontal, colorChangeSliderWidget); colorChangeSlider->setTickInterval(colorChangeSlider->pageStep()); colorChangeSlider->setTickmarks(TQSlider::Above); connect(colorChangeSlider, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotColorChangeValueChanged(int) )); @@ -88,17 +88,17 @@ ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(par colorChangeLayout->addStretch(10); colorChangeLayout->addWidget(colorChangeSliderWidget); colorChangeLayout->addStretch(10); - layout->addLayout(colorChangeLayout, 10); + tqlayout->addLayout(colorChangeLayout, 10); m_color.setComponents(RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE); slotColorReplace(); KSeparator* vLine = new KSeparator(KSeparator::VLine, this); - layout->addWidget(vLine); - layout->addWidget(textEditSelection, 1); + tqlayout->addWidget(vLine); + tqlayout->addWidget(textEditSelection, 1); colorPatch = new KColorPatch(this); connect(colorPatch, TQT_SIGNAL( colorChanged(const TQColor&) ), TQT_SLOT( slotSetColor(const TQColor&) )); colorPatch->setMinimumSize(80, 64); - layout->addWidget(colorPatch, 10); - topLayout->addLayout(layout); + tqlayout->addWidget(colorPatch, 10); + topLayout->addLayout(tqlayout); } ColorSelector::~ColorSelector() { } diff --git a/kcoloredit/colorselector.h b/kcoloredit/colorselector.h index 72d62ef6..5c3d9b62 100644 --- a/kcoloredit/colorselector.h +++ b/kcoloredit/colorselector.h @@ -31,10 +31,11 @@ */ class ColorSelector : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** constructs a color selector widget */ - ColorSelector(TQWidget *parent=0, const char *name=0); + ColorSelector(TQWidget *tqparent=0, const char *name=0); ~ColorSelector(); /** @return the selected color */ const Color& color(); diff --git a/kcoloredit/editablestreamhistory.h b/kcoloredit/editablestreamhistory.h index 9fe59d99..20233e33 100644 --- a/kcoloredit/editablestreamhistory.h +++ b/kcoloredit/editablestreamhistory.h @@ -37,7 +37,7 @@ public: /** Pastes a stream at index. Uses undo/redo history */ void paste(const int index, EDITABLE_STREAM& pasteStream); /** Replaces a stream at index. Uses undo/redo history */ - void replace(const int index, EDITABLE_STREAM& replaceStream); + void tqreplace(const int index, EDITABLE_STREAM& replaceStream); /** @return Whether undo possible */ bool undoPossible(); /** @return Whether redo possible */ @@ -76,7 +76,7 @@ template void } template void - EditableStreamHistory::replace(const int index, EDITABLE_STREAM& replaceStream) { + EditableStreamHistory::tqreplace(const int index, EDITABLE_STREAM& replaceStream) { m_editableStream->cut(index, replaceStream.length()); m_editableStream->paste(index, replaceStream); } diff --git a/kcoloredit/gradientselection.cpp b/kcoloredit/gradientselection.cpp index f75547c1..72dd02cd 100644 --- a/kcoloredit/gradientselection.cpp +++ b/kcoloredit/gradientselection.cpp @@ -24,15 +24,15 @@ #include "main.h" #include "gradientselection.h" -GradientSelection::GradientSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +GradientSelection::GradientSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { TQGridLayout* topLayout = new TQGridLayout(this, 2, 2, 0); - TQHBoxLayout* layout = new TQHBoxLayout(0); - layout->setMargin(3); + TQHBoxLayout* tqlayout = new TQHBoxLayout(0); + tqlayout->setMargin(3); xyColorSelector = new KXYColorSelector(this); connect(xyColorSelector, TQT_SIGNAL( valueChanged(int, int) ), TQT_SLOT( slotXyColorSelectorPosChanged(int, int) )); - layout->addWidget(xyColorSelector); - topLayout->addLayout(layout, 0, 0); + tqlayout->addWidget(xyColorSelector); + topLayout->addLayout(tqlayout, 0, 0); topLayout->setRowStretch(0, 10); topLayout->setRowStretch(1, 0); TQVBoxLayout* xyColorSelectorLayout = new TQVBoxLayout(); @@ -54,7 +54,7 @@ GradientSelection::GradientSelection(TQWidget *parent, const char *name ) : TQWi xyColorSelectorLayout->addLayout(buttonsLayout); xyColorSelectorLayout->addSpacing(2); topLayout->addLayout(xyColorSelectorLayout, 1, 0); - zColorSelector = new KZColorSelector(KZColorSelector::Vertical, this); + zColorSelector = new KZColorSelector(Qt::Vertical, this); connect(zColorSelector, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotZColorSelectorPosChanged(int) )); zColorSelector->setFixedWidth(36); @@ -218,7 +218,7 @@ void GradientSelection::slotXyColorSelectorPosChanged(int x, int y) { } void GradientSelection::slotZColorSelectorPosChanged(int y) { - bool repaintZColorSelector = false; + bool tqrepaintZColorSelector = false; switch(zColorSelectorComponentIndex) { case H_COMPONENT: hComponent = y; @@ -237,7 +237,7 @@ void GradientSelection::slotZColorSelectorPosChanged(int y) { rgbColor.setHsv(hComponent, sComponent, vComponent); color.setComponents(rgbColor.red(), rgbColor.green(), rgbColor.blue()); updateXyColorSelector(false); - if(repaintZColorSelector) + if(tqrepaintZColorSelector) updateZColorSelector(); emit valueChanged(&color); } diff --git a/kcoloredit/gradientselection.h b/kcoloredit/gradientselection.h index 0197f706..e3e58d1c 100644 --- a/kcoloredit/gradientselection.h +++ b/kcoloredit/gradientselection.h @@ -32,10 +32,11 @@ */ class GradientSelection : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ - GradientSelection(TQWidget *parent=0, const char *name=0); + GradientSelection(TQWidget *tqparent=0, const char *name=0); ~GradientSelection(); /** Enables or disables the color synchronize button */ void enableSynchronizeColorButton(bool enable); diff --git a/kcoloredit/imageselection.cpp b/kcoloredit/imageselection.cpp index b6d47c47..a82bdfdb 100644 --- a/kcoloredit/imageselection.cpp +++ b/kcoloredit/imageselection.cpp @@ -17,7 +17,7 @@ #include "imageselection.h" -ImageSelection::ImageSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +ImageSelection::ImageSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { } ImageSelection::~ImageSelection(){ } diff --git a/kcoloredit/imageselection.h b/kcoloredit/imageselection.h index dd6a9364..a773cdcc 100644 --- a/kcoloredit/imageselection.h +++ b/kcoloredit/imageselection.h @@ -27,10 +27,11 @@ */ class ImageSelection : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** constructs the widget */ - ImageSelection(TQWidget *parent=0, const char *name=0); + ImageSelection(TQWidget *tqparent=0, const char *name=0); ~ImageSelection(); signals: diff --git a/kcoloredit/kcolorchooser.cpp b/kcoloredit/kcolorchooser.cpp index cbd5292b..455e9e16 100644 --- a/kcoloredit/kcolorchooser.cpp +++ b/kcoloredit/kcolorchooser.cpp @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) KColorDialog dlg; - dlg.setColor(Qt::blue); // Just a color + dlg.setColor(TQt::blue); // Just a color app.connect(&dlg, TQT_SIGNAL(finished()), TQT_SLOT(quit())); @@ -65,6 +65,6 @@ int main(int argc, char *argv[]) KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); const TQColor c = dlg.color(); if ( args->isSet("print") && c.isValid() ) { - std::cout << c.name().utf8().data() << std::endl; + std::cout << TQString(c.name()).utf8().data() << std::endl; } } diff --git a/kcoloredit/kcoloredit.cpp b/kcoloredit/kcoloredit.cpp index 9b093722..5b0dffb9 100644 --- a/kcoloredit/kcoloredit.cpp +++ b/kcoloredit/kcoloredit.cpp @@ -64,39 +64,39 @@ KColorEditApp::~KColorEditApp() { void KColorEditApp::initActions() { // File actiojns - KStdAction::openNew( this, TQT_SLOT( slotFileNew() ), actionCollection() ); - KStdAction::open( this, TQT_SLOT( slotFileOpen() ), actionCollection() ); - KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs() ), actionCollection() ); - KStdAction::close( this, TQT_SLOT( slotClose() ), actionCollection() ); - KStdAction::quit( this, TQT_SLOT( slotQuit() ), actionCollection() ); - m_actSave = KStdAction::save( this, TQT_SLOT( slotFileSave() ), + KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ), actionCollection() ); + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection() ); + KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ), actionCollection() ); + KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotClose() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotQuit() ), actionCollection() ); + m_actSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ), actionCollection() ); - m_actRecent = KStdAction::openRecent( this, + m_actRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() ); ( void ) new KAction( i18n("New &Window"), kapp->miniIcon(), KShortcut(), - this, TQT_SLOT( slotFileNewWindow() ), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT( slotFileNewWindow() ), actionCollection(), "file_new_window" ); // Edit actions - m_actCut = KStdAction::cut( this, TQT_SLOT( slotEditCut() ), + m_actCut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( slotEditCut() ), actionCollection() ); - m_actCopy = KStdAction::copy( this, TQT_SLOT( slotEditCopy() ), + m_actCopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( slotEditCopy() ), actionCollection() ); - m_actPaste = KStdAction::paste( this, TQT_SLOT( slotEditPaste() ), + m_actPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( slotEditPaste() ), actionCollection() ); m_actPaste->setEnabled( false ); // Color Menu - m_actNames = new KToggleAction( i18n("Show &Color Names"), KShortcut(), this, + m_actNames = new KToggleAction( i18n("Show &Color Names"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotViewColorNames() ), actionCollection(), "color_view_names" ); m_actNames->setCheckedState(i18n("Hide &Color Names")); - m_actPalette = new KAction( i18n("From &Palette"), KShortcut(), this, + m_actPalette = new KAction( i18n("From &Palette"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotColorFromPalette() ), actionCollection(), "color_from_palette" ); - ( void ) new KAction( i18n("From &Screen"), KShortcut(), this, + ( void ) new KAction( i18n("From &Screen"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotColorFromScreen() ), actionCollection(), "color_from_screen" ); } @@ -104,7 +104,7 @@ void KColorEditApp::initActions() void KColorEditApp::initStatusBar() { statusBar()->insertItem(i18n("Ready."), ID_STATUS_MSG, 1); - statusBar()->setItemAlignment( ID_STATUS_MSG, Qt::AlignLeft ); + statusBar()->setItemAlignment( ID_STATUS_MSG, TQt::AlignLeft ); } void KColorEditApp::initDocument() diff --git a/kcoloredit/kcoloredit.h b/kcoloredit/kcoloredit.h index e30fff18..e09fd415 100644 --- a/kcoloredit/kcoloredit.h +++ b/kcoloredit/kcoloredit.h @@ -21,7 +21,7 @@ #include -// include files for Qt +// include files for TQt #include #include @@ -54,6 +54,7 @@ class KColorEditView; class KColorEditApp : public KMainWindow { Q_OBJECT + TQ_OBJECT friend class KColorEditView; @@ -73,7 +74,7 @@ class KColorEditApp : public KMainWindow KColorEditDoc *document() const; protected: - /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration + /** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration * file */ void saveOptions(); diff --git a/kcoloredit/kcoloreditdoc.cpp b/kcoloredit/kcoloreditdoc.cpp index ea9a0433..ed9094e5 100644 --- a/kcoloredit/kcoloreditdoc.cpp +++ b/kcoloredit/kcoloreditdoc.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include #include #include @@ -31,7 +31,7 @@ #include "kcoloreditview.h" #include "resource.h" -KColorEditDoc::KColorEditDoc(TQWidget *parent, const char *name) : TQObject(parent, name), +KColorEditDoc::KColorEditDoc(TQWidget *tqparent, const char *name) : TQObject(tqparent, name), m_palette(), m_paletteHistory(&m_palette, 0) { m_pViewList = new TQPtrList(); m_pViewList->setAutoDelete(true); @@ -106,10 +106,10 @@ bool KColorEditDoc::saveModified() if(m_modified) { - KColorEditApp *window=(KColorEditApp *) parent(); + KColorEditApp *window=(KColorEditApp *) tqparent(); int want_save = KMessageBox::warningYesNoCancel(window, i18n("The current file has been modified.\n" - "Do you want to save it?"), TQString::null, KStdGuiItem::save(), i18n("Do Not Save")); + "Do you want to save it?"), TQString(), KStdGuiItem::save(), i18n("Do Not Save")); switch(want_save) { case KMessageBox::Yes: @@ -175,7 +175,7 @@ bool KColorEditDoc::openDocument(const TQString& filename) { setPaletteCursorPos(m_palette.length()); setPaletteSelection(0, 0); slotRedrawAllViews(0, true); - KColorEditApp *window=(KColorEditApp*)parent(); + KColorEditApp *window=(KColorEditApp*)tqparent(); window->setCaption(m_title); } return true; @@ -235,7 +235,7 @@ void KColorEditDoc::copyToClipboard(Palette& palette) { TQString text; TQTextOStream stream(&text); palette.save(stream, 0, false); - KApplication::clipboard()->setText(text); + KApplication::tqclipboard()->setText(text); emit clipboardChanged(); } @@ -260,7 +260,7 @@ void KColorEditDoc::paste() { Palette palettePaste; TQString text; TQTextIStream stream(&text); - text = KApplication::clipboard()->text(); + text = KApplication::tqclipboard()->text(); if(palettePaste.load( stream, false )) { m_paletteHistory.paste(paletteCursorPos(), palettePaste); setPaletteSelection(paletteCursorPos(), paletteCursorPos() + @@ -281,11 +281,11 @@ void KColorEditDoc::insert(int index, const Color& color) { slotRedrawAllViews(0); } -void KColorEditDoc::replace(int index, const Color& color) { +void KColorEditDoc::tqreplace(int index, const Color& color) { Palette paletteReplace; Color* replaceColor = new Color(color); paletteReplace.append(replaceColor); - m_paletteHistory.replace(index, paletteReplace); + m_paletteHistory.tqreplace(index, paletteReplace); setPaletteSelection(0, 0); setModified(true); slotRedrawAllViews(0); diff --git a/kcoloredit/kcoloreditdoc.h b/kcoloredit/kcoloreditdoc.h index 03d5ce70..108e05fe 100644 --- a/kcoloredit/kcoloreditdoc.h +++ b/kcoloredit/kcoloreditdoc.h @@ -44,13 +44,14 @@ class KColorEditView; * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @version KDevelop version 0.4 code generation */ -class KColorEditDoc : public QObject +class KColorEditDoc : public TQObject { Q_OBJECT + TQ_OBJECT public: /** Constructor for the fileclass of the application */ - KColorEditDoc(TQWidget *parent, const char *name=0); + KColorEditDoc(TQWidget *tqparent, const char *name=0); /** Destructor for the fileclass of the application */ ~KColorEditDoc(); @@ -111,7 +112,7 @@ class KColorEditDoc : public QObject /** Inserts a color at index */ void insert(int index, const Color& color); /** Replaces a color at index */ - void replace(int index, const Color& color); + void tqreplace(int index, const Color& color); protected: /** Sets an error string if an IO operation was unsuccesfull */ diff --git a/kcoloredit/kcoloreditview.cpp b/kcoloredit/kcoloreditview.cpp index 10484fe8..1abfd861 100644 --- a/kcoloredit/kcoloreditview.cpp +++ b/kcoloredit/kcoloreditview.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include #include #include @@ -35,7 +35,7 @@ #include "kcoloredit.h" #include "palette.h" -KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter(parent, name) { +KColorEditView::KColorEditView(TQWidget *tqparent, const char *name) : TQSplitter(tqparent, name) { colorSelector = new ColorSelector(this); colorSelector->slotSetColor( Color( RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, "" )); @@ -43,7 +43,7 @@ KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter( TQVBoxLayout* paletteLayout = new TQVBoxLayout(paletteViewArea); paletteView = new PaletteView(16, 16, 2, this, paletteViewArea); paletteLayout->addWidget(paletteView, 10); - TQHBoxLayout* layout = new TQHBoxLayout(); + TQHBoxLayout* tqlayout = new TQHBoxLayout(); TQVBoxLayout* addColorLayout = new TQVBoxLayout(4); addColorLayout->setMargin(8); TQHBoxLayout* buttonsLayout = new TQHBoxLayout(4); @@ -70,7 +70,7 @@ KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter( // paletteView, TQT_SLOT( slotCursorFollowsChosenColor(bool) )); //cursorFollowsChosenColor->toggle(); paletteView->slotCursorFollowsChosenColor(true); - layout->addLayout(addColorLayout, 0); + tqlayout->addLayout(addColorLayout, 0); TQVGroupBox* colorAtCursorFrame = new TQVGroupBox(i18n("Color at Cursor"), paletteViewArea); TQWidget* colorAtCursorFrameArea = new TQWidget(colorAtCursorFrame); TQVBoxLayout* colorAtCursorLayout = new TQVBoxLayout(colorAtCursorFrameArea, 4); @@ -127,10 +127,10 @@ KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter( colorAtCursorRgbStringLayout->addWidget(colorAtCursorRgbStringValueLabel); colorAtCursorRgbStringLayout->addStretch(); colorAtCursorLayout->addLayout(colorAtCursorRgbStringLayout); - layout->addWidget(colorAtCursorFrame, 10); - layout->addSpacing(8); + tqlayout->addWidget(colorAtCursorFrame, 10); + tqlayout->addSpacing(8); paletteLayout->addSpacing(4); - paletteLayout->addLayout(layout); + paletteLayout->addLayout(tqlayout); paletteLayout->addSpacing(4); inColorNameChanging = false; doNotUpdateColorLabels = false; @@ -145,7 +145,7 @@ void KColorEditView::setColorAtCursorComponentValueLabelSizes(TQLabel* const lab } KColorEditDoc *KColorEditView::document() const { - KColorEditApp *theApp=(KColorEditApp *) parentWidget(); + KColorEditApp *theApp=(KColorEditApp *) tqparentWidget(); return theApp->document(); } @@ -234,7 +234,7 @@ void KColorEditView::slotAddColor() { case REPLACE_COLOR: if(index < palette->length()) - document()->replace(index, color); + document()->tqreplace(index, color); else document()->insert(index, color); break; @@ -274,7 +274,7 @@ void KColorEditView::slotSetColorName(const TQString& name) { palette->color(cursorPos)->component(Color::BLUE_INDEX), name); doNotUpdateColorLabels = true; - document()->replace(cursorPos, newColor); + document()->tqreplace(cursorPos, newColor); doNotUpdateColorLabels = false; } } diff --git a/kcoloredit/kcoloreditview.h b/kcoloredit/kcoloreditview.h index 0bc2a569..1ede4427 100644 --- a/kcoloredit/kcoloreditview.h +++ b/kcoloredit/kcoloreditview.h @@ -22,7 +22,7 @@ #include #endif -// include files for Qt +// include files for TQt #include #include #include @@ -43,14 +43,15 @@ class KColorEditDoc; */ class KColorEditView : public TQSplitter { Q_OBJECT + TQ_OBJECT public: /** Constructor for the main view */ - KColorEditView(TQWidget *parent = 0, const char *name = 0); + KColorEditView(TQWidget *tqparent = 0, const char *name = 0); /** Destructor for the main view */ ~KColorEditView(); - /** returns a pointer to the document connected to the view instance. Mind that this method requires a KColorEditApp instance as a parent + /** returns a pointer to the document connected to the view instance. Mind that this method requires a KColorEditApp instance as a tqparent * widget to get to the window document pointer by calling the KColorEditApp::getDocument() method. * * @see KColorEditApp#getDocument diff --git a/kcoloredit/kxycolorselector.cpp b/kcoloredit/kxycolorselector.cpp index 4a717c5e..bcd58f00 100644 --- a/kcoloredit/kxycolorselector.cpp +++ b/kcoloredit/kxycolorselector.cpp @@ -23,7 +23,7 @@ #include "kxycolorselector.h" -KXYColorSelector::KXYColorSelector(TQWidget *parent, const char *name) : KXYSelector(parent,name) { +KXYColorSelector::KXYColorSelector(TQWidget *tqparent, const char *name) : KXYSelector(tqparent,name) { setBackgroundMode(NoBackground); setRange(0, 0, COMPONENT_SELECTION_RESOLUTION - 1, COMPONENT_SELECTION_RESOLUTION - 1); setType(TYPE_NONE); @@ -42,7 +42,7 @@ void KXYColorSelector::setType(const int type) { void KXYColorSelector::updateContents() { drawPalette(&pixmap); - repaint(); + tqrepaint(); } void KXYColorSelector::resizeEvent(TQResizeEvent*) { @@ -70,9 +70,9 @@ void KXYColorSelector::drawCursor(TQPainter* painter, int x, int y) { TQColor cursorColor; if(( 2*color.red() + 4*color.green() + 1*color.blue() )*1.0/ ( 2*255 + 4*255 + 1*255 ) > 0.65) - cursorColor = Qt::black; + cursorColor = TQt::black; else - cursorColor = Qt::white; + cursorColor = TQt::white; painter->setPen(TQPen( cursorColor )); const int lineBegin = 2; const int lineEnd = 6; @@ -132,25 +132,25 @@ void KXYColorSelector::setColor(TQColor* const color, const int x, const int y) } TQColor* KXYColorSelector::standardColorsPalette() { - TQColor* palette = new QColor[STANDARD_PALETTE_SIZE]; + TQColor* palette = new TQColor[STANDARD_PALETTE_SIZE]; int i = 0; - palette[i++] = Qt::red; - palette[i++] = Qt::green; - palette[i++] = Qt::blue; - palette[i++] = Qt::cyan; - palette[i++] = Qt::magenta; - palette[i++] = Qt::yellow; - palette[i++] = Qt::darkRed; - palette[i++] = Qt::darkGreen; - palette[i++] = Qt::darkBlue; - palette[i++] = Qt::darkCyan; - palette[i++] = Qt::darkMagenta; - palette[i++] = Qt::darkYellow; - palette[i++] = Qt::white; - palette[i++] = Qt::lightGray; - palette[i++] = Qt::gray; - palette[i++] = Qt::darkGray; - palette[i++] = Qt::black; + palette[i++] = TQt::red; + palette[i++] = TQt::green; + palette[i++] = TQt::blue; + palette[i++] = TQt::cyan; + palette[i++] = TQt::magenta; + palette[i++] = TQt::yellow; + palette[i++] = TQt::darkRed; + palette[i++] = TQt::darkGreen; + palette[i++] = TQt::darkBlue; + palette[i++] = TQt::darkCyan; + palette[i++] = TQt::darkMagenta; + palette[i++] = TQt::darkYellow; + palette[i++] = TQt::white; + palette[i++] = TQt::lightGray; + palette[i++] = TQt::gray; + palette[i++] = TQt::darkGray; + palette[i++] = TQt::black; return palette; } diff --git a/kcoloredit/kxycolorselector.h b/kcoloredit/kxycolorselector.h index 6225d74f..263a39f3 100644 --- a/kcoloredit/kxycolorselector.h +++ b/kcoloredit/kxycolorselector.h @@ -28,6 +28,7 @@ */ class KXYColorSelector : public KXYSelector { Q_OBJECT + TQ_OBJECT public: /** The types of the selector. They specify a color component subset */ @@ -46,7 +47,7 @@ public: /** Constructs a two-dimensional color component selector widget, * with a type TYPE_NONE and ranges 0 .. MAX_COLOR_COMPONENT_VALUE */ - KXYColorSelector(TQWidget *parent=0, const char *name=0); + KXYColorSelector(TQWidget *tqparent=0, const char *name=0); ~KXYColorSelector(); /** Set the type of the selector */ void setType(const int type); diff --git a/kcoloredit/kzcolorselector.cpp b/kcoloredit/kzcolorselector.cpp index b00991a2..b0f7914a 100644 --- a/kcoloredit/kzcolorselector.cpp +++ b/kcoloredit/kzcolorselector.cpp @@ -23,8 +23,8 @@ #include "main.h" #include "kzcolorselector.h" -KZColorSelector::KZColorSelector(Orientation o, TQWidget *parent, const char *name) : - KSelector(o, parent, name) { +KZColorSelector::KZColorSelector(Qt::Orientation o, TQWidget *tqparent, const char *name) : + KSelector(o, tqparent, name) { baseColorH = -1; baseColorS = 0; baseColorV = 0; @@ -53,7 +53,7 @@ void KZColorSelector::setType(const int type) { void KZColorSelector::updateContents() { drawPalette(&pixmap); - repaint(false); + tqrepaint(false); } void KZColorSelector::resizeEvent(TQResizeEvent*) { @@ -119,25 +119,25 @@ void KZColorSelector::setColor(TQColor* const color, const int y) { } TQColor* KZColorSelector::getStandardColorsPalette() { - TQColor* palette = new QColor[( int )STANDARD_PALETTE_SIZE]; + TQColor* palette = new TQColor[( int )STANDARD_PALETTE_SIZE]; int i = 0; - palette[i++] = Qt::red; - palette[i++] = Qt::green; - palette[i++] = Qt::blue; - palette[i++] = Qt::cyan; - palette[i++] = Qt::magenta; - palette[i++] = Qt::yellow; - palette[i++] = Qt::darkRed; - palette[i++] = Qt::darkGreen; - palette[i++] = Qt::darkBlue; - palette[i++] = Qt::darkCyan; - palette[i++] = Qt::darkMagenta; - palette[i++] = Qt::darkYellow; - palette[i++] = Qt::white; - palette[i++] = Qt::lightGray; - palette[i++] = Qt::gray; - palette[i++] = Qt::darkGray; - palette[i++] = Qt::black; + palette[i++] = TQt::red; + palette[i++] = TQt::green; + palette[i++] = TQt::blue; + palette[i++] = TQt::cyan; + palette[i++] = TQt::magenta; + palette[i++] = TQt::yellow; + palette[i++] = TQt::darkRed; + palette[i++] = TQt::darkGreen; + palette[i++] = TQt::darkBlue; + palette[i++] = TQt::darkCyan; + palette[i++] = TQt::darkMagenta; + palette[i++] = TQt::darkYellow; + palette[i++] = TQt::white; + palette[i++] = TQt::lightGray; + palette[i++] = TQt::gray; + palette[i++] = TQt::darkGray; + palette[i++] = TQt::black; return palette; } diff --git a/kcoloredit/kzcolorselector.h b/kcoloredit/kzcolorselector.h index 60e32f0a..f226d744 100644 --- a/kcoloredit/kzcolorselector.h +++ b/kcoloredit/kzcolorselector.h @@ -29,6 +29,7 @@ */ class KZColorSelector : public KSelector { Q_OBJECT + TQ_OBJECT public: /** Selector type constants */ @@ -37,7 +38,7 @@ public: TYPE_V = 2 }; /** Constructs the widget */ - KZColorSelector(Orientation o, TQWidget *parent=0, const char *name=0); + KZColorSelector(Qt::Orientation o, TQWidget *tqparent=0, const char *name=0); ~KZColorSelector(); /** Sets the selector type */ void setType(const int type); diff --git a/kcoloredit/loadpalettedlg.cpp b/kcoloredit/loadpalettedlg.cpp index 23def4d5..a5e298ce 100644 --- a/kcoloredit/loadpalettedlg.cpp +++ b/kcoloredit/loadpalettedlg.cpp @@ -31,8 +31,8 @@ #include "palette.h" #include "loadpalettedlg.h" -LoadPaletteDlg::LoadPaletteDlg(TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n( "Load Palette" ), +LoadPaletteDlg::LoadPaletteDlg(TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, i18n( "Load Palette" ), Ok|Cancel, Ok, true) { fileName = ""; TQWidget *mainWidget = new TQWidget( this ); @@ -45,7 +45,7 @@ LoadPaletteDlg::LoadPaletteDlg(TQWidget *parent, const char *name) TQStringList palettesList = Palette::kdePalettes(); for(TQStringList::Iterator palette = palettesList.begin(); palette != palettesList.end(); ++palette) { - bool prepend = (*palette).contains( "colors/Custom_Colors" ); + bool prepend = (*palette).tqcontains( "colors/Custom_Colors" ); TQString fileName = locate("config", (*palette)); if(prepend) { palettesFileNames.prepend(fileName); diff --git a/kcoloredit/loadpalettedlg.h b/kcoloredit/loadpalettedlg.h index f7dd50cb..7e71e2f5 100644 --- a/kcoloredit/loadpalettedlg.h +++ b/kcoloredit/loadpalettedlg.h @@ -27,11 +27,12 @@ */ class LoadPaletteDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** constructs the dialog */ - LoadPaletteDlg(TQWidget *parent = 0, const char *name = 0); + LoadPaletteDlg(TQWidget *tqparent = 0, const char *name = 0); ~LoadPaletteDlg(); /** @return the fetched file name */ diff --git a/kcoloredit/palette.cpp b/kcoloredit/palette.cpp index 42758b41..6f830278 100644 --- a/kcoloredit/palette.cpp +++ b/kcoloredit/palette.cpp @@ -108,14 +108,14 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { int lineNum = 0; while (!stream.atEnd()) { TQString string = stream.readLine().append(' '); - if(string.find( TQRegExp("[^\\s]") ) == -1 || + if(string.tqfind( TQRegExp("[^\\s]") ) == -1 || string.stripWhiteSpace().at( 0 ) == '#' || ( loadName && lineNum == 0 )) { if(loadName && lineNum == 0) setName(string.stripWhiteSpace()); } else { Color* newColor = new Color(); - int position = string.find(TQRegExp( "[^\\s]" )); + int position = string.tqfind(TQRegExp( "[^\\s]" )); for(int componentIndex = 0; componentIndex < Color::COMPONENTS_NUM; ++componentIndex) { if(position == -1) { @@ -123,7 +123,7 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { result = false; break; } - int endPosition = string.find(TQRegExp( "\\s" ), position); + int endPosition = string.tqfind(TQRegExp( "\\s" ), position); if(endPosition == -1) { m_errorString = i18n("Invalid format"); result = false; @@ -139,7 +139,7 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { break; } newColor->setComponent(componentIndex, componentValue); - position = string.find(TQRegExp( "[^\\s]" ), endPosition); + position = string.tqfind(TQRegExp( "[^\\s]" ), endPosition); } if(!result) { delete newColor; diff --git a/kcoloredit/paletteview.cpp b/kcoloredit/paletteview.cpp index 6648d88b..d62ec43f 100644 --- a/kcoloredit/paletteview.cpp +++ b/kcoloredit/paletteview.cpp @@ -21,8 +21,8 @@ #include "paletteview.h" PaletteView::PaletteView(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, - KColorEditView* view, TQWidget *parent, const char *name) : - TQFrame(parent, name, TQWidget::WResizeNoErase*0) { + KColorEditView* view, TQWidget *tqparent, const char *name) : + TQFrame(tqparent, name, TQWidget::WResizeNoErase*0) { setFrameStyle(StyledPanel|Sunken); setLineWidth(2); TQGridLayout* topLayout = new TQGridLayout(this, 2, 2); @@ -32,7 +32,7 @@ PaletteView::PaletteView(const int defaultCellWidth, const int defaultCellHeight topLayout->setColStretch(0, 10); topLayout->setColStretch(1, 0); scrollBar = new TQScrollBar(this); - hScrollBar = new TQScrollBar(0, 1, 1, 1, 0, TQScrollBar::Horizontal, this); + hScrollBar = new TQScrollBar(0, 1, 1, 1, 0, Qt::Horizontal, this); scrolledArea = new PaletteViewScrolledArea(defaultCellWidth, defaultCellHeight, cellSpacing, scrollBar, hScrollBar, view, this); connect(scrollBar, TQT_SIGNAL( valueChanged(int) ), diff --git a/kcoloredit/paletteview.h b/kcoloredit/paletteview.h index 9501de40..cc1e56b8 100644 --- a/kcoloredit/paletteview.h +++ b/kcoloredit/paletteview.h @@ -26,18 +26,19 @@ class KColorEditView; /** This is a Palette class view widget. - * Its parent is KColorEditView + * Its tqparent is KColorEditView * @author Artur Rataj */ class PaletteView : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** Constructs a palette view widget, with a default cells sizes and spacing. * The effective cell sizes may be adjusted to fit the widget sizes. */ PaletteView(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, - KColorEditView* view, TQWidget *parent = 0, const char *name=0); + KColorEditView* view, TQWidget *tqparent = 0, const char *name=0); ~PaletteView(); /** Calls redraw() in scrolledArea */ void redraw(); diff --git a/kcoloredit/paletteviewscrolledarea.cpp b/kcoloredit/paletteviewscrolledarea.cpp index 0b4f0ec4..e6d26a20 100644 --- a/kcoloredit/paletteviewscrolledarea.cpp +++ b/kcoloredit/paletteviewscrolledarea.cpp @@ -38,8 +38,8 @@ PaletteViewScrolledArea::PaletteViewScrolledArea(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, TQScrollBar* scrollBar, - TQScrollBar* hScrollBar, KColorEditView* view, TQWidget* parent, const char* name) - : TQFrame(parent, name) { + TQScrollBar* hScrollBar, KColorEditView* view, TQWidget* tqparent, const char* name) + : TQFrame(tqparent, name) { this->defaultCellWidth = defaultCellWidth; this->defaultCellHeight = defaultCellHeight; this->cellSpacing = cellSpacing; @@ -73,11 +73,11 @@ void PaletteViewScrolledArea::slotViewColorNames(bool viewColorNames) { void PaletteViewScrolledArea::redraw() { //setCellsSizes(); - repaintPalette(); + tqrepaintPalette(); } -void PaletteViewScrolledArea::repaintPalette() { - repaint(false); +void PaletteViewScrolledArea::tqrepaintPalette() { + tqrepaint(false); } void PaletteViewScrolledArea::checkSelectionAutoScroll(const int mousePosY) { @@ -106,7 +106,7 @@ void PaletteViewScrolledArea::slotScrollTimeout() { else setSelection(selectionEnd, selectionBegin); checkSelectionAutoScroll(cursorPoint.y()); - repaintPalette(); + tqrepaintPalette(); } } @@ -220,7 +220,7 @@ void PaletteViewScrolledArea::paintEvent(TQPaintEvent* /*event*/) { setCellsSizes(); TQPixmap pixmap(size()); TQPainter painter; - painter.begin(&pixmap, this); + painter.tqbegin(TQT_TQPAINTDEVICE(&pixmap), this); TQFontMetrics fontMetrics = painter.fontMetrics(); int maxLineWidth; if(viewColorNames) { @@ -249,12 +249,12 @@ void PaletteViewScrolledArea::paintEvent(TQPaintEvent* /*event*/) { int lastRow = (posY + height() - 1 + rowHeight - 1)/rowHeight; if(viewColorNames) painter.fillRect(0, 0, rowWidth, height(), - TQBrush( TQFrame::palette().active().base() )); - TQBrush normalBackgroundBrush(TQFrame::palette().active().background()); - TQBrush selectedBackgroundBrush(TQFrame::palette().active().highlight()); + TQBrush( TQFrame::tqpalette().active().base() )); + TQBrush normalBackgroundBrush(TQFrame::tqpalette().active().background()); + TQBrush selectedBackgroundBrush(TQFrame::tqpalette().active().highlight()); TQBrush foregroundBrush; - TQBrush cursorBrush(TQFrame::palette().active().foreground()); - TQPen backgroundPen(TQFrame::palette().active().foreground()); + TQBrush cursorBrush(TQFrame::tqpalette().active().foreground()); + TQPen backgroundPen(TQFrame::tqpalette().active().foreground()); int min = selectionMin(); int max = selectionMax(); int fontAscent = fontMetrics.ascent(); diff --git a/kcoloredit/paletteviewscrolledarea.h b/kcoloredit/paletteviewscrolledarea.h index db39e454..8e69a354 100644 --- a/kcoloredit/paletteviewscrolledarea.h +++ b/kcoloredit/paletteviewscrolledarea.h @@ -33,15 +33,16 @@ class TQScrollBar; */ class PaletteViewScrolledArea : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ PaletteViewScrolledArea(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, TQScrollBar* scrollBar, TQScrollBar* hScrollBar, KColorEditView* view, - TQWidget* parent = 0, const char* name = 0); + TQWidget* tqparent = 0, const char* name = 0); ~PaletteViewScrolledArea(); - /** Sets cells sizes and then calls repaintPalette() */ + /** Sets cells sizes and then calls tqrepaintPalette() */ void redraw(); public slots: @@ -105,8 +106,8 @@ protected: * visible area width */ void setCellsSizes(); - /** repaints the palette */ - void repaintPalette(); + /** tqrepaints the palette */ + void tqrepaintPalette(); /** @return A color index at a given position, -1 if none */ int colorIndex(const TQPoint& point) const; /** @return A color at a given position */ diff --git a/kcoloredit/texteditselection.cpp b/kcoloredit/texteditselection.cpp index 4b1d6a56..bf00ab3d 100644 --- a/kcoloredit/texteditselection.cpp +++ b/kcoloredit/texteditselection.cpp @@ -24,7 +24,7 @@ #include "main.h" #include "texteditselection.h" -TextEditSelection::TextEditSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +TextEditSelection::TextEditSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { inChangingComponents = false; TQVBoxLayout* topLayout = new TQVBoxLayout(this, 4); TQGridLayout* componentsLayout = new TQGridLayout(3, 5, 2); @@ -59,14 +59,14 @@ TextEditSelection::~TextEditSelection(){ } void TextEditSelection::addComponent(const int index, TQLineEdit* lineEdit, const int maxValue, - const TQString& labelString, const int row, const int column, TQGridLayout* layout) { + const TQString& labelString, const int row, const int column, TQGridLayout* tqlayout) { TQLabel* label = new TQLabel(labelString, this); - lineEdit->setValidator(new TQIntValidator( 0, maxValue, lineEdit )); + lineEdit->setValidator(new TQIntValidator( 0, maxValue, TQT_TQOBJECT(lineEdit) )); lineEditTable[index] = lineEdit; lineEdit->setMinimumWidth(lineEdit->fontMetrics().width( TQString("8888") )); lineEdit->setMaximumWidth(lineEdit->fontMetrics().width( TQString("8888888") )); - layout->addWidget(label, row, column*3); - layout->addWidget(lineEdit, row, column*3 + 1); + tqlayout->addWidget(label, row, column*3); + tqlayout->addWidget(lineEdit, row, column*3 + 1); } void TextEditSelection::setRgbString(const int red, const int green, const int blue) { diff --git a/kcoloredit/texteditselection.h b/kcoloredit/texteditselection.h index e140a5dc..67a299a1 100644 --- a/kcoloredit/texteditselection.h +++ b/kcoloredit/texteditselection.h @@ -30,10 +30,11 @@ */ class TextEditSelection : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ - TextEditSelection(TQWidget *parent=0, const char *name=0); + TextEditSelection(TQWidget *tqparent=0, const char *name=0); ~TextEditSelection(); signals: @@ -47,7 +48,7 @@ public slots: protected: /** Adds a component line edit */ void addComponent(const int index, TQLineEdit* lineEdit, const int maxValue, const TQString& labelString, - const int row, const int column, TQGridLayout* layout); + const int row, const int column, TQGridLayout* tqlayout); /** sets RGB string in rgbStringLineEdit */ void setRgbString(const int red, const int green, const int blue); diff --git a/kcoloredit/textselection.cpp b/kcoloredit/textselection.cpp index f916d48f..ae15650d 100644 --- a/kcoloredit/textselection.cpp +++ b/kcoloredit/textselection.cpp @@ -17,7 +17,7 @@ #include "textselection.h" -TextSelection::TextSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +TextSelection::TextSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { } TextSelection::~TextSelection(){ diff --git a/kdvi/TeXFont.h b/kdvi/TeXFont.h index d3ee51af..518c0d0f 100644 --- a/kdvi/TeXFont.h +++ b/kdvi/TeXFont.h @@ -17,8 +17,8 @@ class TeXFont { public: TeXFont(TeXFontDefinition *_parent) { - parent = _parent; - errorMessage = TQString::null; + tqparent = _parent; + errorMessage = TQString(); }; virtual ~TeXFont(); @@ -29,12 +29,12 @@ class TeXFont { glyphtable[i].shrunkenCharacter.resize(0, 0); }; - virtual glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black) = 0; + virtual glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black) = 0; // Checksum of the font. Used e.g. by PK fonts. This field is filled // in by the constructor, or set to 0.0, if the font format does not // contain checksums. - Q_UINT32 checksum; + TQ_UINT32 checksum; // If the font or if some glyphs could not be loaded, error messages // will be put here. @@ -42,7 +42,7 @@ class TeXFont { protected: glyph glyphtable[TeXFontDefinition::max_num_of_chars_in_font]; - TeXFontDefinition *parent; + TeXFontDefinition *tqparent; }; #endif diff --git a/kdvi/TeXFontDefinition.cpp b/kdvi/TeXFontDefinition.cpp index 03dd1b72..c89aa59d 100644 --- a/kdvi/TeXFontDefinition.cpp +++ b/kdvi/TeXFontDefinition.cpp @@ -31,7 +31,7 @@ extern const int MFResolutions[]; // #define DEBUG_FONT -TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units, +TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, TQ_UINT32 chk, TQ_INT32 _scaled_size_in_DVI_units, class fontPool *pool, double _enlargement) { #ifdef DEBUG_FONT @@ -46,7 +46,7 @@ TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResoluti checksum = chk; flags = TeXFontDefinition::FONT_IN_USE; file = 0; - filename = TQString::null; + filename = TQString(); scaled_size_in_DVI_units = _scaled_size_in_DVI_units; macrotable = 0; @@ -93,8 +93,8 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) flags |= TeXFontDefinition::FONT_LOADED; filename = fname; #ifdef HAVE_FREETYPE - fullFontName = TQString::null; - fullEncodingName = TQString::null; + fullFontName = TQString(); + fullEncodingName = TQString(); #endif file = fopen(TQFile::encodeName(filename), "r"); @@ -105,7 +105,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) TQString filename_test(font_pool->getExtraSearchPath() + "/" + filename); file = fopen( TQFile::encodeName(filename_test), "r"); if (file == 0) { - kdError(4300) << i18n("Cannot find font %1, file %2.").arg(fontname).arg(filename) << endl; + kdError(4300) << i18n("Cannot find font %1, file %2.").tqarg(fontname).tqarg(filename) << endl; return; } else filename = filename_test; @@ -121,7 +121,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) font = new TeXFont_PK(this); set_char_p = &dviRenderer::set_char; if ((checksum != 0) && (checksum != font->checksum)) - kdWarning(4300) << i18n("Checksum mismatch for font file %1").arg(filename) << endl; + kdWarning(4300) << i18n("Checksum mismatch for font file %1").tqarg(filename) << endl; fontTypeName = "TeX PK"; return; } @@ -169,7 +169,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) #else // If we don't have the FreeType library, we should never have // reached this point. Complain, and leave this font blank - kdError(4300) << i18n("Cannot recognize format for font file %1").arg(filename) << endl; + kdError(4300) << i18n("Cannot recognize format for font file %1").tqarg(filename) << endl; #endif } @@ -195,7 +195,7 @@ void TeXFontDefinition::reset() vf_table.clear(); } - filename = TQString::null; + filename = TQString(); flags = TeXFontDefinition::FONT_IN_USE; set_char_p = &dviRenderer::set_empty_char; } diff --git a/kdvi/TeXFontDefinition.h b/kdvi/TeXFontDefinition.h index d64e6d59..9097b2cb 100644 --- a/kdvi/TeXFontDefinition.h +++ b/kdvi/TeXFontDefinition.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* - * The layout of a font information block. + * The tqlayout of a font information block. * There is one of these for every loaded font or magnification thereof. * Duplicates are eliminated: this is necessary because of possible recursion * in virtual fonts. @@ -35,7 +35,7 @@ class macro { unsigned char *pos; /* address of first byte of macro */ unsigned char *end; /* address of last+1 byte */ - Q_INT32 dvi_advance_in_units_of_design_size_by_2e20; /* DVI units to move reference point */ + TQ_INT32 dvi_advance_in_units_of_design_size_by_2e20; /* DVI units to move reference point */ bool free_me; // if memory at pos should be returned on destruction }; @@ -56,7 +56,7 @@ class TeXFontDefinition { }; - TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units, + TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, TQ_UINT32 chk, TQ_INT32 _scaled_size_in_DVI_units, class fontPool *pool, double _enlargement); ~TeXFontDefinition(); @@ -74,7 +74,7 @@ class TeXFontDefinition { TQString fontname; // name of font, such as "cmr10" unsigned char flags; // flags byte (see values below) double enlargement; - Q_INT32 scaled_size_in_DVI_units; // Scaled size from the font definition command; in DVI units + TQ_INT32 scaled_size_in_DVI_units; // Scaled size from the font definition command; in DVI units set_char_proc set_char_p; // proc used to set char // Resolution of the display device (resolution will usually be @@ -100,20 +100,20 @@ class TeXFontDefinition { /** For FREETYPE fonts, which use a map file, this field will contain the full name of the font (e.g. 'Computer Modern'). If the name does not exist, or cannot be found, this field will be - TQString::null. Only subclasses of TeXFont should write into this + TQString(). Only subclasses of TeXFont should write into this field. */ TQString fullFontName; /** For FREETYPE fonts, which use a map file, this field will contain the full name of the font encoding (e.g. 'TexBase1'). If the encoding name does not exist, or cannot be found, this field - will be TQString::null. Only subclasses of TeXFont should write + will be TQString(). Only subclasses of TeXFont should write into this field. */ TQString fullEncodingName; #endif private: - Q_UINT32 checksum; + TQ_UINT32 checksum; /** This will be set to a human-readable description of the font, e.g. "virtual" or "TeX PK", or "Type 1" */ diff --git a/kdvi/TeXFont_PFB.cpp b/kdvi/TeXFont_PFB.cpp index 2b3883fe..a017259d 100644 --- a/kdvi/TeXFont_PFB.cpp +++ b/kdvi/TeXFont_PFB.cpp @@ -26,28 +26,28 @@ //#define DEBUG_PFB 1 -TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double slant) - : TeXFont(parent) +TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *tqparent, fontEncoding *enc, double slant) + : TeXFont(tqparent) { #ifdef DEBUG_PFB if (enc != 0) - kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=" << enc->encodingFullName << " )" << endl; + kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( tqparent=" << tqparent << ", encoding=" << enc->encodingFullName << " )" << endl; else - kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=0 )" << endl; + kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( tqparent=" << tqparent << ", encoding=0 )" << endl; #endif fatalErrorInFontLoading = false; - int error = FT_New_Face( parent->font_pool->FreeType_library, parent->filename.local8Bit(), 0, &face ); + int error = FT_New_Face( tqparent->font_pool->FreeType_library, tqparent->filename.local8Bit(), 0, &face ); if ( error == FT_Err_Unknown_File_Format ) { - errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").arg(parent->filename); + errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").tqarg(tqparent->filename); kdError(4300) << errorMessage << endl; fatalErrorInFontLoading = true; return; } else if ( error ) { - errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").arg(parent->filename); + errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").tqarg(tqparent->filename); kdError(4300) << errorMessage << endl; fatalErrorInFontLoading = true; return; @@ -66,7 +66,7 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl } if (face->family_name != 0) - parent->fullFontName = face->family_name; + tqparent->fullFontName = face->family_name; // Finally, we need to set up the charMap array, which maps TeX // character codes to glyph indices in the font. (Remark: the @@ -74,8 +74,8 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl // TeX is only able to address character codes 0-255 while // e.g. Type1 fonts may contain several thousands of characters) if (enc != 0) { - parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "Encoding" )); - parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "encoding" )); + tqparent->fullEncodingName = enc->encodingFullName.remove(TQString::tqfromLatin1( "Encoding" )); + tqparent->fullEncodingName = enc->encodingFullName.remove(TQString::tqfromLatin1( "encoding" )); // An encoding vector is given for this font, i.e. an array of // character names (such as: 'parenleft' or 'dotlessj'). We use @@ -138,7 +138,7 @@ TeXFont_PFB::~TeXFont_PFB() } -glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) +glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) { #ifdef DEBUG_PFB kdDebug(4300) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; @@ -159,16 +159,16 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ if ((generateCharacterPixmap == true) && ((g->shrunkenCharacter.isNull()) || (color != g->color)) ) { int error; - unsigned int res = (unsigned int)(parent->displayResolution_in_dpi/parent->enlargement +0.5); + unsigned int res = (unsigned int)(tqparent->displayResolution_in_dpi/tqparent->enlargement +0.5); g->color = color; // Character height in 1/64th of points (reminder: 1 pt = 1/72 inch) // Only approximate, may vary from file to file!!!! @@@@@ - long int characterSize_in_printers_points_by_64 = (long int)((64.0*72.0*parent->scaled_size_in_DVI_units*parent->font_pool->getCMperDVIunit())/2.54 + 0.5 ); + long int characterSize_in_printers_points_by_64 = (long int)((64.0*72.0*tqparent->scaled_size_in_DVI_units*tqparent->font_pool->getCMperDVIunit())/2.54 + 0.5 ); error = FT_Set_Char_Size(face, 0, characterSize_in_printers_points_by_64, res, res ); if (error) { - TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").arg(parent->filename); + TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; @@ -178,13 +178,13 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ } // load glyph image into the slot and erase the previous one - if (parent->font_pool->getUseFontHints() == true) + if (tqparent->font_pool->getUseFontHints() == true) error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_DEFAULT ); else error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_HINTING ); if (error) { - TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").arg(ch).arg(parent->filename); + TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; @@ -196,7 +196,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ // convert to an anti-aliased bitmap error = FT_Render_Glyph( face->glyph, ft_render_mode_normal ); if (error) { - TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").arg(ch).arg(parent->filename); + TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; @@ -209,8 +209,8 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ if ((slot->bitmap.width == 0) || (slot->bitmap.rows == 0)) { if (errorMessage.isEmpty()) - errorMessage = i18n("Glyph #%1 is empty.").arg(ch); - kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").arg(ch).arg(parent->filename) << endl; + errorMessage = i18n("Glyph #%1 is empty.").tqarg(ch); + kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").tqarg(ch).tqarg(tqparent->filename) << endl; g->shrunkenCharacter.resize( 15, 15 ); g->shrunkenCharacter.fill(TQColor(255, 0, 0)); g->x2 = 0; @@ -219,9 +219,9 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ TQImage imgi(slot->bitmap.width, slot->bitmap.rows, 32); imgi.setAlphaBuffer(true); - // Do QPixmaps fully support the alpha channel? If yes, we use + // Do TQPixmaps fully support the alpha channel? If yes, we use // that. Otherwise, use other routines as a fallback - if (parent->font_pool->QPixmapSupportsAlpha) { + if (tqparent->font_pool->TQPixmapSupportsAlpha) { // If the alpha channel is properly supported, we set the // character glyph to a colored rectangle, and define the // character outline only using the alpha channel. That @@ -239,7 +239,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ } } else { // If the alpha channel is not supported... QT seems to turn - // the alpha channel into a crude bitmap which is used to mask + // the alpha channel into a crude bitmap which is used to tqmask // the resulting TQPixmap. In this case, we define the // character outline using the image data, and use the alpha // channel only to store "maximally opaque" or "completely @@ -248,18 +248,18 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ // quality is still sufficient for most purposes. One notable // exception is output from the gftodvi program, which will be // partially unreadable. - Q_UINT16 rInv = 0xFF - color.red(); - Q_UINT16 gInv = 0xFF - color.green(); - Q_UINT16 bInv = 0xFF - color.blue(); + TQ_UINT16 rInv = 0xFF - color.red(); + TQ_UINT16 gInv = 0xFF - color.green(); + TQ_UINT16 bInv = 0xFF - color.blue(); - for(Q_UINT16 y=0; ybitmap.rows; y++) { - Q_UINT8 *srcScanLine = slot->bitmap.buffer + y*slot->bitmap.pitch; + for(TQ_UINT16 y=0; ybitmap.rows; y++) { + TQ_UINT8 *srcScanLine = slot->bitmap.buffer + y*slot->bitmap.pitch; unsigned int *destScanLine = (unsigned int *)imgi.scanLine(y); - for(Q_UINT16 col=0; colbitmap.width; col++) { - Q_UINT16 data = *srcScanLine; + for(TQ_UINT16 col=0; colbitmap.width; col++) { + TQ_UINT16 data = *srcScanLine; // The value stored in "data" now has the following meaning: // data = 0 -> white; data = 0xff -> use "color" - *destScanLine = qRgba(0xFF - (rInv*data + 0x7F) / 0xFF, + *destScanLine = tqRgba(0xFF - (rInv*data + 0x7F) / 0xFF, 0xFF - (gInv*data + 0x7F) / 0xFF, 0xFF - (bInv*data + 0x7F) / 0xFF, (data > 0x03) ? 0xff : 0x00); @@ -279,13 +279,13 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ if (g->dvi_advance_in_units_of_design_size_by_2e20 == 0) { int error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_SCALE); if (error) { - TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").arg(ch).arg(parent->filename); + TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; g->dvi_advance_in_units_of_design_size_by_2e20 = 1; } - g->dvi_advance_in_units_of_design_size_by_2e20 = (Q_INT32)(((Q_INT64)(1<<20) * (Q_INT64)face->glyph->metrics.horiAdvance) / (Q_INT64)face->units_per_EM); + g->dvi_advance_in_units_of_design_size_by_2e20 = (TQ_INT32)(((TQ_INT64)(1<<20) * (TQ_INT64)face->glyph->metrics.horiAdvance) / (TQ_INT64)face->units_per_EM); } return g; diff --git a/kdvi/TeXFont_PFB.h b/kdvi/TeXFont_PFB.h index 4e2d8122..45d94be4 100644 --- a/kdvi/TeXFont_PFB.h +++ b/kdvi/TeXFont_PFB.h @@ -23,15 +23,15 @@ class glyph; class TeXFont_PFB : public TeXFont { public: - TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc=0, double slant=0.0 ); + TeXFont_PFB(TeXFontDefinition *tqparent, fontEncoding *enc=0, double slant=0.0 ); ~TeXFont_PFB(); - glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black); + glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black); private: FT_Face face; bool fatalErrorInFontLoading; - Q_UINT16 charMap[256]; + TQ_UINT16 charMap[256]; // This matrix is used internally to describes the slant, if // nonzero. Otherwise, this is undefined. diff --git a/kdvi/TeXFont_PK.cpp b/kdvi/TeXFont_PK.cpp index 7e1ce60d..562c40f9 100644 --- a/kdvi/TeXFont_PK.cpp +++ b/kdvi/TeXFont_PK.cpp @@ -80,18 +80,18 @@ extern void oops(TQString message); -TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent) - : TeXFont(parent) +TeXFont_PK::TeXFont_PK(TeXFontDefinition *tqparent) + : TeXFont(tqparent) { #ifdef DEBUG_PK - kdDebug(4300) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")" << endl; + kdDebug(4300) << "TeXFont_PK::TeXFont_PK( tqparent=" << tqparent << ")" << endl; #endif for(unsigned int i=0; ifilename), "r"); + file = fopen(TQFile::encodeName(tqparent->filename), "r"); if (file == 0) - kdError(4300) << i18n("Cannot open font file %1.").arg(parent->filename) << endl; + kdError(4300) << i18n("Cannot open font file %1.").tqarg(tqparent->filename) << endl; #ifdef DEBUG_PK else kdDebug(4300) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl; @@ -116,7 +116,7 @@ TeXFont_PK::~TeXFont_PK() } -glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) +glyph* TeXFont_PK::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) { #ifdef DEBUG_PK kdDebug(4300) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; @@ -136,7 +136,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC // If the character is not defined in the PK file, mark the // character as missing, and print an error message if (g->addr == 0) { - kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").arg(ch).arg(parent->filename) << endl; + kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").tqarg(ch).tqarg(tqparent->filename) << endl; g->addr = -1; return g; } @@ -163,7 +163,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC ((g->shrunkenCharacter.isNull()) || (color != g->color)) && (characterBitmaps[ch]->w != 0)) { g->color = color; - double shrinkFactor = 1200 / parent->displayResolution_in_dpi; + double shrinkFactor = 1200 / tqparent->displayResolution_in_dpi; // All is fine? Then we rescale the bitmap in order to produce the // required pixmap. Rescaling a character, however, is an art @@ -209,10 +209,10 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC // Turn the image into 8 bit TQByteArray translated(characterBitmaps[ch]->w * characterBitmaps[ch]->h); - Q_UINT8 *data = (Q_UINT8 *)translated.data(); + TQ_UINT8 *data = (TQ_UINT8 *)translated.data(); for(int x=0; xw; x++) for(int y=0; yh; y++) { - Q_UINT8 bit = *(characterBitmaps[ch]->bits + characterBitmaps[ch]->bytes_wide*y + (x >> 3)); + TQ_UINT8 bit = *(characterBitmaps[ch]->bits + characterBitmaps[ch]->bytes_wide*y + (x >> 3)); bit = bit >> (x & 7); bit = bit & 1; data[characterBitmaps[ch]->w*y + x] = bit; @@ -220,7 +220,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC // Now shrink the image. We shrink the X-direction first TQByteArray xshrunk(shrunk_width*characterBitmaps[ch]->h); - Q_UINT8 *xdata = (Q_UINT8 *)xshrunk.data(); + TQ_UINT8 *xdata = (TQ_UINT8 *)xshrunk.data(); // Do the shrinking. The pixel (x,y) that we want to calculate // corresponds to the line segment from @@ -231,7 +231,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC for(int y=0; yh; y++) for(int x=0; xw*y + srcX] * 255; if (destStartX >= 0.0) - value += (Q_UINT32) (255.0*(ceil(destStartX)-destStartX) * data[characterBitmaps[ch]->w*y + (int)floor(destStartX)]); + value += (TQ_UINT32) (255.0*(ceil(destStartX)-destStartX) * data[characterBitmaps[ch]->w*y + (int)floor(destStartX)]); if (floor(destEndX) < characterBitmaps[ch]->w) - value += (Q_UINT32) (255.0*(destEndX-floor(destEndX)) * data[characterBitmaps[ch]->w*y + (int)floor(destEndX)]); + value += (TQ_UINT32) (255.0*(destEndX-floor(destEndX)) * data[characterBitmaps[ch]->w*y + (int)floor(destEndX)]); xdata[shrunk_width*y + x] = (int)(value/shrinkFactor + 0.5); } // Now shrink the Y-direction TQByteArray xyshrunk(shrunk_width*shrunk_height); - Q_UINT8 *xydata = (Q_UINT8 *)xyshrunk.data(); + TQ_UINT8 *xydata = (TQ_UINT8 *)xyshrunk.data(); for(int x=0; x= 0.0) - value += (Q_UINT32) ((ceil(destStartY)-destStartY) * xdata[shrunk_width*(int)floor(destStartY) + x]); + value += (TQ_UINT32) ((ceil(destStartY)-destStartY) * xdata[shrunk_width*(int)floor(destStartY) + x]); if (floor(destEndY) < characterBitmaps[ch]->h) - value += (Q_UINT32) ((destEndY-floor(destEndY)) * xdata[shrunk_width*(int)floor(destEndY) + x]); + value += (TQ_UINT32) ((destEndY-floor(destEndY)) * xdata[shrunk_width*(int)floor(destEndY) + x]); xydata[shrunk_width*y + x] = (int)(value/shrinkFactor); } TQImage im32(shrunk_width, shrunk_height, 32); im32.setAlphaBuffer(true); - // Do QPixmaps fully support the alpha channel? If yes, we use + // Do TQPixmaps fully support the alpha channel? If yes, we use // that. Otherwise, use other routines as a fallback - if (parent->font_pool->QPixmapSupportsAlpha) { + if (tqparent->font_pool->TQPixmapSupportsAlpha) { // If the alpha channel is properly supported, we set the // character glyph to a colored rectangle, and define the // character outline only using the alpha channel. That ensures // good quality rendering for overlapping characters. - im32.fill(qRgb(color.red(), color.green(), color.blue())); - for(Q_UINT16 y=0; y white; data = 0xff -> use "color" - *destScanLine = qRgba(0xFF - (rInv*data + 0x7F) / 0xFF, + *destScanLine = tqRgba(0xFF - (rInv*data + 0x7F) / 0xFF, 0xFF - (gInv*data + 0x7F) / 0xFF, 0xFF - (bInv*data + 0x7F) / 0xFF, (data > 0x03) ? 0xff : 0x00); @@ -320,8 +320,8 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC -#define ADD(a, b) ((Q_UINT32 *) (((char *) a) + b)) -#define SUB(a, b) ((Q_UINT32 *) (((char *) a) - b)) +#define ADD(a, b) ((TQ_UINT32 *) (((char *) a) + b)) +#define SUB(a, b) ((TQ_UINT32 *) (((char *) a) - b)) @@ -347,7 +347,7 @@ static const uchar bitflip[256] = { 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255 }; -static Q_UINT32 bit_masks[33] = { +static TQ_UINT32 bit_tqmasks[33] = { 0x0, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff, @@ -454,7 +454,7 @@ void TeXFont_PK::PK_skip_specials() case PK_NOOP : break; default : - oops(i18n("Unexpected %1 in PK file %2").arg(PK_flag_byte).arg(parent->filename) ); + oops(i18n("Unexpected %1 in PK file %2").tqarg(PK_flag_byte).tqarg(tqparent->filename) ); break; } } @@ -477,11 +477,11 @@ void TeXFont_PK::read_PK_char(unsigned int ch) int n; int row_bit_pos; bool paint_switch; - Q_UINT32 *cp; + TQ_UINT32 *cp; register struct glyph *g; register FILE *fp = file; long fpwidth; - Q_UINT32 word = 0; + TQ_UINT32 word = 0; int word_weight, bytes_wide; int rows_left, h_bit, count; @@ -521,7 +521,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) w = num(fp, n); h = num(fp, n); if (w > 0x7fff || h > 0x7fff) - oops(i18n("The character %1 is too large in file %2").arg(ch).arg(parent->filename)); + oops(i18n("The character %1 is too large in file %2").tqarg(ch).tqarg(tqparent->filename)); characterBitmaps[ch]->w = w; characterBitmaps[ch]->h = h; } @@ -537,7 +537,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) characterBitmaps[ch]->bits = new char[size != 0 ? size : 1]; } - cp = (Q_UINT32 *) characterBitmaps[ch]->bits; + cp = (TQ_UINT32 *) characterBitmaps[ch]->bits; /* * read character data into *cp @@ -595,12 +595,12 @@ void TeXFont_PK::read_PK_char(unsigned int ch) h_bit -= count; word_weight -= count; if (paint_switch) - word |= bit_masks[count] << word_weight; + word |= bit_tqmasks[count] << word_weight; count = 0; } else if (count >= h_bit && h_bit <= word_weight) { if (paint_switch) - word |= bit_masks[h_bit] << (word_weight - h_bit); + word |= bit_tqmasks[h_bit] << (word_weight - h_bit); *cp++ = word; /* "output" row(s) */ for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) { @@ -615,7 +615,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) h_bit = characterBitmaps[ch]->w; } else { if (paint_switch) - word |= bit_masks[word_weight]; + word |= bit_tqmasks[word_weight]; *cp++ = word; word = 0; count -= word_weight; @@ -625,10 +625,10 @@ void TeXFont_PK::read_PK_char(unsigned int ch) } paint_switch = 1 - paint_switch; } - if (cp != ((Q_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) - oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename)); + if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) + oops(i18n("Wrong number of bits stored: char. %1, font %2").tqarg(ch).tqarg(tqparent->filename)); if (rows_left != 0 || h_bit != characterBitmaps[ch]->w) - oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename)); + oops(i18n("Bad pk file (%1), too many bits").tqarg(tqparent->filename)); } // The data in the bitmap is now in the processor's bit order, @@ -679,14 +679,14 @@ void TeXFont_PK::read_PK_char(unsigned int ch) while (count > 0) { if (count < word_weight && count < h_bit) { if (paint_switch) - word |= bit_masks[count] << (32 - word_weight); + word |= bit_tqmasks[count] << (32 - word_weight); h_bit -= count; word_weight -= count; count = 0; } else if (count >= h_bit && h_bit <= word_weight) { if (paint_switch) - word |= bit_masks[h_bit] << (32 - word_weight); + word |= bit_tqmasks[h_bit] << (32 - word_weight); *cp++ = word; /* "output" row(s) */ for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) { @@ -701,7 +701,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) h_bit = characterBitmaps[ch]->w; } else { if (paint_switch) - word |= bit_masks[word_weight] << (32 - word_weight); + word |= bit_tqmasks[word_weight] << (32 - word_weight); *cp++ = word; word = 0; count -= word_weight; @@ -711,10 +711,10 @@ void TeXFont_PK::read_PK_char(unsigned int ch) } paint_switch = 1 - paint_switch; } - if (cp != ((Q_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) - oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename)); + if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) + oops(i18n("Wrong number of bits stored: char. %1, font %2").tqarg(ch).tqarg(tqparent->filename)); if (rows_left != 0 || h_bit != characterBitmaps[ch]->w) - oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename)); + oops(i18n("Bad pk file (%1), too many bits").tqarg(tqparent->filename)); } } // endif: big or small Endian? } diff --git a/kdvi/TeXFont_PK.h b/kdvi/TeXFont_PK.h index 80a0c0e1..68935d16 100644 --- a/kdvi/TeXFont_PK.h +++ b/kdvi/TeXFont_PK.h @@ -9,10 +9,10 @@ class glyph; class TeXFont_PK : public TeXFont { public: - TeXFont_PK(TeXFontDefinition *parent); + TeXFont_PK(TeXFontDefinition *tqparent); ~TeXFont_PK(); - glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black); + glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black); private: FILE *file; // open font file or NULL diff --git a/kdvi/TeXFont_TFM.cpp b/kdvi/TeXFont_TFM.cpp index c8268f01..ebd1b7f5 100644 --- a/kdvi/TeXFont_TFM.cpp +++ b/kdvi/TeXFont_TFM.cpp @@ -21,14 +21,14 @@ //#define DEBUG_TFM -TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) - : TeXFont(parent) +TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *tqparent) + : TeXFont(tqparent) { #ifdef DEBUG_TFM - kdDebug(4300) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )" << endl; + kdDebug(4300) << "TeXFont_TFM::TeXFont_TFM( tqparent=" << tqparent << " )" << endl; #endif - TQFile file( parent->filename ); + TQFile file( tqparent->filename ); if ( !file.open( IO_ReadOnly ) ) { kdError(4300) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file" << endl; return; @@ -37,7 +37,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) // Data from the very beginning of the TFM file, as specified in // "The DVI Driver Standard, Level 0", section D.2.1 - Q_UINT16 lf, lh, bc, ec, nw, nh, nd; + TQ_UINT16 lf, lh, bc, ec, nw, nh, nd; stream >> lf >> lh >> bc >> ec >> nw >> nh >> nd; #ifdef DEBUG_TFM kdDebug(4300) << "lf= " << lf << endl @@ -49,7 +49,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) << "nd= " << nd << endl; #endif if ((bc > ec) || (ec >= TeXFontDefinition::max_num_of_chars_in_font)) { - kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid bc and ec entries." << endl; + kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid bc and ec entries." << endl; file.close(); return; } @@ -94,10 +94,10 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) for(unsigned int characterCode=bc; characterCode> byte; if (byte >= nw) - kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl; + kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid Char-Info table." << endl; else { characterWidth_in_units_of_design_size[characterCode] = widthTable_in_units_of_design_size[byte]; g->dvi_advance_in_units_of_design_size_by_2e20 = widthTable_in_units_of_design_size[byte].value; @@ -106,7 +106,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) stream >> byte; byte = byte >> 4; if (byte >= nh) - kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl; + kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid Char-Info table." << endl; else characterHeight_in_units_of_design_size[characterCode] = heightTable_in_units_of_design_size[byte]; @@ -122,7 +122,7 @@ TeXFont_TFM::~TeXFont_TFM() } -glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixmap, const TQColor& color) +glyph *TeXFont_TFM::getGlyph(TQ_UINT16 characterCode, bool generateCharacterPixmap, const TQColor& color) { #ifdef DEBUG_TFM kdDebug(4300) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; @@ -139,10 +139,10 @@ glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixma if ((generateCharacterPixmap == true) && ((g->shrunkenCharacter.isNull()) || (color != g->color)) ) { g->color = color; - Q_UINT16 pixelWidth = (Q_UINT16)(parent->displayResolution_in_dpi * + TQ_UINT16 pixelWidth = (TQ_UINT16)(tqparent->displayResolution_in_dpi * design_size_in_TeX_points.toDouble() * characterWidth_in_units_of_design_size[characterCode].toDouble() * 100.0/7227.0 + 0.5); - Q_UINT16 pixelHeight = (Q_UINT16)(parent->displayResolution_in_dpi * + TQ_UINT16 pixelHeight = (TQ_UINT16)(tqparent->displayResolution_in_dpi * design_size_in_TeX_points.toDouble() * characterHeight_in_units_of_design_size[characterCode].toDouble() * 100.0/7227.0 + 0.5); diff --git a/kdvi/TeXFont_TFM.h b/kdvi/TeXFont_TFM.h index 737c8bed..9a3639e0 100644 --- a/kdvi/TeXFont_TFM.h +++ b/kdvi/TeXFont_TFM.h @@ -14,19 +14,19 @@ class fix_word { public: - void fromINT32(Q_INT32 val) {value = val;} - void fromDouble(double val) {value = (Q_INT32)(val * (1<<20) + 0.5);} + void fromINT32(TQ_INT32 val) {value = val;} + void fromDouble(double val) {value = (TQ_INT32)(val * (1<<20) + 0.5);} double toDouble() {return (double(value)) / (double(1<<20));} - Q_INT32 value; + TQ_INT32 value; }; class TeXFont_TFM : public TeXFont { public: - TeXFont_TFM(TeXFontDefinition *parent); + TeXFont_TFM(TeXFontDefinition *tqparent); ~TeXFont_TFM(); - glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black); + glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black); private: fix_word characterWidth_in_units_of_design_size[256]; diff --git a/kdvi/bigEndianByteReader.cpp b/kdvi/bigEndianByteReader.cpp index 63d11f83..aa55bdd8 100644 --- a/kdvi/bigEndianByteReader.cpp +++ b/kdvi/bigEndianByteReader.cpp @@ -14,7 +14,7 @@ //#define DEBUG_ENDIANREADER -Q_UINT8 bigEndianByteReader::readUINT8() +TQ_UINT8 bigEndianByteReader::readUINT8() { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. @@ -30,27 +30,27 @@ Q_UINT8 bigEndianByteReader::readUINT8() return *(command_pointer++); } -Q_UINT16 bigEndianByteReader::readUINT16() +TQ_UINT16 bigEndianByteReader::readUINT16() { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_UINT16 a; + TQ_UINT16 a; a = *(command_pointer++); a = (a << 8) | *(command_pointer++); return a; } -Q_UINT32 bigEndianByteReader::readUINT32() +TQ_UINT32 bigEndianByteReader::readUINT32() { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_UINT32 a; + TQ_UINT32 a; a = *(command_pointer++); a = (a << 8) | *(command_pointer++); a = (a << 8) | *(command_pointer++); @@ -58,33 +58,33 @@ Q_UINT32 bigEndianByteReader::readUINT32() return a; } -void bigEndianByteReader::writeUINT32(Q_UINT32 a) +void bigEndianByteReader::writeUINT32(TQ_UINT32 a) { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return; - command_pointer[3] = (Q_UINT8)(a & 0xFF); + command_pointer[3] = (TQ_UINT8)(a & 0xFF); a = a >> 8; - command_pointer[2] = (Q_UINT8)(a & 0xFF); + command_pointer[2] = (TQ_UINT8)(a & 0xFF); a = a >> 8; - command_pointer[1] = (Q_UINT8)(a & 0xFF); + command_pointer[1] = (TQ_UINT8)(a & 0xFF); a = a >> 8; - command_pointer[0] = (Q_UINT8)(a & 0xFF); + command_pointer[0] = (TQ_UINT8)(a & 0xFF); command_pointer += 4; return; } -Q_UINT32 bigEndianByteReader::readUINT(Q_UINT8 size) +TQ_UINT32 bigEndianByteReader::readUINT(TQ_UINT8 size) { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_UINT32 a = 0; + TQ_UINT32 a = 0; while (size > 0) { a = (a << 8) + *(command_pointer++); size--; @@ -92,14 +92,14 @@ Q_UINT32 bigEndianByteReader::readUINT(Q_UINT8 size) return a; } -Q_INT32 bigEndianByteReader::readINT(Q_UINT8 length) +TQ_INT32 bigEndianByteReader::readINT(TQ_UINT8 length) { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_INT32 a = *(command_pointer++); + TQ_INT32 a = *(command_pointer++); if (a & 0x80) a -= 0x100; diff --git a/kdvi/bigEndianByteReader.h b/kdvi/bigEndianByteReader.h index 06ef1b13..269d97d1 100644 --- a/kdvi/bigEndianByteReader.h +++ b/kdvi/bigEndianByteReader.h @@ -24,38 +24,38 @@ class bigEndianByteReader { public: /** Set this pointer to the location where the number resides which you want to read. */ - Q_UINT8 * command_pointer; + TQ_UINT8 * command_pointer; /** This pointer marks the end of the memory area where bytes can be read. It should point to the first byte which CANNOT be read. The idea is to have a safety net which protects us against SEGFAULTs. This is also used in virtual fonts, where the macro does not have an EOP command at the end of the macro. */ - Q_UINT8 * end_pointer; + TQ_UINT8 * end_pointer; /** If command_pointer >= end_pointer, this method return EOP (=140) and exists. Otherwise, the method returns the unsigned byte and increases the command_pointer by one. */ - Q_UINT8 readUINT8(); + TQ_UINT8 readUINT8(); /** Similar to the method above, only that the method reads a big endian 2-byte word and increases the pointer by two. */ - Q_UINT16 readUINT16(); + TQ_UINT16 readUINT16(); /** Similar to the method above, only that the method reads a big endian 4-byte word and increases the pointer by four. */ - Q_UINT32 readUINT32(); + TQ_UINT32 readUINT32(); - void writeUINT32(Q_UINT32 a); + void writeUINT32(TQ_UINT32 a); /** Similar to the method above, only that the method reads a big endian number of length size, where 1 <= size <= 4. Note that the value 3 is allowed (and is acually used in DVI files)!!! */ - Q_UINT32 readUINT(Q_UINT8 size); + TQ_UINT32 readUINT(TQ_UINT8 size); /** Similar to the method above, only that the method reads a SIGNED number */ - Q_INT32 readINT(Q_UINT8); + TQ_INT32 readINT(TQ_UINT8); }; diff --git a/kdvi/dviFile.cpp b/kdvi/dviFile.cpp index 336507db..db365482 100644 --- a/kdvi/dviFile.cpp +++ b/kdvi/dviFile.cpp @@ -71,7 +71,7 @@ extern "C" { dvifile::dvifile(const dvifile *old, fontPool *fp) { - errorMsg = TQString::null; + errorMsg = TQString(); errorCounter = 0; page_offset = 0; suggestedPageSize = 0; @@ -107,7 +107,7 @@ void dvifile::process_preamble() { command_pointer = dvi_Data(); - Q_UINT8 magic_number = readUINT8(); + TQ_UINT8 magic_number = readUINT8(); if (magic_number != PRE) { errorMsg = i18n("The DVI file does not start with the preamble."); return; @@ -124,8 +124,8 @@ void dvifile::process_preamble() how many centimeters there are in one TeX unit, as explained in section A.3 of the DVI driver standard, Level 0, published by the TUG DVI driver standards committee. */ - Q_UINT32 numerator = readUINT32(); - Q_UINT32 denominator = readUINT32(); + TQ_UINT32 numerator = readUINT32(); + TQ_UINT32 denominator = readUINT32(); _magnification = readUINT32(); cmPerDVIunit = (double(numerator) / double(denominator)) * (double(_magnification) / 1000.0) * (1.0 / 1e5); @@ -165,7 +165,7 @@ void dvifile::find_postamble() void dvifile::read_postamble() { - Q_UINT8 magic_byte = readUINT8(); + TQ_UINT8 magic_byte = readUINT8(); if (magic_byte != POST) { errorMsg = i18n("The postamble does not begin with the POST command."); return; @@ -181,17 +181,17 @@ void dvifile::read_postamble() total_pages = readUINT16(); // As a next step, read the font definitions. - Q_UINT8 cmnd = readUINT8(); + TQ_UINT8 cmnd = readUINT8(); while (cmnd >= FNTDEF1 && cmnd <= FNTDEF4) { - Q_UINT32 TeXnumber = readUINT(cmnd-FNTDEF1+1); - Q_UINT32 checksum = readUINT32(); // Checksum of the font, as found by TeX in the TFM file + TQ_UINT32 TeXnumber = readUINT(cmnd-FNTDEF1+1); + TQ_UINT32 checksum = readUINT32(); // Checksum of the font, as found by TeX in the TFM file // Read scale and design factor, and the name of the font. All // these are explained in section A.4 of the DVI driver standard, // Level 0, published by the TUG DVI driver standards committee - Q_UINT32 scale = readUINT32(); - Q_UINT32 design = readUINT32(); - Q_UINT16 len = readUINT8() + readUINT8(); // Length of the font name, including the directory name + TQ_UINT32 scale = readUINT32(); + TQ_UINT32 design = readUINT32(); + TQ_UINT16 len = readUINT8() + readUINT8(); // Length of the font name, including the directory name char *fontname = new char[len + 1]; strncpy(fontname, (char *)command_pointer, len ); fontname[len] = '\0'; @@ -248,7 +248,7 @@ void dvifile::prepare_pages() page_offset[total_pages] = beginning_of_postamble; - Q_UINT16 i = total_pages-1; + TQ_UINT16 i = total_pages-1; page_offset[i] = last_page_offset; // Follow back pointers through pages in the DVI file, storing the @@ -256,7 +256,7 @@ void dvifile::prepare_pages() while (i > 0) { command_pointer = dvi_Data() + page_offset[i--]; if (readUINT8() != BOP) { - errorMsg = i18n("The page %1 does not start with the BOP command.").arg(i+1); + errorMsg = i18n("The page %1 does not start with the BOP command.").tqarg(i+1); return; } command_pointer += 10 * 4; @@ -273,7 +273,7 @@ dvifile::dvifile(const TQString& fname, fontPool* pool) kdDebug(4300) << "init_dvi_file: " << fname << endl; #endif - errorMsg = TQString::null; + errorMsg = TQString(); errorCounter = 0; page_offset = 0; suggestedPageSize = 0; @@ -340,10 +340,10 @@ void dvifile::renumber() bool bigEndian; qSysInfo (&wordSize, &bigEndian); - for(Q_UINT32 i=1; i<=total_pages; i++) { - Q_UINT8 *ptr = dviData.data() + page_offset[i-1]+1; - Q_UINT8 *num = (Q_UINT8 *)&i; - for(Q_UINT8 j=0; j<4; j++) + for(TQ_UINT32 i=1; i<=total_pages; i++) { + TQ_UINT8 *ptr = dviData.data() + page_offset[i-1]+1; + TQ_UINT8 *num = (TQ_UINT8 *)&i; + for(TQ_UINT8 j=0; j<4; j++) if (bigEndian) { *(ptr++) = num[0]; *(ptr++) = num[1]; @@ -362,14 +362,14 @@ void dvifile::renumber() TQString dvifile::convertPDFtoPS(const TQString &PDFFilename) { // Check if the PDFFile is known - TQMap::Iterator it = convertedFiles.find(PDFFilename); + TQMap::Iterator it = convertedFiles.tqfind(PDFFilename); if (it != convertedFiles.end()) { // PDF-File is known. Good. return it.data(); } // Get the name of a temporary file - KTempFile tmpfile(TQString::null, ".ps"); + KTempFile tmpfile(TQString(), ".ps"); TQString convertedFileName = tmpfile.name(); tmpfile.close(); tmpfile.unlink(); @@ -378,9 +378,9 @@ TQString dvifile::convertPDFtoPS(const TQString &PDFFilename) KProcIO proc; proc << "pdf2ps" << PDFFilename << convertedFileName; if (proc.start(KProcess::Block) == false) - convertedFileName = TQString::null; // Indicates that conversion failed, won't try again. + convertedFileName = TQString(); // Indicates that conversion failed, won't try again. if (!TQFile::exists(convertedFileName)) - convertedFileName = TQString::null; // Indicates that conversion failed, won't try again. + convertedFileName = TQString(); // Indicates that conversion failed, won't try again. // Save name of converted file to buffer, so PDF file won't be // converted again, and files can be deleted when *this is diff --git a/kdvi/dviFile.h b/kdvi/dviFile.h index 59ffe65c..b82d19de 100644 --- a/kdvi/dviFile.h +++ b/kdvi/dviFile.h @@ -35,15 +35,15 @@ class dvifile : public bigEndianByteReader fontPool * font_pool; TQString filename; TQString generatorString; - Q_UINT16 total_pages; - TQMemArray page_offset; + TQ_UINT16 total_pages; + TQMemArray page_offset; /** Saves the DVI file. Returns true on success. */ bool saveAs(const TQString &filename); // Returns a pointer to the DVI file's data, or 0 if no data has yet // been allocated. - Q_UINT8 * dvi_Data() {return dviData.data();} + TQ_UINT8 * dvi_Data() {return dviData.data();} TQIODevice::Offset size_of_file; TQString errorMsg; @@ -51,14 +51,14 @@ class dvifile : public bigEndianByteReader /** This field is set to zero when the DVI file is constructed, and will be modified during the prescan phase (at this time the prescan code still resides in the dviRenderer class) */ - Q_UINT16 numberOfExternalPSFiles; + TQ_UINT16 numberOfExternalPSFiles; /** This field is set to zero when the DVI file is constructed, and will be modified during the prescan phase (at this time the prescan code still resides in the dviRenderer class) */ - Q_UINT16 numberOfExternalNONPSFiles; + TQ_UINT16 numberOfExternalNONPSFiles; - Q_UINT32 beginning_of_postamble; + TQ_UINT32 beginning_of_postamble; /** This flag is set to "true" during the construction of the dvifile, and is never changed afterwards by the dvifile @@ -76,20 +76,20 @@ class dvifile : public bigEndianByteReader /** Returns the magnification of the DVI file, as described in the DVI Standard. */ - Q_UINT32 getMagnification() const {return _magnification;} + TQ_UINT32 getMagnification() const {return _magnification;} /** This member is set to zero on construction and can be used by other software to count error messages that were printed when the DVI-file was processed. Suggested application: limit the number of error messages to, say, 25. */ - Q_UINT8 errorCounter; + TQ_UINT8 errorCounter; /** Papersize information read from the dvi-File */ pageSize *suggestedPageSize; /** Sets new DVI data; all old data is erased. EXPERIMENTAL, use with care. */ - void setNewData(const TQMemArray& newData) {dviData = newData;} + void setNewData(const TQMemArray& newData) {dviData = newData;} /** Page numbers that appear in a DVI document need not be ordered. Worse, page numbers need not be unique. This method @@ -112,7 +112,7 @@ class dvifile : public bigEndianByteReader name, the method will then NOT convert the file, but simply return the name from the buffer - @returns The name of the PS file, or TQString::null on failure. + @returns The name of the PS file, or TQString() on failure. */ TQString convertPDFtoPS(const TQString &PDFFilename); @@ -129,19 +129,19 @@ class dvifile : public bigEndianByteReader /** Offset in DVI file of last page, set in read_postamble(). */ - Q_UINT32 last_page_offset; - Q_UINT32 _magnification; + TQ_UINT32 last_page_offset; + TQ_UINT32 _magnification; double cmPerDVIunit; - TQMemArray dviData; + TQMemArray dviData; /** Map of filenames for converted PDF files This map contains names of PDF files that were converted to PostScript. The key is the name of the PDF file, the data the name - of the associated PS file, or TQString::null, if the file could not + of the associated PS file, or TQString(), if the file could not be converted. The PS files are deleted when the DVI-file is destructed. */ TQMap convertedFiles; diff --git a/kdvi/dviPageCache.h b/kdvi/dviPageCache.h index a28052c5..41a1c173 100644 --- a/kdvi/dviPageCache.h +++ b/kdvi/dviPageCache.h @@ -27,6 +27,7 @@ class DVIPageCache : public DocumentPageCache { Q_OBJECT + TQ_OBJECT public: DVIPageCache(); diff --git a/kdvi/dviRenderer.cpp b/kdvi/dviRenderer.cpp index 2e0b0512..5133b2ab 100644 --- a/kdvi/dviRenderer.cpp +++ b/kdvi/dviRenderer.cpp @@ -71,7 +71,7 @@ dviRenderer::dviRenderer(TQWidget *par) : DocumentRenderer(par), info(new infoDialog(par)) { #ifdef DEBUG_DVIRENDERER - kdDebug(4300) << "dviRenderer( parent=" << par << " )" << endl; + kdDebug(4300) << "dviRenderer( tqparent=" << par << " )" << endl; #endif // initialize the dvi machinery @@ -79,7 +79,7 @@ dviRenderer::dviRenderer(TQWidget *par) connect(&font_pool, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) ); - parentWidget = par; + tqparentWidget = par; shrinkfactor = 3; current_page = 0; resolutionInDPI = 0.0; @@ -193,12 +193,12 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page) // Reset colors colorStack.clear(); - globalColor = Qt::black; + globalColor = TQt::black; TQApplication::setOverrideCursor( waitCursor ); foreGroundPainter = page->getPainter(); if (foreGroundPainter != 0) { - errorMsg = TQString::null; + errorMsg = TQString(); draw_page(); page->returnPainter(foreGroundPainter); } @@ -206,11 +206,11 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page) page->isEmpty = false; if (errorMsg.isEmpty() != true) { - KMessageBox::detailedError(parentWidget, + KMessageBox::detailedError(tqparentWidget, i18n("File corruption! KDVI had trouble interpreting your DVI file. Most " "likely this means that the DVI file is broken."), errorMsg, i18n("DVI File Error")); - errorMsg = TQString::null; + errorMsg = TQString(); currentlyDrawnPage = 0; mutex.unlock(); return; @@ -260,7 +260,7 @@ void dviRenderer::showThatSourceInformationIsPresent() if (showMsg) { KDialogBase *dialog= new KDialogBase(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes, - parentWidget, "information", true, true,KStdGuiItem::ok() ); + tqparentWidget, "information", true, true,KStdGuiItem::ok() ); TQVBox *topcontents = new TQVBox (dialog); topcontents->setSpacing(KDialog::spacingHint()*2); @@ -277,7 +277,7 @@ void dviRenderer::showThatSourceInformationIsPresent() TQLabel *label2 = new TQLabel( i18n("This DVI file contains source file information. You may click into the text with the " "middle mouse button, and an editor will open the TeX-source file immediately."), contents); - label2->setMinimumSize(label2->sizeHint()); + label2->setMinimumSize(label2->tqsizeHint()); lay->add( label2 ); lay->addStretch(1); TQSize extraSize = TQSize(50,30); @@ -311,8 +311,8 @@ void dviRenderer::embedPostScript() if (!dviFile) return; - embedPS_progress = new KProgressDialog(parentWidget, "embedPSProgressDialog", - i18n("Embedding PostScript Files"), TQString::null, true); + embedPS_progress = new KProgressDialog(tqparentWidget, "embedPSProgressDialog", + i18n("Embedding PostScript Files"), TQString(), true); if (!embedPS_progress) return; embedPS_progress->setAllowCancel(false); @@ -323,8 +323,8 @@ void dviRenderer::embedPostScript() embedPS_numOfProgressedFiles = 0; - Q_UINT16 currPageSav = current_page; - errorMsg = TQString::null; + TQ_UINT16 currPageSav = current_page; + errorMsg = TQString(); for(current_page=0; current_page < dviFile->total_pages; current_page++) { if (current_page < dviFile->total_pages) { command_pointer = dviFile->dvi_Data() + dviFile->page_offset[current_page]; @@ -342,12 +342,12 @@ void dviRenderer::embedPostScript() if (!errorMsg.isEmpty()) { errorMsg = "" + errorMsg + ""; - KMessageBox::detailedError(parentWidget, "" + i18n("Not all PostScript files could be embedded into your document.") + "", errorMsg); - errorMsg = TQString::null; + KMessageBox::detailedError(tqparentWidget, "" + i18n("Not all PostScript files could be embedded into your document.") + "", errorMsg); + errorMsg = TQString(); } else - KMessageBox::information(parentWidget, "" + i18n("All external PostScript files were embedded into your document. You " + KMessageBox::information(tqparentWidget, "" + i18n("All external PostScript files were embedded into your document. You " "will probably want to save the DVI file now.") + "", - TQString::null, "embeddingDone"); + TQString(), "embeddingDone"); // Prescan phase starts here #ifdef PERFORMANCE_MEASUREMENT @@ -435,9 +435,9 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) // Make sure the file actually exists. if (!fi.exists() || fi.isDir()) { - KMessageBox::error( parentWidget, + KMessageBox::error( tqparentWidget, i18n("File error. The specified file '%1' does not exist. " - "KDVI already tried to add the ending '.dvi'.").arg(filename), + "KDVI already tried to add the ending '.dvi'.").tqarg(filename), i18n("File Error!")); return false; } @@ -448,21 +448,21 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) // the multipage. TQString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() ); if (mimetype != "application/x-dvi") { - KMessageBox::sorry( parentWidget, + KMessageBox::sorry( tqparentWidget, i18n( "Could not open file %1 which has " "type %2. KDVI can only load DVI (.dvi) files." ) - .arg( fname ) - .arg( mimetype ) ); + .tqarg( fname ) + .tqarg( mimetype ) ); return false; } // Check if the file is a valid DVI file. if (!isValidFile(filename)) { - KMessageBox::sorry( parentWidget, + KMessageBox::sorry( tqparentWidget, i18n("File corruption! KDVI had trouble interpreting your DVI file. Most " "likely this means that the DVI file is broken.") - .arg( fname ) ); + .tqarg( fname ) ); return false; } @@ -477,7 +477,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) if ((dviFile_new->dvi_Data() == NULL)||(dviFile_new->errorMsg.isEmpty() != true)) { TQApplication::restoreOverrideCursor(); if (dviFile_new->errorMsg.isEmpty() != true) - KMessageBox::detailedError(parentWidget, + KMessageBox::detailedError(tqparentWidget, i18n("File corruption! KDVI had trouble interpreting your DVI file. Most " "likely this means that the DVI file is broken."), dviFile_new->errorMsg, i18n("DVI File Error")); @@ -507,7 +507,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) TQString includePath; if (!baseURL.isLocalFile()) { includePath = filename; - includePath.truncate(includePath.findRev('/')); + includePath.truncate(includePath.tqfindRev('/')); } PS_interface->setIncludePath(includePath); @@ -538,7 +538,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) preScanTimer.start(); #endif dviFile->numberOfExternalPSFiles = 0; - Q_UINT16 currPageSav = current_page; + TQ_UINT16 currPageSav = current_page; prebookmarks.clear(); for(current_page=0; current_page < dviFile->total_pages; current_page++) { @@ -629,19 +629,19 @@ Anchor dviRenderer::parseReference(const TQString &reference) // points to line number 1111 in the file "Filename". KDVI then // looks for source specials of the form "src:xxxxFilename", and // tries to find the special with the biggest xxxx - if (reference.find("src:",0,false) == 0) { + if (reference.tqfind("src:",0,false) == 0) { // Extract the file name and the numeral part from the reference string DVI_SourceFileSplitter splitter(reference, dviFile->filename); - Q_UINT32 refLineNumber = splitter.line(); + TQ_UINT32 refLineNumber = splitter.line(); TQString refFileName = splitter.filePath(); if (sourceHyperLinkAnchors.isEmpty()) { - KMessageBox::sorry(parentWidget, i18n("You have asked KDVI to locate the place in the DVI file which corresponds to " + KMessageBox::sorry(tqparentWidget, i18n("You have asked KDVI to locate the place in the DVI file which corresponds to " "line %1 in the TeX-file %2. It seems, however, that the DVI file " "does not contain the necessary source file information. " "We refer to the manual of KDVI for a detailed explanation on how to include this " - "information. Press the F1 key to open the manual.").arg(refLineNumber).arg(refFileName), + "information. Press the F1 key to open the manual.").tqarg(refLineNumber).tqarg(refFileName), i18n("Could Not Find Reference")); mutex.unlock(); return Anchor(); @@ -651,7 +651,7 @@ Anchor dviRenderer::parseReference(const TQString &reference) // whose line number is the biggest among those that are smaller // than the refLineNumber. That way, the position in the DVI file // which is highlighted is always a little further up than the - // position in the editor, e.g. if the DVI file contains + // position in the editor, e.g. if the DVI file tqcontains // positional information at the beginning of every paragraph, // KDVI jumps to the beginning of the paragraph that the cursor is // in, and never to the next paragraph. If source file anchors for @@ -680,8 +680,8 @@ Anchor dviRenderer::parseReference(const TQString &reference) return Anchor(bestMatch->page, bestMatch->distance_from_top); } else if (anchorForRefFileFound == false) - KMessageBox::sorry(parentWidget, i18n("KDVI was not able to locate the place in the DVI file which corresponds to " - "line %1 in the TeX-file %2.").arg(refLineNumber).arg(refFileName), + KMessageBox::sorry(tqparentWidget, i18n("KDVI was not able to locate the place in the DVI file which corresponds to " + "line %1 in the TeX-file %2.").tqarg(refLineNumber).tqarg(refFileName), i18n( "Could Not Find Reference" )); else { mutex.unlock(); @@ -715,7 +715,7 @@ void dviRenderer::setResolution(double resolution_in_DPI) void dviRenderer::clearStatusBar() { - emit setStatusBarText( TQString::null ); + emit setStatusBarText( TQString() ); } @@ -733,9 +733,9 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum TQString TeXfile = splitter.filePath(); if ( ! splitter.fileExists() ) { - KMessageBox::sorry(parentWidget, TQString("") + + KMessageBox::sorry(tqparentWidget, TQString("") + i18n("The DVI-file refers to the TeX-file " - "%1 which could not be found.").arg(KShellProcess::quote(TeXfile)) + + "%1 which could not be found.").tqarg(KShellProcess::quote(TeXfile)) + TQString(""), i18n( "Could Not Find File" )); return; @@ -743,7 +743,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum TQString command = editorCommand; if (command.isEmpty() == true) { - int r = KMessageBox::warningContinueCancel(parentWidget, TQString("") + + int r = KMessageBox::warningContinueCancel(tqparentWidget, TQString("") + i18n("You have not yet specified an editor for inverse search. " "Please choose your favorite editor in the " "DVI options dialog " @@ -756,7 +756,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum else return; } - command = command.replace( "%l", TQString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) ); + command = command.tqreplace( "%l", TQString::number(splitter.line()) ).tqreplace( "%f", KShellProcess::quote(TeXfile) ); #ifdef DEBUG_SPECIAL kdDebug(4300) << "Calling program: " << command << endl; @@ -767,8 +767,8 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum // henceforth dimiss the output of the older programm. "If it // hasn't failed until now, we don't care." if (proc != 0) { - qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); - qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); proc = 0; } @@ -778,15 +778,15 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum kdError(4300) << "Could not allocate ShellProcess for the editor command." << endl; return; } - qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(editorCommand_terminated(KProcess *))); + tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(editorCommand_terminated(KProcess *))); // Merge the editor-specific editor message here. export_errorString = i18n("The external program

%1

which was used to call the editor " "for inverse search, reported an error. You might wish to look at the document info " "dialog which you will find in the File-Menu for a precise error report. The " "manual for KDVI contains a detailed explanation how to set up your editor for use with KDVI, " - "and a list of common problems.
").arg(command); + "and a list of common problems.
").tqarg(command); info->clear(i18n("Starting the editor...")); @@ -804,33 +804,33 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum } -TQString dviRenderer::PDFencodingToQString(const TQString& _pdfstring) +TQString dviRenderer::PDFencodingToTQString(const TQString& _pdfstring) { // This method locates special PDF characters in a string and // replaces them by UTF8. See Section 3.2.3 of the PDF reference // guide for information. TQString pdfstring = _pdfstring; - pdfstring = pdfstring.replace("\\n", "\n"); - pdfstring = pdfstring.replace("\\r", "\n"); - pdfstring = pdfstring.replace("\\t", "\t"); - pdfstring = pdfstring.replace("\\f", "\f"); - pdfstring = pdfstring.replace("\\(", "("); - pdfstring = pdfstring.replace("\\)", ")"); - pdfstring = pdfstring.replace("\\\\", "\\"); + pdfstring = pdfstring.tqreplace("\\n", "\n"); + pdfstring = pdfstring.tqreplace("\\r", "\n"); + pdfstring = pdfstring.tqreplace("\\t", "\t"); + pdfstring = pdfstring.tqreplace("\\f", "\f"); + pdfstring = pdfstring.tqreplace("\\(", "("); + pdfstring = pdfstring.tqreplace("\\)", ")"); + pdfstring = pdfstring.tqreplace("\\\\", "\\"); // Now replace octal character codes with the characters they encode int pos; TQRegExp rx( "(\\\\)(\\d\\d\\d)" ); // matches "\xyz" where x,y,z are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d\\d)" ); // matches "\xy" where x,y are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.replace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.tqreplace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d)" ); // matches "\x" where x is a number while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } return pdfstring; } diff --git a/kdvi/dviRenderer.h b/kdvi/dviRenderer.h index 863a2786..6d71b1ed 100644 --- a/kdvi/dviRenderer.h +++ b/kdvi/dviRenderer.h @@ -41,13 +41,13 @@ extern const int MFResolutions[]; class DVI_SourceFileAnchor { public: DVI_SourceFileAnchor() {} - DVI_SourceFileAnchor(const TQString& name, Q_UINT32 ln, Q_UINT32 pg, const Length& _distance_from_top) + DVI_SourceFileAnchor(const TQString& name, TQ_UINT32 ln, TQ_UINT32 pg, const Length& _distance_from_top) : fileName(name), line(ln), page(pg), distance_from_top(_distance_from_top) {} TQString fileName; - Q_UINT32 line; - Q_UINT32 page; + TQ_UINT32 line; + TQ_UINT32 page; Length distance_from_top; }; @@ -69,7 +69,7 @@ struct framedata { /* this information is saved when using virtual fonts */ typedef void (dviRenderer::*set_char_proc)(unsigned int, unsigned int); -typedef void (dviRenderer::*parseSpecials)(char *, Q_UINT8 *); +typedef void (dviRenderer::*parseSpecials)(char *, TQ_UINT8 *); struct drawinf { struct framedata data; @@ -85,9 +85,10 @@ struct drawinf { class dviRenderer : public DocumentRenderer, bigEndianByteReader { Q_OBJECT + TQ_OBJECT public: - dviRenderer(TQWidget *parent); + dviRenderer(TQWidget *tqparent); ~dviRenderer(); virtual bool setFile(const TQString &fname, const KURL &base); @@ -127,7 +128,7 @@ public: void draw_page(); public slots: - void exportPS(const TQString& fname = TQString::null, const TQString& options = TQString::null, KPrinter* printer = 0); + void exportPS(const TQString& fname = TQString(), const TQString& options = TQString(), KPrinter* printer = 0); void exportPDF(); void showInfo(); @@ -136,7 +137,7 @@ public slots: void embedPostScript(); void abortExternalProgramm(); - /** simply emits "setStatusBarText( TQString::null )". This is used + /** simply emits "setStatusBarText( TQString() )". This is used in dviRenderer::mouseMoveEvent(), see the explanation there. */ void clearStatusBar(); @@ -179,7 +180,7 @@ private: /* This method locates special PDF characters in a string and replaces them by UTF8. See Section 3.2.3 of the PDF reference guide for information */ - TQString PDFencodingToQString(const TQString& pdfstring); + TQString PDFencodingToTQString(const TQString& pdfstring); void setResolution(double resolution_in_DPI); @@ -190,9 +191,9 @@ private: // @@@ explanation void prescan(parseSpecials specialParser); - void prescan_embedPS(char *cp, Q_UINT8 *); - void prescan_removePageSizeInfo(char *cp, Q_UINT8 *); - void prescan_parseSpecials(char *cp, Q_UINT8 *); + void prescan_embedPS(char *cp, TQ_UINT8 *); + void prescan_removePageSizeInfo(char *cp, TQ_UINT8 *); + void prescan_parseSpecials(char *cp, TQ_UINT8 *); void prescan_ParsePapersizeSpecial(const TQString& cp); void prescan_ParseBackgroundSpecial(const TQString& cp); void prescan_ParseHTMLAnchorSpecial(const TQString& cp); @@ -211,7 +212,7 @@ private: /** Utility fields used by the embedPostScript method*/ KProgressDialog *embedPS_progress; - Q_UINT16 embedPS_numOfProgressedFiles; + TQ_UINT16 embedPS_numOfProgressedFiles; /** Shrink factor. Units are not quite clear */ double shrinkfactor; @@ -291,7 +292,7 @@ private: /** Data required for handling TPIC specials */ float penWidth_in_mInch; TQPointArray TPIC_path; - Q_UINT16 number_of_elements_in_path; + TQ_UINT16 number_of_elements_in_path; struct drawinf currinf; RenderedDocumentPage* currentlyDrawnPage; diff --git a/kdvi/dviRenderer_draw.cpp b/kdvi/dviRenderer_draw.cpp index 6983c372..af79b09a 100644 --- a/kdvi/dviRenderer_draw.cpp +++ b/kdvi/dviRenderer_draw.cpp @@ -235,8 +235,8 @@ void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch) currinf.fonttable = &(currinf.fontp->vf_table); currinf._virtual = currinf.fontp; - Q_UINT8 *command_ptr_sav = command_pointer; - Q_UINT8 *end_ptr_sav = end_pointer; + TQ_UINT8 *command_ptr_sav = command_pointer; + TQ_UINT8 *end_ptr_sav = end_pointer; command_pointer = m->pos; end_pointer = m->end; draw_part(currinf.fontp->scaled_size_in_DVI_units*(dviFile->getCmPerDVIunit() * 1200.0 / 2.54)/16.0, true); @@ -278,8 +278,8 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) kdDebug(4300) << "draw_part" << endl; #endif - Q_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; - Q_UINT8 ch; + TQ_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; + TQ_UINT8 ch; currinf.fontp = NULL; currinf.set_char_p = &dviRenderer::set_no_char; @@ -290,14 +290,14 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) (this->*currinf.set_char_p)(ch, ch); } else if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); if (currinf.fontp == NULL) { - errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0); + errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; } currinf.set_char_p = currinf.fontp->set_char_p; } else { - Q_INT32 a, b; + TQ_INT32 a, b; switch (ch) { case SET1: @@ -453,7 +453,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case DOWN3: case DOWN4: { - Q_INT32 DDtmp = readINT(ch - DOWN1 + 1); + TQ_INT32 DDtmp = readINT(ch - DOWN1 + 1); if ((is_vfmacro == false) && (currinf.fontp != 0) && (abs(DDtmp) >= 5*(currinf.fontp->scaled_size_in_DVI_units/6)) && @@ -511,7 +511,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case FNT1: case FNT2: case FNT3: - currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; @@ -520,7 +520,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) break; case FNT4: - currinf.fontp = currinf.fonttable->find(readINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->tqfind(readINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; @@ -553,8 +553,8 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case FNTDEF4: command_pointer += 12 + ch - FNTDEF1 + 1; { - Q_UINT8 tempa = readUINT8(); - Q_UINT8 tempb = readUINT8(); + TQ_UINT8 tempa = readUINT8(); + TQ_UINT8 tempb = readUINT8(); command_pointer += tempa + tempb; } break; @@ -567,7 +567,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) break; default: - errorMsg = i18n("The unknown op-code %1 was encountered.").arg(ch); + errorMsg = i18n("The unknown op-code %1 was encountered.").tqarg(ch); return; } /* end switch*/ } /* end else (ch not a SETCHAR or FNTNUM) */ diff --git a/kdvi/dviRenderer_export.cpp b/kdvi/dviRenderer_export.cpp index 7b875b45..2e862803 100644 --- a/kdvi/dviRenderer_export.cpp +++ b/kdvi/dviRenderer_export.cpp @@ -61,8 +61,8 @@ void dviRenderer::exportPDF() // has been called meanwhile. See also the exportPS method. if (proc != 0) { // Make sure all further output of the programm is ignored - qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); - qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); proc = 0; } @@ -94,33 +94,33 @@ void dviRenderer::exportPDF() // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.find(".")) + ".pdf"; + suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".pdf"; - TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), parentWidget, i18n("Export File As")); + TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), tqparentWidget, i18n("Export File As")); if (fileName.isEmpty()) return; TQFileInfo finfo(fileName); if (finfo.exists()) { - int r = KMessageBox::warningContinueCancel (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName), + int r = KMessageBox::warningContinueCancel (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("Overwrite File"), i18n("Overwrite")); if (r == KMessageBox::Cancel) return; } // Initialize the progress dialog - progress = new fontProgressDialog( TQString::null, + progress = new fontProgressDialog( TQString(), i18n("Using dvipdfm to export the file to PDF"), - TQString::null, + TQString(), i18n("KDVI is currently using the external program 'dvipdfm' to " "convert your DVI-file to PDF. Sometimes that can take " "a while because dvipdfm needs to generate its own bitmap fonts " "Please be patient."), i18n("Waiting for dvipdfm to finish..."), - parentWidget, i18n("dvipdfm progress dialog"), false ); + tqparentWidget, i18n("dvipdfm progress dialog"), false ); if (progress != 0) { progress->TextLabel2->setText( i18n("Please be patient") ); progress->setTotalSteps( dviFile->total_pages ); - qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); + tqApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); } proc = new KShellProcess(); @@ -128,21 +128,21 @@ void dviRenderer::exportPDF() kdError(4300) << "Could not allocate ShellProcess for the dvipdfm command." << endl; return; } - qApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 ); + tqApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 ); - qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); + tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); export_errorString = i18n("The external program 'dvipdf', which was used to export the file, reported an error. " "You might wish to look at the document info dialog which you will " "find in the File-Menu for a precise error report.") ; - info->clear(i18n("Export: %1 to PDF").arg(KShellProcess::quote(dviFile->filename))); + info->clear(i18n("Export: %1 to PDF").tqarg(KShellProcess::quote(dviFile->filename))); proc->clearArguments(); finfo.setFile(dviFile->filename); - *proc << TQString("cd %1; dvipdfm").arg(KShellProcess::quote(finfo.dirPath(true))); - *proc << TQString("-o %1").arg(KShellProcess::quote(fileName)); + *proc << TQString("cd %1; dvipdfm").tqarg(KShellProcess::quote(finfo.dirPath(true))); + *proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName)); *proc << KShellProcess::quote(dviFile->filename); proc->closeStdin(); if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { @@ -167,8 +167,8 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin // enough to ignore the exit status of the editor if another command // has been called meanwhile. See also the exportPDF method. if (proc != 0) { - qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); - qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); proc = 0; } @@ -177,7 +177,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin return; if (dviFile->numberOfExternalNONPSFiles != 0) { - KMessageBox::sorry( parentWidget, + KMessageBox::sorry( tqparentWidget, i18n("

This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the " "dvips program that KDVI uses interally to print or to export to PostScript. The functionality that " "you require is therefore unavailable in this version of KDVI.

" @@ -193,14 +193,14 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin if (fname.isEmpty()) { // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.find(".")) + ".ps"; + suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".ps"; - fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), parentWidget, i18n("Export File As")); + fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), tqparentWidget, i18n("Export File As")); if (fileName.isEmpty()) return; TQFileInfo finfo(fileName); if (finfo.exists()) { - int r = KMessageBox::warningYesNo (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName), + int r = KMessageBox::warningYesNo (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("Overwrite File")); if (r == KMessageBox::No) return; @@ -211,19 +211,19 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin export_printer = printer; // Initialize the progress dialog - progress = new fontProgressDialog( TQString::null, + progress = new fontProgressDialog( TQString(), i18n("Using dvips to export the file to PostScript"), - TQString::null, + TQString(), i18n("KDVI is currently using the external program 'dvips' to " "convert your DVI-file to PostScript. Sometimes that can take " "a while because dvips needs to generate its own bitmap fonts " "Please be patient."), i18n("Waiting for dvips to finish..."), - parentWidget, i18n("dvips progress dialog"), false ); + tqparentWidget, i18n("dvips progress dialog"), false ); if (progress != 0) { progress->TextLabel2->setText( i18n("Please be patient") ); progress->setTotalSteps( dviFile->total_pages ); - qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); + tqApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); } // There is a major problem with dvips, at least 5.86 and lower: the @@ -263,10 +263,10 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin newFile.renumber(); // Remove any page size information from the file - Q_UINT16 currPageSav = current_page; + TQ_UINT16 currPageSav = current_page; dvifile *dvsav = dviFile; dviFile = &newFile; - errorMsg = TQString::null; + errorMsg = TQString(); for(current_page=0; current_page < newFile.total_pages; current_page++) { @@ -294,23 +294,23 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin return; } - qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); + tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); export_errorString = i18n("The external program 'dvips', which was used to export the file, reported an error. " "You might wish to look at the document info dialog which you will " "find in the File-Menu for a precise error report.") ; - info->clear(i18n("Export: %1 to PostScript").arg(KShellProcess::quote(dviFile->filename))); + info->clear(i18n("Export: %1 to PostScript").tqarg(KShellProcess::quote(dviFile->filename))); proc->clearArguments(); TQFileInfo finfo(dviFile->filename); - *proc << TQString("cd %1; dvips").arg(KShellProcess::quote(finfo.dirPath(true))); + *proc << TQString("cd %1; dvips").tqarg(KShellProcess::quote(finfo.dirPath(true))); if (printer == 0) *proc << "-z"; // export Hyperlinks if (options.isEmpty() == false) *proc << options; - *proc << TQString("%1").arg(KShellProcess::quote(sourceFileName)); - *proc << TQString("-o %1").arg(KShellProcess::quote(fileName)); + *proc << TQString("%1").tqarg(KShellProcess::quote(sourceFileName)); + *proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName)); proc->closeStdin(); if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) { kdError(4300) << "dvips failed to start" << endl; @@ -341,7 +341,7 @@ void dviRenderer::dvips_terminated(KProcess *sproc) // export_errorString, does not correspond to sproc. In that case, // we ingore the return status silently. if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0)) - KMessageBox::error( parentWidget, export_errorString ); + KMessageBox::error( tqparentWidget, export_errorString ); if (export_printer != 0) export_printer->printFiles( TQStringList(export_fileName), true ); @@ -359,7 +359,7 @@ void dviRenderer::editorCommand_terminated(KProcess *sproc) // export_errorString, does not correspond to sproc. In that case, // we ingore the return status silently. if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0)) - KMessageBox::error( parentWidget, export_errorString ); + KMessageBox::error( tqparentWidget, export_errorString ); // Let's hope that this is not all too nasty... killing a // KShellProcess from a slot that was called from the KShellProcess diff --git a/kdvi/dviRenderer_prescan.cpp b/kdvi/dviRenderer_prescan.cpp index d0c35bbd..5ed49ebc 100644 --- a/kdvi/dviRenderer_prescan.cpp +++ b/kdvi/dviRenderer_prescan.cpp @@ -40,7 +40,7 @@ extern void parse_special_argument(const TQString& strg, const char* argument_na //#define DEBUG_PRESCAN -void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) +void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) { #ifdef DEBUG_PRESCAN kdDebug(4300) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl; @@ -60,7 +60,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.find(' ')); + EPSfilename.truncate(EPSfilename.tqfind(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -84,8 +84,8 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) TQString originalFName = EPSfilename; - embedPS_progress->setLabel(i18n("Embedding %1").arg(EPSfilename)); - qApp->processEvents(); + embedPS_progress->setLabel(i18n("Embedding %1").tqarg(EPSfilename)); + tqApp->processEvents(); // Now locate the Gfx file on the hard disk... @@ -97,14 +97,14 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) if (!TQFile::exists(EPSfilename)) { // Find the number of the page - Q_UINT32 currentOffset = beginningOfSpecialCommand - dviFile->dvi_Data(); - Q_UINT16 page; + TQ_UINT32 currentOffset = beginningOfSpecialCommand - dviFile->dvi_Data(); + TQ_UINT16 page; for(page=0; page < dviFile->total_pages; page++) if ((dviFile->page_offset[page] <= currentOffset) && (currentOffset <= dviFile->page_offset[page+1])) break; - errorMsg += i18n("Page %1: The PostScript file %2 could not be found.
").arg(page+1).arg(originalFName); + errorMsg += i18n("Page %1: The PostScript file %2 could not be found.
").tqarg(page+1).tqarg(originalFName); embedPS_progress->progressBar()->advance(1); - qApp->processEvents(); + tqApp->processEvents(); return; } @@ -118,7 +118,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.find(' ')); + include_command = include_command.mid(include_command.tqfind(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -128,16 +128,16 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise // Generate the PostScript commands to be included - TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").arg(llx).arg(lly).arg(urx).arg(ury); + TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury); if (rwi != 0) - PS.append( TQString(" %1 @rwi").arg(rwi) ); + PS.append( TQString(" %1 @rwi").tqarg(rwi) ); if (rhi != 0) - PS.append( TQString(" %1 @rhi").arg(rhi) ); + PS.append( TQString(" %1 @rhi").tqarg(rhi) ); if (angle != 0) - PS.append( TQString(" %1 @angle").arg(angle) ); + PS.append( TQString(" %1 @angle").tqarg(angle) ); if (clip != -1) PS.append(" @clip"); PS.append( " @setspecial\n" ); @@ -156,13 +156,13 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) _isModified = true; - Q_UINT32 lengthOfOldSpecial = command_pointer - beginningOfSpecialCommand; - Q_UINT32 lengthOfNewSpecial = PS.length()+5; + TQ_UINT32 lengthOfOldSpecial = command_pointer - beginningOfSpecialCommand; + TQ_UINT32 lengthOfNewSpecial = PS.length()+5; - TQMemArray newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial); + TQMemArray newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial); - Q_UINT8 *commandPtrSav = command_pointer; - Q_UINT8 *endPtrSav = end_pointer; + TQ_UINT8 *commandPtrSav = command_pointer; + TQ_UINT8 *endPtrSav = end_pointer; end_pointer = newDVI.data() + dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial; memcpy(newDVI.data(), dviFile->dvi_Data(), beginningOfSpecialCommand-dviFile->dvi_Data()); command_pointer = newDVI.data()+(beginningOfSpecialCommand-dviFile->dvi_Data()); @@ -176,12 +176,12 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) // Adjust page pointers in the DVI file dviFile->size_of_file = dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial; end_pointer = newDVI.data() + dviFile->size_of_file; - Q_UINT32 currentOffset = beginningOfSpecialCommand-dviFile->dvi_Data(); - for(Q_UINT16 i=0; i < dviFile->total_pages; i++) { + TQ_UINT32 currentOffset = beginningOfSpecialCommand-dviFile->dvi_Data(); + for(TQ_UINT16 i=0; i < dviFile->total_pages; i++) { if (dviFile->page_offset[i] > currentOffset) { dviFile->page_offset[i] = dviFile->page_offset[i] + lengthOfNewSpecial-lengthOfOldSpecial; command_pointer = dviFile->page_offset[i] + newDVI.data() + 4*10 + 1; - Q_UINT32 a = readUINT32(); + TQ_UINT32 a = readUINT32(); if (a > currentOffset) { a = a + lengthOfNewSpecial-lengthOfOldSpecial; command_pointer = dviFile->page_offset[i] + newDVI.data() + 4*10 + 1; @@ -195,7 +195,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) dviFile->page_offset[dviFile->total_pages] = dviFile->beginning_of_postamble; command_pointer = newDVI.data() + dviFile->beginning_of_postamble + 1; - Q_UINT32 a = readUINT32(); + TQ_UINT32 a = readUINT32(); if (a > currentOffset) { a = a + lengthOfNewSpecial - lengthOfOldSpecial; command_pointer = newDVI.data() + dviFile->beginning_of_postamble + 1; @@ -219,12 +219,12 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) dviFile->setNewData(newDVI); embedPS_progress->progressBar()->advance(1); - qApp->processEvents(); + tqApp->processEvents(); return; } -void dviRenderer::prescan_removePageSizeInfo(char *cp, Q_UINT8 *beginningOfSpecialCommand) +void dviRenderer::prescan_removePageSizeInfo(char *cp, TQ_UINT8 *beginningOfSpecialCommand) { #ifdef DEBUG_PRESCAN kdDebug(4300) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl; @@ -234,7 +234,7 @@ void dviRenderer::prescan_removePageSizeInfo(char *cp, Q_UINT8 *beginningOfSpeci if (strncasecmp(cp, "papersize=", 10) != 0) return; - for (Q_UINT8 *ptr=beginningOfSpecialCommand; ptrsuggestedPageSize = new pageSize; dviFile->suggestedPageSize->setPageSize(cp); } else - printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").arg(cp)); + printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").tqarg(cp)); return; } @@ -262,7 +262,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp) { TQColor col = parseColorSpecification(cp.stripWhiteSpace()); if (col.isValid()) - for(Q_UINT16 page=current_page; page < dviFile->total_pages; page++) + for(TQ_UINT16 page=current_page; page < dviFile->total_pages; page++) PS_interface->setBackgroundColor(page, col); return; } @@ -271,7 +271,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp) void dviRenderer::prescan_ParseHTMLAnchorSpecial(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.find('"')); + cp.truncate(cp.tqfind('"')); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[cp] = Anchor(current_page+1, l); @@ -297,7 +297,7 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const TQString& cp) } if (TQFile::exists(_file)) - PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").arg(_file) ); + PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").tqarg(_file) ); } @@ -321,7 +321,7 @@ void dviRenderer::prescan_ParsePSQuoteSpecial(const TQString& cp) double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( " @beginspecial @setspecial \n" ); PostScriptOutPutString->append( cp ); PostScriptOutPutString->append( " @endspecial \n" ); @@ -355,15 +355,15 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) if (cp.startsWith("ps:SDict begin /product where{pop product(Distiller)")) return; // hyperref tries to work around Distiller bug if (cp.startsWith("ps:SDict begin [") && cp.endsWith(" pdfmark end")) { // hyperref definition of link/anchor/bookmark/etc - if (cp.contains("/DEST")) { // The PostScript code defines an anchor + if (cp.tqcontains("/DEST")) { // The PostScript code defines an anchor TQString anchorName = cp.section('(', 1, 1).section(')', 0, 0); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[anchorName] = Anchor(current_page+1, l); } // The PostScript code defines a bookmark - if (cp.contains("/Dest") && cp.contains("/Title")) - prebookmarks.append(PreBookmark(PDFencodingToQString(cp.section('(', 2, 2).section(')', 0, 0)), + if (cp.tqcontains("/Dest") && cp.tqcontains("/Title")) + prebookmarks.append(PreBookmark(PDFencodingToTQString(cp.section('(', 2, 2).section(')', 0, 0)), cp.section('(', 1, 1).section(')', 0, 0), cp.section('-', 1, 1).section(' ', 0, 0).toUInt() )); @@ -374,18 +374,18 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - if (cp.find("ps::[begin]", 0, false) == 0) { - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(11)) ); + if (cp.tqfind("ps::[begin]", 0, false) == 0) { + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(11)) ); } else { - if (cp.find("ps::[end]", 0, false) == 0) { - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(9)) ); + if (cp.tqfind("ps::[end]", 0, false) == 0) { + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(9)) ); } else { - if (cp.find("ps::", 0, false) == 0) { - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(4)) ); + if (cp.tqfind("ps::", 0, false) == 0) { + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(4)) ); } else { - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(3)) ); + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(3)) ); } } } @@ -406,7 +406,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.find(' ')); + EPSfilename.truncate(EPSfilename.tqfind(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -444,7 +444,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.find(' ')); + include_command = include_command.mid(include_command.tqfind(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -454,27 +454,27 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise if (TQFile::exists(EPSfilename)) { double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( "@beginspecial " ); - PostScriptOutPutString->append( TQString(" %1 @llx").arg(llx) ); - PostScriptOutPutString->append( TQString(" %1 @lly").arg(lly) ); - PostScriptOutPutString->append( TQString(" %1 @urx").arg(urx) ); - PostScriptOutPutString->append( TQString(" %1 @ury").arg(ury) ); + PostScriptOutPutString->append( TQString(" %1 @llx").tqarg(llx) ); + PostScriptOutPutString->append( TQString(" %1 @lly").tqarg(lly) ); + PostScriptOutPutString->append( TQString(" %1 @urx").tqarg(urx) ); + PostScriptOutPutString->append( TQString(" %1 @ury").tqarg(ury) ); if (rwi != 0) - PostScriptOutPutString->append( TQString(" %1 @rwi").arg(rwi) ); + PostScriptOutPutString->append( TQString(" %1 @rwi").tqarg(rwi) ); if (rhi != 0) - PostScriptOutPutString->append( TQString(" %1 @rhi").arg(rhi) ); + PostScriptOutPutString->append( TQString(" %1 @rhi").tqarg(rhi) ); if (angle != 0) - PostScriptOutPutString->append( TQString(" %1 @angle").arg(angle) ); + PostScriptOutPutString->append( TQString(" %1 @angle").tqarg(angle) ); if (clip != -1) PostScriptOutPutString->append(" @clip"); PostScriptOutPutString->append( " @setspecial \n" ); - PostScriptOutPutString->append( TQString(" (%1) run\n").arg(EPSfilename) ); + PostScriptOutPutString->append( TQString(" (%1) run\n").tqarg(EPSfilename) ); PostScriptOutPutString->append( "@endspecial \n" ); } @@ -490,11 +490,11 @@ void dviRenderer::prescan_ParseSourceSpecial(const TQString& cp) // "src:123file.tex" to positions in the DVI file // extract the file name and the numeral part from the string - Q_UINT32 j; + TQ_UINT32 j; for(j=0;jfilename); TQString sourceFileName = TQFileInfo(fi1.dir(), cp.mid(j).stripWhiteSpace()).absFilePath(); Length l; @@ -504,7 +504,7 @@ void dviRenderer::prescan_ParseSourceSpecial(const TQString& cp) } -void dviRenderer::prescan_parseSpecials(char *cp, Q_UINT8 *) +void dviRenderer::prescan_parseSpecials(char *cp, TQ_UINT8 *) { TQString special_command(cp); @@ -613,8 +613,8 @@ void dviRenderer::prescan(parseSpecials specialParser) if (resolutionInDPI == 0.0) setResolution(100); - Q_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; - Q_UINT8 ch; + TQ_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; + TQ_UINT8 ch; double fontPixelPerDVIunit = dviFile->getCmPerDVIunit() * 1200.0/2.54; stack.clear(); @@ -631,9 +631,9 @@ void dviRenderer::prescan(parseSpecials specialParser) } if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); if (currinf.fontp == NULL) { - errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0); + errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; } currinf.set_char_p = currinf.fontp->set_char_p; @@ -641,7 +641,7 @@ void dviRenderer::prescan(parseSpecials specialParser) } - Q_INT32 a, b; + TQ_INT32 a, b; switch (ch) { case SET1: @@ -718,7 +718,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case DOWN3: case DOWN4: { - Q_INT32 DDtmp = readINT(ch - DOWN1 + 1); + TQ_INT32 DDtmp = readINT(ch - DOWN1 + 1); currinf.data.dvi_v += ((long) (DDtmp * 65536.0*fontPixelPerDVIunit))/65536; currinf.data.pxl_v = int(currinf.data.dvi_v/shrinkfactor); } @@ -750,7 +750,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case FNT2: case FNT3: case FNT4: - currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) return; currinf.set_char_p = currinf.fontp->set_char_p; @@ -761,7 +761,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case XXX3: case XXX4: { - Q_UINT8 *beginningOfSpecialCommand = command_pointer-1; + TQ_UINT8 *beginningOfSpecialCommand = command_pointer-1; a = readUINT(ch - XXX1 + 1); if (a > 0) { char *cmd = new char[a+1]; diff --git a/kdvi/dviWidget.cpp b/kdvi/dviWidget.cpp index ddcac8e6..321f0f57 100644 --- a/kdvi/dviWidget.cpp +++ b/kdvi/dviWidget.cpp @@ -22,8 +22,8 @@ #include "renderedDviPagePixmap.h" #include "selection.h" -DVIWidget::DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name) - : DocumentWidget(parent, sv, cache, name) +DVIWidget::DVIWidget(TQWidget* tqparent, PageView* sv, DocumentPageCache* cache, const char* name) + : DocumentWidget(tqparent, sv, cache, name) { } @@ -45,7 +45,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) // Check if the mouse is pressed on a source-hyperlink // source hyperlinks can be invoked with the Middle Mousebutton or alternatively // with Control+Left Mousebutton - if ((e->button() == MidButton || (e->button() == LeftButton && (e->state() & ControlButton))) + if ((e->button() == Qt::MidButton || (e->button() == Qt::LeftButton && (e->state() & ControlButton))) && (pageData->sourceHyperLinkList.size() > 0)) { int minIndex = 0; @@ -53,7 +53,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) for(unsigned int i=0; isourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) + if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) { emit(SRCLink(pageData->sourceHyperLinkList[i].linkText, e, this)); e->accept(); @@ -74,7 +74,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) e->accept(); } - // Call implementation from parent + // Call implementation from tqparent DocumentWidget::mousePressEvent(e); } @@ -99,7 +99,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e) // Check if the cursor hovers over a sourceHyperlink. for(unsigned int i=0; isourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) { + if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) { clearStatusBarTimer.stop(); // The macro-package srcltx gives a special like "src:99 test.tex" @@ -112,7 +112,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e) if (cp[i].isDigit() == false) break; - emit setStatusBarText( i18n("line %1 of %2").arg(cp.left(i)).arg(cp.mid(i).simplifyWhiteSpace()) ); + emit setStatusBarText( i18n("line %1 of %2").tqarg(cp.left(i)).tqarg(cp.mid(i).simplifyWhiteSpace()) ); return; } } diff --git a/kdvi/dviWidget.h b/kdvi/dviWidget.h index 5867b39e..864bb526 100644 --- a/kdvi/dviWidget.h +++ b/kdvi/dviWidget.h @@ -23,9 +23,10 @@ class textSelection; class DVIWidget : public DocumentWidget { Q_OBJECT + TQ_OBJECT public: - DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name); + DVIWidget(TQWidget* tqparent, PageView* sv, DocumentPageCache* cache, const char* name); signals: void SRCLink(const TQString&, TQMouseEvent* e, DocumentWidget*); diff --git a/kdvi/dvisourcesplitter.cpp b/kdvi/dvisourcesplitter.cpp index e0d17aa1..baa0269a 100644 --- a/kdvi/dvisourcesplitter.cpp +++ b/kdvi/dvisourcesplitter.cpp @@ -31,7 +31,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const TQString &srclink, const TQ if ( filepart.left(4) == "src:" ) filepart = srclink.mid(4); //split first - Q_UINT32 max = filepart.length(), i = 0; + TQ_UINT32 max = filepart.length(), i = 0; for(i=0; i diff --git a/kdvi/fontEncodingPool.cpp b/kdvi/fontEncodingPool.cpp index 59b38167..4c00256f 100644 --- a/kdvi/fontEncodingPool.cpp +++ b/kdvi/fontEncodingPool.cpp @@ -18,7 +18,7 @@ fontEncodingPool::fontEncodingPool() fontEncoding *fontEncodingPool::findByName(const TQString &name) { - fontEncoding *ptr = dictionary.find( name ); + fontEncoding *ptr = dictionary.tqfind( name ); if (ptr == 0) { ptr = new fontEncoding(name); diff --git a/kdvi/fontMap.cpp b/kdvi/fontMap.cpp index 66d230d7..b285018b 100644 --- a/kdvi/fontMap.cpp +++ b/kdvi/fontMap.cpp @@ -26,7 +26,7 @@ fontMap::fontMap() // has, like kdvi (and unlike dvips), no built-in fonts. // Finding ps2pk.map is not easy. In teTeX < 3.0, the kpsewhich - // program REQUIRES the option "--format=dvips config". In teTeX = + // program RETQUIRES the option "--format=dvips config". In teTeX = // 3.0, the option "--format=map" MUST be used. Since there is no // way to give both options at the same time, there is seemingly no // other way than to try both options one after another. We use the @@ -78,7 +78,7 @@ fontMap::fontMap() encodingName = encodingName.mid(1); double slant = 0.0; - int i = line.find("SlantFont"); + int i = line.tqfind("SlantFont"); if (i >= 0) { bool ok; slant = line.left(i).section(' ', -1, -1 ,TQString::SectionSkipEmpty).toDouble(&ok); @@ -94,11 +94,11 @@ fontMap::fontMap() if (encodingName.endsWith(".enc")) entry.fontEncoding = encodingName; else - entry.fontEncoding = TQString::null; + entry.fontEncoding = TQString(); } file.close(); } else - kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl; + kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").tqarg(map_fileName) << endl; #ifdef DEBUG_FONTMAP kdDebug(4300) << "FontMap file parsed. Results:" << endl; @@ -115,40 +115,40 @@ fontMap::fontMap() const TQString &fontMap::findFileName(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.find(TeXName); + TQMap::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().fontFileName; else - return TQString::null; + return TQString(); } const TQString &fontMap::findFontName(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.find(TeXName); + TQMap::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().fullFontName; else - return TQString::null; + return TQString(); } const TQString &fontMap::findEncoding(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.find(TeXName); + TQMap::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().fontEncoding; else - return TQString::null; + return TQString(); } double fontMap::findSlant(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.find(TeXName); + TQMap::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().slant; diff --git a/kdvi/fontMap.h b/kdvi/fontMap.h index 3e0177a8..6a719ea6 100644 --- a/kdvi/fontMap.h +++ b/kdvi/fontMap.h @@ -13,7 +13,7 @@ #include /** - * This class represents one line of a font map file, and contains + * This class represents one line of a font map file, and tqcontains * three pieces of information about a font: its file name, the full * name of the font, and the encoding. * @@ -55,7 +55,7 @@ class fontMapEntry { * Long time ago, when TeX was only used with MetaFont fonts, the DVI * file would specify a font by giving an 8-character name, such as * 'cmr10'. The DVI previewer would then locate the associated PK font - * file, load it, and retrieve the character shaped. Happy times, they + * file, load it, and retrieve the character tqshaped. Happy times, they * were. * * Today TeX is also used to access Type1 and TrueType fonts, which do @@ -92,17 +92,17 @@ class fontMap { /** find the name of a font file (e.g. 'ubkd8a.pfb') from a TeX font name (e.g. 'rpbkd'). This method return a reference to - TQString::null if the font could not be found. */ + TQString() if the font could not be found. */ const TQString &findFileName(const TQString &TeXName); /** find the name of a font (e.g. 'URWBookmanL-DemiBold') from a TeX font name (e.g. 'rpbkd'). This method return a reference to - TQString::null if the font could not be found. */ + TQString() if the font could not be found. */ const TQString &findFontName(const TQString &TeXName); /** find the name of an encoding file for a font (e.g. '8r') from a TeX font name (e.g. 'rpbkd'). This method return a reference to - TQString::null if the font could not be found. */ + TQString() if the font could not be found. */ const TQString &findEncoding(const TQString &TeXName); /** This method finds the slant of a font. Returns 0.0 if no slant diff --git a/kdvi/fontpool.cpp b/kdvi/fontpool.cpp index fecd2b0b..32b75afd 100644 --- a/kdvi/fontpool.cpp +++ b/kdvi/fontpool.cpp @@ -46,7 +46,7 @@ fontPool::fontPool() i18n( "KDVI is currently generating bitmap fonts..." ), i18n( "Aborts the font generation. Don't do this." ), i18n( "KDVI is currently generating bitmap fonts which are needed to display your document. " - "For this, KDVI uses a number of external programs, such as MetaFont. You can find " + "For this, KDVI uses a number of external programs, such as MetaFont. You can tqfind " "the output of these programs later in the document info dialog." ), i18n( "KDVI is generating fonts. Please wait." ), 0 ) @@ -60,7 +60,7 @@ fontPool::fontPool() displayResolution_in_dpi = 100.0; // A not-too-bad-default useFontHints = true; CMperDVIunit = 0; - extraSearchPath = TQString::null; + extraSearchPath = TQString(); fontList.setAutoDelete(true); @@ -77,30 +77,30 @@ fontPool::fontPool() // pixmaps. Experiments show that --depending of the configuration // of QT at compile and runtime or the availability of the XFt // extension, alpha channels are either supported, or silently - // converted to 1-bit masks. + // converted to 1-bit tqmasks. TQImage start(1, 1, 32); // Generate a 1x1 image, black with alpha=0x10 start.setAlphaBuffer(true); - Q_UINT32 *destScanLine = (Q_UINT32 *)start.scanLine(0); + TQ_UINT32 *destScanLine = (TQ_UINT32 *)start.scanLine(0); *destScanLine = 0x80000000; TQPixmap intermediate(start); TQPixmap dest(1,1); - dest.fill(Qt::white); + dest.fill(TQt::white); TQPainter paint( &dest ); paint.drawPixmap(0, 0, intermediate); paint.end(); start = dest.convertToImage().convertDepth(32); - Q_UINT8 result = *(start.scanLine(0)) & 0xff; + TQ_UINT8 result = *(start.scanLine(0)) & 0xff; if ((result == 0xff) || (result == 0x00)) { #ifdef DEBUG_FONTPOOL kdDebug(4300) << "fontPool::fontPool(): TQPixmap does not support the alpha channel" << endl; #endif - QPixmapSupportsAlpha = false; + TQPixmapSupportsAlpha = false; } else { #ifdef DEBUG_FONTPOOL kdDebug(4300) << "fontPool::fontPool(): TQPixmap supports the alpha channel" << endl; #endif - QPixmapSupportsAlpha = true; + TQPixmapSupportsAlpha = true; } } @@ -137,7 +137,7 @@ void fontPool::setParameters( bool _useFontHints ) } -TeXFontDefinition* fontPool::appendx(const TQString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement) +TeXFontDefinition* fontPool::appendx(const TQString& fontname, TQ_UINT32 checksum, TQ_UINT32 scale, double enlargement) { // Reuse font if possible: check if a font with that name and // natural resolution is already in the fontpool, and use that, if @@ -187,12 +187,12 @@ TQString fontPool::status() text.append(""); text.append( TQString("") - .arg(i18n("TeX Name")) - .arg(i18n("Family")) - .arg(i18n("Zoom")) - .arg(i18n("Type")) - .arg(i18n("Encoding")) - .arg(i18n("Comment")) ); + .tqarg(i18n("TeX Name")) + .tqarg(i18n("Family")) + .tqarg(i18n("Zoom")) + .tqarg(i18n("Type")) + .tqarg(i18n("Encoding")) + .tqarg(i18n("Comment")) ); TeXFontDefinition *fontp = fontList.first(); while ( fontp != 0 ) { @@ -210,12 +210,12 @@ TQString fontPool::status() #ifdef HAVE_FREETYPE tmp << TQString ("") - .arg(fontp->fontname) - .arg(fontp->getFullFontName()) - .arg((int)(fontp->enlargement*100 + 0.5)) - .arg(fontp->getFontTypeName()) - .arg(encoding) - .arg(errMsg); + .tqarg(fontp->fontname) + .tqarg(fontp->getFullFontName()) + .tqarg((int)(fontp->enlargement*100 + 0.5)) + .tqarg(fontp->getFontTypeName()) + .tqarg(encoding) + .tqarg(errMsg); #endif fontp=fontList.next(); @@ -252,7 +252,7 @@ bool fontPool::areFontsLocated() void fontPool::locateFonts() { - kpsewhichOutput = TQString::null; + kpsewhichOutput = TQString(); // First, we try and find those fonts which exist on disk // already. If virtual fonts are found, they will add new fonts to @@ -280,7 +280,7 @@ void fontPool::locateFonts() // present an error message to the user. if (!areFontsLocated()) { markFontsAsLocated(); - TQString details = TQString("

PATH: %1

%2
").arg(getenv("PATH")).arg(kpsewhichOutput); + TQString details = TQString("

PATH: %1

%2
").tqarg(getenv("PATH")).tqarg(kpsewhichOutput); KMessageBox::detailedError( 0, i18n("

KDVI was not able to locate all the font files " "which are necessary to display the current DVI file. " "Your document might be unreadable.

"), @@ -304,7 +304,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo // If PK fonts are generated, the kpsewhich command will re-route // the output of MetaFont into its stderr. Here we make sure this // output is intercepted and parsed. - qApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + tqApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(mf_output_receiver(KProcess *, char *, int))); @@ -323,24 +323,24 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo shellProcessCmdLine += "--no-mktex pk"; // Names of fonts that shall be located - Q_UINT16 numFontsInJob = 0; + TQ_UINT16 numFontsInJob = 0; TeXFontDefinition *fontp = fontList.first(); while ( fontp != 0 ) { if (!fontp->isLocated()) { numFontsInJob++; if (locateTFMonly == true) - shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").arg(fontp->fontname)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").tqarg(fontp->fontname)); else { #ifdef HAVE_FREETYPE if (FreeType_could_be_loaded == true) { const TQString &filename = fontsByTeXName.findFileName(fontp->fontname); if (!filename.isEmpty()) - shellProcessCmdLine += KShellProcess::quote(TQString("%1").arg(filename)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1").tqarg(filename)); } #endif - shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").arg(fontp->fontname)); - shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").arg(fontp->fontname)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").tqarg(fontp->fontname)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").tqarg(fontp->fontname)); } } fontp=fontList.next(); @@ -352,7 +352,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo progress.setTotalSteps(numFontsInJob, &kpsewhichIO); // Now run... kpsewhich. In case of error, kick up a fuss. - MetafontOutput = TQString::null; + MetafontOutput = TQString(); kpsewhichOutput += "

"+shellProcessCmdLine.join(" ")+"

"; kpsewhichIO << shellProcessCmdLine; TQString importanceOfKPSEWHICH = i18n("

KDVI relies on the kpsewhich program to locate font files " @@ -363,7 +363,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo "and your document might by unreadable. If this error is reproducable " "please report the issue to the KDVI developers using the 'Help' menu.

" ); TQApplication::restoreOverrideCursor(); - KMessageBox::error( 0, TQString("%1%2").arg(importanceOfKPSEWHICH).arg(msg), + KMessageBox::error( 0, TQString("%1%2").tqarg(importanceOfKPSEWHICH).tqarg(msg), i18n("Problem locating fonts - KDVI") ); markFontsAsLocated(); return; @@ -374,7 +374,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo // updated. This is important, e.g. for the progress dialog that is // shown when PK fonts are generated by MetaFont. while(kpsewhichIO.wait(1) == false) - qApp->processEvents(); + tqApp->processEvents(); progress.hide(); // Handle fatal errors. @@ -399,9 +399,9 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo "typesetting system. If TeX is not installed on your system, you could install the TeTeX distribution (www.tetex.org). " "If you are sure that TeX is installed, please try to use the kpsewhich program from the command line to check if it " "really works.

"); - TQString details = TQString("

PATH: %1

%2
").arg(getenv("PATH")).arg(kpsewhichOutput); + TQString details = TQString("

PATH: %1

%2
").tqarg(getenv("PATH")).tqarg(kpsewhichOutput); - KMessageBox::detailedError( 0, TQString("%1%2").arg(importanceOfKPSEWHICH).arg(msg), details, + KMessageBox::detailedError( 0, TQString("%1%2").tqarg(importanceOfKPSEWHICH).tqarg(msg), details, i18n("Problem locating fonts - KDVI") ); // This makes sure the we don't try to run kpsewhich again markFontsAsLocated(); @@ -558,36 +558,36 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen) // We'd like to print only full lines of text. int numleft; bool show_prog = false; - while( (numleft = MetafontOutput.find('\n')) != -1) { + while( (numleft = MetafontOutput.tqfind('\n')) != -1) { TQString line = MetafontOutput.left(numleft+1); #ifdef DEBUG_FONTPOOL kdDebug(4300) << "MF OUTPUT RECEIVED: " << line; #endif // Search for a line which marks the beginning of a MetaFont run // and show the progress dialog at the end of this method. - if (line.find("kpathsea:") == 0) + if (line.tqfind("kpathsea:") == 0) show_prog = true; // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and update the display // accordingly. - int startlineindex = line.find("kpathsea:"); + int startlineindex = line.tqfind("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.find("\n",startlineindex); + int endstartline = line.tqfind("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); // The last word in the startline is the name of the font which we // are generating. The second-to-last word is the resolution in // dots per inch. Display this info in the text label below the // progress bar. - int lastblank = startLine.findRev(' '); + int lastblank = startLine.tqfindRev(' '); TQString fontName = startLine.mid(lastblank+1); - int secondblank = startLine.findRev(' ',lastblank-1); + int secondblank = startLine.tqfindRev(' ',lastblank-1); TQString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1); progress.show(); - progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").arg(fontName).arg(dpi) ); + progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").tqarg(fontName).tqarg(dpi) ); } MetafontOutput = MetafontOutput.remove(0,numleft+1); } diff --git a/kdvi/fontpool.h b/kdvi/fontpool.h index 3edcaffe..753f95e1 100644 --- a/kdvi/fontpool.h +++ b/kdvi/fontpool.h @@ -38,6 +38,7 @@ class KShellProcess; class fontPool : public TQObject { Q_OBJECT + TQ_OBJECT public: // Default constructor. @@ -78,7 +79,7 @@ public: // called. Since this is done using a concurrently running process, // there is no guarantee that the loading is already performed when // the method returns. - TeXFontDefinition* appendx(const TQString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement); + TeXFontDefinition* appendx(const TQString& fontname, TQ_UINT32 checksum, TQ_UINT32 scale, double enlargement); // Returns a string in a very basic HTML format which describes the // fonts in the pool. @@ -124,10 +125,10 @@ public: channel of pixmaps. Experiments show that --depending of the configuration of QT at compile and runtime or the availability of the XFt extension, alpha channels are either supported, or - silently converted to 1-bit masks. The redering routines in the + silently converted to 1-bit tqmasks. The redering routines in the TeXFont implementation use this flag to choose the apropriate drawing routines for the different setups. */ - bool QPixmapSupportsAlpha; + bool TQPixmapSupportsAlpha; signals: /** Passed through to the top-level kpart. */ @@ -178,13 +179,13 @@ private: void locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFound=0); // This TQString is used internally by the mf_output_receiver() - // method. This string is set to TQString::null in locateFonts(bool, + // method. This string is set to TQString() in locateFonts(bool, // bool, bool *). Values are set and read by the // mf_output_receiver(...) method TQString MetafontOutput; // This TQString is used to collect the output of kpsewhich and - // MetaFont. The string is set to TQString::null in the + // MetaFont. The string is set to TQString() in the // locateFonts()-method, and content is gathered by the // mf_output_receiver(). This string is used by locateFonts() and // locateFonts(bool, bool, bool *) to display error messages. diff --git a/kdvi/fontprogress.cpp b/kdvi/fontprogress.cpp index e5e34270..19fe63cd 100644 --- a/kdvi/fontprogress.cpp +++ b/kdvi/fontprogress.cpp @@ -22,11 +22,11 @@ #include /* - * Constructs a fontProgressDialog which is a child of 'parent', with the + * Constructs a fontProgressDialog which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' */ -fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, TQWidget* parent, const TQString& name, bool progressbar) - : KDialogBase( parent, "Font Generation Progress Dialog", true, name, Cancel, Cancel, true ) +fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, TQWidget* tqparent, const TQString& name, bool progressbar) + : KDialogBase( tqparent, "Font Generation Progress Dialog", true, name, Cancel, Cancel, true ) { setCursor( TQCursor( 3 ) ); @@ -42,7 +42,7 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString TQVBox *page = makeVBoxMainWidget(); TextLabel1 = new TQLabel( label, page, "TextLabel2" ); - TextLabel1->setAlignment( int( TQLabel::AlignCenter ) ); + TextLabel1->tqsetAlignment( int( TQLabel::AlignCenter ) ); TQWhatsThis::add( TextLabel1, whatsThis ); TQToolTip::add( TextLabel1, ttip ); @@ -55,13 +55,13 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString ProgressBar1 = NULL; TextLabel2 = new TQLabel( "", page, "TextLabel2" ); - TextLabel2->setAlignment( int( TQLabel::AlignCenter ) ); + TextLabel2->tqsetAlignment( int( TQLabel::AlignCenter ) ); TQWhatsThis::add( TextLabel2, whatsThis ); TQToolTip::add( TextLabel2, ttip ); progress = 0; procIO = 0; - qApp->connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(killProcIO())); + tqApp->connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(killProcIO())); } @@ -71,7 +71,7 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString fontProgressDialog::~fontProgressDialog() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } diff --git a/kdvi/fontprogress.h b/kdvi/fontprogress.h index 6f4267cc..6c19520c 100644 --- a/kdvi/fontprogress.h +++ b/kdvi/fontprogress.h @@ -31,10 +31,11 @@ class TQLabel; class fontProgressDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: fontProgressDialog( const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, - TQWidget* parent = 0, const TQString &name = 0, bool progressbar=true ); + TQWidget* tqparent = 0, const TQString &name = 0, bool progressbar=true ); ~fontProgressDialog(); /** The number of steps already done is increased, the text received @@ -43,7 +44,7 @@ public: /** Used to initialize the progress bar. If the argument proc is non-zero, the associated process will be killed when the "abort" - button is pressed. The FontProgress uses a QGuarderPtr + button is pressed. The FontProgress uses a TQGuarderPtr internally, so it is save to delete the KProcIO anytime. */ void setTotalSteps(int, KProcIO *proc=0); diff --git a/kdvi/glyph.h b/kdvi/glyph.h index 65f86327..2265c6df 100644 --- a/kdvi/glyph.h +++ b/kdvi/glyph.h @@ -8,8 +8,8 @@ struct bitmap { - Q_UINT16 w, h; /* width and height in pixels */ - Q_UINT16 bytes_wide; /* scan-line width in bytes */ + TQ_UINT16 w, h; /* width and height in pixels */ + TQ_UINT16 bytes_wide; /* scan-line width in bytes */ char *bits; /* pointer to the bits */ }; @@ -24,7 +24,7 @@ class glyph { TQColor color; // DVI units to move reference point - Q_INT32 dvi_advance_in_units_of_design_size_by_2e20; + TQ_INT32 dvi_advance_in_units_of_design_size_by_2e20; // x and y offset in pixels short x, y; diff --git a/kdvi/infodialog.cpp b/kdvi/infodialog.cpp index 91de53d3..b287a390 100644 --- a/kdvi/infodialog.cpp +++ b/kdvi/infodialog.cpp @@ -21,8 +21,8 @@ #include "fontpool.h" #include "infodialog.h" -infoDialog::infoDialog( TQWidget* parent ) - : KDialogBase( Tabbed, i18n("Document Info"), Ok, Ok, parent, "Document Info", false, false) +infoDialog::infoDialog( TQWidget* tqparent ) + : KDialogBase( Tabbed, i18n("Document Info"), Ok, Ok, tqparent, "Document Info", false, false) { TQFrame *page1 = addPage( i18n("DVI File") ); TQVBoxLayout *topLayout1 = new TQVBoxLayout( page1, 0, 6 ); @@ -51,8 +51,8 @@ infoDialog::infoDialog( TQWidget* parent ) topLayout3->addWidget( TextLabel3 ); MFOutputReceived = false; - headline = TQString::null; - pool = TQString::null; + headline = TQString(); + pool = TQString(); } @@ -64,17 +64,17 @@ void infoDialog::setDVIData(dvifile *dviFile) text = i18n("There is no DVI file loaded at the moment."); else { text.append("
%1 %2 %3 %4 %5 %6
%1 %2 %3% %4 %5 %6
"); - text.append(TQString("").arg(i18n("Filename")).arg(dviFile->filename)); + text.append(TQString("").tqarg(i18n("Filename")).tqarg(dviFile->filename)); TQFile file(dviFile->filename); if (file.exists()) - text.append(TQString("").arg(i18n("File Size")).arg(KIO::convertSize(file.size()))); + text.append(TQString("").tqarg(i18n("File Size")).tqarg(KIO::convertSize(file.size()))); else - text.append(TQString("").arg(i18n("The file does no longer exist."))); + text.append(TQString("").tqarg(i18n("The file does no longer exist."))); text.append(TQString("")); - text.append(TQString("").arg(i18n("#Pages")).arg(dviFile->total_pages)); - text.append(TQString("").arg(i18n("Generator/Date")).arg(dviFile->generatorString)); + text.append(TQString("").tqarg(i18n("#Pages")).tqarg(dviFile->total_pages)); + text.append(TQString("").tqarg(i18n("Generator/Date")).tqarg(dviFile->generatorString)); } // else (dviFile == NULL) TextLabel1->setText( text ); @@ -89,17 +89,17 @@ void infoDialog::setFontInfo(fontPool *fp) void infoDialog::outputReceiver(const TQString& _op) { TQString op = _op; - op = op.replace( TQRegExp("<"), "<" ); + op = op.tqreplace( TQRegExp("<"), "<" ); if (MFOutputReceived == false) { TextLabel3->setText(""+headline+"
"); - headline = TQString::null; + headline = TQString(); } // It seems that the TQTextView wants that we append only full lines. // We see to that. pool = pool+op; - int idx = pool.findRev("\n"); + int idx = pool.tqfindRev("\n"); while(idx != -1) { TQString line = pool.left(idx); @@ -108,9 +108,9 @@ void infoDialog::outputReceiver(const TQString& _op) // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and print them in boldface. - int startlineindex = line.find("kpathsea:"); + int startlineindex = line.tqfind("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.find("\n",startlineindex); + int endstartline = line.tqfind("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); if (MFOutputReceived) TextLabel3->append("
\n"+startLine+""); @@ -119,7 +119,7 @@ void infoDialog::outputReceiver(const TQString& _op) TextLabel3->append(line.mid(endstartline)); } else TextLabel3->append(line); - idx = pool.findRev("\n"); + idx = pool.tqfindRev("\n"); } MFOutputReceived = true; @@ -128,7 +128,7 @@ void infoDialog::outputReceiver(const TQString& _op) void infoDialog::clear(const TQString& op) { headline = op; - pool = TQString::null; + pool = TQString(); MFOutputReceived = false; } #include "infodialog.moc" diff --git a/kdvi/infodialog.h b/kdvi/infodialog.h index 8b3ea7d2..d7f37e56 100644 --- a/kdvi/infodialog.h +++ b/kdvi/infodialog.h @@ -20,9 +20,10 @@ class TQWidget; class infoDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - infoDialog( TQWidget* parent = 0 ); + infoDialog( TQWidget* tqparent = 0 ); /** This method is used to set the data coming from the DVI file. Note that 0 is a permissible argument, that just means: diff --git a/kdvi/kdvi_multipage.cpp b/kdvi/kdvi_multipage.cpp index 8a7b1f59..b1995b88 100644 --- a/kdvi/kdvi_multipage.cpp +++ b/kdvi/kdvi_multipage.cpp @@ -49,9 +49,9 @@ K_EXPORT_COMPONENT_FACTORY(kdvipart, KDVIMultiPageFactory) -KDVIMultiPage::KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, +KDVIMultiPage::KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args) - : KMultiPage(parentWidget, widgetName, parent, name), DVIRenderer(parentWidget) + : KMultiPage(tqparentWidget, widgetName, tqparent, name), DVIRenderer(tqparentWidget) { Q_UNUSED(args); #ifdef PERFORMANCE_MEASUREMENT @@ -141,27 +141,27 @@ void KDVIMultiPage::slotSave() // Try to guess the proper ending... TQString formats; TQString ending; - int rindex = m_file.findRev("."); + int rindex = m_file.tqfindRev("."); if (rindex == -1) { - ending = TQString::null; - formats = TQString::null; + ending = TQString(); + formats = TQString(); } else { ending = m_file.mid(rindex); // e.g. ".dvi" formats = fileFormats().grep(ending).join("\n"); } - TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As")); + TQString fileName = KFileDialog::getSaveFileName(TQString(), formats, 0, i18n("Save File As")); if (fileName.isEmpty()) return; // Add the ending to the filename. I hope the user likes it that // way. - if (!ending.isEmpty() && fileName.find(ending) == -1) + if (!ending.isEmpty() && fileName.tqfind(ending) == -1) fileName = fileName+ending; if (TQFile(fileName).exists()) { - int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName), + int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("Overwrite File"), i18n("Overwrite")); if (r == KMessageBox::Cancel) return; @@ -213,7 +213,7 @@ void KDVIMultiPage::addConfigDialogs(KConfigDialog* configDialog) void KDVIMultiPage::preferencesChanged() { - // Call method from parent class + // Call method from tqparent class KMultiPage::preferencesChanged(); #ifdef KDVI_MULTIPAGE_DEBUG kdDebug(4300) << "preferencesChanged" << endl; @@ -239,7 +239,7 @@ void KDVIMultiPage::print() // Show the printer options dialog. Return immediately if the user // aborts. - if (!printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1)) )) + if (!printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) )) return; // This funny method call is necessary for the KPrinter to return @@ -256,7 +256,7 @@ void KDVIMultiPage::print() // Turn the results of the options requestor into a list arguments // which are used by dvips. - TQString dvips_options = TQString::null; + TQString dvips_options = TQString(); // Print in reverse order. if ( printer->pageOrder() == KPrinter::LastPageFirst ) dvips_options += "-r "; @@ -365,7 +365,7 @@ void KDVIMultiPage::print() default: break; } - // Orientation + // Qt::Orientation if ( printer->orientation() == KPrinter::Landscape ) dvips_options += "-t landscape "; @@ -379,7 +379,7 @@ void KDVIMultiPage::print() dvips_options += TQString(","); else commaflag = 1; - dvips_options += TQString("%1").arg(*it); + dvips_options += TQString("%1").tqarg(*it); } // Now print. For that, export the DVI-File to PostScript. Note that diff --git a/kdvi/kdvi_multipage.h b/kdvi/kdvi_multipage.h index c3e60aea..cbc7d125 100644 --- a/kdvi/kdvi_multipage.h +++ b/kdvi/kdvi_multipage.h @@ -12,9 +12,10 @@ class KPrinter; class KDVIMultiPage : public KMultiPage { Q_OBJECT + TQ_OBJECT public: - KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args = TQStringList()); virtual ~KDVIMultiPage(); diff --git a/kdvi/main.cpp b/kdvi/main.cpp index af7bc928..50221ebe 100644 --- a/kdvi/main.cpp +++ b/kdvi/main.cpp @@ -77,14 +77,14 @@ int main(int argc, char** argv) if (!url.isValid()) { - kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl; + kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; return -1; } if (!url.isLocalFile()) { kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " - "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl; + "files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; return -1; } @@ -98,7 +98,7 @@ int main(int argc, char** argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).find("kviewshell") == 0) + if ((*it).tqfind("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kdvi/optionDialogFontsWidget.cpp b/kdvi/optionDialogFontsWidget.cpp index 14a72ee2..60a52c66 100644 --- a/kdvi/optionDialogFontsWidget.cpp +++ b/kdvi/optionDialogFontsWidget.cpp @@ -21,10 +21,10 @@ #include "optionDialogFontsWidget.h" -// Constructs a optionDialogWidget_base which is a child of 'parent', with +// Constructs a optionDialogWidget_base which is a child of 'tqparent', with // the name 'name' and widget flags set to 'f'. -optionDialogFontsWidget::optionDialogFontsWidget( TQWidget* parent, const char* name, WFlags fl ) - : optionDialogFontsWidget_base( parent, name, fl ) +optionDialogFontsWidget::optionDialogFontsWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : optionDialogFontsWidget_base( tqparent, name, fl ) { #ifndef HAVE_FREETYPE kcfg_UseType1Fonts->setChecked(false); diff --git a/kdvi/optionDialogFontsWidget.h b/kdvi/optionDialogFontsWidget.h index f7ad740f..ce8c85f3 100644 --- a/kdvi/optionDialogFontsWidget.h +++ b/kdvi/optionDialogFontsWidget.h @@ -15,9 +15,10 @@ class optionDialogFontsWidget : public optionDialogFontsWidget_base { Q_OBJECT + TQ_OBJECT public: - optionDialogFontsWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + optionDialogFontsWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~optionDialogFontsWidget(); }; diff --git a/kdvi/optionDialogFontsWidget_base.ui b/kdvi/optionDialogFontsWidget_base.ui index da4ca601..22f7a119 100644 --- a/kdvi/optionDialogFontsWidget_base.ui +++ b/kdvi/optionDialogFontsWidget_base.ui @@ -1,7 +1,7 @@ optionDialogFontsWidget_base Stefan Kebekus - + optionDialogFontsWidget_base @@ -20,7 +20,7 @@ 0 - + kcfg_UseFontHints @@ -44,7 +44,7 @@ Expanding - + 31 121 @@ -56,9 +56,9 @@ kdialog.h - + buttonGroup1_clicked(int) - - - + + + diff --git a/kdvi/optionDialogSpecialWidget.cpp b/kdvi/optionDialogSpecialWidget.cpp index 1b61e4a5..6c27b019 100644 --- a/kdvi/optionDialogSpecialWidget.cpp +++ b/kdvi/optionDialogSpecialWidget.cpp @@ -23,10 +23,10 @@ #include "prefs.h" -// Constructs a optionDialogWidget_base which is a child of 'parent', with +// Constructs a optionDialogWidget_base which is a child of 'tqparent', with // the name 'name' and widget flags set to 'f'. -optionDialogSpecialWidget::optionDialogSpecialWidget( TQWidget* parent, const char* name, WFlags fl ) - : optionDialogSpecialWidget_base( parent, name, fl ) +optionDialogSpecialWidget::optionDialogSpecialWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : optionDialogSpecialWidget_base( tqparent, name, fl ) { // Set up the list of known and supported editors editorNameString += i18n("User-Defined Editor"); diff --git a/kdvi/optionDialogSpecialWidget.h b/kdvi/optionDialogSpecialWidget.h index 0bdca8dd..42c16c27 100644 --- a/kdvi/optionDialogSpecialWidget.h +++ b/kdvi/optionDialogSpecialWidget.h @@ -15,9 +15,10 @@ class optionDialogSpecialWidget : public optionDialogSpecialWidget_base { Q_OBJECT + TQ_OBJECT public: - optionDialogSpecialWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + optionDialogSpecialWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~optionDialogSpecialWidget(); public slots: diff --git a/kdvi/optionDialogSpecialWidget_base.ui b/kdvi/optionDialogSpecialWidget_base.ui index 7aa36a26..62cb4f6d 100644 --- a/kdvi/optionDialogSpecialWidget_base.ui +++ b/kdvi/optionDialogSpecialWidget_base.ui @@ -1,6 +1,6 @@ optionDialogSpecialWidget_base - + optionDialogSpecialWidget_base @@ -19,7 +19,7 @@ 0 - + kcfg_ShowPS @@ -33,7 +33,7 @@ Some DVI files contain PostScript graphics. If enabled, KDVI will use the Ghostview PostScript interpreter to display these. You probably want to enable this option, unless you have a DVI-file whose PostScript part is broken, or too large for your machine. - + buttonGroup3 @@ -64,7 +64,7 @@ <p>Check the KDVI manual to see how to prepare DVI files which support the inverse search.</p> - + textLabel3 @@ -80,7 +80,7 @@ Description: - + textLabel4 @@ -96,7 +96,7 @@ Shell command: - + editorDescription @@ -138,7 +138,7 @@ If you are using inverse search, KDVI uses this command line to start the editor. The field '%f' is replaced with the filename, and '%l' is replaced with the line number. - + textLabel2 @@ -169,7 +169,7 @@ What is 'inverse search'? - + AlignVCenter|AlignRight @@ -186,7 +186,7 @@ Expanding - + 390 21 @@ -199,7 +199,7 @@ - + kcombobox.h klineedit.h diff --git a/kdvi/prebookmark.h b/kdvi/prebookmark.h index ef637a60..412652b9 100644 --- a/kdvi/prebookmark.h +++ b/kdvi/prebookmark.h @@ -34,8 +34,8 @@ the DVI prescan routines. class PreBookmark { public: - PreBookmark(const TQString& t, const TQString& a, Q_UINT16 n) {title=t; anchorName=a; noOfChildren=n;} - PreBookmark() {title=TQString::null; anchorName=TQString::null; noOfChildren=0;} + PreBookmark(const TQString& t, const TQString& a, TQ_UINT16 n) {title=t; anchorName=a; noOfChildren=n;} + PreBookmark() {title=TQString(); anchorName=TQString(); noOfChildren=0;} // Title of the bookmark TQString title; @@ -44,7 +44,7 @@ class PreBookmark TQString anchorName; // Number of subordinate bookmarks - Q_UINT16 noOfChildren; + TQ_UINT16 noOfChildren; }; #endif diff --git a/kdvi/psgs.cpp b/kdvi/psgs.cpp index 2c745a7c..31f9bfdc 100644 --- a/kdvi/psgs.cpp +++ b/kdvi/psgs.cpp @@ -28,8 +28,8 @@ extern const char psheader[]; pageInfo::pageInfo(const TQString& _PostScriptString) { PostScriptString = new TQString(_PostScriptString); - background = Qt::white; - permanentBackground = Qt::white; + background = TQt::white; + permanentBackground = TQt::white; } @@ -64,14 +64,14 @@ void ghostscript_interface::setPostScript(const PageNumber& page, const TQString kdDebug(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl; #endif - if (pageList.find(page) == 0) { + if (pageList.tqfind(page) == 0) { pageInfo *info = new pageInfo(PostScript); // Check if dict is big enough if (pageList.count() > pageList.size() -2) pageList.resize(pageList.size()*2); pageList.insert(page, info); } else - *(pageList.find(page)->PostScriptString) = PostScript; + *(pageList.tqfind(page)->PostScriptString) = PostScript; } @@ -88,8 +88,8 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC kdDebug(4300) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl; #endif - if (pageList.find(page) == 0) { - pageInfo *info = new pageInfo(TQString::null); + if (pageList.tqfind(page) == 0) { + pageInfo *info = new pageInfo(TQString()); info->background = background_color; if (permanent) info->permanentBackground = background_color; @@ -98,9 +98,9 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC pageList.resize(pageList.size()*2); pageList.insert(page, info); } else { - pageList.find(page)->background = background_color; + pageList.tqfind(page)->background = background_color; if (permanent) - pageList.find(page)->permanentBackground = background_color; + pageList.tqfind(page)->permanentBackground = background_color; } } @@ -109,10 +109,10 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page) #ifdef DEBUG_PSGS kdDebug(4300) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl; #endif - if (pageList.find(page) == 0) + if (pageList.tqfind(page) == 0) return; - pageInfo *info = pageList.find(page); + pageInfo *info = pageList.tqfind(page); info->background = info->permanentBackground; } @@ -124,10 +124,10 @@ TQColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const kdDebug(4300) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl; #endif - if (pageList.find(page) == 0) - return Qt::white; + if (pageList.tqfind(page) == 0) + return TQt::white; else - return pageList.find(page)->background; + return pageList.tqfind(page)->background; } @@ -151,11 +151,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co emit(setStatusBarText(i18n("Generating PostScript graphics..."))); - pageInfo *info = pageList.find(page); + pageInfo *info = pageList.tqfind(page); // Generate a PNG-file // Step 1: Write the PostScriptString to a File - KTempFile PSfile(TQString::null,".ps"); + KTempFile PSfile(TQString(),".ps"); TQTextStream& os = *PSfile.textStream(); os << "%!PS-Adobe-2.0\n" @@ -165,18 +165,18 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co << "%%PageOrder: Ascend\n" // HSize and VSize in 1/72 inch << "%%BoundingBox: 0 0 " - << (Q_INT32)(72*(pixel_page_w/resolution)) << ' ' - << (Q_INT32)(72*(pixel_page_h/resolution)) << '\n' + << (TQ_INT32)(72*(pixel_page_w/resolution)) << ' ' + << (TQ_INT32)(72*(pixel_page_h/resolution)) << '\n' << "%%EndComments\n" << "%!\n" << psheader << "TeXDict begin " // HSize in (1/(65781.76*72))inch - << (Q_INT32)(72*65781*(pixel_page_w/resolution)) << ' ' + << (TQ_INT32)(72*65781*(pixel_page_w/resolution)) << ' ' // VSize in (1/(65781.76*72))inch - << (Q_INT32)(72*65781*(pixel_page_h/resolution)) << ' ' + << (TQ_INT32)(72*65781*(pixel_page_h/resolution)) << ' ' // Magnification - << (Q_INT32)(magnification) + << (TQ_INT32)(magnification) // dpi and vdpi << " 300 300" // Name @@ -189,7 +189,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co if (PostScriptHeaderString->latin1() != NULL) os << PostScriptHeaderString->latin1(); - if (info->background != Qt::white) { + if (info->background != TQt::white) { TQString colorCommand = TQString("gsave %1 %2 %3 setrgbcolor clippath fill grestore\n"). arg(info->background.red()/255.0). arg(info->background.green()/255.0). @@ -211,11 +211,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co TQStringList argus; argus << "gs"; argus << "-dSAFER" << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNOPAUSE" << "-dBATCH"; - argus << TQString("-sDEVICE=%1").arg(*gsDevice); - argus << TQString("-sOutputFile=%1").arg(filename); - argus << TQString("-sExtraIncludePath=%1").arg(includePath); - argus << TQString("-g%1x%2").arg(pixel_page_w).arg(pixel_page_h); // page size in pixels - argus << TQString("-r%1").arg(resolution); // resolution in dpi + argus << TQString("-sDEVICE=%1").tqarg(*gsDevice); + argus << TQString("-sOutputFile=%1").tqarg(filename); + argus << TQString("-sExtraIncludePath=%1").tqarg(includePath); + argus << TQString("-g%1x%2").tqarg(pixel_page_w).tqarg(pixel_page_h); // page size in pixels + argus << TQString("-r%1").tqarg(resolution); // resolution in dpi argus << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe"; argus << "-f" << PSfile.name(); @@ -239,9 +239,9 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co // ghostscript. If so, try again with another device. TQString GSoutput; while(proc.readln(GSoutput) != -1) { - if (GSoutput.contains("Unknown device")) { + if (GSoutput.tqcontains("Unknown device")) { kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support " - "the '%1' ghostview device driver.").arg(*gsDevice) << endl; + "the '%1' ghostview device driver.").tqarg(*gsDevice) << endl; knownDevices.remove(gsDevice); gsDevice = knownDevices.begin(); if (knownDevices.isEmpty()) @@ -267,14 +267,14 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co "drivers. Note that KDVI needs to be restarted to re-enable PostScript support." "

")); else { - kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice) << endl; + kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").tqarg(*gsDevice) << endl; gs_generate_graphics_file(page, filename, magnification); } return; } } } - emit(setStatusBarText(TQString::null)); + emit(setStatusBarText(TQString())); } @@ -293,7 +293,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma pixel_page_w = paint->viewport().width(); pixel_page_h = paint->viewport().height(); - pageInfo *info = pageList.find(page); + pageInfo *info = pageList.tqfind(page); // No PostScript? Then return immediately. if ((info == 0) || (info->PostScriptString->isEmpty())) { @@ -303,7 +303,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma return; } - KTempFile gfxFile(TQString::null, ".png"); + KTempFile gfxFile(TQString(), ".png"); gfxFile.setAutoDelete(1); gfxFile.close(); // we are want the filename, not the file @@ -317,7 +317,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma TQString ghostscript_interface::locateEPSfile(const TQString &filename, const KURL &base) { - // If the base URL indicates that the DVI file is local, try to find + // If the base URL indicates that the DVI file is local, try to tqfind // the graphics file in the directory where the DVI file resides if (base.isLocalFile()) { TQString path = base.path(); // -> "/bar/foo.dvi" diff --git a/kdvi/psgs.h b/kdvi/psgs.h index c1062f13..01b5aa96 100644 --- a/kdvi/psgs.h +++ b/kdvi/psgs.h @@ -34,6 +34,7 @@ public: class ghostscript_interface : public TQObject { Q_OBJECT + TQ_OBJECT public: ghostscript_interface(); @@ -62,7 +63,7 @@ public: void graphics(const PageNumber& page, double dpi, long magnification, TQPainter* paint); // Returns the background color for a certain page. If no color was - // set, Qt::white is returned. + // set, TQt::white is returned. TQColor getBackgroundColor(const PageNumber& page) const; TQString *PostScriptHeaderString; diff --git a/kdvi/psheader.txt b/kdvi/psheader.txt index f5e543d1..244e4a3b 100644 --- a/kdvi/psheader.txt +++ b/kdvi/psheader.txt @@ -21,7 +21,7 @@ B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ -rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagetqmask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ @@ -45,9 +45,9 @@ index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagetqmask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +imagetqmask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} diff --git a/kdvi/renderedDviPagePixmap.h b/kdvi/renderedDviPagePixmap.h index c618806b..9abff270 100644 --- a/kdvi/renderedDviPagePixmap.h +++ b/kdvi/renderedDviPagePixmap.h @@ -30,6 +30,7 @@ class RenderedDviPagePixmap : public RenderedDocumentPagePixmap { Q_OBJECT + TQ_OBJECT public: RenderedDviPagePixmap(); diff --git a/kdvi/special.cpp b/kdvi/special.cpp index 9f7eeb3d..94a7a5ca 100644 --- a/kdvi/special.cpp +++ b/kdvi/special.cpp @@ -120,7 +120,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) TQString specType = colorSpec.section(' ', 0, 0); - if (specType.find("rgb", false) == 0) { + if (specType.tqfind("rgb", false) == 0) { bool ok; double r = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -138,7 +138,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.find("hsb", false) == 0) { + if (specType.tqfind("hsb", false) == 0) { bool ok; double h = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -156,7 +156,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5), TQColor::Hsv); } - if (specType.find("cmyk", false) == 0) { + if (specType.tqfind("cmyk", false) == 0) { bool ok; double c = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -189,7 +189,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.find("gray", false) == 0) { + if (specType.tqfind("gray", false) == 0) { bool ok; double g = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -200,7 +200,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) } // Check if the color is one of the known named colors. - TQMap::Iterator f = namedColors.find(specType); + TQMap::Iterator f = namedColors.tqfind(specType); if (f != namedColors.end()) return *f; @@ -222,7 +222,7 @@ void dviRenderer::color_special(const TQString& _cp) // Take color off the stack if (colorStack.isEmpty()) printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Color pop command issued when the color stack is empty." ). - arg(dviFile->filename).arg(current_page)); + tqarg(dviFile->filename).tqarg(current_page)); else colorStack.pop(); return; @@ -235,7 +235,7 @@ void dviRenderer::color_special(const TQString& _cp) if (col.isValid()) colorStack.push(col); else - colorStack.push(Qt::black); + colorStack.push(TQt::black); return; } @@ -246,7 +246,7 @@ void dviRenderer::color_special(const TQString& _cp) if (col.isValid()) globalColor = col; else - globalColor = Qt::black; + globalColor = TQt::black; return; } @@ -254,7 +254,7 @@ void dviRenderer::color_special(const TQString& _cp) void dviRenderer::html_href_special(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.find('"')); + cp.truncate(cp.tqfind('"')); #ifdef DEBUG_SPECIAL kdDebug(4300) << "HTML-special, href " << cp.latin1() << endl; @@ -292,10 +292,10 @@ void dviRenderer::source_special(const TQString& cp) void parse_special_argument(const TQString& strg, const char* argument_name, int* variable) { - int index = strg.find(argument_name); + int index = strg.tqfind(argument_name); if (index >= 0) { TQString tmp = strg.mid(index + strlen(argument_name)); - index = tmp.find(' '); + index = tmp.tqfind(' '); if (index >= 0) tmp.truncate(index); @@ -308,7 +308,7 @@ void parse_special_argument(const TQString& strg, const char* argument_name, int // Maybe we should open a dialog here. kdError(4300) << i18n("Malformed parameter in the epsf special command.\n" "Expected a float to follow %1 in %2") - .arg(argument_name).arg(strg) << endl; + .tqarg(argument_name).tqarg(strg) << endl; } } @@ -327,7 +327,7 @@ void dviRenderer::epsf_special(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename_orig = include_command; - EPSfilename_orig.truncate(EPSfilename_orig.find(' ')); + EPSfilename_orig.truncate(EPSfilename_orig.tqfind(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -348,7 +348,7 @@ void dviRenderer::epsf_special(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.find(' ')); + include_command = include_command.mid(include_command.tqfind(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -420,19 +420,19 @@ void dviRenderer::epsf_special(const TQString& cp) foreGroundPainter->save(); if (TQFile::exists(EPSfilename)) - foreGroundPainter->setBrush(Qt::lightGray); + foreGroundPainter->setBrush(TQt::lightGray); else - foreGroundPainter->setBrush(Qt::red); - foreGroundPainter->setPen(Qt::black); + foreGroundPainter->setBrush(TQt::red); + foreGroundPainter->setPen(TQt::black); foreGroundPainter->drawRoundRect(bbox, 2, 2); TQFont f = foreGroundPainter->font(); f.setPointSize(8); foreGroundPainter->setFont(f); if (TQFile::exists(EPSfilename)) - foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename_orig, -1); + foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), EPSfilename_orig, -1); else - foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), - i18n("File not found: \n %1").arg(EPSfilename_orig), -1); + foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), + i18n("File not found: \n %1").tqarg(EPSfilename_orig), -1); foreGroundPainter->restore(); } @@ -451,9 +451,9 @@ void dviRenderer::TPIC_flushPath_special() return; } - TQPen pen(Qt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches + TQPen pen(TQt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches foreGroundPainter->setPen(pen); - foreGroundPainter->drawPolyline(TPIC_path, 0, number_of_elements_in_path); + foreGroundPainter->tqdrawPolyline(TPIC_path, 0, number_of_elements_in_path); number_of_elements_in_path = 0; } @@ -469,12 +469,12 @@ void dviRenderer::TPIC_addPath_special(const TQString& cp) bool ok; float xKoord = cp_noWhiteSpace.section(' ', 0, 0).toFloat(&ok); if (ok == false) { - printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").arg(cp) ); + printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").tqarg(cp) ); return; } float yKoord = cp_noWhiteSpace.section(' ', 1, 1).toFloat(&ok); if (ok == false) { - printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").arg(cp) ); + printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").tqarg(cp) ); return; } @@ -502,7 +502,7 @@ void dviRenderer::TPIC_setPen_special(const TQString& cp) bool ok; penWidth_in_mInch = cp.stripWhiteSpace().toFloat(&ok); if (ok == false) { - printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").arg(cp) ); + printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").tqarg(cp) ); penWidth_in_mInch = 0.0; return; } @@ -650,11 +650,11 @@ void dviRenderer::applicationDoSpecial(char *cp) // line break is encountered) if (special_command.startsWith("ps:SDict begin [") && special_command.endsWith(" pdfmark end")) { if (!currentlyDrawnPage->hyperLinkList.isEmpty()) { - // Parse the PostScript literal text string inside parentheses + // Parse the PostScript literal text string inside tqparentheses // and store it into 'targetName'. The scanner works // according to "PostScript language reference, third edition" // - Sec. 3.2.2. The specification is implemented completely: - // balanced parentheses and all escape sequences are + // balanced tqparentheses and all escape sequences are // considered. TQString tmpTargetName = special_command.section('(', 1); TQString targetName; @@ -670,7 +670,7 @@ void dviRenderer::applicationDoSpecial(char *cp) break; targetName += tmpTargetName[i]; } - targetName = PDFencodingToQString(targetName); + targetName = PDFencodingToTQString(targetName); TQValueVector::iterator it; for( it = currentlyDrawnPage->hyperLinkList.begin(); it != currentlyDrawnPage->hyperLinkList.end(); ++it ) @@ -700,7 +700,7 @@ void dviRenderer::applicationDoSpecial(char *cp) foreGroundPainter->translate(-x,-y); } else printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Could not interpret angle in text rotation special." ). - arg(dviFile->filename).arg(current_page)); + tqarg(dviFile->filename).tqarg(current_page)); } // The graphicx package marks the end of rotated text with this @@ -722,6 +722,6 @@ void dviRenderer::applicationDoSpecial(char *cp) (strncasecmp(cp, "background", 10) == 0) ) return; - printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").arg(special_command)); + printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").tqarg(special_command)); return; } diff --git a/kdvi/vf.cpp b/kdvi/vf.cpp index 679aa9e0..b6da55c0 100644 --- a/kdvi/vf.cpp +++ b/kdvi/vf.cpp @@ -80,7 +80,7 @@ void TeXFontDefinition::read_VF_index() #endif // Read preamble. fseek(VF_file, (long) one(VF_file), 1); /* skip comment */ - Q_UINT32 file_checksum = four(VF_file); + TQ_UINT32 file_checksum = four(VF_file); if (file_checksum && checksum && file_checksum != checksum) kdError(4300) << i18n("Checksum mismatch") << "(dvi = " << checksum << "u, vf = " << file_checksum << @@ -91,11 +91,11 @@ void TeXFontDefinition::read_VF_index() first_font = NULL; while ((cmnd = one(VF_file)) >= FNTDEF1 && cmnd <= FNTDEF4) { int TeXnumber = num(VF_file, (int) cmnd - FNTDEF1 + 1); - Q_UINT32 checksum = four(VF_file); - Q_UINT32 scale = four(VF_file); - Q_UINT32 design = four(VF_file); + TQ_UINT32 checksum = four(VF_file); + TQ_UINT32 scale = four(VF_file); + TQ_UINT32 design = four(VF_file); Q_UNUSED(design); - Q_UINT16 len = one(VF_file) + one(VF_file); /* sequence point in the middle */ + TQ_UINT16 len = one(VF_file) + one(VF_file); /* sequence point in the middle */ char *fontname = new char[len + 1]; fread(fontname, sizeof(char), len, VF_file); fontname[len] = '\0'; @@ -111,8 +111,8 @@ void TeXFontDefinition::read_VF_index() // imposes. One obtains the enlargement by dividing 2^20. double enlargement_factor = double(scale)/(1<<20) * enlargement; - // TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (Q_UINT32)(scaled_size_in_DVI_units*enlargement_factor), enlargement_factor); - TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (Q_UINT32)((double(scale)/(1<<20))*scaled_size_in_DVI_units), enlargement_factor); + // TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (TQ_UINT32)(scaled_size_in_DVI_units*enlargement_factor), enlargement_factor); + TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (TQ_UINT32)((double(scale)/(1<<20))*scaled_size_in_DVI_units), enlargement_factor); // Insert font in dictionary and make sure the dictionary is big // enough. @@ -177,7 +177,7 @@ void TeXFontDefinition::read_VF_index() } } if (cmnd != POST) - oops(i18n("Wrong command byte found in VF macro list: %1").arg(cmnd)); + oops(i18n("Wrong command byte found in VF macro list: %1").tqarg(cmnd)); fclose (VF_file); file = NULL; diff --git a/kfax/faxinput.cpp b/kfax/faxinput.cpp index 47fdfa26..e37e9dd7 100644 --- a/kfax/faxinput.cpp +++ b/kfax/faxinput.cpp @@ -110,7 +110,7 @@ notetiff(const char *name) if ((tf = fopen(name, "r")) == NULL) { - TQString mesg = i18n("Unable to open:\n%1\n").arg(TQFile::decodeName(name)); + TQString mesg = i18n("Unable to open:\n%1\n").tqarg(TQFile::decodeName(name)); kfaxerror(i18n("Sorry"), mesg); return 0; } @@ -147,7 +147,7 @@ notetiff(const char *name) if (fseek(tf, IFDoff, SEEK_SET) < 0) { realbad: - str = i18n("Invalid tiff file:\n%1\n").arg(TQFile::decodeName(name)); + str = i18n("Invalid tiff file:\n%1\n").tqarg(TQFile::decodeName(name)); kfaxerror(i18n("Sorry"),str); bad: if (strips) @@ -215,7 +215,7 @@ notetiff(const char *name) get2(buf, endian) : get4(buf, endian); } break; - case 274: /* Orientation */ + case 274: /* Qt::Orientation */ switch(value) { default: /* row0 at top, col0 at left */ orient = 0; @@ -249,7 +249,7 @@ notetiff(const char *name) case 279: /* StripByteCounts */ if (count != nstrips) { str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n") - .arg(TQFile::decodeName(name)).arg(nstrips).arg(count); + .tqarg(TQFile::decodeName(name)).tqarg(nstrips).tqarg(count); kfaxerror(i18n("Message"),str); goto realbad; } @@ -419,7 +419,7 @@ getstrip(struct pagenode *pn, int strip) pn->length = pn->strips[strip].size; } else { - str = i18n("Trying to expand too many strips\n%1%n").arg(TQFile::decodeName(pn->pathname)); + str = i18n("Trying to expand too many strips\n%1%n").tqarg(TQFile::decodeName(pn->pathname)); kfaxerror(i18n("Warning"),str); return NULL; } @@ -448,7 +448,7 @@ getstrip(struct pagenode *pn, int strip) /* handle ghostscript / PC Research fax file */ if (Data[24] != 1 || Data[25] != 0){ str = i18n("Only the first page of the PC Research multipage file\n%1\nwill be shown\n") - .arg(TQFile::decodeName(pn->pathname)); + .tqarg(TQFile::decodeName(pn->pathname)); kfaxerror(i18n("Message"),str); } pn->length -= 64; @@ -462,7 +462,7 @@ getstrip(struct pagenode *pn, int strip) pn->height = G3count(pn, pn->expander == g32expand); if (pn->height == 0) { - str = i18n("No fax found in file:\n%1\n").arg(TQFile::decodeName(pn->pathname)); + str = i18n("No fax found in file:\n%1\n").tqarg(TQFile::decodeName(pn->pathname)); kfaxerror(i18n("Sorry"),str); errno = 0; badfile(pn); diff --git a/kfax/kfax.cpp b/kfax/kfax.cpp index 8a29f92c..3a3e0b9f 100644 --- a/kfax/kfax.cpp +++ b/kfax/kfax.cpp @@ -208,15 +208,15 @@ TopLevel::TopLevel (TQWidget *, const char *name) qtwin = faxqtwin->winId(); faxqtwin->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); - // Create a Vertical scroll bar + // Create aQt::Vertical scroll bar - vsb = new TQScrollBar( TQScrollBar::Vertical,faxqtwin,"scrollBar" ); + vsb = new TQScrollBar( Qt::Vertical,faxqtwin,"scrollBar" ); vsb->hide(); connect( vsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollVert(int)) ); - // Create a Horizontal scroll bar + // Create aQt::Horizontal scroll bar - hsb = new TQScrollBar( TQScrollBar::Horizontal,faxqtwin,"scrollBar" ); + hsb = new TQScrollBar( Qt::Horizontal,faxqtwin,"scrollBar" ); connect( hsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollHorz(int)) ); hsb->hide(); @@ -235,43 +235,43 @@ TopLevel::~TopLevel() void TopLevel::setupMenuBar() { // File menu - KStdAction::open( this, TQT_SLOT( faxOpen() ), actionCollection() ); - actRecent = KStdAction::openRecent( this, TQT_SLOT( faxOpen( const KURL & ) ), + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( faxOpen() ), actionCollection() ); + actRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( faxOpen( const KURL & ) ), actionCollection() ); - actSave = KStdAction::save( this, TQT_SLOT( faxSave() ), actionCollection() ); - actSaveAs = KStdAction::saveAs( this, TQT_SLOT( faxSaveAs() ), + actSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( faxSave() ), actionCollection() ); + actSaveAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( faxSaveAs() ), actionCollection() ); - actPrint = KStdAction::print( this, TQT_SLOT( print() ), actionCollection() ); - KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); - actAdd = new KAction( i18n( "A&dd..." ), "filenew", KShortcut(), this, + actPrint = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( print() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); + actAdd = new KAction( i18n( "A&dd..." ), "filenew", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( faxAdd() ), actionCollection(), "file_add_fax" ); actRecent->setMaxItems( 5 ); // View Menu - actSize = KStdAction::actualSize( this, TQT_SLOT( actualSize() ), + actSize = KStdAction::actualSize( TQT_TQOBJECT(this), TQT_SLOT( actualSize() ), actionCollection() ); - actZoomIn = KStdAction::zoomIn( this, TQT_SLOT( zoomin() ), actionCollection() ); - actZoomOut = KStdAction::zoomOut( this, TQT_SLOT( zoomout() ), + actZoomIn = KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( zoomin() ), actionCollection() ); + actZoomOut = KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( zoomout() ), actionCollection() ); - actRotate = new KAction( i18n( "&Rotate Page" ), "rotate", KShortcut(), this, + actRotate = new KAction( i18n( "&Rotate Page" ), "rotate", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( rotatePage() ), actionCollection(), "view_rotate" ); - actMirror = new KAction( i18n( "Mirror Page" ), KShortcut(), this, + actMirror = new KAction( i18n( "Mirror Page" ), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( mirrorPage() ), actionCollection(), "view_mirror" ); - actFlip = new KAction( i18n( "&Flip Page" ), KShortcut(), this, + actFlip = new KAction( i18n( "&Flip Page" ), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( flipPage() ), actionCollection(), "view_flip" ); // Go menu - actNext = KStdAction::next( this, TQT_SLOT( nextPage() ), actionCollection() ); - actPrev = KStdAction::prior( this, TQT_SLOT( prevPage() ), actionCollection() ); - actFirst = KStdAction::firstPage( this, TQT_SLOT( firstPage() ), + actNext = KStdAction::next( TQT_TQOBJECT(this), TQT_SLOT( nextPage() ), actionCollection() ); + actPrev = KStdAction::prior( TQT_TQOBJECT(this), TQT_SLOT( prevPage() ), actionCollection() ); + actFirst = KStdAction::firstPage( TQT_TQOBJECT(this), TQT_SLOT( firstPage() ), actionCollection() ); - actLast = KStdAction::lastPage( this, TQT_SLOT( lastPage() ), + actLast = KStdAction::lastPage( TQT_TQOBJECT(this), TQT_SLOT( lastPage() ), actionCollection() ); // Settings menu - KStdAction::preferences( this, TQT_SLOT( faxoptions() ), actionCollection() ); + KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( faxoptions() ), actionCollection() ); } void TopLevel::setupStatusBar() @@ -282,14 +282,14 @@ void TopLevel::setupStatusBar() statusbar->insertFixedItem(i18n("Res: XXXXX"), ID_GENERAL); statusbar->insertFixedItem(i18n("Type: XXXXXXX"), ID_TYPE); statusbar->insertFixedItem(i18n("Page: XX of XX"), ID_PAGE_NO); - statusbar->insertItem(TQString::null, ID_FNAME, 1); + statusbar->insertItem(TQString(), ID_FNAME, 1); statusbar->setItemAlignment( ID_FNAME, AlignLeft ); - statusbar->changeItem(TQString::null, ID_INS_OVR); - statusbar->changeItem(TQString::null, ID_GENERAL); - statusbar->changeItem(TQString::null, ID_TYPE); - statusbar->changeItem(TQString::null, ID_PAGE_NO); - statusbar->changeItem(TQString::null, ID_FNAME); + statusbar->changeItem(TQString(), ID_INS_OVR); + statusbar->changeItem(TQString(), ID_GENERAL); + statusbar->changeItem(TQString(), ID_TYPE); + statusbar->changeItem(TQString(), ID_PAGE_NO); + statusbar->changeItem(TQString(), ID_FNAME); } void TopLevel::readSettings() @@ -378,7 +378,7 @@ void TopLevel::writeSettings() void TopLevel::faxOpen() { - KURL url = KFileDialog::getOpenURL(TQString::null, KFAX_FILETYPES); + KURL url = KFileDialog::getOpenURL(TQString(), KFAX_FILETYPES); faxOpen( url ); @@ -400,7 +400,7 @@ void TopLevel::faxOpen( const KURL & url ) void TopLevel::faxAdd() { - KURL url = KFileDialog::getOpenURL(TQString::null, KFAX_FILETYPES); + KURL url = KFileDialog::getOpenURL(TQString(), KFAX_FILETYPES); faxAdd( url ); @@ -424,7 +424,7 @@ void TopLevel::faxSave() void TopLevel::faxSaveAs() { - fileURL = KFileDialog::getSaveURL(TQString::null, KFAX_FILETYPES); + fileURL = KFileDialog::getSaveURL(TQString(), KFAX_FILETYPES); if (fileURL.isEmpty()) return; @@ -654,13 +654,13 @@ void TopLevel::resizeView() } if(Image){ - hsb->setRange(0,QMAX(0,Image->width - qwindow_width)); + hsb->setRange(0,TQMAX(0,Image->width - qwindow_width)); hsb->setSteps(5,qwindow_width/2); - // printf("hsb range: %d\n",QMAX(0,Image->width - qwindow_width)); - vsb->setRange(0,QMAX(0,Image->height - qwindow_height)); + // printf("hsb range: %d\n",TQMAX(0,Image->width - qwindow_width)); + vsb->setRange(0,TQMAX(0,Image->height - qwindow_height)); vsb->setSteps(5,qwindow_height/2); - // printf("vsb range: %d\n",QMAX(0,Image->height - qwindow_height)); - // printf("vsb QMIN %d vdb QMAX %d\n",vsb->QMINValue(),vsb->QMAXValue()); + // printf("vsb range: %d\n",TQMAX(0,Image->height - qwindow_height)); + // printf("vsb TQMIN %d vdb TQMAX %d\n",vsb->TQMINValue(),vsb->TQMAXValue()); } @@ -701,7 +701,7 @@ void TopLevel::print(){ printer.setFullPage( true ); printer.setUsePrinterResolution( true ); printer.setCreator( i18n("KFax") + " " KFAXVERSION ); - printer.setDocName( TQString("%1 - %2").arg(firstpage->name).arg(i18n("KFax"))); + printer.setDocName( TQString("%1 - %2").tqarg(firstpage->name).tqarg(i18n("KFax"))); printer.setDocFileName( firstpage->name ); printer.setPageSelection( KPrinter::ApplicationSide ); printer.setMinMax( 1, pages ); @@ -735,7 +735,7 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) ++currentpage; // should this page be printed ? - if (printer.pageList().findIndex(currentpage) < 0) + if (printer.pageList().tqfindIndex(currentpage) < 0) continue; XImage *Image = Pimage(pn); @@ -745,11 +745,11 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) // byte-swapping the image TQByteArray bytes( Image->height*Image->bytes_per_line ); for (int y=Image->height-1; y>=0; --y) { - Q_UINT32 offset = y*Image->bytes_per_line; - Q_UINT32 *source = (Q_UINT32 *) (Image->data + offset); - Q_UINT32 *dest = (Q_UINT32 *) (bytes.data() + offset); + TQ_UINT32 offset = y*Image->bytes_per_line; + TQ_UINT32 *source = (TQ_UINT32 *) (Image->data + offset); + TQ_UINT32 *dest = (TQ_UINT32 *) (bytes.data() + offset); for (int x=(Image->bytes_per_line/4)-1; x>=0; --x) { - Q_UINT32 dv = 0, sv = *source; + TQ_UINT32 dv = 0, sv = *source; for (int bit=32; bit>0; --bit) { dv <<= 1; dv |= sv&1; @@ -792,11 +792,11 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) TQSize scaledImageSize = size; if (size.width() > maxSize.width() || size.height() > maxSize.height() ) { // Image does not fit - scale it and print centered - scaledImageSize.scale( maxSize, TQSize::ScaleMin ); + scaledImageSize.tqscale( maxSize, TQSize::ScaleMin ); kdDebug() << "Image does not fit - scaling to " << maxSize << endl; } else { // Image does fit - print it in original size, but centered - scaledImageSize.scale( size, TQSize::ScaleMin ); + scaledImageSize.tqscale( size, TQSize::ScaleMin ); kdDebug() << "Image does fit - scaling to " << size << endl; } kdDebug() << "Final image size " << scaledImageSize << endl; @@ -846,7 +846,7 @@ void TopLevel::openNetFile( const KURL &u) if ( u.isLocalFile() ) { - TQString string = i18n("Loading '%1'").arg(u.path()); + TQString string = i18n("Loading '%1'").tqarg(u.path()); statusbar->message(string); openadd( u.path()); statusbar->clear(); @@ -854,7 +854,7 @@ void TopLevel::openNetFile( const KURL &u) else { statusbar->message(i18n("Downloading...")); - TQString tmpFile = TQString::null; + TQString tmpFile = TQString(); if ( KIO::NetAccess::download( u, tmpFile, this ) ) { openadd( tmpFile ); @@ -1382,7 +1382,7 @@ void TopLevel::faxClose() vsb->hide(); hsb->hide(); - fileURL = TQString::null; + fileURL = TQString(); updateActions(); } @@ -1441,17 +1441,17 @@ void TopLevel::uiUpdate(){ currentpage = pages; } - TQString pagestr = i18n("Page: %1 of %2").arg(currentpage).arg(pages); + TQString pagestr = i18n("Page: %1 of %2").tqarg(currentpage).tqarg(pages); statusbar->changeItem(pagestr, ID_PAGE_NO); if(Image){ - TQString wh = i18n("W: %1 H: %2").arg(Image->width).arg(Image->height); + TQString wh = i18n("W: %1 H: %2").tqarg(Image->width).tqarg(Image->height); statusbar->changeItem(wh, ID_INS_OVR); } - TQString resolution = i18n("Res: %1").arg(thispage->vres?i18n("Fine"):i18n("Normal")); - // TODO: resolution += TQString("%1x%2").arg(thispage->dpiX).arg(thispage->dpiY); + TQString resolution = i18n("Res: %1").tqarg(thispage->vres?i18n("Fine"):i18n("Normal")); + // TODO: resolution += TQString("%1x%2").tqarg(thispage->dpiX).tqarg(thispage->dpiY); statusbar->changeItem(resolution, ID_GENERAL); statusbar->changeItem(thispage->name, ID_FNAME); @@ -1528,16 +1528,16 @@ void TopLevel::putImage() has a sunken frame and I need to offset by 1 pixel to the right and one pixel down so that I don't paint my fax into the border of the frame*/ - XResizeWindow(qtdisplay,Win,QMIN(qwindow_width -1,Image->width ), - QMIN(qwindow_height -1,Image->height )); + XResizeWindow(qtdisplay,Win,TQMIN(qwindow_width -1,Image->width ), + TQMIN(qwindow_height -1,Image->height )); XPutImage(qtdisplay, Win, PaintGC, Image, - QMAX(xpos - qwindow_width/2,0), QMAX(ypos - qwindow_height/2,0), - 0, 0, QMIN(qwindow_width -1,Image->width) , - QMIN(qwindow_height -1,Image->height) ); + TQMAX(xpos - qwindow_width/2,0), TQMAX(ypos - qwindow_height/2,0), + 0, 0, TQMIN(qwindow_width -1,Image->width) , + TQMIN(qwindow_height -1,Image->height) ); - vsb->setValue(QMAX(ypos - qwindow_height/2,0)); - hsb->setValue(QMAX(xpos - qwindow_width/2,0)); + vsb->setValue(TQMAX(ypos - qwindow_height/2,0)); + hsb->setValue(TQMAX(xpos - qwindow_width/2,0)); XFlush(qtdisplay); } diff --git a/kfax/kfax.h b/kfax/kfax.h index 99ad9940..5319a254 100644 --- a/kfax/kfax.h +++ b/kfax/kfax.h @@ -2,7 +2,7 @@ $Id$ - Requires the Qt widget libraries, available at no cost at + Requires the TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1997 Bernd Johannes Wuebben @@ -54,11 +54,12 @@ public: class TopLevel : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - TopLevel( TQWidget *parent=0, const char *name=0 ); + TopLevel( TQWidget *tqparent=0, const char *name=0 ); ~TopLevel(); void openNetFile( const KURL& _url); diff --git a/kfax/kfax_printsettings.cpp b/kfax/kfax_printsettings.cpp index 5382c2e5..3ddae4ab 100644 --- a/kfax/kfax_printsettings.cpp +++ b/kfax/kfax_printsettings.cpp @@ -24,8 +24,8 @@ #include #include -KFAXPrintSettings::KFAXPrintSettings(TQWidget *parent, const char *name) -: KPrintDialogPage(parent, name) +KFAXPrintSettings::KFAXPrintSettings(TQWidget *tqparent, const char *name) +: KPrintDialogPage(tqparent, name) { TQString whatsThisScaleFullPage = i18n( "" "

'Ignore Paper Margins'

" diff --git a/kfax/kfax_printsettings.h b/kfax/kfax_printsettings.h index 3213b7d2..ea37fa0a 100644 --- a/kfax/kfax_printsettings.h +++ b/kfax/kfax_printsettings.h @@ -31,17 +31,18 @@ class TQCheckBox; class KFAXPrintSettings : public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: - KFAXPrintSettings(TQWidget *parent = 0, const char *name = 0); + KFAXPrintSettings(TQWidget *tqparent = 0, const char *name = 0); ~KFAXPrintSettings(); void getOptions(TQMap& opts, bool incldef = false); void setOptions(const TQMap& opts); private: - QCheckBox *m_scaleFullPage; - QCheckBox *m_center_horz; - QCheckBox *m_center_vert; + TQCheckBox *m_scaleFullPage; + TQCheckBox *m_center_horz; + TQCheckBox *m_center_vert; }; #endif diff --git a/kfax/options.cpp b/kfax/options.cpp index b692b28d..f1490989 100644 --- a/kfax/options.cpp +++ b/kfax/options.cpp @@ -1,7 +1,7 @@ /* $Id$ - Requires the Qt widget libraries, available at no cost at + Requires the TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben @@ -48,8 +48,8 @@ #include "kfax.h" #include "options.h" -OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) - : KDialogBase( parent, name, true, i18n("Configure"), Ok|Cancel) +OptionsDialog::OptionsDialog( TQWidget *tqparent, const char *name) + : KDialogBase( tqparent, name, true, i18n("Configure"), Ok|Cancel) { TQWidget *mainWidget = new TQWidget(this); setMainWidget(mainWidget); @@ -60,28 +60,28 @@ OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) bg->setColumnLayout( 0, Qt::Horizontal ); mainLayout->addWidget( bg ); - TQVBoxLayout *vbl = new TQVBoxLayout(bg->layout()); + TQVBoxLayout *vbl = new TQVBoxLayout(bg->tqlayout()); TQHBoxLayout *hbl1 = new TQHBoxLayout(); vbl->addLayout( hbl1 ); displaylabel = new TQLabel(i18n("Display options:"), bg,"displaylabel"); - displaylabel->setFixedSize( displaylabel->sizeHint() ); + displaylabel->setFixedSize( displaylabel->tqsizeHint() ); hbl1->addWidget( displaylabel ); landscape = new TQCheckBox(i18n("Landscape"), bg,"Landscape"); - landscape->setFixedSize( landscape->sizeHint() ); + landscape->setFixedSize( landscape->tqsizeHint() ); hbl1->addSpacing( 10 ); hbl1->addWidget( landscape ); flip = new TQCheckBox(i18n("Upside down"), bg,"upsidedown"); - flip->setFixedSize( flip->sizeHint() ); + flip->setFixedSize( flip->tqsizeHint() ); hbl1->addSpacing( 10 ); hbl1->addWidget( flip ); invert = new TQCheckBox(i18n("Invert"), bg,"invert"); - invert->setFixedSize( invert->sizeHint() ); + invert->setFixedSize( invert->tqsizeHint() ); hbl1->addSpacing( 10 ); hbl1->addWidget( invert ); @@ -139,7 +139,7 @@ OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) rawgroup->setFrameStyle(TQFrame::NoFrame); rawlabel = new TQLabel(i18n("Raw fax format:"),rawgroup,"rawlabel"); - rawlabel->setFixedSize( rawlabel->sizeHint() ); + rawlabel->setFixedSize( rawlabel->tqsizeHint() ); hbl4->addWidget( rawlabel ); g3 = new TQRadioButton("G3",rawgroup,"g3"); diff --git a/kfax/options.h b/kfax/options.h index 693616e4..96c2a500 100644 --- a/kfax/options.h +++ b/kfax/options.h @@ -58,9 +58,10 @@ class KIntNumInput; class OptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - OptionsDialog( TQWidget *parent = 0, const char *name = 0); + OptionsDialog( TQWidget *tqparent = 0, const char *name = 0); struct optionsinfo* getInfo(); void setWidgets(struct optionsinfo *oi); @@ -76,13 +77,13 @@ public slots: private: - QGroupBox *bg; + TQGroupBox *bg; TQLabel *reslabel; TQButtonGroup *resgroup; TQRadioButton *fine; TQRadioButton *resauto; TQRadioButton *normal; - QLabel *displaylabel; + TQLabel *displaylabel; TQButtonGroup *displaygroup; TQCheckBox *landscape; TQCheckBox *geomauto; diff --git a/kfaxview/faxmultipage.cpp b/kfaxview/faxmultipage.cpp index 44c1e273..2362d281 100644 --- a/kfaxview/faxmultipage.cpp +++ b/kfaxview/faxmultipage.cpp @@ -31,9 +31,9 @@ typedef KParts::GenericFactory FaxMultiPageFactory; K_EXPORT_COMPONENT_FACTORY(kfaxviewpart, FaxMultiPageFactory) -FaxMultiPage::FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, +FaxMultiPage::FaxMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList&) - : KMultiPage(parentWidget, widgetName, parent, name), faxRenderer(parentWidget) + : KMultiPage(tqparentWidget, widgetName, tqparent, name), faxRenderer(tqparentWidget) { /* This is kparts wizardry that cannot be understood by man. Simply change the names to match your implementation. */ diff --git a/kfaxview/faxmultipage.h b/kfaxview/faxmultipage.h index 65a7fa25..71e24b72 100644 --- a/kfaxview/faxmultipage.h +++ b/kfaxview/faxmultipage.h @@ -81,6 +81,7 @@ does only the minimal initialization required. class FaxMultiPage : public KMultiPage { Q_OBJECT + TQ_OBJECT public: /** Constructor @@ -89,7 +90,7 @@ public: kmultipage. Please have a look at the constructor's source code to see how to adjust this for your implementation. */ - FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + FaxMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args = TQStringList()); /** Destructor diff --git a/kfaxview/faxrenderer.cpp b/kfaxview/faxrenderer.cpp index 3e597863..ec21ca06 100644 --- a/kfaxview/faxrenderer.cpp +++ b/kfaxview/faxrenderer.cpp @@ -36,7 +36,7 @@ FaxRenderer::FaxRenderer(TQWidget* par) : DocumentRenderer(par) { #ifdef KF_DEBUG - kdError() << "FaxRenderer( parent=" << par << " )" << endl; + kdError() << "FaxRenderer( tqparent=" << par << " )" << endl; #endif } @@ -96,8 +96,8 @@ void FaxRenderer::drawPage(double resolution, RenderedDocumentPage* page) // problems occur if KViewShell required a shrunken version of // the page, e.g. to print multiple pages on one sheet of paper. - int width_in_pixel = qRound(resolution * psize.width().getLength_in_inch()); - int height_in_pixel = qRound(resolution * psize.height().getLength_in_inch()); + int width_in_pixel = tqRound(resolution * psize.width().getLength_in_inch()); + int height_in_pixel = tqRound(resolution * psize.height().getLength_in_inch()); img = img.smoothScale(width_in_pixel, height_in_pixel); foreGroundPaint->drawImage(0, 0, img); @@ -135,8 +135,8 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &) TQFileInfo fi(fname); TQString filename = fi.absFilePath(); if (!fi.exists() || fi.isDir()) { - KMessageBox::error( parentWidget, - i18n("File error. The specified file '%1' does not exist.").arg(filename), + KMessageBox::error( tqparentWidget, + i18n("File error. The specified file '%1' does not exist.").tqarg(filename), i18n("File Error")); // the return value 'false' indicates that this operation was not successful. mutex.unlock(); @@ -156,12 +156,12 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &) // leaving an error message in fax.errorString(). We try to handle // this case gracefully. if (fax.errorString().isEmpty()) - KMessageBox::error( parentWidget, - i18n("File error. The specified file '%1' could not be loaded.").arg(filename), + KMessageBox::error( tqparentWidget, + i18n("File error. The specified file '%1' could not be loaded.").tqarg(filename), i18n("File Error")); else - KMessageBox::detailedError( parentWidget, - i18n("File error. The specified file '%1' could not be loaded.").arg(filename), + KMessageBox::detailedError( tqparentWidget, + i18n("File error. The specified file '%1' could not be loaded.").tqarg(filename), fax.errorString(), i18n("File Error")); clear(); @@ -178,7 +178,7 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &) Length w,h; if (numPages != 0) { - for(Q_UINT16 pg=0; pg < numPages; pg++) { + for(TQ_UINT16 pg=0; pg < numPages; pg++) { TQSize pageSize = fax.page_size(pg); TQPoint dpi = fax.page_dpi(pg); double dpix = dpi.x(); diff --git a/kfaxview/faxrenderer.h b/kfaxview/faxrenderer.h index e83f6ff4..d7022b61 100644 --- a/kfaxview/faxrenderer.h +++ b/kfaxview/faxrenderer.h @@ -39,6 +39,7 @@ implements only the necessary methods setFile() and drawPage(). class FaxRenderer : public DocumentRenderer { Q_OBJECT + TQ_OBJECT public: /** Default constructor @@ -46,7 +47,7 @@ public: This constructor simply prints a message (if debugging is enabled) and calls the default constructor. */ - FaxRenderer(TQWidget* parent); + FaxRenderer(TQWidget* tqparent); /** Destructor diff --git a/kfaxview/libkfaximage/faxexpand.h b/kfaxview/libkfaximage/faxexpand.h index 736779bd..72819e23 100644 --- a/kfaxview/libkfaximage/faxexpand.h +++ b/kfaxview/libkfaximage/faxexpand.h @@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * #include #include -#define t32bits Q_UINT32 -#define t16bits Q_UINT16 +#define t32bits TQ_UINT32 +#define t16bits TQ_UINT16 typedef t16bits pixnum; diff --git a/kfaxview/libkfaximage/kfaximage.cpp b/kfaxview/libkfaximage/kfaximage.cpp index c0efb624..ea0d4943 100644 --- a/kfaxview/libkfaximage/kfaximage.cpp +++ b/kfaxview/libkfaximage/kfaximage.cpp @@ -38,10 +38,10 @@ static const char FAXMAGIC[] = "\000PC Research, Inc\000\000\000\000\000\000"; static const char littleTIFF[] = "\x49\x49\x2a\x00"; static const char bigTIFF[] = "\x4d\x4d\x00\x2a"; -KFaxImage::KFaxImage( const TQString &filename, TQObject *parent, const char *name ) - : TQObject(parent,name) +KFaxImage::KFaxImage( const TQString &filename, TQObject *tqparent, const char *name ) + : TQObject(tqparent,name) { - KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkfaximage") ); + KGlobal::locale()->insertCatalogue( TQString::tqfromLatin1("libkfaximage") ); loadImage(filename); } @@ -53,7 +53,7 @@ bool KFaxImage::loadImage( const TQString &filename ) reset(); m_filename = filename; - m_errorString = TQString::null; + m_errorString = TQString(); if (m_filename.isEmpty()) return false; @@ -126,9 +126,9 @@ pagenode *KFaxImage::AppendImageNode(int type) bool KFaxImage::NewImage(pagenode *pn, int w, int h) { pn->image = TQImage( w, h, 1, 2, TQImage::systemByteOrder() ); - pn->image.setColor(0, qRgb(255,255,255)); - pn->image.setColor(1, qRgb(0,0,0)); - pn->data = (Q_UINT16*) pn->image.bits(); + pn->image.setColor(0, tqRgb(255,255,255)); + pn->image.setColor(1, tqRgb(0,0,0)); + pn->data = (TQ_UINT16*) pn->image.bits(); pn->bytes_per_line = pn->image.bytesPerLine(); pn->dpi = KFAX_DPI_FINE; @@ -293,7 +293,7 @@ KFaxImage::notetiff() get2(buf, endian) : get4(buf, endian); } break; - case 274: /* Orientation */ + case 274: /* Qt::Orientation */ switch(value) { default: /* row0 at top, col0 at left */ orient = 0; @@ -327,7 +327,7 @@ KFaxImage::notetiff() case 279: /* StripByteCounts */ if (count != nstrips) { str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n") - .arg(filename()).arg(nstrips).arg(count); + .tqarg(filename()).tqarg(nstrips).tqarg(count); kfaxerror(str); goto realbad; } @@ -403,7 +403,7 @@ KFaxImage::notetiff() void KFaxImage::badfile(pagenode *pn) { - kfaxerror(i18n("%1: Bad Fax File").arg(filename())); + kfaxerror(i18n("%1: Bad Fax File").tqarg(filename())); FreeImage(pn); } @@ -636,12 +636,12 @@ KFaxImage::GetImage(pagenode *pn) } // byte-swapping the image on little endian machines -#if defined(Q_BYTE_ORDER) && (Q_BYTE_ORDER == Q_LITTLE_ENDIAN) +#if defined(Q_BYTE_ORDER) && (Q_BYTE_ORDER == TQ_LITTLE_ENDIAN) for (int y=pn->image.height()-1; y>=0; --y) { - Q_UINT32 *source = (Q_UINT32 *) pn->image.scanLine(y); - Q_UINT32 *dest = source; + TQ_UINT32 *source = (TQ_UINT32 *) pn->image.scanLine(y); + TQ_UINT32 *dest = source; for (int x=(pn->bytes_per_line/4)-1; x>=0; --x) { - Q_UINT32 dv = 0, sv = *source; + TQ_UINT32 dv = 0, sv = *source; for (int bit=32; bit>0; --bit) { dv <<= 1; dv |= sv&1; diff --git a/kfaxview/libkfaximage/kfaximage.h b/kfaxview/libkfaximage/kfaximage.h index c0d61cb6..52dd7736 100644 --- a/kfaxview/libkfaximage/kfaximage.h +++ b/kfaxview/libkfaximage/kfaximage.h @@ -50,9 +50,10 @@ class pagenode; #define KFAX_DPI_SUPERFINE TQPoint(406,392) -class KDE_EXPORT KFaxImage : public QObject +class KDE_EXPORT KFaxImage : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -63,7 +64,7 @@ public: * @see: numPages */ - KFaxImage( const TQString &filename = TQString::null, TQObject *parent = 0, const char *name = 0 ); + KFaxImage( const TQString &filename = TQString(), TQObject *tqparent = 0, const char *name = 0 ); /** * Destructor diff --git a/kfaxview/main.cpp b/kfaxview/main.cpp index 05692315..cacb24a0 100644 --- a/kfaxview/main.cpp +++ b/kfaxview/main.cpp @@ -97,14 +97,14 @@ int main(int argc, char** argv) if (!url.isValid()) { - kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl; + kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; return -1; } if (!url.isLocalFile()) { kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " - "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl; + "files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; return -1; } @@ -118,7 +118,7 @@ int main(int argc, char** argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).find("kviewshell") == 0) + if ((*it).tqfind("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kfile-plugins/RETURNED_ITEMS b/kfile-plugins/RETURNED_ITEMS index 593d466a..70a3b519 100644 --- a/kfile-plugins/RETURNED_ITEMS +++ b/kfile-plugins/RETURNED_ITEMS @@ -50,7 +50,7 @@ String Camera make String Camera model String Date/time Size Dimensions Width x Height in pixels -int Orientation 1 - "The 0th row is at the visual top of the image, +int Qt::Orientation 1 - "The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side." 2 - "The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side." diff --git a/kfile-plugins/bmp/kfile_bmp.cpp b/kfile-plugins/bmp/kfile_bmp.cpp index 790161a6..a682da7c 100644 --- a/kfile-plugins/bmp/kfile_bmp.cpp +++ b/kfile-plugins/bmp/kfile_bmp.cpp @@ -43,10 +43,10 @@ typedef KGenericFactory BmpFactory; K_EXPORT_COMPONENT_FACTORY(kfile_bmp, BmpFactory( "kfile_bmp" )) -KBmpPlugin::KBmpPlugin(TQObject *parent, const char *name, +KBmpPlugin::KBmpPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-bmp" ); @@ -83,7 +83,7 @@ bool KBmpPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/bmp/kfile_bmp.h b/kfile-plugins/bmp/kfile_bmp.h index f34e3e86..c2c5c007 100644 --- a/kfile-plugins/bmp/kfile_bmp.h +++ b/kfile-plugins/bmp/kfile_bmp.h @@ -27,9 +27,10 @@ class TQStringList; class KBmpPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KBmpPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KBmpPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/configure.in.bot b/kfile-plugins/configure.in.bot index 47308e8b..f03bc711 100644 --- a/kfile-plugins/configure.in.bot +++ b/kfile-plugins/configure.in.bot @@ -7,13 +7,13 @@ if test -z "$LIBTIFF"; then all_tests=bad fi -if test -z "$POPPLER_LIBS"; then - echo "" - echo "You're missing poppler. The additional info plugin for PDF files" - echo "files won't be compiled without poppler >= 0.3.1." - echo "You can download poppler from http://poppler.freedesktop.org/" - echo "" -fi +#if test -z "$POPPLER_LIBS"; then +# echo "" +# echo "You're missing poppler. The additional info plugin for PDF files" +# echo "files won't be compiled without poppler >= 0.3.1." +# echo "You can download poppler from http://poppler.freedesktop.org/" +# echo "" +#fi if test "$EXRSTATUS" = "no"; then echo "" diff --git a/kfile-plugins/dds/kfile_dds.cpp b/kfile-plugins/dds/kfile_dds.cpp index f8c3346e..17321e13 100644 --- a/kfile-plugins/dds/kfile_dds.cpp +++ b/kfile-plugins/dds/kfile_dds.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE project - * Copyright (C) 2002 Ignacio Castaño + * Copyright (C) 2002 Ignacio Casta�o * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public @@ -35,9 +35,9 @@ typedef KGenericFactory DdsFactory; -typedef Q_UINT32 uint; -typedef Q_UINT16 ushort; -typedef Q_UINT8 uchar; +typedef TQ_UINT32 uint; +typedef TQ_UINT16 ushort; +typedef TQ_UINT8 uchar; namespace { // Private. @@ -90,10 +90,10 @@ namespace { // Private. uint flags; uint fourcc; uint bitcount; - uint rmask; - uint gmask; - uint bmask; - uint amask; + uint rtqmask; + uint gtqmask; + uint btqmask; + uint atqmask; }; TQDataStream & operator>> ( TQDataStream & s, DDSPixelFormat & pf ) @@ -102,10 +102,10 @@ namespace { // Private. s >> pf.flags; s >> pf.fourcc; s >> pf.bitcount; - s >> pf.rmask; - s >> pf.gmask; - s >> pf.bmask; - s >> pf.amask; + s >> pf.rtqmask; + s >> pf.gtqmask; + s >> pf.btqmask; + s >> pf.atqmask; return s; } @@ -182,8 +182,8 @@ namespace { // Private. K_EXPORT_COMPONENT_FACTORY(kfile_dds, DdsFactory( "kfile_dds" )) // Constructor, init mime type info. -KDdsPlugin::KDdsPlugin(TQObject *parent, const char *name, const TQStringList &args) : - KFilePlugin(parent, name, args) +KDdsPlugin::KDdsPlugin(TQObject *tqparent, const char *name, const TQStringList &args) : + KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo * info = addMimeTypeInfo( "image/x-dds" ); @@ -216,7 +216,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) TQFile file(info.path()); if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } @@ -227,7 +227,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) uint fourcc; s >> fourcc; if( fourcc != FOURCC_DDS ) { - kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a DDS file." << endl; + kdDebug(7034) << TQFile::encodeName(info.path()).data() << " is not a DDS file." << endl; return false; } @@ -237,7 +237,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) // Check image file format. if( s.atEnd() || !IsValid( header ) ) { - kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a valid DDS file." << endl; + kdDebug(7034) << TQFile::encodeName(info.path()).data() << " is not a valid DDS file." << endl; return false; } diff --git a/kfile-plugins/dds/kfile_dds.h b/kfile-plugins/dds/kfile_dds.h index 63dd156b..19ef6a12 100644 --- a/kfile-plugins/dds/kfile_dds.h +++ b/kfile-plugins/dds/kfile_dds.h @@ -27,9 +27,10 @@ class TQStringList; class KDdsPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KDdsPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KDdsPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/dvi/kfile_dvi.cpp b/kfile-plugins/dvi/kfile_dvi.cpp index e8fb7af7..1d035fa0 100644 --- a/kfile-plugins/dvi/kfile_dvi.cpp +++ b/kfile-plugins/dvi/kfile_dvi.cpp @@ -39,8 +39,8 @@ typedef KGenericFactory DviFactory; K_EXPORT_COMPONENT_FACTORY(kfile_dvi, DviFactory("kfile_dvi")) -KDviPlugin::KDviPlugin (TQObject * parent, const char * name, const TQStringList & preferredItems) - : KFilePlugin(parent, name, preferredItems) +KDviPlugin::KDviPlugin (TQObject * tqparent, const char * name, const TQStringList & preferredItems) + : KFilePlugin(tqparent, name, preferredItems) { kdDebug(7034) << "dvi plugin" << endl; @@ -62,12 +62,12 @@ bool KDviPlugin::readInfo (KFileMetaInfo & info, uint /* what (unused in this pl KFileMetaInfoGroup GeneralGroup = appendGroup(info, "General"); TQFile f(info.path()); TQFileInfo f_info; - Q_UINT16 bytes_to_read; - Q_UINT8 comment_length; + TQ_UINT16 bytes_to_read; + TQ_UINT8 comment_length; TQString comment; - Q_UINT16 pages; - Q_UINT8 buffer[270]; // buffer for reading data; no data is read with more than 270 bytes - Q_UINT32 ptr; + TQ_UINT16 pages; + TQ_UINT8 buffer[270]; // buffer for reading data; no data is read with more than 270 bytes + TQ_UINT32 ptr; int i; // running index // open file and try to get the comment @@ -79,7 +79,7 @@ bool KDviPlugin::readInfo (KFileMetaInfo & info, uint /* what (unused in this pl } f_info.setFile(f); // create fileinfoobject - bytes_to_read = QMIN(f_info.size(), 270); // check, if the file size is smaller than 270 bytes + bytes_to_read = TQMIN(f_info.size(), 270); // check, if the file size is smaller than 270 bytes // (if the comment is as large as possible, we don't have to // read more than 270 bytes) diff --git a/kfile-plugins/dvi/kfile_dvi.h b/kfile-plugins/dvi/kfile_dvi.h index 60326144..aba32132 100644 --- a/kfile-plugins/dvi/kfile_dvi.h +++ b/kfile-plugins/dvi/kfile_dvi.h @@ -28,8 +28,9 @@ class TQStringList; class KDviPlugin : public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KDviPlugin ( TQObject * parent, const char * name, const TQStringList & preferredItems ); + KDviPlugin ( TQObject * tqparent, const char * name, const TQStringList & preferredItems ); virtual bool readInfo (KFileMetaInfo & info, uint what); }; diff --git a/kfile-plugins/exr/kfile_exr.cpp b/kfile-plugins/exr/kfile_exr.cpp index e2ae9a06..18432fc8 100644 --- a/kfile-plugins/exr/kfile_exr.cpp +++ b/kfile-plugins/exr/kfile_exr.cpp @@ -60,9 +60,9 @@ typedef KGenericFactory ExrFactory; K_EXPORT_COMPONENT_FACTORY(kfile_exr, ExrFactory("kfile_exr")) -KExrPlugin::KExrPlugin(TQObject *parent, const char *name, +KExrPlugin::KExrPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { // set up our mime type KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-exr" ); @@ -193,7 +193,7 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) for ( unsigned int y=0; y < preview.height(); y++ ) { for ( unsigned int x=0; x < preview.width(); x++ ) { const PreviewRgba &q = preview.pixels()[x+(y*preview.width())]; - qpreview.setPixel( x, y, qRgba(q.r, q.g, q.b, q.a) ); + qpreview.setPixel( x, y, tqRgba(q.r, q.g, q.b, q.a) ); } } appendItem( infogroup, "Thumbnail", qpreview); @@ -237,10 +237,10 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) #endif TQString UTCOffset; if (utcOffset(h)>0.0) { - UTCOffset.append(TQString("%1").arg(utcOffset(h)/3600, 0, 'f', 1)); + UTCOffset.append(TQString("%1").tqarg(utcOffset(h)/3600, 0, 'f', 1)); UTCOffset.append(" hours behind UTC"); } else { - UTCOffset.append(TQString("%1").arg(-1.0*utcOffset(h)/3600, 0, 'f', 1)); + UTCOffset.append(TQString("%1").tqarg(-1.0*utcOffset(h)/3600, 0, 'f', 1)); UTCOffset.append(" hours ahead of UTC"); } appendItem( stdgroup, "UTC Offset", UTCOffset); @@ -264,10 +264,10 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) if ( hasLongitude(h) ) { TQString Longitude; if (longitude(h)<0.0) { - Longitude.append(TQString("%1").arg(-1.0*longitude(h),0,'f',3)); + Longitude.append(TQString("%1").tqarg(-1.0*longitude(h),0,'f',3)); Longitude.append(" deg West"); } else { - Longitude.append(TQString("%1").arg(longitude(h),0,'f',3)); + Longitude.append(TQString("%1").tqarg(longitude(h),0,'f',3)); Longitude.append(" deg East"); } appendItem( stdgroup, "Longitude", Longitude); @@ -275,17 +275,17 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) if ( hasLatitude(h) ) { TQString Latitude; if (latitude(h)<0.0) { - Latitude.append(TQString("%1").arg(-1.0*latitude(h),0,'f',3)); + Latitude.append(TQString("%1").tqarg(-1.0*latitude(h),0,'f',3)); Latitude.append(" deg South"); } else { - Latitude.append(TQString("%1").arg(latitude(h),0,'f',3)); + Latitude.append(TQString("%1").tqarg(latitude(h),0,'f',3)); Latitude.append(" deg North"); } appendItem( stdgroup, "Latitude", Latitude ); } if ( hasAltitude(h) ) { double Altitude = altitude(h); - appendItem( stdgroup, "Altitude", TQString("%1").arg(Altitude,0,'f',1) ); + appendItem( stdgroup, "Altitude", TQString("%1").tqarg(Altitude,0,'f',1) ); } if ( hasIsoSpeed(h) ) { double IsoSpeed = isoSpeed(h); @@ -344,7 +344,7 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) // This section deals with some special case stuff for a 3D Studio Max // plugin from Splutterfish. The weird construction is an // attempt to to deal with class conversion. C++ string handling - // without Qt is a pain... + // without TQt is a pain... const StringAttribute *ver3DSM = h.findTypedAttribute ("version3dsMax"); if (ver3DSM) { std::string ver3DSMstring = ver3DSM->value(); diff --git a/kfile-plugins/exr/kfile_exr.h b/kfile-plugins/exr/kfile_exr.h index d3718792..ef718b37 100644 --- a/kfile-plugins/exr/kfile_exr.h +++ b/kfile-plugins/exr/kfile_exr.h @@ -29,9 +29,10 @@ class TQStringList; class KExrPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KExrPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KExrPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint ); }; diff --git a/kfile-plugins/gif/gif-info.1 b/kfile-plugins/gif/gif-info.1 index 6c36b1c4..f5397472 100644 --- a/kfile-plugins/gif/gif-info.1 +++ b/kfile-plugins/gif/gif-info.1 @@ -15,7 +15,7 @@ displays information about the given gif (Graphic Interchange Format) image. If .PP Write a empty comment ('') to delete the comment block. .PP -The GIF standard allows any number of 256 byte comment blocks in an image file, but most implementations (including this one) restrict you to just one block. The GIF standard restricts comment blocks to "7 Bit ASCII", but this is widely ignored. You are welcome to store text in your own native language, and are especially encouraged to use comments in utf-8 unicode format. +The GIF standard allows any number of 256 byte comment blocks in an image file, but most implementations (including this one) restrict you to just one block. The GIF standard restricts comment blocks to "7 Bit ASCII", but this is widely ignored. You are welcome to store text in your own native language, and are especially encouraged to use comments in utf-8 tqunicode format. .SH "SEE ALSO" .BR wrjpgcom (1) diff --git a/kfile-plugins/gif/kfile_gif.cpp b/kfile-plugins/gif/kfile_gif.cpp index ce54458b..9c45f257 100644 --- a/kfile-plugins/gif/kfile_gif.cpp +++ b/kfile-plugins/gif/kfile_gif.cpp @@ -42,9 +42,9 @@ typedef KGenericFactory GifFactory; K_EXPORT_COMPONENT_FACTORY(kfile_gif, GifFactory("kfile_gif")) -KGifPlugin::KGifPlugin(TQObject *parent, const char *name, +KGifPlugin::KGifPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "gif KFileMetaInfo plugin\n"; @@ -76,7 +76,7 @@ bool KGifPlugin::readInfo( KFileMetaInfo& info, uint what ) TQFile file(info.path()); if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } @@ -84,9 +84,9 @@ bool KGifPlugin::readInfo( KFileMetaInfo& info, uint what ) bool isGIF87a = false; char magic[7]; - Q_UINT16 width = 0; - Q_UINT16 height = 0; - Q_UINT8 miscInfo = 0; + TQ_UINT16 width = 0; + TQ_UINT16 height = 0; + TQ_UINT8 miscInfo = 0; fstream.readRawBytes( magic, 6 ); magic[6] = 0x00; // null terminate diff --git a/kfile-plugins/gif/kfile_gif.h b/kfile-plugins/gif/kfile_gif.h index f4c0be51..a5d69910 100644 --- a/kfile-plugins/gif/kfile_gif.h +++ b/kfile-plugins/gif/kfile_gif.h @@ -27,9 +27,10 @@ class TQStringList; class KGifPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KGifPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KGifPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo ( KFileMetaInfo& info, uint what ); }; diff --git a/kfile-plugins/ico/kfile_ico.cpp b/kfile-plugins/ico/kfile_ico.cpp index e85935fb..2bc46298 100644 --- a/kfile-plugins/ico/kfile_ico.cpp +++ b/kfile-plugins/ico/kfile_ico.cpp @@ -44,10 +44,10 @@ typedef KGenericFactory IcoFactory; K_EXPORT_COMPONENT_FACTORY(kfile_ico, IcoFactory( "kfile_ico" )) -KIcoPlugin::KIcoPlugin(TQObject *parent, const char *name, +KIcoPlugin::KIcoPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-ico" ); @@ -75,7 +75,7 @@ bool KIcoPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/ico/kfile_ico.h b/kfile-plugins/ico/kfile_ico.h index b354fe22..81ef53af 100644 --- a/kfile-plugins/ico/kfile_ico.h +++ b/kfile-plugins/ico/kfile_ico.h @@ -27,9 +27,10 @@ class TQStringList; class KIcoPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KIcoPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KIcoPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/jpeg/exif.cpp b/kfile-plugins/jpeg/exif.cpp index b6a2f88b..dd93bd7e 100644 --- a/kfile-plugins/jpeg/exif.cpp +++ b/kfile-plugins/jpeg/exif.cpp @@ -116,7 +116,7 @@ static int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8}; #define TAG_WHITEBALANCE 0x9208 #define TAG_METERING_MODE 0x9207 #define TAG_EXPOSURE_PROGRAM 0x8822 -#define TAG_ISO_EQUIVALENT 0x8827 +#define TAG_ISO_ETQUIVALENT 0x8827 #define TAG_COMPRESSION_LEVEL 0x9102 #define TAG_THUMBNAIL_OFFSET 0x0201 @@ -135,7 +135,7 @@ static int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8}; { 0x10F, "Make"}, { 0x110, "Model"}, { 0x111, "StripOffsets"}, - { 0x112, "Orientation"}, + { 0x112, "Qt::Orientation"}, { 0x115, "SamplesPerPixel"}, { 0x116, "RowsPerStrip"}, { 0x117, "StripByteCounts"}, @@ -282,7 +282,7 @@ int ExifData::ReadJpegSections (TQFile & infile, ReadMode_t ReadMode) if (ReadMode & READ_IMAGE){ unsigned long size; - size = kMax( 0ul, infile.size()-infile.at() ); + size = kMax( 0ul, (unsigned long)(infile.size()-infile.at()) ); Data = (uchar *)malloc(size); if (Data == NULL){ throw FatalError("could not allocate data for entire image"); @@ -525,11 +525,11 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa switch(Tag){ case TAG_MAKE: - ExifData::CameraMake = TQString::fromLatin1((const char*)ValuePtr, 31); + ExifData::CameraMake = TQString::tqfromLatin1((const char*)ValuePtr, 31); break; case TAG_MODEL: - ExifData::CameraModel = TQString::fromLatin1((const char*)ValuePtr, 39); + ExifData::CameraModel = TQString::tqfromLatin1((const char*)ValuePtr, 39); break; case TAG_ORIENTATION: @@ -537,7 +537,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa break; case TAG_DATETIME_ORIGINAL: - DateTime = TQString::fromLatin1((const char*)ValuePtr, 19); + DateTime = TQString::tqfromLatin1((const char*)ValuePtr, 19); break; case TAG_USERCOMMENT: @@ -558,12 +558,12 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa int c; c = (ValuePtr)[a]; if (c != '\0' && c != ' '){ - UserComment = TQString::fromLatin1((const char*)(a+ValuePtr), 199); + UserComment = TQString::tqfromLatin1((const char*)(a+ValuePtr), 199); break; } } }else{ - UserComment = TQString::fromLatin1((const char*)ValuePtr, 199); + UserComment = TQString::tqfromLatin1((const char*)ValuePtr, 199); } break; @@ -660,7 +660,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa ExifData::ExposureProgram = (int)ConvertAnyFormat(ValuePtr, Format); break; - case TAG_ISO_EQUIVALENT: + case TAG_ISO_ETQUIVALENT: ExifData::ISOequivalent = (int)ConvertAnyFormat(ValuePtr, Format); if ( ExifData::ISOequivalent < 50 ) ExifData::ISOequivalent *= 200; break; @@ -803,7 +803,7 @@ void ExifData::process_EXIF(unsigned char * CharBuf, unsigned int length) // printf("Exif section in Motorola order\n"); MotorolaOrder = 1; }else{ - throw FatalError("Invalid Exif alignment marker."); + throw FatalError("Invalid Exif tqalignment marker."); } } diff --git a/kfile-plugins/jpeg/kfile_jpeg.cpp b/kfile-plugins/jpeg/kfile_jpeg.cpp index 5c7e8076..86170b8b 100644 --- a/kfile-plugins/jpeg/kfile_jpeg.cpp +++ b/kfile-plugins/jpeg/kfile_jpeg.cpp @@ -44,9 +44,9 @@ typedef KGenericFactory JpegFactory; K_EXPORT_COMPONENT_FACTORY(kfile_jpeg, JpegFactory("kfile_jpeg")) -KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name, +KJpegPlugin::KJpegPlugin(TQObject *tqparent, const char *name, const TQStringList &args ) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "jpeg plugin\n"; @@ -84,7 +84,7 @@ KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name, setHint( item, KFileMimeTypeInfo::Size ); setUnit( item, KFileMimeTypeInfo::Pixels ); - item = addItemInfo( exifGroup, "Orientation", i18n("Orientation"), + item = addItemInfo( exifGroup, "Qt::Orientation", i18n("Qt::Orientation"), TQVariant::Int ); item = addItemInfo( exifGroup, "ColorMode", i18n("Color Mode"), @@ -148,12 +148,12 @@ KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name, } TQValidator* KJpegPlugin::createValidator(const KFileMetaInfoItem& /*item*/, - TQObject */*parent*/, + TQObject */*tqparent*/, const char */*name*/ ) const { // no need to return a validator that validates everything as OK :) // if (item.isEditable()) -// return new TQRegExpValidator(TQRegExp(".*"), parent, name); +// return new TQRegExpValidator(TQRegExp(".*"), tqparent, name); // else return 0L; } @@ -178,7 +178,7 @@ bool KJpegPlugin::writeInfo( const KFileMetaInfo& info ) const */ /* The jpeg standard does not regulate the contents of the COM block. - I'm assuming the best thing to do here is write as unicode utf-8, + I'm assuming the best thing to do here is write as tqunicode utf-8, which is fully backwards compatible with readers expecting ascii. Readers expecting a national character set are out of luck... */ @@ -242,7 +242,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) ImageInfo.getHeight() ) ); if ( ImageInfo.getOrientation() ) - appendItem( exifGroup, "Orientation", ImageInfo.getOrientation() ); + appendItem( exifGroup, "Qt::Orientation", ImageInfo.getOrientation() ); appendItem( exifGroup, "ColorMode", ImageInfo.getIsColor() ? i18n("Color") : i18n("Black and white") ); @@ -286,7 +286,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getFocalLength()){ appendItem( exifGroup, "Focal length", - TQString().sprintf("%4.1f", ImageInfo.getFocalLength()) ); + TQString(TQString().sprintf("%4.1f", ImageInfo.getFocalLength()) )); if (ImageInfo.getCCDWidth()){ appendItem( exifGroup, "35mm equivalent", @@ -296,7 +296,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getCCDWidth()){ appendItem( exifGroup, "CCD width", - TQString().sprintf("%4.2f", ImageInfo.getCCDWidth()) ); + TQString(TQString().sprintf("%4.2f", ImageInfo.getCCDWidth()) )); } if (ImageInfo.getExposureTime()){ @@ -310,8 +310,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getApertureFNumber()){ appendItem( exifGroup, "Aperture", - TQString().sprintf("f/%3.1f", - (double)ImageInfo.getApertureFNumber())); + TQString(TQString().sprintf("f/%3.1f", + (double)ImageInfo.getApertureFNumber()))); } if (ImageInfo.getDistance()){ @@ -325,8 +325,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getExposureBias()){ appendItem( exifGroup, "Exposure bias", - TQString().sprintf("%4.2f", - (double)ImageInfo.getExposureBias()) ); + TQString(TQString().sprintf("%4.2f", + (double)ImageInfo.getExposureBias()) )); } if (ImageInfo.getWhitebalance() != -1){ @@ -443,8 +443,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getISOequivalent()){ appendItem( exifGroup, "ISO equiv.", - TQString().sprintf("%2d", - (int)ImageInfo.getISOequivalent()) ); + TQString(TQString().sprintf("%2d", + (int)ImageInfo.getISOequivalent()) )); } if (ImageInfo.getCompressionLevel()){ diff --git a/kfile-plugins/jpeg/kfile_jpeg.h b/kfile-plugins/jpeg/kfile_jpeg.h index 70c14501..ec6861d8 100644 --- a/kfile-plugins/jpeg/kfile_jpeg.h +++ b/kfile-plugins/jpeg/kfile_jpeg.h @@ -26,15 +26,16 @@ class KJpegPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KJpegPlugin( TQObject *parent, const char *name, + KJpegPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo ( KFileMetaInfo& info, uint what ); virtual bool writeInfo( const KFileMetaInfo& info ) const; virtual TQValidator* createValidator( const KFileMetaInfoItem& item, - TQObject* parent, const char* name) const; + TQObject* tqparent, const char* name) const; private: TQDateTime parseDateTime( const TQString& string ); diff --git a/kfile-plugins/pcx/kfile_pcx.cpp b/kfile-plugins/pcx/kfile_pcx.cpp index 5dceec9d..bd81e3f7 100644 --- a/kfile-plugins/pcx/kfile_pcx.cpp +++ b/kfile-plugins/pcx/kfile_pcx.cpp @@ -56,8 +56,8 @@ TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph ) return s; } -KPcxPlugin::KPcxPlugin( TQObject *parent, const char *name, - const TQStringList &args ) : KFilePlugin( parent, name, args ) +KPcxPlugin::KPcxPlugin( TQObject *tqparent, const char *name, + const TQStringList &args ) : KFilePlugin( tqparent, name, args ) { kdDebug(7034) << "PCX file meta info plugin" << endl; KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-pcx" ); diff --git a/kfile-plugins/pcx/kfile_pcx.h b/kfile-plugins/pcx/kfile_pcx.h index 2d9b772f..f406e79f 100644 --- a/kfile-plugins/pcx/kfile_pcx.h +++ b/kfile-plugins/pcx/kfile_pcx.h @@ -26,16 +26,16 @@ struct PALETTE { struct { - Q_UINT8 r; - Q_UINT8 g; - Q_UINT8 b; + TQ_UINT8 r; + TQ_UINT8 g; + TQ_UINT8 b; } p[ 16 ]; }; struct PCXHEADER { - Q_UINT8 Manufacturer; // Constant Flag, 10 = ZSoft .pcx - Q_UINT8 Version; // Version information· + TQ_UINT8 Manufacturer; // Constant Flag, 10 = ZSoft .pcx + TQ_UINT8 Version; // Version information· // 0 = Version 2.5 of PC Paintbrush· // 2 = Version 2.8 w/palette information· // 3 = Version 2.8 w/o palette information· @@ -45,37 +45,38 @@ struct PCXHEADER // and PC Paintbrush +, includes // Publisher's Paintbrush . Includes // 24-bit .PCX files· - Q_UINT8 Encoding; // 1 = .PCX run length encoding - Q_UINT8 Bpp; // Number of bits to represent a pixel + TQ_UINT8 Encoding; // 1 = .PCX run length encoding + TQ_UINT8 Bpp; // Number of bits to represent a pixel // (per Plane) - 1, 2, 4, or 8· - Q_UINT16 XMin; - Q_UINT16 YMin; - Q_UINT16 XMax; - Q_UINT16 YMax; - Q_UINT16 HDpi; - Q_UINT16 YDpi; + TQ_UINT16 XMin; + TQ_UINT16 YMin; + TQ_UINT16 XMax; + TQ_UINT16 YMax; + TQ_UINT16 HDpi; + TQ_UINT16 YDpi; struct PALETTE Palette; - Q_UINT8 Reserved; // Should be set to 0. - Q_UINT8 NPlanes; // Number of color planes - Q_UINT16 BytesPerLine; // Number of bytes to allocate for a scanline + TQ_UINT8 Reserved; // Should be set to 0. + TQ_UINT8 NPlanes; // Number of color planes + TQ_UINT16 BytesPerLine; // Number of bytes to allocate for a scanline // plane. MUST be an EVEN number. Do NOT // calculate from Xmax-Xmin.· - Q_UINT16 PaletteInfo; // How to interpret palette- 1 = Color/BW, + TQ_UINT16 PaletteInfo; // How to interpret palette- 1 = Color/BW, // 2 = Grayscale ( ignored in PB IV/ IV + )· - Q_UINT16 HScreenSize; // Horizontal screen size in pixels. New field + TQ_UINT16 HScreenSize; //Qt::Horizontal screen size in pixels. New field // found only in PB IV/IV Plus - Q_UINT16 VScreenSize; // Vertical screen size in pixels. New field + TQ_UINT16 VScreenSize; //Qt::Vertical screen size in pixels. New field // found only in PB IV/IV Plus - Q_UINT8 Filler[ 54 ]; // Blank to fill out 128 byte header. Set all + TQ_UINT8 Filler[ 54 ]; // Blank to fill out 128 byte header. Set all // bytes to 0 }; class KPcxPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPcxPlugin(TQObject *parent, const char *name, const TQStringList& args); + KPcxPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); private: diff --git a/kfile-plugins/pdf/Makefile.am b/kfile-plugins/pdf/Makefile.am index c8af5244..65a7742b 100644 --- a/kfile-plugins/pdf/Makefile.am +++ b/kfile-plugins/pdf/Makefile.am @@ -10,6 +10,7 @@ noinst_HEADERS = kfile_pdf.h kde_module_LTLIBRARIES = kfile_pdf.la +kfile_pdf_la_COMPILE_FIRST = poppler-qt kfile_pdf_la_SOURCES = kfile_pdf.cpp kfile_pdf_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) kfile_pdf_la_LIBADD = $(LIB_KIO) -L$(top_builddir)/kfile-plugins/pdf/poppler-qt/ -lpoppler-qt diff --git a/kfile-plugins/pdf/kfile_pdf.cpp b/kfile-plugins/pdf/kfile_pdf.cpp index a3dcbde7..d18ada11 100644 --- a/kfile-plugins/pdf/kfile_pdf.cpp +++ b/kfile-plugins/pdf/kfile_pdf.cpp @@ -27,8 +27,8 @@ typedef KGenericFactory PdfFactory; K_EXPORT_COMPONENT_FACTORY(kfile_pdf, PdfFactory("kfile_pdf")) -KPdfPlugin::KPdfPlugin(TQObject *parent, const char *name, const TQStringList &preferredItems) - : KFilePlugin(parent, name, preferredItems) +KPdfPlugin::KPdfPlugin(TQObject *tqparent, const char *name, const TQStringList &preferredItems) + : KFilePlugin(tqparent, name, preferredItems) { kdDebug(7034) << "pdf plugin\n"; @@ -83,16 +83,16 @@ bool KPdfPlugin::readInfo( KFileMetaInfo& info, uint /* what */) if (doc->isEncrypted()) { enc = i18n("Yes (Can Print:%1 Can Copy:%2 Can Change:%3 Can Add notes:%4)") - .arg(doc->okToPrint() ? i18n("Yes") : i18n("No")) - .arg(doc->okToCopy() ? i18n("Yes") : i18n("No")) - .arg(doc->okToChange() ? i18n("Yes") : i18n("No")) - .arg(doc->okToAddNotes() ? i18n("Yes") : i18n("No")); + .tqarg(doc->okToPrint() ? i18n("Yes") : i18n("No")) + .tqarg(doc->okToCopy() ? i18n("Yes") : i18n("No")) + .tqarg(doc->okToChange() ? i18n("Yes") : i18n("No")) + .tqarg(doc->okToAddNotes() ? i18n("Yes") : i18n("No")); } else enc = i18n("No"); appendItem(generalGroup, "Protected", enc ); appendItem(generalGroup, "Linearized", doc->isLinearized() ? i18n("Yes") : i18n("No") ); - TQString versionString = TQString("%1").arg( doc->getPDFVersion(), 0, 'f', 1 ); + TQString versionString = TQString("%1").tqarg( doc->getPDFVersion(), 0, 'f', 1 ); appendItem(generalGroup, "Version", versionString ); delete doc; diff --git a/kfile-plugins/pdf/kfile_pdf.h b/kfile-plugins/pdf/kfile_pdf.h index eaecdb5d..b14d3989 100644 --- a/kfile-plugins/pdf/kfile_pdf.h +++ b/kfile-plugins/pdf/kfile_pdf.h @@ -29,8 +29,9 @@ class TQStringList; class KPdfPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPdfPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KPdfPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo(KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/pdf/poppler-qt/poppler-document.cc b/kfile-plugins/pdf/poppler-qt/poppler-document.cc index a9a7a319..40e45469 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-document.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-document.cc @@ -20,7 +20,7 @@ */ #include -#include +#include #include #include #include @@ -36,13 +36,13 @@ namespace Poppler { -Document *Document::load(const QString &filePath) +Document *Document::load(const TQString &filePath) { if (!globalParams) { globalParams = new GlobalParams(); } - DocumentData *doc = new DocumentData(new GooString(QFile::encodeName(filePath)), NULL); + DocumentData *doc = new DocumentData(new GooString(TQFile::encodeName(filePath)), NULL); Document *pdoc; if (doc->doc.isOk() || doc->doc.getErrorCode() == errEncrypted) { pdoc = new Document(doc); @@ -72,7 +72,7 @@ bool Document::isLocked() const return data->locked; } -bool Document::unlock(const QCString &password) +bool Document::unlock(const TQCString &password) { if (data->locked) { /* racier then it needs to be */ @@ -115,14 +115,14 @@ int Document::getNumPages() const return data->doc.getNumPages(); } -QValueList Document::fonts() const +TQValueList Document::fonts() const { - QValueList ourList; + TQValueList ourList; scanForFonts(getNumPages(), &ourList); return ourList; } -bool Document::scanForFonts( int numPages, QValueList *fontList ) const +bool Document::scanForFonts( int numPages, TQValueList *fontList ) const { GooList *items = data->m_fontInfoScanner->scan( numPages ); @@ -130,7 +130,7 @@ bool Document::scanForFonts( int numPages, QValueList *fontList ) cons return false; for ( int i = 0; i < items->getLength(); ++i ) { - QString fontName; + TQString fontName; if (((::FontInfo*)items->get(i))->getName()) fontName = ((::FontInfo*)items->get(i))->getName()->getCString(); @@ -145,7 +145,7 @@ bool Document::scanForFonts( int numPages, QValueList *fontList ) cons } /* borrowed from kpdf */ -QString Document::getInfo( const QString & type ) const +TQString Document::getInfo( const TQString & type ) const { // [Albert] Code adapted from pdfinfo.cc on xpdf Object info; @@ -156,7 +156,7 @@ QString Document::getInfo( const QString & type ) const if ( !info.isDict() ) return NULL; - QString result; + TQString result; Object obj; GooString *s1; GBool isUnicode; @@ -189,7 +189,7 @@ QString Document::getInfo( const QString & type ) const u = s1->getChar(i) & 0xff; ++i; } - result += unicodeToQString( &u, 1 ); + result += tqunicodeToTQString( &u, 1 ); } obj.free(); info.free(); @@ -201,43 +201,43 @@ QString Document::getInfo( const QString & type ) const } /* borrowed from kpdf */ -QDateTime Document::getDate( const QString & type ) const +TQDateTime Document::getDate( const TQString & type ) const { // [Albert] Code adapted from pdfinfo.cc on xpdf if ( data->locked ) - return QDateTime(); + return TQDateTime(); Object info; data->doc.getDocInfo( &info ); if ( !info.isDict() ) { info.free(); - return QDateTime(); + return TQDateTime(); } Object obj; int year, mon, day, hour, min, sec, tz_hour, tz_minute; char tz; Dict *infoDict = info.getDict(); - QString result; + TQString result; if ( infoDict->lookup( (char*)type.latin1(), &obj )->isString() ) { - QString s = UnicodeParsedString(obj.getString()); + TQString s = UnicodeParsedString(obj.getString()); // TODO do something with the timezone information if ( parseDateString( s.latin1(), &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) { - QDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??) - QTime t( hour, min, sec ); + TQDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??) + TQTime t( hour, min, sec ); if ( d.isValid() && t.isValid() ) { obj.free(); info.free(); - return QDateTime( d, t ); + return TQDateTime( d, t ); } } } obj.free(); info.free(); - return QDateTime(); + return TQDateTime(); } bool Document::isEncrypted() const @@ -283,7 +283,7 @@ void Document::getPdfVersion(int *major, int *minor) const *minor = data->doc.getPDFMinorVersion(); } -QDomDocument *Document::toc() const +TQDomDocument *Document::toc() const { Outline * outline = data->doc.getOutline(); if ( !outline ) @@ -293,33 +293,33 @@ QDomDocument *Document::toc() const if ( !items || items->getLength() < 1 ) return NULL; - QDomDocument *toc = new QDomDocument(); + TQDomDocument *toc = new TQDomDocument(); if ( items->getLength() > 0 ) data->addTocChildren( toc, toc, items ); return toc; } -LinkDestination *Document::linkDestination( const QString &name ) +LinkDestination *Document::linkDestination( const TQString &name ) { - GooString * namedDest = QStringToGooString( name ); + GooString * namedDest = TQStringToGooString( name ); LinkDestinationData ldd(NULL, namedDest, data); LinkDestination *ld = new LinkDestination(ldd); delete namedDest; return ld; } -bool Document::print(const QString &fileName, QValueList pageList, double hDPI, double vDPI, int rotate) +bool Document::print(const TQString &fileName, TQValueList pageList, double hDPI, double vDPI, int rotate) { return print(fileName, pageList, hDPI, vDPI, rotate, -1, -1); } -bool Document::print(const QString &file, QValueList pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight) +bool Document::print(const TQString &file, TQValueList pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight) { PSOutputDev *psOut = new PSOutputDev(file.latin1(), data->doc.getXRef(), data->doc.getCatalog(), NULL, 1, data->doc.getNumPages(), psModePS, paperWidth, paperHeight); if (psOut->isOk()) { - QValueList::iterator it; + TQValueList::iterator it; for (it = pageList.begin(); it != pageList.end(); ++it ) data->doc.displayPage(psOut, *it, hDPI, vDPI, rotate, gFalse, gTrue, gTrue); diff --git a/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc b/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc index 6eb9d26f..c0e777a7 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc @@ -23,13 +23,13 @@ namespace Poppler { class FontInfoData { public: - QString fontName; + TQString fontName; bool isEmbedded; bool isSubset; FontInfo::Type type; }; -FontInfo::FontInfo( const QString &fontName, const bool isEmbedded, const bool isSubset, Type type ) +FontInfo::FontInfo( const TQString &fontName, const bool isEmbedded, const bool isSubset, Type type ) { data = new FontInfoData(); data->fontName = fontName; @@ -60,7 +60,7 @@ FontInfo::~FontInfo() delete data; } -const QString &FontInfo::name() const +const TQString &FontInfo::name() const { return data->fontName; } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h b/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h index 82127207..fc22d8ed 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h @@ -21,8 +21,8 @@ #ifndef _POPPLER_LINK_H_ #define _POPPLER_LINK_H_ -#include -#include +#include +#include namespace Poppler { @@ -44,7 +44,7 @@ class LinkDestination }; LinkDestination(const LinkDestinationData &data); - LinkDestination(const QString &description); + LinkDestination(const TQString &description); // Accessors. Kind kind() const; @@ -58,7 +58,7 @@ class LinkDestination bool isChangeTop() const; bool isChangeZoom() const; - QString toString() const; + TQString toString() const; private: Kind m_kind; // destination type @@ -80,7 +80,7 @@ class LinkDestination class Link { public: - Link( const QRect &linkArea ); + Link( const TQRect &linkArea ); // get link type (inherited classes mustreturn an unique identifier) enum LinkType { None, Goto, Execute, Browse, Action, Movie }; @@ -89,10 +89,10 @@ class Link // virtual destructor virtual ~Link(); - QRect linkArea() const; + TQRect linkArea() const; private: - QRect m_linkArea; + TQRect m_linkArea; }; @@ -100,16 +100,16 @@ class Link class LinkGoto : public Link { public: - LinkGoto( const QRect &linkArea, QString extFileName, const LinkDestination & destination ); + LinkGoto( const TQRect &linkArea, TQString extFileName, const LinkDestination & destination ); // query for goto parameters bool isExternal() const; - const QString & fileName() const; + const TQString & fileName() const; const LinkDestination & destination() const; LinkType linkType() const; private: - QString m_extFileName; + TQString m_extFileName; LinkDestination m_destination; }; @@ -118,16 +118,16 @@ class LinkExecute : public Link { public: // query for filename / parameters - const QString & fileName() const; - const QString & parameters() const; + const TQString & fileName() const; + const TQString & parameters() const; // create a Link_Execute - LinkExecute( const QRect &linkArea, const QString & file, const QString & params ); + LinkExecute( const TQRect &linkArea, const TQString & file, const TQString & params ); LinkType linkType() const; private: - QString m_fileName; - QString m_parameters; + TQString m_fileName; + TQString m_parameters; }; /** Browse: an URL to open, ranging from 'http://' to 'mailto:' etc.. **/ @@ -135,14 +135,14 @@ class LinkBrowse : public Link { public: // query for URL - const QString & url() const; + const TQString & url() const; // create a Link_Browse - LinkBrowse( const QRect &linkArea, const QString &url ); + LinkBrowse( const TQRect &linkArea, const TQString &url ); LinkType linkType() const; private: - QString m_url; + TQString m_url; }; /** Action: contains an action to perform on document / viewer **/ @@ -167,7 +167,7 @@ class LinkAction : public Link ActionType actionType() const; // create a Link_Action - LinkAction( const QRect &linkArea, ActionType actionType ); + LinkAction( const TQRect &linkArea, ActionType actionType ); LinkType linkType() const; private: @@ -179,7 +179,7 @@ class LinkMovie : public Link // TODO this (Movie link) { public: - LinkMovie( const QRect &linkArea ); + LinkMovie( const TQRect &linkArea ); LinkType linkType() const; }; diff --git a/kfile-plugins/pdf/poppler-qt/poppler-link.cc b/kfile-plugins/pdf/poppler-qt/poppler-link.cc index af6d6452..72db1fff 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-link.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-link.cc @@ -21,7 +21,7 @@ #include #include -#include +#include #include @@ -80,9 +80,9 @@ namespace Poppler { if (deleteDest) delete ld; } - LinkDestination::LinkDestination(const QString &description) + LinkDestination::LinkDestination(const TQString &description) { - QStringList tokens = QStringList::split(';', description); + TQStringList tokens = TQStringList::split(';', description); m_kind = static_cast(tokens[0].toInt()); m_pageNum = tokens[1].toInt(); m_left = tokens[2].toDouble(); @@ -145,18 +145,18 @@ namespace Poppler { return m_changeZoom; } - QString LinkDestination::toString() const - { - QString s = QString::number( (Q_INT8)m_kind ); - s += ";" + QString::number( m_pageNum ); - s += ";" + QString::number( m_left ); - s += ";" + QString::number( m_bottom ); - s += ";" + QString::number( m_right ); - s += ";" + QString::number( m_top ); - s += ";" + QString::number( m_zoom ); - s += ";" + QString::number( (Q_INT8)m_changeLeft ); - s += ";" + QString::number( (Q_INT8)m_changeTop ); - s += ";" + QString::number( (Q_INT8)m_changeZoom ); + TQString LinkDestination::toString() const + { + TQString s = TQString::number( (TQ_INT8)m_kind ); + s += ";" + TQString::number( m_pageNum ); + s += ";" + TQString::number( m_left ); + s += ";" + TQString::number( m_bottom ); + s += ";" + TQString::number( m_right ); + s += ";" + TQString::number( m_top ); + s += ";" + TQString::number( m_zoom ); + s += ";" + TQString::number( (TQ_INT8)m_changeLeft ); + s += ";" + TQString::number( (TQ_INT8)m_changeTop ); + s += ";" + TQString::number( (TQ_INT8)m_changeZoom ); return s; } @@ -166,7 +166,7 @@ namespace Poppler { { } - Link::Link(const QRect &linkArea) : m_linkArea(linkArea) + Link::Link(const TQRect &linkArea) : m_linkArea(linkArea) { } @@ -175,13 +175,13 @@ namespace Poppler { return None; } - QRect Link::linkArea() const + TQRect Link::linkArea() const { return m_linkArea; } // LinkGoto - LinkGoto::LinkGoto( const QRect &linkArea, QString extFileName, const LinkDestination & destination ) : Link(linkArea), m_extFileName(extFileName), m_destination(destination) + LinkGoto::LinkGoto( const TQRect &linkArea, TQString extFileName, const LinkDestination & destination ) : Link(linkArea), m_extFileName(extFileName), m_destination(destination) { } @@ -190,7 +190,7 @@ namespace Poppler { return !m_extFileName.isEmpty(); } - const QString &LinkGoto::fileName() const + const TQString &LinkGoto::fileName() const { return m_extFileName; } @@ -206,15 +206,15 @@ namespace Poppler { } // LinkExecute - LinkExecute::LinkExecute( const QRect &linkArea, const QString & file, const QString & params ) : Link(linkArea), m_fileName(file), m_parameters(params) + LinkExecute::LinkExecute( const TQRect &linkArea, const TQString & file, const TQString & params ) : Link(linkArea), m_fileName(file), m_parameters(params) { } - const QString & LinkExecute::fileName() const + const TQString & LinkExecute::fileName() const { return m_fileName; } - const QString & LinkExecute::parameters() const + const TQString & LinkExecute::parameters() const { return m_parameters; } @@ -225,11 +225,11 @@ namespace Poppler { } // LinkBrowse - LinkBrowse::LinkBrowse( const QRect &linkArea, const QString &url ) : Link(linkArea), m_url(url) + LinkBrowse::LinkBrowse( const TQRect &linkArea, const TQString &url ) : Link(linkArea), m_url(url) { } - const QString & LinkBrowse::url() const + const TQString & LinkBrowse::url() const { return m_url; } @@ -240,7 +240,7 @@ namespace Poppler { } // LinkAction - LinkAction::LinkAction( const QRect &linkArea, ActionType actionType ) : Link(linkArea), m_type(actionType) + LinkAction::LinkAction( const TQRect &linkArea, ActionType actionType ) : Link(linkArea), m_type(actionType) { } @@ -255,7 +255,7 @@ namespace Poppler { } // LinkMovie - LinkMovie::LinkMovie( const QRect &linkArea ) : Link(linkArea) + LinkMovie::LinkMovie( const TQRect &linkArea ) : Link(linkArea) { } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc index cde8818d..9998f738 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc @@ -68,7 +68,7 @@ int PageTransition::duration() const return data->pt->getDuration(); } -PageTransition::Alignment PageTransition::alignment() const +PageTransition::Alignment PageTransition::tqalignment() const { return (Poppler::PageTransition::Alignment)data->pt->getAlignment(); } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h index 53002ff9..f33a014c 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h @@ -60,7 +60,7 @@ class PageTransition { Fade }; - /** \brief alignment of the transition effect that shall be used + /** \brief tqalignment of the transition effect that shall be used */ // if changed remember to keep in sync with PageTransition.h enum enum Alignment { @@ -114,7 +114,7 @@ class PageTransition { /** \brief Get dimension in which the transition effect occurs. */ - Alignment alignment() const; + Alignment tqalignment() const; /** \brief Get direction of motion of the transition effect. diff --git a/kfile-plugins/pdf/poppler-qt/poppler-page.cc b/kfile-plugins/pdf/poppler-qt/poppler-page.cc index a42aa15c..b6be9bd1 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-page.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-page.cc @@ -23,8 +23,8 @@ */ #include -#include -#include +#include +#include #include #include #include @@ -62,18 +62,18 @@ Page::~Page() delete data; } -void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h, bool doLinks) const +void Page::renderToPixmap(TQPixmap **q, int x, int y, int w, int h, bool doLinks) const { renderToPixmap(q, x, y, w, h, 72.0, 72.0, doLinks); } -void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks) const +void Page::renderToPixmap(TQPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks) const { - QImage img = renderToImage(xres, yres, doLinks); - *q = new QPixmap( img ); + TQImage img = renderToImage(xres, yres, doLinks); + *q = new TQPixmap( img ); } -QImage Page::renderToImage(double xres, double yres, bool doLinks) const +TQImage Page::renderToImage(double xres, double yres, bool doLinks) const { #if defined(HAVE_SPLASH) SplashOutputDev *output_dev; @@ -89,7 +89,7 @@ QImage Page::renderToImage(double xres, double yres, bool doLinks) const int bh = output_dev->getBitmap()->getHeight(); SplashColorPtr dataPtr = output_dev->getBitmap()->getDataPtr(); - if (QImage::BigEndian == QImage::systemByteOrder()) + if (TQImage::BigEndian == TQImage::systemByteOrder()) { uchar c; int count = bw * bh * 4; @@ -106,7 +106,7 @@ QImage Page::renderToImage(double xres, double yres, bool doLinks) const } // construct a qimage SHARING the raw bitmap data in memory - QImage img( dataPtr, bw, bh, 32, 0, 0, QImage::IgnoreEndian ); + TQImage img( dataPtr, bw, bh, 32, 0, 0, TQImage::IgnoreEndian ); img = img.copy(); // unload underlying xpdf bitmap output_dev->startPage( 0, NULL ); @@ -117,16 +117,16 @@ QImage Page::renderToImage(double xres, double yres, bool doLinks) const (void)xres; (void)doLinks; - return QImage(); + return TQImage(); #endif } -QString Page::getText(const Rectangle &r) const +TQString Page::getText(const Rectangle &r) const { TextOutputDev *output_dev; GooString *s; PDFRectangle *rect; - QString result; + TQString result; ::Page *p; output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); @@ -147,18 +147,18 @@ QString Page::getText(const Rectangle &r) const s = output_dev->getText(r.m_x1, y1, r.m_x2, y2); } - result = QString::fromUtf8(s->getCString()); + result = TQString::fromUtf8(s->getCString()); delete output_dev; delete s; return result; } -QValueList Page::textList() const +TQValueList Page::textList() const { TextOutputDev *output_dev; - QValueList output_list; + TQValueList output_list; output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); @@ -175,7 +175,7 @@ QValueList Page::textList() const for (int i = 0; i < word_list->getLength(); i++) { TextWord *word = word_list->get(i); GooString *word_str = word->getText(); - QString string = QString::fromUtf8(word_str->getCString()); + TQString string = TQString::fromUtf8(word_str->getCString()); delete word_str; double xMin, yMin, xMax, yMax; word->getBBox(&xMin, &yMin, &xMax, &yMax); @@ -204,15 +204,15 @@ PageTransition *Page::getTransition() const return data->transition; } -QSize Page::pageSize() const +TQSize Page::pageSize() const { ::Page *p; p = data->doc->data->doc.getCatalog()->getPage(data->index + 1); if ( ( Page::Landscape == orientation() ) || (Page::Seascape == orientation() ) ) { - return QSize( (int)p->getCropHeight(), (int)p->getCropWidth() ); + return TQSize( (int)p->getCropHeight(), (int)p->getCropWidth() ); } else { - return QSize( (int)p->getCropWidth(), (int)p->getCropHeight() ); + return TQSize( (int)p->getCropWidth(), (int)p->getCropHeight() ); } } @@ -236,9 +236,9 @@ Page::Orientation Page::orientation() const } } -QValueList Page::links() const +TQValueList Page::links() const { - QValueList popplerLinks; + TQValueList popplerLinks; #if defined(HAVE_SPLASH) Links *xpdfLinks = data->doc->data->doc.getLinks(data->index + 1); @@ -249,7 +249,7 @@ QValueList Page::links() const double left, top, right, bottom; int leftAux, topAux, rightAux, bottomAux; xpdfLink->getRect( &left, &top, &right, &bottom ); - QRect linkArea; + TQRect linkArea; data->doc->data->m_outputDev->cvtUserToDev( left, top, &leftAux, &topAux ); data->doc->data->m_outputDev->cvtUserToDev( right, bottom, &rightAux, &bottomAux ); @@ -270,7 +270,7 @@ QValueList Page::links() const { LinkGoTo * g = (LinkGoTo *) a; // create link: no ext file, namedDest, object pointer - popplerLink = new LinkGoto( linkArea, QString::null, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) ); + popplerLink = new LinkGoto( linkArea, TQString(), LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) ); } break; @@ -278,7 +278,7 @@ QValueList Page::links() const { LinkGoToR * g = (LinkGoToR *) a; // copy link file - const QString fileName = UnicodeParsedString( g->getFileName() ); + const TQString fileName = UnicodeParsedString( g->getFileName() ); // ceate link: fileName, namedDest, object pointer popplerLink = new LinkGoto( linkArea, fileName, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) ); } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-private.cc b/kfile-plugins/pdf/poppler-qt/poppler-private.cc index 2388a1b5..6d209c2b 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-private.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-private.cc @@ -23,7 +23,7 @@ #include "poppler-private.h" #include "poppler-link-qt3.h" -#include +#include #include #include @@ -31,22 +31,22 @@ namespace Poppler { /* borrowed from kpdf */ -QString unicodeToQString(Unicode* u, int len) +TQString tqunicodeToTQString(Unicode* u, int len) { - QString ret; + TQString ret; ret.setLength(len); - QChar* qch = (QChar*) ret.unicode(); + TQChar* qch = (TQChar*) ret.tqunicode(); for (;len;--len) - *qch++ = (QChar) *u++; + *qch++ = (TQChar) *u++; return ret; } -QString UnicodeParsedString(GooString *s1) +TQString UnicodeParsedString(GooString *s1) { GBool isUnicode; int i; Unicode u; - QString result; + TQString result; if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff ) { isUnicode = gTrue; @@ -69,24 +69,24 @@ QString UnicodeParsedString(GooString *s1) u = s1->getChar(i) & 0xff; ++i; } - result += unicodeToQString( &u, 1 ); + result += tqunicodeToTQString( &u, 1 ); } return result; } -GooString *QStringToGooString(const QString &s) +GooString *TQStringToGooString(const TQString &s) { int len = s.length(); char *cstring = (char *)gmallocn(s.length(), sizeof(char)); for (int i = 0; i < len; ++i) - cstring[i] = s.at(i).unicode(); + cstring[i] = s.tqat(i).tqunicode(); GooString *ret = new GooString(cstring, len); gfree(cstring); return ret; } -void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items ) +void DocumentData::addTocChildren( TQDomDocument * docSyn, TQDomNode * tqparent, GooList * items ) { int numItems = items->getLength(); for ( int i = 0; i < numItems; ++i ) @@ -95,15 +95,15 @@ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, Goo OutlineItem * outlineItem = (OutlineItem *)items->get( i ); // 1. create element using outlineItem's title as tagName - QString name; + TQString name; Unicode * uniChar = outlineItem->getTitle(); int titleLength = outlineItem->getTitleLength(); - name = unicodeToQString(uniChar, titleLength); + name = tqunicodeToTQString(uniChar, titleLength); if ( name.isEmpty() ) continue; - QDomElement item = docSyn->createElement( name ); - parent->appendChild( item ); + TQDomElement item = docSyn->createElement( name ); + tqparent->appendChild( item ); // 2. find the page the link refers to ::LinkAction * a = outlineItem->getAction(); @@ -118,9 +118,9 @@ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, Goo // get the destination for the page now, but it's VERY time consuming, // so better storing the reference and provide the viewport on demand GooString *s = g->getNamedDest(); - QChar *charArray = new QChar[s->getLength()]; - for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]); - QString aux(charArray, s->getLength()); + TQChar *charArray = new TQChar[s->getLength()]; + for (int i = 0; i < s->getLength(); ++i) charArray[i] = TQChar(s->getCString()[i]); + TQString aux(charArray, s->getLength()); item.setAttribute( "DestinationName", aux ); delete[] charArray; } @@ -136,11 +136,11 @@ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, Goo } } - // 3. recursively descend over children + // 3. recursively descend over tqchildren outlineItem->open(); - GooList * children = outlineItem->getKids(); - if ( children ) - addTocChildren( docSyn, &item, children ); + GooList * tqchildren = outlineItem->getKids(); + if ( tqchildren ) + addTocChildren( docSyn, &item, tqchildren ); } } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-private.h b/kfile-plugins/pdf/poppler-qt/poppler-private.h index 0d68e505..b1b79084 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-private.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-private.h @@ -23,7 +23,7 @@ #ifndef POPPLER_PRIVATE_H #define POPPLER_PRIVATE_H -#include +#include #include #include @@ -39,11 +39,11 @@ namespace Poppler { class DocumentData; -QString unicodeToQString(Unicode* u, int len); +TQString tqunicodeToTQString(Unicode* u, int len); -QString UnicodeParsedString(GooString *s1); +TQString UnicodeParsedString(GooString *s1); -GooString *QStringToGooString(const QString &s); +GooString *TQStringToGooString(const TQString &s); class LinkDestinationData { public: @@ -84,7 +84,7 @@ class DocumentData { return m_outputDev; } - void addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items ); + void addTocChildren( TQDomDocument * docSyn, TQDomNode * tqparent, GooList * items ); class PDFDoc doc; bool locked; diff --git a/kfile-plugins/pdf/poppler-qt/poppler-qt.h b/kfile-plugins/pdf/poppler-qt/poppler-qt.h index a6b1e6ec..9150ee3b 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-qt.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-qt.h @@ -20,16 +20,16 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __POPPLER_QT_H__ -#define __POPPLER_QT_H__ +#ifndef __POPPLER_TQT_H__ +#define __POPPLER_TQT_H__ #include "poppler-link-qt3.h" #include "poppler-page-transition.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace Poppler { @@ -53,14 +53,14 @@ class Rectangle class TextBox { public: - TextBox(const QString& text, const Rectangle &bBox) : + TextBox(const TQString& text, const Rectangle &bBox) : m_text(text), m_bBox(bBox) {}; - QString getText() const { return m_text; }; + TQString getText() const { return m_text; }; Rectangle getBoundingBox() const { return m_bBox; }; private: - QString m_text; + TQString m_text; Rectangle m_bBox; }; @@ -89,7 +89,7 @@ public: /** Create a new font information container */ - FontInfo( const QString &fontName, const bool isEmbedded, + FontInfo( const TQString &fontName, const bool isEmbedded, const bool isSubset, Type type ); FontInfo(); @@ -99,9 +99,9 @@ public: ~FontInfo(); /** - The name of the font. Can be QString::null if the font has no name + The name of the font. Can be TQString() if the font has no name */ - const QString &name() const; + const TQString &name() const; /** Whether the font is embedded in the file, or not @@ -123,7 +123,7 @@ public: */ Type type() const; - const QString &typeName() const; + const TQString &typeName() const; private: FontInfoData *data; @@ -134,7 +134,7 @@ class Page { friend class Document; public: ~Page(); - void renderToPixmap(QPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks = false) const; + void renderToPixmap(TQPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks = false) const; /** This is a convenience function that is equivalent to @@ -143,12 +143,12 @@ class Page { \sa renderToImage() */ - void renderToPixmap(QPixmap **q, int x, int y, int w, int h, bool doLinks = false) const; + void renderToPixmap(TQPixmap **q, int x, int y, int w, int h, bool doLinks = false) const; /** - \brief Render the page to a QImage using the Splash renderer + \brief Render the page to a TQImage using the Splash renderer - This method can be used to render the page to a QImage. It + This method can be used to render the page to a TQImage. It uses the "Splash" rendering engine. \param xres horizontal resolution of the graphics device, @@ -157,24 +157,24 @@ class Page { \param yres vertical resolution of the graphics device, in dots per inch (defaults to 72 dpi) - \returns a QImage of the page. + \returns a TQImage of the page. \sa renderToPixmap() */ - QImage renderToImage(double xres = 72.0, double yres = 72.0, bool doLinks = false) const; + TQImage renderToImage(double xres = 72.0, double yres = 72.0, bool doLinks = false) const; /** * Returns the size of the page in points **/ - QSize pageSize() const; + TQSize pageSize() const; /** * Returns the text that is inside the Rectangle r * If r is a null Rectangle all text of the page is given **/ - QString getText(const Rectangle &r) const; + TQString getText(const Rectangle &r) const; - QValueList textList() const; + TQValueList textList() const; /** * Returns the transition of this page @@ -196,7 +196,7 @@ class Page { /** Gets the links of the page once it has been rendered if doLinks was true */ - QValueList links() const; + TQValueList links() const; private: Page(const Document *doc, int index); @@ -217,7 +217,7 @@ public: UseOC }; - static Document *load(const QString & filePath); + static Document *load(const TQString & filePath); Page *getPage(int index) const{ return new Page(this, index); } @@ -225,12 +225,12 @@ public: PageMode getPageMode() const; - bool unlock(const QCString &password); + bool unlock(const TQCString &password); bool isLocked() const; - QDateTime getDate( const QString & data ) const; - QString getInfo( const QString & data ) const; + TQDateTime getDate( const TQString & data ) const; + TQString getInfo( const TQString & data ) const; bool isEncrypted() const; bool isLinearized() const; bool okToPrint() const; @@ -251,16 +251,16 @@ public: */ void getPdfVersion(int *major, int *minor) const; - bool print(const QString &fileName, QValueList pageList, double hDPI, double vDPI, int rotate); + bool print(const TQString &fileName, TQValueList pageList, double hDPI, double vDPI, int rotate); - // If you are using QPrinter you can get paper size doing - // QPrinter dummy(QPrinter::PrinterResolution); + // If you are using TQPrinter you can get paper size doing + // TQPrinter dummy(TQPrinter::PrinterResolution); // dummy.setFullPage(true); // dummy.setPageSize(thePageSizeYouWant); - // QPaintDeviceMetrics metrics(&dummy); + // TQPaintDeviceMetrics metrics(&dummy); // int width = metrics.width(); // int height = metrics.height(); - bool print(const QString &fileName, QValueList pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight); + bool print(const TQString &fileName, TQValueList pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight); /** The fonts within the PDF document. @@ -269,7 +269,7 @@ public: document. You may wish to use the call below if you have more than say 20 pages */ - QValueList fonts() const; + TQValueList fonts() const; /** \overload @@ -280,7 +280,7 @@ public: \return false if the end of the document has been reached */ - bool scanForFonts( int numPages, QValueList *fontList ) const; + bool scanForFonts( int numPages, TQValueList *fontList ) const; /** Gets the TOC of the Document, it is application responsabiliy to delete @@ -295,9 +295,9 @@ public: \returns NULL if the Document does not have TOC */ - QDomDocument *toc() const; + TQDomDocument *toc() const; - LinkDestination *linkDestination( const QString &name ); + LinkDestination *linkDestination( const TQString &name ); ~Document(); diff --git a/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp b/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp index d97954b8..d616290d 100644 --- a/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp +++ b/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp @@ -1,27 +1,27 @@ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -class PDFDisplay : public QWidget // picture display widget +class PDFDisplay : public TQWidget // picture display widget { public: PDFDisplay( Poppler::Document *d ); ~PDFDisplay(); protected: - void paintEvent( QPaintEvent * ); - void keyPressEvent( QKeyEvent * ); + void paintEvent( TQPaintEvent * ); + void keyPressEvent( TQKeyEvent * ); private: void display(); int currentPage; - QPixmap *pixmap; + TQPixmap *pixmap; Poppler::Document *doc; }; @@ -39,16 +39,16 @@ PDFDisplay::~PDFDisplay() delete pixmap; } -void PDFDisplay::paintEvent( QPaintEvent *e ) +void PDFDisplay::paintEvent( TQPaintEvent *e ) { - QPainter paint( this ); // paint widget + TQPainter paint( this ); // paint widget if (pixmap) paint.drawPixmap(0, 0, *pixmap); } -void PDFDisplay::keyPressEvent( QKeyEvent *e ) +void PDFDisplay::keyPressEvent( TQKeyEvent *e ) { - if (e->key() == Qt::Key_Down) + if (e->key() == TQt::Key_Down) { if (currentPage + 1 < doc->getNumPages()) { @@ -56,7 +56,7 @@ void PDFDisplay::keyPressEvent( QKeyEvent *e ) display(); } } - else if (e->key() == Qt::Key_Up) + else if (e->key() == TQt::Key_Up) { if (currentPage > 0) { @@ -83,7 +83,7 @@ void PDFDisplay::display() int main( int argc, char **argv ) { - QApplication a( argc, argv ); // QApplication required! + TQApplication a( argc, argv ); // TQApplication required! if ( argc < 2 || (argc == 3 && strcmp(argv[2], "-extract") != 0) || argc > 3) { @@ -103,7 +103,7 @@ int main( int argc, char **argv ) { PDFDisplay test( doc ); // create picture display a.setMainWidget( &test); // set main widget - test.setCaption("Poppler-Qt Test"); + test.setCaption("Poppler-TQt Test"); test.show(); // show it return a.exec(); // start event loop @@ -112,7 +112,7 @@ int main( int argc, char **argv ) { Poppler::Page *page = doc->getPage(0); - QLabel *l = new QLabel(page->getText(Poppler::Rectangle()), 0); + TQLabel *l = new TQLabel(page->getText(Poppler::Rectangle()), 0); l->show(); a.setMainWidget(l); // set main widget delete page; diff --git a/kfile-plugins/png/kfile_png.cpp b/kfile-plugins/png/kfile_png.cpp index 531fdfe3..2f128cf7 100644 --- a/kfile-plugins/png/kfile_png.cpp +++ b/kfile-plugins/png/kfile_png.cpp @@ -87,9 +87,9 @@ typedef KGenericFactory PngFactory; K_EXPORT_COMPONENT_FACTORY(kfile_png, PngFactory("kfile_png")) -KPngPlugin::KPngPlugin(TQObject *parent, const char *name, +KPngPlugin::KPngPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "png plugin\n"; diff --git a/kfile-plugins/png/kfile_png.h b/kfile-plugins/png/kfile_png.h index 54e626de..1622efbe 100644 --- a/kfile-plugins/png/kfile_png.h +++ b/kfile-plugins/png/kfile_png.h @@ -29,9 +29,10 @@ class TQStringList; class KPngPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPngPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KPngPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint ); }; diff --git a/kfile-plugins/pnm/kfile_pnm.cpp b/kfile-plugins/pnm/kfile_pnm.cpp index abe576b4..ae54b78d 100644 --- a/kfile-plugins/pnm/kfile_pnm.cpp +++ b/kfile-plugins/pnm/kfile_pnm.cpp @@ -33,7 +33,7 @@ typedef KGenericFactory PnmFactory; K_EXPORT_COMPONENT_FACTORY(kfile_pnm, PnmFactory("kfile_pnm")) -KPnmPlugin::KPnmPlugin(TQObject *parent, const char *name, const TQStringList &args) : KFilePlugin(parent, name, args) +KPnmPlugin::KPnmPlugin(TQObject *tqparent, const char *name, const TQStringList &args) : KFilePlugin(tqparent, name, args) { makeMimeTypeInfo( "image/x-portable-bitmap" ); makeMimeTypeInfo( "image/x-portable-greymap" ); @@ -93,7 +93,7 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) comments += '\n'; } // image size - // unfortunately Qt doesn't have some kind of push-back method for + // unfortunately TQt doesn't have some kind of push-back method for // TQTextStream, so we need to manually decode the first part of the // image size. if( c >= '0' && c <= '9' ) { diff --git a/kfile-plugins/pnm/kfile_pnm.h b/kfile-plugins/pnm/kfile_pnm.h index 59b146e5..3b54bdbe 100644 --- a/kfile-plugins/pnm/kfile_pnm.h +++ b/kfile-plugins/pnm/kfile_pnm.h @@ -27,9 +27,10 @@ class TQStringList; class KPnmPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPnmPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KPnmPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint ); private: diff --git a/kfile-plugins/ps/gscreator.cpp b/kfile-plugins/ps/gscreator.cpp index 0f0c50e8..9a9bafd7 100644 --- a/kfile-plugins/ps/gscreator.cpp +++ b/kfile-plugins/ps/gscreator.cpp @@ -20,7 +20,7 @@ */ /* This function gets a path of a DVI, EPS, PS or PDF file and - produces a PNG-Thumbnail which is stored as a QImage + produces a PNG-Thumbnail which is stored as a TQImage The program works as follows @@ -46,7 +46,7 @@ 9. Turn the PS,PDF or EPS file into a PNG file using gs 10. Parent process (1) - store data in a QImage + store data in a TQImage */ #ifdef HAVE_CONFIG_H @@ -176,7 +176,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img { // The code in the loop (when testing whether got_sig_term got set) // should read some variation of: -// parentJob()->wasKilled() +// tqparentJob()->wasKilled() // // Unfortunatelly, that's currently impossible without breaking BIC. // So we need to catch the signal ourselves. @@ -234,7 +234,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img } const bool is_encapsulated = no_dvi && - (path.find(TQRegExp("\\.epsi?$", false, false)) > 0) && + (path.tqfind(TQRegExp("\\.epsi?$", false, false)) > 0) && (dsc.bbox()->width() > 0) && (dsc.bbox()->height() > 0) && (dsc.page_count() <= 1); @@ -521,7 +521,7 @@ bool GSCreator::getEPSIPreview(const TQString &path, long start, long return false; } - TQString previewstr = TQString::fromLatin1(buf); + TQString previewstr = TQString::tqfromLatin1(buf); free(buf); int offset = 0; @@ -567,7 +567,7 @@ bool GSCreator::getEPSIPreview(const TQString &path, long start, long for (unsigned int gray = 0; gray < colors; gray++) { unsigned int grayvalue = (255U * (colors - 1 - gray)) / (colors - 1); - img.setColor(gray, qRgb(grayvalue, grayvalue, grayvalue)); + img.setColor(gray, tqRgb(grayvalue, grayvalue, grayvalue)); } } diff --git a/kfile-plugins/ps/kfile_ps.cpp b/kfile-plugins/ps/kfile_ps.cpp index 01136d88..7121af1b 100644 --- a/kfile-plugins/ps/kfile_ps.cpp +++ b/kfile-plugins/ps/kfile_ps.cpp @@ -30,9 +30,9 @@ typedef KGenericFactory PSFactory; K_EXPORT_COMPONENT_FACTORY(kfile_ps, PSFactory("kfile_ps")) -KPSPlugin::KPSPlugin(TQObject *parent, const char *name, +KPSPlugin::KPSPlugin(TQObject *tqparent, const char *name, const TQStringList &preferredItems) : - KFilePlugin( parent, name, preferredItems ) + KFilePlugin( tqparent, name, preferredItems ) { kdDebug(7034) << "ps plugin\n"; diff --git a/kfile-plugins/ps/kfile_ps.h b/kfile-plugins/ps/kfile_ps.h index 96a400a8..1b978713 100644 --- a/kfile-plugins/ps/kfile_ps.h +++ b/kfile-plugins/ps/kfile_ps.h @@ -30,8 +30,9 @@ class TQStringList; class KPSPlugin: public KFilePlugin, public KDSCCommentHandler { Q_OBJECT + TQ_OBJECT public: - KPSPlugin( TQObject *parent, const char *name, + KPSPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint what); diff --git a/kfile-plugins/raw/kcamerarawplugin.cpp b/kfile-plugins/raw/kcamerarawplugin.cpp index 8a0b0ce8..62b00404 100644 --- a/kfile-plugins/raw/kcamerarawplugin.cpp +++ b/kfile-plugins/raw/kcamerarawplugin.cpp @@ -83,9 +83,9 @@ bool KCameraRawPlugin::createPreview(const TQString &path, TQImage &img) return true; } -KCameraRawPlugin::KCameraRawPlugin(TQObject *parent, const char *name, +KCameraRawPlugin::KCameraRawPlugin(TQObject *tqparent, const char *name, const TQStringList &args ) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "KCameraRawPlugin c'tor" << endl; diff --git a/kfile-plugins/raw/kcamerarawplugin.h b/kfile-plugins/raw/kcamerarawplugin.h index e205aa37..fa583c4f 100644 --- a/kfile-plugins/raw/kcamerarawplugin.h +++ b/kfile-plugins/raw/kcamerarawplugin.h @@ -26,9 +26,10 @@ class TQImage; class KCameraRawPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KCameraRawPlugin(TQObject *parent, const char *name, const TQStringList& args); + KCameraRawPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); private: diff --git a/kfile-plugins/raw/parse.c b/kfile-plugins/raw/parse.c index 1abbbfce..a256f04e 100644 --- a/kfile-plugins/raw/parse.c +++ b/kfile-plugins/raw/parse.c @@ -284,7 +284,7 @@ int parse_tiff_ifd (int base, int level) case 0x111: /* StripOffset */ if (!offset || is_dng) offset = val; break; - case 0x112: /* Orientation */ + case 0x112: /* Qt::Orientation */ flip = flip_map[(val-1) & 7]; break; case 0x117: /* StripByteCounts */ diff --git a/kfile-plugins/rgb/kfile_rgb.cpp b/kfile-plugins/rgb/kfile_rgb.cpp index cf832343..3c8b416e 100644 --- a/kfile-plugins/rgb/kfile_rgb.cpp +++ b/kfile-plugins/rgb/kfile_rgb.cpp @@ -32,8 +32,8 @@ typedef KGenericFactory RgbFactory; K_EXPORT_COMPONENT_FACTORY(kfile_rgb, RgbFactory("kfile_rgb")) -KRgbPlugin::KRgbPlugin(TQObject *parent, const char *name, const TQStringList &args) : - KFilePlugin(parent, name, args) +KRgbPlugin::KRgbPlugin(TQObject *tqparent, const char *name, const TQStringList &args) : + KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo("image/x-rgb"); @@ -71,24 +71,24 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) TQFile file(info.path()); if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } TQDataStream dstream(&file); - Q_UINT16 magic; - Q_UINT8 storage; - Q_UINT8 bpc; - Q_UINT16 dimension; - Q_UINT16 xsize; - Q_UINT16 ysize; - Q_UINT16 zsize; - Q_UINT32 pixmin; - Q_UINT32 pixmax; - Q_UINT32 dummy; + TQ_UINT16 magic; + TQ_UINT8 storage; + TQ_UINT8 bpc; + TQ_UINT16 dimension; + TQ_UINT16 xsize; + TQ_UINT16 ysize; + TQ_UINT16 zsize; + TQ_UINT32 pixmin; + TQ_UINT32 pixmax; + TQ_UINT32 dummy; char imagename[80]; - Q_UINT32 colormap; + TQ_UINT32 colormap; dstream >> magic; dstream >> storage; @@ -103,7 +103,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) dstream.readRawBytes(imagename, 80); imagename[79] = '\0'; dstream >> colormap; - Q_UINT8 u8; + TQ_UINT8 u8; for (uint i = 0; i < 404; i++) dstream >> u8; @@ -134,17 +134,17 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) long compressed = file.size() - 512; long verbatim = xsize * ysize * zsize; appendItem(group, "Compression", i18n("Runlength Encoded") - + TQString(", %1%").arg(compressed * 100.0 / verbatim, 0, 'f', 1)); + + TQString(", %1%").tqarg(compressed * 100.0 / verbatim, 0, 'f', 1)); long k; - Q_UINT32 offs; - TQMap map; - TQMap::Iterator it; - TQMap::Iterator end = map.end(); + TQ_UINT32 offs; + TQMap map; + TQMap::Iterator it; + TQMap::Iterator end = map.end(); for (k = 0; k < (ysize * zsize); k++) { dstream >> offs; - if ((it = map.find(offs)) != end) - map.replace(offs, it.data() + 1); + if ((it = map.tqfind(offs)) != end) + map.tqreplace(offs, it.data() + 1); else map[offs] = 0; } @@ -152,7 +152,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) k += it.data(); if (k) - appendItem(group, "SharedRows", TQString("%1%").arg(k * 100.0 + appendItem(group, "SharedRows", TQString("%1%").tqarg(k * 100.0 / (ysize * zsize), 0, 'f', 1)); else appendItem(group, "SharedRows", i18n("None")); @@ -173,7 +173,7 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const TQFile file(info.path()); if (!file.open(IO_WriteOnly|IO_Raw)) { - kdDebug(7034) << "couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } @@ -188,9 +188,9 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const unsigned i; for (i = 0; i < s.length(); i++) - dstream << Q_UINT8(s.latin1()[i]); + dstream << TQ_UINT8(s.latin1()[i]); for (; i < 80; i++) - dstream << Q_UINT8(0); + dstream << TQ_UINT8(0); file.close(); return true; @@ -199,9 +199,9 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const // restrict to 79 ASCII characters TQValidator* KRgbPlugin::createValidator(const TQString&, const TQString &, - const TQString &, TQObject* parent, const char* name) const + const TQString &, TQObject* tqparent, const char* name) const { - return new TQRegExpValidator(TQRegExp("[\x0020-\x007E]{79}"), parent, name); + return new TQRegExpValidator(TQRegExp("[\x0020-\x007E]{79}"), tqparent, name); } diff --git a/kfile-plugins/rgb/kfile_rgb.h b/kfile-plugins/rgb/kfile_rgb.h index c00ddfb5..bbbfd1b4 100644 --- a/kfile-plugins/rgb/kfile_rgb.h +++ b/kfile-plugins/rgb/kfile_rgb.h @@ -27,14 +27,15 @@ class TQStringList; class KRgbPlugin : public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KRgbPlugin(TQObject *parent, const char *name, const TQStringList& args); + KRgbPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); virtual bool writeInfo(const KFileMetaInfo& info) const; virtual TQValidator* createValidator(const TQString& mimetype, const TQString &group, const TQString &key, - TQObject* parent, const char* name) const; + TQObject* tqparent, const char* name) const; }; diff --git a/kfile-plugins/tga/kfile_tga.cpp b/kfile-plugins/tga/kfile_tga.cpp index 21d2c6d2..46176e3e 100644 --- a/kfile-plugins/tga/kfile_tga.cpp +++ b/kfile-plugins/tga/kfile_tga.cpp @@ -44,10 +44,10 @@ typedef KGenericFactory TgaFactory; K_EXPORT_COMPONENT_FACTORY(kfile_tga, TgaFactory( "kfile_tga" )) -KTgaPlugin::KTgaPlugin(TQObject *parent, const char *name, +KTgaPlugin::KTgaPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-targa" ); @@ -77,7 +77,7 @@ bool KTgaPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/tga/kfile_tga.h b/kfile-plugins/tga/kfile_tga.h index 8b130e49..ccd5b69d 100644 --- a/kfile-plugins/tga/kfile_tga.h +++ b/kfile-plugins/tga/kfile_tga.h @@ -27,9 +27,10 @@ class TQStringList; class KTgaPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KTgaPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KTgaPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/tiff/kfile_tiff.cpp b/kfile-plugins/tiff/kfile_tiff.cpp index ce55e5b3..7e1e86be 100644 --- a/kfile-plugins/tiff/kfile_tiff.cpp +++ b/kfile-plugins/tiff/kfile_tiff.cpp @@ -34,8 +34,8 @@ typedef KGenericFactory TiffFactory; K_EXPORT_COMPONENT_FACTORY(kfile_tiff, TiffFactory("kfile_tiff")) -KTiffPlugin::KTiffPlugin(TQObject *parent, const char *name, - const TQStringList &args) : KFilePlugin(parent, name, args) +KTiffPlugin::KTiffPlugin(TQObject *tqparent, const char *name, + const TQStringList &args) : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "TIFF file meta info plugin" << endl; KFileMimeTypeInfo* info = addMimeTypeInfo( "image/tiff" ); @@ -90,7 +90,7 @@ KTiffPlugin::KTiffPlugin(TQObject *parent, const char *name, m_colorMode.insert(PHOTOMETRIC_PALETTE, new TQString(I18N_NOOP("Palette color"))); m_colorMode.insert(PHOTOMETRIC_MASK, - new TQString(I18N_NOOP("Transparency mask"))); + new TQString(I18N_NOOP("Transparency tqmask"))); m_colorMode.insert(PHOTOMETRIC_SEPARATED, new TQString(I18N_NOOP("Color separations"))); m_colorMode.insert(PHOTOMETRIC_YCBCR, @@ -248,7 +248,7 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint) int imageBpp = bitsPerSample*samplesPerPixel; if (imageAlpha && colorMode==PHOTOMETRIC_RGB) - m_colorMode.replace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA"))); + m_colorMode.tqreplace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA"))); KFileMetaInfoGroup group = appendGroup(info, "General"); if (description) diff --git a/kfile-plugins/tiff/kfile_tiff.h b/kfile-plugins/tiff/kfile_tiff.h index 54087ea4..26ad4765 100644 --- a/kfile-plugins/tiff/kfile_tiff.h +++ b/kfile-plugins/tiff/kfile_tiff.h @@ -27,9 +27,10 @@ class KTiffPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KTiffPlugin(TQObject *parent, const char *name, const TQStringList& args); + KTiffPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); private: diff --git a/kfile-plugins/xbm/kfile_xbm.cpp b/kfile-plugins/xbm/kfile_xbm.cpp index 755201a3..7929a1bd 100644 --- a/kfile-plugins/xbm/kfile_xbm.cpp +++ b/kfile-plugins/xbm/kfile_xbm.cpp @@ -42,10 +42,10 @@ typedef KGenericFactory XbmFactory; K_EXPORT_COMPONENT_FACTORY(kfile_xbm, XbmFactory( "kfile_xbm" )) -KXbmPlugin::KXbmPlugin(TQObject *parent, const char *name, +KXbmPlugin::KXbmPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-xbm" ); @@ -100,7 +100,7 @@ bool KXbmPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/xbm/kfile_xbm.h b/kfile-plugins/xbm/kfile_xbm.h index 7b62047c..b30e04cb 100644 --- a/kfile-plugins/xbm/kfile_xbm.h +++ b/kfile-plugins/xbm/kfile_xbm.h @@ -27,9 +27,10 @@ class TQStringList; class KXbmPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KXbmPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KXbmPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); diff --git a/kfile-plugins/xpm/kfile_xpm.cpp b/kfile-plugins/xpm/kfile_xpm.cpp index c0e80027..bc6806cf 100644 --- a/kfile-plugins/xpm/kfile_xpm.cpp +++ b/kfile-plugins/xpm/kfile_xpm.cpp @@ -32,8 +32,8 @@ K_EXPORT_COMPONENT_FACTORY(kfile_xpm, xpmFactory( "kfile_xpm" )) //-------------------------------------------------------------------------------- -xpmPlugin::xpmPlugin(TQObject *parent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) +xpmPlugin::xpmPlugin(TQObject *tqparent, const char *name, const TQStringList &args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-xpm" ); @@ -62,7 +62,7 @@ bool xpmPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) KFileMetaInfoGroup group = appendGroup(info, "xpmInfo"); - appendItem(group, "Dimension", pix.size()); + appendItem(group, "Dimension", TQSize(pix.size())); appendItem(group, "BitDepth", pix.depth()); return true; diff --git a/kfile-plugins/xpm/kfile_xpm.h b/kfile-plugins/xpm/kfile_xpm.h index f4660c45..abebe119 100644 --- a/kfile-plugins/xpm/kfile_xpm.h +++ b/kfile-plugins/xpm/kfile_xpm.h @@ -34,9 +34,10 @@ class TQStringList; class xpmPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - xpmPlugin(TQObject *parent, const char *name, const TQStringList& args); + xpmPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); }; diff --git a/kgamma/configure.in.in b/kgamma/configure.in.in index d4e1a9f4..8f4d787b 100644 --- a/kgamma/configure.in.in +++ b/kgamma/configure.in.in @@ -61,5 +61,5 @@ fi AC_LANG_SAVE AC_LANG_CPLUSPLUS -AC_CHECK_HEADERS(sstream) +KDE_CHECK_HEADERS(sstream) AC_LANG_RESTORE diff --git a/kgamma/kcmkgamma/displaynumber.cpp b/kgamma/kcmkgamma/displaynumber.cpp index b3486e38..1bc0473b 100644 --- a/kgamma/kcmkgamma/displaynumber.cpp +++ b/kgamma/kcmkgamma/displaynumber.cpp @@ -20,16 +20,16 @@ #include "displaynumber.h" -DisplayNumber::DisplayNumber(TQWidget *parent, int digits, \ - int prec, const char *name) : TQLabel(parent,name) { +DisplayNumber::DisplayNumber(TQWidget *tqparent, int digits, \ + int prec, const char *name) : TQLabel(tqparent,name) { setPrecision(prec); setWidth(digits); setFrameStyle(TQFrame::Panel | TQFrame::Sunken); - setBackgroundMode(Qt::PaletteBase); - setAlignment(Qt::AlignCenter); - setFocusPolicy(NoFocus); + setBackgroundMode(TQt::PaletteBase); + tqsetAlignment(TQt::AlignCenter); + setFocusPolicy(TQ_NoFocus); } DisplayNumber::~DisplayNumber(){ diff --git a/kgamma/kcmkgamma/displaynumber.h b/kgamma/kcmkgamma/displaynumber.h index d5662fae..19e41de6 100644 --- a/kgamma/kcmkgamma/displaynumber.h +++ b/kgamma/kcmkgamma/displaynumber.h @@ -26,8 +26,9 @@ class DisplayNumber : public TQLabel { Q_OBJECT + TQ_OBJECT public: - DisplayNumber(TQWidget *parent=0, int digits=0, int prec=0, const char *name=0); + DisplayNumber(TQWidget *tqparent=0, int digits=0, int prec=0, const char *name=0); ~DisplayNumber(); void setFont( const TQFont & f ); void setNum(double num); diff --git a/kgamma/kcmkgamma/gammactrl.cpp b/kgamma/kcmkgamma/gammactrl.cpp index 3871a18d..efedeefa 100644 --- a/kgamma/kcmkgamma/gammactrl.cpp +++ b/kgamma/kcmkgamma/gammactrl.cpp @@ -26,9 +26,9 @@ #include "displaynumber.h" #include "gammactrl.moc" -GammaCtrl::GammaCtrl(TQWidget *parent, XVidExtWrap *xvid, int channel, \ +GammaCtrl::GammaCtrl(TQWidget *tqparent, XVidExtWrap *xvid, int channel, \ const TQString& mingamma, const TQString& maxgamma, const TQString& setgamma, \ - const char *name) : TQHBox(parent, name) + const char *name) : TQHBox(tqparent, name) { int maxslider = (int)( ( maxgamma.toDouble() - mingamma.toDouble() \ + 0.0005 ) * 20 ); @@ -47,7 +47,7 @@ GammaCtrl::GammaCtrl(TQWidget *parent, XVidExtWrap *xvid, int channel, \ setSpacing(KDialog::spacingHint()); - slider = new TQSlider(Horizontal, this); + slider = new TQSlider(Qt::Horizontal, this); slider->setFixedHeight(24); slider->setTickmarks(TQSlider::Below); slider->setRange(0, maxslider); diff --git a/kgamma/kcmkgamma/gammactrl.h b/kgamma/kcmkgamma/gammactrl.h index 97a1ab9e..75dfa775 100644 --- a/kgamma/kcmkgamma/gammactrl.h +++ b/kgamma/kcmkgamma/gammactrl.h @@ -31,9 +31,10 @@ class XVidExtWrap; class GammaCtrl : public TQHBox { Q_OBJECT + TQ_OBJECT public: /** construktor */ - GammaCtrl(TQWidget *parent=0, XVidExtWrap *xvid=0, int channel=0, \ + GammaCtrl(TQWidget *tqparent=0, XVidExtWrap *xvid=0, int channel=0, \ const TQString& mingamma="0.40", const TQString& maxgamma="3.50", \ const TQString& setgamma="1.00", const char *name=0 ); /** destruktor */ diff --git a/kgamma/kcmkgamma/kgamma.cpp b/kgamma/kcmkgamma/kgamma.cpp index ebcfb737..961a617e 100644 --- a/kgamma/kcmkgamma/kgamma.cpp +++ b/kgamma/kcmkgamma/kgamma.cpp @@ -55,8 +55,8 @@ extern "C" } } -KGamma::KGamma(TQWidget *parent, const char *name, const TQStringList&) - :KCModule(parent,name) +KGamma::KGamma(TQWidget *tqparent, const char *name, const TQStringList&) + :KCModule(tqparent,name) { bool ok; GammaCorrection = true; @@ -157,37 +157,37 @@ void KGamma::setupUI() { pic1->setMinimumSize(530, 171); pic1->setBackgroundPixmap(background); pic1->setPixmap(TQPixmap(locate("data", "kgamma/pics/greyscale.png"))); - pic1->setAlignment(AlignCenter); + pic1->tqsetAlignment(AlignCenter); stack->addWidget( pic1, 0 ); TQLabel *pic2 = new TQLabel(stack); pic2->setBackgroundPixmap(background); pic2->setPixmap(TQPixmap(locate("data", "kgamma/pics/rgbscale.png"))); - pic2->setAlignment(AlignCenter); + pic2->tqsetAlignment(AlignCenter); stack->addWidget( pic2, 1 ); TQLabel *pic3 = new TQLabel(stack); pic3->setBackgroundPixmap(background); pic3->setPixmap(TQPixmap(locate("data", "kgamma/pics/cmyscale.png"))); - pic3->setAlignment(AlignCenter); + pic3->tqsetAlignment(AlignCenter); stack->addWidget( pic3, 2 ); TQLabel *pic4 = new TQLabel(stack); pic4->setBackgroundPixmap(background); pic4->setPixmap(TQPixmap(locate("data", "kgamma/pics/darkgrey.png"))); - pic4->setAlignment(AlignCenter); + pic4->tqsetAlignment(AlignCenter); stack->addWidget( pic4, 3 ); TQLabel *pic5 = new TQLabel(stack); pic5->setBackgroundPixmap(background); pic5->setPixmap(TQPixmap(locate("data", "kgamma/pics/midgrey.png"))); - pic5->setAlignment(AlignCenter); + pic5->tqsetAlignment(AlignCenter); stack->addWidget( pic5, 4 ); TQLabel *pic6 = new TQLabel(stack); pic6->setBackgroundPixmap(background); pic6->setPixmap(TQPixmap(locate("data", "kgamma/pics/lightgrey.png"))); - pic6->setAlignment(AlignCenter); + pic6->tqsetAlignment(AlignCenter); stack->addWidget( pic6, 5 ); topLayout->addWidget(stack, 10); @@ -241,10 +241,10 @@ void KGamma::setupUI() { grid->setSpacing(8); grid->addMultiCellWidget(frame1, 0, 2, 0, 3); grid->addMultiCellWidget(frame2, 4, 8, 0, 3); - grid->addWidget(gammalabel, 1, 1, Qt::AlignRight); - grid->addWidget(redlabel, 5, 1, Qt::AlignRight); - grid->addWidget(greenlabel, 6, 1, Qt::AlignRight); - grid->addWidget(bluelabel, 7, 1, Qt::AlignRight); + grid->addWidget(gammalabel, 1, 1, TQt::AlignRight); + grid->addWidget(redlabel, 5, 1, TQt::AlignRight); + grid->addWidget(greenlabel, 6, 1, TQt::AlignRight); + grid->addWidget(bluelabel, 7, 1, TQt::AlignRight); grid->addWidget(gctrl, 1, 2); grid->addWidget(rgctrl, 5, 2); grid->addWidget(ggctrl, 6, 2); @@ -264,7 +264,7 @@ void KGamma::setupUI() { screenselect = new TQComboBox( options ); for ( int i = 0; i < ScreenCount; i++ ) - screenselect->insertItem( i18n("Screen %1").arg(i+1) ); + screenselect->insertItem( i18n("Screen %1").tqarg(i+1) ); screenselect->setCurrentItem(currentScreen); connect(screenselect, TQT_SIGNAL(activated(int)), TQT_SLOT(changeScreen(int))); @@ -279,7 +279,7 @@ void KGamma::setupUI() { TQLabel *error = new TQLabel(this); error->setText(i18n("Gamma correction is not supported by your" " graphics hardware or driver.")); - error->setAlignment(AlignCenter); + error->tqsetAlignment(AlignCenter); topLayout->addWidget(error); } } @@ -351,7 +351,7 @@ void KGamma::save() { if ( !xf86cfgbox->isChecked() ) { //write gamma settings to the users config for (int i = 0; i < ScreenCount; i++) { - config->setGroup( TQString("Screen %1").arg(i) ); + config->setGroup( TQString("Screen %1").tqarg(i) ); config->writeEntry("rgamma", rgamma[i]); config->writeEntry("ggamma", ggamma[i]); config->writeEntry("bgamma", bgamma[i]); @@ -405,7 +405,7 @@ bool KGamma::loadUserSettings() { KConfig *config = new KConfig("kgammarc"); for (int i = 0; i < ScreenCount; i++) { - config->setGroup(TQString( "Screen %1" ).arg(i) ); + config->setGroup(TQString( "Screen %1" ).tqarg(i) ); rgamma[i] = config->readEntry("rgamma"); ggamma[i] = config->readEntry("ggamma"); bgamma[i] = config->readEntry("bgamma"); @@ -610,7 +610,7 @@ extern "C" for (int i = 0; i < xv._ScreenCount(); i++) { xv.setScreen(i); - config->setGroup( TQString("Screen %1").arg(i) ); + config->setGroup( TQString("Screen %1").tqarg(i) ); if ((rgamma = config->readEntry("rgamma").toFloat())) xv.setGamma(XVidExtWrap::Red, rgamma); diff --git a/kgamma/kcmkgamma/kgamma.h b/kgamma/kcmkgamma/kgamma.h index 9af24905..51175ecd 100644 --- a/kgamma/kcmkgamma/kgamma.h +++ b/kgamma/kcmkgamma/kgamma.h @@ -28,8 +28,9 @@ class KProcess; class KGamma: public KCModule { Q_OBJECT + TQ_OBJECT public: - KGamma(TQWidget *parent, const char *name, const TQStringList&); + KGamma(TQWidget *tqparent, const char *name, const TQStringList&); virtual ~KGamma(); void load(); diff --git a/kgamma/xf86gammacfg/Makefile.am b/kgamma/xf86gammacfg/Makefile.am index 3c7c0154..8c7fcb1f 100644 --- a/kgamma/xf86gammacfg/Makefile.am +++ b/kgamma/xf86gammacfg/Makefile.am @@ -4,6 +4,7 @@ INCLUDES= $(all_includes) bin_PROGRAMS = xf86gammacfg xf86gammacfg_SOURCES = xf86gammacfg.cpp xf86gammacfg_LDADD = +xf86gammacfg_LDFLAGS = -ltqt xf86gammacfg_METASOURCES = AUTO noinst_HEADERS = diff --git a/kghostview/displayoptions.cpp b/kghostview/displayoptions.cpp index ab33e384..82ef1f3a 100644 --- a/kghostview/displayoptions.cpp +++ b/kghostview/displayoptions.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2003, Luís Pedro Coelho + * Copyright (C) 2003, Lu�s Pedro Coelho * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,15 +68,15 @@ namespace { TQString DisplayOptions::toString( const DisplayOptions& options ) { return TQString( qformat ) - .arg( options.page() ) - .arg( options.magnification() ) - .arg( options.overrideOrientation() ) - .arg( options.overridePageMedia().utf8() ); + .tqarg( options.page() ) + .tqarg( options.magnification() ) + .tqarg( options.overrideOrientation() ) + .tqarg( options.overridePageMedia().utf8().data() ); } bool DisplayOptions::fromString( DisplayOptions& out, const TQString& in ) { - TQRegExp regex( TQString::fromLatin1( rformat ) ); + TQRegExp regex( TQString::tqfromLatin1( rformat ) ); if ( regex.search( in ) < 0 ) return false; out.reset(); diff --git a/kghostview/displayoptions.h b/kghostview/displayoptions.h index 8a19a812..8ceaf56e 100644 --- a/kghostview/displayoptions.h +++ b/kghostview/displayoptions.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2003, Luís Pedro Coelho + * Copyright (C) 2003, Lu�s Pedro Coelho * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ class KDE_EXPORT DisplayOptions void setOverrideOrientation(CDSC_ORIENTATION_ENUM e) { _overrideOrientation = e; } CDSC_ORIENTATION_ENUM overrideOrientation() const { return _overrideOrientation; } - void restoreOverridePageMedia() { _overridePageMedia = TQString::null; } + void restoreOverridePageMedia() { _overridePageMedia = TQString(); } void setOverridePageMedia(const TQString& newMedia) { _overridePageMedia = newMedia; } const TQString& overridePageMedia() const { return _overridePageMedia; } @@ -103,7 +103,7 @@ class KDE_EXPORT DisplayOptions inline DisplayOptions::DisplayOptions() :_overrideOrientation( CDSC_ORIENT_UNKNOWN ), - _overridePageMedia ( TQString::null ), + _overridePageMedia ( TQString() ), _page( 0 ) { setMagnification( 1.0 ); diff --git a/kghostview/dscparse/dscparse.cpp b/kghostview/dscparse/dscparse.cpp index b5d2c3a7..b02fb117 100644 --- a/kghostview/dscparse/dscparse.cpp +++ b/kghostview/dscparse/dscparse.cpp @@ -41,7 +41,7 @@ * %%PaperWeight: (ignored) * * Other additions for defaults or page section - % %%ViewingOrientation: xx xy yx yy + % %%ViewingQt::Orientation: xx xy yx yy */ #include /* for sprintf(), not file I/O */ @@ -1736,7 +1736,7 @@ dsc_parse_viewing_orientation(CDSC *dsc, CDSCCTM **pctm) *pctm = NULL; } - n = IS_DSC(dsc->line, "%%+") ? 3 : 21; /* %%ViewingOrientation: */ + n = IS_DSC(dsc->line, "%%+") ? 3 : 21; /* %%ViewingQt::Orientation: */ while (IS_WHITE(dsc->line[n])) n++; @@ -2026,7 +2026,7 @@ dsc_scan_comments(CDSC *dsc) continued ? 3 : 10)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%Orientation:")) { + else if (IS_DSC(line, "%%Qt::Orientation:")) { dsc->id = CDSC_ORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page_orientation), continued ? 3 : 14)) @@ -2197,7 +2197,7 @@ dsc_scan_comments(CDSC *dsc) dsc_unknown(dsc); } else if (IS_DSC(line, "%%Requirements:")) { - dsc->id = CDSC_REQUIREMENTS; + dsc->id = CDSC_RETQUIREMENTS; /* ignore */ } else if (IS_DSC(line, "%%DocumentNeededFonts:")) { @@ -2328,9 +2328,9 @@ dsc_scan_defaults(CDSC *dsc) dsc->id = CDSC_PAGEMEDIA; dsc_parse_media(dsc, &dsc->page_media); } - else if (IS_DSC(line, "%%PageOrientation:")) { + else if (IS_DSC(line, "%%PageQt::Orientation:")) { dsc->id = CDSC_PAGEORIENTATION; - /* This can override %%Orientation: */ + /* This can override %%Qt::Orientation: */ if (dsc_parse_orientation(dsc, &(dsc->page_orientation), 18)) return CDSC_ERROR; } @@ -2339,7 +2339,7 @@ dsc_scan_defaults(CDSC *dsc) if (dsc_parse_bounding_box(dsc, &(dsc->page_bbox), 18)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%ViewingOrientation:")) { + else if (IS_DSC(line, "%%ViewingQt::Orientation:")) { dsc->id = CDSC_VIEWINGORIENTATION; if (dsc_parse_viewing_orientation(dsc, &dsc->viewing_orientation)) return CDSC_ERROR; @@ -2849,7 +2849,7 @@ dsc_scan_page(CDSC *dsc) dsc_unknown(dsc); } } - else if (IS_DSC(line, "%%PageOrientation:")) { + else if (IS_DSC(line, "%%PageQt::Orientation:")) { dsc->id = CDSC_PAGEORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page[dsc->page_count-1].orientation) ,18)) @@ -2860,7 +2860,7 @@ dsc_scan_page(CDSC *dsc) if (dsc_parse_bounding_box(dsc, &dsc->page[dsc->page_count-1].bbox, 18)) return CDSC_NOTDSC; } - else if (IS_DSC(line, "%%ViewingOrientation:")) { + else if (IS_DSC(line, "%%ViewingQt::Orientation:")) { dsc->id = CDSC_VIEWINGORIENTATION; if (dsc_parse_viewing_orientation(dsc, &dsc->page[dsc->page_count-1].viewing_orientation)) @@ -2938,7 +2938,7 @@ dsc_scan_page(CDSC *dsc) * %%DocumentSuppliedFonts: * %%DocumentSuppliedProcSets: * %%DocumentSuppliedResources: - * %%Orientation: + * %%Qt::Orientation: * %%Pages: * %%PageOrder: * @@ -2946,7 +2946,7 @@ dsc_scan_page(CDSC *dsc) * %%Trailer * %%EOF * %%BoundingBox: - * %%Orientation: + * %%Qt::Orientation: * %%Pages: * %%PageOrder: * In addition to these, we support @@ -2957,7 +2957,7 @@ dsc_scan_page(CDSC *dsc) * %%PageCustomColors: * %%PageFiles: * %%PageFonts: - * %%PageOrientation: + * %%PageQt::Orientation: * %%PageProcessColors: * %%PageResources: */ @@ -3052,7 +3052,7 @@ dsc_scan_trailer(CDSC *dsc) continued ? 3 : 10)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%Orientation:")) { + else if (IS_DSC(line, "%%Qt::Orientation:")) { dsc->id = CDSC_ORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page_orientation), continued ? 3 : 14)) return CDSC_ERROR; diff --git a/kghostview/dscparse/dscparse.h b/kghostview/dscparse/dscparse.h index 10d2746c..dbac949e 100644 --- a/kghostview/dscparse/dscparse.h +++ b/kghostview/dscparse/dscparse.h @@ -98,7 +98,7 @@ typedef enum { CDSC_FOR = 207, /* %%For: */ CDSC_LANGUAGELEVEL = 208, /* %%LanguageLevel: */ CDSC_BOUNDINGBOX = 209, /* %%BoundingBox: */ - CDSC_ORIENTATION = 210, /* %%Orientation: */ + CDSC_ORIENTATION = 210, /* %%Qt::Orientation: */ CDSC_PAGEORDER = 211, /* %%PageOrder: */ CDSC_DOCUMENTMEDIA = 212, /* %%DocumentMedia: */ CDSC_DOCUMENTPAPERSIZES = 213, /* %%DocumentPaperSizes: */ @@ -106,7 +106,7 @@ typedef enum { CDSC_DOCUMENTPAPERCOLORS = 215, /* %%DocumentPaperColors: */ CDSC_DOCUMENTPAPERWEIGHTS = 216, /* %%DocumentPaperWeights: */ CDSC_DOCUMENTDATA = 217, /* %%DocumentData: */ - CDSC_REQUIREMENTS = 218, /* IGNORED %%Requirements: */ + CDSC_RETQUIREMENTS = 218, /* IGNORED %%Requirements: */ CDSC_DOCUMENTNEEDEDFONTS = 219, /* IGNORED %%DocumentNeededFonts: */ CDSC_DOCUMENTSUPPLIEDFONTS = 220, /* IGNORED %%DocumentSuppliedFonts: */ CDSC_HIRESBOUNDINGBOX = 221, /* %%HiResBoundingBox: */ @@ -119,7 +119,7 @@ typedef enum { /* Defaults section */ CDSC_BEGINDEFAULTS = 401, /* %%BeginDefaults */ CDSC_ENDDEFAULTS = 402, /* %%EndDefaults */ -/* also %%PageMedia, %%PageOrientation, %%PageBoundingBox */ +/* also %%PageMedia, %%PageQt::Orientation, %%PageBoundingBox */ /* Prolog section */ CDSC_BEGINPROLOG = 501, /* %%BeginProlog */ @@ -150,16 +150,16 @@ typedef enum { CDSC_ENDPAGESETUP = 703, /* IGNORED %%EndPageSetup */ CDSC_PAGEMEDIA = 704, /* %%PageMedia: */ /* also %%PaperColor, %%PaperForm, %%PaperWeight, %%PaperSize */ - CDSC_PAGEORIENTATION = 705, /* %%PageOrientation: */ + CDSC_PAGEORIENTATION = 705, /* %%PageQt::Orientation: */ CDSC_PAGEBOUNDINGBOX = 706, /* %%PageBoundingBox: */ /* also %%Begin/EndFont, %%Begin/EndFeature */ /* also %%Begin/EndResource, %%Begin/EndProcSet */ CDSC_INCLUDEFONT = 707, /* IGNORED %%IncludeFont: */ - CDSC_VIEWINGORIENTATION = 708, /* %%ViewingOrientation: */ + CDSC_VIEWINGORIENTATION = 708, /* %%ViewingQt::Orientation: */ /* Trailer section */ CDSC_TRAILER = 800, /* %%Trailer */ -/* also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder, %%DocumentMedia */ +/* also %%Pages, %%BoundingBox, %%Qt::Orientation, %%PageOrder, %%DocumentMedia */ /* %%Page is recognised as an error */ /* also %%DocumentNeededFonts, %%DocumentSuppliedFonts */ @@ -229,7 +229,7 @@ typedef struct CDSCMEDIA_S { #define CDSC_KNOWN_MEDIA 46 extern const CDSCMEDIA dsc_known_media[CDSC_KNOWN_MEDIA]; -typedef struct CDSCCTM_S { /* used for %%ViewingOrientation */ +typedef struct CDSCCTM_S { /* used for %%ViewingQt::Orientation */ float xx; float xy; float yx; diff --git a/kghostview/dscparse/dscparse_adapter.cpp b/kghostview/dscparse/dscparse_adapter.cpp index b04e89bc..17ae0231 100644 --- a/kghostview/dscparse/dscparse_adapter.cpp +++ b/kghostview/dscparse/dscparse_adapter.cpp @@ -111,7 +111,7 @@ unsigned int KDSCError::lineNumber() const KDSCErrorHandler::Response KDSCOkErrorHandler::error( const KDSCError& err ) { cout << "KDSC: error in line " << err.lineNumber() << endl; - cout << err.line() << endl; + cout << err.line().data() << endl; return Ok; } diff --git a/kghostview/dscparse/dscparse_adapter.h b/kghostview/dscparse/dscparse_adapter.h index c5c1cbf9..5fefa631 100644 --- a/kghostview/dscparse/dscparse_adapter.h +++ b/kghostview/dscparse/dscparse_adapter.h @@ -185,7 +185,7 @@ public: For = CDSC_FOR, LanguageLevel = CDSC_LANGUAGELEVEL, BoundingBox = CDSC_BOUNDINGBOX, - Orientation = CDSC_ORIENTATION, + Qt::Orientation = CDSC_ORIENTATION, PageOrder = CDSC_PAGEORDER, DocumentMedia = CDSC_DOCUMENTMEDIA, DocumentPaperSizes = CDSC_DOCUMENTPAPERSIZES, @@ -193,7 +193,7 @@ public: DocumentPaperColors = CDSC_DOCUMENTPAPERCOLORS, DocumentPaperWeights = CDSC_DOCUMENTPAPERWEIGHTS, DocumentData = CDSC_DOCUMENTDATA, - Requirements = CDSC_REQUIREMENTS, + Requirements = CDSC_RETQUIREMENTS, DocumentNeededFonts = CDSC_DOCUMENTNEEDEDFONTS, DocumentSuppliedFonts = CDSC_DOCUMENTSUPPLIEDFONTS, HiResBoundingBox = CDSC_HIRESBOUNDINGBOX, @@ -206,7 +206,7 @@ public: // Defaults section BeginDefaults = CDSC_BEGINDEFAULTS, EndDefaults = CDSC_ENDDEFAULTS, - // also %%PageMedia, %%PageOrientation, %%PageBoundingBox + // also %%PageMedia, %%PageQt::Orientation, %%PageBoundingBox // Prolog section BeginProlog = CDSC_BEGINPROLOG, @@ -237,16 +237,16 @@ public: EndPageSetup = CDSC_ENDPAGESETUP, PageMedia = CDSC_PAGEMEDIA, // also %%PaperColor, %%PaperForm, %%PaperWeight, %%PaperSize - PageOrientation = CDSC_PAGEORIENTATION, + PageQt::Orientation = CDSC_PAGEORIENTATION, PageBoundingBox = CDSC_PAGEBOUNDINGBOX, // also %%Begin/EndFont, %%Begin/EndFeature // also %%Begin/EndResource, %%Begin/EndProcSet IncludeFont = CDSC_INCLUDEFONT, - ViewingOrientation = CDSC_VIEWINGORIENTATION, + ViewingQt::Orientation = CDSC_VIEWINGORIENTATION, // Trailer section Trailer = CDSC_TRAILER, - // also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder, + // also %%Pages, %%BoundingBox, %%Qt::Orientation, %%PageOrder, // %%DocumentMedia // %%Page is recognised as an error // also %%DocumentNeededFonts, %%DocumentSuppliedFonts diff --git a/kghostview/fullscreenfilter.cpp b/kghostview/fullscreenfilter.cpp index 724031f4..9efe8a6c 100644 --- a/kghostview/fullscreenfilter.cpp +++ b/kghostview/fullscreenfilter.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2003, Luís Pedro Coelho + * Copyright (C) 2003, Lu�s Pedro Coelho * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,26 +22,26 @@ #include "kgv_miniwidget.h" #include "kgvpageview.h" -FullScreenFilter::FullScreenFilter( KGVShell& parent ) - :TQObject( &parent, "full-screen-filter" ), - parent( parent ) +FullScreenFilter::FullScreenFilter( KGVShell& tqparent ) + :TQObject( &tqparent, "full-screen-filter" ), + tqparent( tqparent ) { } bool FullScreenFilter::eventFilter( TQObject* /*object*/, TQEvent* ev) { if ( TQKeyEvent* keyevent = dynamic_cast( ev ) ) { if ( keyevent->key() == Key_Escape ) { - parent.setFullScreen( false ); + tqparent.setFullScreen( false ); keyevent->accept(); return true; } } if ( TQMouseEvent* mouseevent = dynamic_cast( ev ) ) { - if ( mouseevent->stateAfter() & mouseevent->button() & LeftButton ) { + if ( mouseevent->stateAfter() & mouseevent->button() & Qt::LeftButton ) { // if ( The whole image is visible at once ) - if ( parent.m_gvpart->pageView()->contentsHeight() <= parent.m_gvpart->widget()->height() && - parent.m_gvpart->pageView()->contentsWidth() <= parent.m_gvpart->widget()->width() ) { - parent.m_gvpart->miniWidget()->nextPage(); + if ( tqparent.m_gvpart->pageView()->contentsHeight() <= tqparent.m_gvpart->widget()->height() && + tqparent.m_gvpart->pageView()->contentsWidth() <= tqparent.m_gvpart->widget()->width() ) { + tqparent.m_gvpart->miniWidget()->nextPage(); mouseevent->accept(); return true; } diff --git a/kghostview/fullscreenfilter.h b/kghostview/fullscreenfilter.h index 7d5fa489..4a175c25 100644 --- a/kghostview/fullscreenfilter.h +++ b/kghostview/fullscreenfilter.h @@ -28,15 +28,16 @@ class KGVShell; */ class FullScreenFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: - FullScreenFilter( KGVShell& parent ); + FullScreenFilter( KGVShell& tqparent ); /** * @reimplemented */ virtual bool eventFilter( TQObject*, TQEvent* ); private: - KGVShell& parent; + KGVShell& tqparent; }; diff --git a/kghostview/generalsettingswidget.ui b/kghostview/generalsettingswidget.ui index 60ffbdf3..09ab2764 100644 --- a/kghostview/generalsettingswidget.ui +++ b/kghostview/generalsettingswidget.ui @@ -1,7 +1,7 @@ GeneralSettingsWidget Nadeem Hasan <nhasan@kde.org> - + GeneralSettingsWidget @@ -20,7 +20,7 @@ 0 - + kcfg_Antialiasing @@ -31,7 +31,7 @@ Anti-aliasing makes the result look better, but it makes the display take longer - + kcfg_PlatformFonts @@ -42,7 +42,7 @@ &Use platform fonts - + kcfg_Messages @@ -54,7 +54,7 @@ In case of problems you might want to see its error messages - + kcfg_Palette @@ -65,7 +65,7 @@ In case of problems you might want to see its error messages unnamed - + Mono @@ -76,7 +76,7 @@ In case of problems you might want to see its error messages 2 - + Gray @@ -87,7 +87,7 @@ In case of problems you might want to see its error messages 1 - + Color @@ -106,6 +106,6 @@ In case of problems you might want to see its error messages kdialog.h generalsettingswidget.ui.h - - + + diff --git a/kghostview/generalsettingswidget.ui.h b/kghostview/generalsettingswidget.ui.h index 8dd6920d..512d1d05 100644 --- a/kghostview/generalsettingswidget.ui.h +++ b/kghostview/generalsettingswidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kghostview/gssettingswidget.ui b/kghostview/gssettingswidget.ui index 06779f3b..a92ecc39 100644 --- a/kghostview/gssettingswidget.ui +++ b/kghostview/gssettingswidget.ui @@ -1,7 +1,7 @@ GSSettingsWidget Nadeem Hasan <nhasan@kde.org> - + GSSettingsWidget @@ -46,14 +46,14 @@ Expanding - + 286 20 - + groupBox1 @@ -64,7 +64,7 @@ unnamed - + textLabel1 @@ -83,7 +83,7 @@ Ghostscript is the basic renderer (i.e. the program which draws) - + mDetectedVersion @@ -91,7 +91,7 @@ (detected gs version: %1) - + textLabel2 @@ -110,7 +110,7 @@ Anti-aliasing makes the result look better, but it makes the display take longer - + textLabel3 @@ -139,14 +139,14 @@ kdialog.h gssettingswidget.ui.h - + configClicked() - - - setDetectedVersion( QString v ) - - - + + + setDetectedVersion( TQString v ) + + + kpushbutton.h kurlrequester.h diff --git a/kghostview/gssettingswidget.ui.h b/kghostview/gssettingswidget.ui.h index fb2209c7..11f4bf63 100644 --- a/kghostview/gssettingswidget.ui.h +++ b/kghostview/gssettingswidget.ui.h @@ -2,13 +2,13 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ void GSSettingsWidget::setDetectedVersion( TQString v) { - mDetectedVersion->setText(mDetectedVersion->text().arg( v )); + mDetectedVersion->setText(mDetectedVersion->text().tqarg( v )); } diff --git a/kghostview/infodialog.cpp b/kghostview/infodialog.cpp index e429d712..d65348ef 100644 --- a/kghostview/infodialog.cpp +++ b/kghostview/infodialog.cpp @@ -32,8 +32,8 @@ // // Using KDialogBase in message box mode (gives centered action button) // -InfoDialog::InfoDialog( TQWidget *parent, const char *name, bool modal ) - :KDialogBase( i18n("Document Information"), Yes, Yes, Yes, parent, +InfoDialog::InfoDialog( TQWidget *tqparent, const char *name, bool modal ) + :KDialogBase( i18n("Document Information"), Yes, Yes, Yes, tqparent, name, modal, true, KStdGuiItem::ok() ) { TQFrame *page = makeMainWidget(); @@ -90,7 +90,7 @@ namespace { "(?:(\\+|\\-)(\\d\\d)\'?(\\d\\d)\'?)?" "\\)" ); if ( exp.exactMatch( dateStr ) ) { - TQStringList list = exp.capturedTexts(); + TQStringList list = exp.tqcapturedTexts(); TQStringList::iterator iter = list.begin(); ++iter; // whole string! #undef GET diff --git a/kghostview/infodialog.h b/kghostview/infodialog.h index 689790d0..8b295b88 100644 --- a/kghostview/infodialog.h +++ b/kghostview/infodialog.h @@ -27,9 +27,10 @@ class TQLabel; class InfoDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - InfoDialog( TQWidget *parent=0, const char *name=0, bool modal=true ); + InfoDialog( TQWidget *tqparent=0, const char *name=0, bool modal=true ); void setup( const TQString &fileName, const TQString &documentTitle, const TQString &publicationDate ); diff --git a/kghostview/kdscerrordialog.cpp b/kghostview/kdscerrordialog.cpp index 61245ed5..b219a061 100644 --- a/kghostview/kdscerrordialog.cpp +++ b/kghostview/kdscerrordialog.cpp @@ -46,8 +46,8 @@ KDSCErrorHandler::Response KDSCErrorThreshold::error( const KDSCError& err ) return Cancel; } -KDSCErrorDialog::KDSCErrorDialog( TQWidget* parent ) : - KDialog( parent, "dscerrordialog", true ), +KDSCErrorDialog::KDSCErrorDialog( TQWidget* tqparent ) : + KDialog( tqparent, "dscerrordialog", true ), _response( Ok ) { TQVBoxLayout* vbox = new TQVBoxLayout( this, marginHint(), spacingHint() ); @@ -97,7 +97,7 @@ KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err ) break; } - _lineNumberLabel->setText( i18n( "On line %1:" ).arg( err.lineNumber() ) ); + _lineNumberLabel->setText( i18n( "On line %1:" ).tqarg( err.lineNumber() ) ); _lineLabel->setText( err.line() ); _descriptionLabel->setText( description( err.type() ) ); diff --git a/kghostview/kdscerrordialog.h b/kghostview/kdscerrordialog.h index 67d3dd4a..27f948c5 100644 --- a/kghostview/kdscerrordialog.h +++ b/kghostview/kdscerrordialog.h @@ -42,9 +42,10 @@ private: class KDSCErrorDialog : public KDialog, public KDSCErrorHandler { Q_OBJECT + TQ_OBJECT public: - KDSCErrorDialog( TQWidget* parent = 0 ); + KDSCErrorDialog( TQWidget* tqparent = 0 ); Response error( const KDSCError& ); diff --git a/kghostview/kgv_miniwidget.cpp b/kghostview/kgv_miniwidget.cpp index a6acdd53..115434b9 100644 --- a/kghostview/kgv_miniwidget.cpp +++ b/kghostview/kgv_miniwidget.cpp @@ -124,7 +124,7 @@ void KGVMiniWidget::goToPage() #else TQString num; bool b = false; - num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), TQString::null, &b, _part->widget(), new TQIntValidator(1, dsc()->page_count(), this)); + num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), TQString(), &b, _part->widget(), new TQIntValidator(1, dsc()->page_count(), this)); if (b) goToPage( num.toInt() - 1 ); #endif } @@ -384,7 +384,7 @@ void KGVMiniWidget::showPage( int pagenumber ) kdDebug(4500) << "KGVMiniWidget::showPage( " << pagenumber << " )" << endl; - static_cast< TQWidget* >( _psWidget->parent() )->show(); + TQT_TQWIDGET( _psWidget->tqparent() )->show(); _psWidget->setFileName(_document->fileName(), dsc()->isStructured() ); _psWidget->clear(); @@ -441,7 +441,7 @@ void KGVMiniWidget::showPage( int pagenumber ) /* KNotifyClient::userEvent (i18n("KGhostview cannot load the document, \"%1\".\n" - "It appears to be broken.").arg( _fileName ), + "It appears to be broken.").tqarg( _fileName ), KNotifyClient::Messagebox); _psWidget->disableInterpreter(); _psFile=0; @@ -452,8 +452,8 @@ void KGVMiniWidget::showPage( int pagenumber ) } } // Do this after ajusting pagenumber above - _thumbnailService->cancelRequests( -1 , _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ) ); - _thumbnailService->delayedGetThumbnail( pagenumber, _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ), true ); + _thumbnailService->cancelRequests( -1 , TQT_TQOBJECT(_part->scrollBox()), TQT_SLOT( setThumbnail( TQPixmap ) ) ); + _thumbnailService->delayedGetThumbnail( pagenumber, TQT_TQOBJECT(_part->scrollBox()), TQT_SLOT( setThumbnail( TQPixmap ) ), true ); emit newPageShown( pagenumber ); } @@ -486,13 +486,13 @@ void KGVMiniWidget::updateStatusBarText( int pageNumber ) else if( !_usePageLabels || document()->format() == KGVDocument::PDF ) text = i18n( "Page %1 of %2" ) - .arg( pageNumber + 1 ) - .arg( dsc()->page_count() ); + .tqarg( pageNumber + 1 ) + .tqarg( dsc()->page_count() ); else text = i18n( "Page %1 (%2 of %3)" ) - .arg( dsc()->page()[ _options.page() ].label ) - .arg( pageNumber + 1 ) - .arg( dsc()->page_count() ); + .tqarg( dsc()->page()[ _options.page() ].label ) + .tqarg( pageNumber + 1 ) + .tqarg( dsc()->page_count() ); emit setStatusBarText( text ); } @@ -534,7 +534,7 @@ void KGVMiniWidget::buildTOC() } } else { - marklist->insertItem( TQString::fromLatin1( "1" ), 0 ); + marklist->insertItem( TQString::tqfromLatin1( "1" ), 0 ); } } diff --git a/kghostview/kgv_miniwidget.h b/kghostview/kgv_miniwidget.h index a518657b..7b212157 100644 --- a/kghostview/kgv_miniwidget.h +++ b/kghostview/kgv_miniwidget.h @@ -35,9 +35,10 @@ class KGVPart; class KPSWidget; class MarkList; -class KGVMiniWidget : public QObject +class KGVMiniWidget : public TQObject { Q_OBJECT + TQ_OBJECT public: KGVMiniWidget( KGVPart* part, const char* name = 0 ); diff --git a/kghostview/kgv_view.cpp b/kghostview/kgv_view.cpp index ed08e8e4..1056d22b 100644 --- a/kghostview/kgv_view.cpp +++ b/kghostview/kgv_view.cpp @@ -59,7 +59,7 @@ namespace KGV { /* - * This is because Qt's iterators + * This is because TQt's iterators * are not standard iterators bc of missing typedefs, * so they are only *almost* STL compatible */ @@ -74,10 +74,10 @@ namespace KGV { } } -KGVPart::KGVPart( TQWidget* parentWidget, const char*, - TQObject* parent, const char* name, +KGVPart::KGVPart( TQWidget* tqparentWidget, const char*, + TQObject* tqparent, const char* name, const TQStringList &args ) : - KParts::ReadOnlyPart( parent, name ), + KParts::ReadOnlyPart( tqparent, name ), _fitTimer( new TQTimer( this ) ), _job( 0 ), _mimetypeScanner( 0 ), @@ -85,13 +85,13 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _isGuiInitialized( false ), _isFileDirty( false ), _stickyOptions( false ), - _embeddedInKGhostView( !args.contains( "KParts::ReadOnlyPart" ) ), + _embeddedInKGhostView( !args.tqcontains( "KParts::ReadOnlyPart" ) ), _customZoomIndex( -1 ) { setInstance( KGVFactory::instance() ); // Don't show the progress info dialog if we're embedded in Konqueror. - setProgressInfoEnabled( !args.contains( "Browser/View") ); + setProgressInfoEnabled( !args.tqcontains( "Browser/View") ); _document = new KGVDocument( this ); connect( _document, TQT_SIGNAL( fileChangeFailed() ), @@ -108,8 +108,8 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, this, TQT_SLOT( slotDoFileDirty() ) ); // Setup main widget - _mainWidget = new KGVMainWidget( parentWidget ); - _mainWidget->setFocusPolicy( TQWidget::StrongFocus ); + _mainWidget = new KGVMainWidget( tqparentWidget ); + _mainWidget->setFocusPolicy( TQ_StrongFocus ); _mainWidget->installEventFilter( this ); _mainWidget->setAcceptDrops( true ); connect( _mainWidget, TQT_SIGNAL( spacePressed() ), @@ -165,14 +165,14 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _markList = new MarkList( _mainWidget, "marklist", _docManager ); _markList->setFixedWidth( PAGELIST_WIDTH ); vlay->addWidget( _markList, 1 ); - connect( _markList, TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ), + connect( TQT_TQOBJECT(_markList), TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ), this, TQT_SLOT( showPopup( int, int, const TQPoint& ) ) ); - connect( _markList, TQT_SIGNAL( selected( int ) ), + connect( TQT_TQOBJECT(_markList), TQT_SIGNAL( selected( int ) ), _docManager, TQT_SLOT( goToPage( int ) ) ); connect( _docManager, TQT_SIGNAL( newPageShown( int ) ), - _markList, TQT_SLOT( select( int ) ) ); + TQT_TQOBJECT(_markList), TQT_SLOT( select( int ) ) ); connect( _docManager, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) ); connect( _scrollBox, TQT_SIGNAL( valueChangedRelative( int, int ) ), @@ -195,34 +195,34 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _popup = new KPopupMenu( _markList, "marklist_menu" ); KAction *act = new KAction( i18n( "Mark Current Page" ), "flag", CTRL+SHIFT+Key_M, - _markList, TQT_SLOT( markCurrent() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markCurrent() ), actionCollection(), "mark_current" ); act->plug( _popup ); act = new KAction( i18n( "Mark &All Pages" ), 0, - _markList, TQT_SLOT( markAll() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markAll() ), actionCollection(), "mark_all" ); act->plug( _popup ); act = new KAction( i18n( "Mark &Even Pages" ), 0, - _markList, TQT_SLOT( markEven() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markEven() ), actionCollection(), "mark_even" ); act->plug( _popup ); act = new KAction( i18n( "Mark &Odd Pages" ), 0, - _markList, TQT_SLOT( markOdd() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markOdd() ), actionCollection(), "mark_odd" ); act->plug( _popup ); act = new KAction( i18n( "&Toggle Page Marks" ), 0, - _markList, TQT_SLOT( toggleMarks() ), + TQT_TQOBJECT(_markList), TQT_SLOT( toggleMarks() ), actionCollection(), "toggle" ); act->plug( _popup ); act = new KAction( i18n("&Remove Page Marks"), 0, - _markList, TQT_SLOT( removeMarks() ), + TQT_TQOBJECT(_markList), TQT_SLOT( removeMarks() ), actionCollection(), "remove" ); act->plug( _popup ); // TODO -- disable entry if there aren't any page names //-- View Menu ---------------------------------------------------------- - _selectOrientation = new KSelectAction( i18n( "&Orientation" ), 0, 0, 0, + _selectOrientation = new KSelectAction( i18n( "&Qt::Orientation" ), 0, 0, 0, actionCollection(), "orientation_menu" ); _selectMedia = new KSelectAction( i18n( "Paper &Size" ), 0, 0, 0, actionCollection(), "media_menu" ); @@ -264,7 +264,7 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, for ( TQValueList::iterator first = mags.begin(), last = mags.end(); first != last; ++first ) { - TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 )); + TQString str = TQString( "%1%" ).tqarg( KGlobal::locale()->formatNumber( *first * 100.0, 2 )); str.remove( KGlobal::locale()->decimalSymbol() + "00" ); zooms << str; if ( *first == 1.0 ) idx = cur; @@ -426,7 +426,7 @@ bool KGVPart::closeURL() _mimetypeScanner->abort(); if( !m_file.isEmpty() ) _fileWatcher->removeFile( m_file ); - _mimetype = TQString::null; + _mimetype = TQString(); updatePageDepActions(); stateChanged( "initState" ); return KParts::ReadOnlyPart::closeURL(); @@ -582,7 +582,7 @@ void KGVPart::updateZoomActions() first != last; ++first ) { TQString cur = *first; - cur.remove( cur.find( '%' ), 1 ); + cur.remove( cur.tqfind( '%' ), 1 ); cur = cur.simplifyWhiteSpace(); bool ok = false; double z = cur.toDouble(&ok); @@ -600,7 +600,7 @@ void KGVPart::updateZoomActions() } // Show percentage that isn't predefined - TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 )); + TQString str = TQString( "%1%" ).tqarg( KGlobal::locale()->formatNumber( zoom, 2 )); str.remove( KGlobal::locale()->decimalSymbol() + "00" ); items.insert( items.at(idx), 1, str ); _zoomTo->setItems( items ); @@ -682,10 +682,10 @@ void KGVPart::openURLContinue() // mimetype-determination (e.g. koffice) TQString extension; TQString fileName = m_url.fileName(); - int extensionPos = fileName.findRev( '.' ); + int extensionPos = fileName.tqfindRev( '.' ); if( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' - KTempFile tempFile( TQString::null, extension ); + KTempFile tempFile( TQString(), extension ); m_file = tempFile.name(); _tmpFile.setName( m_file ); _tmpFile.open( IO_ReadWrite ); @@ -750,8 +750,8 @@ void KGVPart::slotGhostscriptError( const TQString& error ) "Below are any error messages which were received from Ghostscript " "(%2) " "which may help you.
" ) - .arg( error ) - .arg( Configuration::interpreter() ), + .tqarg( error ) + .tqarg( Configuration::interpreter() ), true ); // The true above makes it show a "configure gs" option, but maybe we // should trigger an auto-redetection? @@ -784,7 +784,7 @@ void KGVPart::slotMimetypeFinished( const TQString& type ) kdDebug(4500) << "KGVPart::slotMimetypeFinished( " << type << " )" << endl; _mimetype = type; if( !_mimetypeScanner || _mimetypeScanner->hasError() ) - emit canceled( TQString::null ); + emit canceled( TQString() ); else openURLContinue(); _mimetypeScanner = 0; @@ -796,7 +796,7 @@ void KGVPart::slotMimetypeError() _mimetypeScanner = 0; emit started( 0 ); //kapp->processEvents(); - emit canceled( TQString::null ); + emit canceled( TQString() ); } void KGVPart::slotJobFinished( KIO::Job* job ) @@ -839,7 +839,7 @@ void KGVPart::slotNewPage( int ) { updatePageDepActions(); //media->setCurrentItem (miniWidget()->getSize()-1); - //orientation->setCurrentItem (miniWidget()->getOrientation()-1); + //orientation->setCurrentItem (miniWidget()->getQt::Orientation()-1); //TODO -- zoom } @@ -901,7 +901,7 @@ void KGVPart::slotZoom( const TQString& nz ) { TQString z = nz; double zoom; - z.remove( z.find( '%' ), 1 ); + z.remove( z.tqfind( '%' ), 1 ); zoom = KGlobal::locale()->readNumber( z ) / 100; kdDebug( 4500 ) << "ZOOM = " << nz << ", setting zoom = " << zoom << endl; @@ -968,7 +968,7 @@ void KGVPart::setDisplayOptions( const DisplayOptions& options ) _docManager->setDisplayOptions( options ); _selectOrientation->setCurrentItem( options.overrideOrientation() ); TQStringList medias = document()->mediaNames(); - TQStringList::Iterator now = medias.find( options.overridePageMedia() ); + TQStringList::Iterator now = medias.tqfind( options.overridePageMedia() ); if ( now != medias.end() ){ // The options are displayed in inverted order. // Therefore, size() - index gets you the display index @@ -979,8 +979,8 @@ void KGVPart::setDisplayOptions( const DisplayOptions& options ) } -KGVBrowserExtension::KGVBrowserExtension( KGVPart *parent ) : - KParts::BrowserExtension( parent, "KGVBrowserExtension" ) +KGVBrowserExtension::KGVBrowserExtension( KGVPart *tqparent ) : + KParts::BrowserExtension( tqparent, "KGVBrowserExtension" ) { emit enableAction( "print", true ); setURLDropHandlingEnabled( true ); @@ -988,7 +988,7 @@ KGVBrowserExtension::KGVBrowserExtension( KGVPart *parent ) : void KGVBrowserExtension::print() { - ((KGVPart *)parent())->document()->print(); + ((KGVPart *)tqparent())->document()->print(); } diff --git a/kghostview/kgv_view.h b/kghostview/kgv_view.h index 634704fe..4576a0d0 100644 --- a/kghostview/kgv_view.h +++ b/kghostview/kgv_view.h @@ -19,7 +19,7 @@ #ifndef __KGV_VIEW_H #define __KGV_VIEW_H -#include // QByteArray +#include // TQByteArray #include #include @@ -55,9 +55,10 @@ class ScrollBox; class KGVPart: public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KGVPart( TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, + KGVPart( TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, const TQStringList& args = TQStringList() ); virtual ~KGVPart(); @@ -230,9 +231,10 @@ private: class KGVBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT friend class KGVPart; // emits our signals public: - KGVBrowserExtension( KGVPart* parent ); + KGVBrowserExtension( KGVPart* tqparent ); virtual ~KGVBrowserExtension() {} public slots: @@ -243,6 +245,7 @@ public slots: class KGVRun : public KRun { Q_OBJECT + TQ_OBJECT public: KGVRun( const KURL& url, mode_t mode = 0, diff --git a/kghostview/kgvconfigdialog.cpp b/kghostview/kgvconfigdialog.cpp index ed55df1e..6159a6f2 100644 --- a/kghostview/kgvconfigdialog.cpp +++ b/kghostview/kgvconfigdialog.cpp @@ -100,7 +100,7 @@ namespace { { if ( version < TQString::number( 6.53 ) ) return TQString::number( 6.53 ); if ( version[ 0 ] == '7' && version < TQString::number( 7.04 ) ) return TQString::number( 7.05 ); - return TQString::null; + return TQString(); } // This function should contain all the gs version specific workarounds. void redoGSDetection() @@ -114,13 +114,13 @@ namespace { "which are impossible to resolve. Please upgrade to a newer version.\n" "KGhostView will try to work with it, but it may not display any files at all.\n" "Version %2 seems to be appropriate on your system, although newer versions will work as well." ) - .arg( version ) - .arg( recommended ) ); + .tqarg( version ) + .tqarg( recommended ) ); } if ( version < TQString::number( 7.00 ) ) { TQStringList arguments = TQStringList::split( ' ', Configuration::antialiasingArguments() ); - arguments.remove( TQString::fromLatin1( "-dMaxBitmap=10000000" ) ); + arguments.remove( TQString::tqfromLatin1( "-dMaxBitmap=10000000" ) ); TQString antiAliasArgs = arguments.join( " " ); Configuration::setAntialiasingArguments( antiAliasArgs ); @@ -140,9 +140,9 @@ void ConfigDialog::showSettings( KGVPart* main ) { KConfigDialog* dialog = new KConfigDialog( 0, name, Configuration::self(), KDialogBase::IconList ); dialog->addPage( new GeneralSettingsWidget( 0, "general-settings" ), - i18n( "General" ), TQString::fromLatin1( "kghostview" ) ); + i18n( "General" ), TQString::tqfromLatin1( "kghostview" ) ); GSSettingsWidget *gssw = new GSSettingsWidget( 0, "gs-settings" ); - dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), TQString::fromLatin1( "pdf" ) ); + dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), TQString::tqfromLatin1( "pdf" ) ); gssw->setDetectedVersion(Configuration::version()); diff --git a/kghostview/kgvdocument.cpp b/kghostview/kgvdocument.cpp index 8b522f5d..9d314596 100644 --- a/kghostview/kgvdocument.cpp +++ b/kghostview/kgvdocument.cpp @@ -98,7 +98,7 @@ void KGVDocument::doOpenFile() KMessageBox::sorry( _part->widget(), i18n( "Could not open %1: " "File does not exist." ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return; } @@ -107,7 +107,7 @@ void KGVDocument::doOpenFile() KMessageBox::sorry( _part->widget(), i18n( "Could not open %1: " "Permission denied." ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return; } @@ -127,12 +127,12 @@ void KGVDocument::doOpenFile() if( _mimetype == "application/pdf" || _mimetype == "application/x-pdf" ) // see bug:67474 { - _tmpDSC = new KTempFile( TQString::null, ".ps" ); + _tmpDSC = new KTempFile( TQString(), ".ps" ); Q_CHECK_PTR( _tmpDSC ); if( _tmpDSC->status() != 0 ) { KMessageBox::error( _part->widget(), i18n( "Could not create temporary file: %1" ) - .arg( strerror( _tmpDSC->status() ) ) ); + .tqarg( strerror( _tmpDSC->status() ) ) ); emit canceled( TQString() ); return; } @@ -159,8 +159,8 @@ void KGVDocument::doOpenFile() "which has type %2. KGhostview can " "only load PostScript (.ps, .eps) and Portable " "Document Format (.pdf) files." ) - .arg( _fileName ) - .arg( _mimetype ) ); + .tqarg( _fileName ) + .tqarg( _mimetype ) ); emit canceled( TQString() ); return; } @@ -190,7 +190,7 @@ bool KGVDocument::uncompressFile() { KMessageBox::error( _part->widget(), i18n( "Could not uncompress %1." ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return false; } @@ -201,7 +201,7 @@ bool KGVDocument::uncompressFile() { KMessageBox::error( _part->widget(), i18n( "Could not create temporary file: %2" ) - .arg( strerror( _tmpUnzipped->status() ) ) ); + .tqarg( strerror( _tmpUnzipped->status() ) ) ); emit canceled( TQString() ); return false; } @@ -221,7 +221,7 @@ bool KGVDocument::uncompressFile() { KMessageBox::error( _part->widget(), i18n( "Could not uncompress %1." ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return false; } @@ -239,7 +239,7 @@ void KGVDocument::openPDFFileContinue( bool pdf2dscResult ) { KMessageBox::error( _part->widget(), i18n( "Could not open file %1." ) - .arg( _part->url().url() ) ); + .tqarg( _part->url().url() ) ); emit canceled( TQString() ); return; } @@ -260,8 +260,8 @@ void KGVDocument::openPSFile(const TQString &file) { KMessageBox::error( _part->widget(), i18n( "Error opening file %1: %2" ) - .arg( _part->url().url() ) - .arg( strerror( errno ) ) ); + .tqarg( _part->url().url() ) + .tqarg( strerror( errno ) ) ); emit canceled( "" ); return; } @@ -353,14 +353,14 @@ bool KGVDocument::convertFromPDF( const TQString& saveFileName, << "-dSAFER" << "-dPARANOIDSAFER" << "-sDEVICE=pswrite" - << ( TQCString("-sOutputFile=")+TQFile::encodeName(saveFileName) ) + << ( TQCString("-sOutputFile=")+TQFile::encodeName(saveFileName).data() ) << ( TQString("-dFirstPage=")+TQString::number( firstPage ) ) << ( TQString("-dLastPage=")+TQString::number( lastPage ) ) << "-c" << "save" << "pop" << "-f" - << TQFile::encodeName(_fileName); + << TQFile::encodeName(_fileName).data(); /*TQValueList args = process.args(); TQValueList::Iterator it = args.begin(); @@ -497,7 +497,7 @@ TQString KGVDocument::pageListToRange( const PageList& pageList ) if( bss == ess ) range += TQString::number( *ess ); else - range += TQString( "%1-%2" ).arg( *bss ).arg( *ess ); + range += TQString( "%1-%2" ).tqarg( *bss ).tqarg( *ess ); bss = it; } @@ -521,9 +521,9 @@ void KGVDocument::print() printer.setOption( "kde-range", pageListToRange( _part->markList()->markList() ) ); - if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) ) + if( printer.setup( _part->widget(), i18n("Print %1").tqarg(_part->url().fileName()) ) ) { - KTempFile tf( TQString::null, ".ps" ); + KTempFile tf( TQString(), ".ps" ); if( tf.status() == 0 ) { if ( printer.pageList().empty() ) { @@ -548,7 +548,7 @@ void KGVDocument::print() { printer.setPageSelection( KPrinter::SystemSide ); - if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) ) + if( printer.setup( _part->widget(), i18n("Print %1").tqarg(_part->url().fileName()) ) ) printer.printFiles( _fileName ); } } @@ -562,9 +562,9 @@ void KGVDocument::saveAs() _part->url().isLocalFile() ? _part->url().url() : _part->url().fileName(), - TQString::null, + TQString(), _part->widget(), - TQString::null ); + TQString() ); if( !KIO::NetAccess::upload( _fileName, saveURL, static_cast( 0 ) ) ) { @@ -580,7 +580,7 @@ bool KGVDocument::savePages( const TQString& saveFileName, if( _format == PDF ) { - KTempFile psSaveFile( TQString::null, ".ps" ); + KTempFile psSaveFile( TQString(), ".ps" ); psSaveFile.setAutoDelete( true ); if( psSaveFile.status() != 0 ) return false; @@ -590,8 +590,8 @@ bool KGVDocument::savePages( const TQString& saveFileName, for( PageList::const_iterator ci = pageList.begin(); ci != pageList.end(); ++ci ) { - minPage = QMIN( *ci, minPage ); - maxPage = QMAX( *ci, maxPage ); + minPage = TQMIN( *ci, minPage ); + maxPage = TQMAX( *ci, maxPage ); } @@ -774,14 +774,14 @@ void KGVDocument::runPdf2ps( const TQString& pdfName, KProcess process; process << _interpreterPath << "-dNODISPLAY" - << "-dQUIET" - << TQString( "-sPDFname=%1" ).arg( pdfName ) + << "-dTQUIET" + << TQString( "-sPDFname=%1" ).tqarg( pdfName ) << TQString( "-sDSCnamale locale( "kghostview" ); _fallBackPageMedia = pageSizeToString( static_cast< TQPrinter::PageSize >( locale.pageSize() ) ); _usePageLabels = false; -e=%1" ).arg( dscName ) +e=%1" ).tqarg( dscName ) << "pdf2dsc.ps" << "-c" << "quit"; @@ -801,8 +801,8 @@ void KGVDocument::pdf2psExited( KProcess* process ) } */ -Pdf2dsc::Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent, const char* name ) : - TQObject( parent, name ), +Pdf2dsc::Pdf2dsc( const TQString& ghostscriptPath, TQObject* tqparent, const char* name ) : + TQObject( tqparent, name ), _process( 0 ), _ghostscriptPath( ghostscriptPath ) {} @@ -822,9 +822,9 @@ void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName ) << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNODISPLAY" - << "-dQUIET" - << TQString( "-sPDFname=%1" ).arg( pdfName ) - << TQString( "-sDSCname=%1" ).arg( dscName ) + << "-dTQUIET" + << TQString( "-sPDFname=%1" ).tqarg( pdfName ) + << TQString( "-sDSCname=%1" ).tqarg( dscName ) << "-c" << "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe" << "-f" diff --git a/kghostview/kgvdocument.h b/kghostview/kgvdocument.h index 581e5ba8..dc68765b 100644 --- a/kghostview/kgvdocument.h +++ b/kghostview/kgvdocument.h @@ -31,9 +31,10 @@ class KPrinter; class KTempFile; class Pdf2dsc; -class KGVDocument : public QObject +class KGVDocument : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Format { PS, PDF }; @@ -116,7 +117,7 @@ protected: * kdelibs installed. Generally it will work for .gz and .bz2 */ bool uncompressFile(); - void openPSFile(const TQString &file=TQString::null); + void openPSFile(const TQString &file=TQString()); protected: bool savePages( const TQString& saveFileName, @@ -156,12 +157,13 @@ private: }; -class Pdf2dsc : public QObject +class Pdf2dsc : public TQObject { Q_OBJECT + TQ_OBJECT public: - Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent = 0, const char* name = 0 ); + Pdf2dsc( const TQString& ghostscriptPath, TQObject* tqparent = 0, const char* name = 0 ); ~Pdf2dsc(); void run( const TQString& pdfName, const TQString& dscName ); diff --git a/kghostview/kgvfactory.cpp b/kghostview/kgvfactory.cpp index d7a082b0..7a41aa57 100644 --- a/kghostview/kgvfactory.cpp +++ b/kghostview/kgvfactory.cpp @@ -52,8 +52,8 @@ KGVFactory *KGVFactory::s_self; KInstance *KGVFactory::s_instance; KAboutData *KGVFactory::s_aboutData; -KParts::Part *KGVFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +KParts::Part *KGVFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *className, const TQStringList &args_ ) { @@ -64,13 +64,13 @@ KParts::Part *KGVFactory::createPartObject( TQWidget *parentWidget, const char * * * as we did before. */ - args << TQString::fromLatin1( className ); + args << TQString::tqfromLatin1( className ); if ( !strcmp( className, "Browser/View" ) ) { className = "KParts::ReadOnlyPart"; } - KGVPart *part = KDEPrivate::ConcreteFactory::create( parentWidget, + KGVPart *part = KDEPrivate::ConcreteFactory::create( tqparentWidget, widgetName, - parent, + tqparent, name, className, args ); diff --git a/kghostview/kgvfactory.h b/kghostview/kgvfactory.h index 9a5d507f..67829b91 100644 --- a/kghostview/kgvfactory.h +++ b/kghostview/kgvfactory.h @@ -33,8 +33,8 @@ class KDE_EXPORT KGVFactory : public KParts::Factory static KInstance *instance(); static KAboutData *aboutData(); - virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, + virtual KParts::Part *createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *className, const TQStringList &args ); diff --git a/kghostview/kgvmainwidget.cpp b/kghostview/kgvmainwidget.cpp index 5e9bd40b..49823ad0 100644 --- a/kghostview/kgvmainwidget.cpp +++ b/kghostview/kgvmainwidget.cpp @@ -20,8 +20,8 @@ #include #include -KGVMainWidget::KGVMainWidget( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) {} +KGVMainWidget::KGVMainWidget( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) {} void KGVMainWidget::keyPressEvent( TQKeyEvent* event ) { diff --git a/kghostview/kgvmainwidget.h b/kghostview/kgvmainwidget.h index 99b9dc9b..0aa464d3 100644 --- a/kghostview/kgvmainwidget.h +++ b/kghostview/kgvmainwidget.h @@ -23,12 +23,13 @@ class KURL; -class KGVMainWidget : public QWidget +class KGVMainWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KGVMainWidget( TQWidget* parent = 0, const char* name = 0 ); + KGVMainWidget( TQWidget* tqparent = 0, const char* name = 0 ); signals: void spacePressed(); diff --git a/kghostview/kgvpagedecorator.cpp b/kghostview/kgvpagedecorator.cpp index b6304c1d..d7ea7e0d 100644 --- a/kghostview/kgvpagedecorator.cpp +++ b/kghostview/kgvpagedecorator.cpp @@ -23,8 +23,8 @@ #include "kgvpagedecorator.h" -KGVPageDecorator::KGVPageDecorator( TQWidget* parent, const char* name ) : - TQHBox( parent, name ), +KGVPageDecorator::KGVPageDecorator( TQWidget* tqparent, const char* name ) : + TQHBox( tqparent, name ), _margin( 5 ), _borderWidth( 1 ), _shadowOffset( 2, 2 ) @@ -63,7 +63,7 @@ void KGVPageDecorator::drawFrame( TQPainter* p ) if( !r.isValid() ) return; - const TQColorGroup& cg = colorGroup(); + const TQColorGroup& cg = tqcolorGroup(); r.moveCenter( r.center() + _shadowOffset ); qDrawPlainRect( p, r, cg.shadow(), _shadowOffset.manhattanLength() ); diff --git a/kghostview/kgvpagedecorator.h b/kghostview/kgvpagedecorator.h index 40839fdc..546063bf 100644 --- a/kghostview/kgvpagedecorator.h +++ b/kghostview/kgvpagedecorator.h @@ -21,10 +21,10 @@ #include -class KGVPageDecorator : public QHBox +class KGVPageDecorator : public TQHBox { public: - KGVPageDecorator( TQWidget* parent = 0, const char* name = 0 ); + KGVPageDecorator( TQWidget* tqparent = 0, const char* name = 0 ); ~KGVPageDecorator() { ; } unsigned int margin() const; @@ -49,13 +49,13 @@ protected: virtual void drawFrame( TQPainter* ); /** - * Draw the mask of both the frame and the contents in order to create a + * Draw the tqmask of both the frame and the contents in order to create a * partially transparent frame. */ virtual void drawMask( TQPainter* ); /** - * Reimplemented from TQWidget. It uses @ref drawMask() to draw the mask + * Reimplemented from TQWidget. It uses @ref drawMask() to draw the tqmask * of the frame when transparency is required. */ virtual void updateMask(); diff --git a/kghostview/kgvpageview.cpp b/kghostview/kgvpageview.cpp index 2cc5f7e6..577a8c98 100644 --- a/kghostview/kgvpageview.cpp +++ b/kghostview/kgvpageview.cpp @@ -22,13 +22,13 @@ #include "kgvpageview.h" -KGVPageView::KGVPageView( TQWidget* parent, const char* name ) - : TQScrollView( parent, name ) +KGVPageView::KGVPageView( TQWidget* tqparent, const char* name ) + : TQScrollView( tqparent, name ) { _page = 0; - setFocusPolicy( TQWidget::StrongFocus ); - viewport()->setFocusPolicy( TQWidget::WheelFocus ); + setFocusPolicy( TQ_StrongFocus ); + viewport()->setFocusPolicy( TQ_WheelFocus ); } void KGVPageView::setPage( TQWidget* page ) @@ -52,7 +52,7 @@ bool KGVPageView::atBottom() const bool KGVPageView::eventFilter( TQObject* o, TQEvent* e ) { - if ( o == _page && e->type() == TQEvent::Resize ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(_page) && e->type() == TQEvent::Resize ) { // We need to call TQScrollView::eventFilter before centerContents, // otherwise a loop will be introduced. bool result = TQScrollView::eventFilter( o, e ); @@ -88,16 +88,16 @@ void KGVPageView::wheelEvent( TQWheelEvent *e ) } void KGVPageView::mousePressEvent( TQMouseEvent * e ) { - if ( e->button() & LeftButton ) + if ( e->button() & Qt::LeftButton ) { _dragGrabPos = e -> globalPos(); setCursor( sizeAllCursor ); } - else if ( e->button() & MidButton ) + else if ( e->button() & Qt::MidButton ) { emit ReadDown(); } - else if ( e -> button() & RightButton ) + else if ( e -> button() & Qt::RightButton ) { emit rightClick(); } @@ -105,7 +105,7 @@ void KGVPageView::mousePressEvent( TQMouseEvent * e ) void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e -> button() & LeftButton ) + if ( e -> button() & Qt::LeftButton ) { setCursor( arrowCursor ); } @@ -113,7 +113,7 @@ void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) void KGVPageView::mouseMoveEvent( TQMouseEvent * e ) { - if ( e->state() & LeftButton ) + if ( e->state() & Qt::LeftButton ) { TQPoint delta = _dragGrabPos - e->globalPos(); scrollBy( delta.x(), delta.y() ); @@ -126,7 +126,7 @@ bool KGVPageView::readUp() if( atTop() ) return false; else { - int newValue = QMAX( verticalScrollBar()->value() - height() + 50, + int newValue = TQMAX( verticalScrollBar()->value() - height() + 50, verticalScrollBar()->minValue() ); /* @@ -148,7 +148,7 @@ bool KGVPageView::readDown() if( atBottom() ) return false; else { - int newValue = QMIN( verticalScrollBar()->value() + height() - 50, + int newValue = TQMIN( verticalScrollBar()->value() + height() - 50, verticalScrollBar()->maxValue() ); /* diff --git a/kghostview/kgvpageview.h b/kghostview/kgvpageview.h index 6f76f458..63f9c5af 100644 --- a/kghostview/kgvpageview.h +++ b/kghostview/kgvpageview.h @@ -27,12 +27,13 @@ * will be centered on the viewport. Furthermore it adds the ability to scroll * the page by dragging it using the mouse. */ -class KGVPageView : public QScrollView +class KGVPageView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - KGVPageView( TQWidget* parent = 0, const char* name = 0 ); + KGVPageView( TQWidget* tqparent = 0, const char* name = 0 ); ~KGVPageView() { ; } void setPage( TQWidget* ); diff --git a/kghostview/kgvshell.cpp b/kghostview/kgvshell.cpp index 708921ab..fcbda90c 100644 --- a/kghostview/kgvshell.cpp +++ b/kghostview/kgvshell.cpp @@ -50,7 +50,7 @@ #include "displayoptions.h" #include "fullscreenfilter.h" -#undef Always // avoid X11/Qt namespace clash +#undef Always // avoid X11/TQt namespace clash #include "kgvshell.moc" //TODO -- disable GUI when no file @@ -60,29 +60,29 @@ KGVShell::KGVShell() : _tmpFile( 0 ) { m_gvpart = KParts::ComponentFactory::createPartInstanceFromLibrary< KGVPart >( "libkghostviewpart", this, "kgvpart", - this, "kgvpart" ); + TQT_TQOBJECT(this), "kgvpart" ); /*---- File -----------------------------------------------------------*/ openact = - KStdAction::open( this, TQT_SLOT( slotFileOpen() ), + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection() ); recent = - KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ), + KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); KStdAction::print( m_gvpart->document(), TQT_SLOT( print() ), actionCollection() ); (void) - KStdAction::quit( this, TQT_SLOT( slotQuit() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotQuit() ), actionCollection() ); /*---- View -----------------------------------------------------------*/ new KAction( i18n( "&Reload" ), "reload", KStdAccel::shortcut( KStdAccel::Reload ), m_gvpart, TQT_SLOT( reloadFile() ), actionCollection(), "reload" ); - new KAction( i18n( "&Maximize" ), Key_M, this, + new KAction( i18n( "&Maximize" ), Key_M, TQT_TQOBJECT(this), TQT_SLOT( slotMaximize() ), actionCollection(), "maximize"); - _showMenuBarAction = KStdAction::showMenubar( this, TQT_SLOT( slotShowMenubar() ), actionCollection() ); + _showMenuBarAction = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotShowMenubar() ), actionCollection() ); /*---- Settings -------------------------------------------------------*/ #if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90) @@ -91,11 +91,11 @@ KGVShell::KGVShell() : setAutoSaveSettings(); setStandardToolBarMenuEnabled(true); #if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90) - m_fullScreenAction = KStdAction::fullScreen( this, TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); + m_fullScreenAction = KStdAction::fullScreen( TQT_TQOBJECT(this), TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); #else m_fullScreenAction = new KToggleAction( this, TQT_SLOT( slotUpdateFullScreen() ) ); #endif - KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); + KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); @@ -115,7 +115,7 @@ actionCollection()); // We could, at the user's option, make this connection and kghostview // will always resize to fit the width of the page. But, for now, // let's not. - // connect ( m_gvpart->widget(), TQT_SIGNAL (sizeHintChanged()), this, TQT_SLOT (slotResize ()) ); + // connect ( m_gvpart->widget(), TQT_SIGNAL (tqsizeHintChanged()), this, TQT_SLOT (slotResize ()) ); setCentralWidget( m_gvpart->widget() ); createGUI( m_gvpart ); @@ -252,7 +252,7 @@ KGVShell::openStdin() if( _tmpFile->status() != 0 ) { KMessageBox::error( this, i18n( "Could not create temporary file: %1" ) - .arg( strerror( _tmpFile->status() ) ) ); + .tqarg( strerror( _tmpFile->status() ) ) ); return; } @@ -269,7 +269,7 @@ KGVShell::openStdin() if( read != 0 ) { KMessageBox::error( this, i18n( "Could not open standard input stream: %1" ) - .arg( strerror( errno ) ) ); + .tqarg( strerror( errno ) ) ); return; } @@ -309,7 +309,7 @@ void KGVShell::slotMaximize() void KGVShell::slotResize() { - resize( m_gvpart->pageView()->sizeHint().width(), height() ); + resize( m_gvpart->pageView()->tqsizeHint().width(), height() ); } void KGVShell::setFullScreen( bool useFullScreen ) diff --git a/kghostview/kgvshell.h b/kghostview/kgvshell.h index 73b7f128..7152fc88 100644 --- a/kghostview/kgvshell.h +++ b/kghostview/kgvshell.h @@ -38,6 +38,7 @@ class FullScreenFilter; class KDE_EXPORT KGVShell : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: KGVShell(); diff --git a/kghostview/kpswidget.cpp b/kghostview/kpswidget.cpp index 85f22827..389b5284 100644 --- a/kghostview/kpswidget.cpp +++ b/kghostview/kpswidget.cpp @@ -80,8 +80,8 @@ TQCString palette2String( Configuration::EnumPalette::type palette ) } -KPSWidget::KPSWidget( TQWidget* parent, const char* name ) : - TQWidget ( parent, name ), +KPSWidget::KPSWidget( TQWidget* tqparent, const char* name ) : + TQWidget ( tqparent, name ), _gsWindow ( None ), _usePipe ( false ), _doubleBuffer ( false ), @@ -279,8 +279,8 @@ void KPSWidget::setupWidget() Q_ASSERT( orientation() != CDSC_ORIENT_UNKNOWN ); - const float dpiX = _magnification * x11AppDpiX(); - const float dpiY = _magnification * x11AppDpiY(); + const float dpiX = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiX(); + const float dpiY = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiY(); int newWidth = 0, newHeight = 0; if( orientation() == CDSC_PORTRAIT || orientation() == CDSC_UPSIDEDOWN ) @@ -333,7 +333,7 @@ void KPSWidget::setupWidget() // Make sure the properties are updated immediately. XSync( x11Display(), false ); - repaint(); + tqrepaint(); _widgetDirty = false; } @@ -343,7 +343,7 @@ bool KPSWidget::startInterpreter() setupWidget(); _process = new KProcess; - if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) ); + if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).tqarg( winId() ).tqarg( _backgroundPixmap.handle() ) ); else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) ); *_process << _ghostscriptPath.local8Bit(); @@ -420,7 +420,7 @@ void KPSWidget::slotProcessExited( KProcess* process ) { kdDebug( 4500 ) << "KPSWidget::slotProcessExited(): looks like it was not a clean exit." << endl; if ( process->normalExit() ) { - emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).arg( process->exitStatus() ) ) ); + emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).tqarg( process->exitStatus() ) ) ); } else { emit ghostscriptError( TQString( i18n( "Process killed or crashed." ) ) ); } @@ -464,7 +464,7 @@ void KPSWidget::gs_input( KProcess* process ) const unsigned buffer_size = 4096; if ( !_buffer ) _buffer = static_cast( operator new( buffer_size ) ); const int bytesRead = fread( _buffer, sizeof (char), - QMIN( buffer_size, current.len ), + TQMIN( buffer_size, current.len ), current.fp ); if( bytesRead > 0 ) { @@ -493,7 +493,7 @@ void KPSWidget::readSettings() if( !Configuration::platformFonts() ) arguments << "-dNOPLATFONTS"; - arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER" << "-dPARANOIDSAFER"; + arguments << "-dNOPAUSE" << "-dTQUIET" << "-dSAFER" << "-dPARANOIDSAFER"; setGhostscriptArguments( arguments ); diff --git a/kghostview/kpswidget.h b/kghostview/kpswidget.h index c2ca49cb..3420aa6b 100644 --- a/kghostview/kpswidget.h +++ b/kghostview/kpswidget.h @@ -43,12 +43,13 @@ class MessagesDialog; * @ref ghostscript_interface */ -class KPSWidget : public QWidget +class KPSWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KPSWidget( TQWidget* parent = 0, const char* name = 0 ); + KPSWidget( TQWidget* tqparent = 0, const char* name = 0 ); ~KPSWidget(); /** diff --git a/kghostview/logwindow.cpp b/kghostview/logwindow.cpp index 69c61ac3..f3f41deb 100644 --- a/kghostview/logwindow.cpp +++ b/kghostview/logwindow.cpp @@ -27,8 +27,8 @@ #include "logwindow.h" LogWindow::LogWindow( const TQString& caption, - TQWidget* parent, const char* name) : - KDialogBase( parent, name, false, caption, User1|Close, Close, false, + TQWidget* tqparent, const char* name) : + KDialogBase( tqparent, name, false, caption, User1|Close, Close, false, KStdGuiItem::clear() ) { TQVBox * display = makeVBoxMainWidget(); @@ -36,11 +36,11 @@ LogWindow::LogWindow( const TQString& caption, _errorIndication = new TQLabel( "", display, "logview-label" ); _errorIndication->hide(); - _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), TQString::null, display ); + _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), TQString(), display ); _configureGS->hide(); _logView = new TQTextEdit( display, "logview" ); - _logView->setTextFormat( Qt::PlainText ); + _logView->setTextFormat( TQt::PlainText ); _logView->setReadOnly( true ); _logView->setWordWrap( TQTextEdit::NoWrap ); _logView->setFont( KGlobalSettings::fixedFont() ); diff --git a/kghostview/logwindow.h b/kghostview/logwindow.h index 7be4bf98..277bcdfd 100644 --- a/kghostview/logwindow.h +++ b/kghostview/logwindow.h @@ -28,10 +28,11 @@ class KURLLabel; class LogWindow : public KDialogBase { Q_OBJECT + TQ_OBJECT public: LogWindow( const TQString& caption, - TQWidget* parent = 0, const char* name = 0 ); + TQWidget* tqparent = 0, const char* name = 0 ); public slots: void append( const TQString& message ); diff --git a/kghostview/marklist.cpp b/kghostview/marklist.cpp index df06bd9d..50aa4cbc 100644 --- a/kghostview/marklist.cpp +++ b/kghostview/marklist.cpp @@ -32,8 +32,8 @@ #include "kgv_miniwidget.h" -MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum) - : TQWidget( parent ), +MarkListItem::MarkListItem(TQWidget *tqparent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum) + : TQWidget( tqparent ), _miniWidget( miniW ), _pageNum( pageNum ), _requested( false ) @@ -43,7 +43,7 @@ MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQStrin _thumbnailW = new TQWidget( this ); _checkBox = new TQCheckBox( text, this ); l->addWidget( _thumbnailW, 1 ); - l->addWidget( _checkBox, 0, Qt::AlignHCenter ); + l->addWidget( _checkBox, 0, TQt::AlignHCenter ); TQWhatsThis::add( _checkBox, i18n( "Using this checkbox you can select pages for printing." ) ); setFixedHeight( 100 ); _backgroundColor = color; @@ -72,22 +72,27 @@ void MarkListItem::setPixmap( TQPixmap thumbnail ) // The line below is needed to work around certain "features" of styles such as liquid // see bug:61711 for more info (LPC, 20 Aug '03) _thumbnailW->setBackgroundOrigin( TQWidget::WidgetOrigin ); - _thumbnailW->setPaletteBackgroundPixmap( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) ); + TQPixmap pm; + pm.convertFromImage( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) ); + _thumbnailW->setPaletteBackgroundPixmap( pm ); _requested = false; } void MarkListItem::setSelected( bool selected ) { if (selected) - setPaletteBackgroundColor( TQApplication::palette().active().highlight() ); + setPaletteBackgroundColor( TQApplication::tqpalette().active().highlight() ); else setPaletteBackgroundColor( _backgroundColor ); } void MarkListItem::resizeEvent( TQResizeEvent * ) { - if ( _thumbnailW->paletteBackgroundPixmap() ) - _thumbnailW->setPaletteBackgroundPixmap( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) ); + if ( _thumbnailW->paletteBackgroundPixmap() ) { + TQPixmap pm; + pm.convertFromImage( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) ); + _thumbnailW->setPaletteBackgroundPixmap( pm ); + } } void MarkListItem::paintEvent( TQPaintEvent* ) @@ -100,7 +105,7 @@ void MarkListItem::paintEvent( TQPaintEvent* ) */ if ( _requested ) return; if ( !_thumbnailW->paletteBackgroundPixmap() || _thumbnailW->paletteBackgroundPixmap()->isNull() ) { - _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, TQT_SLOT( setPixmap( TQPixmap ) ) ); + _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, TQT_TQOBJECT(this), TQT_SLOT( setPixmap( TQPixmap ) ) ); _requested = true; } } @@ -108,8 +113,8 @@ void MarkListItem::paintEvent( TQPaintEvent* ) /* MarkList */ -MarkList::MarkList( TQWidget* parent, const char* name, KGVMiniWidget* mini) - : TQTable( parent, name ), +MarkList::MarkList( TQWidget* tqparent, const char* name, KGVMiniWidget* mini) + : TQTable( tqparent, name ), _selected ( -1 ), _miniWidget( mini ) { diff --git a/kghostview/marklist.h b/kghostview/marklist.h index 4405f877..1977a18d 100644 --- a/kghostview/marklist.h +++ b/kghostview/marklist.h @@ -24,11 +24,12 @@ class KGVMiniWidget; -class MarkListItem : public QWidget +class MarkListItem : public TQWidget { Q_OBJECT + TQ_OBJECT public: - MarkListItem( TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget*, int ); + MarkListItem( TQWidget *tqparent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget*, int ); bool isChecked() const; @@ -51,16 +52,17 @@ private: bool _requested; }; -class MarkList: public QTable +class MarkList: public TQTable { Q_OBJECT + TQ_OBJECT public: - MarkList( TQWidget* parent = 0, const char* name = 0, KGVMiniWidget* = 0 ); + MarkList( TQWidget* tqparent = 0, const char* name = 0, KGVMiniWidget* = 0 ); TQValueList markList() const; void insertItem( const TQString& text, int index = -1, - const TQString& tip = TQString::null ); + const TQString& tip = TQString() ); public slots: void select( int index ); diff --git a/kghostview/scrollbox.cpp b/kghostview/scrollbox.cpp index d318ec31..f9c23904 100644 --- a/kghostview/scrollbox.cpp +++ b/kghostview/scrollbox.cpp @@ -22,8 +22,8 @@ #include "scrollbox.h" -ScrollBox::ScrollBox( TQWidget* parent, const char* name ) - : TQFrame( parent, name ) +ScrollBox::ScrollBox( TQWidget* tqparent, const char* name ) + : TQFrame( tqparent, name ) { setFrameStyle( Panel | Sunken ); } @@ -31,15 +31,15 @@ ScrollBox::ScrollBox( TQWidget* parent, const char* name ) void ScrollBox::mousePressEvent( TQMouseEvent* e ) { mouse = e->pos(); - if( e->button() == RightButton ) + if( e->button() == Qt::RightButton ) emit button3Pressed(); - if( e->button() == MidButton ) + if( e->button() == Qt::MidButton ) emit button2Pressed(); } void ScrollBox::mouseMoveEvent( TQMouseEvent* e ) { - if( e->state() != LeftButton ) + if( e->state() != Qt::LeftButton ) return; int dx = ( e->pos().x() - mouse.x() ) * pagesize.width() / width(); @@ -57,8 +57,11 @@ void ScrollBox::mouseMoveEvent( TQMouseEvent* e ) void ScrollBox::resizeEvent( TQResizeEvent * ) { - if ( paletteBackgroundPixmap() ) - setPaletteBackgroundPixmap( paletteBackgroundPixmap()->convertToImage().smoothScale( size() ) ); + if ( paletteBackgroundPixmap() ) { + TQPixmap pm; + pm.convertFromImage(paletteBackgroundPixmap()->convertToImage().smoothScale( size() )); + setPaletteBackgroundPixmap( pm ); + } } void ScrollBox::drawContents( TQPainter* paint ) @@ -77,7 +80,7 @@ void ScrollBox::drawContents( TQPainter* paint ) TQRect c( contentsRect() ); - paint -> setPen( Qt::red ); + paint -> setPen( TQt::red ); int len = pagesize.width(); int x = c.x() + c.width() * viewpos.x() / len; @@ -96,19 +99,19 @@ void ScrollBox::setPageSize( const TQSize& s ) { pagesize = s; setFixedHeight( s.height() * width() / s.width() ); - repaint(); + tqrepaint(); } void ScrollBox::setViewSize( const TQSize& s ) { viewsize = s; - repaint(); + tqrepaint(); } void ScrollBox::setViewPos( const TQPoint& pos ) { viewpos = pos; - repaint(); + tqrepaint(); } void ScrollBox::setThumbnail( TQPixmap img ) @@ -116,7 +119,9 @@ void ScrollBox::setThumbnail( TQPixmap img ) // The line below is needed to work around certain "features" of styles such as liquid // see bug:61711 for more info (LPC, 20 Aug '03) setBackgroundOrigin( TQWidget::WidgetOrigin ); - setPaletteBackgroundPixmap( img.convertToImage().smoothScale( size() ) ); + TQPixmap pm; + pm.convertFromImage(img.convertToImage().smoothScale( size() )); + setPaletteBackgroundPixmap( pm ); } void ScrollBox::clear() diff --git a/kghostview/scrollbox.h b/kghostview/scrollbox.h index 487e2c7e..04722166 100644 --- a/kghostview/scrollbox.h +++ b/kghostview/scrollbox.h @@ -22,12 +22,13 @@ #include #include -class ScrollBox: public QFrame +class ScrollBox: public TQFrame { Q_OBJECT + TQ_OBJECT public: - ScrollBox( TQWidget* parent = 0, const char* name = 0 ); + ScrollBox( TQWidget* tqparent = 0, const char* name = 0 ); public slots: void setPageSize( const TQSize& ); diff --git a/kghostview/thumbnailservice.cpp b/kghostview/thumbnailservice.cpp index 817d1c03..9887ec4b 100644 --- a/kghostview/thumbnailservice.cpp +++ b/kghostview/thumbnailservice.cpp @@ -28,14 +28,14 @@ #include #include -ThumbnailService::ThumbnailService( KGVMiniWidget* parent, const char* name ) : - TQObject( parent, name ), - _mini( parent ), +ThumbnailService::ThumbnailService( KGVMiniWidget* tqparent, const char* name ) : + TQObject( tqparent, name ), + _mini( tqparent ), timer_( new TQTimer( this ) ), _busy( false ), _enabled( false ) { - _thumbnailDrawer = new KPSWidget( parent->_part->widget(), "thumbnail-drawer" ); + _thumbnailDrawer = new KPSWidget( tqparent->_part->widget(), "thumbnail-drawer" ); _thumbnailDrawer->readSettings(); connect( _thumbnailDrawer, TQT_SIGNAL( newPageImage( TQPixmap ) ), TQT_SLOT( slotDone( TQPixmap ) ) ); connect( timer_, TQT_SIGNAL( timeout() ), TQT_SLOT( processOne() ) ); diff --git a/kghostview/thumbnailservice.h b/kghostview/thumbnailservice.h index 50bc2d6d..e57f18bf 100644 --- a/kghostview/thumbnailservice.h +++ b/kghostview/thumbnailservice.h @@ -30,8 +30,9 @@ class TQTimer; class ThumbnailService : public TQObject { Q_OBJECT + TQ_OBJECT public: - ThumbnailService( KGVMiniWidget* parent, const char* name = 0 ); + ThumbnailService( KGVMiniWidget* tqparent, const char* name = 0 ); ~ThumbnailService(); public slots: diff --git a/kghostview/viewcontrol.cpp b/kghostview/viewcontrol.cpp index 1740bf4d..5a912a0c 100644 --- a/kghostview/viewcontrol.cpp +++ b/kghostview/viewcontrol.cpp @@ -25,10 +25,10 @@ #include #include -ViewControl::ViewControl( TQWidget *parent, const char *name ) - : TQDialog( parent, name ) +ViewControl::ViewControl( TQWidget *tqparent, const char *name ) + : TQDialog( tqparent, name ) { - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); TQBoxLayout *topLayout = new TQVBoxLayout( this, 10 ); @@ -36,7 +36,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) vcGroupBox = new TQGroupBox( this ); vcGroupBox->setFrameStyle( TQFrame::NoFrame ); //vcGroupBox->setTitle( i18n("Force Changes To") ); - //vcGroupBox->setAlignment( 1 ); + //vcGroupBox->tqsetAlignment( 1 ); topLayout->addWidget( vcGroupBox, 10 ); @@ -51,7 +51,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) magComboBox = new TQComboBox( FALSE, vcGroupBox ); - magComboBox->setFixedHeight( magComboBox->sizeHint().height() ); + magComboBox->setFixedHeight( magComboBox->tqsizeHint().height() ); //magComboBox->hide(); @@ -63,7 +63,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) mediaComboBox = new TQComboBox( FALSE, vcGroupBox ); - mediaComboBox->setFixedHeight( magComboBox->sizeHint().height() ); + mediaComboBox->setFixedHeight( magComboBox->tqsizeHint().height() ); connect ( mediaComboBox, TQT_SIGNAL (activated (int)), this, TQT_SLOT (slotMediaSelection (int)) ); @@ -75,7 +75,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) orientComboBox->insertItem(i18n("Landscape")); orientComboBox->insertItem(i18n("Seascape")); orientComboBox->insertItem(i18n("Upside Down")); - orientComboBox->setFixedHeight( magComboBox->sizeHint().height() ); + orientComboBox->setFixedHeight( magComboBox->tqsizeHint().height() ); connect ( orientComboBox, TQT_SIGNAL (activated (int)), this, TQT_SLOT (slotOrientSelection (int)) ); @@ -85,9 +85,9 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) TQLabel* vcLabel; vcLabel = new TQLabel( magComboBox, i18n("&Magnification"), vcGroupBox ); - vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix ); - if ( vcLabel->sizeHint().width() > labelWidth ) - labelWidth = vcLabel->sizeHint().width(); + vcLabel->tqsetAlignment( AlignRight | AlignVCenter | ShowPrefix ); + if ( vcLabel->tqsizeHint().width() > labelWidth ) + labelWidth = vcLabel->tqsizeHint().width(); vcLabel->setMinimumWidth( labelWidth ); vcLabel->hide(); @@ -96,24 +96,24 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) vcLabel = new TQLabel( mediaComboBox, i18n("M&edia"), vcGroupBox ); - vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix ); - if ( vcLabel->sizeHint().width() > labelWidth ) - labelWidth = vcLabel->sizeHint().width(); + vcLabel->tqsetAlignment( AlignRight | AlignVCenter | ShowPrefix ); + if ( vcLabel->tqsizeHint().width() > labelWidth ) + labelWidth = vcLabel->tqsizeHint().width(); vcLabel->setMinimumWidth( labelWidth ); grid->addWidget( vcLabel, 1, 0 ); - vcLabel = new TQLabel( orientComboBox, i18n("&Orientation"), vcGroupBox ); - vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix ); - if ( vcLabel->sizeHint().width() > labelWidth ) - labelWidth = vcLabel->sizeHint().width(); + vcLabel = new TQLabel( orientComboBox, i18n("&Qt::Orientation"), vcGroupBox ); + vcLabel->tqsetAlignment( AlignRight | AlignVCenter | ShowPrefix ); + if ( vcLabel->tqsizeHint().width() > labelWidth ) + labelWidth = vcLabel->tqsizeHint().width(); vcLabel->setMinimumWidth( labelWidth ); grid->addWidget( vcLabel, 2, 0 ); - vcGroupBox->setMinimumHeight( 2*orientComboBox->sizeHint().height()+20 ); + vcGroupBox->setMinimumHeight( 2*orientComboBox->tqsizeHint().height()+20 ); vcGroupBox->setMinimumWidth( - 40 + labelWidth + orientComboBox->sizeHint().width() ); + 40 + labelWidth + orientComboBox->tqsizeHint().width() ); KSeparator* sep = new KSeparator( KSeparator::HLine, this); topLayout->addWidget( sep ); @@ -130,7 +130,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) connect( closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); - bbox->layout(); + bbox->tqlayout(); topLayout->addWidget( bbox ); topLayout->activate(); diff --git a/kghostview/viewcontrol.h b/kghostview/viewcontrol.h index de766247..7f2c07c1 100644 --- a/kghostview/viewcontrol.h +++ b/kghostview/viewcontrol.h @@ -6,11 +6,12 @@ class TQComboBox; class TQPushButton; -class ViewControl : public QDialog +class ViewControl : public TQDialog { Q_OBJECT + TQ_OBJECT public: - ViewControl( TQWidget *parent, const char *name ); + ViewControl( TQWidget *tqparent, const char *name ); TQComboBox* magComboBox; TQComboBox* mediaComboBox; TQComboBox* orientComboBox; diff --git a/kiconedit/kcolorgrid.cpp b/kiconedit/kcolorgrid.cpp index 35b0dfaa..e08529e1 100644 --- a/kiconedit/kcolorgrid.cpp +++ b/kiconedit/kcolorgrid.cpp @@ -69,8 +69,8 @@ uint KColorArray::closestMatch(uint color) return c|OPAQUE_MASK; } -KColorGrid::KColorGrid(TQWidget *parent, const char *name, int space) - : TQWidget(parent, name, Qt::WResizeNoErase|Qt::WRepaintNoErase) +KColorGrid::KColorGrid(TQWidget *tqparent, const char *name, int space) + : TQWidget(tqparent, name, TQt::WResizeNoErase|TQt::WRepaintNoErase) { //kdDebug(4640) << "KColorGrid - constructor" << endl; s = space; @@ -163,7 +163,7 @@ void KColorGrid::resizeEvent(TQResizeEvent *) } */ -TQSize KColorGrid::sizeHint() const +TQSize KColorGrid::tqsizeHint() const { return TQSize(totalwidth, totalheight); } @@ -203,7 +203,7 @@ void KColorGrid::setNumRows(int n) rows = n; gridcolors.resize(n*numCols()); - //QTableView::setNumRows(n); + //TQTableView::setNumRows(n); totalheight = (n * cellsize) + 1; resize(totalwidth, totalheight); //kdDebug(4640) << "setNumRows() - gridcolors: " << gridcolors.size() << " size: " << numCols()*numRows() << endl; @@ -269,9 +269,9 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) return; //kdDebug(4640) << "KColorGrid::setColor - before adding" << endl; - if(!numcolors.contains(col)) + if(!numcolors.tqcontains(col)) { - //kdDebug(4640) << "KColorGrid::setColor() - adding " << // col << " - " << qRed(col) << " " << qGreen(col) << " " << qBlue(col) << endl; + //kdDebug(4640) << "KColorGrid::setColor() - adding " << // col << " - " << tqRed(col) << " " << tqGreen(col) << " " << tqBlue(col) << endl; numcolors.append(col); //kdDebug(4640) << "KColorGrid::setColor() - adding done " << numcolors.size()-1 << endl; //numcolors++; @@ -279,12 +279,12 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) } //kdDebug(4640) << "KColorGrid::setColor - before removing" << endl; - if(!gridcolors.contains(oldcolor)) + if(!gridcolors.tqcontains(oldcolor)) { - int idx = numcolors.find(oldcolor); + int idx = numcolors.tqfind(oldcolor); if(idx != -1) { - //kdDebug(4640) << "KColorGrid::setColor() - removing " << // oldcolor << " - " << qRed(oldcolor) << " " << qGreen(oldcolor) << " " << qBlue(oldcolor) << endl; + //kdDebug(4640) << "KColorGrid::setColor() - removing " << // oldcolor << " - " << tqRed(oldcolor) << " " << tqGreen(oldcolor) << " " << tqBlue(oldcolor) << endl; numcolors.remove(idx); //kdDebug(4640) << "KColorGrid::setColor() - removing done" << endl; emit colorschanged(numcolors.size(), numcolors.data()); @@ -293,14 +293,14 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) } //kdDebug(4640) << "KColorGrid::setColor - before updateCell" << endl; - repaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize, cellsize, cellsize); + tqrepaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize, cellsize, cellsize); //updateCell( colNum/numCols(), colNum%numCols(), false ); //kdDebug(4640) << "KColorGrid::setColor - after updateCell" << endl; } void KColorGrid::updateCell( int row, int col, bool ) { - //kdDebug(4640) << "updateCell - before repaint" << endl; + //kdDebug(4640) << "updateCell - before tqrepaint" << endl; TQWMatrix matrix; TQPainter p; p.begin( this ); @@ -317,7 +317,7 @@ void KColorGrid::updateColors() for(int i = 0; i < (int)gridcolors.size(); i++) { uint col = gridcolors.at(i); - if(!numcolors.contains(col)) + if(!numcolors.tqcontains(col)) numcolors.append(col); } emit colorschanged(numcolors.size(), numcolors.data()); @@ -330,6 +330,6 @@ void KColorGrid::setCellSize( int s ) totalheight = (numRows() * s) + 1; resize(totalwidth, totalheight); if ( isVisible() ) - repaint(viewRect(), false); + tqrepaint(viewRect(), false); } #include "kcolorgrid.moc" diff --git a/kiconedit/kcolorgrid.h b/kiconedit/kcolorgrid.h index 76091b45..00a3d478 100644 --- a/kiconedit/kcolorgrid.h +++ b/kiconedit/kcolorgrid.h @@ -37,12 +37,13 @@ public: uint closestMatch(uint); }; -class KColorGrid : public QWidget +class KColorGrid : public TQWidget { private: Q_OBJECT + TQ_OBJECT public: - KColorGrid( TQWidget * parent = 0, const char *name = 0, int spacing = 0); + KColorGrid( TQWidget * tqparent = 0, const char *name = 0, int spacing = 0); virtual ~KColorGrid() {}; enum GridState { Plain, Shaded }; @@ -55,7 +56,7 @@ public: bool hasGrid() { return hasgrid; } uint numColors() { return numcolors.size(); } uint colors( uint *c ) { c = numcolors.data(); return numcolors.size(); } - bool contains(uint c) { return numcolors.contains(c); } + bool tqcontains(uint c) { return numcolors.tqcontains(c); } uint colorAt(int idx) { return gridcolors.at(idx); } uint *data() {return numcolors.data(); } void fill(uint color); @@ -64,7 +65,7 @@ public: virtual void setCellSize( int s ); virtual int cellSize() { return cellsize; } - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; void setSize(const TQSize s) { setNumRows(s.height()); setNumCols(s.width()); } diff --git a/kiconedit/kicon.cpp b/kiconedit/kicon.cpp index 9da72c9b..f1f31590 100644 --- a/kiconedit/kicon.cpp +++ b/kiconedit/kicon.cpp @@ -32,8 +32,8 @@ #include "kicon.h" #include "utils.h" -KIconEditIcon::KIconEditIcon(TQObject *parent, const TQImage *img, KURL url) - : TQObject(parent) +KIconEditIcon::KIconEditIcon(TQObject *tqparent, const TQImage *img, KURL url) + : TQObject(tqparent) { f = 0; _lastdir = "/"; @@ -70,8 +70,8 @@ bool KIconEditIcon::open(const TQImage *image, KURL url) if(!url.isValid()) // Giving up { - TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url()); - KMessageBox::sorry((TQWidget*)parent(), msg); + TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").tqarg(url.url()); + KMessageBox::sorry((TQWidget*)tqparent(), msg); return false; } } @@ -84,10 +84,10 @@ bool KIconEditIcon::open(const TQImage *image, KURL url) } else { - if(!KIO::NetAccess::download( url, filename, (TQWidget*)parent() )) + if(!KIO::NetAccess::download( url, filename, (TQWidget*)tqparent() )) { - TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL()); - KMessageBox::error((TQWidget*)parent(), msg); + TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL()); + KMessageBox::error((TQWidget*)tqparent(), msg); return false; } } @@ -101,8 +101,8 @@ bool KIconEditIcon::open(const TQImage *image, KURL url) if(!loadedOk) { - TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL()); - KMessageBox::error((TQWidget*)parent(), msg); + TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL()); + KMessageBox::error((TQWidget*)tqparent(), msg); } else { @@ -152,10 +152,10 @@ bool KIconEditIcon::promptForFile(const TQImage *img) "*.ico|Icon files (*.ico)\n"); - KURL url = KFileDialog::getOpenURL( TQString::null, filter ); + KURL url = KFileDialog::getOpenURL( TQString(), filter ); */ bool loaded = false; - KURL url = KFileDialog::getImageOpenURL( TQString::null, static_cast(parent()) ); + KURL url = KFileDialog::getImageOpenURL( TQString(), TQT_TQWIDGET(tqparent()) ); if( !url.isEmpty() ) { @@ -174,7 +174,7 @@ bool KIconEditIcon::saveAs(const TQImage *image) TQString file; //Get list of file types.. - KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, static_cast(parent()), "file dialog", true); + KFileDialog *dialog=new KFileDialog(TQString(), TQString(), TQT_TQWIDGET(tqparent()), "file dialog", true); dialog->setCaption( i18n("Save Icon As") ); dialog->setKeepLocation( true ); dialog->setMimeFilter( KImageIO::mimeTypes(KImageIO::Writing), "image/png" ); @@ -206,9 +206,9 @@ bool KIconEditIcon::saveAs(const TQImage *image) if(TQFile::exists(file)) { - int r=KMessageBox::warningContinueCancel(static_cast(parent()), + int r=KMessageBox::warningContinueCancel(TQT_TQWIDGET(tqparent()), i18n( "A file named \"%1\" already exists. " - "Overwrite it?" ).arg(file), + "Overwrite it?" ).tqarg(file), i18n( "Overwrite File?" ), i18n( "&Overwrite" ) ); @@ -265,8 +265,8 @@ bool KIconEditIcon::save(const TQImage *image, const TQString &_filename) } else { - TQString msg = i18n("There was an error saving:\n%1\n").arg(str); - KMessageBox::error((TQWidget*)parent(), msg); + TQString msg = i18n("There was an error saving:\n%1\n").tqarg(str); + KMessageBox::error((TQWidget*)tqparent(), msg); kdDebug(4640) << "KIconEditIcon::save - " << msg << endl; } diff --git a/kiconedit/kicon.h b/kiconedit/kicon.h index d808995e..f38e4cca 100644 --- a/kiconedit/kicon.h +++ b/kiconedit/kicon.h @@ -43,9 +43,10 @@ class TQImage; -class KIconEditIcon : public QObject +class KIconEditIcon : public TQObject { Q_OBJECT + TQ_OBJECT public: KIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() ); ~KIconEditIcon(); @@ -57,7 +58,7 @@ public: public slots: bool open(const TQImage*, KURL url = KURL()); bool promptForFile(const TQImage*); - bool save(const TQImage*, const TQString &filename=TQString::null); + bool save(const TQImage*, const TQString &filename=TQString()); bool saveAs(const TQImage*); signals: diff --git a/kiconedit/kiconcolors.cpp b/kiconedit/kiconcolors.cpp index d3046ad4..c2042432 100644 --- a/kiconedit/kiconcolors.cpp +++ b/kiconedit/kiconcolors.cpp @@ -25,7 +25,7 @@ #include "kiconcolors.h" -KDrawColors::KDrawColors(TQWidget *parent) : KColorGrid(parent, 0, 3) +KDrawColors::KDrawColors(TQWidget *tqparent) : KColorGrid(tqparent, 0, 3) { kdDebug(4640) << "KDrawColors - constructor" << endl; setCellSize(17); @@ -43,7 +43,7 @@ void KDrawColors::paintCell( TQPainter *painter, int row, int col ) int d = spacing(); qDrawShadePanel( painter, d, d, cellSize()-d, cellSize()-d, - colorGroup(), true, 1, &brush); + tqcolorGroup(), true, 1, &brush); if ( row * numCols() + col == selected) painter->drawWinFocusRect( d+1, d+1, cellSize()-(2*d)+1, cellSize()-(2*d)+1 ); } @@ -65,7 +65,7 @@ void KDrawColors::mouseReleaseEvent( TQMouseEvent *e ) emit newColor(colorAt(cell)|OPAQUE_MASK); } -KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent) +KSysColors::KSysColors(TQWidget *tqparent) : KDrawColors(tqparent) { kdDebug(4640) << "KSysColors - constructor" << endl; @@ -85,7 +85,7 @@ KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent) kdDebug(4640) << "KSysColors - constructor - done" << endl; } -KCustomColors::KCustomColors(TQWidget *parent) : KDrawColors(parent) +KCustomColors::KCustomColors(TQWidget *tqparent) : KDrawColors(tqparent) { kdDebug(4640) << "KCustomColors - constructor" << endl; setNumRows(3); @@ -119,7 +119,7 @@ void KCustomColors::mouseDoubleClickEvent(TQMouseEvent *e) void KCustomColors::addColor(uint c) { - if(!contains(c)) + if(!tqcontains(c)) { int f = getFreeCell(); if(f != -1) @@ -130,7 +130,7 @@ void KCustomColors::addColor(uint c) kdDebug(4640) << "KCustomColors::addColor: Not a valid color: " << c << endl; return; } - //kdDebug(4640) << "KCustomColors::addColor: Adding color: " << c << " - " << qRed(c) << " " << qGreen(c) << " " << qBlue(c) << endl; + //kdDebug(4640) << "KCustomColors::addColor: Adding color: " << c << " - " << tqRed(c) << " " << tqGreen(c) << " " << tqBlue(c) << endl; setColor(f, c); freecells[f] = false; } diff --git a/kiconedit/kiconcolors.h b/kiconedit/kiconcolors.h index 71d8b240..90f07d09 100644 --- a/kiconedit/kiconcolors.h +++ b/kiconedit/kiconcolors.h @@ -31,8 +31,9 @@ class KDrawColors : public KColorGrid { Q_OBJECT + TQ_OBJECT public: - KDrawColors(TQWidget *parent); + KDrawColors(TQWidget *tqparent); //bool hasColor(uint); @@ -49,8 +50,9 @@ protected: class KCustomColors : public KDrawColors { Q_OBJECT + TQ_OBJECT public: - KCustomColors(TQWidget *parent); + KCustomColors(TQWidget *tqparent); ~KCustomColors(); void addColor(uint); @@ -69,9 +71,10 @@ protected: class KSysColors : public KDrawColors { Q_OBJECT + TQ_OBJECT public: - KSysColors(TQWidget *parent); + KSysColors(TQWidget *tqparent); }; diff --git a/kiconedit/kiconconfig.cpp b/kiconedit/kiconconfig.cpp index d4621a0b..e0e223a5 100644 --- a/kiconedit/kiconconfig.cpp +++ b/kiconedit/kiconconfig.cpp @@ -49,20 +49,20 @@ static inline TQPixmap loadIcon( const char * name ) { return KGlobal::instance()->iconLoader() - ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); } -KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent) - : KDialogBase(parent, "KTemplateEditDlg", true, i18n( "Icon Template" ), +KTemplateEditDlg::KTemplateEditDlg(TQWidget *tqparent) + : KDialogBase(tqparent, "KTemplateEditDlg", true, i18n( "Icon Template" ), Ok|Cancel ) { TQFrame *frame = makeMainWidget(); TQVBoxLayout *ml = new TQVBoxLayout(frame); TQGroupBox *grp = new TQGroupBox(i18n("Template"), frame); grp->setColumnLayout(0, Qt::Vertical); - grp->layout()->setSpacing(spacingHint()); - grp->layout()->setMargin(marginHint()); - TQGridLayout *l = new TQGridLayout(grp->layout()); + grp->tqlayout()->setSpacing(spacingHint()); + grp->tqlayout()->setMargin(marginHint()); + TQGridLayout *l = new TQGridLayout(grp->tqlayout()); ln_name = new TQLineEdit( grp ); connect( ln_name, TQT_SIGNAL( textChanged( const TQString & ) ), @@ -112,7 +112,7 @@ TQString KTemplateEditDlg::path() return ln_path->url(); } -KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent) +KTemplateConfig::KTemplateConfig(TQWidget *tqparent) : TQWidget(tqparent) { kdDebug(4640) << "KTemplateConfig constructor" << endl; @@ -130,7 +130,7 @@ KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent) TQVBoxLayout* ml = new TQVBoxLayout( this ); ml->addWidget( grp ); - TQVBoxLayout* l = new TQVBoxLayout( grp->layout(), KDialog::spacingHint() ); + TQVBoxLayout* l = new TQVBoxLayout( grp->tqlayout(), KDialog::spacingHint() ); l->addWidget( templates ); for( unsigned int i = 0; i < KIconTemplateContainer::self()->count(); i++ ) @@ -151,7 +151,7 @@ KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent) bbox->addStretch( 1 ); - bbox->layout(); + bbox->tqlayout(); l->addWidget( bbox ); } @@ -224,8 +224,8 @@ void KTemplateConfig::edit() } } -KBackgroundConfig::KBackgroundConfig( TQWidget* parent ) - : TQWidget( parent ) +KBackgroundConfig::KBackgroundConfig( TQWidget* tqparent ) + : TQWidget( tqparent ) { kdDebug(4640) << "KBackgroundConfig - constructor" << endl; @@ -246,11 +246,11 @@ KBackgroundConfig::KBackgroundConfig( TQWidget* parent ) TQGroupBox *grp1 = new TQGroupBox( i18n( "Select Background" ), this ); grp1->setColumnLayout(0, Qt::Vertical ); - grp1->layout()->setSpacing( KDialog::spacingHint() ); - grp1->layout()->setMargin( KDialog::marginHint() ); + grp1->tqlayout()->setSpacing( KDialog::spacingHint() ); + grp1->tqlayout()->setMargin( KDialog::marginHint() ); mainLayout->addWidget( grp1 ); - TQGridLayout *grp1Layout = new TQGridLayout( grp1->layout(), 3, 2 ); + TQGridLayout *grp1Layout = new TQGridLayout( grp1->tqlayout(), 3, 2 ); TQButtonGroup* btngrp = new TQButtonGroup( grp1 ); btngrp->setExclusive( true ); @@ -373,7 +373,7 @@ void KBackgroundConfig::selectPixmap() } } -KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent) +KMiscConfig::KMiscConfig(TQWidget *tqparent) : TQWidget(tqparent) { kdDebug(4640) << "KMiscConfig - constructor" << endl; @@ -524,32 +524,32 @@ void KMiscConfig::slotTransparencyDisplayType(int id) } } -KIconConfig::KIconConfig(TQWidget *parent) +KIconConfig::KIconConfig(TQWidget *tqparent) : KDialogBase(KDialogBase::IconList, i18n("Configure"), KDialogBase::Help | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel, KDialogBase::Ok, - parent, "configDialog", true, true) + tqparent, "configDialog", true, true) { - setHelp(TQString::null); + setHelp(TQString()); //KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(finis())); - TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString::null, loadIcon("icons")); + TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString(), loadIcon("icons")); temps = new KTemplateConfig(page); - page = addVBoxPage(i18n("Background"), TQString::null, loadIcon("background")); + page = addVBoxPage(i18n("Background"), TQString(), loadIcon("background")); backs = new KBackgroundConfig(page); - page = addVBoxPage(i18n("Icon Grid"), TQString::null, loadIcon("kiconedit")); + page = addVBoxPage(i18n("Icon Grid"), TQString(), loadIcon("kiconedit")); misc = new KMiscConfig(page); TQSize min(300, 400); - if (300 < sizeHint().width()) { min.setWidth(sizeHint().width()); } - if (400 < sizeHint().height()) { min.setHeight(sizeHint().height()); } + if (300 < tqsizeHint().width()) { min.setWidth(tqsizeHint().width()); } + if (400 < tqsizeHint().height()) { min.setHeight(tqsizeHint().height()); } resize(min); } diff --git a/kiconedit/kiconconfig.h b/kiconedit/kiconconfig.h index be1450d3..df143c54 100644 --- a/kiconedit/kiconconfig.h +++ b/kiconedit/kiconconfig.h @@ -41,6 +41,7 @@ class TQComboBox; class KTemplateEditDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KTemplateEditDlg(TQWidget *); ~KTemplateEditDlg() {}; @@ -58,9 +59,10 @@ protected: KURLRequester *ln_path; }; -class KTemplateConfig : public QWidget +class KTemplateConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: KTemplateConfig(TQWidget*); ~KTemplateConfig(); @@ -78,11 +80,12 @@ protected: TQPushButton *btadd, *btedit, *btremove; }; -class KBackgroundConfig : public QWidget +class KBackgroundConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KBackgroundConfig(TQWidget *parent); + KBackgroundConfig(TQWidget *tqparent); ~KBackgroundConfig(); public slots: @@ -104,11 +107,12 @@ protected: TQLabel *lb_ex; }; -class KMiscConfig : public QWidget +class KMiscConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KMiscConfig(TQWidget *parent); + KMiscConfig(TQWidget *tqparent); ~KMiscConfig(); public slots: @@ -133,10 +137,11 @@ protected: class KIconConfig : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KIconConfig(TQWidget *parent); + KIconConfig(TQWidget *tqparent); ~KIconConfig(); protected slots: diff --git a/kiconedit/kiconedit.cpp b/kiconedit/kiconedit.cpp index 74325458..f6a6c335 100644 --- a/kiconedit/kiconedit.cpp +++ b/kiconedit/kiconedit.cpp @@ -64,7 +64,7 @@ void KIconEdit::init() gridview = new KGridView(&img, history, this); grid = gridview->grid(); - icon = new KIconEditIcon(this, &grid->image()); + icon = new KIconEditIcon(TQT_TQOBJECT(this), &grid->image()); setAcceptDrops(true); @@ -146,7 +146,7 @@ void KIconEdit::init() updateAccels(); show(); - moveDockWindow( m_paletteToolBar, Qt::DockRight, true, 0 ); + moveDockWindow( m_paletteToolBar, TQt::DockRight, true, 0 ); } KIconEdit::~KIconEdit() @@ -165,7 +165,7 @@ bool KIconEdit::queryClose() if (grid->isModified()) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch(r) { @@ -222,10 +222,10 @@ void KIconEdit::writeConfig() saveMainWindowSettings( config, "MainWindowSettings" ); } -TQSize KIconEdit::sizeHint() const +TQSize KIconEdit::tqsizeHint() const { if(gridview) - return gridview->sizeHint(); + return gridview->tqsizeHint(); else return TQSize(-1, -1); } @@ -240,43 +240,43 @@ void KIconEdit::setupActions() // File Menu action = new KAction(i18n("New &Window"), "window_new", cut, - this, TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window"); + TQT_TQOBJECT(this), TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window"); action->setWhatsThis(i18n("New window\n\nOpens a new icon editor window.")); - action = KStdAction::openNew(this, TQT_SLOT(slotNew()), actionCollection()); + action = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotNew()), actionCollection()); action->setWhatsThis(i18n("New\n\nCreate a new icon, either from a" " template or by specifying the size")); - action = KStdAction::open(this, TQT_SLOT(slotOpen()), actionCollection()); + action = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpen()), actionCollection()); action->setWhatsThis(i18n("Open\n\nOpen an existing icon")); - m_actRecent = KStdAction::openRecent(this, + m_actRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotOpenRecent(const KURL&)), actionCollection()); m_actRecent->setMaxItems(15); // FIXME should be configurable! m_actRecent->loadEntries(kapp->config()); - action = KStdAction::save(this, TQT_SLOT(slotSave()), actionCollection()); + action = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection()); action->setWhatsThis(i18n("Save\n\nSave the current icon")); - KStdAction::saveAs(this, TQT_SLOT(slotSaveAs()), actionCollection()); + KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), actionCollection()); - action = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection()); + action = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection()); action->setWhatsThis(i18n("Print\n\nOpens a print dialog to let you print" " the current icon.")); - KStdAction::close(this, TQT_SLOT(slotClose()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); // Edit Menu - m_actCut = KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection()); + m_actCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection()); m_actCut->setWhatsThis(i18n("Cut\n\nCut the current selection out of the" " icon.\n\n(Tip: You can make both rectangular and circular selections)")); - m_actCopy = KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection()); + m_actCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection()); m_actCopy->setWhatsThis(i18n("Copy\n\nCopy the current selection out of the" " icon.\n\n(Tip: You can make both rectangular and circular selections)")); - m_actPaste = KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection()); + m_actPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection()); m_actPaste->setWhatsThis(i18n("Paste\n\n" "Paste the contents of the clipboard into the current icon.\n\n" "If the contents are larger than the current icon you can paste them" @@ -284,29 +284,29 @@ void KIconEdit::setupActions() "(Tip: Select \"Paste transparent pixels\" in the configuration dialog" " if you also want to paste transparency.)")); - m_actPasteNew = new KAction( i18n( "Paste as &New" ), cut, grid, + m_actPasteNew = new KAction( i18n( "Paste as &New" ), cut, TQT_TQOBJECT(grid), TQT_SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" ); - KStdAction::clear(this, TQT_SLOT(slotClear()), actionCollection()); - KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection()); + KStdAction::clear(TQT_TQOBJECT(this), TQT_SLOT(slotClear()), actionCollection()); + KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection()); action = new KAction(i18n("Resi&ze..."), "transform", cut, - grid, TQT_SLOT(editResize()), actionCollection(), "edit_resize"); + TQT_TQOBJECT(grid), TQT_SLOT(editResize()), actionCollection(), "edit_resize"); action->setWhatsThis(i18n("Resize\n\nSmoothly resizes the icon while" " trying to preserve the contents")); action = new KAction(i18n("&GrayScale"), "grayscale", cut, - grid, TQT_SLOT(grayScale()), actionCollection(), "edit_grayscale"); + TQT_TQOBJECT(grid), TQT_SLOT(grayScale()), actionCollection(), "edit_grayscale"); action->setWhatsThis(i18n("Gray scale\n\nGray scale the current icon.\n" "(Warning: The result is likely to contain colors not in the icon" " palette")); // View Menu - m_actZoomIn = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), + m_actZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn()), actionCollection()); m_actZoomIn->setWhatsThis(i18n("Zoom in\n\nZoom in by one.")); - m_actZoomOut = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), + m_actZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut()), actionCollection()); m_actZoomOut->setWhatsThis(i18n("Zoom out\n\nZoom out by one.")); @@ -314,26 +314,26 @@ void KIconEdit::setupActions() actionCollection(), "view_zoom" ); // xgettext:no-c-format - action = new KAction( i18n( "100%" ), cut, this, TQT_SLOT( slotZoom1() ), + action = new KAction( i18n( "100%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom1() ), actionCollection(), "view_zoom_1" ); actMenu->insert( action ); // xgettext:no-c-format - action = new KAction( i18n( "200%" ), cut, this, TQT_SLOT( slotZoom2() ), + action = new KAction( i18n( "200%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom2() ), actionCollection(), "view_zoom_2" ); actMenu->insert( action ); // xgettext:no-c-format - action = new KAction( i18n( "500%" ), cut, this, TQT_SLOT( slotZoom5() ), + action = new KAction( i18n( "500%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom5() ), actionCollection(), "view_zoom_5" ); actMenu->insert( action ); // xgettext:no-c-format - action = new KAction( i18n( "1000%" ), cut, this, TQT_SLOT( slotZoom10() ), + action = new KAction( i18n( "1000%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom10() ), actionCollection(), "view_zoom_10" ); actMenu->insert( action ); // Settings Menu - KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(slotConfigureSettings()), + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureSettings()), actionCollection()); createStandardStatusBarAction(); @@ -341,7 +341,7 @@ void KIconEdit::setupActions() KToggleAction *toggle; toggle = new KToggleAction( i18n( "Show &Grid" ), "grid", - cut, this, TQT_SLOT( slotShowGrid() ), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT( slotShowGrid() ), actionCollection(), "options_show_grid" ); toggle->setCheckedState(i18n("Hide &Grid")); toggle->setWhatsThis( i18n( "Show grid\n\nToggles the grid in the icon" @@ -350,14 +350,14 @@ void KIconEdit::setupActions() // Tools Menu toolAction = new KRadioAction(i18n("Color Picker"), "colorpicker", - cut, this, TQT_SLOT(slotToolPointer()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolPointer()), actionCollection(), "tool_find_pixel"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Color Picker\n\nThe color of the pixel clicked" " on will be the current draw color")); toolAction = new KRadioAction(i18n("Freehand"), "paintbrush", - cut, this, TQT_SLOT(slotToolFreehand()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFreehand()), actionCollection(), "tool_freehand"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Free hand\n\nDraw non-linear lines")); @@ -366,64 +366,64 @@ void KIconEdit::setupActions() grid->setTool(KIconEditGrid::Freehand); toolAction = new KRadioAction(i18n("Rectangle"), "rectangle", - cut, this, TQT_SLOT(slotToolRectangle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolRectangle()), actionCollection(), "tool_rectangle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Rectangle\n\nDraw a rectangle")); toolAction = new KRadioAction(i18n("Filled Rectangle"), "filledrectangle", - cut, this, TQT_SLOT(slotToolFilledRectangle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledRectangle()), actionCollection(), "tool_filled_rectangle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Filled rectangle\n\nDraw a filled rectangle")); toolAction = new KRadioAction(i18n("Circle"), "circle", - cut, this, TQT_SLOT(slotToolCircle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolCircle()), actionCollection(), "tool_circle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Circle\n\nDraw a circle")); toolAction = new KRadioAction(i18n("Filled Circle"), "filledcircle", - cut, this, TQT_SLOT(slotToolFilledCircle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledCircle()), actionCollection(), "tool_filled_circle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Filled circle\n\nDraw a filled circle")); toolAction = new KRadioAction(i18n("Ellipse"), "ellipse", - cut, this, TQT_SLOT(slotToolEllipse()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEllipse()), actionCollection(), "tool_ellipse"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Ellipse\n\nDraw an ellipse")); toolAction = new KRadioAction(i18n("Filled Ellipse"), "filledellipse", - cut, this, TQT_SLOT(slotToolFilledEllipse()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledEllipse()), actionCollection(), "tool_filled_ellipse"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Filled ellipse\n\nDraw a filled ellipse")); toolAction = new KRadioAction(i18n("Spray"), "airbrush", - cut, this, TQT_SLOT(slotToolSpray()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSpray()), actionCollection(), "tool_spray"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Spray\n\nDraw scattered pixels in the" " current color")); toolAction = new KRadioAction(i18n("Flood Fill"), "fill", - cut, this, TQT_SLOT(slotToolFlood()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFlood()), actionCollection(), "tool_flood_fill"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Flood fill\n\nFill adjoining pixels with" " the same color with the current color")); toolAction = new KRadioAction(i18n("Line"), "line", - cut, this, TQT_SLOT(slotToolLine()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolLine()), actionCollection(), "tool_line"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Line\n\nDraw a straight line vertically," " horizontally or at 45 deg. angles")); toolAction = new KRadioAction(i18n("Eraser (Transparent)"), "eraser", - cut, this, TQT_SLOT(slotToolEraser()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEraser()), actionCollection(), "tool_eraser"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Erase\n\nErase pixels. Set the pixels to" @@ -432,14 +432,14 @@ void KIconEdit::setupActions() " to use)")); toolAction = new KRadioAction(i18n("Rectangular Selection"), - "selectrect", cut, this, TQT_SLOT(slotToolSelectRect()), + "selectrect", cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSelectRect()), actionCollection(), "edit_select_rectangle"); toolAction->setExclusiveGroup( "toolActions" ); toolAction->setWhatsThis(i18n("Select\n\nSelect a rectangular section" " of the icon using the mouse.")); toolAction = new KRadioAction(i18n("Circular Selection"), - "selectcircle", cut, this, TQT_SLOT(slotToolSelectCircle()), + "selectcircle", cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSelectCircle()), actionCollection(), "edit_select_circle"); toolAction->setExclusiveGroup( "toolActions" ); toolAction->setWhatsThis(i18n("Select\n\nSelect a circular section of the" @@ -451,7 +451,7 @@ void KIconEdit::updateAccels() actionCollection()->readShortcutSettings(); } -TQWidget *KIconEdit::createContainer( TQWidget *parent, int index, +TQWidget *KIconEdit::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ) { if ( element.attribute( "name" ) == "paletteToolBar" ) @@ -461,7 +461,7 @@ TQWidget *KIconEdit::createContainer( TQWidget *parent, int index, return m_paletteToolBar; } - return KXMLGUIBuilder::createContainer( parent, index, element, id ); + return KXMLGUIBuilder::createContainer( tqparent, index, element, id ); } bool KIconEdit::setupStatusBar() @@ -477,7 +477,7 @@ bool KIconEdit::setupStatusBar() statusbar->insertFixedItem("99999,99999", 0, true); statusbar->insertFixedItem("99999 x 99999", 1, true); statusbar->insertFixedItem(" 1:999", 2, true); - str = i18n("Colors: %1").arg(9999999); + str = i18n("Colors: %1").tqarg(9999999); statusbar->insertFixedItem(str, 3, true); statusbar->insertItem("", 4); diff --git a/kiconedit/kiconedit.h b/kiconedit/kiconedit.h index 021223de..e912e0f7 100644 --- a/kiconedit/kiconedit.h +++ b/kiconedit/kiconedit.h @@ -59,12 +59,13 @@ class PaletteToolBar; class KIconEdit : public KMainWindow { Q_OBJECT + TQ_OBJECT public: KIconEdit( KURL url = KURL(), const char *name = "kiconedit"); KIconEdit( const TQImage image, const char *name = "kiconedit"); ~KIconEdit(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; static WindowList windowList; signals: diff --git a/kiconedit/kiconeditslots.cpp b/kiconedit/kiconeditslots.cpp index ffcca476..63af706b 100644 --- a/kiconedit/kiconeditslots.cpp +++ b/kiconedit/kiconeditslots.cpp @@ -81,7 +81,7 @@ void KIconEdit::slotNew() if (grid->isModified()) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch(r) { @@ -136,7 +136,7 @@ void KIconEdit::slotOpen() if( grid->isModified() ) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch( r ) { @@ -195,7 +195,7 @@ void KIconEdit::slotPrint() { KPrinter printer; - if ( printer.setup(this, i18n("Print %1").arg(icon->url().section('/', -1))) ) + if ( printer.setup(this, i18n("Print %1").tqarg(icon->url().section('/', -1))) ) { int margin = 10, yPos = 0; printer.setCreator("KDE Icon Editor"); @@ -280,7 +280,7 @@ void KIconEdit::slotOpenRecent(const KURL& iconFile) if( grid->isModified() ) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch( r ) { @@ -422,13 +422,13 @@ void KIconEdit::slotUpdateZoom( int s ) void KIconEdit::slotUpdateStatusPos(int x, int y) { - TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y); + TQString str = i18n("tqStatus Position", "%1, %2").tqarg(x).tqarg(y); statusbar->changeItem( str, 0); } void KIconEdit::slotUpdateStatusSize(int x, int y) { - TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y); + TQString str = i18n("tqStatus Size", "%1 x %2").tqarg(x).tqarg(y); statusbar->changeItem( str, 1); } @@ -443,13 +443,13 @@ void KIconEdit::slotUpdateStatusScaling(int s) void KIconEdit::slotUpdateStatusColors(uint) { - TQString str = i18n("Colors: %1").arg(grid->numColors()); + TQString str = i18n("Colors: %1").tqarg(grid->numColors()); statusbar->changeItem( str, 3); } void KIconEdit::slotUpdateStatusColors(uint n, uint *) { - TQString str = i18n("Colors: %1").arg(n); + TQString str = i18n("Colors: %1").tqarg(n); statusbar->changeItem( str, 3); } @@ -512,7 +512,7 @@ void KIconEdit::dragEnterEvent(TQDragEnterEvent* e) */ void KIconEdit::dropEvent( TQDropEvent *e ) { - //kdDebug(4640) << "Got QDropEvent!" << endl; + //kdDebug(4640) << "Got TQDropEvent!" << endl; KURL::List fileList; bool loadedinthis = false; diff --git a/kiconedit/kicongrid.cpp b/kiconedit/kicongrid.cpp index 2c9faeb7..d794cbe5 100644 --- a/kiconedit/kicongrid.cpp +++ b/kiconedit/kicongrid.cpp @@ -2,7 +2,7 @@ KDE Icon Editor - a small graphics drawing program for the KDE. Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org) - Includes portions of code from Qt, + Includes portions of code from TQt, Copyright (C) 1992-2000 Trolltech AS. This program is free software; you can redistribute it and/or @@ -67,8 +67,8 @@ void RepaintCommand::execute() grid->update( area); } -KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, const char *name) -: TQFrame(parent, name) +KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *tqparent, const char *name) +: TQFrame(tqparent, name) { _corner = 0L; _hruler = _vruler = 0L; @@ -290,8 +290,8 @@ void KGridView::resizeEvent(TQResizeEvent*) } -KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name) - : KColorGrid(parent, name, 1) +KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *tqparent, const char *name) + : KColorGrid(tqparent, name, 1) { img = image; history = h; @@ -310,7 +310,7 @@ KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *paren img->setAlphaBuffer(true); clearImage(img); - currentcolor = qRgb(0,0,0)|OPAQUE_MASK; + currentcolor = tqRgb(0,0,0)|OPAQUE_MASK; emit colorSelected(currentcolor); setMouseTracking(true); @@ -348,13 +348,13 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) //time.start(); - QRgb *imageBuffer = new QRgb[paintCellsRect.width() * paintCellsRect.height()]; + TQRgb *imageBuffer = new TQRgb[paintCellsRect.width() * paintCellsRect.height()]; const int cellsize = cellSize(); const int firstCellPixelsRemaining = cellsize - paintCellsRect.left() % cellsize; if(transparencyDisplayType() == TRD_SOLIDCOLOR) { - const QRgb backgroundColor = transparencySolidColor().rgb(); + const TQRgb backgroundColor = transparencySolidColor().rgb(); const int backgroundRed = transparencySolidColor().red(); const int backgroundGreen = transparencySolidColor().green(); const int backgroundBlue = transparencySolidColor().blue(); @@ -362,19 +362,19 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++) { - QRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); + TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); if(y % cellsize == 0 || dest == imageBuffer) { // Paint the first scanline in each block of cellSize() identical lines. // The remaineder can just be copied from this one. const int cellY = y / cellsize; - QRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; + TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; - QRgb sourcePixel = *src++; - int sourceAlpha = qAlpha(sourcePixel); + TQRgb sourcePixel = *src++; + int sourceAlpha = tqAlpha(sourcePixel); - QRgb c; + TQRgb c; if(sourceAlpha == 255) { @@ -387,9 +387,9 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) } else { - const int sourceRed = qRed(sourcePixel); - const int sourceGreen = qGreen(sourcePixel); - const int sourceBlue = qBlue(sourcePixel); + const int sourceRed = tqRed(sourcePixel); + const int sourceGreen = tqGreen(sourcePixel); + const int sourceBlue = tqBlue(sourcePixel); int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80; r = backgroundRed + ((r + (r >> 8)) >> 8); @@ -400,7 +400,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80; b = backgroundBlue + ((b + (b >> 8)) >> 8); - c = qRgb(r, g, b); + c = tqRgb(r, g, b); } int cellPixelsRemaining = firstCellPixelsRemaining; @@ -413,7 +413,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) // Fetch the next source pixel sourcePixel = *src++; - sourceAlpha = qAlpha(sourcePixel); + sourceAlpha = tqAlpha(sourcePixel); if(sourceAlpha == 255) { @@ -426,9 +426,9 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) } else { - const int sourceRed = qRed(sourcePixel); - const int sourceGreen = qGreen(sourcePixel); - const int sourceBlue = qBlue(sourcePixel); + const int sourceRed = tqRed(sourcePixel); + const int sourceGreen = tqGreen(sourcePixel); + const int sourceBlue = tqBlue(sourcePixel); //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255; //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255; @@ -443,7 +443,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80; b = backgroundBlue + ((b + (b >> 8)) >> 8); - c = qRgb(r, g, b); + c = tqRgb(r, g, b); } } @@ -455,7 +455,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) else { // Copy the scanline above. - memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(QRgb)); + memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb)); } } } @@ -478,10 +478,10 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) squareSize = (2 * cellSize() * fixedPointMultiplier) / 2; } - QRgb *color1ScanLine = new QRgb[paintCellsRect.width()]; - QRgb *color2ScanLine = new QRgb[paintCellsRect.width()]; - QRgb *color1Buffer = color1ScanLine; - QRgb *color2Buffer = color2ScanLine; + TQRgb *color1ScanLine = new TQRgb[paintCellsRect.width()]; + TQRgb *color2ScanLine = new TQRgb[paintCellsRect.width()]; + TQRgb *color1Buffer = color1ScanLine; + TQRgb *color2Buffer = color2ScanLine; for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++) { @@ -504,11 +504,11 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++) { - QRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); + TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); const int cellY = y / cellsize; int firstSquareColour; - const QRgb *checkerboardSrc; + const TQRgb *checkerboardSrc; if((((y * fixedPointMultiplier) / squareSize) & 1) == 0) { @@ -524,17 +524,17 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) if(cellY == lastCellY && firstSquareColour == lastLineFirstSquareColour) { // Copy the scanline above. - memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(QRgb)); + memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb)); } else { - QRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; + TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; - QRgb sourcePixel = *src++; - int sourceRed = qRed(sourcePixel); - int sourceGreen = qGreen(sourcePixel); - int sourceBlue = qBlue(sourcePixel); - int sourceAlpha = qAlpha(sourcePixel); + TQRgb sourcePixel = *src++; + int sourceRed = tqRed(sourcePixel); + int sourceGreen = tqGreen(sourcePixel); + int sourceBlue = tqBlue(sourcePixel); + int sourceAlpha = tqAlpha(sourcePixel); int cellPixelsRemaining = firstCellPixelsRemaining; @@ -546,15 +546,15 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) // Fetch the next source pixel sourcePixel = *src++; - sourceRed = qRed(sourcePixel); - sourceGreen = qGreen(sourcePixel); - sourceBlue = qBlue(sourcePixel); - sourceAlpha = qAlpha(sourcePixel); + sourceRed = tqRed(sourcePixel); + sourceGreen = tqGreen(sourcePixel); + sourceBlue = tqBlue(sourcePixel); + sourceAlpha = tqAlpha(sourcePixel); } cellPixelsRemaining--; - QRgb c; + TQRgb c; if(sourceAlpha == 255) { @@ -568,9 +568,9 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) else { const int backgroundColor = *checkerboardSrc; - const int backgroundRed = qRed(backgroundColor); - const int backgroundGreen = qGreen(backgroundColor); - const int backgroundBlue = qBlue(backgroundColor); + const int backgroundRed = tqRed(backgroundColor); + const int backgroundGreen = tqGreen(backgroundColor); + const int backgroundBlue = tqBlue(backgroundColor); //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255; //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255; @@ -585,7 +585,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80; b = backgroundBlue + ((b + (b >> 8)) >> 8); - c = qRgb(r, g, b); + c = tqRgb(r, g, b); } *dest++ = c; @@ -710,7 +710,7 @@ void KIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e) void KIconEditGrid::mousePressEvent( TQMouseEvent *e ) { - if(!e || (e->button() != LeftButton)) + if(!e || (e->button() != Qt::LeftButton)) return; int row = findRow( e->pos().y() ); @@ -886,7 +886,7 @@ void KIconEditGrid::mouseMoveEvent( TQMouseEvent *e ) void KIconEditGrid::mouseReleaseEvent( TQMouseEvent *e ) { - if(!e || (e->button() != LeftButton)) + if(!e || (e->button() != Qt::LeftButton)) return; int row = findRow( e->pos().y() ); @@ -1035,7 +1035,7 @@ void KIconEditGrid::load( TQImage *image) setColor((y*numCols())+x, *l, false); } //kdDebug(4640) << "Row: " << y << endl; - kapp->processEvents(200); + kapp->tqprocessEvents(200); } updateColors(); @@ -1044,7 +1044,7 @@ void KIconEditGrid::load( TQImage *image) emit changed(pixmap()); setUpdatesEnabled(true); emit needPainting(); - //repaint(viewRect(), false); + //tqrepaint(viewRect(), false); history->clear(); } @@ -1108,7 +1108,7 @@ void KIconEditGrid::checkClipboard() TQImage KIconEditGrid::clipboardImage(bool &ok) { //###### Remove me later. - //Workaround Qt bug -- check whether format provided first. + //Workaround TQt bug -- check whether format provided first. //Code below is from TQDragObject, to match the mimetype list.... TQStrList fileFormats = TQImageIO::inputFormats(); @@ -1118,7 +1118,7 @@ TQImage KIconEditGrid::clipboardImage(bool &ok) { TQCString format = fileFormats.current(); TQCString type = "image/" + format.lower(); - if (kapp->clipboard()->data()->provides(type ) ) + if (kapp->tqclipboard()->data()->provides(type ) ) { oneIsSupported = true; } @@ -1179,7 +1179,7 @@ TQImage KIconEditGrid::getSelection(bool cut) { int x = pntarray[i].x(); int y = pntarray[i].y(); - if(img->valid(x, y) && rect.contains(TQPoint(x, y))) + if(img->valid(x, y) && rect.tqcontains(TQPoint(x, y))) { *((uint*)tmp.scanLine(y-ny) + (x-nx)) = *((uint*)img->scanLine(y) + x); if(cut) @@ -1232,7 +1232,7 @@ void KIconEditGrid::editPaste(bool paste) { if(KMessageBox::warningYesNo(this, i18n("The clipboard image is larger than the current" - " image!\nPaste as new image?"),TQString::null,i18n("Paste"), i18n("Do Not Paste")) == 0) + " image!\nPaste as new image?"),TQString(),i18n("Paste"), i18n("Do Not Paste")) == 0) { editPasteAsNew(); } @@ -1263,12 +1263,12 @@ void KIconEditGrid::editPaste(bool paste) else { // Porter-Duff Over composition - double alphaS = qAlpha(*cl) / 255.0; - double alphaD = qAlpha(*l) / 255.0; + double alphaS = tqAlpha(*cl) / 255.0; + double alphaD = tqAlpha(*l) / 255.0; - double r = qRed(*cl) * alphaS + (1 - alphaS) * qRed(*l) * alphaD; - double g = qGreen(*cl) * alphaS + (1 - alphaS) * qGreen(*l) * alphaD; - double b = qBlue(*cl) * alphaS + (1 - alphaS) * qBlue(*l) * alphaD; + double r = tqRed(*cl) * alphaS + (1 - alphaS) * tqRed(*l) * alphaD; + double g = tqGreen(*cl) * alphaS + (1 - alphaS) * tqGreen(*l) * alphaD; + double b = tqBlue(*cl) * alphaS + (1 - alphaS) * tqBlue(*l) * alphaD; double a = alphaS + (1 - alphaS) * alphaD; // Remove multiplication by alpha @@ -1334,7 +1334,7 @@ void KIconEditGrid::editPaste(bool paste) ia = 255; } - *l = qRgba(ir, ig, ib, ia); + *l = tqRgba(ir, ig, ib, ia); } setColor((y*numCols())+x, (uint)*l, false); @@ -1379,7 +1379,7 @@ void KIconEditGrid::editPasteAsNew() *img = tmp; load(img); setModified(true); - //repaint(viewRect(), false); + //tqrepaint(viewRect(), false); p = *img; emit changed(TQPixmap(p)); @@ -1426,7 +1426,7 @@ void KIconEditGrid::setSize(const TQSize s) void KIconEditGrid::createCursors() { - TQBitmap mask(22, 22); + TQBitmap tqmask(22, 22); TQPixmap pix; cursor_normal = TQCursor(arrowCursor); @@ -1439,8 +1439,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_colorpicker = TQCursor(pix, 1, 21); } @@ -1452,8 +1452,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_paint = TQCursor(pix, 0, 19); } @@ -1465,8 +1465,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_flood = TQCursor(pix, 3, 20); } @@ -1478,8 +1478,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_aim = TQCursor(pix, 10, 10); } @@ -1491,8 +1491,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(true); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask(true)); + pix.setMask(tqmask); cursor_spray = TQCursor(pix, 0, 20); } @@ -1504,8 +1504,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(true); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask(true)); + pix.setMask(tqmask); cursor_erase = TQCursor(pix, 1, 16); } } @@ -1600,11 +1600,11 @@ void KIconEditGrid::drawSpray(TQPoint point) } -//This routine is from Qt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled -//It seems like KIconEdit relied on the Qt1 semantics for makeEllipse, which broke -//the tool with reasonably recent Qt versions. -//Thankfully, Qt includes the old code #ifdef'd, which is hence included here -static void QPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h ) +//This routine is from TQt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled +//It seems like KIconEdit relied on the TQt1 semantics for makeEllipse, which broke +//the tool with reasonably recent TQt versions. +//Thankfully, TQt includes the old code #ifdef'd, which is hence included here +static void TQPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h ) { // midpoint, 1/4 ellipse if ( w <= 0 || h <= 0 ) { if ( w == 0 || h == 0 ) { @@ -1712,9 +1712,9 @@ void KIconEditGrid::drawEllipse(bool drawit) drawPointArray(a, Mark); if(tool == Circle || tool == FilledCircle || tool == SelectCircle) - QPA_makeEllipse(pntarray, x, y, d, d); + TQPA_makeEllipse(pntarray, x, y, d, d); else if(tool == Ellipse || tool == FilledEllipse) - QPA_makeEllipse(pntarray, x, y, cx, cy); + TQPA_makeEllipse(pntarray, x, y, cx, cy); if((tool == FilledEllipse) || (tool == FilledCircle) || (tool == SelectCircle)) @@ -1829,7 +1829,7 @@ void KIconEditGrid::drawLine(bool drawit, bool drawStraight) x = start.x(); y = start.y(); - delta = QMAX(abs(dx), abs(dy)); + delta = TQMAX(abs(dx), abs(dy)); int deltaX = abs(dx); int deltaY = abs(dy); @@ -1909,7 +1909,7 @@ void KIconEditGrid::drawPointArray(TQPointArray a, DrawAction action) int x = a[i].x(); int y = a[i].y(); - if(img->valid(x, y) && a.boundingRect().contains(a[ i ])) + if(img->valid(x, y) && TQT_TQRECT_OBJECT(a.boundingRect()).tqcontains(a[ i ])) { //kdDebug(4640) << "x: " << x << " - y: " << y << endl; switch( action ) @@ -1982,10 +1982,10 @@ bool KIconEditGrid::isMarked(int x, int y) // Fast diffuse dither to 3x3x3 color cube -// Based on Qt's image conversion functions +// Based on TQt's image conversion functions static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) { - register QRgb *p; + register TQRgb *p; uchar *b; int y; @@ -2041,7 +2041,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) for ( bc=0; bc<=MAX_B; bc++ ) { dst->setColor( INDEXOF(rc,gc,bc), - qRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); + tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); } int sw = src->width(); @@ -2061,12 +2061,12 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) for ( y=0; y < src->height(); y++ ) { - p = (QRgb *)src->scanLine(y); + p = (TQRgb *)src->scanLine(y); b = dst->scanLine(y); int endian = (TQImage::systemByteOrder() == TQImage::BigEndian); int x; - uchar* q = src->scanLine(y); - uchar* q2 = src->scanLine(y+1 < src->height() ? y + 1 : 0); + uchar* q = const_cast(src)->scanLine(y); + uchar* q2 = const_cast(src)->scanLine(y+1 < src->height() ? y + 1 : 0); for (int chan = 0; chan < 3; chan++) { b = dst->scanLine(y); @@ -2087,7 +2087,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) { for (x=0; x0; ) { - int pix = QMAX(QMIN(2, (l1[x] * 2 + 128)/ 255), 0); + int pix = TQMAX(TQMIN(2, (l1[x] * 2 + 128)/ 255), 0); int err = l1[x] - pix * 255 / 2; pv[chan][x] = pix; @@ -2180,7 +2180,7 @@ void KIconEditGrid::mapToKDEPalette() return; /* -#if QT_VERSION > 140 +#if [[[TQT_VERSION IS DEPRECATED]]] > 140 *img = img->convertDepthWithPalette(32, iconpalette, 42); load(img); return; @@ -2195,7 +2195,7 @@ void KIconEditGrid::mapToKDEPalette() { if(*l != TRANSPARENT) { - if(!iconcolors.contains(*l)) + if(!iconcolors.tqcontains(*l)) *l = iconcolors.closestMatch(*l); } } @@ -2216,8 +2216,8 @@ void KIconEditGrid::grayScale() { if(*l != TRANSPARENT) { - uint c = qGray(*l); - *l = qRgba(c, c, c, qAlpha(*l)); + uint c = tqGray(*l); + *l = tqRgba(c, c, c, tqAlpha(*l)); } } } diff --git a/kiconedit/kicongrid.h b/kiconedit/kicongrid.h index da61f3a1..3ef73690 100644 --- a/kiconedit/kicongrid.h +++ b/kiconedit/kicongrid.h @@ -80,18 +80,19 @@ class RepaintCommand : public KCommand { } TQString name() const { - return "repainted"; + return "tqrepainted"; } protected: KIconEditGrid* grid; TQRect area; }; -class KGridView : public QFrame +class KGridView : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KGridView( TQImage *image, KCommandHistory* history, TQWidget * parent = 0, const char *name = 0); + KGridView( TQImage *image, KCommandHistory* history, TQWidget * tqparent = 0, const char *name = 0); KRuler *hruler() { return _hruler;} KRuler *vruler() { return _vruler;} @@ -131,8 +132,9 @@ protected: class KIconEditGrid : public KColorGrid { Q_OBJECT + TQ_OBJECT public: - KIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0); + KIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * tqparent = 0, const char *name = 0); virtual ~KIconEditGrid(); enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle, @@ -189,7 +191,7 @@ public slots: void editSelectAll(); void editClear(); void getImage(TQImage *image); -//#if QT_VERSION <= 140 +//#if [[[TQT_VERSION IS DEPRECATED]]] <= 140 void editResize(); //#endif void setSize(const TQSize s); diff --git a/kiconedit/knew.cpp b/kiconedit/knew.cpp index 77f7ee99..b611a624 100644 --- a/kiconedit/knew.cpp +++ b/kiconedit/knew.cpp @@ -145,7 +145,7 @@ void KIconListBoxItem::paint( TQPainter *p ) int KIconListBoxItem::height(const TQListBox *lb ) const { - return QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 ); + return TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 ); } int KIconListBoxItem::width(const TQListBox *lb ) const @@ -153,9 +153,9 @@ int KIconListBoxItem::width(const TQListBox *lb ) const return pm.width() + lb->fontMetrics().width( text() ) + 6; } -NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent ) +NewSelect::NewSelect(TQWidget *tqparent) : TQWidget( tqparent ) { - wiz = (KWizard*) parent; + wiz = (KWizard*) tqparent; grp = new TQButtonGroup( this ); connect( grp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) ); grp->setExclusive( true ); @@ -173,7 +173,7 @@ NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent ) l->addWidget( rbtempl, 1 ); //l->addWidget(rbtempl, 5, AlignLeft); - //grp->setMinimumSize(grp->childrenRect().size()); + //grp->setMinimumSize(grp->tqchildrenRect().size()); grp->setButton( 0 ); } @@ -189,10 +189,10 @@ void NewSelect::buttonClicked(int id) emit iconopenstyle(id); } -NewFromTemplate::NewFromTemplate( TQWidget* parent ) - : TQWidget( parent ) +NewFromTemplate::NewFromTemplate( TQWidget* tqparent ) + : TQWidget( tqparent ) { - wiz = (KWizard*) parent; + wiz = (KWizard*) tqparent; TQVBoxLayout* ml = new TQVBoxLayout(this); @@ -223,8 +223,8 @@ void NewFromTemplate::checkSelection( int ) wiz->finishButton()->setEnabled( false ); } -KNewIcon::KNewIcon( TQWidget* parent ) - : KWizard( parent, 0, true ) +KNewIcon::KNewIcon( TQWidget* tqparent ) + : KWizard( tqparent, 0, true ) { //kdDebug(4640) << "KNewIcon" << endl; setCaption( i18n( "Create New Icon" ) ); diff --git a/kiconedit/knew.h b/kiconedit/knew.h index a2d5dc7e..4bfb7086 100644 --- a/kiconedit/knew.h +++ b/kiconedit/knew.h @@ -64,8 +64,9 @@ private: class KIconListBox : public TQListBox { Q_OBJECT + TQ_OBJECT public: - KIconListBox( TQWidget *parent ) : TQListBox(parent) {} ; + KIconListBox( TQWidget *tqparent ) : TQListBox(tqparent) {} ; const TQString path(int idx) { return ((KIconListBoxItem*)item(idx))->path(); } KIconTemplate& iconTemplate(int idx) { return ((KIconListBoxItem*)item(idx))->iconTemplate(); } @@ -93,11 +94,12 @@ private: ~KIconTemplateContainer(); }; -class NewSelect : public QWidget +class NewSelect : public TQWidget { Q_OBJECT + TQ_OBJECT public: - NewSelect(TQWidget *parent); + NewSelect(TQWidget *tqparent); ~NewSelect(); signals: @@ -112,11 +114,12 @@ protected: TQRadioButton *rbscratch, *rbtempl; }; -class NewFromTemplate : public QWidget +class NewFromTemplate : public TQWidget { Q_OBJECT + TQ_OBJECT public: - NewFromTemplate(TQWidget *parent); + NewFromTemplate(TQWidget *tqparent); ~NewFromTemplate(); const TQString path() { return TQString(templates->path(templates->currentItem())); } @@ -133,8 +136,9 @@ protected: class KNewIcon : public KWizard { Q_OBJECT + TQ_OBJECT public: - KNewIcon(TQWidget *parent); + KNewIcon(TQWidget *tqparent); ~KNewIcon(); enum { Blank = 0, Template = 1}; diff --git a/kiconedit/kresize.cpp b/kiconedit/kresize.cpp index b2af86b6..b290cce7 100644 --- a/kiconedit/kresize.cpp +++ b/kiconedit/kresize.cpp @@ -28,8 +28,8 @@ #include "kresize.h" -KResizeWidget::KResizeWidget( TQWidget* parent, const char* name, - const TQSize& size ) : TQWidget( parent, name ) +KResizeWidget::KResizeWidget( TQWidget* tqparent, const char* name, + const TQSize& size ) : TQWidget( tqparent, name ) { TQHBoxLayout* genLayout = new TQHBoxLayout( this ); @@ -37,18 +37,18 @@ KResizeWidget::KResizeWidget( TQWidget* parent, const char* name, group->setColumnLayout( 0, Qt::Horizontal ); genLayout->addWidget( group ); - TQHBoxLayout* layout = new TQHBoxLayout( group->layout(), 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( group->tqlayout(), 6 ); m_width = new KIntSpinBox( 1, 200, 1, 1, 10, group ); m_width->setValue( size.width() ); - layout->addWidget( m_width, 1 ); + tqlayout->addWidget( m_width, 1 ); TQLabel* label = new TQLabel( "X", group ); - layout->addWidget( label ); + tqlayout->addWidget( label ); m_height = new KIntSpinBox( 1, 200, 1, 1, 10, group); m_height->setValue( size.height() ); - layout->addWidget( m_height, 1 ); + tqlayout->addWidget( m_height, 1 ); setMinimumSize( 200, 100 ); } @@ -62,9 +62,9 @@ const TQSize KResizeWidget::getSize() return TQSize( m_width->value(), m_height->value() ); } -KResizeDialog::KResizeDialog( TQWidget* parent, const char* name, +KResizeDialog::KResizeDialog( TQWidget* tqparent, const char* name, const TQSize size ) - : KDialogBase( parent, name, true, i18n( "Select Size" ), Ok|Cancel ) + : KDialogBase( tqparent, name, true, i18n( "Select Size" ), Ok|Cancel ) { m_resize = new KResizeWidget( this, "resize widget", size ); diff --git a/kiconedit/kresize.h b/kiconedit/kresize.h index d3256232..37158ed3 100644 --- a/kiconedit/kresize.h +++ b/kiconedit/kresize.h @@ -26,13 +26,14 @@ class KIntSpinBox; -class KResizeWidget : public QWidget +class KResizeWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KResizeWidget( TQWidget* parent, const char* name, const TQSize& ); + KResizeWidget( TQWidget* tqparent, const char* name, const TQSize& ); ~KResizeWidget(); const TQSize getSize(); @@ -46,10 +47,11 @@ private: class KResizeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KResizeDialog( TQWidget* parent, const char* name, const TQSize s ); + KResizeDialog( TQWidget* tqparent, const char* name, const TQSize s ); ~KResizeDialog(); const TQSize getSize(); diff --git a/kiconedit/palettetoolbar.cpp b/kiconedit/palettetoolbar.cpp index 07fa30b1..bb9b1f1c 100644 --- a/kiconedit/palettetoolbar.cpp +++ b/kiconedit/palettetoolbar.cpp @@ -30,8 +30,8 @@ #include "kiconcolors.h" #include "palettetoolbar.h" -PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) - : KToolBar( parent, name ) +PaletteToolBar::PaletteToolBar( TQWidget *tqparent, const char *name ) + : KToolBar( tqparent, name ) { TQWidget *base = new TQWidget( this ); @@ -42,7 +42,7 @@ PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) m_lblPreview = new TQLabel( base ); m_lblPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); m_lblPreview->setFixedHeight( 64 ); - m_lblPreview->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter ); + m_lblPreview->tqsetAlignment( TQt::AlignHCenter|TQt::AlignVCenter ); TQWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview" " of the current icon" ) ); m_layout->addWidget( m_lblPreview ); @@ -50,31 +50,31 @@ PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) m_currentColorView = new TQLabel( base ); m_currentColorView->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); m_currentColorView->setFixedHeight( 24 ); - m_currentColorView->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter ); + m_currentColorView->tqsetAlignment( TQt::AlignHCenter|TQt::AlignVCenter ); TQWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) ); m_layout->addWidget( m_currentColorView ); - TQVBoxLayout *vlayout = new TQVBoxLayout( m_layout, 0 ); + TQVBoxLayout *vtqlayout = new TQVBoxLayout( m_layout, 0 ); TQLabel *l = new TQLabel( i18n( "System colors:" ), base ); - vlayout->addWidget( l ); + vtqlayout->addWidget( l ); m_sysColors = new KSysColors( base ); TQWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select" " colors from the KDE icon palette" ) ); - vlayout->addWidget( m_sysColors ); + vtqlayout->addWidget( m_sysColors ); connect( m_sysColors, TQT_SIGNAL( newColor(uint) ), TQT_SIGNAL( newColor(uint) ) ); - vlayout = new TQVBoxLayout( m_layout, 0 ); + vtqlayout = new TQVBoxLayout( m_layout, 0 ); l = new TQLabel( i18n( "Custom colors:" ), base ); - vlayout->addWidget( l ); + vtqlayout->addWidget( l ); m_customColors = new KCustomColors( base ); TQWhatsThis::add(m_customColors, i18n( "Custom colors\n\nHere you can" " build a palette of custom colors.\nDouble-click on a box to edit" " the color" ) ); - vlayout->addWidget( m_customColors ); + vtqlayout->addWidget( m_customColors ); connect( m_customColors, TQT_SIGNAL( newColor(uint) ), TQT_SIGNAL( newColor(uint) ) ); @@ -86,7 +86,7 @@ PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) setMovingEnabled( false ); } -void PaletteToolBar::setOrientation( Orientation o ) +void PaletteToolBar::setOrientation( Qt::Orientation o ) { if( barPos() == Floating ) o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical; @@ -112,7 +112,7 @@ void PaletteToolBar::addColors( uint n, uint *c ) void PaletteToolBar::addColor( uint color ) { - if( !m_sysColors->contains( color ) ) + if( !m_sysColors->tqcontains( color ) ) m_customColors->addColor( color ); } @@ -128,7 +128,7 @@ void PaletteToolBar::setPreviewBackground( const TQColor& colour ) void PaletteToolBar::currentColorChanged(uint color) { - if(qAlpha(color) == 255) + if(tqAlpha(color) == 255) { m_currentColorView->setBackgroundColor(color); } @@ -136,32 +136,32 @@ void PaletteToolBar::currentColorChanged(uint color) { // Show the colour as if drawn over a checkerboard pattern const int squareWidth = 8; - const uint lightColour = qRgb(255, 255, 255); - const uint darkColour = qRgb(127, 127, 127); + const uint lightColour = tqRgb(255, 255, 255); + const uint darkColour = tqRgb(127, 127, 127); TQPixmap pm(2 * squareWidth, 2 * squareWidth); TQPainter p(&pm); - double alpha = qAlpha(color) / 255.0; + double alpha = tqAlpha(color) / 255.0; - int r = int(qRed(color) * alpha + (1 - alpha) * qRed(lightColour) + 0.5); - int g = int(qGreen(color) * alpha + (1 - alpha) * qGreen(lightColour) + 0.5); - int b = int(qBlue(color) * alpha + (1 - alpha) * qBlue(lightColour) + 0.5); + int r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(lightColour) + 0.5); + int g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(lightColour) + 0.5); + int b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(lightColour) + 0.5); - uint squareColour = qRgb(r, g, b); + uint squareColour = tqRgb(r, g, b); - p.setPen(Qt::NoPen); - p.setBrush(squareColour); + p.setPen(TQt::NoPen); + p.setBrush(TQColor(squareColour)); p.drawRect(0, 0, squareWidth, squareWidth); p.drawRect(squareWidth, squareWidth, squareWidth, squareWidth); - r = int(qRed(color) * alpha + (1 - alpha) * qRed(darkColour) + 0.5); - g = int(qGreen(color) * alpha + (1 - alpha) * qGreen(darkColour) + 0.5); - b = int(qBlue(color) * alpha + (1 - alpha) * qBlue(darkColour) + 0.5); + r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(darkColour) + 0.5); + g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(darkColour) + 0.5); + b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(darkColour) + 0.5); - squareColour = qRgb(r, g, b); + squareColour = tqRgb(r, g, b); - p.setBrush(squareColour); + p.setBrush(TQColor(squareColour)); p.drawRect(squareWidth, 0, squareWidth, squareWidth); p.drawRect(0, squareWidth, squareWidth, squareWidth); diff --git a/kiconedit/palettetoolbar.h b/kiconedit/palettetoolbar.h index 1fede533..0e53914e 100644 --- a/kiconedit/palettetoolbar.h +++ b/kiconedit/palettetoolbar.h @@ -32,15 +32,16 @@ class KCustomColors; class PaletteToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: - PaletteToolBar( TQWidget *parent, const char *name = 0L ); + PaletteToolBar( TQWidget *tqparent, const char *name = 0L ); signals: void newColor( uint c ); public slots: - virtual void setOrientation( Orientation o ); + virtual void setOrientation( Qt::Orientation o ); void previewChanged( const TQPixmap &p ); void addColors( uint n, uint *c ); void addColor( uint color ); diff --git a/kiconedit/properties.h b/kiconedit/properties.h index 7e97b9b4..0f4e7b0e 100644 --- a/kiconedit/properties.h +++ b/kiconedit/properties.h @@ -26,7 +26,7 @@ #include "kicongrid.h" -class KIconEditProperties : public QObject +class KIconEditProperties : public TQObject { public: static KIconEditProperties* self(); diff --git a/kmrml/kmrml.spec b/kmrml/kmrml.spec index 79dbab29..d278a7d0 100644 --- a/kmrml/kmrml.spec +++ b/kmrml/kmrml.spec @@ -48,11 +48,11 @@ make install DESTDIR=$RPM_BUILD_ROOT cd $RPM_BUILD_ROOT -find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} -find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} -find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} %clean rm -rf $RPM_BUILD_ROOT diff --git a/kmrml/kmrml/algorithmcombo.cpp b/kmrml/kmrml/algorithmcombo.cpp index a2db81d4..bdd56ca3 100644 --- a/kmrml/kmrml/algorithmcombo.cpp +++ b/kmrml/kmrml/algorithmcombo.cpp @@ -22,11 +22,11 @@ using namespace KMrml; -// ### copycat of CollectionCombo... moc can't handle templates unfortunately.. +// ### copycat of CollectionCombo... tqmoc can't handle templates unfortunately.. // could use base-class MrmlElement.... -AlgorithmCombo::AlgorithmCombo( TQWidget *parent, const char *name ) - : KComboBox( false, parent, name ), +AlgorithmCombo::AlgorithmCombo( TQWidget *tqparent, const char *name ) + : KComboBox( false, tqparent, name ), m_algorithms( 0L ) { connect( this, TQT_SIGNAL( activated( const TQString& ) ), diff --git a/kmrml/kmrml/algorithmcombo.h b/kmrml/kmrml/algorithmcombo.h index 8138b47a..082780b4 100644 --- a/kmrml/kmrml/algorithmcombo.h +++ b/kmrml/kmrml/algorithmcombo.h @@ -29,9 +29,10 @@ namespace KMrml class AlgorithmCombo : public KComboBox { Q_OBJECT + TQ_OBJECT public: - AlgorithmCombo( TQWidget *parent, const char *name = 0 ); + AlgorithmCombo( TQWidget *tqparent, const char *name = 0 ); ~AlgorithmCombo(); void setAlgorithms( const AlgorithmList * algorithms ); diff --git a/kmrml/kmrml/algorithmdialog.cpp b/kmrml/kmrml/algorithmdialog.cpp index bf3ed895..60926b1e 100644 --- a/kmrml/kmrml/algorithmdialog.cpp +++ b/kmrml/kmrml/algorithmdialog.cpp @@ -31,11 +31,11 @@ using namespace KMrml; -class ScrollView : public QScrollView +class ScrollView : public TQScrollView { public: - ScrollView(TQWidget* parent = 0, const char* name = 0) - : TQScrollView(parent, name) + ScrollView(TQWidget* tqparent = 0, const char* name = 0) + : TQScrollView(tqparent, name) { setFrameStyle(TQFrame::NoFrame); m_frame = new TQFrame(viewport(), "ScrollView::m_frame"); @@ -49,8 +49,8 @@ protected: virtual void viewportResizeEvent(TQResizeEvent* ev) { TQScrollView::viewportResizeEvent(ev); - m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()), - kMax(m_frame->sizeHint().height(), ev->size().height())); + m_frame->resize( kMax(m_frame->tqsizeHint().width(), ev->size().width()), + kMax(m_frame->tqsizeHint().height(), ev->size().height())); }; private: @@ -60,8 +60,8 @@ private: AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms, const CollectionList& collections, const Collection& currentColl, - TQWidget *parent, const char *name ) - : KDialogBase( parent, name, false, i18n("Configure Query Algorithms"), + TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, false, i18n("Configure Query Algorithms"), Ok | Cancel, Ok, false ), m_allAlgorithms( algorithms ), m_collections( collections ) @@ -71,7 +71,7 @@ AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms, TQVBoxLayout *mainLayout = new TQVBoxLayout( box, 0, KDialog::spacingHint(), "mainLayout"); - TQHBoxLayout *collectionLayout = new TQHBoxLayout( 0L, 0, 0, "coll layout"); + TQHBoxLayout *collectionLayout = new TQHBoxLayout( 0L, 0, 0, "coll tqlayout"); collectionLayout->addWidget( new TQLabel( i18n("Collection: "), box )); m_collectionCombo = new CollectionCombo( box, "collection combo" ); @@ -106,7 +106,7 @@ AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms, mainLayout->activate(); algoHLayout->move( groupBox->x() + 10, groupBox->y() - 12 ); - box->setMinimumWidth( algoHLayout->sizeHint().width() + + box->setMinimumWidth( algoHLayout->tqsizeHint().width() + 4 * KDialog::spacingHint() ); } diff --git a/kmrml/kmrml/algorithmdialog.h b/kmrml/kmrml/algorithmdialog.h index be119dbd..f5e02116 100644 --- a/kmrml/kmrml/algorithmdialog.h +++ b/kmrml/kmrml/algorithmdialog.h @@ -32,11 +32,12 @@ namespace KMrml class AlgorithmDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: AlgorithmDialog( const AlgorithmList&, const CollectionList&, const Collection& currentColl, - TQWidget *parent = 0, const char *name = 0 ); + TQWidget *tqparent = 0, const char *name = 0 ); ~AlgorithmDialog(); private slots: diff --git a/kmrml/kmrml/browser.cpp b/kmrml/kmrml/browser.cpp index 57ac0085..7603debb 100644 --- a/kmrml/kmrml/browser.cpp +++ b/kmrml/kmrml/browser.cpp @@ -23,9 +23,9 @@ using namespace KMrml; -Browser::Browser( MrmlPart *parent, const char *name ) - : KParts::BrowserExtension( parent, name ), - m_part( parent ) +Browser::Browser( MrmlPart *tqparent, const char *name ) + : KParts::BrowserExtension( tqparent, name ), + m_part( tqparent ) { } diff --git a/kmrml/kmrml/browser.h b/kmrml/kmrml/browser.h index 71466160..c30e148c 100644 --- a/kmrml/kmrml/browser.h +++ b/kmrml/kmrml/browser.h @@ -28,9 +28,10 @@ namespace KMrml class Browser : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: - Browser( MrmlPart *parent, const char *name ); + Browser( MrmlPart *tqparent, const char *name ); ~Browser(); virtual void saveState( TQDataStream& stream ); diff --git a/kmrml/kmrml/collectioncombo.cpp b/kmrml/kmrml/collectioncombo.cpp index 7238305e..d71a1c2a 100644 --- a/kmrml/kmrml/collectioncombo.cpp +++ b/kmrml/kmrml/collectioncombo.cpp @@ -22,8 +22,8 @@ using namespace KMrml; -CollectionCombo::CollectionCombo( TQWidget *parent, const char *name ) - : KComboBox( false, parent, name ), +CollectionCombo::CollectionCombo( TQWidget *tqparent, const char *name ) + : KComboBox( false, tqparent, name ), m_collections( 0L ) { connect( this, TQT_SIGNAL( activated( const TQString& ) ), diff --git a/kmrml/kmrml/collectioncombo.h b/kmrml/kmrml/collectioncombo.h index c39686a4..dc7722d4 100644 --- a/kmrml/kmrml/collectioncombo.h +++ b/kmrml/kmrml/collectioncombo.h @@ -29,9 +29,10 @@ namespace KMrml class CollectionCombo : public KComboBox { Q_OBJECT + TQ_OBJECT public: - CollectionCombo( TQWidget *parent, const char *name = 0 ); + CollectionCombo( TQWidget *tqparent, const char *name = 0 ); ~CollectionCombo(); void setCollections( const CollectionList * collections ); diff --git a/kmrml/kmrml/kcontrol/indexcleaner.cpp b/kmrml/kmrml/kcontrol/indexcleaner.cpp index 56e606aa..b02d6343 100644 --- a/kmrml/kmrml/kcontrol/indexcleaner.cpp +++ b/kmrml/kmrml/kcontrol/indexcleaner.cpp @@ -6,17 +6,17 @@ #include #if KDE_VERSION < 306 - #define QUOTE( x ) x + #define TQUOTE( x ) x #else - #define QUOTE( x ) KProcess::quote( x ) + #define TQUOTE( x ) KProcess::quote( x ) #endif using namespace KMrmlConfig; IndexCleaner::IndexCleaner( const TQStringList& dirs, const KMrml::Config *config, - TQObject *parent, const char *name ) - : TQObject( parent, name ), + TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_dirs( dirs ), m_config( config ), m_process( 0L ) @@ -74,11 +74,11 @@ void IndexCleaner::startNext() TQString dir = m_dirs.first(); m_dirs.pop_front(); - int index = cmd.find( "%d" ); + int index = cmd.tqfind( "%d" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE( dir ) ); + cmd.tqreplace( index, 2, TQUOTE( dir ) ); else // no %d? What else can we do? - cmd.append( TQString::fromLatin1(" ") + QUOTE( dir ) ); + cmd.append( TQString::tqfromLatin1(" ") + TQUOTE( dir ) ); *m_process << cmd; diff --git a/kmrml/kmrml/kcontrol/indexcleaner.h b/kmrml/kmrml/kcontrol/indexcleaner.h index 92dcdc22..afc2ebfd 100644 --- a/kmrml/kmrml/kcontrol/indexcleaner.h +++ b/kmrml/kmrml/kcontrol/indexcleaner.h @@ -20,13 +20,14 @@ namespace KMrml namespace KMrmlConfig { - class IndexCleaner : public QObject + class IndexCleaner : public TQObject { Q_OBJECT + TQ_OBJECT public: IndexCleaner( const TQStringList& dirs, const KMrml::Config *config, - TQObject *parent = 0, const char *name = 0 ); + TQObject *tqparent = 0, const char *name = 0 ); ~IndexCleaner(); void start(); diff --git a/kmrml/kmrml/kcontrol/indexer.cpp b/kmrml/kmrml/kcontrol/indexer.cpp index f4c4b108..0308dd39 100644 --- a/kmrml/kmrml/kcontrol/indexer.cpp +++ b/kmrml/kmrml/kcontrol/indexer.cpp @@ -28,16 +28,16 @@ #include #if KDE_VERSION < 306 - #define QUOTE( x ) x + #define TQUOTE( x ) x #else - #define QUOTE( x ) KProcess::quote( x ) + #define TQUOTE( x ) KProcess::quote( x ) #endif using namespace KMrmlConfig; Indexer::Indexer( const KMrml::Config* config, - TQObject *parent, const char *name ) - : TQObject( parent, name ), + TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_config( config ), m_dirCount( 0 ) { @@ -93,14 +93,14 @@ void Indexer::processNext() TQString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace(); - // in the commandline, replace %d with the directory to process and + // in the commandline, tqreplace %d with the directory to process and // %t with the thumbnail dir - int index = cmd.find( "%d" ); // ### TQFile::encodeName()? + int index = cmd.tqfind( "%d" ); // ### TQFile::encodeName()? if ( index != -1 ) - cmd.replace( index, 2, QUOTE( m_currentDir ) ); - index = cmd.find( "%t" ); + cmd.tqreplace( index, 2, TQUOTE( m_currentDir ) ); + index = cmd.tqfind( "%t" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE(m_currentDir + "_thumbnails") ); + cmd.tqreplace( index, 2, TQUOTE(m_currentDir + "_thumbnails") ); // qDebug("****** command: %s", cmd.latin1()); #if KDE_VERSION >= 306 @@ -112,7 +112,7 @@ void Indexer::processNext() *m_process << *it; #endif - emit progress( 0, i18n("Next Folder:
%1").arg( m_currentDir )); + emit progress( 0, i18n("Next Folder:
%1").tqarg( m_currentDir )); m_process->start(); } @@ -160,7 +160,7 @@ void Indexer::slotCanRead( KProcIO *proc ) if ( ok ) { uint dirsLeft = m_dirs.count(); - TQString message = i18n( "Processing folder %1 of %2:
%3
File %4 of %5.
").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles ); + TQString message = i18n( "Processing folder %1 of %2:
%3
File %4 of %5.
").tqarg( m_dirCount - dirsLeft ).tqarg( m_dirCount).tqarg( m_currentDir ).tqarg( currentFile ).tqarg( numFiles ); emit progress( perc, message ); } } diff --git a/kmrml/kmrml/kcontrol/indexer.h b/kmrml/kmrml/kcontrol/indexer.h index 290c9937..d9fede24 100644 --- a/kmrml/kmrml/kcontrol/indexer.h +++ b/kmrml/kmrml/kcontrol/indexer.h @@ -28,13 +28,14 @@ class KProcIO; namespace KMrmlConfig { - class Indexer : public QObject + class Indexer : public TQObject { Q_OBJECT + TQ_OBJECT public: Indexer( const KMrml::Config *config, - TQObject *parent = 0L, const char *name = 0 ); + TQObject *tqparent = 0L, const char *name = 0 ); ~Indexer(); void startIndexing( const TQStringList& dirs ); diff --git a/kmrml/kmrml/kcontrol/indextest.h b/kmrml/kmrml/kcontrol/indextest.h index 15cda2ce..91320d2e 100644 --- a/kmrml/kmrml/kcontrol/indextest.h +++ b/kmrml/kmrml/kcontrol/indextest.h @@ -8,9 +8,10 @@ #ifndef INDEXTEST_H #define INDEXTEST_H -class IndexTest : public QObject +class IndexTest : public TQObject { Q_OBJECT + TQ_OBJECT public: IndexTest(); diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.cpp b/kmrml/kmrml/kcontrol/kcmkmrml.cpp index d2b60fc0..3bff026a 100644 --- a/kmrml/kmrml/kcontrol/kcmkmrml.cpp +++ b/kmrml/kmrml/kcontrol/kcmkmrml.cpp @@ -43,8 +43,8 @@ static const int COL_FILENAME = 1; typedef KGenericFactory MrmlFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kmrml, MrmlFactory("kmrml") ) -KCMKMrml::KCMKMrml(TQWidget *parent, const char *name, const TQStringList & ): - KCModule(MrmlFactory::instance(), parent, name) +KCMKMrml::KCMKMrml(TQWidget *tqparent, const char *name, const TQStringList & ): + KCModule(MrmlFactory::instance(), tqparent, name) { KAboutData* ab = new KAboutData( "kcmkmrml", @@ -58,11 +58,11 @@ KCMKMrml::KCMKMrml(TQWidget *parent, const char *name, const TQStringList & ): ab->addAuthor( "Carsten Pfeiffer", 0, "pfeiffer@kde.org" ); setAboutData( ab ); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + tqlayout->setSpacing( KDialog::spacingHint() ); m_mainPage = new MainPage( this, "main page" ); - layout->addWidget( m_mainPage ); + tqlayout->addWidget( m_mainPage ); connect( m_mainPage, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ))); @@ -86,11 +86,11 @@ void KCMKMrml::checkGiftInstallation() KMessageBox::error( this, errorMessage ); m_mainPage->hide(); TQLabel *errorLabel = new TQLabel( errorMessage, this ); - errorLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); - KURLLabel *urlLabel = new KURLLabel( "http://www.gnu.org/software/gift", TQString::null, this ); - urlLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + errorLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + KURLLabel *urlLabel = new KURLLabel( "http://www.gnu.org/software/gift", TQString(), this ); + urlLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& )), kapp, TQT_SLOT( invokeBrowser( const TQString& )) ); - TQLayout *l = layout(); + TQLayout *l = tqlayout(); l->addItem( new TQSpacerItem( 0, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); l->add( errorLabel ); l->add( urlLabel ); diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.h b/kmrml/kmrml/kcontrol/kcmkmrml.h index 306e55f0..1c15a0a2 100644 --- a/kmrml/kmrml/kcontrol/kcmkmrml.h +++ b/kmrml/kmrml/kcontrol/kcmkmrml.h @@ -31,9 +31,10 @@ namespace KMrmlConfig class KCMKMrml : public KCModule { Q_OBJECT + TQ_OBJECT public: - KCMKMrml(TQWidget *parent, const char *name, const TQStringList &); + KCMKMrml(TQWidget *tqparent, const char *name, const TQStringList &); virtual ~KCMKMrml(); virtual void defaults(); diff --git a/kmrml/kmrml/kcontrol/mainpage.cpp b/kmrml/kmrml/kcontrol/mainpage.cpp index c4e65ac3..ab6fc84b 100644 --- a/kmrml/kmrml/kcontrol/mainpage.cpp +++ b/kmrml/kmrml/kcontrol/mainpage.cpp @@ -50,8 +50,8 @@ using namespace KMrmlConfig; -MainPage::MainPage( TQWidget *parent, const char *name ) - : TQVBox( parent, name ), +MainPage::MainPage( TQWidget *tqparent, const char *name ) + : TQVBox( tqparent, name ), m_indexer( 0L ), m_indexCleaner( 0L ), m_progressDialog( 0L ), @@ -132,7 +132,7 @@ void MainPage::resetDefaults() m_listBox->clear(); - // slotHostChanged(); not necessary, will be called by Qt signals + // slotHostChanged(); not necessary, will be called by TQt signals slotUseAuthChanged( m_serverWidget->m_useAuth->isChecked() ); blockSignals( false ); @@ -151,7 +151,7 @@ void MainPage::load() m_listBox->clear(); m_listBox->insertStringList( m_config->indexableDirectories() ); - // slotHostChanged(); not necessary, will be called by Qt signals + // slotHostChanged(); not necessary, will be called by TQt signals slotUseAuthChanged( m_serverWidget->m_useAuth->isChecked() ); blockSignals( false ); @@ -186,7 +186,7 @@ TQStringList MainPage::difference( const TQStringList& oldIndexDirs, { TQStringList result; - TQString slash = TQString::fromLatin1("/"); + TQString slash = TQString::tqfromLatin1("/"); TQStringList::ConstIterator oldIt = oldIndexDirs.begin(); TQString oldDir, newDir; @@ -341,7 +341,7 @@ void MainPage::slotRemoveClicked() void MainPage::enableWidgetsFor( const KMrml::ServerSettings& settings ) { TQString host = settings.host; - bool enableWidgets = (m_config->hosts().findIndex( host ) > -1); + bool enableWidgets = (m_config->hosts().tqfindIndex( host ) > -1); m_serverWidget->m_addButton->setEnabled(!enableWidgets && !host.isEmpty()); m_serverWidget->m_removeButton->setEnabled( enableWidgets && !host.isEmpty() && @@ -397,7 +397,7 @@ void MainPage::processIndexDirs( const TQStringList& removeDirs ) if ( !removeDirs.isEmpty() ) { - m_indexCleaner = new IndexCleaner( removeDirs, m_config, this ); + m_indexCleaner = new IndexCleaner( removeDirs, m_config, TQT_TQOBJECT(this) ); connect( m_indexCleaner, TQT_SIGNAL( advance( int ) ), m_progressDialog->progressBar(), TQT_SLOT( advance( int ) )); connect( m_indexCleaner, TQT_SIGNAL( finished() ), @@ -437,7 +437,7 @@ void MainPage::slotMaybeIndex() m_progressDialog->progressBar()->setProgress( 0 ); // do the indexing - m_indexer = new Indexer( m_config, this, "Indexer" ); + m_indexer = new Indexer( m_config, TQT_TQOBJECT(this), "Indexer" ); connect( m_indexer, TQT_SIGNAL( progress( int, const TQString& )), TQT_SLOT( slotIndexingProgress( int, const TQString& ) )); connect( m_indexer, TQT_SIGNAL( finished( int )), @@ -465,7 +465,7 @@ void MainPage::slotIndexingFinished( int returnCode ) if ( err ) syserr = TQString::fromLocal8Bit( err ); else - syserr = i18n("Unknown error: %1").arg( returnCode ); + syserr = i18n("Unknown error: %1").tqarg( returnCode ); } KMessageBox::detailedError( this, i18n("An error occurred during indexing. The index might be invalid."), diff --git a/kmrml/kmrml/kcontrol/mainpage.h b/kmrml/kmrml/kcontrol/mainpage.h index 8000aea9..7a7d6902 100644 --- a/kmrml/kmrml/kcontrol/mainpage.h +++ b/kmrml/kmrml/kcontrol/mainpage.h @@ -43,12 +43,13 @@ namespace KMrmlConfig class Indexer; class IndexCleaner; - class MainPage : public QVBox + class MainPage : public TQVBox { Q_OBJECT + TQ_OBJECT public: - MainPage( TQWidget *parent, const char *name ); + MainPage( TQWidget *tqparent, const char *name ); ~MainPage(); void resetDefaults(); diff --git a/kmrml/kmrml/kcontrol/serverconfigwidget.ui b/kmrml/kmrml/kcontrol/serverconfigwidget.ui index e0a08007..c78a5046 100644 --- a/kmrml/kmrml/kcontrol/serverconfigwidget.ui +++ b/kmrml/kmrml/kcontrol/serverconfigwidget.ui @@ -1,6 +1,6 @@ ServerConfigWidget - + ServerConfigWidget @@ -22,7 +22,7 @@ 6 - + Layout7 @@ -36,7 +36,7 @@ 6 - + Layout4 @@ -66,7 +66,7 @@ true - + m_addButton @@ -74,7 +74,7 @@ &Add - + m_removeButton @@ -84,7 +84,7 @@ - + Layout6 @@ -114,7 +114,7 @@ TCP/IP Port Number of the Indexing Server - + m_autoPort @@ -135,7 +135,7 @@ Expanding - + 200 0 @@ -144,7 +144,7 @@ - + m_hostLabel @@ -155,7 +155,7 @@ m_hostCombo - + m_portLabel @@ -168,7 +168,7 @@ - + m_useAuth @@ -176,7 +176,7 @@ Per&form authentication - + Layout12 @@ -200,14 +200,14 @@ Fixed - + 16 16 - + Layout6 @@ -221,7 +221,7 @@ 6 - + m_userLabel @@ -237,7 +237,7 @@ m_passEdit - + m_passLabel @@ -268,5 +268,5 @@ m_userEdit m_passEdit - + diff --git a/kmrml/kmrml/lib/kmrml_config.cpp b/kmrml/kmrml/lib/kmrml_config.cpp index 6358971d..6d779860 100644 --- a/kmrml/kmrml/lib/kmrml_config.cpp +++ b/kmrml/kmrml/lib/kmrml_config.cpp @@ -30,9 +30,9 @@ #include #if KDE_VERSION < 307 - #define QUOTE( x ) x + #define TQUOTE( x ) x #else - #define QUOTE( x ) KProcess::quote( x ) + #define TQUOTE( x ) KProcess::quote( x ) #endif using namespace KMrml; @@ -104,7 +104,7 @@ bool Config::sync() void Config::setDefaultHost( const TQString& host ) { m_defaultHost = host.isEmpty() ? - TQString::fromLatin1(DEFAULT_HOST) : host; + TQString::tqfromLatin1(DEFAULT_HOST) : host; m_config->setGroup( CONFIG_GROUP ); m_config->writeEntry( "Default Host", m_defaultHost ); @@ -137,7 +137,7 @@ ServerSettings Config::settingsForHost( const TQString& host ) const void Config::addSettings( const ServerSettings& settings ) { TQString host = settings.host; - if ( m_hostList.find( host ) == m_hostList.end() ) + if ( m_hostList.tqfind( host ) == m_hostList.end() ) m_hostList.append( host ); m_config->setGroup( CONFIG_GROUP ); @@ -181,13 +181,13 @@ TQString Config::addCollectionCommandLine() const m_config->setGroup( CONFIG_GROUP ); TQString cmd = m_config->readEntry( "AddCollection Commandline", DEFAULT_ADDCOLLECTION_CMD ); - int index = cmd.find( "%h" ); + int index = cmd.tqfind( "%h" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE( mrmldDataDir() ) ); + cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); - index = cmd.find( "%e" ); + index = cmd.tqfind( "%e" ); if ( index != -1 ) - cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); + cmd.tqreplace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); return cmd; } @@ -203,13 +203,13 @@ TQString Config::removeCollectionCommandLine() const m_config->setGroup( CONFIG_GROUP ); TQString cmd = m_config->readEntry( "RemoveCollection Commandline", DEFAULT_REMOVECOLLECTION_CMD ); - int index = cmd.find( "%h" ); + int index = cmd.tqfind( "%h" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE( mrmldDataDir() ) ); + cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); - index = cmd.find( "%e" ); + index = cmd.tqfind( "%e" ); if ( index != -1 ) - cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); + cmd.tqreplace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); return cmd; } @@ -231,17 +231,17 @@ TQString Config::mrmldCommandline() const DEFAULT_MRMLD_CMD ); // add data directory and port to the commandline - int index = cmd.find( "%p" ); + int index = cmd.tqfind( "%p" ); if ( index != -1 ) { TQString port = settings.autoPort ? - TQString::null : TQString::number( settings.configuredPort ); - cmd.replace( index, 2, port ); + TQString() : TQString::number( settings.configuredPort ); + cmd.tqreplace( index, 2, port ); } - index = cmd.find( "%d" ); + index = cmd.tqfind( "%d" ); if ( index != -1 ) { - cmd.replace( index, 2, QUOTE( mrmldDataDir() ) ); + cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); } qDebug("***** commandline: %s", cmd.latin1()); diff --git a/kmrml/kmrml/lib/kmrml_config.h b/kmrml/kmrml/lib/kmrml_config.h index 2208030a..4e39d3bf 100644 --- a/kmrml/kmrml/lib/kmrml_config.h +++ b/kmrml/kmrml/lib/kmrml_config.h @@ -108,7 +108,7 @@ namespace KMrml TQString settingsGroup( const TQString& host ) const { - return TQString::fromLatin1( "SettingsFor: " ).append( host ); + return TQString::tqfromLatin1( "SettingsFor: " ).append( host ); } bool m_serverStartedIndividually; diff --git a/kmrml/kmrml/lib/mrml_shared.cpp b/kmrml/kmrml/lib/mrml_shared.cpp index 3e7d6d95..932010f6 100644 --- a/kmrml/kmrml/lib/mrml_shared.cpp +++ b/kmrml/kmrml/lib/mrml_shared.cpp @@ -53,7 +53,7 @@ const TQString * MrmlShared::m_element = 0L; const TQString * MrmlShared::m_attribute = 0L; const TQString * MrmlShared::m_attributeName = 0L; const TQString * MrmlShared::m_attributeValue = 0L; -const TQString * MrmlShared::m_children = 0L; +const TQString * MrmlShared::m_tqchildren = 0L; const TQString * MrmlShared::m_none = 0L; const TQString * MrmlShared::m_multiSet = 0L; @@ -141,7 +141,7 @@ void MrmlShared::init() m_attribute = new TQString ( "attribute" ) ; m_attributeName = new TQString ( "attribute-name" ) ; m_attributeValue = new TQString ( "attribute-value" ) ; - m_children = new TQString ( "children" ) ; + m_tqchildren = new TQString ( "tqchildren" ) ; m_none = new TQString ( "none" ) ; m_multiSet = new TQString ( "multi-set" ) ; @@ -215,7 +215,7 @@ void MrmlShared::cleanup() delete m_attribute; delete m_attributeName; delete m_attributeValue; - delete m_children; + delete m_tqchildren; delete m_none; delete m_visibility; diff --git a/kmrml/kmrml/lib/mrml_shared.h b/kmrml/kmrml/lib/mrml_shared.h index 6ed2177a..175d5c3c 100644 --- a/kmrml/kmrml/lib/mrml_shared.h +++ b/kmrml/kmrml/lib/mrml_shared.h @@ -76,7 +76,7 @@ public: static const TQString& attribute() { return *m_attribute; } static const TQString& attributeName() { return *m_attributeName; } static const TQString& attributeValue() { return *m_attributeValue; } - static const TQString& children() { return *m_children; } + static const TQString& tqchildren() { return *m_tqchildren; } static const TQString& none() { return *m_none; } static const TQString& visibility() { return *m_visibility; } @@ -139,7 +139,7 @@ private: static const TQString * m_attribute; static const TQString * m_attributeName; static const TQString * m_attributeValue; - static const TQString * m_children; + static const TQString * m_tqchildren; static const TQString * m_none; static const TQString * m_visibility; diff --git a/kmrml/kmrml/lib/mrml_utils.h b/kmrml/kmrml/lib/mrml_utils.h index ee2fdb30..5707b177 100644 --- a/kmrml/kmrml/lib/mrml_utils.h +++ b/kmrml/kmrml/lib/mrml_utils.h @@ -28,7 +28,7 @@ namespace KMrml { - class Util : public QObject + class Util : public TQObject { public: static Util * self(); diff --git a/kmrml/kmrml/lib/watcher_stub.cpp b/kmrml/kmrml/lib/watcher_stub.cpp index ca9ca7b2..d10dcbc7 100644 --- a/kmrml/kmrml/lib/watcher_stub.cpp +++ b/kmrml/kmrml/lib/watcher_stub.cpp @@ -78,7 +78,7 @@ TQStringList Watcher_stub::runningDaemons() TQByteArray data, replyData; TQCString replyType; if ( dcopClient()->call( app(), obj(), "runningDaemons()", data, replyType, replyData ) ) { - if ( replyType == "TQStringList" ) { + if ( replyType == TQSTRINGLIST_OBJECT_NAME_STRING ) { TQDataStream _reply_stream( replyData, IO_ReadOnly ); _reply_stream >> result; setStatus( CallSucceeded ); diff --git a/kmrml/kmrml/loader.cpp b/kmrml/kmrml/loader.cpp index ea8803e2..f8cbecb3 100644 --- a/kmrml/kmrml/loader.cpp +++ b/kmrml/kmrml/loader.cpp @@ -72,7 +72,7 @@ void Loader::requestDownload( const KURL& url ) void Loader::slotData( KIO::Job *job, const TQByteArray& data ) { - DownloadIterator it = m_downloads.find( static_cast(job) ); + DownloadIterator it = m_downloads.tqfind( static_cast(job) ); if ( it != m_downloads.end() ) { TQBuffer& buffer = it.data()->m_buffer; if ( !buffer.isOpen() ) @@ -90,7 +90,7 @@ void Loader::slotResult( KIO::Job *job ) { KIO::TransferJob *tjob = static_cast( job ); - DownloadIterator it = m_downloads.find( tjob ); + DownloadIterator it = m_downloads.tqfind( tjob ); if ( it != m_downloads.end() ) { Download *d = it.data(); diff --git a/kmrml/kmrml/loader.h b/kmrml/kmrml/loader.h index 8e1090cf..7b0cef21 100644 --- a/kmrml/kmrml/loader.h +++ b/kmrml/kmrml/loader.h @@ -39,10 +39,11 @@ public: }; -class Loader : public QObject +class Loader : public TQObject { friend class gcc_sucks; Q_OBJECT + TQ_OBJECT public: static Loader *self(); diff --git a/kmrml/kmrml/mrml.cpp b/kmrml/kmrml/mrml.cpp index 1d998476..8fdcce29 100644 --- a/kmrml/kmrml/mrml.cpp +++ b/kmrml/kmrml/mrml.cpp @@ -214,13 +214,13 @@ bool Mrml::startSession( const KURL& url ) // desired collection-id // Wolfgang says, we shouldn't create an own session-id here, as gcc 2.95 - // apparently makes problems in exception handling somehow. So we simply + // aptqparently makes problems in exception handling somehow. So we simply // accept the server's session-id. - TQString msg = mrmlString( TQString::null ).arg( + TQString msg = mrmlString( TQString() ).tqarg( " \ \ \ - " ).arg( user( url )); + " ).tqarg( user( url )); TQCString utf8 = msg.utf8(); // qDebug(":::Writing: %s", utf8.data()); @@ -240,13 +240,13 @@ TQString Mrml::mrmlString( const TQString& sessionId, const TQString& transactio "; if ( sessionId.isEmpty() ) // when we don't have one yet - return msg.arg( "%1" ); + return msg.tqarg( "%1" ); if ( transactionId.isNull() ) - return msg.arg( "%1" ).arg( sessionId ); + return msg.tqarg( "%1" ).tqarg( sessionId ); else - return msg.arg( "%1") - .arg( sessionId ).arg( transactionId ); + return msg.tqarg( "%1") + .tqarg( sessionId ).tqarg( transactionId ); } void Mrml::emitData( const TQCString& msg ) diff --git a/kmrml/kmrml/mrml.h b/kmrml/kmrml/mrml.h index c6ee01b2..d0493168 100644 --- a/kmrml/kmrml/mrml.h +++ b/kmrml/kmrml/mrml.h @@ -56,7 +56,7 @@ private: } static TQString mrmlString( const TQString& sessionId, - const TQString& transactionId = TQString::null ); + const TQString& transactionId = TQString() ); static TQCString loginString(); static TQCString getConfigurationString(); diff --git a/kmrml/kmrml/mrml_creator.cpp b/kmrml/kmrml/mrml_creator.cpp index fe4a14c6..03f2ef77 100644 --- a/kmrml/kmrml/mrml_creator.cpp +++ b/kmrml/kmrml/mrml_creator.cpp @@ -65,12 +65,12 @@ TQDomElement MrmlCreator::addRelevanceList( TQDomElement& query ) * Creates a with the given attributes set. */ void MrmlCreator::createRelevanceElement( TQDomDocument& doc, - TQDomElement& parent, + TQDomElement& tqparent, const TQString& url, Relevance relevance ) { TQDomElement element = doc.createElement( "user-relevance-element" ); element.setAttribute( "image-location", url ); element.setAttribute( "user-relevance", TQString::number( relevance ) ); - parent.appendChild( element ); + tqparent.appendChild( element ); } diff --git a/kmrml/kmrml/mrml_creator.h b/kmrml/kmrml/mrml_creator.h index 18e49551..2c9e33c3 100644 --- a/kmrml/kmrml/mrml_creator.h +++ b/kmrml/kmrml/mrml_creator.h @@ -32,7 +32,7 @@ namespace MrmlCreator TQDomElement createMrml( TQDomDocument& doc, const TQString& sessionId, - const TQString& transactionId = TQString::null ); + const TQString& transactionId = TQString() ); TQDomElement configureSession( TQDomElement& mrml, const KMrml::Algorithm& algo, const TQString& sessionId ); @@ -41,7 +41,7 @@ namespace MrmlCreator /** * Creates a with the given attributes set. */ - void createRelevanceElement( TQDomDocument& doc, TQDomElement& parent, + void createRelevanceElement( TQDomDocument& doc, TQDomElement& tqparent, const TQString& url, Relevance relevance ); } diff --git a/kmrml/kmrml/mrml_elements.cpp b/kmrml/kmrml/mrml_elements.cpp index 3fadcaba..a5a0ebb1 100644 --- a/kmrml/kmrml/mrml_elements.cpp +++ b/kmrml/kmrml/mrml_elements.cpp @@ -28,7 +28,7 @@ using namespace KMrml; // // MrmlElement is currently the baseclass for Algorithm and Collection. Both // may have a single child-element , with a number of -// elements as children. +// elements as tqchildren. // MrmlElement::MrmlElement( const TQDomElement& elem ) @@ -144,11 +144,11 @@ Algorithm Algorithm::defaultAlgorithm() return algo; } -TQDomElement Algorithm::toElement( TQDomElement& parent ) const +TQDomElement Algorithm::toElement( TQDomElement& tqparent ) const { - TQDomDocument doc = parent.ownerDocument(); + TQDomDocument doc = tqparent.ownerDocument(); TQDomElement algorithm = doc.createElement( MrmlShared::algorithm() ); - parent.appendChild( algorithm ); + tqparent.appendChild( algorithm ); setOtherAttributes( algorithm ); if ( !m_name.isEmpty() ) @@ -194,7 +194,7 @@ bool QueryParadigm::equalMaps( const TQMap m1, TQMapConstIterator it = m1.begin(); for ( ; it != m1.end(); ++it ) { - TQMapConstIterator it2 = m2.find( it.key() ); + TQMapConstIterator it2 = m2.tqfind( it.key() ); if ( it2 == m2.end() || it.data() != it2.data() ) return false; } @@ -242,12 +242,12 @@ bool QueryParadigmList::matches( const QueryParadigmList& other ) const /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// -TQValueList KMrml::directChildElements( const TQDomElement& parent, +TQValueList KMrml::directChildElements( const TQDomElement& tqparent, const TQString& tagName ) { TQValueList list; - TQDomNode node = parent.firstChild(); + TQDomNode node = tqparent.firstChild(); while ( !node.isNull() ) { if ( node.isElement() && node.nodeName() == tagName ) @@ -259,10 +259,10 @@ TQValueList KMrml::directChildElements( const TQDomElement& parent return list; } -TQDomElement KMrml::firstChildElement( const TQDomElement& parent, +TQDomElement KMrml::firstChildElement( const TQDomElement& tqparent, const TQString& tagName ) { - TQDomNode node = parent.firstChild(); + TQDomNode node = tqparent.firstChild(); while ( !node.isNull() ) { if ( node.isElement() && node.nodeName() == tagName ) diff --git a/kmrml/kmrml/mrml_elements.h b/kmrml/kmrml/mrml_elements.h index 6fe6767d..ae66dcab 100644 --- a/kmrml/kmrml/mrml_elements.h +++ b/kmrml/kmrml/mrml_elements.h @@ -106,7 +106,7 @@ namespace KMrml m_collectionId = id; } - TQDomElement toElement( TQDomElement& parent ) const; + TQDomElement toElement( TQDomElement& tqparent ) const; const PropertySheet& propertySheet() const; static Algorithm defaultAlgorithm(); @@ -221,9 +221,9 @@ namespace KMrml }; - TQValueList directChildElements( const TQDomElement& parent, + TQValueList directChildElements( const TQDomElement& tqparent, const TQString& tagName); - TQDomElement firstChildElement( const TQDomElement& parent, + TQDomElement firstChildElement( const TQDomElement& tqparent, const TQString& tagName ); diff --git a/kmrml/kmrml/mrml_part.cpp b/kmrml/kmrml/mrml_part.cpp index ba0cad5e..2ec0af90 100644 --- a/kmrml/kmrml/mrml_part.cpp +++ b/kmrml/kmrml/mrml_part.cpp @@ -90,14 +90,14 @@ KInstance * PartFactory::instance() return s_instance; } -KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget, +KParts::Part * PartFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, - TQObject *parent, + TQObject *tqparent, const char *name, const char *, const TQStringList& args ) { - return new MrmlPart( parentWidget, widgetName, parent, name, args ); + return new MrmlPart( tqparentWidget, widgetName, tqparent, name, args ); } @@ -111,10 +111,10 @@ KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget, uint MrmlPart::s_sessionId = 0; -MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, - TQObject *parent, const char *name, +MrmlPart::MrmlPart( TQWidget *tqparentWidget, const char * /* widgetName */, + TQObject *tqparent, const char *name, const TQStringList& /* args */ ) - : KParts::ReadOnlyPart( parent, name ), + : KParts::ReadOnlyPart( tqparent, name ), m_job( 0L ), m_status( NeedCollection ) { @@ -126,7 +126,7 @@ MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, KConfig *config = PartFactory::instance()->config(); config->setGroup("MRML Settings"); - TQVBox *box = new TQVBox( parentWidget, "main mrml box" ); + TQVBox *box = new TQVBox( tqparentWidget, "main mrml box" ); m_view = new MrmlView( box, "MrmlView" ); connect( m_view, TQT_SIGNAL( activated( const KURL&, ButtonState )), this, TQT_SLOT( slotActivated( const KURL&, ButtonState ))); @@ -151,15 +151,15 @@ MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, // prevent crashes when the connection to the server fails m_collectionCombo->setCollections( &m_collections ); - m_algoButton = new TQPushButton( TQString::null, m_panel ); + m_algoButton = new TQPushButton( TQString(), m_panel ); m_algoButton->setPixmap( SmallIcon("configure") ); - m_algoButton->setFixedSize( m_algoButton->sizeHint() ); + m_algoButton->setFixedSize( m_algoButton->tqsizeHint() ); connect( m_algoButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureAlgorithm() )); TQToolTip::add( m_algoButton, i18n("Configure algorithm") ); TQWidget *spacer = new TQWidget( m_panel ); - spacer->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, + spacer->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum ) ); int resultSize = config->readNumEntry( "Result-size", 20 ); @@ -170,15 +170,15 @@ MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, TQVBox *tmp = new TQVBox( m_panel ); m_random = new TQCheckBox( i18n("Random search"), tmp ); - m_startButton = new TQPushButton( TQString::null, tmp ); + m_startButton = new TQPushButton( TQString(), tmp ); connect( m_startButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStartClicked() )); - setStatus( NeedCollection ); + settqStatus( NeedCollection ); setWidget( box ); // setXMLFile( "mrml_part.rc" ); - slotSetStatusBar( TQString::null ); + slotSetStatusBar( TQString() ); enableServerDependentWidgets( false ); } @@ -206,7 +206,7 @@ void MrmlPart::initCollections( const TQDomElement& elem ) KMessageBox::information( widget(), i18n("There is no image collection available\n" "at %1.\n"), i18n("No Image Collection")); - setStatus( NeedCollection ); + settqStatus( NeedCollection ); } else m_collectionCombo->updateGeometry(); // adjust the entire grid @@ -229,7 +229,7 @@ bool MrmlPart::openURL( const KURL& url ) m_url = url; TQString host = url.host().isEmpty() ? - TQString::fromLatin1("localhost") : url.host(); + TQString::tqfromLatin1("localhost") : url.host(); m_hostCombo->setCurrentItem( host ); @@ -285,8 +285,8 @@ bool MrmlPart::openURL( const KURL& url ) == KMessageBox::Yes ) { KApplication::kdeinitExec( "kcmshell", - TQString::fromLatin1("kcmkmrml")); - setStatus( NeedCollection ); + TQString::tqfromLatin1("kcmkmrml")); + settqStatus( NeedCollection ); return false; } } @@ -308,9 +308,9 @@ void MrmlPart::contactServer( const KURL& url ) m_job->addMetaData( MrmlShared::kio_task(), MrmlShared::kio_initialize() ); TQString host = url.host().isEmpty() ? - TQString::fromLatin1("localhost") : url.host(); + TQString::tqfromLatin1("localhost") : url.host(); - slotSetStatusBar( i18n("Connecting to indexing server at %1...").arg( host )); + slotSetStatusBar( i18n("Connecting to indexing server at %1...").tqarg( host )); } // @@ -325,11 +325,11 @@ void MrmlPart::downloadReferenceFiles( const KURL::List& downloadList ) for ( ; it != downloadList.end(); it++ ) { TQString extension; - int index = (*it).fileName().findRev( '.' ); + int index = (*it).fileName().tqfindRev( '.' ); if ( index != -1 ) extension = (*it).fileName().mid( index ); - KTempFile tmpFile( TQString::null, extension ); + KTempFile tmpFile( TQString(), extension ); if ( tmpFile.status() != 0 ) { kdWarning() << "Can't create temporary file, skipping: " << *it << endl; @@ -376,7 +376,7 @@ bool MrmlPart::closeURL() m_job = 0L; } - setStatus( NeedCollection ); + settqStatus( NeedCollection ); return true; } @@ -400,7 +400,7 @@ KIO::TransferJob * MrmlPart::transferJob( const KURL& url ) emit started( job ); emit setWindowCaption( url.prettyURL() ); - setStatus( InProgress ); + settqStatus( InProgress ); return job; } @@ -410,7 +410,7 @@ void MrmlPart::slotResult( KIO::Job *job ) if ( job == m_job ) m_job = 0L; - slotSetStatusBar( TQString::null ); + slotSetStatusBar( TQString() ); if ( !job->error() ) emit completed(); @@ -423,7 +423,7 @@ void MrmlPart::slotResult( KIO::Job *job ) bool auto_random = m_view->isEmpty() && m_queryList.isEmpty(); m_random->setChecked( auto_random ); m_random->setEnabled( !auto_random ); - setStatus( job->error() ? NeedCollection : CanSearch ); + settqStatus( job->error() ? NeedCollection : CanSearch ); if ( !job->error() && !m_queryList.isEmpty() ) { // we have a connection and we got a list of relevant URLs to query for @@ -495,7 +495,7 @@ void MrmlPart::parseMrml( TQDomDocument& doc ) else if ( tagName == "error" ) { KMessageBox::information( widget(), i18n("Server returned error:\n%1\n") - .arg( elem.attribute( "message" )), + .tqarg( elem.attribute( "message" )), i18n("Server Error") ); } @@ -560,8 +560,8 @@ void MrmlPart::slotStartClicked() // cut off an eventual query and reference from the url, when the user // performs a real query (otherwise restoreState() would restore and // re-do the query from the URL - m_url.setRef( TQString::null ); - m_url.setQuery( TQString::null ); + m_url.setRef( TQString() ); + m_url.setQuery( TQString() ); createQuery(); m_browser->openURLNotify(); @@ -677,7 +677,7 @@ void MrmlPart::performQuery( TQDomDocument& doc ) queryStep.setAttribute("query-type", "at-random"); // remove user-relevance-element-list element for random search - relevanceList.parentNode().removeChild( relevanceList ); + relevanceList.tqparentNode().removeChild( relevanceList ); } } else @@ -705,13 +705,13 @@ void MrmlPart::slotSetStatusBar( const TQString& text ) void MrmlPart::slotActivated( const KURL& url, ButtonState button ) { - if ( button == LeftButton ) + if ( button == Qt::LeftButton ) emit m_browser->openURLRequest( url ); - else if ( button == MidButton ) + else if ( button == Qt::MidButton ) emit m_browser->createNewWindow( url ); - else if ( button == RightButton ) { + else if ( button == Qt::RightButton ) { // enableExtensionActions( url, true ); // for now - emit m_browser->popupMenu( TQCursor::pos(), url, TQString::null ); + emit m_browser->popupMenu( TQCursor::pos(), url, TQString() ); // enableExtensionActions( url, false ); } } @@ -776,7 +776,7 @@ void MrmlPart::slotHostComboActivated( const TQString& host ) openURL( settings.getUrl() ); } -void MrmlPart::setStatus( Status status ) +void MrmlPart::settqStatus( tqStatus status ) { switch ( status ) { diff --git a/kmrml/kmrml/mrml_part.h b/kmrml/kmrml/mrml_part.h index 84ce0529..fbe82d25 100644 --- a/kmrml/kmrml/mrml_part.h +++ b/kmrml/kmrml/mrml_part.h @@ -54,16 +54,17 @@ class MrmlView; class MrmlPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - enum Status { NeedCollection, CanSearch, InProgress }; + enum tqStatus { NeedCollection, CanSearch, InProgress }; - MrmlPart( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, const TQStringList& args ); + MrmlPart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList& args ); ~MrmlPart(); TQString sessionId() const { return m_sessionId; } - TQString transactionId() const { return TQString::null; } // ### + TQString transactionId() const { return TQString(); } // ### void saveState( TQDataStream& stream ); void restoreState( TQDataStream& stream ); @@ -115,7 +116,7 @@ private: void initHostCombo(); void enableServerDependentWidgets( bool enable ); - void setStatus( Status status ); + void settqStatus( tqStatus status ); void contactServer( const KURL& url ); void downloadReferenceFiles( const KURL::List& downloadList ); @@ -142,7 +143,7 @@ private: CollectionList m_collections; AlgorithmList m_algorithms; - Status m_status; + tqStatus m_status; static uint s_sessionId; }; @@ -150,6 +151,7 @@ private: class PartFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: PartFactory(); @@ -158,9 +160,9 @@ public: static KInstance * instance(); protected: - virtual KParts::Part * createPartObject( TQWidget *parentWidget = 0, + virtual KParts::Part * createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0, - TQObject *parent = 0, + TQObject *tqparent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList& args = TQStringList() ); diff --git a/kmrml/kmrml/mrml_view.cpp b/kmrml/kmrml/mrml_view.cpp index 89c15061..254307e0 100644 --- a/kmrml/kmrml/mrml_view.cpp +++ b/kmrml/kmrml/mrml_view.cpp @@ -37,8 +37,8 @@ using namespace KMrml; -MrmlView::MrmlView( TQWidget *parent, const char *name ) - : TQScrollView( parent, name ) +MrmlView::MrmlView( TQWidget *tqparent, const char *name ) + : TQScrollView( tqparent, name ) { setStaticBackground( true ); setResizePolicy( Manual ); @@ -57,11 +57,11 @@ MrmlView::MrmlView( TQWidget *parent, const char *name ) // query result image TQLabel l( i18n( "No thumbnail available" ), 0L ); l.setFixedSize( 80, 80 ); - l.setAlignment( WordBreak | AlignCenter ); + l.tqsetAlignment( WordBreak | AlignCenter ); // l.setFrameStyle( TQLabel::Box | TQLabel::Plain ); // l.setLineWidth( 1 ); - l.setPaletteBackgroundColor( Qt::white ); - l.setPaletteForegroundColor( Qt::black ); + l.setPaletteBackgroundColor( TQt::white ); + l.setPaletteForegroundColor( TQt::black ); m_unavailablePixmap = TQPixmap::grabWidget( &l ); } @@ -103,11 +103,11 @@ MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL, } void MrmlView::addRelevanceToQuery( TQDomDocument& document, - TQDomElement& parent ) + TQDomElement& tqparent ) { TQPtrListIterator it( m_items ); for( ; it.current(); ++it ) { - it.current()->createRelevanceElement( document, parent ); + it.current()->createRelevanceElement( document, tqparent ); } } @@ -120,7 +120,7 @@ void MrmlView::clear() TQPixmap * MrmlView::getPixmap( const KURL& url ) { TQString u = url.url(); - TQPixmap *pix = m_pixmapCache.find( u ); + TQPixmap *pix = m_pixmapCache.tqfind( u ); if ( pix ) return pix; @@ -130,7 +130,7 @@ TQPixmap * MrmlView::getPixmap( const KURL& url ) p = m_unavailablePixmap; m_pixmapCache.insert( u, p ); - return m_pixmapCache.find( u ); + return m_pixmapCache.tqfind( u ); } else { // remote url, download with KIO Loader::self()->requestDownload( url ); @@ -176,7 +176,7 @@ void MrmlView::slotLayout() TQPtrListIterator it( m_items ); for ( ; it.current(); ++it ) { - itemWidth = QMAX( itemWidth, it.current()->sizeHint().width() ); + itemWidth = TQMAX( itemWidth, it.current()->tqsizeHint().width() ); } if ( itemWidth == 0 ) @@ -202,7 +202,7 @@ void MrmlView::slotLayout() if ( item == 0 ) rowIt = it; - rowHeight = QMAX( rowHeight, it.current()->sizeHint().height() ); + rowHeight = TQMAX( rowHeight, it.current()->tqsizeHint().height() ); addChild( it.current(), margin + item * itemWidth, y ); it.current()->show(); @@ -251,7 +251,7 @@ void MrmlView::restoreState( TQDataStream& stream ) KURL url, thumbURL; double similarity; - Q_UINT32 relevance; + TQ_UINT32 relevance; MrmlViewItem *item; @@ -274,7 +274,7 @@ TQDataStream& KMrml::operator<<( TQDataStream& stream, return stream << item.url() << item.thumbURL() << item.similarity() - << static_cast( item.relevance() ); + << static_cast( item.relevance() ); } /////////////////////////////////////////////////////////////////// @@ -292,7 +292,7 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL, m_hasRemotePixmap( false ) { if ( m_similarity != -1 ) - m_similarity = QMAX( 0.0, QMIN( 1.0, similarity )); + m_similarity = TQMAX( 0.0, TQMIN( 1.0, similarity )); setFrameStyle( Panel | Sunken ); setMouseTracking( true ); @@ -306,11 +306,11 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL, /* if ( similarity > -1 ) - TQToolTip::add( this, TQString::fromLatin1("%1
%1
") - .arg( url ) - .arg(i18n("Similarity: %1").arg( TQString::number(similarity)))); + TQToolTip::add( this, TQString::tqfromLatin1("%1
%1
") + .tqarg( url ) + .tqarg(i18n("Similarity: %1").tqarg( TQString::number(similarity)))); else - TQToolTip::add( this, TQString::fromLatin1("%1").arg( url ) ); + TQToolTip::add( this, TQString::tqfromLatin1("%1").tqarg( url ) ); */ setMinimumSize( 130, 130 ); // ### @@ -342,14 +342,14 @@ void MrmlViewItem::paintEvent( TQPaintEvent *e ) if ( m_similarity >= 0 ) { TQPainter p( this ); - TQPen pen( colorGroup().highlight(), 1, TQPen::SolidLine ); + TQPen pen( tqcolorGroup().highlight(), 1, TQPen::SolidLine ); p.setPen( pen ); int x = margin; int y = m_combo->y() - similarityHeight - 2; int w = (int) (similarityFullWidth * m_similarity); int h = similarityHeight; p.drawRect( x, y, similarityFullWidth, h ); - p.fillRect( x, y, w, h, colorGroup().highlight() ); + p.fillRect( x, y, w, h, tqcolorGroup().highlight() ); } } @@ -361,9 +361,9 @@ void MrmlViewItem::resizeEvent( TQResizeEvent *e ) m_combo->move( width()/2 - m_combo->width()/2, y ); } -TQSize MrmlViewItem::sizeHint() const +TQSize MrmlViewItem::tqsizeHint() const { - int w = QMAX( QMAX(minimumHeight(), m_combo->width()), m_pixmap.width() ); + int w = TQMAX( TQMAX(minimumHeight(), m_combo->width()), m_pixmap.width() ); w += 2 * margin; int h = m_pixmap.isNull() ? margin : margin + spacing + m_pixmap.height(); @@ -380,11 +380,11 @@ void MrmlViewItem::mousePressEvent( TQMouseEvent *e ) pressedPos.setY( 0 ); - if ( e->button() == LeftButton || e->button() == MidButton ) { + if ( e->button() == Qt::LeftButton || e->button() == Qt::MidButton ) { if ( hitsPixmap( e->pos() ) ) pressedPos = e->pos(); } - else if ( e->button() == RightButton && hitsPixmap( e->pos() ) ) + else if ( e->button() == Qt::RightButton && hitsPixmap( e->pos() ) ) emit view()->activated( m_url, e->button() ); } @@ -403,7 +403,7 @@ void MrmlViewItem::mouseMoveEvent( TQMouseEvent *e ) } } - if ( (e->state() & LeftButton) && !pressedPos.isNull() ) { + if ( (e->state() & Qt::LeftButton) && !pressedPos.isNull() ) { TQPoint dist = e->pos() - pressedPos; if ( dist.manhattanLength() > KGlobalSettings::dndEventDelay() ) { // start drag here @@ -439,13 +439,13 @@ bool MrmlViewItem::hitsPixmap( const TQPoint& pos ) const } void MrmlViewItem::createRelevanceElement( TQDomDocument& document, - TQDomElement& parent ) + TQDomElement& tqparent ) { int rel = m_combo->currentItem(); if ( rel == Neutral ) return; - MrmlCreator::createRelevanceElement( document, parent, m_url.url(), + MrmlCreator::createRelevanceElement( document, tqparent, m_url.url(), (rel == Relevant) ? MrmlCreator::Relevant : MrmlCreator::Irrelevant ); } diff --git a/kmrml/kmrml/mrml_view.h b/kmrml/kmrml/mrml_view.h index f48c80be..d666910f 100644 --- a/kmrml/kmrml/mrml_view.h +++ b/kmrml/kmrml/mrml_view.h @@ -47,14 +47,15 @@ protected: }; -class MrmlView : public QScrollView +class MrmlView : public TQScrollView { friend class MrmlViewItem; Q_OBJECT + TQ_OBJECT public: - MrmlView( TQWidget *parent = 0L, const char *name = 0L ); + MrmlView( TQWidget *tqparent = 0L, const char *name = 0L ); ~MrmlView(); MrmlViewItem * addItem( const KURL& url, const KURL& thumbURL, @@ -63,7 +64,7 @@ public: double similarity ); - void addRelevanceToQuery( TQDomDocument&, TQDomElement& parent ); + void addRelevanceToQuery( TQDomDocument&, TQDomElement& tqparent ); void clear(); @@ -100,9 +101,10 @@ private: }; -class MrmlViewItem : public QFrame +class MrmlViewItem : public TQFrame { Q_OBJECT + TQ_OBJECT public: enum Relevance @@ -118,13 +120,13 @@ public: void setPixmap( const TQPixmap& pixmap ); - void createRelevanceElement( TQDomDocument& document, TQDomElement& parent ); + void createRelevanceElement( TQDomDocument& document, TQDomElement& tqparent ); double similarity() const { return m_similarity; } void setSimilarity( double value ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; const KURL& url() const { return m_url; } const KURL& thumbURL() const { return m_thumbURL; } @@ -147,7 +149,7 @@ private: MrmlView * view() const { return m_view; } inline int pixmapX() const { - return QMAX( margin, (width() - m_pixmap.width()) / 2); + return TQMAX( margin, (width() - m_pixmap.width()) / 2); } inline int pixmapY() const { return m_combo->y() - similarityHeight - m_pixmap.height() - margin; diff --git a/kmrml/kmrml/propertysheet.cpp b/kmrml/kmrml/propertysheet.cpp index af913558..6391c62e 100644 --- a/kmrml/kmrml/propertysheet.cpp +++ b/kmrml/kmrml/propertysheet.cpp @@ -98,14 +98,14 @@ void PropertySheet::initFromDOM( const TQDomElement& elem ) m_minSubsetSize = toInt( elem.attribute( MrmlShared::minSubsetSize() )); m_maxSubsetSize = toInt( elem.attribute( MrmlShared::maxSubsetSize() )); - TQValueList children = + TQValueList tqchildren = KMrml::directChildElements( elem, MrmlShared::propertySheet() ); - TQValueListConstIterator it = children.begin(); - for ( ; it != children.end(); ++it ) + TQValueListConstIterator it = tqchildren.begin(); + for ( ; it != tqchildren.end(); ++it ) m_subSheets.append( new PropertySheet( *it ) ); } -TQWidget * PropertySheet::createWidget( TQWidget */*parent*/, const char */*name*/ ) +TQWidget * PropertySheet::createWidget( TQWidget */*tqparent*/, const char */*name*/ ) { TQWidget *w = 0L; @@ -190,7 +190,7 @@ PropertySheet::SendType PropertySheet::getSendType( const TQString& value ) type = AttributeName; else if ( value == MrmlShared::attributeValue() ) type = AttributeValue; - else if ( value == MrmlShared::children() ) + else if ( value == MrmlShared::tqchildren() ) type = Children; else if ( value == MrmlShared::none() ) type = None; diff --git a/kmrml/kmrml/propertysheet.h b/kmrml/kmrml/propertysheet.h index e4759282..89d9a37f 100644 --- a/kmrml/kmrml/propertysheet.h +++ b/kmrml/kmrml/propertysheet.h @@ -34,7 +34,7 @@ namespace KMrml { MultiSet = 1, // ?? Subset, // radio-button/combobox or listbox - SetElement, // CheckBox -> disables/enables children? + SetElement, // CheckBox -> disables/enables tqchildren? Boolean, // CheckBox Numeric, // Slider/Spinbox Textual, // lineedit @@ -71,9 +71,9 @@ namespace KMrml } void initFromDOM( const TQDomElement& elem ); - void toElement( TQDomElement& parent ); + void toElement( TQDomElement& tqparent ); - TQWidget * createWidget( TQWidget *parent, const char *name = 0 ); + TQWidget * createWidget( TQWidget *tqparent, const char *name = 0 ); private: static Visibility getVisibility( const TQString& value ); diff --git a/kmrml/kmrml/propertywidgets.cpp b/kmrml/kmrml/propertywidgets.cpp index 18508f3a..5c562588 100644 --- a/kmrml/kmrml/propertywidgets.cpp +++ b/kmrml/kmrml/propertywidgets.cpp @@ -19,8 +19,8 @@ #include "propertywidgets.h" IntegerWidget::IntegerWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -39,8 +39,8 @@ int IntegerWidget::value() const /////////////////////////////////////////////////////////////////// ComboWidget::ComboWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -60,8 +60,8 @@ TQString ComboWidget::value() const /////////////////////////////////////////////////////////////////// CheckBoxWidget::CheckBoxWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -81,8 +81,8 @@ bool CheckBoxWidget::value() const /////////////////////////////////////////////////////////////////// LineEditWidget::LineEditWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -102,8 +102,8 @@ TQString LineEditWidget::value() const /////////////////////////////////////////////////////////////////// ListBoxWidget::ListBoxWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } diff --git a/kmrml/kmrml/propertywidgets.h b/kmrml/kmrml/propertywidgets.h index def1d2ca..1048e6f0 100644 --- a/kmrml/kmrml/propertywidgets.h +++ b/kmrml/kmrml/propertywidgets.h @@ -25,13 +25,14 @@ namespace KMrml { - class IntegerWidget : public QHBox + class IntegerWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: IntegerWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~IntegerWidget(); int value() const; @@ -40,13 +41,14 @@ namespace KMrml }; - class ComboWidget : public QHBox + class ComboWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: ComboWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~ComboWidget(); TQString value() const; @@ -55,13 +57,14 @@ namespace KMrml }; - class CheckBoxWidget : public QHBox + class CheckBoxWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: CheckBoxWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~CheckBoxWidget(); bool value(); @@ -72,13 +75,14 @@ namespace KMrml }; - class LineEditWidget : public QHBox + class LineEditWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: LineEditWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~LineEditWidget(); TQString value(); @@ -87,13 +91,14 @@ namespace KMrml }; - class ListBoxWidget : public QHBox + class ListBoxWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: ListBoxWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~ListBoxWidget(); TQStringList values(); diff --git a/kmrml/kmrml/server/watcher.cpp b/kmrml/kmrml/server/watcher.cpp index 96314257..46a7221c 100644 --- a/kmrml/kmrml/server/watcher.cpp +++ b/kmrml/kmrml/server/watcher.cpp @@ -56,11 +56,11 @@ bool Watcher::requireDaemon( const TQCString& clientAppId, << ": Client AppID is not registered with DCOP: " << clientAppId << endl; - DaemonData *daemon = m_daemons.find( daemonKey ); + DaemonData *daemon = m_daemons.tqfind( daemonKey ); if ( daemon ) { - if ( !daemon->apps.find( clientAppId ) ) + if ( !daemon->apps.tqfind( clientAppId ) ) daemon->apps.append( clientAppId ); // timeout, commandline and restart values are: first come, first serve @@ -93,7 +93,7 @@ bool Watcher::requireDaemon( const TQCString& clientAppId, void Watcher::unrequireDaemon( const TQCString& clientAppId, const TQString& daemonKey ) { - unrequireDaemon( m_daemons.find( daemonKey ), clientAppId ); + unrequireDaemon( m_daemons.tqfind( daemonKey ), clientAppId ); } void Watcher::unrequireDaemon( DaemonData *daemon, @@ -101,7 +101,7 @@ void Watcher::unrequireDaemon( DaemonData *daemon, { if ( daemon ) { - daemon->apps.remove( clientAppId ); + daemon->apps.remove( clientAppId.data() ); if ( daemon->apps.isEmpty() ) { if ( !daemon->timer ) @@ -146,7 +146,7 @@ void Watcher::slotProcExited( KProcess *proc ) i18n("The server with the command line" "
%1
" "is not available anymore. Do you want to " - "restart it?" ).arg( daemon->commandline ), + "restart it?" ).tqarg( daemon->commandline ), i18n("Service Failure"), i18n("Restart Server"), i18n("Do Not Restart") ) == KMessageBox::Yes ) { @@ -175,7 +175,7 @@ bool Watcher::startDaemon( DaemonData *daemon ) i18n("Unable to start the server with the " "command line" "
%1
" - "Try again?").arg( daemon->commandline ), + "Try again?").tqarg( daemon->commandline ), i18n("Service Failure"), i18n("Try Again"), i18n("Do Not Try") ) == KMessageBox::Yes ) { @@ -188,7 +188,7 @@ bool Watcher::startDaemon( DaemonData *daemon ) void Watcher::slotTimeout() { - TQTimer *timer = static_cast( const_cast( sender() ) ); + TQTimer *timer = static_cast( TQT_TQOBJECT( sender() ) ); DaemonData *daemon = findDaemonFromTimer( timer ); if ( daemon ) { @@ -243,7 +243,7 @@ void Watcher::slotAppUnregistered( const TQCString& appId ) TQDictIterator it( m_daemons ); for ( ; (daemon = it.current()); ++it ) { - if ( daemon->apps.find( appId ) != -1 ) + if ( daemon->apps.tqfind( appId ) != -1 ) unrequireDaemon( daemon, appId ); } } diff --git a/kmrml/kmrml/server/watcher.h b/kmrml/kmrml/server/watcher.h index ef7ae9eb..941d7ebf 100644 --- a/kmrml/kmrml/server/watcher.h +++ b/kmrml/kmrml/server/watcher.h @@ -61,6 +61,7 @@ namespace KMrml class Watcher : public KDEDModule { Q_OBJECT +// TQ_OBJECT K_DCOP public: diff --git a/kolourpaint/BUGS b/kolourpaint/BUGS index 84f3391f..25814d61 100644 --- a/kolourpaint/BUGS +++ b/kolourpaint/BUGS @@ -27,8 +27,8 @@ This file lists known bugs in this version that are not considered manifestations of the current QSpinBox behaviour. 6. a) The undo history and document modified state are not updated during - the drawing of multi-segment shapes (Polygon, Connected Lines, - Curve). They are however updated after shapes' completion. + the drawing of multi-segment tqshapes (Polygon, Connected Lines, + Curve). They are however updated after tqshapes' completion. b) The text and brush-like tools set the document modified flag even if user cancels the draw operation. @@ -37,7 +37,7 @@ This file lists known bugs in this version that are not considered still marked as modified (because 2 commands - the create selection and the move - were added but only one was undone). -7. Certain shapes may have the wrong size (usually only a pixel off and +7. Certain tqshapes may have the wrong size (usually only a pixel off and only in extreme cases) e.g. an ellipse of height 1 always has a width 1 pixel less than it should be. This is a Qt bug. diff --git a/kolourpaint/cursors/kpcursorlightcross.cpp b/kolourpaint/cursors/kpcursorlightcross.cpp index 34051dbf..dc52f9bd 100644 --- a/kolourpaint/cursors/kpcursorlightcross.cpp +++ b/kolourpaint/cursors/kpcursorlightcross.cpp @@ -42,7 +42,7 @@ enum PixelValue }; static void setPixel (unsigned char *colorBitmap, - unsigned char *maskBitmap, + unsigned char *tqmaskBitmap, int width, int y, int x, enum PixelValue pv) { @@ -52,32 +52,32 @@ static void setPixel (unsigned char *colorBitmap, const int MaskOpaque = 1; const int MaskTransparent = 0; - int colorValue, maskValue; + int colorValue, tqmaskValue; switch (pv) { case White: colorValue = ColorWhite; - maskValue = MaskOpaque; + tqmaskValue = MaskOpaque; break; case Black: colorValue = ColorBlack; - maskValue = MaskOpaque; + tqmaskValue = MaskOpaque; break; case Transparent: default: colorValue = ColorWhite; - maskValue = MaskTransparent; + tqmaskValue = MaskTransparent; break; } if (colorValue) colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); - if (maskValue) - maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); + if (tqmaskValue) + tqmaskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); } @@ -90,10 +90,10 @@ const TQCursor *kpMakeCursorLightCross () const int side = 24; const int byteSize = (side * side) / 8; unsigned char *colorBitmap = new unsigned char [byteSize]; - unsigned char *maskBitmap = new unsigned char [byteSize]; + unsigned char *tqmaskBitmap = new unsigned char [byteSize]; memset (colorBitmap, 0, byteSize); - memset (maskBitmap, 0, byteSize); + memset (tqmaskBitmap, 0, byteSize); const int oddSide = side - 1; const int strokeLen = oddSide * 3 / 8; @@ -104,7 +104,7 @@ const TQCursor *kpMakeCursorLightCross () #define X_(val) (val) #define Y_(val) (val) - #define DRAW(y,x) setPixel (colorBitmap, maskBitmap, side, (y), (x), pv) + #define DRAW(y,x) setPixel (colorBitmap, tqmaskBitmap, side, (y), (x), pv) // horizontal DRAW (Y_(side / 2), X_(1 + i)); DRAW (Y_(side / 2), X_(side - 1 - i)); @@ -118,9 +118,9 @@ const TQCursor *kpMakeCursorLightCross () } TQCursor *cursor = new TQCursor (TQBitmap (side, side, colorBitmap, true/*little endian bit order*/), - TQBitmap (side, side, maskBitmap, true/*little endian bit order*/)); + TQBitmap (side, side, tqmaskBitmap, true/*little endian bit order*/)); - delete [] maskBitmap; + delete [] tqmaskBitmap; delete [] colorBitmap; return cursor; diff --git a/kolourpaint/kolourpaint.cpp b/kolourpaint/kolourpaint.cpp index e1b41fc5..37cff567 100644 --- a/kolourpaint/kolourpaint.cpp +++ b/kolourpaint/kolourpaint.cpp @@ -191,7 +191,7 @@ int main (int argc, char *argv []) KImageIO::registerFormats (); - // Qt says this is necessary but I don't think it is... + // TQt says this is necessary but I don't think it is... TQObject::connect (&app, TQT_SIGNAL (lastWindowClosed ()), &app, TQT_SLOT (quit ())); diff --git a/kolourpaint/kpcolor.cpp b/kolourpaint/kpcolor.cpp index 1c325d39..2efa3c9e 100644 --- a/kolourpaint/kpcolor.cpp +++ b/kolourpaint/kpcolor.cpp @@ -66,22 +66,22 @@ kpColor::kpColor (int red, int green, int blue, bool isTransparent) return; } - m_rgba = qRgba (red, green, blue, isTransparent ? 0 : 255/*opaque*/); + m_rgba = tqRgba (red, green, blue, isTransparent ? 0 : 255/*opaque*/); m_rgbaIsValid = true; } -kpColor::kpColor (const QRgb &rgba) +kpColor::kpColor (const TQRgb &rgba) : m_colorCacheIsValid (false) { - if (qAlpha (rgba) > 0 && qAlpha (rgba) < 255) + if (tqAlpha (rgba) > 0 && tqAlpha (rgba) < 255) { - kdError () << "kpColor::(QRgb) passed translucent alpha " - << qAlpha (rgba) + kdError () << "kpColor::(TQRgb) passed translucent alpha " + << tqAlpha (rgba) << " - trying to recover" << endl; // Forget the alpha channel - make it opaque - m_rgba = qRgb (qRed (m_rgba), qGreen (m_rgba), qBlue (m_rgba)); + m_rgba = tqRgb (tqRed (m_rgba), tqGreen (m_rgba), tqBlue (m_rgba)); m_rgbaIsValid = true; } else @@ -198,9 +198,9 @@ bool kpColor::isSimilarTo (const kpColor &rhs, int processedSimilarity) const return false; else { - return (square (qRed (m_rgba) - qRed (rhs.m_rgba)) + - square (qGreen (m_rgba) - qGreen (rhs.m_rgba)) + - square (qBlue (m_rgba) - qBlue (rhs.m_rgba)) + return (square (tqRed (m_rgba) - tqRed (rhs.m_rgba)) + + square (tqGreen (m_rgba) - tqGreen (rhs.m_rgba)) + + square (tqBlue (m_rgba) - tqBlue (rhs.m_rgba)) <= processedSimilarity); } } @@ -232,7 +232,7 @@ int kpColor::red () const return 0; } - return qRed (m_rgba); + return tqRed (m_rgba); } // public @@ -250,7 +250,7 @@ int kpColor::green () const return 0; } - return qGreen (m_rgba); + return tqGreen (m_rgba); } // public @@ -268,7 +268,7 @@ int kpColor::blue () const return 0; } - return qBlue (m_rgba); + return tqBlue (m_rgba); } // public @@ -280,7 +280,7 @@ int kpColor::alpha () const return 0; } - const int alpha = qAlpha (m_rgba); + const int alpha = tqAlpha (m_rgba); if (alpha > 0 && alpha < 255) { @@ -309,11 +309,11 @@ bool kpColor::isOpaque () const // public -QRgb kpColor::toQRgb () const +TQRgb kpColor::toTQRgb () const { if (!m_rgbaIsValid) { - kdError () << "kpColor::toQRgb() called with invalid kpColor" << endl; + kdError () << "kpColor::toTQRgb() called with invalid kpColor" << endl; return 0; } @@ -321,31 +321,31 @@ QRgb kpColor::toQRgb () const } // public -const TQColor &kpColor::toQColor () const +const TQColor &kpColor::toTQColor () const { if (!m_rgbaIsValid) { - kdError () << "kpColor::toQColor() called with invalid kpColor" << endl; - return Qt::black; + kdError () << "kpColor::toTQColor() called with invalid kpColor" << endl; + return TQt::black; } if (m_colorCacheIsValid) return m_colorCache; - if (qAlpha (m_rgba) < 255) + if (tqAlpha (m_rgba) < 255) { - kdError () << "kpColor::toQColor() called with not fully opaque kpColor alpha=" - << qAlpha (m_rgba) + kdError () << "kpColor::toTQColor() called with not fully opaque kpColor alpha=" + << tqAlpha (m_rgba) << endl; - return Qt::black; + return TQt::black; } m_colorCache = TQColor (m_rgba); if (!m_colorCache.isValid ()) { - kdError () << "kpColor::toQColor () internal error - could not return valid TQColor" + kdError () << "kpColor::toTQColor () internal error - could not return valid TQColor" << endl; - return Qt::black; + return TQt::black; } m_colorCacheIsValid = true; @@ -354,7 +354,7 @@ const TQColor &kpColor::toQColor () const } // public -TQColor kpColor::maskColor () const +TQColor kpColor::tqmaskColor () const { - return isTransparent () ? Qt::color0 : Qt::color1; + return isTransparent () ? TQt::color0 : TQt::color1; } diff --git a/kolourpaint/kpcolor.h b/kolourpaint/kpcolor.h index 255d645f..ece77e57 100644 --- a/kolourpaint/kpcolor.h +++ b/kolourpaint/kpcolor.h @@ -36,13 +36,13 @@ class TQDataStream; // -// kpColor is an object-oriented abstraction of QRgb, with the additional +// kpColor is an object-oriented abstraction of TQRgb, with the additional // restriction of following the KolourPaint convention of only supporting // totally transparent and totally opaque colors. It also provides better // error handling, reporting (noisy kdError()'s) and recovery. // -// In general, you should pass around kpColor objects instead of QRgb -// and TQColor. Only convert an opaque kpColor to a TQColor (using toQColor()) +// In general, you should pass around kpColor objects instead of TQRgb +// and TQColor. Only convert an opaque kpColor to a TQColor (using toTQColor()) // if you need to draw something onscreen. Constructing a kpColor object // from TQColor is probably wrong since onscreen representations of color // are not guaranteed to be faithful (due to TQColor color allocation). @@ -52,7 +52,7 @@ class kpColor public: kpColor (); kpColor (int red, int green, int blue, bool isTransparent = false); - kpColor (const QRgb &rgba); + kpColor (const TQRgb &rgba); kpColor (const kpColor &rhs); friend TQDataStream &operator<< (TQDataStream &stream, const kpColor &color); friend TQDataStream &operator>> (TQDataStream &stream, kpColor &color); @@ -81,17 +81,17 @@ public: // Cast operators will most likely result in careless conversions so // use explicit functions instead: - QRgb toQRgb () const; + TQRgb toTQRgb () const; // (only valid if isOpaque()) // (const TQColor & return results in fewer color reallocations) - const TQColor &toQColor () const; + const TQColor &toTQColor () const; - TQColor maskColor () const; + TQColor tqmaskColor () const; private: bool m_rgbaIsValid; - QRgb m_rgba; + TQRgb m_rgba; mutable bool m_colorCacheIsValid; mutable TQColor m_colorCache; diff --git a/kolourpaint/kpcommandhistory.cpp b/kolourpaint/kpcommandhistory.cpp index 6849ebf4..d92c43e6 100644 --- a/kolourpaint/kpcommandhistory.cpp +++ b/kolourpaint/kpcommandhistory.cpp @@ -257,13 +257,13 @@ kpCommandHistoryBase::kpCommandHistoryBase (bool doReadConfig, : d (new kpCommandHistoryBasePrivate ()) { m_actionUndo = new KToolBarPopupAction (undoActionText (), - TQString::fromLatin1 ("undo"), + TQString::tqfromLatin1 ("undo"), KStdAccel::shortcut (KStdAccel::Undo), this, TQT_SLOT (undo ()), ac, KStdAction::name (KStdAction::Undo)); m_actionRedo = new KToolBarPopupAction (redoActionText (), - TQString::fromLatin1 ("redo"), + TQString::tqfromLatin1 ("redo"), KStdAccel::shortcut (KStdAccel::Redo), this, TQT_SLOT (redo ()), ac, KStdAction::name (KStdAction::Redo)); @@ -763,7 +763,7 @@ void kpCommandHistoryBase::trimCommandLists () -m_documentRestoredPosition > (int) m_undoCommandList.size ()) { #if DEBUG_KP_COMMAND_HISTORY - kdDebug () << "\t\t\tinvalidate documentRestoredPosition" << endl; + kdDebug () << "\t\t\ttqinvalidate documentRestoredPosition" << endl; #endif m_documentRestoredPosition = INT_MAX; } @@ -911,7 +911,7 @@ void kpCommandHistory::undo () if (m_mainWindow && m_mainWindow->toolHasBegunShape ()) { #if DEBUG_KP_COMMAND_HISTORY - kdDebug () << "\thas begun shape - cancel draw" << endl; + kdDebug () << "\thas begun tqshape - cancel draw" << endl; #endif m_mainWindow->tool ()->cancelShapeInternal (); } @@ -927,8 +927,8 @@ void kpCommandHistory::redo () // Not completely obvious but what else can we do? // // Ignoring the request would not be intuitive for tools like - // Polygon & Polyline (where it's not always apparent to the user - // that s/he's still drawing a shape even though the mouse isn't + // Polygon & Polyline (where it's not always aptqparent to the user + // that s/he's still drawing a tqshape even though the mouse isn't // down). m_mainWindow->tool ()->cancelShapeInternal (); } diff --git a/kolourpaint/kpcommandhistory.h b/kolourpaint/kpcommandhistory.h index c29d68fc..da415663 100644 --- a/kolourpaint/kpcommandhistory.h +++ b/kolourpaint/kpcommandhistory.h @@ -130,9 +130,10 @@ private: // Features not required by KolourPaint (e.g. commandExecuted()) are not // implemented and undo limit == redo limit. So compared to // KCommandHistory, this is only "almost source compatible". -class kpCommandHistoryBase : public QObject +class kpCommandHistoryBase : public TQObject { Q_OBJECT + TQ_OBJECT public: kpCommandHistoryBase (bool doReadConfig, KActionCollection *ac); @@ -221,16 +222,16 @@ private: // Intercepts Undo/Redo requests: // -// If the user is currently drawing a shape, it cancels it. +// If the user is currently drawing a tqshape, it cancels it. // Else it passes on the Undo/Redo request to kpCommandHistoryBase. // // TODO: This is wrong. It won't work if the Undo action is disabled, // for instance. // // Maybe the real solution is to call kpCommandHistoryBase::addCommand() -// as _soon_ as the shape starts - not after it ends. But the +// as _soon_ as the tqshape starts - not after it ends. But the // trouble with this solution is that if the user Undoes/cancels -// the shape s/he's currently drawing, it would replace a Redo +// the tqshape s/he's currently drawing, it would replace a Redo // slot in the history. Arguably you shouldn't be able to Redo // something you never finished drawing. // @@ -238,6 +239,7 @@ private: class kpCommandHistory : public kpCommandHistoryBase { Q_OBJECT + TQ_OBJECT public: kpCommandHistory (bool doReadConfig, kpMainWindow *mainWindow); diff --git a/kolourpaint/kpdefs.h b/kolourpaint/kpdefs.h index a437c2d5..c46ccec9 100644 --- a/kolourpaint/kpdefs.h +++ b/kolourpaint/kpdefs.h @@ -40,7 +40,7 @@ #include -#define KP_IS_QT_3_3 (QT_VERSION >= 0x030300 && 1) +#define KP_IS_TQT_3_3 ([[[TQT_VERSION IS DEPRECATED]]] >= 0x030300 && 1) #define KP_IS_KDE_3_3 ((KDE_VERSION_MAJOR >= 3 && KDE_VERSION_MINOR >= 3) && 1) @@ -65,71 +65,71 @@ // Settings // -#define kpSettingsGroupGeneral TQString::fromLatin1 ("General Settings") -#define kpSettingFirstTime TQString::fromLatin1 ("First Time") -#define kpSettingShowGrid TQString::fromLatin1 ("Show Grid") -#define kpSettingShowPath TQString::fromLatin1 ("Show Path") -#define kpSettingColorSimilarity TQString::fromLatin1 ("Color Similarity") -#define kpSettingDitherOnOpen TQString::fromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than") -#define kpSettingPrintImageCenteredOnPage TQString::fromLatin1 ("Print Image Centered On Page") +#define kpSettingsGroupGeneral TQString::tqfromLatin1 ("General Settings") +#define kpSettingFirstTime TQString::tqfromLatin1 ("First Time") +#define kpSettingShowGrid TQString::tqfromLatin1 ("Show Grid") +#define kpSettingShowPath TQString::tqfromLatin1 ("Show Path") +#define kpSettingColorSimilarity TQString::tqfromLatin1 ("Color Similarity") +#define kpSettingDitherOnOpen TQString::tqfromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than") +#define kpSettingPrintImageCenteredOnPage TQString::tqfromLatin1 ("Print Image Centered On Page") -#define kpSettingsGroupFileSaveAs TQString::fromLatin1 ("File/Save As") -#define kpSettingsGroupFileExport TQString::fromLatin1 ("File/Export") -#define kpSettingsGroupEditCopyTo TQString::fromLatin1 ("Edit/Copy To") +#define kpSettingsGroupFileSaveAs TQString::tqfromLatin1 ("File/Save As") +#define kpSettingsGroupFileExport TQString::tqfromLatin1 ("File/Export") +#define kpSettingsGroupEditCopyTo TQString::tqfromLatin1 ("Edit/Copy To") -#define kpSettingForcedMimeType TQString::fromLatin1 ("Forced MimeType") -#define kpSettingForcedColorDepth TQString::fromLatin1 ("Forced Color Depth") -#define kpSettingForcedDither TQString::fromLatin1 ("Forced Dither") -#define kpSettingForcedQuality TQString::fromLatin1 ("Forced Quality") +#define kpSettingForcedMimeType TQString::tqfromLatin1 ("Forced MimeType") +#define kpSettingForcedColorDepth TQString::tqfromLatin1 ("Forced Color Depth") +#define kpSettingForcedDither TQString::tqfromLatin1 ("Forced Dither") +#define kpSettingForcedQuality TQString::tqfromLatin1 ("Forced Quality") -#define kpSettingLastDocSize TQString::fromLatin1 ("Last Document Size") +#define kpSettingLastDocSize TQString::tqfromLatin1 ("Last Document Size") -#define kpSettingMoreEffectsLastEffect TQString::fromLatin1 ("More Effects - Last Effect") +#define kpSettingMoreEffectsLastEffect TQString::tqfromLatin1 ("More Effects - Last Effect") -#define kpSettingResizeScaleLastKeepAspect TQString::fromLatin1 ("Resize Scale - Last Keep Aspect") +#define kpSettingResizeScaleLastKeepAspect TQString::tqfromLatin1 ("Resize Scale - Last Keep Aspect") -#define kpSettingsGroupMimeTypeProperties TQString::fromLatin1 ("MimeType Properties Version 1.2-2") -#define kpSettingMimeTypeMaximumColorDepth TQString::fromLatin1 ("Maximum Color Depth") -#define kpSettingMimeTypeHasConfigurableColorDepth TQString::fromLatin1 ("Configurable Color Depth") -#define kpSettingMimeTypeHasConfigurableQuality TQString::fromLatin1 ("Configurable Quality Setting") +#define kpSettingsGroupMimeTypeProperties TQString::tqfromLatin1 ("MimeType Properties Version 1.2-2") +#define kpSettingMimeTypeMaximumColorDepth TQString::tqfromLatin1 ("Maximum Color Depth") +#define kpSettingMimeTypeHasConfigurableColorDepth TQString::tqfromLatin1 ("Configurable Color Depth") +#define kpSettingMimeTypeHasConfigurableQuality TQString::tqfromLatin1 ("Configurable Quality Setting") -#define kpSettingsGroupUndoRedo TQString::fromLatin1 ("Undo/Redo Settings") -#define kpSettingUndoMinLimit TQString::fromLatin1 ("Min Limit") -#define kpSettingUndoMaxLimit TQString::fromLatin1 ("Max Limit") -#define kpSettingUndoMaxLimitSizeLimit TQString::fromLatin1 ("Max Limit Size Limit") +#define kpSettingsGroupUndoRedo TQString::tqfromLatin1 ("Undo/Redo Settings") +#define kpSettingUndoMinLimit TQString::tqfromLatin1 ("Min Limit") +#define kpSettingUndoMaxLimit TQString::tqfromLatin1 ("Max Limit") +#define kpSettingUndoMaxLimitSizeLimit TQString::tqfromLatin1 ("Max Limit Size Limit") -#define kpSettingsGroupThumbnail TQString::fromLatin1 ("Thumbnail Settings") -#define kpSettingThumbnailShown TQString::fromLatin1 ("Shown") -#define kpSettingThumbnailGeometry TQString::fromLatin1 ("Geometry") -#define kpSettingThumbnailZoomed TQString::fromLatin1 ("Zoomed") -#define kpSettingThumbnailShowRectangle TQString::fromLatin1 ("ShowRectangle") +#define kpSettingsGroupThumbnail TQString::tqfromLatin1 ("Thumbnail Settings") +#define kpSettingThumbnailShown TQString::tqfromLatin1 ("Shown") +#define kpSettingThumbnailGeometry TQString::tqfromLatin1 ("Geometry") +#define kpSettingThumbnailZoomed TQString::tqfromLatin1 ("Zoomed") +#define kpSettingThumbnailShowRectangle TQString::tqfromLatin1 ("ShowRectangle") -#define kpSettingsGroupPreviewSave TQString::fromLatin1 ("Save Preview Settings") -#define kpSettingPreviewSaveGeometry TQString::fromLatin1 ("Geometry") -#define kpSettingPreviewSaveUpdateDelay TQString::fromLatin1 ("Update Delay") +#define kpSettingsGroupPreviewSave TQString::tqfromLatin1 ("Save Preview Settings") +#define kpSettingPreviewSaveGeometry TQString::tqfromLatin1 ("Geometry") +#define kpSettingPreviewSaveUpdateDelay TQString::tqfromLatin1 ("Update Delay") -#define kpSettingsGroupTools TQString::fromLatin1 ("Tool Settings") -#define kpSettingLastTool TQString::fromLatin1 ("Last Used Tool") -#define kpSettingToolBoxIconSize TQString::fromLatin1 ("Tool Box Icon Size") +#define kpSettingsGroupTools TQString::tqfromLatin1 ("Tool Settings") +#define kpSettingLastTool TQString::tqfromLatin1 ("Last Used Tool") +#define kpSettingToolBoxIconSize TQString::tqfromLatin1 ("Tool Box Icon Size") -#define kpSettingsGroupText TQString::fromLatin1 ("Text Settings") -#define kpSettingFontFamily TQString::fromLatin1 ("Font Family") -#define kpSettingFontSize TQString::fromLatin1 ("Font Size") -#define kpSettingBold TQString::fromLatin1 ("Bold") -#define kpSettingItalic TQString::fromLatin1 ("Italic") -#define kpSettingUnderline TQString::fromLatin1 ("Underline") -#define kpSettingStrikeThru TQString::fromLatin1 ("Strike Thru") +#define kpSettingsGroupText TQString::tqfromLatin1 ("Text Settings") +#define kpSettingFontFamily TQString::tqfromLatin1 ("Font Family") +#define kpSettingFontSize TQString::tqfromLatin1 ("Font Size") +#define kpSettingBold TQString::tqfromLatin1 ("Bold") +#define kpSettingItalic TQString::tqfromLatin1 ("Italic") +#define kpSettingUnderline TQString::tqfromLatin1 ("Underline") +#define kpSettingStrikeThru TQString::tqfromLatin1 ("Strike Thru") -#define kpSettingsGroupFlattenEffect TQString::fromLatin1 ("Flatten Effect Settings") -#define kpSettingFlattenEffectColor1 TQString::fromLatin1 ("Color1") -#define kpSettingFlattenEffectColor2 TQString::fromLatin1 ("Color2") +#define kpSettingsGroupFlattenEffect TQString::tqfromLatin1 ("Flatten Effect Settings") +#define kpSettingFlattenEffectColor1 TQString::tqfromLatin1 ("Color1") +#define kpSettingFlattenEffectColor2 TQString::tqfromLatin1 ("Color2") // @@ -140,11 +140,11 @@ // // This key only exists if the document does. If it exists, it can be empty. // The URL need not point to a file that exists e.g. "kolourpaint doesnotexist.png". -#define kpSessionSettingDocumentUrl TQString::fromLatin1 ("Session Document Url") +#define kpSessionSettingDocumentUrl TQString::tqfromLatin1 ("Session Document Url") // The size of a document which is not from a URL e.g. "kolourpaint doesnotexist.png". // This key does not exist for documents from URLs. -#define kpSessionSettingNotFromUrlDocumentSize TQString::fromLatin1 ("Session Not-From-Url Document Size") +#define kpSessionSettingNotFromUrlDocumentSize TQString::tqfromLatin1 ("Session Not-From-Url Document Size") #endif // __kp_defs_h__ diff --git a/kolourpaint/kpdocument.cpp b/kolourpaint/kpdocument.cpp index aa078c85..2886d077 100644 --- a/kolourpaint/kpdocument.cpp +++ b/kolourpaint/kpdocument.cpp @@ -94,7 +94,7 @@ kpDocument::kpDocument (int w, int h, kpMainWindow *mainWindow) #endif m_pixmap = new TQPixmap (w, h); - m_pixmap->fill (Qt::white); + m_pixmap->fill (TQt::white); } kpDocument::~kpDocument () @@ -156,7 +156,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( metaInfo->setDotsPerMeterY (image.dotsPerMeterY ()); metaInfo->setOffset (image.offset ()); - TQValueList keyList = image.textList (); + TQValueList keyList = image.tqtextList (); for (TQValueList ::const_iterator it = keyList.begin (); it != keyList.end (); it++) @@ -179,7 +179,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( { for (int x = 0; x < image.width (); x++) { - const QRgb rgb = image.pixel (x, y); + const TQRgb rgb = image.pixel (x, y); fprintf (stderr, " %08X", rgb); } fprintf (stderr, "\n"); @@ -204,7 +204,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( { for (int x = 0; x < image2.width (); x++) { - const QRgb rgb = image2.pixel (x, y); + const TQRgb rgb = image2.pixel (x, y); hash += ((x % 2) + 1) * rgb; if (rgb != image.pixel (x, y)) { @@ -231,12 +231,12 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( // public static TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog, - TQWidget *parent, + TQWidget *tqparent, kpDocumentSaveOptions *saveOptions, kpDocumentMetaInfo *metaInfo) { #if DEBUG_KP_DOCUMENT - kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << parent << ")" << endl; + kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << tqparent << ")" << endl; #endif if (saveOptions) @@ -247,11 +247,11 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis TQString tempFile; - if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, parent)) + if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, tqparent)) { if (!suppressDoesntExistDialog) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\".") .arg (kpDocument::prettyFilenameForURL (url))); } @@ -277,7 +277,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis if (detectedMimeType.isEmpty ()) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\" - unknown mimetype.") .arg (kpDocument::prettyFilenameForURL (url))); KIO::NetAccess::removeTempFile (tempFile); @@ -292,7 +292,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis if (image.isNull ()) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\" - unsupported image format.\n" "The file may be corrupt.") .arg (kpDocument::prettyFilenameForURL (url))); @@ -310,7 +310,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask.") + " approximated with a 1-bit transparency tqmask.") .arg (prettyFilenameForURL (url)), i18n ("The image \"%1\"" " may have more colors than the current screen mode." @@ -320,16 +320,16 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis i18n ("The image \"%1\"" " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask.") + " approximated with a 1-bit transparency tqmask.") .arg (prettyFilenameForURL (url)), "docOpen", - parent), + tqparent), saveOptions, metaInfo); if (newPixmap.isNull ()) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\" - out of graphics memory.") .arg (kpDocument::prettyFilenameForURL (url))); return TQPixmap (); @@ -352,7 +352,7 @@ void kpDocument::openNew (const KURL &url) kdDebug () << "KpDocument::openNew (" << url << ")" << endl; #endif - m_pixmap->fill (Qt::white); + m_pixmap->fill (TQt::white); setURL (url, false/*not from url*/); *m_saveOptions = kpDocumentSaveOptions (); @@ -446,13 +446,13 @@ bool kpDocument::save (bool overwritePrompt, bool lossyPrompt) // public static bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, const kpDocumentSaveOptions &saveOptions, - TQWidget *parent) + TQWidget *tqparent) { #if DEBUG_KP_DOCUMENT kdDebug () << "kpDocument::lossyPromptContinue()" << endl; #endif -#define QUIT_IF_CANCEL(messageBoxCommand) \ +#define TQUIT_IF_CANCEL(messageBoxCommand) \ { \ if (messageBoxCommand != KMessageBox::Continue) \ { \ @@ -464,8 +464,8 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, if (lossyType & (kpDocumentSaveOptions::MimeTypeMaximumColorDepthLow | kpDocumentSaveOptions::Quality)) { - QUIT_IF_CANCEL ( - KMessageBox::warningContinueCancel (parent, + TQUIT_IF_CANCEL ( + KMessageBox::warningContinueCancel (tqparent, i18n ("

The %1 format may not be able" " to preserve all of the image's color information.

" @@ -475,12 +475,12 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, // low maximum colour depth i18n ("Lossy File Format"), KStdGuiItem::save (), - TQString::fromLatin1 ("SaveInLossyMimeTypeDontAskAgain"))); + TQString::tqfromLatin1 ("SaveInLossyMimeTypeDontAskAgain"))); } else if (lossyType & kpDocumentSaveOptions::ColorDepthLow) { - QUIT_IF_CANCEL ( - KMessageBox::warningContinueCancel (parent, + TQUIT_IF_CANCEL ( + KMessageBox::warningContinueCancel (tqparent, i18n ("

Saving the image at the low color depth of %1-bit" " may result in the loss of color information." @@ -490,9 +490,9 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, .arg (saveOptions.colorDepth ()), i18n ("Low Color Depth"), KStdGuiItem::save (), - TQString::fromLatin1 ("SaveAtLowColorDepthDontAskAgain"))); + TQString::tqfromLatin1 ("SaveAtLowColorDepthDontAskAgain"))); } -#undef QUIT_IF_CANCEL +#undef TQUIT_IF_CANCEL return true; } @@ -503,7 +503,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, bool lossyPrompt, - TQWidget *parent, + TQWidget *tqparent, bool *userCancelled) { if (userCancelled) @@ -515,7 +515,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, << " type=" << type << endl; #endif - if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent)) + if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent)) { if (userCancelled) *userCancelled = true; @@ -529,7 +529,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, TQPixmap pixmapToSave = kpPixmapFX::pixmapWithDefinedTransparentPixels (pixmap, - Qt::white); // CONFIG + TQt::white); // CONFIG TQImage imageToSave = kpPixmapFX::convertToImage (pixmapToSave); @@ -584,7 +584,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, if (!imageToSave.save (device, type.latin1 (), quality)) { #if DEBUG_KP_DOCUMENT - kdDebug () << "\tQImage::save() returned false" << endl; + kdDebug () << "\tTQImage::save() returned false" << endl; #endif return false; } @@ -596,16 +596,16 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, return true; } -static void CouldNotCreateTemporaryFileDialog (TQWidget *parent) +static void CouldNotCreateTemporaryFileDialog (TQWidget *tqparent) { - KMessageBox::error (parent, + KMessageBox::error (tqparent, i18n ("Could not save image - unable to create temporary file.")); } -static void CouldNotSaveDialog (const KURL &url, TQWidget *parent) +static void CouldNotSaveDialog (const KURL &url, TQWidget *tqparent) { // TODO: use file.errorString() - KMessageBox::error (parent, + KMessageBox::error (tqparent, i18n ("Could not save as \"%1\".") .arg (kpDocument::prettyFilenameForURL (url))); } @@ -617,7 +617,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, const kpDocumentMetaInfo &metaInfo, bool overwritePrompt, bool lossyPrompt, - TQWidget *parent) + TQWidget *tqparent) { // TODO: Use KIO::NetAccess:mostLocalURL() for accessing home:/ (and other // such local URLs) for efficiency and because only local writes @@ -628,17 +628,17 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, << ",overwritePrompt=" << overwritePrompt << ",lossyPrompt=" << lossyPrompt << ")" << endl; - saveOptions.printDebug (TQString::fromLatin1 ("\tsaveOptions")); - metaInfo.printDebug (TQString::fromLatin1 ("\tmetaInfo")); + saveOptions.printDebug (TQString::tqfromLatin1 ("\tsaveOptions")); + metaInfo.printDebug (TQString::tqfromLatin1 ("\tmetaInfo")); #endif - if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, parent)) + if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, tqparent)) { - int result = KMessageBox::warningContinueCancel (parent, + int result = KMessageBox::warningContinueCancel (tqparent, i18n ("A document called \"%1\" already exists.\n" "Do you want to overwrite it?") .arg (prettyFilenameForURL (url)), - TQString::null, + TQString(), i18n ("Overwrite")); if (result != KMessageBox::Continue) @@ -652,7 +652,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, } - if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent)) + if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent)) { #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because of lossyPrompt" << endl; @@ -681,15 +681,15 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, kdDebug () << "\treturning false because could not open KSaveFile" << " status=" << atomicFileWriter.status () << endl; #endif - ::CouldNotCreateTemporaryFileDialog (parent); + ::CouldNotCreateTemporaryFileDialog (tqparent); return false; } // Write to local temporary file. - if (!savePixmapToDevice (pixmap, atomicFileWriter.file (), + if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(atomicFileWriter.file ()), saveOptions, metaInfo, false/*no lossy prompt*/, - parent)) + tqparent)) { atomicFileWriter.abort (); @@ -697,7 +697,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, kdDebug () << "\treturning false because could not save pixmap to device" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } @@ -710,7 +710,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, #if DEBUG_KP_DOCUMENT kdDebug () << "\tcould not close KSaveFile" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } } // sync KSaveFile.abort() @@ -729,7 +729,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because tempFile empty" << endl; #endif - ::CouldNotCreateTemporaryFileDialog (parent); + ::CouldNotCreateTemporaryFileDialog (tqparent); return false; } @@ -742,20 +742,20 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, kdDebug () << "\treturning false because can't open file" << " errorString=" << file.errorString () << endl; #endif - ::CouldNotCreateTemporaryFileDialog (parent); + ::CouldNotCreateTemporaryFileDialog (tqparent); return false; } - if (!savePixmapToDevice (pixmap, &file, + if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(&file), saveOptions, metaInfo, false/*no lossy prompt*/, - parent)) + tqparent)) { #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because could not save pixmap to device" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } } @@ -765,7 +765,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because could not close" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } @@ -773,12 +773,12 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, // TODO: No one seems to know how to do this atomically // [http://lists.kde.org/?l=kde-core-devel&m=117845162728484&w=2]. // At least, fish:// (ssh) is definitely not atomic. - if (!KIO::NetAccess::upload (filename, url, parent)) + if (!KIO::NetAccess::upload (filename, url, tqparent)) { #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because could not upload" << endl; #endif - KMessageBox::error (parent, + KMessageBox::error (tqparent, i18n ("Could not save image - failed to upload.")); return false; } @@ -1109,22 +1109,22 @@ void kpDocument::setSelection (const kpSelection &selection) (selection.type () == kpSelection::Text)); // We don't change the Selection Tool if the new selection's - // shape is merely different to the current tool's (e.g. rectangular + // tqshape is merely different to the current tool's (e.g. rectangular // vs elliptical) because: // // 1. All image selection tools support editing selections of all the - // different shapes anyway. + // different tqshapes anyway. // 2. Suppose the user is trying out different drags of selection borders - // and then decides to paste a differently shaped selection before continuing + // and then decides to paste a differently tqshaped selection before continuing // to try out different borders. If the pasting were to switch to - // a differently shaped tool, the borders drawn after the paste would - // be using a new shape rather than the shape before the paste. This + // a differently tqshaped tool, the borders drawn after the paste would + // be using a new tqshape rather than the tqshape before the paste. This // could get irritating so we don't do the switch. // if (m_mainWindow && (!m_mainWindow->toolIsASelectionTool () || isTextChanged)) { - // Switch to the appropriately shaped selection tool + // Switch to the appropriately tqshaped selection tool // _before_ we change the selection // (all selection tool's ::end() functions nuke the current selection) switch (selection.type ()) @@ -1235,7 +1235,7 @@ void kpDocument::setSelection (const kpSelection &selection) } // public -TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const +TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const { kpSelection *sel = selection (); @@ -1259,15 +1259,15 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const } - TQBitmap maskBitmap = maskBitmap_; - if (maskBitmap.isNull () && + TQBitmap tqmaskBitmap = tqmaskBitmap_; + if (tqmaskBitmap.isNull () && !sel->isRectangular ()) { - maskBitmap = sel->maskForOwnType (); + tqmaskBitmap = sel->tqmaskForOwnType (); - if (maskBitmap.isNull ()) + if (tqmaskBitmap.isNull ()) { - kdError () << "kpDocument::getSelectedPixmap() could not get mask" << endl; + kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl; return TQPixmap (); } } @@ -1275,7 +1275,7 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const TQPixmap selPixmap = getPixmapAt (boundingRect); - if (!maskBitmap.isNull ()) + if (!tqmaskBitmap.isNull ()) { // Src Dest = Result // ----------------- @@ -1286,9 +1286,9 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap); bitBlt (&selMaskBitmap, TQPoint (0, 0), - &maskBitmap, - TQRect (0, 0, maskBitmap.width (), maskBitmap.height ()), - Qt::AndROP); + &tqmaskBitmap, + TQRect (0, 0, tqmaskBitmap.width (), tqmaskBitmap.height ()), + TQt::AndROP); selPixmap.setMask (selMaskBitmap); } @@ -1325,17 +1325,17 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor) // - // Figure out mask for non-rectangular selections + // Figure out tqmask for non-rectangular selections // - TQBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/); + TQBitmap tqmaskBitmap = sel->tqmaskForOwnType (true/*return null bitmap for rectangular*/); // // Get selection pixmap from document // - TQPixmap selPixmap = getSelectedPixmap (maskBitmap); + TQPixmap selPixmap = getSelectedPixmap (tqmaskBitmap); if (vm) vm->setQueueUpdates (); @@ -1353,10 +1353,10 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor) if (backgroundColor.isOpaque ()) { TQPixmap erasePixmap (boundingRect.width (), boundingRect.height ()); - erasePixmap.fill (backgroundColor.toQColor ()); + erasePixmap.fill (backgroundColor.toTQColor ()); - if (selTransparentPixmap.mask ()) - erasePixmap.setMask (*selTransparentPixmap.mask ()); + if (selTransparentPixmap.tqmask ()) + erasePixmap.setMask (*selTransparentPixmap.tqmask ()); paintPixmapAt (erasePixmap, boundingRect.topLeft ()); } diff --git a/kolourpaint/kpdocument.h b/kolourpaint/kpdocument.h index a0369566..bc11990b 100644 --- a/kolourpaint/kpdocument.h +++ b/kolourpaint/kpdocument.h @@ -52,9 +52,10 @@ class kpMainWindow; class kpSelection; -class kpDocument : public QObject +class kpDocument : public TQObject { Q_OBJECT + TQ_OBJECT public: kpDocument (int w, int h, kpMainWindow *mainWindow); @@ -77,7 +78,7 @@ public: kpDocumentMetaInfo *metaInfo = 0); static TQPixmap getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog, - TQWidget *parent, + TQWidget *tqparent, kpDocumentSaveOptions *saveOptions = 0, kpDocumentMetaInfo *metaInfo = 0); // TODO: fix: open*() should only be called once. @@ -87,13 +88,13 @@ public: static bool lossyPromptContinue (const TQPixmap &pixmap, const kpDocumentSaveOptions &saveOptions, - TQWidget *parent); + TQWidget *tqparent); static bool savePixmapToDevice (const TQPixmap &pixmap, TQIODevice *device, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, bool lossyPrompt, - TQWidget *parent, + TQWidget *tqparent, bool *userCancelled = 0); static bool savePixmapToFile (const TQPixmap &pixmap, const KURL &url, @@ -101,7 +102,7 @@ public: const kpDocumentMetaInfo &metaInfo, bool overwritePrompt, bool lossyPrompt, - TQWidget *parent); + TQWidget *tqparent); bool save (bool overwritePrompt = false, bool lossyPrompt = false); bool saveAs (const KURL &url, const kpDocumentSaveOptions &saveOptions, @@ -188,7 +189,7 @@ public: void setSelection (const kpSelection &selection); // TODO: this always returns opaque pixmap - need transparent ver - TQPixmap getSelectedPixmap (const TQBitmap &maskBitmap = TQBitmap ()) const; + TQPixmap getSelectedPixmap (const TQBitmap &tqmaskBitmap = TQBitmap ()) const; bool selectionPullFromDocument (const kpColor &backgroundColor); bool selectionDelete (); diff --git a/kolourpaint/kpdocumentmetainfo.cpp b/kolourpaint/kpdocumentmetainfo.cpp index 36c1dde6..cf5d9987 100644 --- a/kolourpaint/kpdocumentmetainfo.cpp +++ b/kolourpaint/kpdocumentmetainfo.cpp @@ -82,8 +82,8 @@ kpDocumentMetaInfo &kpDocumentMetaInfo::operator= (const kpDocumentMetaInfo &rhs void kpDocumentMetaInfo::printDebug (const TQString &prefix) const { const TQString usedPrefix = !prefix.isEmpty () ? - prefix + TQString::fromLatin1 (":") : - TQString::null; + prefix + TQString::tqfromLatin1 (":") : + TQString(); kdDebug () << usedPrefix << endl; @@ -96,9 +96,9 @@ void kpDocumentMetaInfo::printDebug (const TQString &prefix) const it != keyList.end (); it++) { - kdDebug () << "key=" << (*it).key - << " lang=" << (*it).lang - << " text=" << text (*it) + kdDebug () << "key=" << (*it).key.data() + << " lang=" << (*it).lang.data() + << " text=" << text (*it).data() << endl; } diff --git a/kolourpaint/kpdocumentsaveoptions.cpp b/kolourpaint/kpdocumentsaveoptions.cpp index 5151e739..a5b2988c 100644 --- a/kolourpaint/kpdocumentsaveoptions.cpp +++ b/kolourpaint/kpdocumentsaveoptions.cpp @@ -114,8 +114,8 @@ kpDocumentSaveOptions &kpDocumentSaveOptions::operator= (const kpDocumentSaveOpt void kpDocumentSaveOptions::printDebug (const TQString &prefix) const { const TQString usedPrefix = !prefix.isEmpty () ? - prefix + TQString::fromLatin1 (": ") : - TQString::null; + prefix + TQString::tqfromLatin1 (": ") : + TQString(); kdDebug () << usedPrefix << "mimeType=" << mimeType () @@ -142,7 +142,7 @@ void kpDocumentSaveOptions::setMimeType (const TQString &mimeType) // public static TQString kpDocumentSaveOptions::invalidMimeType () { - return TQString::null; + return TQString(); } // public static @@ -246,7 +246,7 @@ bool kpDocumentSaveOptions::qualityIsInvalid () const TQString kpDocumentSaveOptions::defaultMimeType (KConfigBase *config) { return config->readEntry (kpSettingForcedMimeType, - TQString::fromLatin1 ("image/png")); + TQString::tqfromLatin1 ("image/png")); } // public static @@ -396,7 +396,7 @@ static bool mimeTypeSupportsProperty (const TQString &mimeType, const TQStringList mimeTypeList = mimeTypesSupportingProperty ( property, defaultMimeTypesWithPropertyList); - return mimeTypeList.contains (mimeType); + return mimeTypeList.tqcontains (mimeType); } @@ -445,19 +445,19 @@ int kpDocumentSaveOptions::mimeTypeMaximumColorDepth (const TQString &mimeType) // SYNC: update mime info here // Greyscale actually (unenforced since depth not set to configurable) - defaultList << TQString::fromLatin1 ("image/x-eps:32"); + defaultList << TQString::tqfromLatin1 ("image/x-eps:32"); - defaultList << TQString::fromLatin1 ("image/x-portable-bitmap:1"); + defaultList << TQString::tqfromLatin1 ("image/x-portable-bitmap:1"); // Greyscale actually (unenforced since depth not set to configurable) - defaultList << TQString::fromLatin1 ("image/x-portable-greymap:8"); + defaultList << TQString::tqfromLatin1 ("image/x-portable-greymap:8"); - defaultList << TQString::fromLatin1 ("image/x-xbm:1"); + defaultList << TQString::tqfromLatin1 ("image/x-xbm:1"); const TQStringList mimeTypeList = mimeTypesSupportingProperty ( kpSettingMimeTypeMaximumColorDepth, defaultList); - const TQString mimeTypeColon = mimeType + TQString::fromLatin1 (":"); + const TQString mimeTypeColon = mimeType + TQString::tqfromLatin1 (":"); for (TQStringList::const_iterator it = mimeTypeList.begin (); it != mimeTypeList.end (); it++) @@ -488,16 +488,16 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableColorDepth (const TQString &m TQStringList defaultMimeTypes; // SYNC: update mime info here - defaultMimeTypes << TQString::fromLatin1 ("image/png"); - defaultMimeTypes << TQString::fromLatin1 ("image/x-bmp"); - defaultMimeTypes << TQString::fromLatin1 ("image/x-pcx"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/png"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-bmp"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-pcx"); - // TODO: Only 1, 24 not 8; Qt only sees 32 but "file" cmd realises + // TODO: Only 1, 24 not 8; TQt only sees 32 but "file" cmd realises // it's either 1 or 24. - defaultMimeTypes << TQString::fromLatin1 ("image/x-rgb"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-rgb"); // TODO: Only 8 and 24 - no 1. - defaultMimeTypes << TQString::fromLatin1 ("image/x-xpm"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-xpm"); return mimeTypeSupportsProperty (mimeType, kpSettingMimeTypeHasConfigurableColorDepth, @@ -517,8 +517,8 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableQuality (const TQString &mime TQStringList defaultMimeTypes; // SYNC: update mime info here - defaultMimeTypes << TQString::fromLatin1 ("image/jp2"); - defaultMimeTypes << TQString::fromLatin1 ("image/jpeg"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/jp2"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/jpeg"); return mimeTypeSupportsProperty (mimeType, kpSettingMimeTypeHasConfigurableQuality, @@ -545,7 +545,7 @@ int kpDocumentSaveOptions::isLossyForSaving (const TQPixmap &pixmap) const if (mimeTypeHasConfigurableColorDepth () && !colorDepthIsInvalid () /*TODO: prevent*/ && (colorDepth () < pixmap.depth () || - colorDepth () < 32 && pixmap.mask ())) + colorDepth () < 32 && pixmap.tqmask ())) { ret |= ColorDepthLow; } diff --git a/kolourpaint/kpdocumentsaveoptions.h b/kolourpaint/kpdocumentsaveoptions.h index d6279885..22feaaa9 100644 --- a/kolourpaint/kpdocumentsaveoptions.h +++ b/kolourpaint/kpdocumentsaveoptions.h @@ -119,7 +119,7 @@ public: bool mimeTypeHasConfigurableQuality () const; - // TODO: checking for mask loss due to format e.g. BMP + // TODO: checking for tqmask loss due to format e.g. BMP enum LossyType { LossLess = 0, @@ -127,7 +127,7 @@ public: // mimeTypeMaximumColorDepth() < .depth() MimeTypeMaximumColorDepthLow = 1, // i.e. colorDepth() < .depth() || - // colorDepth() < 32 && .mask() + // colorDepth() < 32 && .tqmask() ColorDepthLow = 2, // i.e. mimeTypeHasConfigurableQuality() Quality = 4 diff --git a/kolourpaint/kpdocumentsaveoptionswidget.cpp b/kolourpaint/kpdocumentsaveoptionswidget.cpp index 4847c72d..223bac5a 100644 --- a/kolourpaint/kpdocumentsaveoptionswidget.cpp +++ b/kolourpaint/kpdocumentsaveoptionswidget.cpp @@ -62,15 +62,15 @@ const TQSize kpDocumentSaveOptionsPreviewDialog::s_pixmapLabelMinimumSize (25, 2 kpDocumentSaveOptionsPreviewDialog::kpDocumentSaveOptionsPreviewDialog ( - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TQWidget (parent, name, - Qt::WType_TopLevel | - Qt::WStyle_Customize | - Qt::WStyle_DialogBorder | - Qt::WStyle_Title), + : TQWidget (tqparent, name, + TQt::WType_TopLevel | + TQt::WStyle_Customize | + TQt::WStyle_DialogBorder | + TQt::WStyle_Title), #if 0 -KDialogBase (parent, name, false/*non-modal*/, +KDialogBase (tqparent, name, false/*non-modal*/, i18n ("Save Preview"), 0/*no buttons*/), #endif @@ -94,7 +94,7 @@ KDialogBase (parent, name, false/*non-modal*/, lay->addWidget (m_filePixmapLabel, 0, 0); - lay->addWidget (m_fileSizeLabel, 1, 0, Qt::AlignHCenter); + lay->addWidget (m_fileSizeLabel, 1, 0, TQt::AlignHCenter); lay->setRowStretch (0, 1); @@ -134,7 +134,7 @@ void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const TQPixmap &p const int pixmapSize = kpPixmapFX::pixmapSize (pixmap); const int percent = pixmapSize ? - QMAX (1, fileSize * 100 / pixmapSize) : + TQMAX (1, fileSize * 100 / pixmapSize) : 0; #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET kdDebug () << "kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize()" @@ -173,9 +173,9 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview () if (m_filePixmap) { - int maxNewWidth = QMIN (m_filePixmap->width (), + int maxNewWidth = TQMIN (m_filePixmap->width (), m_filePixmapLabel->width ()), - maxNewHeight = QMIN (m_filePixmap->height (), + maxNewHeight = TQMIN (m_filePixmap->height (), m_filePixmapLabel->height ()); double keepsAspect = kpToolPreviewDialog::aspectScale ( @@ -229,7 +229,7 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDocumentSaveOptionsPreviewDialog::closeEvent (TQCloseEvent *e) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET @@ -241,7 +241,7 @@ void kpDocumentSaveOptionsPreviewDialog::closeEvent (TQCloseEvent *e) emit finished (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDocumentSaveOptionsPreviewDialog::moveEvent (TQMoveEvent *e) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET @@ -253,7 +253,7 @@ void kpDocumentSaveOptionsPreviewDialog::moveEvent (TQMoveEvent *e) emit moved (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDocumentSaveOptionsPreviewDialog::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET @@ -270,9 +270,9 @@ kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget ( const TQPixmap &docPixmap, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, - TQWidget *parent, const char *name) - : TQWidget (parent, name), - m_visualParent (parent) + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), + m_visualParent (tqparent) { init (); setDocumentSaveOptions (saveOptions); @@ -281,9 +281,9 @@ kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget ( } kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget ( - TQWidget *parent, const char *name) - : TQWidget (parent, name), - m_visualParent (parent) + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), + m_visualParent (tqparent) { init (); } @@ -320,15 +320,15 @@ void kpDocumentSaveOptionsWidget::init () TQHBoxLayout *lay = new TQHBoxLayout (this, 0/*margin*/, KDialog::spacingHint ()); - lay->addWidget (m_colorDepthLabel, 0/*stretch*/, Qt::AlignLeft); + lay->addWidget (m_colorDepthLabel, 0/*stretch*/, TQt::AlignLeft); lay->addWidget (m_colorDepthCombo, 0/*stretch*/); lay->addWidget (m_colorDepthSpaceWidget, 1/*stretch*/); - lay->addWidget (m_qualityLabel, 0/*stretch*/, Qt::AlignLeft); + lay->addWidget (m_qualityLabel, 0/*stretch*/, TQt::AlignLeft); lay->addWidget (m_qualityInput, 2/*stretch*/); - lay->addWidget (m_previewButton, 0/*stretch*/, Qt::AlignRight); + lay->addWidget (m_previewButton, 0/*stretch*/, TQt::AlignRight); connect (m_colorDepthCombo, TQT_SIGNAL (activated (int)), @@ -704,17 +704,17 @@ void kpDocumentSaveOptionsWidget::setMode (Mode mode) // SYNC: HACK: When changing between color depth and quality widgets, // we change the height of "this", causing the text on the labels // to move but the first instance of the text doesn't get erased. - // Qt bug. - TQTimer::singleShot (0, this, TQT_SLOT (repaintLabels ())); + // TQt bug. + TQTimer::singleShot (0, this, TQT_SLOT (tqrepaintLabels ())); } // protected slot -void kpDocumentSaveOptionsWidget::repaintLabels () +void kpDocumentSaveOptionsWidget::tqrepaintLabels () { if (mode () != Quality) - m_colorDepthLabel->repaint (); + m_colorDepthLabel->tqrepaint (); if (mode () == Quality) - m_qualityLabel->repaint (); + m_qualityLabel->tqrepaint (); } @@ -767,7 +767,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes) if (m_previewDialogLastRelativeGeometry.isEmpty ()) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tread cfg preview dialog last rel geometry" << endl; + kdDebug () << "\tread cfg preview dialog last rel tqgeometry" << endl; #endif KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave); KConfigBase *cfg = cfgGroupSaver.config (); @@ -826,7 +826,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes) #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tgeometry after show=" + kdDebug () << "\ttqgeometry after show=" << TQRect (m_previewDialog->x (), m_previewDialog->y (), m_previewDialog->width (), m_previewDialog->height ()) << endl; @@ -852,9 +852,9 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes) cfg->sync (); #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tsaving preview geometry " + kdDebug () << "\tsaving preview tqgeometry " << m_previewDialogLastRelativeGeometry - << " (Qt would have us believe " + << " (TQt would have us believe " << kpWidgetMapper::fromGlobal (m_visualParent, TQRect (m_previewDialog->x (), m_previewDialog->y (), m_previewDialog->width (), m_previewDialog->height ())) @@ -891,14 +891,14 @@ void kpDocumentSaveOptionsWidget::updatePreview () m_updatePreviewTimer->stop (); - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQByteArray data; TQBuffer buffer (data); buffer.open (IO_WriteOnly); kpDocument::savePixmapToDevice (*m_documentPixmap, - &buffer, + TQT_TQIODEVICE(&buffer), documentSaveOptions (), m_documentMetaInfo, false/*no lossy prompt*/, @@ -942,7 +942,7 @@ void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry () else { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tnot visible - ignoring geometry" << endl; + kdDebug () << "\tnot visible - ignoring tqgeometry" << endl; #endif } } diff --git a/kolourpaint/kpdocumentsaveoptionswidget.h b/kolourpaint/kpdocumentsaveoptionswidget.h index 1aeb8cb1..a01e8784 100644 --- a/kolourpaint/kpdocumentsaveoptionswidget.h +++ b/kolourpaint/kpdocumentsaveoptionswidget.h @@ -41,12 +41,13 @@ class TQLabel; class kpResizeSignallingLabel; -class kpDocumentSaveOptionsPreviewDialog : public QWidget +class kpDocumentSaveOptionsPreviewDialog : public TQWidget { Q_OBJECT + TQ_OBJECT public: - kpDocumentSaveOptionsPreviewDialog (TQWidget *parent, const char *name = 0); + kpDocumentSaveOptionsPreviewDialog (TQWidget *tqparent, const char *name = 0); virtual ~kpDocumentSaveOptionsPreviewDialog (); TQSize preferredMinimumSize () const; @@ -92,16 +93,17 @@ class KIntNumInput; class KPushButton; -class kpDocumentSaveOptionsWidget : public QWidget +class kpDocumentSaveOptionsWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: kpDocumentSaveOptionsWidget (const TQPixmap &docPixmap, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, - TQWidget *parent, const char *name = 0); - kpDocumentSaveOptionsWidget (TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); + kpDocumentSaveOptionsWidget (TQWidget *tqparent, const char *name = 0); private: void init (); public: @@ -159,7 +161,7 @@ protected: void setMode (Mode mode); protected slots: - void repaintLabels (); + void tqrepaintLabels (); protected slots: diff --git a/kolourpaint/kpmainwindow.cpp b/kolourpaint/kpmainwindow.cpp index 9e760c2c..c600d36b 100644 --- a/kolourpaint/kpmainwindow.cpp +++ b/kolourpaint/kpmainwindow.cpp @@ -64,7 +64,7 @@ kpMainWindow::kpMainWindow () - : KMainWindow (0/*parent*/, "mainWindow"), + : KMainWindow (0/*tqparent*/, "mainWindow"), m_isFullyConstructed (false) { init (); @@ -74,7 +74,7 @@ kpMainWindow::kpMainWindow () } kpMainWindow::kpMainWindow (const KURL &url) - : KMainWindow (0/*parent*/, "mainWindow"), + : KMainWindow (0/*tqparent*/, "mainWindow"), m_isFullyConstructed (false) { init (); @@ -84,7 +84,7 @@ kpMainWindow::kpMainWindow (const KURL &url) } kpMainWindow::kpMainWindow (kpDocument *newDoc) - : KMainWindow (0/*parent*/, "mainWindow"), + : KMainWindow (0/*tqparent*/, "mainWindow"), m_isFullyConstructed (false) { init (); @@ -157,7 +157,7 @@ void kpMainWindow::readThumbnailSettings () #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\t\tThumbnail Settings: shown=" << m_configThumbnailShown - << " geometry=" << m_configThumbnailGeometry + << " tqgeometry=" << m_configThumbnailGeometry << " zoomed=" << m_configZoomedThumbnail << " showRectangle=" << d->m_configThumbnailShowRectangle << endl; @@ -658,11 +658,11 @@ void kpMainWindow::setDocument (kpDocument *newDoc) if (!m_lastCopyToURL.isEmpty ()) - m_lastCopyToURL.setFileName (TQString::null); + m_lastCopyToURL.setFileName (TQString()); m_copyToFirstTime = true; if (!m_lastExportURL.isEmpty ()) - m_lastExportURL.setFileName (TQString::null); + m_lastExportURL.setFileName (TQString()); m_exportFirstTime = true; @@ -731,7 +731,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc) connect (m_document, TQT_SIGNAL (selectionIsTextChanged (bool)), this, TQT_SLOT (slotImageMenuUpdateDueToSelection ())); - // Status bar + // tqStatus bar connect (m_document, TQT_SIGNAL (documentOpened ()), this, TQT_SLOT (recalculateStatusBar ())); @@ -808,7 +808,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc) #endif slotCreateThumbnail (); } - // this' geometry is weird ATM + // this' tqgeometry is weird ATM else { #if DEBUG_KP_MAIN_WINDOW @@ -855,7 +855,7 @@ bool kpMainWindow::queryClose () i18n ("The document \"%1\" has been modified.\n" "Do you want to save it?") .arg (m_document->prettyFilename ()), - TQString::null/*caption*/, + TQString()/*caption*/, KStdGuiItem::save (), KStdGuiItem::discard ()); switch (result) @@ -870,7 +870,7 @@ bool kpMainWindow::queryClose () } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpMainWindow::dragEnterEvent (TQDragEnterEvent *e) { e->accept (kpSelectionDrag::canDecode (e) || @@ -878,7 +878,7 @@ void kpMainWindow::dragEnterEvent (TQDragEnterEvent *e) TQTextDrag::canDecode (e)); } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpMainWindow::dropEvent (TQDropEvent *e) { #if DEBUG_KP_MAIN_WINDOW @@ -939,7 +939,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e) #endif if (m_thumbnailView && kpWidgetMapper::toGlobal (m_thumbnailView, m_thumbnailView->rect ()) - .contains (globalPos)) + .tqcontains (globalPos)) { // TODO: Code will never get executed. // Thumbnail doesn't accept drops. @@ -947,13 +947,13 @@ void kpMainWindow::dropEvent (TQDropEvent *e) } else if (m_mainView && kpWidgetMapper::toGlobal (m_mainView, m_mainView->rect ()) - .contains (globalPos) && + .tqcontains (globalPos) && m_scrollView && kpWidgetMapper::toGlobal (m_scrollView, TQRect (0, 0, m_scrollView->visibleWidth (), m_scrollView->visibleHeight ())) - .contains (globalPos)) + .tqcontains (globalPos)) { view = m_mainView; } @@ -967,7 +967,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e) // viewUnderCursor() is hacky and can return a view when we aren't // over one thanks to drags. - if (m_document && m_document->rect ().contains (docPoint)) + if (m_document && m_document->rect ().tqcontains (docPoint)) { selTopLeft = docPoint; @@ -1021,7 +1021,7 @@ void kpMainWindow::slotScrollViewAfterScroll () } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpMainWindow::moveEvent (TQMoveEvent * /*e*/) { if (m_thumbnail) @@ -1045,7 +1045,7 @@ void kpMainWindow::slotUpdateCaption () } else { - setCaption (TQString::null, false); + setCaption (TQString(), false); } } diff --git a/kolourpaint/kpmainwindow.h b/kolourpaint/kpmainwindow.h index abc5434b..bd0df32b 100644 --- a/kolourpaint/kpmainwindow.h +++ b/kolourpaint/kpmainwindow.h @@ -88,6 +88,7 @@ class kpZoomedView; class kpMainWindow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: // Opens a new window with a blank document. @@ -639,7 +640,7 @@ private slots: /* - * Status Bar + * tqStatus Bar */ private: @@ -665,7 +666,7 @@ private: void createStatusBar (); private slots: - void setStatusBarMessage (const TQString &message = TQString::null); + void setStatusBarMessage (const TQString &message = TQString()); void setStatusBarShapePoints (const TQPoint &startPoint = KP_INVALID_POINT, const TQPoint &endPoint = KP_INVALID_POINT); void setStatusBarShapeSize (const TQSize &size = KP_INVALID_SIZE); diff --git a/kolourpaint/kpmainwindow_edit.cpp b/kolourpaint/kpmainwindow_edit.cpp index 1dfdb3fd..103b6e11 100644 --- a/kolourpaint/kpmainwindow_edit.cpp +++ b/kolourpaint/kpmainwindow_edit.cpp @@ -72,7 +72,7 @@ kpPixmapFX::WarnAboutLossInfo kpMainWindow::pasteWarnAboutLossInfo () " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask."), + " approximated with a 1-bit transparency tqmask."), i18n ("The image to be pasted" " may have more colors than the current screen mode." " In order to display it, some colors may be changed." @@ -80,7 +80,7 @@ kpPixmapFX::WarnAboutLossInfo kpMainWindow::pasteWarnAboutLossInfo () i18n ("The image to be pasted" " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask."), + " approximated with a 1-bit transparency tqmask."), "paste", this); } @@ -103,25 +103,25 @@ void kpMainWindow::setupEditMenuActions () } - m_actionCut = KStdAction::cut (this, TQT_SLOT (slotCut ()), ac); - m_actionCopy = KStdAction::copy (this, TQT_SLOT (slotCopy ()), ac); - m_actionPaste = KStdAction::paste (this, TQT_SLOT (slotPaste ()), ac); + m_actionCut = KStdAction::cut (TQT_TQOBJECT(this), TQT_SLOT (slotCut ()), ac); + m_actionCopy = KStdAction::copy (TQT_TQOBJECT(this), TQT_SLOT (slotCopy ()), ac); + m_actionPaste = KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT (slotPaste ()), ac); m_actionPasteInNewWindow = new KAction (i18n ("Paste in &New Window"), - Qt::CTRL + Qt::SHIFT + Qt::Key_V, - this, TQT_SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window"); + TQt::CTRL + TQt::SHIFT + TQt::Key_V, + TQT_TQOBJECT(this), TQT_SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window"); //m_actionDelete = KStdAction::clear (this, TQT_SLOT (slotDelete ()), ac); m_actionDelete = new KAction (i18n ("&Delete Selection"), 0, - this, TQT_SLOT (slotDelete ()), ac, "edit_clear"); + TQT_TQOBJECT(this), TQT_SLOT (slotDelete ()), ac, "edit_clear"); - m_actionSelectAll = KStdAction::selectAll (this, TQT_SLOT (slotSelectAll ()), ac); - m_actionDeselect = KStdAction::deselect (this, TQT_SLOT (slotDeselect ()), ac); + m_actionSelectAll = KStdAction::selectAll (TQT_TQOBJECT(this), TQT_SLOT (slotSelectAll ()), ac); + m_actionDeselect = KStdAction::deselect (TQT_TQOBJECT(this), TQT_SLOT (slotDeselect ()), ac); m_actionCopyToFile = new KAction (i18n ("C&opy to File..."), 0, - this, TQT_SLOT (slotCopyToFile ()), ac, "edit_copy_to_file"); + TQT_TQOBJECT(this), TQT_SLOT (slotCopyToFile ()), ac, "edit_copy_to_file"); m_actionPasteFromFile = new KAction (i18n ("Paste &From File..."), 0, - this, TQT_SLOT (slotPasteFromFile ()), ac, "edit_paste_from_file"); + TQT_TQOBJECT(this), TQT_SLOT (slotPasteFromFile ()), ac, "edit_paste_from_file"); m_editMenuDocumentActionsEnabled = false; @@ -129,8 +129,8 @@ void kpMainWindow::setupEditMenuActions () // Paste should always be enabled, as long as there is something paste // (independent of whether we have a document or not) - connect (TQApplication::clipboard (), TQT_SIGNAL (dataChanged ()), - this, TQT_SLOT (slotEnablePaste ())); + connect (TQApplication::tqclipboard (), TQT_SIGNAL (dataChanged ()), + TQT_TQOBJECT(this), TQT_SLOT (slotEnablePaste ())); slotEnablePaste (); } @@ -180,7 +180,7 @@ void kpMainWindow::slotCut () } - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -208,14 +208,14 @@ void kpMainWindow::slotCopy () } - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); kpSelection sel = *m_document->selection (); // Transparency doesn't get sent across the aether so nuke it now - // so that transparency mask doesn't get needlessly recalculated + // so that transparency tqmask doesn't get needlessly recalculated // if we ever call sel.setPixmap(). sel.setTransparency (kpSelectionTransparency ()); @@ -223,8 +223,8 @@ void kpMainWindow::slotCopy () { if (!sel.text ().isEmpty ()) { - TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()), - QClipboard::Clipboard); + TQApplication::tqclipboard ()->setData (new TQTextDrag (sel.text ()), + TQClipboard::Clipboard); // SYNC: Normally, users highlight text and press CTRL+C. // Highlighting text copies it to the X11 "middle @@ -238,13 +238,13 @@ void kpMainWindow::slotCopy () // as no one ever middle-mouse-pastes images. // // Note that we don't share the TQTextDrag pointer with - // the above in case Qt doesn't expect it. + // the above in case TQt doesn't expect it. // // Once we change KolourPaint to support highlighted text // and CTRL+C to copy only the highlighted text, delete // this code. - TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()), - QClipboard::Selection); + TQApplication::tqclipboard ()->setData (new TQTextDrag (sel.text ()), + TQClipboard::Selection); } } else @@ -256,20 +256,20 @@ void kpMainWindow::slotCopy () else rawPixmap = m_document->getSelectedPixmap (); - // Some apps, such as OpenOffice.org 2.0.4, ignore the image mask + // Some apps, such as OpenOffice.org 2.0.4, ignore the image tqmask // when pasting. For transparent pixels, the uninitialized RGB // values are used. Fix this by initializing those values to a // neutral color -- white. // - // Strangely enough, OpenOffice.org respects the mask when inserting + // Strangely enough, OpenOffice.org respects the tqmask when inserting // an image from a file, as opposed to pasting one from the clipboard. sel.setPixmap ( kpPixmapFX::pixmapWithDefinedTransparentPixels ( rawPixmap, - Qt::white)); // CONFIG + TQt::white)); // CONFIG - TQApplication::clipboard ()->setData (new kpSelectionDrag (sel), - QClipboard::Clipboard); + TQApplication::tqclipboard ()->setData (new kpSelectionDrag (sel), + TQClipboard::Clipboard); } TQApplication::restoreOverrideCursor (); @@ -288,7 +288,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw) bool hasSomething = false; - TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard); + TQMimeSource *ms = TQApplication::tqclipboard ()->data (TQClipboard::Clipboard); if (ms) { // It's faster to test for TQTextDrag::canDecode() first due to the @@ -311,7 +311,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw) return hasSomething; } -// HACK: SYNC: Non-Qt apps do not cause TQApplication::clipboard() to +// HACK: SYNC: Non-TQt apps do not cause TQApplication::tqtqclipboard() to // emit dataChanged(). We don't want to have our paste // action disabled when we can actually paste something. // @@ -332,7 +332,7 @@ static bool HasSomethingToPasteWithDialogIfNot (kpMainWindow *mw) #if 1 (void) mw; #else - TQApplication::setOverrideCursor (Qt::arrowCursor); + TQApplication::setOverrideCursor (TQt::arrowCursor); KMessageBox::sorry (mw, STRING_FREEZE_i18n ("

There is nothing in the clipboard to paste.

"), @@ -428,7 +428,7 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft) return; } - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -482,8 +482,8 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft) m_commandHistory->addCommand ( new kpToolResizeScaleCommand ( false/*act on doc, not sel*/, - QMAX (sel.width (), m_document->width ()), - QMAX (sel.height (), m_document->height ()), + TQMAX (sel.width (), m_document->width ()), + TQMAX (sel.height (), m_document->height ()), kpToolResizeScaleCommand::Resize, this)); } @@ -509,18 +509,18 @@ void kpMainWindow::pasteText (const TQString &text, // sync: restoreOverrideCursor() in all exit paths - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); - TQValueVector textLines (1, TQString::null); + TQValueVector textLines (1, TQString()); for (int i = 0; i < (int) text.length (); i++) { if (text [i] == '\n') - textLines.push_back (TQString::null); + textLines.push_back (TQString()); else textLines [textLines.size () - 1].append (text [i]); } @@ -544,7 +544,7 @@ void kpMainWindow::pasteText (const TQString &text, { macroCmd->addCommand ( new kpToolTextEnterCommand ( - TQString::null/*uninteresting child of macroCmd*/, + TQString()/*uninteresting child of macroCmd*/, m_viewManager->textCursorRow (), m_viewManager->textCursorCol (), this)); @@ -552,7 +552,7 @@ void kpMainWindow::pasteText (const TQString &text, macroCmd->addCommand ( new kpToolTextInsertCommand ( - TQString::null/*uninteresting child of macroCmd*/, + TQString()/*uninteresting child of macroCmd*/, m_viewManager->textCursorRow (), m_viewManager->textCursorCol (), textLines [i], @@ -585,9 +585,9 @@ void kpMainWindow::pasteText (const TQString &text, } - const int selWidth = QMAX (kpSelection::minimumWidthForTextStyle (ts), + const int selWidth = TQMAX (kpSelection::minimumWidthForTextStyle (ts), width + kpSelection::textBorderSize () * 2); - const int selHeight = QMAX (kpSelection::minimumHeightForTextStyle (ts), + const int selHeight = TQMAX (kpSelection::minimumHeightForTextStyle (ts), height + kpSelection::textBorderSize () * 2); kpSelection sel (TQRect (0, 0, selWidth, selHeight), textLines, @@ -620,7 +620,7 @@ void kpMainWindow::pasteTextAt (const TQString &text, const TQPoint &point, << ")" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -666,7 +666,7 @@ void kpMainWindow::slotPaste () #endif // sync: restoreOverrideCursor() in all exit paths - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -683,7 +683,7 @@ void kpMainWindow::slotPaste () // Acquire the pixmap // - TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard); + TQMimeSource *ms = TQApplication::tqclipboard ()->data (TQClipboard::Clipboard); if (!ms) { kdError () << "kpMainWindow::slotPaste() without mimeSource" << endl; @@ -763,7 +763,7 @@ void kpMainWindow::slotPasteInNewWindow () #endif // sync: restoreOverrideCursor() in all exit paths - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); diff --git a/kolourpaint/kpmainwindow_file.cpp b/kolourpaint/kpmainwindow_file.cpp index a3a10433..caf7a75d 100644 --- a/kolourpaint/kpmainwindow_file.cpp +++ b/kolourpaint/kpmainwindow_file.cpp @@ -67,41 +67,41 @@ void kpMainWindow::setupFileMenuActions () #endif KActionCollection *ac = actionCollection (); - m_actionNew = KStdAction::openNew (this, TQT_SLOT (slotNew ()), ac); - m_actionOpen = KStdAction::open (this, TQT_SLOT (slotOpen ()), ac); + m_actionNew = KStdAction::openNew (TQT_TQOBJECT(this), TQT_SLOT (slotNew ()), ac); + m_actionOpen = KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT (slotOpen ()), ac); - m_actionOpenRecent = KStdAction::openRecent (this, TQT_SLOT (slotOpenRecent (const KURL &)), ac); + m_actionOpenRecent = KStdAction::openRecent (TQT_TQOBJECT(this), TQT_SLOT (slotOpenRecent (const KURL &)), ac); m_actionOpenRecent->loadEntries (kapp->config ()); #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\trecent URLs=" << m_actionOpenRecent->items () << endl; #endif - m_actionSave = KStdAction::save (this, TQT_SLOT (slotSave ()), ac); - m_actionSaveAs = KStdAction::saveAs (this, TQT_SLOT (slotSaveAs ()), ac); + m_actionSave = KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT (slotSave ()), ac); + m_actionSaveAs = KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT (slotSaveAs ()), ac); m_actionExport = new KAction (i18n ("E&xport..."), 0, - this, TQT_SLOT (slotExport ()), ac, "file_export"); + TQT_TQOBJECT(this), TQT_SLOT (slotExport ()), ac, "file_export"); m_actionScan = new KAction (i18n ("Scan..."), SmallIcon ("scanner"), 0, - this, TQT_SLOT (slotScan ()), ac, "file_scan"); + TQT_TQOBJECT(this), TQT_SLOT (slotScan ()), ac, "file_scan"); //m_actionRevert = KStdAction::revert (this, TQT_SLOT (slotRevert ()), ac); m_actionReload = new KAction (i18n ("Reloa&d"), KStdAccel::reload (), - this, TQT_SLOT (slotReload ()), ac, "file_revert"); + TQT_TQOBJECT(this), TQT_SLOT (slotReload ()), ac, "file_revert"); slotEnableReload (); - m_actionPrint = KStdAction::print (this, TQT_SLOT (slotPrint ()), ac); - m_actionPrintPreview = KStdAction::printPreview (this, TQT_SLOT (slotPrintPreview ()), ac); + m_actionPrint = KStdAction::print (TQT_TQOBJECT(this), TQT_SLOT (slotPrint ()), ac); + m_actionPrintPreview = KStdAction::printPreview (TQT_TQOBJECT(this), TQT_SLOT (slotPrintPreview ()), ac); - m_actionMail = KStdAction::mail (this, TQT_SLOT (slotMail ()), ac); + m_actionMail = KStdAction::mail (TQT_TQOBJECT(this), TQT_SLOT (slotMail ()), ac); m_actionSetAsWallpaperCentered = new KAction (i18n ("Set as Wa&llpaper (Centered)"), 0, - this, TQT_SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered"); + TQT_TQOBJECT(this), TQT_SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered"); m_actionSetAsWallpaperTiled = new KAction (i18n ("Set as Wallpaper (&Tiled)"), 0, - this, TQT_SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled"); + TQT_TQOBJECT(this), TQT_SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled"); - m_actionClose = KStdAction::close (this, TQT_SLOT (slotClose ()), ac); - m_actionQuit = KStdAction::quit (this, TQT_SLOT (slotQuit ()), ac); + m_actionClose = KStdAction::close (TQT_TQOBJECT(this), TQT_SLOT (slotClose ()), ac); + m_actionQuit = KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT (slotQuit ()), ac); m_scanDialog = 0; @@ -247,8 +247,8 @@ TQSize kpMainWindow::defaultDocSize () const { // Don't get too big or you'll thrash (or even lock up) the computer // just by opening a window - docSize = TQSize (QMIN (2048, docSize.width ()), - QMIN (2048, docSize.height ())); + docSize = TQSize (TQMIN (2048, docSize.width ()), + TQMIN (2048, docSize.height ())); } return docSize; @@ -370,7 +370,7 @@ void kpMainWindow::slotOpen () const KURL::List urls = askForOpenURLs (i18n ("Open Image"), - m_document ? m_document->url ().url () : TQString::null); + m_document ? m_document->url ().url () : TQString()); for (KURL::List::const_iterator it = urls.begin (); it != urls.end (); @@ -548,7 +548,7 @@ bool kpMainWindow::save (bool localOnly) { if (m_document->url ().isEmpty () || KImageIO::mimeTypes (KImageIO::Writing) - .findIndex (m_document->saveOptions ()->mimeType ()) < 0 || + .tqfindIndex (m_document->saveOptions ()->mimeType ()) < 0 || // SYNC: kpDocument::getPixmapFromFile() can't determine quality // from file so it has been set initially to an invalid value. (m_document->saveOptions ()->mimeTypeHasConfigurableQuality () && @@ -639,7 +639,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, } #define MIME_TYPE_IS_VALID() (!fdSaveOptions.mimeTypeIsInvalid () && \ - mimeTypes.findIndex (fdSaveOptions.mimeType ()) >= 0) + mimeTypes.tqfindIndex (fdSaveOptions.mimeType ()) >= 0) if (!MIME_TYPE_IS_VALID ()) { #if DEBUG_KP_MAIN_WINDOW @@ -658,9 +658,9 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, kdDebug () << "\tmimeType=" << fdSaveOptions.mimeType () << " not valid, get hardcoded" << endl; #endif - if (mimeTypes.findIndex ("image/png") > -1) + if (mimeTypes.tqfindIndex ("image/png") > -1) fdSaveOptions.setMimeType ("image/png"); - else if (mimeTypes.findIndex ("image/x-bmp") > -1) + else if (mimeTypes.tqfindIndex ("image/x-bmp") > -1) fdSaveOptions.setMimeType ("image/x-bmp"); else fdSaveOptions.setMimeType (mimeTypes.first ()); @@ -692,7 +692,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, docMetaInfo, this); - KFileDialog fd (startURL, TQString::null, this, "fd", true/*modal*/, + KFileDialog fd (startURL, TQString(), this, "fd", true/*modal*/, saveOptionsWidget); saveOptionsWidget->setVisualParent (&fd); fd.setCaption (caption); @@ -898,7 +898,7 @@ bool kpMainWindow::slotReload () "Reloading will lose all changes since you last saved it.\n" "Are you sure?") .arg (m_document->prettyFilename ()), - TQString::null/*caption*/, + TQString()/*caption*/, i18n ("&Reload")); } else @@ -908,7 +908,7 @@ bool kpMainWindow::slotReload () "Reloading will lose all changes.\n" "Are you sure?") .arg (m_document->prettyFilename ()), - TQString::null/*caption*/, + TQString()/*caption*/, i18n ("&Reload")); } @@ -964,7 +964,7 @@ void kpMainWindow::sendFilenameToPrinter (KPrinter *printer) int dot; TQString fileName = url.fileName (); - dot = fileName.findRev ('.'); + dot = fileName.tqfindRev ('.'); // file.ext but not .hidden-file? if (dot > 0) @@ -1045,7 +1045,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, #endif // Image DPI invalid (e.g. new image, could not read from file - // or Qt3 doesn't implement DPI for JPEG)? + // or TQt3 doesn't implement DPI for JPEG)? if (pixmapDotsPerMeterX < 1 || pixmapDotsPerMeterY < 1) { // Even if just one DPI dimension is invalid, mutate both DPI @@ -1113,7 +1113,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, / dpiX; const double scaleDpiY = (pixmap.height () / (printerHeightMM / 25.4)) / dpiY; - const double scaleDpi = QMAX (scaleDpiX, scaleDpiY); + const double scaleDpi = TQMAX (scaleDpiX, scaleDpiY); #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\t\tscaleDpi: x=" << scaleDpiX << " y=" << scaleDpiY << " --> scale at " << scaleDpi << " to fit?" @@ -1145,7 +1145,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, #endif kpPixmapFX::scale (&pixmap, pixmap.width (), - QMAX (1, qRound (pixmap.height () * dpiX / dpiY)), + TQMAX (1, tqRound (pixmap.height () * dpiX / dpiY)), false/*don't antialias*/); dpiY = dpiX; @@ -1157,7 +1157,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, << dpiY << endl; #endif kpPixmapFX::scale (&pixmap, - QMAX (1, qRound (pixmap.width () * dpiY / dpiX)), + TQMAX (1, tqRound (pixmap.width () * dpiY / dpiX)), pixmap.height (), false/*don't antialias*/); @@ -1167,7 +1167,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, // ASSERT: dpiX == dpiY // TQPrinter::setResolution() has to be called before TQPrinter::setup(). - printer->setResolution (QMAX (1, qRound (dpiX))); + printer->setResolution (TQMAX (1, tqRound (dpiX))); double originX = 0, originY = 0; @@ -1199,7 +1199,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, // Send pixmap to printer. TQPainter painter; painter.begin (printer); - painter.drawPixmap (qRound (originX), qRound (originY), pixmap); + painter.drawPixmap (tqRound (originX), tqRound (originY), pixmap); painter.end (); } @@ -1224,7 +1224,7 @@ void kpMainWindow::slotPrintPreview () // TODO: get it to reflect default printer's settings KPrinter printer (false/*separate settings from ordinary printer*/); - // TODO: pass "this" as parent + // TODO: pass "this" as tqparent printer.setPreviewOnly (true); sendPixmapToPrinter (&printer, false/*don't showPrinterSetupDialog*/); @@ -1244,7 +1244,7 @@ void kpMainWindow::slotMail () int result = KMessageBox::questionYesNo (this, i18n ("You must save this image before sending it.\n" "Do you want to save it?"), - TQString::null, + TQString(), KStdGuiItem::save (), KStdGuiItem::cancel ()); if (result == KMessageBox::Yes) @@ -1263,12 +1263,12 @@ void kpMainWindow::slotMail () } kapp->invokeMailer ( - TQString::null/*to*/, - TQString::null/*cc*/, - TQString::null/*bcc*/, + TQString()/*to*/, + TQString()/*cc*/, + TQString()/*bcc*/, m_document->prettyFilename()/*subject*/, - TQString::null/*body*/, - TQString::null/*messageFile*/, + TQString()/*body*/, + TQString()/*messageFile*/, TQStringList (m_document->url ().url ())/*attachments*/); } @@ -1297,7 +1297,7 @@ void kpMainWindow::setAsWallpaper (bool centered) } int result = KMessageBox::questionYesNo (this, - question, TQString::null, + question, TQString(), KStdGuiItem::save (), KStdGuiItem::cancel ()); if (result == KMessageBox::Yes) diff --git a/kolourpaint/kpmainwindow_help.cpp b/kolourpaint/kpmainwindow_help.cpp index 9d69143c..78ec0265 100644 --- a/kolourpaint/kpmainwindow_help.cpp +++ b/kolourpaint/kpmainwindow_help.cpp @@ -57,7 +57,7 @@ void kpMainWindow::setupHelpMenuActions () // -- Thurston d->m_actionHelpTakingScreenshots = new KAction ( i18n ("Acquiring &Screenshots"), 0, - this, TQT_SLOT (slotHelpTakingScreenshots ()), + TQT_TQOBJECT(this), TQT_SLOT (slotHelpTakingScreenshots ()), ac, "help_taking_screenshots"); @@ -92,7 +92,7 @@ static TQString printScreenShortcutString () else { // (localised) - return KKey (Qt::CTRL + Qt::Key_Print).toString (); + return KKey (TQt::CTRL + TQt::Key_Print).toString (); } } @@ -114,7 +114,7 @@ void kpMainWindow::slotHelpTakingScreenshots () #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\tdcopApps=" << dcopApps << endl; #endif - bool isRunningKDE = (dcopApps.findIndex ("kwin") >= 0); + bool isRunningKDE = (dcopApps.tqfindIndex ("kwin") >= 0); #if 0 { @@ -188,7 +188,7 @@ void kpMainWindow::slotHelpTakingScreenshots () disconnect (messageLabel, TQT_SIGNAL (linkClicked (const TQString &)), messageLabel, TQT_SLOT (openLink (const TQString &))); connect (messageLabel, TQT_SIGNAL (linkClicked (const TQString &)), - this, TQT_SLOT (slotHelpTakingScreenshotsFollowLink (const TQString &))); + TQT_TQOBJECT(this), TQT_SLOT (slotHelpTakingScreenshotsFollowLink (const TQString &))); dlg.setMainWidget (messageLabel); diff --git a/kolourpaint/kpmainwindow_image.cpp b/kolourpaint/kpmainwindow_image.cpp index a00f0fd3..7de1b158 100644 --- a/kolourpaint/kpmainwindow_image.cpp +++ b/kolourpaint/kpmainwindow_image.cpp @@ -89,38 +89,38 @@ void kpMainWindow::setupImageMenuActions () { KActionCollection *ac = actionCollection (); - m_actionResizeScale = new KAction (i18n ("R&esize / Scale..."), Qt::CTRL + Qt::Key_E, - this, TQT_SLOT (slotResizeScale ()), ac, "image_resize_scale"); + m_actionResizeScale = new KAction (i18n ("R&esize / Scale..."), TQt::CTRL + TQt::Key_E, + TQT_TQOBJECT(this), TQT_SLOT (slotResizeScale ()), ac, "image_resize_scale"); - m_actionCrop = new KAction (i18n ("Se&t as Image (Crop)"), Qt::CTRL + Qt::Key_T, - this, TQT_SLOT (slotCrop ()), ac, "image_crop"); + m_actionCrop = new KAction (i18n ("Se&t as Image (Crop)"), TQt::CTRL + TQt::Key_T, + TQT_TQOBJECT(this), TQT_SLOT (slotCrop ()), ac, "image_crop"); - m_actionAutoCrop = new KAction (autoCropText (), Qt::CTRL + Qt::Key_U, - this, TQT_SLOT (slotAutoCrop ()), ac, "image_auto_crop"); + m_actionAutoCrop = new KAction (autoCropText (), TQt::CTRL + TQt::Key_U, + TQT_TQOBJECT(this), TQT_SLOT (slotAutoCrop ()), ac, "image_auto_crop"); - m_actionFlip = new KAction (i18n ("&Flip..."), Qt::CTRL + Qt::Key_F, - this, TQT_SLOT (slotFlip ()), ac, "image_flip"); + m_actionFlip = new KAction (i18n ("&Flip..."), TQt::CTRL + TQt::Key_F, + TQT_TQOBJECT(this), TQT_SLOT (slotFlip ()), ac, "image_flip"); - m_actionRotate = new KAction (i18n ("&Rotate..."), Qt::CTRL + Qt::Key_R, - this, TQT_SLOT (slotRotate ()), ac, "image_rotate"); + m_actionRotate = new KAction (i18n ("&Rotate..."), TQt::CTRL + TQt::Key_R, + TQT_TQOBJECT(this), TQT_SLOT (slotRotate ()), ac, "image_rotate"); - m_actionSkew = new KAction (i18n ("S&kew..."), Qt::CTRL + Qt::Key_K, - this, TQT_SLOT (slotSkew ()), ac, "image_skew"); + m_actionSkew = new KAction (i18n ("S&kew..."), TQt::CTRL + TQt::Key_K, + TQT_TQOBJECT(this), TQT_SLOT (slotSkew ()), ac, "image_skew"); m_actionConvertToBlackAndWhite = new KAction (i18n ("Reduce to Mo&nochrome (Dithered)"), 0, - this, TQT_SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white"); + TQT_TQOBJECT(this), TQT_SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white"); m_actionConvertToGrayscale = new KAction (i18n ("Reduce to &Grayscale"), 0, - this, TQT_SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale"); + TQT_TQOBJECT(this), TQT_SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale"); - m_actionInvertColors = new KAction (i18n ("&Invert Colors"), Qt::CTRL + Qt::Key_I, - this, TQT_SLOT (slotInvertColors ()), ac, "image_invert_colors"); + m_actionInvertColors = new KAction (i18n ("&Invert Colors"), TQt::CTRL + TQt::Key_I, + TQT_TQOBJECT(this), TQT_SLOT (slotInvertColors ()), ac, "image_invert_colors"); - m_actionClear = new KAction (i18n ("C&lear"), Qt::CTRL + Qt::SHIFT + Qt::Key_N, - this, TQT_SLOT (slotClear ()), ac, "image_clear"); + m_actionClear = new KAction (i18n ("C&lear"), TQt::CTRL + TQt::SHIFT + TQt::Key_N, + TQT_TQOBJECT(this), TQT_SLOT (slotClear ()), ac, "image_clear"); - m_actionMoreEffects = new KAction (i18n ("&More Effects..."), Qt::CTRL + Qt::Key_M, - this, TQT_SLOT (slotMoreEffects ()), ac, "image_more_effects"); + m_actionMoreEffects = new KAction (i18n ("&More Effects..."), TQt::CTRL + TQt::Key_M, + TQT_TQOBJECT(this), TQT_SLOT (slotMoreEffects ()), ac, "image_more_effects"); enableImageMenuDocumentActions (false); } @@ -260,7 +260,7 @@ void kpMainWindow::addImageOrSelectionCommand (kpCommand *cmd, kpMacroCommand *macroCmd = new kpMacroCommand (cmd->name (), this); macroCmd->addCommand (new kpToolSelectionPullFromDocumentCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, this)); macroCmd->addCommand (cmd); diff --git a/kolourpaint/kpmainwindow_settings.cpp b/kolourpaint/kpmainwindow_settings.cpp index 9e3914e8..c9ce8b74 100644 --- a/kolourpaint/kpmainwindow_settings.cpp +++ b/kolourpaint/kpmainwindow_settings.cpp @@ -57,19 +57,19 @@ void kpMainWindow::setupSettingsMenuActions () createStandardStatusBarAction (); - m_actionFullScreen = KStdAction::fullScreen (this, TQT_SLOT (slotFullScreen ()), ac, + m_actionFullScreen = KStdAction::fullScreen (TQT_TQOBJECT(this), TQT_SLOT (slotFullScreen ()), ac, this/*window*/); m_actionShowPath = new KToggleAction (i18n ("Show &Path"), 0, - this, TQT_SLOT (slotShowPathToggled ()), ac, "settings_show_path"); + TQT_TQOBJECT(this), TQT_SLOT (slotShowPathToggled ()), ac, "settings_show_path"); m_actionShowPath->setCheckedState (i18n ("Hide &Path")); slotEnableSettingsShowPath (); - m_actionKeyBindings = KStdAction::keyBindings (this, TQT_SLOT (slotKeyBindings ()), ac); - m_actionConfigureToolbars = KStdAction::configureToolbars (this, TQT_SLOT (slotConfigureToolBars ()), ac); - // m_actionConfigure = KStdAction::preferences (this, TQT_SLOT (slotConfigure ()), ac); + m_actionKeyBindings = KStdAction::keyBindings (TQT_TQOBJECT(this), TQT_SLOT (slotKeyBindings ()), ac); + m_actionConfigureToolbars = KStdAction::configureToolbars (TQT_TQOBJECT(this), TQT_SLOT (slotConfigureToolBars ()), ac); + // m_actionConfigure = KStdAction::preferences (TQT_TQOBJECT(this), TQT_SLOT (slotConfigure ()), ac); enableSettingsMenuDocumentActions (false); @@ -168,9 +168,9 @@ void kpMainWindow::slotConfigureToolBars () //saveMainWindowSettings (kapp->config (), autoSaveGroup ()); KEditToolbar dialog (actionCollection (), - TQString::null/*default ui.rc file*/, + TQString()/*default ui.rc file*/, true/*global resource*/, - this/*parent*/); + this/*tqparent*/); // Clicking on OK after Apply brings up the dialog (below) again. // Bug with KEditToolBar. dialog.showButtonApply (false); @@ -195,7 +195,7 @@ void kpMainWindow::slotNewToolBarConfig () KMessageBox::information (this, i18n ("You have to restart KolourPaint for these changes to take effect."), i18n ("Toolbar Settings Changed"), - TQString::fromLatin1 ("ToolBarSettingsChanged")); + TQString::tqfromLatin1 ("ToolBarSettingsChanged")); //createGUI(); //applyMainWindowSettings (kapp->config (), autoSaveGroup ()); diff --git a/kolourpaint/kpmainwindow_statusbar.cpp b/kolourpaint/kpmainwindow_statusbar.cpp index ba3b8702..bc1bc296 100644 --- a/kolourpaint/kpmainwindow_statusbar.cpp +++ b/kolourpaint/kpmainwindow_statusbar.cpp @@ -56,7 +56,7 @@ void kpMainWindow::addPermanentStatusBarItem (int id, int maxTextLen) maxTextLen); //+ 2/*spaces on either side*/); sb->insertFixedItem (textWithMaxLen, id, true/*permanent, place on the right*/); - sb->changeItem (TQString::null, id); + sb->changeItem (TQString(), id); } // private @@ -67,8 +67,8 @@ void kpMainWindow::createStatusBar () // 9999 pixels "ought to be enough for anybody" const int maxDimenLength = 4; - //sb->insertItem (TQString::null, StatusBarItemMessage, 1/*stretch*/); - //sb->setItemAlignment (StatusBarItemMessage, Qt::AlignLeft | Qt::AlignVCenter); + //sb->insertItem (TQString(), StatusBarItemMessage, 1/*stretch*/); + //sb->setItemAlignment (StatusBarItemMessage, TQt::AlignLeft | TQt::AlignVCenter); m_statusBarMessageLabel = new kpSqueezedTextLabel (sb); //m_statusBarMessageLabel->setShowEllipsis (false); @@ -137,7 +137,7 @@ void kpMainWindow::setStatusBarShapePoints (const TQPoint &startPoint, if (startPoint == KP_INVALID_POINT) { - statusBar ()->changeItem (TQString::null, StatusBarItemShapePoints); + statusBar ()->changeItem (TQString(), StatusBarItemShapePoints); } else if (endPoint == KP_INVALID_POINT) { @@ -185,7 +185,7 @@ void kpMainWindow::setStatusBarShapeSize (const TQSize &size) if (size == KP_INVALID_SIZE) { - statusBar ()->changeItem (TQString::null, StatusBarItemShapeSize); + statusBar ()->changeItem (TQString(), StatusBarItemShapeSize); } else { @@ -214,7 +214,7 @@ void kpMainWindow::setStatusBarDocSize (const TQSize &size) if (size == KP_INVALID_SIZE) { - statusBar ()->changeItem (TQString::null, StatusBarItemDocSize); + statusBar ()->changeItem (TQString(), StatusBarItemDocSize); } else { @@ -240,7 +240,7 @@ void kpMainWindow::setStatusBarDocDepth (int depth) if (depth <= 0) { - statusBar ()->changeItem (TQString::null, StatusBarItemDocDepth); + statusBar ()->changeItem (TQString(), StatusBarItemDocDepth); } else { @@ -264,7 +264,7 @@ void kpMainWindow::setStatusBarZoom (int zoom) if (zoom <= 0) { - statusBar ()->changeItem (TQString::null, StatusBarItemZoom); + statusBar ()->changeItem (TQString(), StatusBarItemZoom); } else { @@ -289,7 +289,7 @@ void kpMainWindow::recalculateStatusBarMessage () #endif // HACK: To work around kpViewScrollableContainer's unreliable - // status messages (which in turn is due to Qt not updating + // status messages (which in turn is due to TQt not updating // TQWidget::hasMouse() on drags and we needing to hack around it) if (!scrollViewMessage.isEmpty () && m_scrollView->newDocSize ().isEmpty () && @@ -303,7 +303,7 @@ void kpMainWindow::recalculateStatusBarMessage () m_scrollView->clearStatusMessage (); m_scrollView->blockSignals (false); - scrollViewMessage = TQString::null; + scrollViewMessage = TQString(); #if DEBUG_STATUS_BAR && 1 kdDebug () << "\t\t\tdone" << endl; #endif diff --git a/kolourpaint/kpmainwindow_text.cpp b/kolourpaint/kpmainwindow_text.cpp index 233ba5b5..859e33f0 100644 --- a/kolourpaint/kpmainwindow_text.cpp +++ b/kolourpaint/kpmainwindow_text.cpp @@ -50,22 +50,22 @@ void kpMainWindow::setupTextToolBarActions () KActionCollection *ac = actionCollection (); m_actionTextFontFamily = new KFontAction (i18n ("Font Family"), 0/*shortcut*/, - this, TQT_SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family"); m_actionTextFontSize = new KFontSizeAction (i18n ("Font Size"), 0/*shortcut*/, - this, TQT_SLOT (slotTextFontSizeChanged ()), ac, "text_font_size"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextFontSizeChanged ()), ac, "text_font_size"); m_actionTextBold = new KToggleAction (i18n ("Bold"), "text_bold"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextBoldChanged ()), ac, "text_bold"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextBoldChanged ()), ac, "text_bold"); m_actionTextItalic = new KToggleAction (i18n ("Italic"), "text_italic"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextItalicChanged ()), ac, "text_italic"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextItalicChanged ()), ac, "text_italic"); m_actionTextUnderline = new KToggleAction (i18n ("Underline"), "text_under"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextUnderlineChanged ()), ac, "text_underline"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextUnderlineChanged ()), ac, "text_underline"); m_actionTextStrikeThru = new KToggleAction (i18n ("Strike Through"), "text_strike"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextStrikeThruChanged ()), ac, "text_strike_thru"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextStrikeThruChanged ()), ac, "text_strike_thru"); readAndApplyTextSettings (); @@ -80,7 +80,7 @@ void kpMainWindow::readAndApplyTextSettings () KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupText); KConfigBase *cfg = cfgGroupSaver.config (); - m_actionTextFontFamily->setFont (cfg->readEntry (kpSettingFontFamily, TQString::fromLatin1 ("Times"))); + m_actionTextFontFamily->setFont (cfg->readEntry (kpSettingFontFamily, TQString::tqfromLatin1 ("Times"))); m_actionTextFontSize->setFontSize (cfg->readNumEntry (kpSettingFontSize, 14)); m_actionTextBold->setChecked (cfg->readBoolEntry (kpSettingBold, false)); m_actionTextItalic->setChecked (cfg->readBoolEntry (kpSettingItalic, false)); diff --git a/kolourpaint/kpmainwindow_tools.cpp b/kolourpaint/kpmainwindow_tools.cpp index de48e1df..e4832f59 100644 --- a/kolourpaint/kpmainwindow_tools.cpp +++ b/kolourpaint/kpmainwindow_tools.cpp @@ -102,24 +102,24 @@ void kpMainWindow::setupToolActions () m_actionPrevToolOptionGroup1 = new kpSingleKeyTriggersAction ( i18n ("Previous Tool Option (Group #1)"), - kpTool::shortcutForKey (Qt::Key_1), - this, TQT_SLOT (slotActionPrevToolOptionGroup1 ()), + kpTool::shortcutForKey (TQt::Key_1), + TQT_TQOBJECT(this), TQT_SLOT (slotActionPrevToolOptionGroup1 ()), ac, "prev_tool_option_group_1"); m_actionNextToolOptionGroup1 = new kpSingleKeyTriggersAction ( i18n ("Next Tool Option (Group #1)"), - kpTool::shortcutForKey (Qt::Key_2), - this, TQT_SLOT (slotActionNextToolOptionGroup1 ()), + kpTool::shortcutForKey (TQt::Key_2), + TQT_TQOBJECT(this), TQT_SLOT (slotActionNextToolOptionGroup1 ()), ac, "next_tool_option_group_1"); m_actionPrevToolOptionGroup2 = new kpSingleKeyTriggersAction ( i18n ("Previous Tool Option (Group #2)"), - kpTool::shortcutForKey (Qt::Key_3), - this, TQT_SLOT (slotActionPrevToolOptionGroup2 ()), + kpTool::shortcutForKey (TQt::Key_3), + TQT_TQOBJECT(this), TQT_SLOT (slotActionPrevToolOptionGroup2 ()), ac, "prev_tool_option_group_2"); m_actionNextToolOptionGroup2 = new kpSingleKeyTriggersAction ( i18n ("Next Tool Option (Group #2)"), - kpTool::shortcutForKey (Qt::Key_4), - this, TQT_SLOT (slotActionNextToolOptionGroup2 ()), + kpTool::shortcutForKey (TQt::Key_4), + TQT_TQOBJECT(this), TQT_SLOT (slotActionNextToolOptionGroup2 ()), ac, "next_tool_option_group_2"); } @@ -289,7 +289,7 @@ void kpMainWindow::setSelectionTransparency (const kpSelectionTransparency &tran { #if DEBUG_KP_MAIN_WINDOW && 1 kdDebug () << "kpMainWindow::setSelectionTransparency() isOpaque=" << transparency.isOpaque () - << " color=" << (transparency.transparentColor ().isValid () ? (int *) transparency.transparentColor ().toQRgb () : 0) + << " color=" << (transparency.transparentColor ().isValid () ? (int *) transparency.transparentColor ().toTQRgb () : 0) << " forceColorChange=" << forceColorChange << endl; #endif diff --git a/kolourpaint/kpmainwindow_view.cpp b/kolourpaint/kpmainwindow_view.cpp index 5459f1a7..b1fbdf67 100644 --- a/kolourpaint/kpmainwindow_view.cpp +++ b/kolourpaint/kpmainwindow_view.cpp @@ -67,18 +67,18 @@ void kpMainWindow::setupViewMenuActions () m_actionFullScreen->setEnabled (false);*/ - m_actionActualSize = KStdAction::actualSize (this, TQT_SLOT (slotActualSize ()), ac); - /*m_actionFitToPage = KStdAction::fitToPage (this, TQT_SLOT (slotFitToPage ()), ac); - m_actionFitToWidth = KStdAction::fitToWidth (this, TQT_SLOT (slotFitToWidth ()), ac); - m_actionFitToHeight = KStdAction::fitToHeight (this, TQT_SLOT (slotFitToHeight ()), ac);*/ + m_actionActualSize = KStdAction::actualSize (TQT_TQOBJECT(this), TQT_SLOT (slotActualSize ()), ac); + /*m_actionFitToPage = KStdAction::fitToPage (TQT_TQOBJECT(this), TQT_SLOT (slotFitToPage ()), ac); + m_actionFitToWidth = KStdAction::fitToWidth (TQT_TQOBJECT(this), TQT_SLOT (slotFitToWidth ()), ac); + m_actionFitToHeight = KStdAction::fitToHeight (TQT_TQOBJECT(this), TQT_SLOT (slotFitToHeight ()), ac);*/ - m_actionZoomIn = KStdAction::zoomIn (this, TQT_SLOT (slotZoomIn ()), ac); - m_actionZoomOut = KStdAction::zoomOut (this, TQT_SLOT (slotZoomOut ()), ac); + m_actionZoomIn = KStdAction::zoomIn (TQT_TQOBJECT(this), TQT_SLOT (slotZoomIn ()), ac); + m_actionZoomOut = KStdAction::zoomOut (TQT_TQOBJECT(this), TQT_SLOT (slotZoomOut ()), ac); m_actionZoom = new KSelectAction (i18n ("&Zoom"), 0, - this, TQT_SLOT (slotZoom ()), actionCollection (), "view_zoom_to"); + TQT_TQOBJECT(this), TQT_SLOT (slotZoom ()), actionCollection (), "view_zoom_to"); m_actionZoom->setEditable (true); // create the zoom list for the 1st call to zoomTo() below @@ -91,7 +91,7 @@ void kpMainWindow::setupViewMenuActions () m_actionShowGrid = new KToggleAction (i18n ("Show &Grid"), CTRL + Key_G, - this, TQT_SLOT (slotShowGridToggled ()), actionCollection (), "view_show_grid"); + TQT_TQOBJECT(this), TQT_SLOT (slotShowGridToggled ()), actionCollection (), "view_show_grid"); m_actionShowGrid->setCheckedState (i18n ("Hide &Grid")); @@ -99,12 +99,12 @@ void kpMainWindow::setupViewMenuActions () // Testcase: Press CTRL+H twice on a fresh KolourPaint. // The second CTRL+H doesn't close the thumbnail. m_actionShowThumbnail = new KToggleAction (i18n ("Show T&humbnail"), CTRL + Key_H, - this, TQT_SLOT (slotShowThumbnailToggled ()), actionCollection (), "view_show_thumbnail"); + TQT_TQOBJECT(this), TQT_SLOT (slotShowThumbnailToggled ()), actionCollection (), "view_show_thumbnail"); m_actionShowThumbnail->setCheckedState (i18n ("Hide T&humbnail")); // Please do not use setCheckedState() here - it wouldn't make sense m_actionZoomedThumbnail = new KToggleAction (i18n ("Zoo&med Thumbnail Mode"), 0, - this, TQT_SLOT (slotZoomedThumbnailToggled ()), actionCollection (), "view_zoomed_thumbnail"); + TQT_TQOBJECT(this), TQT_SLOT (slotZoomedThumbnailToggled ()), actionCollection (), "view_zoomed_thumbnail"); // For consistency with the above action, don't use setCheckedState() // @@ -114,7 +114,7 @@ void kpMainWindow::setupViewMenuActions () d->m_actionShowThumbnailRectangle = new KToggleAction ( i18n ("Enable Thumbnail &Rectangle"), 0, - this, TQT_SLOT (slotThumbnailShowRectangleToggled ()), + TQT_TQOBJECT(this), TQT_SLOT (slotThumbnailShowRectangleToggled ()), actionCollection (), "view_show_thumbnail_rectangle"); @@ -238,7 +238,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) "results in imprecise editing and redraw glitches.\n" "Do you really want to set to zoom level to %1%?") .arg (zoomLevel), - TQString::null/*caption*/, + TQString()/*caption*/, i18n ("Set Zoom Level to %1%").arg (zoomLevel), "DoNotAskAgain_ZoomLevelNotMultipleOf100") != KMessageBox::Continue) { @@ -289,7 +289,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) // Ordinary flicker is better than the whole view moving TQPainter p (m_mainView); p.fillRect (m_mainView->rect (), - m_scrollView->viewport ()->colorGroup ().background ()); + m_scrollView->viewport ()->tqcolorGroup ().background ()); } } @@ -311,7 +311,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) << endl; #endif - // TODO: when changing from no scrollbars to scrollbars, Qt lies about + // TODO: when changing from no scrollbars to scrollbars, TQt lies about // visibleWidth() & visibleHeight() (doesn't take into account the // space taken by the would-be scrollbars) until it updates the // scrollview; hence the centring is off by about 5-10 pixels. @@ -344,10 +344,10 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) else { viewX = m_scrollView->contentsX () + - QMIN (m_mainView->width (), + TQMIN (m_mainView->width (), m_scrollView->visibleWidth ()) / 2; viewY = m_scrollView->contentsY () + - QMIN (m_mainView->height (), + TQMIN (m_mainView->height (), m_scrollView->visibleHeight ()) / 2; } @@ -404,7 +404,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) << endl; #endif - if (vuc->clipRegion ().contains (viewPoint)) + if (vuc->clipRegion ().tqcontains (viewPoint)) { const TQPoint globalPoint = kpWidgetMapper::toGlobal (vuc, viewPoint); @@ -505,13 +505,13 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) #endif #endif - // HACK: make sure all of Qt's update() calls trigger + // HACK: make sure all of TQt's update() calls trigger // kpView::paintEvent() _now_ so that they can be queued by us // (until kpViewManager::restoreQueueUpdates()) to reduce flicker // caused mainly by m_scrollView->center() // // TODO: remove flicker completely - //TQTimer::singleShot (0, this, TQT_SLOT (finishZoomTo ())); + //TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT (finishZoomTo ())); // Later: I don't think there is an update() that needs to be queued // - let's reduce latency instead. @@ -626,7 +626,7 @@ void kpMainWindow::slotFitToPage () // doc_height * zoom / 100 <= view_height && // 1 <= zoom <= 3200 - zoomTo (QMIN (3200, QMAX (1, QMIN (m_scrollView->visibleWidth () * 100 / m_document->width (), + zoomTo (TQMIN (3200, TQMAX (1, TQMIN (m_scrollView->visibleWidth () * 100 / m_document->width (), m_scrollView->visibleHeight () * 100 / m_document->height ())))); } @@ -639,7 +639,7 @@ void kpMainWindow::slotFitToWidth () // doc_width * zoom / 100 <= view_width && // 1 <= zoom <= 3200 - zoomTo (QMIN (3200, QMAX (1, m_scrollView->visibleWidth () * 100 / m_document->width ()))); + zoomTo (TQMIN (3200, TQMAX (1, m_scrollView->visibleWidth () * 100 / m_document->width ()))); } // private slot @@ -651,7 +651,7 @@ void kpMainWindow::slotFitToHeight () // doc_height * zoom / 100 <= view_height && // 1 <= zoom <= 3200 - zoomTo (QMIN (3200, QMAX (1, m_scrollView->visibleHeight () * 100 / m_document->height ()))); + zoomTo (TQMIN (3200, TQMAX (1, m_scrollView->visibleHeight () * 100 / m_document->height ()))); } @@ -823,7 +823,7 @@ void kpMainWindow::notifyThumbnailGeometryChanged () { m_thumbnailSaveConfigTimer = new TQTimer (this); connect (m_thumbnailSaveConfigTimer, TQT_SIGNAL (timeout ()), - this, TQT_SLOT (slotSaveThumbnailGeometry ())); + TQT_TQOBJECT(this), TQT_SLOT (slotSaveThumbnailGeometry ())); } m_thumbnailSaveConfigTimer->start (500/*msec*/, true/*single shot*/); @@ -842,13 +842,13 @@ void kpMainWindow::slotSaveThumbnailGeometry () TQRect rect (m_thumbnail->x (), m_thumbnail->y (), m_thumbnail->width (), m_thumbnail->height ()); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\tthumbnail relative geometry=" << rect << endl; + kdDebug () << "\tthumbnail relative tqgeometry=" << rect << endl; #endif m_configThumbnailGeometry = mapFromGlobal (rect); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\tCONFIG: saving thumbnail geometry " + kdDebug () << "\tCONFIG: saving thumbnail tqgeometry " << m_configThumbnailGeometry << endl; #endif @@ -1067,11 +1067,11 @@ void kpMainWindow::updateThumbnail () kdDebug () << "\tcreating thumbnail" << endl; #endif - // Read last saved geometry before creating thumbnail & friends + // Read last saved tqgeometry before creating thumbnail & friends // in case they call notifyThumbnailGeometryChanged() TQRect thumbnailGeometry = m_configThumbnailGeometry; #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\t\tlast used geometry=" << thumbnailGeometry << endl; + kdDebug () << "\t\tlast used tqgeometry=" << thumbnailGeometry << endl; #endif m_thumbnail = new kpThumbnail (this, "thumbnail"); @@ -1084,9 +1084,9 @@ void kpMainWindow::updateThumbnail () if (!thumbnailGeometry.isEmpty () && TQRect (0, 0, width (), height ()).intersects (thumbnailGeometry)) { - const TQRect geometry = mapToGlobal (thumbnailGeometry); - m_thumbnail->resize (geometry.size ()); - m_thumbnail->move (geometry.topLeft ()); + const TQRect tqgeometry = mapToGlobal (thumbnailGeometry); + m_thumbnail->resize (tqgeometry.size ()); + m_thumbnail->move (tqgeometry.topLeft ()); } else { @@ -1095,21 +1095,21 @@ void kpMainWindow::updateThumbnail () const int margin = 20; const int initialWidth = 160, initialHeight = 120; - TQRect geometryRect (width () - initialWidth - margin * 2, + TQRect tqgeometryRect (width () - initialWidth - margin * 2, m_scrollView->y () + margin, initialWidth, initialHeight); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\t\tcreating geometry=" << geometryRect << endl; + kdDebug () << "\t\tcreating tqgeometry=" << tqgeometryRect << endl; #endif - geometryRect = mapToGlobal (geometryRect); + tqgeometryRect = mapToGlobal (tqgeometryRect); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\t\tmap to global=" << geometryRect << endl; + kdDebug () << "\t\tmap to global=" << tqgeometryRect << endl; #endif - m_thumbnail->resize (geometryRect.size ()); - m_thumbnail->move (geometryRect.topLeft ()); + m_thumbnail->resize (tqgeometryRect.size ()); + m_thumbnail->move (tqgeometryRect.topLeft ()); } } @@ -1122,7 +1122,7 @@ void kpMainWindow::updateThumbnail () kdDebug () << "\t\tconnecting thumbnail::visibilityChange to destroy slot" << endl; #endif connect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)), - this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\t\tDONE" << endl; #endif @@ -1144,7 +1144,7 @@ void kpMainWindow::updateThumbnail () disconnect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)), - this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); m_thumbnail->deleteLater (); m_thumbnail = 0; } diff --git a/kolourpaint/kpselection.cpp b/kolourpaint/kpselection.cpp index 728fbad9..8947f8d0 100644 --- a/kolourpaint/kpselection.cpp +++ b/kolourpaint/kpselection.cpp @@ -337,11 +337,11 @@ int kpSelection::size () const // public -TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const +TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const { if (!m_rect.isValid ()) { - kdError () << "kpSelection::maskForOwnType() boundingRect invalid" << endl; + kdError () << "kpSelection::tqmaskForOwnType() boundingRect invalid" << endl; return TQBitmap (); } @@ -351,19 +351,19 @@ TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const if (nullForRectangular) return TQBitmap (); - TQBitmap maskBitmap (m_rect.width (), m_rect.height ()); - maskBitmap.fill (Qt::color1/*opaque*/); - return maskBitmap; + TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ()); + tqmaskBitmap.fill (TQt::color1/*opaque*/); + return tqmaskBitmap; } - TQBitmap maskBitmap (m_rect.width (), m_rect.height ()); - maskBitmap.fill (Qt::color0/*transparent*/); + TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ()); + tqmaskBitmap.fill (TQt::color0/*transparent*/); TQPainter painter; - painter.begin (&maskBitmap); - painter.setPen (Qt::color1)/*opaque*/; - painter.setBrush (Qt::color1/*opaque*/); + painter.begin (&tqmaskBitmap); + painter.setPen (TQt::color1)/*opaque*/; + painter.setBrush (TQt::color1/*opaque*/); if (m_type == kpSelection::Ellipse) painter.drawEllipse (0, 0, m_rect.width (), m_rect.height ()); @@ -373,13 +373,13 @@ TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const points.detach (); points.translate (-m_rect.x (), -m_rect.y ()); - painter.drawPolygon (points, false/*even-odd algo*/); + painter.tqdrawPolygon (points, false/*even-odd algo*/); } painter.end (); - return maskBitmap; + return tqmaskBitmap; } @@ -490,18 +490,18 @@ int kpSelection::height () const } // public -bool kpSelection::contains (const TQPoint &point) const +bool kpSelection::tqcontains (const TQPoint &point) const { TQRect rect = boundingRect (); #if DEBUG_KP_SELECTION && 1 - kdDebug () << "kpSelection::contains(" << point + kdDebug () << "kpSelection::tqcontains(" << point << ") rect==" << rect << " #points=" << m_points.size () << endl; #endif - if (!rect.contains (point)) + if (!rect.tqcontains (point)) return false; // OPT: TQRegion is probably incredibly slow - cache @@ -514,20 +514,20 @@ bool kpSelection::contains (const TQPoint &point) const case kpSelection::Text: return true; case kpSelection::Ellipse: - return TQRegion (m_rect, TQRegion::Ellipse).contains (point); + return TQRegion (m_rect, TQRegion::Ellipse).tqcontains (point); case kpSelection::Points: // TODO: make this always include the border // (draw up a rect sel in this mode to see what I mean) - return TQRegion (m_points, false/*even-odd algo*/).contains (point); + return TQRegion (m_points, false/*even-odd algo*/).tqcontains (point); default: return false; } } // public -bool kpSelection::contains (int x, int y) +bool kpSelection::tqcontains (int x, int y) { - return contains (TQPoint (x, y)); + return tqcontains (TQPoint (x, y)); } @@ -606,20 +606,20 @@ static int mostContrastingValue (int val) return 0; } -static QRgb mostContrastingRGB (QRgb val) +static TQRgb mostContrastingRGB (TQRgb val) { - return qRgba (mostContrastingValue (qRed (val)), - mostContrastingValue (qGreen (val)), - mostContrastingValue (qBlue (val)), - mostContrastingValue (qAlpha (val))); + return tqRgba (mostContrastingValue (tqRed (val)), + mostContrastingValue (tqGreen (val)), + mostContrastingValue (tqBlue (val)), + mostContrastingValue (tqAlpha (val))); } // private -static void drawTextLines (TQPainter *painter, TQPainter *maskPainter, +static void drawTextLines (TQPainter *painter, TQPainter *tqmaskPainter, const TQRect &rect, const TQValueVector &textLines) { - if (!painter->clipRegion ().isEmpty () || !maskPainter->clipRegion ().isEmpty ()) + if (!painter->clipRegion ().isEmpty () || !tqmaskPainter->clipRegion ().isEmpty ()) { // TODO: fix esp. before making method public kdError () << "kpselection.cpp:drawTextLines() can't deal with existing painter clip regions" << endl; @@ -632,8 +632,8 @@ static void drawTextLines (TQPainter *painter, TQPainter *maskPainter, if (painter->isActive ()) \ painter->cmd; \ \ - if (maskPainter->isActive ()) \ - maskPainter->cmd; \ + if (tqmaskPainter->isActive ()) \ + tqmaskPainter->cmd; \ } @@ -685,7 +685,7 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) TQBitmap destPixmapMask; TQPainter destPixmapPainter, destPixmapMaskPainter; - if (destPixmap->mask ()) + if (destPixmap->tqmask ()) { if (m_textStyle.effectiveBackgroundColor ().isTransparent ()) { @@ -698,19 +698,19 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) modifyingRectRelPixmap, kpPixmapFX::pixmapWithDefinedTransparentPixels ( kpPixmapFX::getPixmapAt (*destPixmap, modifyingRectRelPixmap), - m_textStyle.foregroundColor ().toQColor ())); + m_textStyle.foregroundColor ().toTQColor ())); } - destPixmapMask = *destPixmap->mask (); + destPixmapMask = *destPixmap->tqmask (); destPixmapMaskPainter.begin (&destPixmapMask); destPixmapMaskPainter.translate (-docRect.x (), -docRect.y ()); - destPixmapMaskPainter.setPen (Qt::color1/*opaque*/); + destPixmapMaskPainter.setPen (TQt::color1/*opaque*/); destPixmapMaskPainter.setFont (m_textStyle.font ()); } destPixmapPainter.begin (destPixmap); destPixmapPainter.translate (-docRect.x (), -docRect.y ()); - destPixmapPainter.setPen (m_textStyle.foregroundColor ().toQColor ()); + destPixmapPainter.setPen (m_textStyle.foregroundColor ().toTQColor ()); destPixmapPainter.setFont (m_textStyle.font ()); @@ -718,13 +718,13 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) { destPixmapPainter.fillRect ( boundingRect (), - m_textStyle.effectiveBackgroundColor ().toQColor ()); + m_textStyle.effectiveBackgroundColor ().toTQColor ()); if (destPixmapMaskPainter.isActive ()) { destPixmapMaskPainter.fillRect ( boundingRect (), - Qt::color1/*opaque*/); + TQt::color1/*opaque*/); } } @@ -759,7 +759,7 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const // Iron out stupid case first if (m_textStyle.effectiveBackgroundColor ().isTransparent ()) { - pixmapMask.fill (Qt::color0/*transparent*/); + pixmapMask.fill (TQt::color0/*transparent*/); pixmap.setMask (pixmapMask); return pixmap; } @@ -775,22 +775,22 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const TQPainter pixmapPainter, pixmapMaskPainter; - pixmap.fill (m_textStyle.effectiveBackgroundColor ().toQColor ()); + pixmap.fill (m_textStyle.effectiveBackgroundColor ().toTQColor ()); pixmapPainter.begin (&pixmap); // HACK: Transparent foreground colour + antialiased fonts don't // work - they don't seem to be able to draw in - // Qt::color0/*transparent*/ (but Qt::color1 seems Ok). + // TQt::color0/*transparent*/ (but TQt::color1 seems Ok). // So we draw in a contrasting color to the background so that // we can identify the transparent pixels for manually creating - // the mask. + // the tqmask. pixmapPainter.setPen ( - TQColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toQRgb () & RGB_MASK))); + TQColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toTQRgb () & TQRGB_MASK))); pixmapPainter.setFont (font); - pixmapMask.fill (Qt::color1/*opaque*/); + pixmapMask.fill (TQt::color1/*opaque*/); pixmapMaskPainter.begin (&pixmapMask); - pixmapMaskPainter.setPen (Qt::color0/*transparent*/); + pixmapMaskPainter.setPen (TQt::color0/*transparent*/); pixmapMaskPainter.setFont (font); @@ -812,7 +812,7 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const kdDebug () << "\tinvoking foreground transparency hack" << endl; #endif TQImage image = kpPixmapFX::convertToImage (pixmap); - QRgb backgroundRGB = image.pixel (0, 0); // on textBorderSize() + TQRgb backgroundRGB = image.pixel (0, 0); // on textBorderSize() pixmapMaskPainter.begin (&pixmapMask); for (int y = 0; y < image.height (); y++) @@ -820,9 +820,9 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const for (int x = 0; x < image.width (); x++) { if (image.pixel (x, y) == backgroundRGB) - pixmapMaskPainter.setPen (Qt::color1/*opaque*/); + pixmapMaskPainter.setPen (TQt::color1/*opaque*/); else - pixmapMaskPainter.setPen (Qt::color0/*transparent*/); + pixmapMaskPainter.setPen (TQt::color0/*transparent*/); pixmapMaskPainter.drawPoint (x, y); } @@ -853,9 +853,9 @@ void kpSelection::paint (TQPixmap *destPixmap, const TQRect &docRect) const { #if DEBUG_KP_SELECTION kdDebug () << "kpSelection::paint() textStyle: fcol=" - << (int *) m_textStyle.foregroundColor ().toQRgb () + << (int *) m_textStyle.foregroundColor ().toTQRgb () << " bcol=" - << (int *) m_textStyle.effectiveBackgroundColor ().toQRgb () + << (int *) m_textStyle.effectiveBackgroundColor ().toTQRgb () << endl; #endif @@ -913,7 +913,7 @@ void kpSelection::calculateTextPixmap () TQString kpSelection::textForTextLines (const TQValueVector &textLines_) { if (textLines_.isEmpty ()) - return TQString::null; + return TQString(); TQString bigString = textLines_ [0]; @@ -921,7 +921,7 @@ TQString kpSelection::textForTextLines (const TQValueVector &textLine it != textLines_.end (); it++) { - bigString += TQString::fromLatin1 ("\n"); + bigString += TQString::tqfromLatin1 ("\n"); bigString += (*it); } @@ -933,7 +933,7 @@ TQString kpSelection::text () const { if (!isText ()) { - return TQString::null; + return TQString(); } return textForTextLines (m_textLines); @@ -964,7 +964,7 @@ void kpSelection::setTextLines (const TQValueVector &textLines_) if (m_textLines.isEmpty ()) { kdError () << "kpSelection::setTextLines() passed no lines" << endl; - m_textLines.push_back (TQString::null); + m_textLines.push_back (TQString()); } calculateTextPixmap (); emit changed (boundingRect ()); @@ -1000,7 +1000,7 @@ bool kpSelection::pointIsInTextBorderArea (const TQPoint &globalPoint) const return false; } - return (m_rect.contains (globalPoint) && !pointIsInTextArea (globalPoint)); + return (m_rect.tqcontains (globalPoint) && !pointIsInTextArea (globalPoint)); } // public @@ -1012,7 +1012,7 @@ bool kpSelection::pointIsInTextArea (const TQPoint &globalPoint) const return false; } - return textAreaRect ().contains (globalPoint); + return textAreaRect ().tqcontains (globalPoint); } @@ -1049,7 +1049,7 @@ int kpSelection::minimumHeightForTextStyle (const kpTextStyle &) } // public static -TQSize kpSelection::minimumSizeForTextStyle (const kpTextStyle &textStyle) +TQSize kpSelection::tqminimumSizeForTextStyle (const kpTextStyle &textStyle) { return TQSize (minimumWidthForTextStyle (textStyle), minimumHeightForTextStyle (textStyle)); @@ -1061,14 +1061,14 @@ int kpSelection::preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle { const int about15CharsWidth = textStyle.fontMetrics ().width ( - TQString::fromLatin1 ("1234567890abcde")); + TQString::tqfromLatin1 ("1234567890abcde")); const int preferredMinWidth = - QMAX (150, + TQMAX (150, textBorderSize () * 2 + about15CharsWidth); - return QMAX (minimumWidthForTextStyle (textStyle), - QMIN (250, preferredMinWidth)); + return TQMAX (minimumWidthForTextStyle (textStyle), + TQMIN (250, preferredMinWidth)); } // public static @@ -1077,8 +1077,8 @@ int kpSelection::preferredMinimumHeightForTextStyle (const kpTextStyle &textStyl const int preferredMinHeight = textBorderSize () * 2 + textStyle.fontMetrics ().height (); - return QMAX (minimumHeightForTextStyle (textStyle), - QMIN (150, preferredMinHeight)); + return TQMAX (minimumHeightForTextStyle (textStyle), + TQMIN (150, preferredMinHeight)); } // public static @@ -1108,7 +1108,7 @@ int kpSelection::minimumHeight () const } // public -TQSize kpSelection::minimumSize () const +TQSize kpSelection::tqminimumSize () const { return TQSize (minimumWidth (), minimumHeight ()); } @@ -1252,7 +1252,7 @@ void kpSelection::calculateTransparencyMask () if (isText ()) { #if DEBUG_KP_SELECTION - kdDebug () << "\ttext - no need for transparency mask" << endl; + kdDebug () << "\ttext - no need for transparency tqmask" << endl; #endif m_transparencyMask.resize (0, 0); return; @@ -1261,7 +1261,7 @@ void kpSelection::calculateTransparencyMask () if (!m_pixmap) { #if DEBUG_KP_SELECTION - kdDebug () << "\tno pixmap - no need for transparency mask" << endl; + kdDebug () << "\tno pixmap - no need for transparency tqmask" << endl; #endif m_transparencyMask.resize (0, 0); return; @@ -1270,7 +1270,7 @@ void kpSelection::calculateTransparencyMask () if (m_transparency.isOpaque ()) { #if DEBUG_KP_SELECTION - kdDebug () << "\topaque - no need for transparency mask" << endl; + kdDebug () << "\topaque - no need for transparency tqmask" << endl; #endif m_transparencyMask.resize (0, 0); return; @@ -1289,12 +1289,12 @@ void kpSelection::calculateTransparencyMask () if (kpPixmapFX::getColorAtPixel (image, x, y).isSimilarTo (m_transparency.transparentColor (), m_transparency.processedColorSimilarity ())) { - transparencyMaskPainter.setPen (Qt::color1/*make it transparent*/); + transparencyMaskPainter.setPen (TQt::color1/*make it transparent*/); hasTransparent = true; } else { - transparencyMaskPainter.setPen (Qt::color0/*keep pixel as is*/); + transparencyMaskPainter.setPen (TQt::color0/*keep pixel as is*/); } transparencyMaskPainter.drawPoint (x, y); @@ -1373,8 +1373,8 @@ bool kpSelection::setTransparency (const kpSelectionTransparency &transparency, { #if DEBUG_KP_SELECTION kdDebug () << "\tdiffer at " << TQPoint (x, y) - << " old=" << (int *) kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toQRgb () - << " new=" << (int *) kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toQRgb () + << " old=" << (int *) kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toTQRgb () + << " new=" << (int *) kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toTQRgb () << endl; #endif changed = true; @@ -1433,9 +1433,9 @@ void kpSelection::flip (bool horiz, bool vert) if (!m_transparencyMask.isNull ()) { #if DEBUG_KP_SELECTION && 1 - kdDebug () << "\thave transparency mask - flipping that" << endl; + kdDebug () << "\thave transparency tqmask - flipping that" << endl; #endif - kpPixmapFX::flip (&m_transparencyMask, horiz, vert); + kpPixmapFX::flip (TQT_TQPIXMAP(&m_transparencyMask), horiz, vert); } diff --git a/kolourpaint/kpselection.h b/kolourpaint/kpselection.h index b99f5cb9..e7e54d54 100644 --- a/kolourpaint/kpselection.h +++ b/kolourpaint/kpselection.h @@ -52,9 +52,10 @@ class TQSize; * Holds a selection - will also be used for the clipboard * so that we can retain the border. */ -class kpSelection : public QObject +class kpSelection : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Type @@ -102,7 +103,7 @@ public: int size () const; - TQBitmap maskForOwnType (bool nullForRectangular = false) const; + TQBitmap tqmaskForOwnType (bool nullForRectangular = false) const; // synonyms TQPoint topLeft () const; @@ -126,8 +127,8 @@ public: // (for non-rectangular selections, may return false even if // kpView::onSelectionResizeHandle()) - bool contains (const TQPoint &point) const; - bool contains (int x, int y); + bool tqcontains (const TQPoint &point) const; + bool tqcontains (int x, int y); // (Avoid using for text selections since text selection may @@ -168,7 +169,7 @@ public: // Be more robust when external enforcement fails. static int minimumWidthForTextStyle (const kpTextStyle &); static int minimumHeightForTextStyle (const kpTextStyle &); - static TQSize minimumSizeForTextStyle (const kpTextStyle &); + static TQSize tqminimumSizeForTextStyle (const kpTextStyle &); static int preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle); static int preferredMinimumHeightForTextStyle (const kpTextStyle &textStyle); @@ -176,7 +177,7 @@ public: int minimumWidth () const; int minimumHeight () const; - TQSize minimumSize () const; + TQSize tqminimumSize () const; int textRowForPoint (const TQPoint &globalPoint) const; int textColForPoint (const TQPoint &globalPoint) const; diff --git a/kolourpaint/kpselectiondrag.cpp b/kolourpaint/kpselectiondrag.cpp index 91ecf35c..22cdeb4a 100644 --- a/kolourpaint/kpselectiondrag.cpp +++ b/kolourpaint/kpselectiondrag.cpp @@ -74,7 +74,7 @@ void kpSelectionDrag::setSelection (const kpSelection &sel) m_selection = sel; - // OPT: an awful waste of memory storing image in both selection and QImage + // OPT: an awful waste of memory storing image in both selection and TQImage // HACK: need to set image else TQImageDrag::format() lies setImage (kpPixmapFX::convertToImage (*m_selection.pixmap ())); @@ -87,7 +87,7 @@ bool kpSelectionDrag::holdsSelection () const } -// public virtual [base QMimeSource] +// public virtual [base TQMimeSource] const char *kpSelectionDrag::format (int which) const { #if DEBUG_KP_SELECTION_DRAG && 0 @@ -97,7 +97,7 @@ const char *kpSelectionDrag::format (int which) const if (ret) { #if DEBUG_KP_SELECTION_DRAG && 0 - kdDebug () << "\tQImageDrag reports " << ret << endl; + kdDebug () << "\tTQImageDrag reports " << ret << endl; #endif return ret; } @@ -126,8 +126,8 @@ const char *kpSelectionDrag::format (int which) const } } -// public virtual [base QMimeSource] -// Don't need to override in Qt 3.2 (the TQMimeSource base will work) +// public virtual [base TQMimeSource] +// Don't need to override in TQt 3.2 (the TQMimeSource base will work) // but we do so just in case TQImageDrag later decides to override it. bool kpSelectionDrag::provides (const char *mimeType) const { @@ -142,11 +142,11 @@ bool kpSelectionDrag::provides (const char *mimeType) const TQImageDrag::provides (mimeType)); } -// public virtual [base QMimeSource] -TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const +// public virtual [base TQMimeSource] +TQByteArray kpSelectionDrag::tqencodedData (const char *mimeType) const { #if DEBUG_KP_SELECTION_DRAG - kdDebug () << "kpSelectionDrag::encodedData(" << mimeType << ")" << endl; + kdDebug () << "kpSelectionDrag::tqencodedData(" << mimeType << ")" << endl; #endif if (!mimeType) @@ -192,7 +192,7 @@ TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const } else { - kdError () << "kpSelectionDrag::encodedData(" << mimeType << ")" + kdError () << "kpSelectionDrag::tqencodedData(" << mimeType << ")" << " kpSelectionDrag(TQImage) could not decode data into TQImage" << endl; stream << kpSelection (); @@ -207,7 +207,7 @@ TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const kdDebug () << "\twant it as TQImage in TQByteArray" << endl; #endif - return TQImageDrag::encodedData (mimeType); + return TQImageDrag::tqencodedData (mimeType); } } @@ -255,10 +255,10 @@ bool kpSelectionDrag::decode (const TQMimeSource *e, kpSelection &sel, #if DEBUG_KP_SELECTION_DRAG kdDebug () << "\tmimeSource provides selection - just return it in TQByteArray" << endl; #endif - TQByteArray data = e->encodedData (kpSelectionDrag::selectionMimeType); + TQByteArray data = e->tqencodedData (kpSelectionDrag::selectionMimeType); TQDataStream stream (data, IO_ReadOnly); - // (no need for wali as kpSelection's by definition only support QPixmap's) + // (no need for wali as kpSelection's by definition only support TQPixmap's) stream >> sel; } else diff --git a/kolourpaint/kpselectiondrag.h b/kolourpaint/kpselectiondrag.h index e2b81e62..93473509 100644 --- a/kolourpaint/kpselectiondrag.h +++ b/kolourpaint/kpselectiondrag.h @@ -35,9 +35,10 @@ #include -class kpSelectionDrag : public QImageDrag +class kpSelectionDrag : public TQImageDrag { Q_OBJECT + TQ_OBJECT public: kpSelectionDrag (TQWidget *dragSource = 0, const char *name = 0); @@ -55,7 +56,7 @@ protected: public: virtual const char *format (int which = 0) const; virtual bool provides (const char *mimeType) const; - virtual TQByteArray encodedData (const char *mimeType) const; + virtual TQByteArray tqencodedData (const char *mimeType) const; static bool canDecode (const TQMimeSource *e); static bool decode (const TQMimeSource *e, TQImage &img); diff --git a/kolourpaint/kpselectiontransparency.cpp b/kolourpaint/kpselectiontransparency.cpp index 62919be4..f3fe062b 100644 --- a/kolourpaint/kpselectiontransparency.cpp +++ b/kolourpaint/kpselectiontransparency.cpp @@ -83,8 +83,8 @@ bool kpSelectionTransparency::operator== (const kpSelectionTransparency &rhs) co } #if DEBUG_KP_SELECTION_TRANSPARENCY && 0 - kdDebug () << "\tcolours: lhs=" << (int *) m_transparentColor.toQRgb () - << " rhs=" << (int *) rhs.m_transparentColor.toQRgb () + kdDebug () << "\tcolours: lhs=" << (int *) m_transparentColor.toTQRgb () + << " rhs=" << (int *) rhs.m_transparentColor.toTQRgb () << endl; kdDebug () << "\tcolour similarity: lhs=" << m_colorSimilarity << " rhs=" << rhs.m_colorSimilarity diff --git a/kolourpaint/kpsinglekeytriggersaction.cpp b/kolourpaint/kpsinglekeytriggersaction.cpp index 07573bf4..54e083c7 100644 --- a/kolourpaint/kpsinglekeytriggersaction.cpp +++ b/kolourpaint/kpsinglekeytriggersaction.cpp @@ -119,8 +119,8 @@ void kpSingleKeyTriggersActionInterface::enableSingleKeyTriggers (bool enable) kpSingleKeyTriggersAction::kpSingleKeyTriggersAction (const TQString &text, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name) - : KAction (text, shortcut, receiver, slot, parent, name) + KActionCollection *tqparent, const char *name) + : KAction (text, shortcut, receiver, slot, tqparent, name) { } diff --git a/kolourpaint/kpsinglekeytriggersaction.h b/kolourpaint/kpsinglekeytriggersaction.h index 2c1ddf3f..7b7001ff 100644 --- a/kolourpaint/kpsinglekeytriggersaction.h +++ b/kolourpaint/kpsinglekeytriggersaction.h @@ -60,12 +60,13 @@ class kpSingleKeyTriggersAction : public KAction, public kpSingleKeyTriggersActionInterface { Q_OBJECT + TQ_OBJECT public: kpSingleKeyTriggersAction (const TQString &text, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + KActionCollection *tqparent, const char *name); virtual ~kpSingleKeyTriggersAction (); diff --git a/kolourpaint/kptemppixmap.h b/kolourpaint/kptemppixmap.h index 2bd9d7bc..e66d622e 100644 --- a/kolourpaint/kptemppixmap.h +++ b/kolourpaint/kptemppixmap.h @@ -69,7 +69,7 @@ public: int height () const; - // Returns whether a call to paint() may change <*destPixmap>'s mask + // Returns whether a call to paint() may change <*destPixmap>'s tqmask bool mayChangeDocumentMask () const; /* diff --git a/kolourpaint/kpthumbnail.cpp b/kolourpaint/kpthumbnail.cpp index 5c57b12d..08a2331e 100644 --- a/kolourpaint/kpthumbnail.cpp +++ b/kolourpaint/kpthumbnail.cpp @@ -45,54 +45,36 @@ // TODO: get out of the Alt+Tab list -kpThumbnail::kpThumbnail (kpMainWindow *parent, const char *name) -#if KP_IS_QT_3_3 - : TQDockWindow (TQDockWindow::OutsideDock, parent, name), -#else // With Qt <3.3, OutsideDock requires parent = 0, - // sync: make sure outside of dock - : TQDockWindow (TQDockWindow::InDock, parent, name), - #warning "Using Qt <3.3: the thumbnail will flicker more when appearing" -#endif - m_mainWindow (parent), +kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name) + : TQDockWindow (TQDockWindow::OutsideDock, tqparent, name), + m_mainWindow (tqparent), m_view (0) { - if (!parent) - kdError () << "kpThumbnail::kpThumbnail() requires parent" << endl; - - -#if !KP_IS_QT_3_3 - if (parent) - { - hide (); - - // sync: make sure outside of dock - parent->moveDockWindow (this, Qt::DockTornOff); - } -#endif - + if (!tqparent) + kdError () << "kpThumbnail::kpThumbnail() requires tqparent" << endl; - if (parent) + if (tqparent) { // Prevent thumbnail from docking - it's _really_ irritating otherwise - parent->leftDock ()->setAcceptDockWindow (this, false); - parent->rightDock ()->setAcceptDockWindow (this, false); - parent->topDock ()->setAcceptDockWindow (this, false); - parent->bottomDock ()->setAcceptDockWindow (this, false); + tqparent->leftDock ()->setAcceptDockWindow (this, false); + tqparent->rightDock ()->setAcceptDockWindow (this, false); + tqparent->topDock ()->setAcceptDockWindow (this, false); + tqparent->bottomDock ()->setAcceptDockWindow (this, false); } - TQSize layoutMinimumSize = layout () ? layout ()->minimumSize () : TQSize (); + TQSize tqlayoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize (); #if DEBUG_KP_THUMBNAIL - kdDebug () << "\tlayout=" << layout () - << " minSize=" << (layout () ? layout ()->minimumSize () : TQSize ()) << endl; + kdDebug () << "\ttqlayout=" << tqlayout () + << " minSize=" << (tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ()) << endl; kdDebug () << "\tboxLayout=" << boxLayout () - << " minSize=" << (boxLayout () ? boxLayout ()->minimumSize () : TQSize ()) + << " minSize=" << (boxLayout () ? boxLayout ()->tqminimumSize () : TQSize ()) << endl; #endif - if (layout ()) - layout ()->setResizeMode (TQLayout::FreeResize); - setMinimumSize (QMAX (layoutMinimumSize.width (), 64), - QMAX (layoutMinimumSize.height (), 64)); + if (tqlayout ()) + tqlayout ()->setResizeMode (TQLayout::FreeResize); + setMinimumSize (TQMAX (tqlayoutMinimumSize.width (), 64), + TQMAX (tqlayoutMinimumSize.height (), 64)); // Enable "X" Close Button @@ -158,7 +140,7 @@ void kpThumbnail::updateCaption () } -// public slot virtual [base QDockWindow] +// public slot virtual [base TQDockWindow] void kpThumbnail::dock () { #if DEBUG_KP_THUMBNAIL @@ -181,7 +163,7 @@ void kpThumbnail::slotViewDestroyed () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpThumbnail::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_THUMBNAIL @@ -202,7 +184,7 @@ void kpThumbnail::resizeEvent (TQResizeEvent *e) } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpThumbnail::moveEvent (TQMoveEvent * /*e*/) { if (m_mainWindow) diff --git a/kolourpaint/kpthumbnail.h b/kolourpaint/kpthumbnail.h index 9ed738dc..1bb97ff3 100644 --- a/kolourpaint/kpthumbnail.h +++ b/kolourpaint/kpthumbnail.h @@ -35,12 +35,13 @@ class kpMainWindow; class kpThumbnailView; -class kpThumbnail : public QDockWindow +class kpThumbnail : public TQDockWindow { Q_OBJECT + TQ_OBJECT public: - kpThumbnail (kpMainWindow *parent, const char *name = 0); + kpThumbnail (kpMainWindow *tqparent, const char *name = 0); virtual ~kpThumbnail (); public: diff --git a/kolourpaint/kptool.cpp b/kolourpaint/kptool.cpp index 3d016fdb..7c6a057b 100644 --- a/kolourpaint/kptool.cpp +++ b/kolourpaint/kptool.cpp @@ -153,7 +153,7 @@ void kpTool::createAction () m_action = new kpToolAction (text (), iconName (), shortcutForKey (m_key), this, TQT_SLOT (slotActionActivated ()), m_mainWindow->actionCollection (), name ()); - m_action->setExclusiveGroup (TQString::fromLatin1 ("Tool Box Actions")); + m_action->setExclusiveGroup (TQString::tqfromLatin1 ("Tool Box Actions")); m_action->setWhatsThis (description ()); connect (m_action, TQT_SIGNAL (toolTipChanged (const TQString &)), @@ -239,7 +239,7 @@ KShortcut kpTool::shortcutForKey (int key) shortcut.append (KKeySequence (KKey (key))); // (CTRL+, ALT+, CTRL+ALT+, CTRL+SHIFT+ // all clash with global KDE shortcuts) - shortcut.append (KKeySequence (KKey (Qt::ALT + Qt::SHIFT + key))); + shortcut.append (KKeySequence (KKey (TQt::ALT + TQt::SHIFT + key))); } return shortcut; @@ -256,7 +256,7 @@ KShortcut kpTool::shortcut () const bool kpTool::keyIsText (int key) { // TODO: should work like !TQKeyEvent::text().isEmpty() - return !(key & (Qt::MODIFIER_MASK ^ Qt::SHIFT)); + return !(key & (TQt::MODIFIER_MASK ^ TQt::SHIFT)); } // public static @@ -744,7 +744,7 @@ void kpTool::endDrawInternal (const TQPoint &thisPoint, const TQRect &normalized // private void kpTool::endShapeInternal (const TQPoint &thisPoint, const TQRect &normalizedRect) { - endDrawInternal (thisPoint, normalizedRect, true/*end shape*/); + endDrawInternal (thisPoint, normalizedRect, true/*end tqshape*/); } // virtual @@ -940,11 +940,11 @@ void kpTool::mousePressEvent (TQMouseEvent *e) #endif // state of all the buttons - not just the one that triggered the event (button()) - Qt::ButtonState buttonState = e->stateAfter (); + TQt::ButtonState buttonState = e->stateAfter (); if (m_mainWindow && e->button () == Qt::MidButton) { - const TQString text = TQApplication::clipboard ()->text (QClipboard::Selection); + const TQString text = TQApplication::tqclipboard ()->text (TQClipboard::Selection); #if DEBUG_KP_TOOL && 1 kdDebug () << "\tMMB pasteText='" << text << "'" << endl; #endif @@ -1016,9 +1016,9 @@ void kpTool::mousePressEvent (TQMouseEvent *e) // let user know what mouse button is being used for entire draw m_mouseButton = mouseButton (buttonState); - m_shiftPressed = (buttonState & Qt::ShiftButton); - m_controlPressed = (buttonState & Qt::ControlButton); - m_altPressed = (buttonState & Qt::AltButton); + m_shiftPressed = (buttonState & TQt::ShiftButton); + m_controlPressed = (buttonState & TQt::ControlButton); + m_altPressed = (buttonState & TQt::AltButton); m_startPoint = m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : TQPoint (-1, -1); m_currentViewPoint = view ? e->pos () : TQPoint (-1, -1); m_viewUnderStartPoint = view; @@ -1040,19 +1040,19 @@ void kpTool::mouseMoveEvent (TQMouseEvent *e) kdDebug () << "kpTool::mouseMoveEvent pos=" << e->pos () << " btnStateAfter=" << (int) e->stateAfter () << endl; kpView *v0 = viewUnderCursor (), - *v1 = viewManager ()->viewUnderCursor (true/*use Qt*/), + *v1 = viewManager ()->viewUnderCursor (true/*use TQt*/), *v2 = viewUnderStartPoint (); kdDebug () << "\tviewUnderCursor=" << (v0 ? v0->name () : "(none)") - << " viewUnderCursorQt=" << (v1 ? v1->name () : "(none)") + << " viewUnderCursorTQt=" << (v1 ? v1->name () : "(none)") << " viewUnderStartPoint=" << (v2 ? v2->name () : "(none)") << endl; - kdDebug () << "\tfocusWidget=" << kapp->focusWidget () << endl; + kdDebug () << "\ttqfocusWidget=" << kapp->tqfocusWidget () << endl; #endif - Qt::ButtonState buttonState = e->stateAfter (); - m_shiftPressed = (buttonState & Qt::ShiftButton); - m_controlPressed = (buttonState & Qt::ControlButton); - m_altPressed = (buttonState & Qt::AltButton); + TQt::ButtonState buttonState = e->stateAfter (); + m_shiftPressed = (buttonState & TQt::ShiftButton); + m_controlPressed = (buttonState & TQt::ControlButton); + m_altPressed = (buttonState & TQt::AltButton); if (m_beganDraw) { @@ -1151,10 +1151,10 @@ void kpTool::wheelEvent (TQWheelEvent *e) e->ignore (); // If CTRL not pressed, bye. - if ((e->state () & Qt::ControlButton) == 0) + if ((e->state () & TQt::ControlButton) == 0) return; - // If drawing, bye; don't care if a shape in progress though. + // If drawing, bye; don't care if a tqshape in progress though. if (hasBegunDraw ()) return; @@ -1196,20 +1196,20 @@ void kpTool::keyPressEvent (TQKeyEvent *e) switch (e->key ()) { case 0: - case Qt::Key_unknown: + case TQt::Key_unknown: #if DEBUG_KP_TOOL && 0 kdDebug () << "kpTool::keyPressEvent() picked up unknown key!" << endl; #endif // --- fall thru and update all modifiers --- - case Qt::Key_Alt: - case Qt::Key_Shift: - case Qt::Key_Control: + case TQt::Key_Alt: + case TQt::Key_Shift: + case TQt::Key_Control: keyUpdateModifierState (e); e->accept (); break; - case Qt::Key_Delete: + case TQt::Key_Delete: m_mainWindow->slotDelete (); break; @@ -1217,21 +1217,21 @@ void kpTool::keyPressEvent (TQKeyEvent *e) * TQCursor::setPos conveniently causes mouseMoveEvents :) */ - case Qt::Key_Home: dx = -1, dy = -1; break; - case Qt::Key_Up: dy = -1; break; - case Qt::Key_PageUp: dx = +1, dy = -1; break; + case TQt::Key_Home: dx = -1, dy = -1; break; + case TQt::Key_Up: dy = -1; break; + case TQt::Key_PageUp: dx = +1, dy = -1; break; - case Qt::Key_Left: dx = -1; break; - case Qt::Key_Right: dx = +1; break; + case TQt::Key_Left: dx = -1; break; + case TQt::Key_Right: dx = +1; break; - case Qt::Key_End: dx = -1, dy = +1; break; - case Qt::Key_Down: dy = +1; break; - case Qt::Key_PageDown: dx = +1, dy = +1; break; + case TQt::Key_End: dx = -1, dy = +1; break; + case TQt::Key_Down: dy = +1; break; + case TQt::Key_PageDown: dx = +1, dy = +1; break; - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_Insert: - case Qt::Key_Clear/*Numpad 5 Key*/: + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Insert: + case TQt::Key_Clear/*Numpad 5 Key*/: { kpView *view = viewUnderCursor (); // TODO: wrong for dragging lines outside of view (for e.g.) if (view) @@ -1258,8 +1258,8 @@ void kpTool::keyPressEvent (TQKeyEvent *e) #endif - const int viewIncX = (dx ? QMAX (1, view->zoomLevelX () / 100) * dx : 0); - const int viewIncY = (dy ? QMAX (1, view->zoomLevelY () / 100) * dy : 0); + const int viewIncX = (dx ? TQMAX (1, view->zoomLevelX () / 100) * dx : 0); + const int viewIncY = (dy ? TQMAX (1, view->zoomLevelY () / 100) * dy : 0); int newViewX = oldPoint.x () + viewIncX; int newViewY = oldPoint.y () + viewIncY; @@ -1282,8 +1282,8 @@ void kpTool::keyPressEvent (TQKeyEvent *e) // TODO: visible width/height (e.g. with scrollbars) - int x = QMIN (QMAX (newViewX, 0), view->width () - 1); - int y = QMIN (QMAX (newViewY, 0), view->height () - 1); + int x = TQMIN (TQMAX (newViewX, 0), view->width () - 1); + int y = TQMIN (TQMAX (newViewY, 0), view->height () - 1); TQCursor::setPos (view->mapToGlobal (TQPoint (x, y))); e->accept (); @@ -1301,23 +1301,23 @@ void kpTool::keyReleaseEvent (TQKeyEvent *e) switch (e->key ()) { case 0: - case Qt::Key_unknown: + case TQt::Key_unknown: #if DEBUG_KP_TOOL kdDebug () << "kpTool::keyReleaseEvent() picked up unknown key!" << endl; #endif - // HACK: around Qt bug: if you hold a modifier before you start the + // HACK: around TQt bug: if you hold a modifier before you start the // program and then release it over the view, - // Qt reports it as the release of an unknown key + // TQt reports it as the release of an unknown key // --- fall thru and update all modifiers --- - case Qt::Key_Alt: - case Qt::Key_Shift: - case Qt::Key_Control: + case TQt::Key_Alt: + case TQt::Key_Shift: + case TQt::Key_Control: keyUpdateModifierState (e); e->accept (); break; - case Qt::Key_Escape: + case TQt::Key_Escape: if (hasBegunDraw ()) { cancelShapeInternal (); @@ -1326,10 +1326,10 @@ void kpTool::keyReleaseEvent (TQKeyEvent *e) break; - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_Insert: - case Qt::Key_Clear/*Numpad 5 Key*/: + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Insert: + case TQt::Key_Clear/*Numpad 5 Key*/: { kpView *view = viewUnderCursor (); if (view) @@ -1351,21 +1351,21 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e) #if DEBUG_KP_TOOL && 0 kdDebug () << "kpTool::updateModifierState() e->key=" << e->key () << endl; kdDebug () << "\tshift=" - << (e->stateAfter () & Qt::ShiftButton) + << (e->stateAfter () & TQt::ShiftButton) << " control=" - << (e->stateAfter () & Qt::ControlButton) + << (e->stateAfter () & TQt::ControlButton) << " alt=" - << (e->stateAfter () & Qt::AltButton) + << (e->stateAfter () & TQt::AltButton) << endl; #endif - if (e->key () & (Qt::Key_Alt | Qt::Key_Shift | Qt::Key_Control)) + if (e->key () & (TQt::Key_Alt | TQt::Key_Shift | TQt::Key_Control)) { #if DEBUG_KP_TOOL && 0 kdDebug () << "\t\tmodifier changed - use e's claims" << endl; #endif - setShiftPressed (e->stateAfter () & Qt::ShiftButton); - setControlPressed (e->stateAfter () & Qt::ControlButton); - setAltPressed (e->stateAfter () & Qt::AltButton); + setShiftPressed (e->stateAfter () & TQt::ShiftButton); + setControlPressed (e->stateAfter () & TQt::ControlButton); + setAltPressed (e->stateAfter () & TQt::AltButton); } else { @@ -1379,7 +1379,7 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e) // TODO: Can't do much about ALT - unless it's always KApplication::Modifier1? // Ditto for everywhere else where I set SHIFT & CTRL but not alt. - setAltPressed (e->stateAfter () & Qt::AltButton); + setAltPressed (e->stateAfter () & TQt::AltButton); } } @@ -1466,14 +1466,14 @@ void kpTool::leaveEvent (TQEvent *) } // static -int kpTool::mouseButton (const Qt::ButtonState &buttonState) +int kpTool::mouseButton (const TQt::ButtonState &buttonState) { // we have nothing to do with mid-buttons if (buttonState & Qt::MidButton) return -1; // both left & right together is quite meaningless... - Qt::ButtonState bothButtons = (Qt::ButtonState) (Qt::LeftButton | Qt::RightButton); + TQt::ButtonState bothButtons = (TQt::ButtonState) (Qt::LeftButton | Qt::RightButton); if ((buttonState & bothButtons) == bothButtons) return -1; @@ -1618,7 +1618,7 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight, const TQString &text, const TQString &caption, const TQString &continueButtonText, - TQWidget *parent) + TQWidget *tqparent) { #if DEBUG_KP_TOOL kdDebug () << "kpTool::warnIfBigImageSize()" @@ -1648,11 +1648,11 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight, if (kpPixmapFX::pixmapSize (newWidth, newHeight, TQPixmap::defaultDepth ()) >= KP_BIG_IMAGE_SIZE) { - int accept = KMessageBox::warningContinueCancel (parent, + int accept = KMessageBox::warningContinueCancel (tqparent, text, caption, continueButtonText, - TQString::fromLatin1 ("BigImageDontAskAgain")); + TQString::tqfromLatin1 ("BigImageDontAskAgain")); return (accept == KMessageBox::Continue); } diff --git a/kolourpaint/kptool.h b/kolourpaint/kptool.h index a0309463..1094b8d1 100644 --- a/kolourpaint/kptool.h +++ b/kolourpaint/kptool.h @@ -55,9 +55,10 @@ class kpToolToolBar; // Base class for all tools -class kpTool : public QObject +class kpTool : public TQObject { Q_OBJECT + TQ_OBJECT public: kpTool (const TQString &text, const TQString &description, @@ -328,7 +329,7 @@ protected: virtual void leaveEvent (TQEvent *e); // 0 = left, 1 = right, -1 = other (none, left+right, mid) - static int mouseButton (const Qt::ButtonState &buttonState); + static int mouseButton (const TQt::ButtonState &buttonState); TQString m_text, m_description; const char *m_name; @@ -340,7 +341,7 @@ protected: /* - * User Notifications (Status Bar) + * User Notifications (tqStatus Bar) */ public: @@ -350,7 +351,7 @@ public: TQString cancelUserMessage () const; TQString userMessage () const; - void setUserMessage (const TQString &userMessage = TQString::null); + void setUserMessage (const TQString &userMessage = TQString()); TQPoint userShapeStartPoint () const; TQPoint userShapeEndPoint () const; @@ -409,7 +410,7 @@ public: const TQString &text, const TQString &caption, const TQString &continueButtonText, - TQWidget *parent); + TQWidget *tqparent); protected: diff --git a/kolourpaint/kpview.cpp b/kolourpaint/kpview.cpp index 8e0020f6..3f64bbb9 100644 --- a/kolourpaint/kpview.cpp +++ b/kolourpaint/kpview.cpp @@ -102,9 +102,9 @@ kpView::kpView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) - : TQWidget (parent, name, Qt::WNoAutoErase/*no flicker*/), + : TQWidget (tqparent, name, TQt::WNoAutoErase/*no flicker*/), d (new kpViewPrivate ()) { d->m_document = document; @@ -121,8 +121,8 @@ kpView::kpView (kpDocument *document, d->m_backBuffer = 0; - setBackgroundMode (Qt::NoBackground); // no flicker - setFocusPolicy (TQWidget::WheelFocus); + setBackgroundMode (TQt::NoBackground); // no flicker + setFocusPolicy (TQ_WheelFocus); setMouseTracking (true); // mouseMoveEvent's even when no mousebtn down setKeyCompression (true); setInputMethodEnabled (true); // ensure using InputMethod @@ -385,9 +385,9 @@ void kpView::updateBuddyViewScrollableContainerRectangle () TQRect docRect = buddyView ()->transformViewToDoc ( TQRect (buddyViewScrollableContainer ()->contentsXSoon (), buddyViewScrollableContainer ()->contentsYSoon (), - QMIN (buddyView ()->width (), + TQMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), - QMIN (buddyView ()->height (), + TQMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); @@ -462,8 +462,8 @@ TQRect kpView::transformViewToDoc (const TQRect &viewRect) const const TQPoint docTopLeft = transformViewToDoc (viewRect.topLeft ()); // (don't call transformViewToDoc[XY]() - need to round up dimensions) - const int docWidth = qRound (double (viewRect.width ()) * 100.0 / double (zoomLevelX ())); - const int docHeight = qRound (double (viewRect.height ()) * 100.0 / double (zoomLevelY ())); + const int docWidth = tqRound (double (viewRect.width ()) * 100.0 / double (zoomLevelX ())); + const int docHeight = tqRound (double (viewRect.height ()) * 100.0 / double (zoomLevelY ())); // (like TQWMatrix::Areas) return TQRect (docTopLeft.x (), docTopLeft.y (), docWidth, docHeight); @@ -505,8 +505,8 @@ TQRect kpView::transformDocToView (const TQRect &docRect) const const TQPoint viewTopLeft = transformDocToView (docRect.topLeft ()); // (don't call transformDocToView[XY]() - need to round up dimensions) - const int viewWidth = qRound (double (docRect.width ()) * double (zoomLevelX ()) / 100.0); - const int viewHeight = qRound (double (docRect.height ()) * double (zoomLevelY ()) / 100.0); + const int viewWidth = tqRound (double (docRect.width ()) * double (zoomLevelX ()) / 100.0); + const int viewHeight = tqRound (double (docRect.height ()) * double (zoomLevelY ()) / 100.0); // (like TQWMatrix::Areas) return TQRect (viewTopLeft.x (), viewTopLeft.y (), viewWidth, viewHeight); @@ -590,10 +590,10 @@ void kpView::addToQueuedArea (const TQRect &rect) } // public -void kpView::invalidateQueuedArea () +void kpView::tqinvalidateQueuedArea () { #if DEBUG_KP_VIEW && 0 - kdDebug () << "kpView::invalidateQueuedArea()" << endl; + kdDebug () << "kpView::tqinvalidateQueuedArea()" << endl; #endif d->m_queuedUpdateArea = TQRegion (); @@ -621,7 +621,7 @@ void kpView::updateQueuedArea () if (!d->m_queuedUpdateArea.isNull ()) vm->updateView (this, d->m_queuedUpdateArea); - invalidateQueuedArea (); + tqinvalidateQueuedArea (); } // public @@ -668,7 +668,7 @@ bool kpView::mouseOnSelection (const TQPoint &viewPoint) const if (!selViewRect.isValid ()) return false; - return selViewRect.contains (mouseViewPoint (viewPoint)); + return selViewRect.tqcontains (mouseViewPoint (viewPoint)); } @@ -678,7 +678,7 @@ int kpView::textSelectionMoveBorderAtomicSize () const if (!selection () || !selection ()->isText ()) return 0; - return QMAX (4, zoomLevelX () / 100); + return TQMAX (4, zoomLevelX () / 100); } // public @@ -730,7 +730,7 @@ bool kpView::selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (int atomicSize // public int kpView::selectionResizeHandleAtomicSize () const { - int atomicSize = QMIN (7, QMAX (4, zoomLevelX () / 100)); + int atomicSize = TQMIN (7, TQMAX (4, zoomLevelX () / 100)); while (atomicSize > 0 && !selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (atomicSize)) { @@ -783,9 +783,9 @@ TQRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const if (selection ()->isText () && selection ()->textLines ().size () == 1) { if (zoomLevelX () <= 150) - vertEdgeAtomicLength = QMIN (vertEdgeAtomicLength, QMAX (2, zoomLevelX () / 100)); + vertEdgeAtomicLength = TQMIN (vertEdgeAtomicLength, TQMAX (2, zoomLevelX () / 100)); else if (zoomLevelX () <= 250) - vertEdgeAtomicLength = QMIN (vertEdgeAtomicLength, QMAX (3, zoomLevelX () / 100)); + vertEdgeAtomicLength = TQMIN (vertEdgeAtomicLength, TQMAX (3, zoomLevelX () / 100)); } } @@ -874,7 +874,7 @@ int kpView::mouseOnSelectionResizeHandle (const TQPoint &viewPoint) const #define LOCAL_POINT_IN_BOX_AT(x,y) \ - TQRect ((x), (y), atomicLength, atomicLength).contains (viewPointRelSel) + TQRect ((x), (y), atomicLength, atomicLength).tqcontains (viewPointRelSel) // Favour the bottom & right and the corners. if (LOCAL_POINT_IN_BOX_AT (selViewRect.width () - atomicLength, @@ -957,7 +957,7 @@ bool kpView::mouseOnSelectionToSelectText (const TQPoint &viewPoint) const } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::mouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -969,7 +969,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e) // TODO: This is wrong if you leaveEvent the mainView by mouseMoving on the // mainView, landing on top of the thumbnailView cleverly put on top // of the mainView. - setHasMouse (rect ().contains (e->pos ())); + setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())); if (tool ()) tool ()->mouseMoveEvent (e); @@ -977,7 +977,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e) e->accept (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::mousePressEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -994,7 +994,7 @@ void kpView::mousePressEvent (TQMouseEvent *e) e->accept (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::mouseReleaseEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1003,7 +1003,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e) << endl; #endif - setHasMouse (rect ().contains (e->pos ())); + setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())); if (tool ()) tool ()->mouseReleaseEvent (e); @@ -1011,7 +1011,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e) e->accept (); } -// public virtual [base QWidget] +// public virtual [base TQWidget] void kpView::wheelEvent (TQWheelEvent *e) { if (tool ()) @@ -1019,7 +1019,7 @@ void kpView::wheelEvent (TQWheelEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::keyPressEvent (TQKeyEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1032,7 +1032,7 @@ void kpView::keyPressEvent (TQKeyEvent *e) e->accept (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::keyReleaseEvent (TQKeyEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1046,7 +1046,7 @@ void kpView::keyReleaseEvent (TQKeyEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::focusInEvent (TQFocusEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1056,7 +1056,7 @@ void kpView::focusInEvent (TQFocusEvent *e) tool ()->focusInEvent (e); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::focusOutEvent (TQFocusEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1067,7 +1067,7 @@ void kpView::focusOutEvent (TQFocusEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::enterEvent (TQEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1076,7 +1076,7 @@ void kpView::enterEvent (TQEvent *e) // Don't call setHasMouse(true) as it displays the brush cursor (if // active) when dragging open a menu and then dragging - // past the extents of the menu due to Qt sending us an EnterEvent. + // past the extents of the menu due to TQt sending us an EnterEvent. // We're already covered by MouseMoveEvent anyway. // // But disabling this causes a more serious problem: RMB on a text @@ -1089,7 +1089,7 @@ void kpView::enterEvent (TQEvent *e) tool ()->enterEvent (e); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::leaveEvent (TQEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1102,7 +1102,7 @@ void kpView::leaveEvent (TQEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::dragEnterEvent (TQDragEnterEvent *) { #if DEBUG_KP_VIEW && 1 @@ -1112,7 +1112,7 @@ void kpView::dragEnterEvent (TQDragEnterEvent *) setHasMouse (true); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::dragLeaveEvent (TQDragLeaveEvent *) { #if DEBUG_KP_VIEW && 1 @@ -1123,7 +1123,7 @@ void kpView::dragLeaveEvent (TQDragLeaveEvent *) } -// public virtual [base QWidget] +// public virtual [base TQWidget] void kpView::resize (int w, int h) { #if DEBUG_KP_VIEW && 1 @@ -1135,7 +1135,7 @@ void kpView::resize (int w, int h) TQWidget::resize (w, h); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_VIEW && 1 @@ -1270,7 +1270,7 @@ void kpView::drawTransparentBackground (TQPainter *painter, col = TQColor (224, 224, 224); } else - col = Qt::white; + col = TQt::white; painter->fillRect (x - rect.x (), y - rect.y (), cellSize, cellSize, col); @@ -1340,27 +1340,27 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec if (vm->selectionBorderVisible ()) { TQPainter destPixmapPainter (destPixmap); - destPixmapPainter.setRasterOp (Qt::XorROP); - destPixmapPainter.setPen (TQPen (Qt::white, 1, Qt::DotLine)); + destPixmapPainter.setRasterOp (TQt::XorROP); + destPixmapPainter.setPen (TQPen (TQt::white, 1, TQt::DotLine)); - destPixmapPainter.setBackgroundMode (TQPainter::OpaqueMode); - destPixmapPainter.setBackgroundColor (Qt::blue); + destPixmapPainter.setBackgroundMode (Qt::OpaqueMode); + destPixmapPainter.setBackgroundColor (TQt::blue); - TQBitmap maskBitmap; - TQPainter maskBitmapPainter; - if (destPixmap->mask ()) + TQBitmap tqmaskBitmap; + TQPainter tqmaskBitmapPainter; + if (destPixmap->tqmask ()) { - maskBitmap = *destPixmap->mask (); - maskBitmapPainter.begin (&maskBitmap); - maskBitmapPainter.setPen (Qt::color1/*opaque*/); + tqmaskBitmap = *destPixmap->tqmask (); + tqmaskBitmapPainter.begin (&tqmaskBitmap); + tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/); } #define PAINTER_CMD(cmd) \ { \ destPixmapPainter . cmd; \ - if (maskBitmapPainter.isActive ()) \ - maskBitmapPainter . cmd; \ + if (tqmaskBitmapPainter.isActive ()) \ + tqmaskBitmapPainter . cmd; \ } TQRect boundingRect = sel->boundingRect (); @@ -1432,7 +1432,7 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec { destPixmapPainter.save (); - destPixmapPainter.setRasterOp (Qt::NotROP); + destPixmapPainter.setRasterOp (TQt::NotROP); PAINTER_CMD (drawRect (boundingRect.x () - docRect.x (), boundingRect.y () - docRect.y (), boundingRect.width (), @@ -1443,17 +1443,17 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec } else { - // SYNC: Work around Qt bug: can't draw 1x1 rectangle + // SYNC: Work around TQt bug: can't draw 1x1 rectangle PAINTER_CMD (drawPoint (boundingRect.topLeft () - docRect.topLeft ())); } #undef PAINTER_CMD destPixmapPainter.end (); - if (maskBitmapPainter.isActive ()) - maskBitmapPainter.end (); + if (tqmaskBitmapPainter.isActive ()) + tqmaskBitmapPainter.end (); - destPixmap->setMask (maskBitmap); + destPixmap->setMask (tqmaskBitmap); } @@ -1480,24 +1480,24 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec { rect.moveBy (-docRect.x (), -docRect.y ()); - TQBitmap maskBitmap; - TQPainter destPixmapPainter, maskBitmapPainter; + TQBitmap tqmaskBitmap; + TQPainter destPixmapPainter, tqmaskBitmapPainter; - if (destPixmap->mask ()) + if (destPixmap->tqmask ()) { - maskBitmap = *destPixmap->mask (); - maskBitmapPainter.begin (&maskBitmap); - maskBitmapPainter.fillRect (rect, Qt::color1/*opaque*/); - maskBitmapPainter.end (); + tqmaskBitmap = *destPixmap->tqmask (); + tqmaskBitmapPainter.begin (&tqmaskBitmap); + tqmaskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/); + tqmaskBitmapPainter.end (); } destPixmapPainter.begin (destPixmap); - destPixmapPainter.setRasterOp (Qt::XorROP); - destPixmapPainter.fillRect (rect, Qt::white); + destPixmapPainter.setRasterOp (TQt::XorROP); + destPixmapPainter.fillRect (rect, TQt::white); destPixmapPainter.end (); - if (!maskBitmap.isNull ()) - destPixmap->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + destPixmap->setMask (tqmaskBitmap); } } } @@ -1559,16 +1559,16 @@ void kpView::paintEventDrawSelectionResizeHandles (TQPainter *painter, const TQR TQColor fillColor; if (selectionResizeHandleAtomicSizeCloseToZoomLevel ()) { - fillColor = Qt::blue; - painter->setRasterOp (Qt::CopyROP); + fillColor = TQt::blue; + painter->setRasterOp (TQt::CopyROP); } else { - fillColor = Qt::white; - painter->setRasterOp (Qt::XorROP); + fillColor = TQt::white; + painter->setRasterOp (TQt::XorROP); } - TQMemArray rects = selResizeHandlesRegion.rects (); + TQMemArray rects = selResizeHandlesRegion.tqrects (); for (TQMemArray ::ConstIterator it = rects.begin (); it != rects.end (); it++) @@ -1607,8 +1607,8 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect int hzoomMultiple = zoomLevelX () / 100; int vzoomMultiple = zoomLevelY () / 100; - TQPen ordinaryPen (Qt::gray); - TQPen tileBoundaryPen (Qt::lightGray); + TQPen ordinaryPen (TQt::gray); + TQPen tileBoundaryPen (TQt::lightGray); painter->setPen (ordinaryPen); @@ -1622,7 +1622,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileHeight > 0 && y % tileHeight == 0) { painter->setPen (tileBoundaryPen); - //painter.setRasterOp (Qt::XorROP); + //painter.setRasterOp (TQt::XorROP); } painter->drawLine (0, y, viewRect.right () - viewRect.left (), y); @@ -1630,7 +1630,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileHeight > 0 && y % tileHeight == 0) { painter->setPen (ordinaryPen); - //painter.setRasterOp (Qt::CopyROP); + //painter.setRasterOp (TQt::CopyROP); } } @@ -1644,7 +1644,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileWidth > 0 && x % tileWidth == 0) { painter->setPen (tileBoundaryPen); - //painter.setRasterOp (Qt::XorROP); + //painter.setRasterOp (TQt::XorROP); } painter->drawLine (x, 0, x, viewRect.bottom () - viewRect.top ()); @@ -1652,7 +1652,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileWidth > 0 && x % tileWidth == 0) { painter->setPen (ordinaryPen); - //painter.setRasterOp (Qt::CopyROP); + //painter.setRasterOp (TQt::CopyROP); } } } @@ -1685,7 +1685,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) // uncomment to cause deliberate flicker (identifies needless updates) #if DEBUG_KP_VIEW_RENDERER && 0 TQPainter flickerPainter (this); - flickerPainter.fillRect (viewRect, Qt::red); + flickerPainter.fillRect (viewRect, TQt::red); flickerPainter.end (); #endif @@ -1711,7 +1711,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) // uncomment to catch bits of the view that the renderer forgot to update #if 0 - d->m_backBuffer->fill (Qt::green); + d->m_backBuffer->fill (TQt::green); #endif TQPainter backBufferPainter; @@ -1747,11 +1747,11 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) #endif } - if (docPixmap.mask () || + if (docPixmap.tqmask () || (tempPixmapWillBeRendered && vm->tempPixmap ()->mayChangeDocumentMask ())) { #if DEBUG_KP_VIEW_RENDERER && 1 - kdDebug () << "\tmask=" << (bool) docPixmap.mask () + kdDebug () << "\ttqmask=" << (bool) docPixmap.tqmask () << endl; #endif paintEventDrawCheckerBoard (&backBufferPainter, viewRect); @@ -1759,7 +1759,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) else { #if DEBUG_KP_VIEW_RENDERER && 1 - kdDebug () << "\tno mask" << endl; + kdDebug () << "\tno tqmask" << endl; #endif } @@ -1820,8 +1820,8 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) { backBufferPainter.save (); - backBufferPainter.setRasterOp (Qt::XorROP); - backBufferPainter.setPen (Qt::white); + backBufferPainter.setRasterOp (TQt::XorROP); + backBufferPainter.setPen (TQt::white); backBufferPainter.translate (-viewRect.x (), -viewRect.y ()); backBufferPainter.drawRect (bvsvRect); @@ -1850,7 +1850,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::paintEvent (TQPaintEvent *e) { // sync: kpViewPrivate @@ -1888,7 +1888,7 @@ void kpView::paintEvent (TQPaintEvent *e) TQRegion viewRegion = clipRegion ().intersect (e->region ()); - TQMemArray rects = viewRegion.rects (); + TQMemArray rects = viewRegion.tqrects (); #if DEBUG_KP_VIEW_RENDERER && 1 kdDebug () << "\t#rects = " << rects.count () << endl; #endif diff --git a/kolourpaint/kpview.h b/kolourpaint/kpview.h index 6464d869..66471489 100644 --- a/kolourpaint/kpview.h +++ b/kolourpaint/kpview.h @@ -56,9 +56,10 @@ class kpViewScrollableContainer; * * @author Clarence Dang */ -class kpView : public QWidget +class kpView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** @@ -80,7 +81,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs this view. Informs the viewManager() that the mouse @@ -147,8 +148,8 @@ public: /** * Sets the horizontal and vertical zoom levels. * - * @param hzoom Horizontal zoom level. - * @param vzoom Vertical zoom level. + * @param hzoomQt::Horizontal zoom level. + * @param vzoomQt::Vertical zoom level. * * If reimplementing, you must call this base implementation. */ @@ -227,7 +228,7 @@ protected slots: public: /** - * @param viewX Horizontal position in view coordinates. + * @param viewXQt::Horizontal position in view coordinates. * * @returns viewX transformed to document coordinates, based on the * origin() and zoomLevelX(). @@ -235,7 +236,7 @@ public: double transformViewToDocX (double viewX) const; /** - * @param viewY Vertical position in view coordinates. + * @param viewYQt::Vertical position in view coordinates. * * @returns viewY transformed to document coordinates, based on the * origin() and zoomLevelY(). @@ -264,7 +265,7 @@ public: /** - * @param docX Horizontal position in document coordinates. + * @param docXQt::Horizontal position in document coordinates. * * @returns docX transformed to view coordinates, based on the origin() * and zoomLevelX(). @@ -272,7 +273,7 @@ public: double transformDocToViewX (double docX) const; /** - * @param docY Vertical position in document coordinates. + * @param docYQt::Vertical position in document coordinates. * * @returns docY transformed to view coordinates, based on the origin() * and zoomLevelY(). @@ -343,10 +344,10 @@ protected: public: /** * Adds a region (in view coordinates) to the dirty area that is - * repainted when the parent @ref kpViewManager is set not to queue + * tqrepainted when the tqparent @ref kpViewManager is set not to queue * updates. * - * @param region Region (in view coordinates) that needs repainting. + * @param region Region (in view coordinates) that needs tqrepainting. */ void addToQueuedArea (const TQRegion ®ion); @@ -354,10 +355,10 @@ public: * Convenience function. Same as above. * * Adds a rectangle (in view coordinates) to the dirty area that is - * repainted when the parent @ref kpViewManager is set not to queue + * tqrepainted when the tqparent @ref kpViewManager is set not to queue * updates. * - * @param rect Rectangle (in view coordinates) that needs repainting. + * @param rect Rectangle (in view coordinates) that needs tqrepainting. */ void addToQueuedArea (const TQRect &rect); @@ -365,11 +366,11 @@ public: * Removes the dirty region that has been queued for updating. * Does not update the view. */ - void invalidateQueuedArea (); + void tqinvalidateQueuedArea (); /** * Updates the part of the view described by dirty region and then - * calls invalidateQueuedArea(). Does nothing if @ref kpViewManager + * calls tqinvalidateQueuedArea(). Does nothing if @ref kpViewManager * is set to queue updates. */ void updateQueuedArea (); diff --git a/kolourpaint/kpviewmanager.cpp b/kolourpaint/kpviewmanager.cpp index acff3413..e7a095fd 100644 --- a/kolourpaint/kpviewmanager.cpp +++ b/kolourpaint/kpviewmanager.cpp @@ -78,7 +78,7 @@ void kpViewManager::registerView (kpView *view) #if DEBUG_KP_VIEW_MANAGER && 1 kdDebug () << "kpViewManager::registerView (" << view << ")" << endl; #endif - if (view && m_views.findRef (view) < 0) + if (view && m_views.tqfindRef (view) < 0) { #if DEBUG_KP_VIEW_MANAGER && 1 kdDebug () << "\tadded view" << endl; @@ -152,7 +152,7 @@ void kpViewManager::setTempPixmap (const kpTempPixmap &tempPixmap) } // public -void kpViewManager::invalidateTempPixmap () +void kpViewManager::tqinvalidateTempPixmap () { if (!m_tempPixmap) return; @@ -463,13 +463,13 @@ void kpViewManager::unsetCursor () } -kpView *kpViewManager::viewUnderCursor (bool usingQt) const +kpView *kpViewManager::viewUnderCursor (bool usingTQt) const { - if (!usingQt) + if (!usingTQt) { kpViewManager *nonConstThis = const_cast (this); - if (m_viewUnderCursor && nonConstThis->m_views.findRef (m_viewUnderCursor) < 0) + if (m_viewUnderCursor && nonConstThis->m_views.tqfindRef (m_viewUnderCursor) < 0) { kdError () << "kpViewManager::viewUnderCursor(): invalid view" << endl; nonConstThis->m_viewUnderCursor = 0; @@ -628,7 +628,7 @@ void kpViewManager::updateView (kpView *v, const TQRect &viewRect) if (!queueUpdates ()) { if (fastUpdates ()) - v->repaint (viewRect, false/*no erase*/); + v->tqrepaint (viewRect, false/*no erase*/); else v->update (viewRect); } @@ -646,7 +646,7 @@ void kpViewManager::updateView (kpView *v, const TQRegion &viewRegion) if (!queueUpdates ()) { if (fastUpdates ()) - v->repaint (viewRegion, false/*no erase*/); + v->tqrepaint (viewRegion, false/*no erase*/); else v->update (viewRegion.boundingRect ()); } @@ -719,7 +719,7 @@ void kpViewManager::updateViews (const TQRect &docRect) { TQRect viewRect = view->transformDocToView (docRect); - int diff = qRound (double (QMAX (view->zoomLevelX (), view->zoomLevelY ())) / 100.0) + 1; + int diff = tqRound (double (TQMAX (view->zoomLevelX (), view->zoomLevelY ())) / 100.0) + 1; TQRect newRect = TQRect (viewRect.x () - diff, viewRect.y () - diff, diff --git a/kolourpaint/kpviewmanager.h b/kolourpaint/kpviewmanager.h index 9bb6e8b6..db2724ce 100644 --- a/kolourpaint/kpviewmanager.h +++ b/kolourpaint/kpviewmanager.h @@ -44,9 +44,10 @@ class kpView; class kpMainWindow; class kpTempPixmap; -class kpViewManager : public QObject +class kpViewManager : public TQObject { Q_OBJECT + TQ_OBJECT public: kpViewManager (kpMainWindow *mainWindow); @@ -68,7 +69,7 @@ public: const kpTempPixmap *tempPixmap () const; void setTempPixmap (const kpTempPixmap &tempPixmap); - void invalidateTempPixmap (); + void tqinvalidateTempPixmap (); // @@ -120,7 +121,7 @@ public: // View // - kpView *viewUnderCursor (bool usingQt = false) const; + kpView *viewUnderCursor (bool usingTQt = false) const; // // TQWidget::hasMouse() is unreliable: @@ -156,18 +157,18 @@ public: // // This is better than TQWidget::setUpdatesEnabled() because // restoreQueueUpdates() automatically restores only the regions - // of the views that need to be repainted, per view. + // of the views that need to be tqrepainted, per view. bool queueUpdates () const; void setQueueUpdates (); void restoreQueueUpdates (); // Controls behaviour of updateViews(): // - // Slow: Let Qt buffer paint events via TQWidget::update(). + // Slow: Let TQt buffer paint events via TQWidget::update(). // Results in less flicker. Paint events are probably merged // so long-term efficiency is increased at the expense of // reduced responsiveness (default). - // Fast: Force Qt to redraw immediately. No paint events + // Fast: Force TQt to redraw immediately. No paint events // are merged so there is great potential for flicker, // if used inappropriately. Use this when the redraw // area is small and KolourPaint's responsiveness is diff --git a/kolourpaint/kpviewscrollablecontainer.cpp b/kolourpaint/kpviewscrollablecontainer.cpp index c3942806..feeb5a1b 100644 --- a/kolourpaint/kpviewscrollablecontainer.cpp +++ b/kolourpaint/kpviewscrollablecontainer.cpp @@ -58,8 +58,8 @@ static const int GripHandleSize = 7; kpGrip::kpGrip (GripType type, - TQWidget *parent, const char *name) - : TQWidget (parent, name), + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), m_type (type), m_startPoint (KP_INVALID_POINT), m_currentPoint (KP_INVALID_POINT), @@ -90,19 +90,19 @@ const TQCursor &kpGrip::cursorForType (GripType type) switch (type) { case Bottom: - return Qt::sizeVerCursor; + return TQt::sizeVerCursor; break; // one day you'll forget case Right: - return Qt::sizeHorCursor; + return TQt::sizeHorCursor; break; // one day you'll forget case BottomRight: - return Qt::sizeFDiagCursor; + return TQt::sizeFDiagCursor; break; // one day you'll forget } - return Qt::arrowCursor; + return TQt::arrowCursor; } @@ -166,7 +166,7 @@ TQString kpGrip::userMessage () const void kpGrip::setUserMessage (const TQString &message) { // Don't do NOP checking here since another grip might have changed - // the message so an apparent NOP for this grip is not a NOP in the + // the message so an aptqparent NOP for this grip is not a NOP in the // global sense (kpViewScrollableContainer::slotGripStatusMessageChanged()). m_userMessage = message; @@ -184,7 +184,7 @@ void kpGrip::updatePixmap () return; TQPixmap pixmap (width (), height ()); - pixmap.fill (colorGroup ().highlight ()); + pixmap.fill (tqcolorGroup ().highlight ()); kpPixmapFX::ensureTransparentAt (&pixmap, pixmap.rect ()); const TQRect hr = hotRect (); #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -194,8 +194,8 @@ void kpGrip::updatePixmap () kpPixmapFX::ensureOpaqueAt (&pixmap, hr); setBackgroundPixmap (pixmap); - if (pixmap.mask ()) - setMask (*pixmap.mask ()); + if (pixmap.tqmask ()) + setMask (*pixmap.tqmask ()); } @@ -212,7 +212,7 @@ void kpGrip::cancel () m_currentPoint = KP_INVALID_POINT; setUserMessage (i18n ("Resize Image: Let go of all the mouse buttons.")); - setCursor (Qt::arrowCursor); + setCursor (TQt::arrowCursor); m_shouldReleaseMouseButtons = true; releaseKeyboard (); @@ -220,17 +220,17 @@ void kpGrip::cancel () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::keyReleaseEvent (TQKeyEvent *e) { if (m_startPoint != KP_INVALID_POINT && - e->key () == Qt::Key_Escape) + e->key () == TQt::Key_Escape) { cancel (); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::mousePressEvent (TQMouseEvent *e) { if (m_startPoint == KP_INVALID_POINT && @@ -279,7 +279,7 @@ void kpGrip::mouseMovedTo (const TQPoint &point, bool dueToDragScroll) dueToDragScroll); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::mouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -298,7 +298,7 @@ void kpGrip::mouseMoveEvent (TQMouseEvent *e) mouseMovedTo (e->pos (), false/*not due to drag scroll*/); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::mouseReleaseEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -323,7 +323,7 @@ void kpGrip::mouseReleaseEvent (TQMouseEvent *e) if ((e->stateAfter () & Qt::MouseButtonMask) == 0) { m_shouldReleaseMouseButtons = false; - setUserMessage (TQString::null); + setUserMessage (TQString()); setCursor (cursorForType (m_type)); releaseKeyboard (); @@ -332,7 +332,7 @@ void kpGrip::mouseReleaseEvent (TQMouseEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::resizeEvent (TQResizeEvent *) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -342,7 +342,7 @@ void kpGrip::resizeEvent (TQResizeEvent *) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::enterEvent (TQEvent * /*e*/) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -362,7 +362,7 @@ void kpGrip::enterEvent (TQEvent * /*e*/) } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::leaveEvent (TQEvent * /*e*/) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -374,12 +374,12 @@ void kpGrip::leaveEvent (TQEvent * /*e*/) if (m_startPoint == KP_INVALID_POINT && !m_shouldReleaseMouseButtons) { - setUserMessage (TQString::null); + setUserMessage (TQString()); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::paintEvent (TQPaintEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0 @@ -390,10 +390,10 @@ void kpGrip::paintEvent (TQPaintEvent *e) // TODO: Are we checking for m_view == 0 often enough? -kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *parent, +kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *tqparent, const char *name) - : TQScrollView ((TQWidget *) parent, name, Qt::WStaticContents | Qt::WNoAutoErase), - m_mainWindow (parent), + : TQScrollView ((TQWidget *) tqparent, name, TQt::WStaticContents | TQt::WNoAutoErase), + m_mainWindow (tqparent), m_contentsXSoon (-1), m_contentsYSoon (-1), m_view (0), m_bottomGrip (new kpGrip (kpGrip::Bottom, viewport (), "Bottom Grip")), @@ -500,9 +500,9 @@ void kpViewScrollableContainer::clearStatusMessage () #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1 kdDebug () << "kpViewScrollableContainer::clearStatusMessage()" << endl; #endif - m_bottomRightGrip->setUserMessage (TQString::null); - m_bottomGrip->setUserMessage (TQString::null); - m_rightGrip->setUserMessage (TQString::null); + m_bottomRightGrip->setUserMessage (TQString()); + m_bottomGrip->setUserMessage (TQString()); + m_rightGrip->setUserMessage (TQString()); } @@ -518,7 +518,7 @@ TQSize kpViewScrollableContainer::newDocSize (int viewDX, int viewDY) const const int docX = (int) m_view->transformViewToDocX (m_view->width () + viewDX); const int docY = (int) m_view->transformViewToDocY (m_view->height () + viewDY); - return TQSize (QMAX (1, docX), QMAX (1, docY)); + return TQSize (TQMAX (1, docX), TQMAX (1, docY)); } @@ -552,7 +552,7 @@ int kpViewScrollableContainer::bottomResizeLineWidth () const return -1; if (docResizingGrip ()->type () & kpGrip::Bottom) - return QMAX (m_view->zoomLevelY () / 100, 1); + return TQMAX (m_view->zoomLevelY () / 100, 1); else return 1; } @@ -567,7 +567,7 @@ int kpViewScrollableContainer::rightResizeLineWidth () const return -1; if (docResizingGrip ()->type () & kpGrip::Right) - return QMAX (m_view->zoomLevelX () / 100, 1); + return TQMAX (m_view->zoomLevelX () / 100, 1); else return 1; } @@ -644,7 +644,7 @@ TQRect kpViewScrollableContainer::mapViewToGlobal (const TQRect &viewRect) // protected -void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect ( +void kpViewScrollableContainer::tqrepaintWidgetAtResizeLineViewRect ( TQWidget *widget, const TQRect &resizeLineViewRect) { const TQRect resizeLineGlobalRect = mapViewToGlobal (resizeLineViewRect); @@ -660,19 +660,19 @@ void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect ( if (redrawWidgetRect.isValid ()) { - // TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)" + // TODO: should be "!widget->testWFlags (TQt::WRepaintNoErase)" // but for some reason, doesn't work for viewport(). const bool erase = !dynamic_cast (widget); - widget->repaint (redrawWidgetRect, erase); + widget->tqrepaint (redrawWidgetRect, erase); } } // protected -void kpViewScrollableContainer::repaintWidgetAtResizeLines (TQWidget *widget) +void kpViewScrollableContainer::tqrepaintWidgetAtResizeLines (TQWidget *widget) { - repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); - repaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); - repaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); + tqrepaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); + tqrepaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); + tqrepaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); } // protected @@ -680,12 +680,12 @@ void kpViewScrollableContainer::eraseResizeLines () { if (m_resizeRoundedLastViewX >= 0 && m_resizeRoundedLastViewY >= 0) { - repaintWidgetAtResizeLines (viewport ()); - repaintWidgetAtResizeLines (m_view); + tqrepaintWidgetAtResizeLines (viewport ()); + tqrepaintWidgetAtResizeLines (m_view); - repaintWidgetAtResizeLines (m_bottomGrip); - repaintWidgetAtResizeLines (m_rightGrip); - repaintWidgetAtResizeLines (m_bottomRightGrip); + tqrepaintWidgetAtResizeLines (m_bottomGrip); + tqrepaintWidgetAtResizeLines (m_rightGrip); + tqrepaintWidgetAtResizeLines (m_bottomRightGrip); } } @@ -702,19 +702,19 @@ void kpViewScrollableContainer::drawResizeLines () TQPainter p (viewport (), true/*unclipped*/); - p.setRasterOp (Qt::NotROP); + p.setRasterOp (TQt::NotROP); const TQRect rightRect = rightResizeLineRect (); if (rightRect.isValid ()) - p.fillRect (mapViewToViewport (rightRect), Qt::white); + p.fillRect (mapViewToViewport (rightRect), TQt::white); const TQRect bottomRect = bottomResizeLineRect (); if (bottomRect.isValid ()) - p.fillRect (mapViewToViewport (bottomRect), Qt::white); + p.fillRect (mapViewToViewport (bottomRect), TQt::white); const TQRect bottomRightRect = bottomRightResizeLineRect (); if (bottomRightRect.isValid ()) - p.fillRect (mapViewToViewport (bottomRightRect), Qt::white); + p.fillRect (mapViewToViewport (bottomRightRect), TQt::white); p.end (); } @@ -816,8 +816,8 @@ void kpViewScrollableContainer::slotGripContinuedDraw (int inViewDX, int inViewD m_haveMovedFromOriginalDocSize = true; - updateResizeLines (QMAX (1, QMAX (m_view->width () + viewDX, (int) m_view->transformDocToViewX (1))), - QMAX (1, QMAX (m_view->height () + viewDY, (int) m_view->transformDocToViewY (1))), + updateResizeLines (TQMAX (1, TQMAX (m_view->width () + viewDX, (int) m_view->transformDocToViewX (1))), + TQMAX (1, TQMAX (m_view->height () + viewDY, (int) m_view->transformDocToViewY (1))), viewDX, viewDY); emit continuedDocResize (newDocSize ()); @@ -881,7 +881,7 @@ void kpViewScrollableContainer::recalculateStatusMessage () { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER kdDebug () << "kpViewScrollabelContainer::recalculateStatusMessage()" << endl; - kdDebug () << "\tQCursor::pos=" << TQCursor::pos () + kdDebug () << "\tTQCursor::pos=" << TQCursor::pos () << " global visibleRect=" << kpWidgetMapper::toGlobal (this, TQRect (0, 0, visibleWidth (), visibleHeight ())) @@ -898,23 +898,23 @@ void kpViewScrollableContainer::recalculateStatusMessage () // if (kpWidgetMapper::toGlobal (this, TQRect (0, 0, visibleWidth (), visibleHeight ())) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { if (m_bottomRightGrip->isShown () && m_bottomRightGrip->hotRect (true/*to global*/) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { m_bottomRightGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } else if (m_bottomGrip->isShown () && m_bottomGrip->hotRect (true/*to global*/) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { m_bottomGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } else if (m_rightGrip->isShown () && m_rightGrip->hotRect (true/*to global*/) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { m_rightGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } @@ -988,7 +988,7 @@ void kpViewScrollableContainer::connectViewSignals () } -// public virtual [base QScrollView] +// public virtual [base TQScrollView] void kpViewScrollableContainer::addChild (TQWidget *widget, int x, int y) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1119,7 +1119,7 @@ bool kpViewScrollableContainer::beginDragScroll (const TQPoint &/*docPoint*/, bool stopDragScroll = true; bool scrolled = false; - if (!noDragScrollRect ().contains (p)) + if (!noDragScrollRect ().tqcontains (p)) { if (m_dragScrollTimer->isActive ()) { @@ -1241,8 +1241,8 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething) << endl; #endif - dx *= dxMultiplier;// * QMAX (1, m_zoomLevel / 100); - dy *= dyMultiplier;// * QMAX (1, m_zoomLevel / 100); + dx *= dxMultiplier;// * TQMAX (1, m_zoomLevel / 100); + dy *= dyMultiplier;// * TQMAX (1, m_zoomLevel / 100); if (dx || dy) { @@ -1269,7 +1269,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething) // Repaint newly exposed region immediately to reduce tearing // of scrollView. - m_view->repaint (region, false/*no erase*/); + m_view->tqrepaint (region, false/*no erase*/); } } @@ -1284,7 +1284,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething) return scrolled; } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::contentsDragMoveEvent (TQDragMoveEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1303,7 +1303,7 @@ bool kpViewScrollableContainer::slotDragScroll () } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::contentsMouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1315,7 +1315,7 @@ void kpViewScrollableContainer::contentsMouseMoveEvent (TQMouseEvent *e) TQScrollView::contentsMouseMoveEvent (e); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::mouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1328,7 +1328,7 @@ void kpViewScrollableContainer::mouseMoveEvent (TQMouseEvent *e) } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::contentsWheelEvent (TQWheelEvent *e) { e->ignore (); @@ -1348,13 +1348,13 @@ TQRect kpViewScrollableContainer::noDragScrollRect () const height () - DragScrollLeftTopMargin - DragScrollRightBottomMargin); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] bool kpViewScrollableContainer::eventFilter (TQObject *watchedObject, TQEvent *event) { return TQScrollView::eventFilter (watchedObject, event); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::viewportPaintEvent (TQPaintEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1366,7 +1366,7 @@ void kpViewScrollableContainer::viewportPaintEvent (TQPaintEvent *e) TQScrollView::viewportPaintEvent (e); } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpViewScrollableContainer::paintEvent (TQPaintEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0 @@ -1378,7 +1378,7 @@ void kpViewScrollableContainer::paintEvent (TQPaintEvent *e) TQScrollView::paintEvent (e); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::resizeEvent (TQResizeEvent *e) { TQScrollView::resizeEvent (e); diff --git a/kolourpaint/kpviewscrollablecontainer.h b/kolourpaint/kpviewscrollablecontainer.h index ad948e9a..08f79b1e 100644 --- a/kolourpaint/kpviewscrollablecontainer.h +++ b/kolourpaint/kpviewscrollablecontainer.h @@ -45,9 +45,10 @@ class kpMainWindow; // TODO: refactor by sharing iface's with kpTool -class kpGrip : public QWidget +class kpGrip : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum GripType @@ -57,7 +58,7 @@ public: }; kpGrip (GripType type, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpGrip (); GripType type () const; @@ -112,12 +113,13 @@ protected: }; -class kpViewScrollableContainer : public QScrollView +class kpViewScrollableContainer : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - kpViewScrollableContainer (kpMainWindow *parent, const char *name = 0); + kpViewScrollableContainer (kpMainWindow *tqparent, const char *name = 0); virtual ~kpViewScrollableContainer (); // Same as contentsX() and contentsY() except that after @@ -169,9 +171,9 @@ protected: TQRect mapViewportToGlobal (const TQRect &viewportRect); TQRect mapViewToGlobal (const TQRect &viewRect); - void repaintWidgetAtResizeLineViewRect (TQWidget *widget, + void tqrepaintWidgetAtResizeLineViewRect (TQWidget *widget, const TQRect &resizeLineViewRect); - void repaintWidgetAtResizeLines (TQWidget *widget); + void tqrepaintWidgetAtResizeLines (TQWidget *widget); void eraseResizeLines (); void drawResizeLines (); @@ -211,7 +213,7 @@ protected slots: void slotViewDestroyed (); public slots: - // TODO: Why the QPoint's? + // TODO: Why the TQPoint's? // Why the need for view's zoomLevel? We have the view() anyway. bool beginDragScroll (const TQPoint &, const TQPoint &, int zoomLevel, diff --git a/kolourpaint/patches/doc_resize_no_flicker.diff b/kolourpaint/patches/doc_resize_no_flicker.diff index ae5f9aba..3e763f95 100644 --- a/kolourpaint/patches/doc_resize_no_flicker.diff +++ b/kolourpaint/patches/doc_resize_no_flicker.diff @@ -117,9 +117,9 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp + // protected --void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect ( +-void kpViewScrollableContainer::tqrepaintWidgetAtResizeLineViewRect ( - QWidget *widget, const QRect &resizeLineViewRect) -+void kpViewScrollableContainer::repaintWidgetRegion ( ++void kpViewScrollableContainer::tqrepaintWidgetRegion ( + QWidget *widget, + const QRegion &viewRegion) { @@ -147,18 +147,18 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp // TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)" // but for some reason, doesn't work for viewport(). const bool erase = !dynamic_cast (widget); -- widget->repaint (redrawWidgetRect, erase); -+ widget->repaint (redrawWidgetRegion, erase); +- widget->tqrepaint (redrawWidgetRect, erase); ++ widget->tqrepaint (redrawWidgetRegion, erase); } } // protected --void kpViewScrollableContainer::repaintWidgetAtResizeLines (QWidget *widget) +-void kpViewScrollableContainer::tqrepaintWidgetAtResizeLines (QWidget *widget) +void kpViewScrollableContainer::eraseResizeLines (const QRegion &viewRegion) { -- repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); -- repaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); -- repaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); +- tqrepaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); +- tqrepaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); +- tqrepaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); -} + if (viewRegion.isEmpty ()) + return; @@ -168,19 +168,19 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp -{ - if (m_resizeRoundedLastViewX >= 0 && m_resizeRoundedLastViewY >= 0) - { -- repaintWidgetAtResizeLines (viewport ()); -- repaintWidgetAtResizeLines (m_view); +- tqrepaintWidgetAtResizeLines (viewport ()); +- tqrepaintWidgetAtResizeLines (m_view); -- repaintWidgetAtResizeLines (m_bottomGrip); -- repaintWidgetAtResizeLines (m_rightGrip); -- repaintWidgetAtResizeLines (m_bottomRightGrip); +- tqrepaintWidgetAtResizeLines (m_bottomGrip); +- tqrepaintWidgetAtResizeLines (m_rightGrip); +- tqrepaintWidgetAtResizeLines (m_bottomRightGrip); - } -+ repaintWidgetRegion (viewport (), viewRegion); -+ repaintWidgetRegion (m_view, viewRegion); ++ tqrepaintWidgetRegion (viewport (), viewRegion); ++ tqrepaintWidgetRegion (m_view, viewRegion); + -+ repaintWidgetRegion (m_bottomGrip, viewRegion); -+ repaintWidgetRegion (m_rightGrip, viewRegion); -+ repaintWidgetRegion (m_bottomRightGrip, viewRegion); ++ tqrepaintWidgetRegion (m_bottomGrip, viewRegion); ++ tqrepaintWidgetRegion (m_rightGrip, viewRegion); ++ tqrepaintWidgetRegion (m_bottomRightGrip, viewRegion); } @@ -502,11 +502,11 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h QRect mapViewToGlobal (const QRect &viewRect); + QRegion mapViewToGlobal (const QRegion &viewRegion); -- void repaintWidgetAtResizeLineViewRect (QWidget *widget, +- void tqrepaintWidgetAtResizeLineViewRect (QWidget *widget, - const QRect &resizeLineViewRect); -- void repaintWidgetAtResizeLines (QWidget *widget); +- void tqrepaintWidgetAtResizeLines (QWidget *widget); - void eraseResizeLines (); -+ void repaintWidgetRegion (QWidget *widget, ++ void tqrepaintWidgetRegion (QWidget *widget, + const QRegion &viewRegion); + void eraseResizeLines (const QRegion &viewRegion); @@ -519,7 +519,7 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h virtual void viewportPaintEvent (QPaintEvent *e); virtual void paintEvent (QPaintEvent *e); -+protected slots: ++protected Q_SLOTS: + void windowActivationChanged (); +protected: + virtual void windowActivationChange (bool wasActive); diff --git a/kolourpaint/pixmapfx/kpcoloreffect.cpp b/kolourpaint/pixmapfx/kpcoloreffect.cpp index b0e04496..9b8262dd 100644 --- a/kolourpaint/pixmapfx/kpcoloreffect.cpp +++ b/kolourpaint/pixmapfx/kpcoloreffect.cpp @@ -80,7 +80,7 @@ void kpColorEffectCommand::execute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); const TQPixmap oldPixmap = *doc->pixmap (m_actOnSelection); @@ -107,7 +107,7 @@ void kpColorEffectCommand::unexecute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap newPixmap; @@ -133,8 +133,8 @@ void kpColorEffectCommand::unexecute () kpColorEffectWidget::kpColorEffectWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : TQWidget (parent, name), + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), m_actOnSelection (actOnSelection), m_mainWindow (mainWindow) { @@ -148,7 +148,7 @@ kpColorEffectWidget::~kpColorEffectWidget () // public TQString kpColorEffectWidget::caption () const { - return TQString::null; + return TQString(); } diff --git a/kolourpaint/pixmapfx/kpcoloreffect.h b/kolourpaint/pixmapfx/kpcoloreffect.h index afd60a5e..1286e794 100644 --- a/kolourpaint/pixmapfx/kpcoloreffect.h +++ b/kolourpaint/pixmapfx/kpcoloreffect.h @@ -71,14 +71,15 @@ private: }; -class kpColorEffectWidget : public QWidget +class kpColorEffectWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: kpColorEffectWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpColorEffectWidget (); signals: diff --git a/kolourpaint/pixmapfx/kpeffectbalance.cpp b/kolourpaint/pixmapfx/kpeffectbalance.cpp index d4e26a9c..c19c352b 100644 --- a/kolourpaint/pixmapfx/kpeffectbalance.cpp +++ b/kolourpaint/pixmapfx/kpeffectbalance.cpp @@ -91,7 +91,7 @@ static inline int contrast (int base, int strength) static inline int gamma (int base, int strength) { - return between0And255 (qRound (255.0 * pow (base / 255.0, 1.0 / pow (10, strength / 50.0)))); + return between0And255 (tqRound (255.0 * pow (base / 255.0, 1.0 / pow (10, strength / 50.0)))); } @@ -105,13 +105,13 @@ static inline int brightnessContrastGamma (int base, newGamma); } -static inline QRgb brightnessContrastGammaForRGB (QRgb rgb, +static inline TQRgb brightnessContrastGammaForRGB (TQRgb rgb, int channels, int brightness, int contrast, int gamma) { - int red = qRed (rgb); - int green = qGreen (rgb); - int blue = qBlue (rgb); + int red = tqRed (rgb); + int green = tqGreen (rgb); + int blue = tqBlue (rgb); if (channels & kpEffectBalanceCommand::Red) @@ -122,7 +122,7 @@ static inline QRgb brightnessContrastGammaForRGB (QRgb rgb, blue = brightnessContrastGamma (blue, brightness, contrast, gamma); - return qRgba (red, green, blue, qAlpha (rgb)); + return tqRgba (red, green, blue, tqAlpha (rgb)); } @@ -147,13 +147,13 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap, #endif - Q_UINT8 transformRed [256], + TQ_UINT8 transformRed [256], transformGreen [256], transformBlue [256]; for (int i = 0; i < 256; i++) { - Q_UINT8 applied = (Q_UINT8) brightnessContrastGamma (i, brightness, contrast, gamma); + TQ_UINT8 applied = (TQ_UINT8) brightnessContrastGamma (i, brightness, contrast, gamma); if (channels & kpEffectBalanceCommand::Red) transformRed [i] = applied; @@ -182,15 +182,15 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap, { for (int x = 0; x < image.width (); x++) { - const QRgb rgb = image.pixel (x, y); + const TQRgb rgb = image.pixel (x, y); - const Q_UINT8 red = (Q_UINT8) qRed (rgb); - const Q_UINT8 green = (Q_UINT8) qGreen (rgb); - const Q_UINT8 blue = (Q_UINT8) qBlue (rgb); - const Q_UINT8 alpha = (Q_UINT8) qAlpha (rgb); + const TQ_UINT8 red = (TQ_UINT8) tqRed (rgb); + const TQ_UINT8 green = (TQ_UINT8) tqGreen (rgb); + const TQ_UINT8 blue = (TQ_UINT8) tqBlue (rgb); + const TQ_UINT8 alpha = (TQ_UINT8) tqAlpha (rgb); image.setPixel (x, y, - qRgba (transformRed [red], + tqRgba (transformRed [red], transformGreen [green], transformBlue [blue], alpha)); @@ -208,15 +208,15 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap, { for (int i = 0; i < image.numColors (); i++) { - const QRgb rgb = image.color (i); + const TQRgb rgb = image.color (i); - const Q_UINT8 red = (Q_UINT8) qRed (rgb); - const Q_UINT8 green = (Q_UINT8) qGreen (rgb); - const Q_UINT8 blue = (Q_UINT8) qBlue (rgb); - const Q_UINT8 alpha = (Q_UINT8) qAlpha (rgb); + const TQ_UINT8 red = (TQ_UINT8) tqRed (rgb); + const TQ_UINT8 green = (TQ_UINT8) tqGreen (rgb); + const TQ_UINT8 blue = (TQ_UINT8) tqBlue (rgb); + const TQ_UINT8 alpha = (TQ_UINT8) tqAlpha (rgb); image.setColor (i, - qRgba (transformRed [red], + tqRgba (transformRed [red], transformGreen [green], transformBlue [blue], alpha)); @@ -253,8 +253,8 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + TQWidget *tqparent, const char *name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQGridLayout *lay = new TQGridLayout (this, 5, 5, marginHint (), spacingHint ()); @@ -275,9 +275,9 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection, // TODO: This is what should be shown in the m_gammaInput spinbox m_gammaLabel = new TQLabel (this); // TODO: This doesn't seem to be wide enough with some fonts so the - // whole layout moves when we drag the gamma slider. + // whole tqlayout moves when we drag the gamma slider. m_gammaLabel->setMinimumWidth (m_gammaLabel->fontMetrics ().width (" 10.00 ")); - m_gammaLabel->setAlignment (m_gammaLabel->alignment () | Qt::AlignRight); + m_gammaLabel->tqsetAlignment (m_gammaLabel->tqalignment () | TQt::AlignRight); TQPushButton *gammaResetPushButton = new TQPushButton (i18n ("Rese&t"), this); @@ -317,11 +317,11 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection, lay->addWidget (gammaResetPushButton, 2, 4); lay->addMultiCellWidget (spaceWidget, 3, 3, 0, 4); - lay->addMultiCellWidget (resetPushButton, 4, 4, 2, 4, Qt::AlignRight); + lay->addMultiCellWidget (resetPushButton, 4, 4, 2, 4, TQt::AlignRight); lay->addWidget (channelLabel, 4, 0); - lay->addWidget (m_channelsComboBox, 4, 1, Qt::AlignLeft); - //lay->addWidget (resetPushButton, 4, 2, Qt::AlignRight); + lay->addWidget (m_channelsComboBox, 4, 1, TQt::AlignLeft); + //lay->addWidget (resetPushButton, 4, 2, TQt::AlignRight); lay->setColStretch (1, 1); @@ -438,7 +438,7 @@ void kpEffectBalanceWidget::recalculateGammaLabel () 'f'/*[-]9.9*/, 2/*precision*/) + " "); - m_gammaLabel->repaint (); + m_gammaLabel->tqrepaint (); } @@ -499,7 +499,7 @@ void kpEffectBalanceWidget::resetAll () return; // Prevent multiple settingsChanged() which would normally result in - // redundant, expensive preview repaints + // redundant, expensive preview tqrepaints blockSignals (true); resetBrightness (); diff --git a/kolourpaint/pixmapfx/kpeffectbalance.h b/kolourpaint/pixmapfx/kpeffectbalance.h index e80bb7a6..f44004a2 100644 --- a/kolourpaint/pixmapfx/kpeffectbalance.h +++ b/kolourpaint/pixmapfx/kpeffectbalance.h @@ -74,11 +74,12 @@ protected: class kpEffectBalanceWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectBalanceWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectBalanceWidget (); virtual TQString caption () const; diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp index 9986df4f..145ed78c 100644 --- a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp +++ b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp @@ -52,7 +52,7 @@ static TQString nameForType (kpEffectBlurSharpenCommand::Type type) else if (type == kpEffectBlurSharpenCommand::Sharpen) return i18n ("Sharpen"); else - return TQString::null; + return TQString(); } @@ -88,10 +88,10 @@ TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap, << endl; #endif - // (KImageEffect::(blur|sharpen)() ignores mask) + // (KImageEffect::(blur|sharpen)() ignores tqmask) TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels ( pixmap, - Qt::white/*arbitrarily chosen*/); + TQt::white/*arbitrarily chosen*/); TQImage image = kpPixmapFX::convertToImage (usePixmap); @@ -107,9 +107,9 @@ TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap, TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image); - // KImageEffect::(blur|sharpen)() nukes mask - restore it - if (usePixmap.mask ()) - retPixmap.setMask (*usePixmap.mask ()); + // KImageEffect::(blur|sharpen)() nukes tqmask - restore it + if (usePixmap.tqmask ()) + retPixmap.setMask (*usePixmap.tqmask ()); return retPixmap; @@ -125,8 +125,8 @@ TQPixmap kpEffectBlurSharpenCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + TQWidget *tqparent, const char *name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ()); @@ -144,7 +144,7 @@ kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection, lay->addWidget (amountLabel, 0, 0); lay->addWidget (m_amountInput, 0, 1); - lay->addMultiCellWidget (m_typeLabel, 1, 1, 0, 1, Qt::AlignCenter); + lay->addMultiCellWidget (m_typeLabel, 1, 1, 0, 1, TQt::AlignCenter); lay->setColStretch (1, 1); @@ -164,7 +164,7 @@ kpEffectBlurSharpenWidget::~kpEffectBlurSharpenWidget () // public virtual [base kpColorEffectWidget] TQString kpEffectBlurSharpenWidget::caption () const { - return TQString::null; + return TQString(); } @@ -281,7 +281,7 @@ int kpEffectBlurSharpenWidget::repeat () const const double SharpenMin = 1; const double SharpenMax = 2; - return qRound (SharpenMin + + return tqRound (SharpenMin + (m_amountInput->value () - 1) * (SharpenMax - SharpenMin) / (m_amountInput->maxValue () - 1)); diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.h b/kolourpaint/pixmapfx/kpeffectblursharpen.h index 54b9c993..e4db5f86 100644 --- a/kolourpaint/pixmapfx/kpeffectblursharpen.h +++ b/kolourpaint/pixmapfx/kpeffectblursharpen.h @@ -74,11 +74,12 @@ protected: class kpEffectBlurSharpenWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectBlurSharpenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectBlurSharpenWidget (); virtual TQString caption () const; diff --git a/kolourpaint/pixmapfx/kpeffectemboss.cpp b/kolourpaint/pixmapfx/kpeffectemboss.cpp index f58f248a..647794db 100644 --- a/kolourpaint/pixmapfx/kpeffectemboss.cpp +++ b/kolourpaint/pixmapfx/kpeffectemboss.cpp @@ -75,10 +75,10 @@ TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap, << endl; #endif - // (KImageEffect::emboss() ignores mask) + // (KImageEffect::emboss() ignores tqmask) TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels ( pixmap, - Qt::white/*arbitrarily chosen*/); + TQt::white/*arbitrarily chosen*/); TQImage image = kpPixmapFX::convertToImage (usePixmap); @@ -91,9 +91,9 @@ TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap, TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image); - // KImageEffect::emboss() nukes mask - restore it - if (usePixmap.mask ()) - retPixmap.setMask (*usePixmap.mask ()); + // KImageEffect::emboss() nukes tqmask - restore it + if (usePixmap.tqmask ()) + retPixmap.setMask (*usePixmap.tqmask ()); return retPixmap; @@ -109,8 +109,8 @@ TQPixmap kpEffectEmbossCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + TQWidget *tqparent, const char *name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ()); @@ -138,7 +138,7 @@ kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection, m_enableCheckBox = new TQCheckBox (i18n ("E&nable"), this); - lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, Qt::AlignCenter); + lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, TQt::AlignCenter); // (settingsChangedDelayed() instead of settingsChanged() so that the @@ -156,7 +156,7 @@ kpEffectEmbossWidget::~kpEffectEmbossWidget () // public virtual [base kpColorEffectWidget] TQString kpEffectEmbossWidget::caption () const { - return TQString::null; + return TQString(); } diff --git a/kolourpaint/pixmapfx/kpeffectemboss.h b/kolourpaint/pixmapfx/kpeffectemboss.h index b77f69e7..215a3cfa 100644 --- a/kolourpaint/pixmapfx/kpeffectemboss.h +++ b/kolourpaint/pixmapfx/kpeffectemboss.h @@ -66,11 +66,12 @@ protected: class kpEffectEmbossWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectEmbossWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectEmbossWidget (); virtual TQString caption () const; diff --git a/kolourpaint/pixmapfx/kpeffectflatten.cpp b/kolourpaint/pixmapfx/kpeffectflatten.cpp index b8dee16c..4357e086 100644 --- a/kolourpaint/pixmapfx/kpeffectflatten.cpp +++ b/kolourpaint/pixmapfx/kpeffectflatten.cpp @@ -131,9 +131,9 @@ TQColor kpEffectFlattenWidget::s_lastColor2; kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { if (!s_lastColor1.isValid () || !s_lastColor2.isValid ()) { @@ -142,11 +142,11 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection, s_lastColor1 = cfg->readColorEntry (kpSettingFlattenEffectColor1); if (!s_lastColor1.isValid ()) - s_lastColor1 = Qt::red; + s_lastColor1 = TQt::red; s_lastColor2 = cfg->readColorEntry (kpSettingFlattenEffectColor2); if (!s_lastColor2.isValid ()) - s_lastColor2 = Qt::blue; + s_lastColor2 = TQt::blue; } diff --git a/kolourpaint/pixmapfx/kpeffectflatten.h b/kolourpaint/pixmapfx/kpeffectflatten.h index a4f06af9..4bdf34d4 100644 --- a/kolourpaint/pixmapfx/kpeffectflatten.h +++ b/kolourpaint/pixmapfx/kpeffectflatten.h @@ -76,11 +76,12 @@ protected: class kpEffectFlattenWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectFlattenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectFlattenWidget (); diff --git a/kolourpaint/pixmapfx/kpeffectinvert.cpp b/kolourpaint/pixmapfx/kpeffectinvert.cpp index 67c1d6d0..aaf2c5d7 100644 --- a/kolourpaint/pixmapfx/kpeffectinvert.cpp +++ b/kolourpaint/pixmapfx/kpeffectinvert.cpp @@ -86,30 +86,30 @@ TQPixmap kpEffectInvertCommand::apply (const TQPixmap &pm, int channels) // public static void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels) { - QRgb mask = qRgba ((channels & Red) ? 0xFF : 0, + TQRgb tqmask = tqRgba ((channels & Red) ? 0xFF : 0, (channels & Green) ? 0xFF : 0, (channels & Blue) ? 0xFF : 0, 0/*don't invert alpha*/); #if DEBUG_KP_EFFECT_INVERT kdDebug () << "kpEffectInvertCommand::apply(channels=" << channels - << ") mask=" << (int *) mask + << ") tqmask=" << (int *) tqmask << endl; #endif if (destImagePtr->depth () > 8) { #if 0 - // SYNC: TODO: Qt BUG - invertAlpha argument is inverted!!! - destImagePtr->invertPixels (true/*no invert alpha (Qt 3.2)*/); + // SYNC: TODO: TQt BUG - invertAlpha argument is inverted!!! + destImagePtr->invertPixels (true/*no invert alpha (TQt 3.2)*/); #else - // Above version works for Qt 3.2 at least. + // Above version works for TQt 3.2 at least. // But this version will always work (slower, though) and supports // inverting particular channels. for (int y = 0; y < destImagePtr->height (); y++) { for (int x = 0; x < destImagePtr->width (); x++) { - destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ mask); + destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ tqmask); } } #endif @@ -118,7 +118,7 @@ void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels) { for (int i = 0; i < destImagePtr->numColors (); i++) { - destImagePtr->setColor (i, destImagePtr->color (i) ^ mask); + destImagePtr->setColor (i, destImagePtr->color (i) ^ tqmask); } } } @@ -149,15 +149,15 @@ TQPixmap kpEffectInvertCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQVBoxLayout *topLevelLay = new TQVBoxLayout (this, marginHint (), spacingHint ()); TQWidget *centerWidget = new TQWidget (this); - topLevelLay->addWidget (centerWidget, 0/*stretch*/, Qt::AlignCenter); + topLevelLay->addWidget (centerWidget, 0/*stretch*/, TQt::AlignCenter); TQVBoxLayout *centerWidgetLay = new TQVBoxLayout (centerWidget, diff --git a/kolourpaint/pixmapfx/kpeffectinvert.h b/kolourpaint/pixmapfx/kpeffectinvert.h index a63237df..67277ac3 100644 --- a/kolourpaint/pixmapfx/kpeffectinvert.h +++ b/kolourpaint/pixmapfx/kpeffectinvert.h @@ -91,11 +91,12 @@ protected: class kpEffectInvertWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectInvertWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectInvertWidget (); diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp index 44fd7ea7..80fadd8d 100644 --- a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp +++ b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp @@ -73,7 +73,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither) #endif - // Hack around Qt's braindead TQImage::convertDepth(1, ...) (with + // Hack around TQt's braindead TQImage::convertDepth(1, ...) (with // dithering off) which produces pathetic results with an image that // only has 2 colours - sometimes it just gives a completely black // result. Instead, we simply preserve the 2 colours. One use case @@ -84,7 +84,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither) #if DEBUG_KP_EFFECT_REDUCE_COLORS kdDebug () << "\tinvoking convert-to-depth 1 hack" << endl; #endif - QRgb color0, color1; + TQRgb color0, color1; bool color0Valid = false, color1Valid = false; bool moreThan2Colors = false; @@ -101,7 +101,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither) { for (int x = 0; x < image.width (); x++) { - QRgb imagePixel = image.pixel (x, y); + TQRgb imagePixel = image.pixel (x, y); if (color0Valid && imagePixel == color0) monoImage.setPixel (x, y, 0); @@ -211,7 +211,7 @@ TQString kpEffectReduceColorsCommand::commandName (int depth, int dither) const } else { - return TQString::null; + return TQString(); } } @@ -240,12 +240,12 @@ void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, boo // HACK: The above "image.convertDepth()" erases the Alpha Channel // (at least for monochrome). - // tqpixmap.html says "alpha masks on monochrome images are ignored." + // tqpixmap.html says "alpha tqmasks on monochrome images are ignored." // - // Put the mask back. + // Put the tqmask back. // - if (destPixmapPtr->mask ()) - pixmap.setMask (*destPixmapPtr->mask ()); + if (destPixmapPtr->tqmask ()) + pixmap.setMask (*destPixmapPtr->tqmask ()); *destPixmapPtr = pixmap; } @@ -276,9 +276,9 @@ TQPixmap kpEffectReduceColorsCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ()); diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.h b/kolourpaint/pixmapfx/kpeffectreducecolors.h index bf44ef3e..df4c0bc0 100644 --- a/kolourpaint/pixmapfx/kpeffectreducecolors.h +++ b/kolourpaint/pixmapfx/kpeffectreducecolors.h @@ -53,7 +53,7 @@ public: TQString commandName (int depth, int dither) const; - // (always preserves mask) + // (always preserves tqmask) static void apply (TQPixmap *destPixmapPtr, int depth, bool dither); static TQPixmap apply (const TQPixmap &pm, int depth, bool dither); @@ -73,11 +73,12 @@ protected: class kpEffectReduceColorsWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectReduceColorsWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectReduceColorsWidget (); diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.cpp b/kolourpaint/pixmapfx/kpeffectsdialog.cpp index 90dfbd32..80a242c3 100644 --- a/kolourpaint/pixmapfx/kpeffectsdialog.cpp +++ b/kolourpaint/pixmapfx/kpeffectsdialog.cpp @@ -59,14 +59,14 @@ int kpEffectsDialog::s_lastHeight = 620; kpEffectsDialog::kpEffectsDialog (bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name) : kpToolPreviewDialog (kpToolPreviewDialog::Preview, true/*reserve top row*/, - TQString::null/*caption*/, - TQString::null/*afterActionText (no Dimensions Group Box)*/, + TQString()/*caption*/, + TQString()/*afterActionText (no Dimensions Group Box)*/, actOnSelection, - parent, + tqparent, name), m_delayedUpdateTimer (new TQTimer (this)), m_effectsComboBox (0), @@ -209,7 +209,7 @@ void kpEffectsDialog::selectEffect (int which) m_colorEffectWidget = 0; - m_settingsGroupBox->setCaption (TQString::null); + m_settingsGroupBox->setCaption (TQString()); #define CREATE_EFFECT_WIDGET(name) \ m_colorEffectWidget = new name (m_actOnSelection, \ @@ -255,23 +255,23 @@ void kpEffectsDialog::selectEffect (int which) // Don't resize the preview when showing the widget: // TODO: actually work - TQSize previewGroupBoxMinSize = m_previewGroupBox->minimumSize (); - TQSize previewGroupBoxMaxSize = m_previewGroupBox->maximumSize (); - TQLayout::ResizeMode previewGroupBoxResizeMode = - m_previewGroupBox->layout () ? - m_previewGroupBox->layout ()->resizeMode () : + TQSize previewGroupBoxMinSize = m_previewGroupBox->tqminimumSize (); + TQSize previewGroupBoxMaxSize = m_previewGroupBox->tqmaximumSize (); + TQLayout::ResizeMode previewGroupBoxResizeMode = + m_previewGroupBox->tqlayout () ? + m_previewGroupBox->tqlayout ()->tqresizeMode () : TQLayout::Auto; #if DEBUG_KP_EFFECTS_DIALOG kdDebug () << "\tpreviewGroupBox: minSize=" << previewGroupBoxMinSize << " maxSize=" << previewGroupBoxMaxSize << " size=" << m_previewGroupBox->size () - << " layout=" << m_previewGroupBox->layout () + << " tqlayout=" << m_previewGroupBox->tqlayout () << " resizeMode=" << previewGroupBoxResizeMode << endl; #endif - if (m_previewGroupBox->layout ()) - m_previewGroupBox->layout ()->setResizeMode (TQLayout::FreeResize); + if (m_previewGroupBox->tqlayout ()) + m_previewGroupBox->tqlayout ()->setResizeMode (TQLayout::FreeResize); #if DEBUG_KP_EFFECTS_DIALOG kdDebug () << "\tafter set resizeMode, previewGroupBox.size=" << m_previewGroupBox->size () << endl; @@ -300,8 +300,8 @@ void kpEffectsDialog::selectEffect (int which) kdDebug () << "\tafter set fixedSize, previewGroupBox.size=" << m_previewGroupBox->size () << endl; #endif - if (m_previewGroupBox->layout ()) - m_previewGroupBox->layout ()->setResizeMode (previewGroupBoxResizeMode); + if (m_previewGroupBox->tqlayout ()) + m_previewGroupBox->tqlayout ()->setResizeMode (previewGroupBoxResizeMode); #if DEBUG_KP_EFFECTS_DIALOG kdDebug () << "\tafter restore resizeMode, previewGroupBox.size=" << m_previewGroupBox->size () << endl; diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.h b/kolourpaint/pixmapfx/kpeffectsdialog.h index c0086cbb..ddb3f8c2 100644 --- a/kolourpaint/pixmapfx/kpeffectsdialog.h +++ b/kolourpaint/pixmapfx/kpeffectsdialog.h @@ -48,10 +48,11 @@ class kpMainWindow; class kpEffectsDialog : public kpToolPreviewDialog { Q_OBJECT + TQ_OBJECT public: kpEffectsDialog (bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name = 0); virtual ~kpEffectsDialog (); diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp index 55238f2d..76731d23 100644 --- a/kolourpaint/pixmapfx/kpfloodfill.cpp +++ b/kolourpaint/pixmapfx/kpfloodfill.cpp @@ -95,22 +95,22 @@ bool kpFloodFill::fill () // not trying to do a NOP fill if (m_boundingRect.isValid ()) { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); - TQPainter painter, maskPainter; - TQBitmap maskBitmap; + TQPainter painter, tqmaskPainter; + TQBitmap tqmaskBitmap; - if (m_pixmapPtr->mask () || m_color.isTransparent ()) + if (m_pixmapPtr->tqmask () || m_color.isTransparent ()) { - maskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (m_color.maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (m_color.tqmaskColor ()); } if (m_color.isOpaque ()) { painter.begin (m_pixmapPtr); - painter.setPen (m_color.toQColor ()); + painter.setPen (m_color.toTQColor ()); } const TQValueList ::ConstIterator fillLinesEnd = m_fillLines.end (); @@ -124,18 +124,18 @@ bool kpFloodFill::fill () if (painter.isActive ()) painter.drawLine (p1, p2); - if (maskPainter.isActive ()) - maskPainter.drawLine (p1, p2); + if (tqmaskPainter.isActive ()) + tqmaskPainter.drawLine (p1, p2); } if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); - if (!maskBitmap.isNull ()) - m_pixmapPtr->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + m_pixmapPtr->setMask (tqmaskBitmap); TQApplication::restoreOverrideCursor (); } @@ -196,7 +196,7 @@ bool kpFloodFill::prepare () kdDebug () << "\tperforming NOP check" << endl; #endif - // get the color we need to replace + // get the color we need to tqreplace if (m_processedColorSimilarity == 0 && m_color == m_colorToChange) { // need to do absolutely nothing (this is a significant optimisation diff --git a/kolourpaint/pixmapfx/kppixmapfx.cpp b/kolourpaint/pixmapfx/kppixmapfx.cpp index 5457ef50..1837a22e 100644 --- a/kolourpaint/pixmapfx/kppixmapfx.cpp +++ b/kolourpaint/pixmapfx/kppixmapfx.cpp @@ -214,7 +214,7 @@ int kpPixmapFX::pointArraySize (const TQPointArray &points) // -// QPixmap/TQImage Conversion Functions +// TQPixmap/TQImage Conversion Functions // // public static @@ -238,9 +238,9 @@ static bool imageHasAlphaChannel (const TQImage &image) { for (int x = 0; x < image.width (); x++) { - const QRgb rgb = image.pixel (x, y); + const TQRgb rgb = image.pixel (x, y); - if (qAlpha (rgb) > 0 && qAlpha (rgb) < 255) + if (tqAlpha (rgb) > 0 && tqAlpha (rgb) < 255) return true; } } @@ -250,7 +250,7 @@ static bool imageHasAlphaChannel (const TQImage &image) static int imageNumColorsUpTo (const TQImage &image, int max) { - TQMap rgbMap; + TQMap rgbMap; if (image.depth () <= 8) { @@ -309,7 +309,7 @@ static void convertToPixmapWarnAboutLoss (const TQImage &image, int screenDepthNeeded = 0; if (moreColorsThanDisplay) - screenDepthNeeded = QMIN (24, image.depth ()); + screenDepthNeeded = TQMIN (24, image.depth ()); #if DEBUG_KP_PIXMAP_FX && 1 kdDebug () << "\ttranslucencyShouldBeShown=" @@ -331,14 +331,14 @@ static void convertToPixmapWarnAboutLoss (const TQImage &image, #endif - TQApplication::setOverrideCursor (Qt::arrowCursor); + TQApplication::setOverrideCursor (TQt::arrowCursor); if (moreColorsThanDisplay && hasAlphaChannel) { KMessageBox::information (wali.m_parent, wali.m_moreColorsThanDisplayAndHasAlphaChannelMessage .arg (screenDepthNeeded), - TQString::null, // or would you prefer "Low Screen Depth and Image Contains Transparency"? :) + TQString(), // or would you prefer "Low Screen Depth and Image Contains Transparency"? :) colorDepthTranslucencyDontAskAgain); if (!KMessageBox::shouldBeShownContinue (colorDepthTranslucencyDontAskAgain)) @@ -387,18 +387,18 @@ TQPixmap kpPixmapFX::convertToPixmap (const TQImage &image, bool pretty, if (!pretty) { destPixmap.convertFromImage (image, - Qt::ColorOnly/*always display depth*/ | - Qt::ThresholdDither/*no dither*/ | - Qt::ThresholdAlphaDither/*no dither alpha*/| - Qt::AvoidDither); + TQt::ColorOnly/*always display depth*/ | + TQt::ThresholdDither/*no dither*/ | + TQt::ThresholdAlphaDither/*no dither alpha*/| + TQt::AvoidDither); } else { destPixmap.convertFromImage (image, - Qt::ColorOnly/*always display depth*/ | - Qt::DiffuseDither/*hi quality dither*/ | - Qt::ThresholdAlphaDither/*no dither alpha*/ | - Qt::PreferDither/*(dither even if <256 colours)*/); + TQt::ColorOnly/*always display depth*/ | + TQt::DiffuseDither/*hi quality dither*/ | + TQt::ThresholdAlphaDither/*no dither alpha*/ | + TQt::PreferDither/*(dither even if <256 colours)*/); } #if DEBUG_KP_PIXMAP_FX && 1 @@ -449,7 +449,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, << " (AvoidDither | ThresholdDither)" << endl; #endif - ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither); + ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither); } // PRE: image.depth() > screenDepth // ASSERT: screenDepth < 32 @@ -470,7 +470,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\tcolors fit on screen - don't dither" << " (AvoidDither | ThresholdDither)" << endl; #endif - ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither); + ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither); } else { @@ -478,7 +478,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\tcolors don't fit on screen - dither" << " (PreferDither | DiffuseDither)" << endl; #endif - ditherFlags = (Qt::PreferDither | Qt::DiffuseDither); + ditherFlags = (TQt::PreferDither | TQt::DiffuseDither); } } // PRE: image.depth() > screenDepth && @@ -519,7 +519,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\t\talways dither (PreferDither | DiffuseDither)" << endl; #endif - ditherFlags = (Qt::PreferDither | Qt::DiffuseDither); + ditherFlags = (TQt::PreferDither | TQt::DiffuseDither); } else { @@ -527,14 +527,14 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\t\tdon't dither (AvoidDither | ThresholdDither)" << endl; #endif - ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither); + ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither); } } destPixmap.convertFromImage (image, - Qt::ColorOnly/*always display depth*/ | - Qt::ThresholdAlphaDither/*no dither alpha*/ | + TQt::ColorOnly/*always display depth*/ | + TQt::ThresholdAlphaDither/*no dither alpha*/ | ditherFlags); #if DEBUG_KP_PIXMAP_FX && 1 @@ -556,7 +556,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap, const TQColor &transparentColor) { - if (!pixmap.mask ()) + if (!pixmap.tqmask ()) return pixmap; TQPixmap retPixmap (pixmap.width (), pixmap.height ()); @@ -566,7 +566,7 @@ TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap, p.drawPixmap (TQPoint (0, 0), pixmap); p.end (); - retPixmap.setMask (*pixmap.mask ()); + retPixmap.setMask (*pixmap.tqmask ()); return retPixmap; } @@ -583,7 +583,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "kpPixmapFX::getPixmapAt(pm.hasMask=" - << (pm.mask () ? 1 : 0) + << (pm.tqmask () ? 1 : 0) << ",rect=" << rect << ")" @@ -599,7 +599,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) kdDebug () << "\tret would contain undefined pixels - setting them to transparent" << endl; #endif TQBitmap transparentMask (rect.width (), rect.height ()); - transparentMask.fill (Qt::color0/*transparent*/); + transparentMask.fill (TQt::color0/*transparent*/); retPixmap.setMask (transparentMask); } @@ -614,14 +614,14 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) const TQPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft (); - // copy data _and_ mask (if avail) + // copy data _and_ tqmask (if avail) copyBlt (&retPixmap, /* dest */ destTopLeft.x (), destTopLeft.y (), /* dest pt */ &pm, /* src */ validSrcRect.x (), validSrcRect.y (), /* src pt */ validSrcRect.width (), validSrcRect.height ()); - if (wouldHaveUndefinedPixels && retPixmap.mask () && !pm.mask ()) + if (wouldHaveUndefinedPixels && retPixmap.tqmask () && !pm.tqmask ()) { #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\tensure opaque in valid region" << endl; @@ -633,7 +633,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\tretPixmap.hasMask=" - << (retPixmap.mask () ? 1 : 0) + << (retPixmap.tqmask () ? 1 : 0) << endl; #endif @@ -652,19 +652,19 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, kdDebug () << "kpPixmapFX::setPixmapAt(destPixmap->rect=" << destPixmapPtr->rect () << ",destPixmap->hasMask=" - << (destPixmapPtr->mask () ? 1 : 0) + << (destPixmapPtr->tqmask () ? 1 : 0) << ",destRect=" << destRect << ",srcPixmap.rect=" << srcPixmap.rect () << ",srcPixmap.hasMask=" - << (srcPixmap.mask () ? 1 : 0) + << (srcPixmap.tqmask () ? 1 : 0) << ")" << endl; #endif #if DEBUG_KP_PIXMAP_FX && 0 - if (destPixmapPtr->mask ()) + if (destPixmapPtr->tqmask ()) { TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr); int numTrans = 0; @@ -673,7 +673,7 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, { for (int x = 0; x < image.width (); x++) { - if (qAlpha (image.pixel (x, y)) == 0) + if (tqAlpha (image.pixel (x, y)) == 0) numTrans++; } } @@ -685,38 +685,38 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, #if 0 // TODO: why does undo'ing a single pen dot on a transparent pixel, // result in a opaque image, except for that single transparent pixel??? - // Qt bug on boundary case? + // TQt bug on boundary case? - // copy data _and_ mask + // copy data _and_ tqmask copyBlt (destPixmapPtr, destAt.x (), destAt.y (), &srcPixmap, 0, 0, destRect.width (), destRect.height ()); #else - bitBlt (destPixmapPtr, + bitBlt (TQT_TQPAINTDEVICE(destPixmapPtr), destRect.x (), destRect.y (), - &srcPixmap, + TQT_TQPAINTDEVICE(const_cast(&srcPixmap)), 0, 0, destRect.width (), destRect.height (), - Qt::CopyROP, - true/*ignore mask*/); + TQt::CopyROP, + true/*ignore tqmask*/); - if (srcPixmap.mask ()) + if (srcPixmap.tqmask ()) { - TQBitmap mask = getNonNullMask (*destPixmapPtr); - bitBlt (&mask, + TQBitmap tqmask = getNonNullMask (*destPixmapPtr); + bitBlt (TQT_TQPAINTDEVICE(&tqmask), destRect.x (), destRect.y (), - srcPixmap.mask (), + TQT_TQPAINTDEVICE(const_cast(srcPixmap.tqmask ())), 0, 0, destRect.width (), destRect.height (), - Qt::CopyROP, - true/*ignore mask*/); - destPixmapPtr->setMask (mask); + TQt::CopyROP, + true/*ignore tqmask*/); + destPixmapPtr->setMask (tqmask); } #endif - if (destPixmapPtr->mask () && !srcPixmap.mask ()) + if (destPixmapPtr->tqmask () && !srcPixmap.tqmask ()) { #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\t\topaque'ing dest rect" << endl; @@ -726,9 +726,9 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\tdestPixmap->hasMask=" - << (destPixmapPtr->mask () ? 1 : 0) + << (destPixmapPtr->tqmask () ? 1 : 0) << endl; - if (destPixmapPtr->mask ()) + if (destPixmapPtr->tqmask ()) { TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr); int numTrans = 0; @@ -737,7 +737,7 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, { for (int x = 0; x < image.width (); x++) { - if (qAlpha (image.pixel (x, y)) == 0) + if (tqAlpha (image.pixel (x, y)) == 0) numTrans++; } } @@ -772,7 +772,7 @@ void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt, if (!destPixmapPtr) return; - // Copy src (masked by src's mask) on top of dest. + // Copy src (tqmasked by src's tqmask) on top of dest. bitBlt (destPixmapPtr, /* dest */ destAt.x (), destAt.y (), /* dest pt */ &srcPixmap, /* src */ @@ -825,7 +825,7 @@ kpColor kpPixmapFX::getColorAtPixel (const TQImage &img, const TQPoint &at) if (!img.valid (at.x (), at.y ())) return kpColor::invalid; - QRgb rgba = img.pixel (at.x (), at.y ()); + TQRgb rgba = img.pixel (at.x (), at.y ()); return kpColor (rgba); } @@ -852,14 +852,14 @@ void kpPixmapFX::ensureNoAlphaChannel (TQPixmap *destPixmapPtr) // public static TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm) { - if (pm.mask ()) - return *pm.mask (); + if (pm.tqmask ()) + return *pm.tqmask (); else { - TQBitmap maskBitmap (pm.width (), pm.height ()); - maskBitmap.fill (Qt::color1/*opaque*/); + TQBitmap tqmaskBitmap (pm.width (), pm.height ()); + tqmaskBitmap.fill (TQt::color1/*opaque*/); - return maskBitmap; + return tqmaskBitmap; } } @@ -870,18 +870,18 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des if (!destPixmapPtr) return; - TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr); + TQBitmap tqmaskBitmap = getNonNullMask (*destPixmapPtr); - TQPainter p (&maskBitmap); + TQPainter p (&tqmaskBitmap); - p.setPen (Qt::color0/*transparent*/); - p.setBrush (Qt::color0/*transparent*/); + p.setPen (TQt::color0/*transparent*/); + p.setBrush (TQt::color0/*transparent*/); p.drawRect (destRect); p.end (); - destPixmapPtr->setMask (maskBitmap); + destPixmapPtr->setMask (tqmaskBitmap); } @@ -916,7 +916,7 @@ void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, const T &brushBitmap, 0, 0, brushBitmap.width (), brushBitmap.height (), - Qt::NotAndROP); + TQt::NotAndROP); destPixmapPtr->setMask (destMaskBitmap); } @@ -934,46 +934,46 @@ void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, int des // public static void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect) { - if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/) + if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/) return; - TQBitmap maskBitmap = *destPixmapPtr->mask (); + TQBitmap tqmaskBitmap = *destPixmapPtr->tqmask (); - TQPainter p (&maskBitmap); + TQPainter p (&tqmaskBitmap); - p.setPen (Qt::color1/*opaque*/); - p.setBrush (Qt::color1/*opaque*/); + p.setPen (TQt::color1/*opaque*/); + p.setBrush (TQt::color1/*opaque*/); p.drawRect (destRect); p.end (); - destPixmapPtr->setMask (maskBitmap); + destPixmapPtr->setMask (tqmaskBitmap); } // public static void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQPoint &destAt, const TQPixmap &srcPixmap) { - if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/) + if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/) return; - TQBitmap destMask = *destPixmapPtr->mask (); + TQBitmap destMask = *destPixmapPtr->tqmask (); - if (srcPixmap.mask ()) + if (srcPixmap.tqmask ()) { bitBlt (&destMask, /* dest */ destAt, /* dest pt */ - srcPixmap.mask (), /* src */ + srcPixmap.tqmask (), /* src */ TQRect (0, 0, srcPixmap.width (), srcPixmap.height ()), /* src rect */ - Qt::OrROP/*if either is opaque, it's opaque*/); + TQt::OrROP/*if either is opaque, it's opaque*/); } else { TQPainter p (&destMask); - p.setPen (Qt::color1/*opaque*/); - p.setBrush (Qt::color1/*opaque*/); + p.setPen (TQt::color1/*opaque*/); + p.setBrush (TQt::color1/*opaque*/); p.drawRect (destAt.x (), destAt.y (), srcPixmap.width (), srcPixmap.height ()); @@ -1012,16 +1012,16 @@ TQPixmap kpPixmapFX::convertToGrayscale (const TQPixmap &pm) return kpPixmapFX::convertToPixmap (image); } -static QRgb toGray (QRgb rgb) +static TQRgb toGray (TQRgb rgb) { // naive way that doesn't preserve brightness - // int gray = (qRed (rgb) + qGreen (rgb) + qBlue (rgb)) / 3; + // int gray = (tqRed (rgb) + tqGreen (rgb) + tqBlue (rgb)) / 3; // over-exaggerates red & blue - // int gray = qGray (rgb); + // int gray = tqGray (rgb); - int gray = (212671 * qRed (rgb) + 715160 * qGreen (rgb) + 72169 * qBlue (rgb)) / 1000000; - return qRgba (gray, gray, gray, qAlpha (rgb)); + int gray = (212671 * tqRed (rgb) + 715160 * tqGreen (rgb) + 72169 * tqBlue (rgb)) / 1000000; + return tqRgba (gray, gray, gray, tqAlpha (rgb)); } // public static @@ -1064,8 +1064,8 @@ void kpPixmapFX::fill (TQPixmap *destPixmapPtr, const kpColor &color) if (color.isOpaque ()) { - destPixmapPtr->setMask (TQBitmap ()); // no mask = opaque - destPixmapPtr->fill (color.toQColor ()); + destPixmapPtr->setMask (TQBitmap ()); // no tqmask = opaque + destPixmapPtr->fill (color.toTQColor ()); } else { @@ -1107,22 +1107,22 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h, #if DEBUG_KP_PIXMAP_FX && 1 kdDebug () << "\tfilling in new areas" << endl; #endif - TQBitmap maskBitmap; - TQPainter painter, maskPainter; + TQBitmap tqmaskBitmap; + TQPainter painter, tqmaskPainter; if (backgroundColor.isOpaque ()) { painter.begin (destPixmapPtr); - painter.setPen (backgroundColor.toQColor ()); - painter.setBrush (backgroundColor.toQColor ()); + painter.setPen (backgroundColor.toTQColor ()); + painter.setBrush (backgroundColor.toTQColor ()); } - if (backgroundColor.isTransparent () || destPixmapPtr->mask ()) + if (backgroundColor.isTransparent () || destPixmapPtr->tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (backgroundColor.maskColor ()); - maskPainter.setBrush (backgroundColor.maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (backgroundColor.tqmaskColor ()); + tqmaskPainter.setBrush (backgroundColor.tqmaskColor ()); } #define PAINTER_CALL(cmd) \ @@ -1130,8 +1130,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h, if (painter.isActive ()) \ painter . cmd ; \ \ - if (maskPainter.isActive ()) \ - maskPainter . cmd ; \ + if (tqmaskPainter.isActive ()) \ + tqmaskPainter . cmd ; \ } if (w > oldWidth) PAINTER_CALL (drawRect (oldWidth, 0, w - oldWidth, oldHeight)); @@ -1140,14 +1140,14 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h, PAINTER_CALL (drawRect (0, oldHeight, w, h - oldHeight)); #undef PAINTER_CALL - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (painter.isActive ()) painter.end (); - if (!maskBitmap.isNull ()) - destPixmapPtr->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + destPixmapPtr->setMask (tqmaskBitmap); } } @@ -1373,12 +1373,12 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_, TQBitmap newBitmapMask; if (backgroundColor.isOpaque ()) - newPixmap.fill (backgroundColor.toQColor ()); + newPixmap.fill (backgroundColor.toTQColor ()); - if (backgroundColor.isTransparent () || pm.mask ()) + if (backgroundColor.isTransparent () || pm.tqmask ()) { newBitmapMask.resize (newPixmap.width (), newPixmap.height ()); - newBitmapMask.fill (backgroundColor.maskColor ()); + newBitmapMask.fill (backgroundColor.tqmaskColor ()); } TQPainter painter (&newPixmap); @@ -1403,12 +1403,12 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_, painter.setWorldMatrix (transformMatrix); #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\ttranslate top=" << painter.xForm (TQPoint (0, 0)) << endl; - kdDebug () << "\tmatrix: m11=" << painter.worldMatrix ().m11 () - << " m12=" << painter.worldMatrix ().m12 () - << " m21=" << painter.worldMatrix ().m21 () - << " m22=" << painter.worldMatrix ().m22 () - << " dx=" << painter.worldMatrix ().dx () - << " dy=" << painter.worldMatrix ().dy () + kdDebug () << "\tmatrix: m11=" << painter.tqworldMatrix ().m11 () + << " m12=" << painter.tqworldMatrix ().m12 () + << " m21=" << painter.tqworldMatrix ().m21 () + << " m22=" << painter.tqworldMatrix ().m22 () + << " dx=" << painter.tqworldMatrix ().dx () + << " dy=" << painter.tqworldMatrix ().dy () << endl; #endif painter.drawPixmap (TQPoint (0, 0), pm); @@ -1416,10 +1416,10 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_, if (!newBitmapMask.isNull ()) { - TQPainter maskPainter (&newBitmapMask); - maskPainter.setWorldMatrix (transformMatrix); - maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm)); - maskPainter.end (); + TQPainter tqmaskPainter (&newBitmapMask); + tqmaskPainter.setWorldMatrix (transformMatrix); + tqmaskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm)); + tqmaskPainter.end (); newPixmap.setMask (newBitmapMask); } diff --git a/kolourpaint/pixmapfx/kppixmapfx.h b/kolourpaint/pixmapfx/kppixmapfx.h index ac52e992..738d82fa 100644 --- a/kolourpaint/pixmapfx/kppixmapfx.h +++ b/kolourpaint/pixmapfx/kppixmapfx.h @@ -87,7 +87,7 @@ public: // - // QPixmap/TQImage Conversion Functions + // TQPixmap/TQImage Conversion Functions // // @@ -100,7 +100,7 @@ public: // is slightly differently colored to . // // KolourPaint needs to convert to TQImage occasionally as - // TQImage allows KolourPaint to read pixels and because the QImage + // TQImage allows KolourPaint to read pixels and because the TQImage // methods give reliable results and pixel-identical results on // all platforms. The TQPixmap paint engine has no such guarantee // and even depends on the quality of the video driver. @@ -128,7 +128,7 @@ public: // // " contains translucency which is not fully" // " supported. The translucency data will be" - // " approximated with a 1-bit transparency mask.") + // " approximated with a 1-bit transparency tqmask.") // // : // i18n ("The (image \"example.jpg\"|image from the clipboard)" @@ -140,21 +140,21 @@ public: // i18n ("The (image \"example.jpg\"|image from the clipboard)" // " contains translucency which is not fully" // " supported. The translucency data will be" - // " approximated with a 1-bit transparency mask.") + // " approximated with a 1-bit transparency tqmask.") // // : // // Don'tAskAgain ID for dialog. // - // : + // : // - // Dialog parent + // Dialog tqparent // WarnAboutLossInfo (const TQString &moreColorsThanDisplayAndHasAlphaChannelMessage, const TQString &moreColorsThanDisplayMessage, const TQString &hasAlphaChannelMessage, const TQString &dontAskAgainPrefix, - TQWidget *parent) + TQWidget *tqparent) : m_moreColorsThanDisplayAndHasAlphaChannelMessage ( moreColorsThanDisplayAndHasAlphaChannelMessage), @@ -164,7 +164,7 @@ public: hasAlphaChannelMessage), m_dontAskAgainPrefix ( dontAskAgainPrefix), - m_parent (parent), + m_parent (tqparent), m_isValid (true) { } @@ -227,7 +227,7 @@ public: // Sets the RGB values of the pixels where is transparent to // . This has visually no effect on the - // unless the mask is lost. + // unless the tqmask is lost. static TQPixmap pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap, const TQColor &transparentColor); @@ -238,19 +238,19 @@ public: // - // Returns the pixel and mask data found at the in . + // Returns the pixel and tqmask data found at the in . // static TQPixmap getPixmapAt (const TQPixmap &pm, const TQRect &rect); // - // Sets the pixel and mask data at in <*destPixmapPtr> + // Sets the pixel and tqmask data at in <*destPixmapPtr> // to . // static void setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, const TQPixmap &srcPixmap); // - // Sets the pixel and mask data at the rectangle in <*destPixmapPtr>, + // Sets the pixel and tqmask data at the rectangle in <*destPixmapPtr>, // with the top-left and dimensions , // to . // @@ -261,7 +261,7 @@ public: // // Draws on top of <*destPixmapPtr> at . - // The mask of <*destPixmapPtr> is adjusted so that all opaque + // The tqmask of <*destPixmapPtr> is adjusted so that all opaque // pixels in will be opaque in <*destPixmapPtr>. // static void paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt, @@ -293,16 +293,16 @@ public: // // Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it - // to a mask. KolourPaint - and TQPixmap to a great extent - does not - // support Alpha Channels - only masks. Call this whenever you get + // to a tqmask. KolourPaint - and TQPixmap to a great extent - does not + // support Alpha Channels - only tqmasks. Call this whenever you get // a pixmap from a foreign source; else all KolourPaint code will // exhibit "undefined behaviour". // static void ensureNoAlphaChannel (TQPixmap *destPixmapPtr); // - // Returns 's mask or a fully opaque mask (with 's dimensions) - // if does not have a mask. + // Returns 's tqmask or a fully opaque tqmask (with 's dimensions) + // if does not have a tqmask. // static TQBitmap getNonNullMask (const TQPixmap &pm); @@ -312,7 +312,7 @@ public: static void ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &destRect); // - // Sets the mask of <*destPixmapPtr> at the rectangle, with the + // Sets the tqmask of <*destPixmapPtr> at the rectangle, with the // top-left and dimensions , // to transparent where is opaque. // diff --git a/kolourpaint/tools/kptoolaction.cpp b/kolourpaint/tools/kptoolaction.cpp index d45acb30..269fd0d0 100644 --- a/kolourpaint/tools/kptoolaction.cpp +++ b/kolourpaint/tools/kptoolaction.cpp @@ -34,11 +34,11 @@ kpToolAction::kpToolAction (const TQString &text, const TQString &pic, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - TQObject *parent, const char *name) + TQObject *tqparent, const char *name) : KToggleAction (text, pic, shortcut, receiver, slot, - parent, name) + tqparent, name) { updateToolTip (); } diff --git a/kolourpaint/tools/kptoolaction.h b/kolourpaint/tools/kptoolaction.h index bf3257c2..c9af7d6d 100644 --- a/kolourpaint/tools/kptoolaction.h +++ b/kolourpaint/tools/kptoolaction.h @@ -38,12 +38,13 @@ class kpToolAction : public KToggleAction, public kpSingleKeyTriggersActionInterface { Q_OBJECT + TQ_OBJECT public: kpToolAction (const TQString &text, const TQString &pic, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - TQObject *parent, const char *name); + TQObject *tqparent, const char *name); virtual ~kpToolAction (); diff --git a/kolourpaint/tools/kptoolairspray.cpp b/kolourpaint/tools/kptoolairspray.cpp index 7f9a2b04..022c534d 100644 --- a/kolourpaint/tools/kptoolairspray.cpp +++ b/kolourpaint/tools/kptoolairspray.cpp @@ -60,7 +60,7 @@ kpToolAirSpray::kpToolAirSpray (kpMainWindow *mainWindow) : kpTool (i18n ("Spraycan"), i18n ("Sprays graffiti"), - Qt::Key_Y, + TQt::Key_Y, mainWindow, "tool_spraycan"), m_currentCommand (0) { @@ -312,21 +312,21 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points) #endif TQPixmap pixmap = document ()->getPixmapAt (docRect); - TQBitmap mask; + TQBitmap tqmask; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; if (m_color.isOpaque ()) { painter.begin (&pixmap); - painter.setPen (m_color.toQColor ()); + painter.setPen (m_color.toTQColor ()); } - if (pixmap.mask () || m_color.isTransparent ()) + if (pixmap.tqmask () || m_color.isTransparent ()) { - mask = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&mask); - maskPainter.setPen (m_color.maskColor ()); + tqmask = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmask); + tqmaskPainter.setPen (m_color.tqmaskColor ()); } for (int i = 0; i < (int) points.count (); i++) @@ -337,18 +337,18 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points) if (painter.isActive ()) painter.drawPoint (pt); - if (maskPainter.isActive ()) - maskPainter.drawPoint (pt); + if (tqmaskPainter.isActive ()) + tqmaskPainter.drawPoint (pt); } - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (painter.isActive ()) painter.end (); - if (!mask.isNull ()) - pixmap.setMask (mask); + if (!tqmask.isNull ()) + pixmap.setMask (tqmask); viewManager ()->setFastUpdates (); document ()->setPixmapAt (pixmap, docRect.topLeft ()); diff --git a/kolourpaint/tools/kptoolairspray.h b/kolourpaint/tools/kptoolairspray.h index ed983980..f968bb97 100644 --- a/kolourpaint/tools/kptoolairspray.h +++ b/kolourpaint/tools/kptoolairspray.h @@ -47,6 +47,7 @@ class kpViewManager; class kpToolAirSpray : public kpTool { Q_OBJECT + TQ_OBJECT public: kpToolAirSpray (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolautocrop.cpp b/kolourpaint/tools/kptoolautocrop.cpp index f0284116..0d103af7 100644 --- a/kolourpaint/tools/kptoolautocrop.cpp +++ b/kolourpaint/tools/kptoolautocrop.cpp @@ -34,7 +34,7 @@ // at the other extreme would not be deemed similar enough. The // key is to find the median color as the reference but how do // you do this if you don't know which pixels to sample in the first -// place (that's what you're trying to find)? Chicken and egg situation. +// place (that's what you're trying to tqfind)? Chicken and egg situation. // // The other heuristic that is in doubt is the use of the average // color in determining the similarity of sides (it is possible @@ -70,7 +70,7 @@ kpToolAutoCropBorder::kpToolAutoCropBorder (const TQPixmap *pixmapPtr, : m_pixmapPtr (pixmapPtr), m_processedColorSimilarity (processedColorSimilarity) { - invalidate (); + tqinvalidate (); } @@ -280,7 +280,7 @@ bool kpToolAutoCropBorder::exists () const } // public -void kpToolAutoCropBorder::invalidate () +void kpToolAutoCropBorder::tqinvalidate () { m_rect = TQRect (); m_referenceColor = kpColor::invalid; @@ -306,7 +306,7 @@ public: void showNothingToAutocropMessage (kpMainWindow *mainWindow, bool actOnSelection) { - kpSetOverrideCursorSaver cursorSaver (Qt::arrowCursor); + kpSetOverrideCursorSaver cursorSaver (TQt::arrowCursor); if (actOnSelection) { @@ -367,14 +367,14 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) botBorder (&pixmap, processedColorSimilarity); - kpSetOverrideCursorSaver cursorSaver (Qt::waitCursor); + kpSetOverrideCursorSaver cursorSaver (TQt::waitCursor); // TODO: With Colour Similarity, a lot of weird (and wonderful) things can // happen resulting in a huge number of code paths. Needs refactoring // and regression testing. // // TODO: e.g. When the top fills entire rect but bot doesn't we could - // invalidate top and continue autocrop. + // tqinvalidate top and continue autocrop. int numRegions = 0; if (!leftBorder.calculate (true/*x*/, +1/*going right*/) || leftBorder.fillsEntirePixmap () || @@ -403,20 +403,20 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) #if DEBUG_KP_TOOL_AUTO_CROP kdDebug () << "\tnumRegions=" << numRegions << endl; kdDebug () << "\t\tleft=" << leftBorder.rect () - << " refCol=" << (leftBorder.exists () ? (int *) leftBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (leftBorder.exists () ? (int *) leftBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (leftBorder.exists () ? (int *) leftBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (leftBorder.exists () ? (int *) leftBorder.averageColor ().toTQRgb () : 0) << endl; kdDebug () << "\t\tright=" << rightBorder.rect () - << " refCol=" << (rightBorder.exists () ? (int *) rightBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (rightBorder.exists () ? (int *) rightBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (rightBorder.exists () ? (int *) rightBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (rightBorder.exists () ? (int *) rightBorder.averageColor ().toTQRgb () : 0) << endl; kdDebug () << "\t\ttop=" << topBorder.rect () - << " refCol=" << (topBorder.exists () ? (int *) topBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (topBorder.exists () ? (int *) topBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (topBorder.exists () ? (int *) topBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (topBorder.exists () ? (int *) topBorder.averageColor ().toTQRgb () : 0) << endl; kdDebug () << "\t\tbot=" << botBorder.rect () - << " refCol=" << (botBorder.exists () ? (int *) botBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (botBorder.exists () ? (int *) botBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (botBorder.exists () ? (int *) botBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (botBorder.exists () ? (int *) botBorder.averageColor ().toTQRgb () : 0) << endl; #endif @@ -439,7 +439,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) #if DEBUG_KP_TOOL_AUTO_CROP kdDebug () << "\tignoring left border" << endl; #endif - leftBorder.invalidate (); + leftBorder.tqinvalidate (); } } @@ -454,7 +454,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) #if DEBUG_KP_TOOL_AUTO_CROP kdDebug () << "\tignoring top border" << endl; #endif - topBorder.invalidate (); + topBorder.tqinvalidate (); } } @@ -654,7 +654,7 @@ void kpToolAutoCropCommand::unexecute () return; TQPixmap pixmap (m_oldWidth, m_oldHeight); - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; // restore the position of the centre image kpPixmapFX::setPixmapAt (&pixmap, m_contentsRect, @@ -663,7 +663,7 @@ void kpToolAutoCropCommand::unexecute () // draw the borders TQPainter painter (&pixmap); - TQPainter maskPainter; + TQPainter tqmaskPainter; const kpToolAutoCropBorder *borders [] = { @@ -690,23 +690,23 @@ void kpToolAutoCropCommand::unexecute () kpColor col = (*b)->referenceColor (); #if DEBUG_KP_TOOL_AUTO_CROP && 1 kdDebug () << "\tdrawing border " << (*b)->rect () - << " rgb=" << (int *) col.toQRgb () /* %X hack */ << endl; + << " rgb=" << (int *) col.toTQRgb () /* %X hack */ << endl; #endif if (col.isOpaque ()) { - painter.fillRect ((*b)->rect (), col.toQColor ()); + painter.fillRect ((*b)->rect (), col.toTQColor ()); } else { - if (maskBitmap.isNull ()) + if (tqmaskBitmap.isNull ()) { // TODO: dangerous when a painter is active on pixmap? - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); } - maskPainter.fillRect ((*b)->rect (), Qt::color0/*transparent*/); + tqmaskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/); } } else @@ -720,24 +720,24 @@ void kpToolAutoCropCommand::unexecute () // and the other branch would execute. if (*p) { - // TODO: We should really edit the mask here. Due to good - // luck (if "maskBitmap" is initialized above, this region - // will be marked as opaque in the mask; if it's not + // TODO: We should really edit the tqmask here. Due to good + // luck (if "tqmaskBitmap" is initialized above, this region + // will be marked as opaque in the tqmask; if it's not // initialized, we will be opaque by default), we - // don't actually have to edit the mask but this is + // don't actually have to edit the tqmask but this is // highly error-prone. painter.drawPixmap ((*b)->rect (), **p); } } } - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); painter.end (); - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); if (!m_actOnSelection) diff --git a/kolourpaint/tools/kptoolautocrop.h b/kolourpaint/tools/kptoolautocrop.h index bb1a5d4a..886b4223 100644 --- a/kolourpaint/tools/kptoolautocrop.h +++ b/kolourpaint/tools/kptoolautocrop.h @@ -69,7 +69,7 @@ public: bool fillsEntirePixmap () const; bool exists () const; - void invalidate (); + void tqinvalidate (); private: const TQPixmap *m_pixmapPtr; diff --git a/kolourpaint/tools/kptoolbrush.cpp b/kolourpaint/tools/kptoolbrush.cpp index 6e684ed9..30c68aee 100644 --- a/kolourpaint/tools/kptoolbrush.cpp +++ b/kolourpaint/tools/kptoolbrush.cpp @@ -32,8 +32,8 @@ kpToolBrush::kpToolBrush (kpMainWindow *mainWindow) : kpToolPen (kpToolPen::Brush, i18n ("Brush"), - i18n ("Draw using brushes of different shapes and sizes"), - Qt::Key_B, + i18n ("Draw using brushes of different tqshapes and sizes"), + TQt::Key_B, mainWindow, "tool_brush") { } diff --git a/kolourpaint/tools/kptoolbrush.h b/kolourpaint/tools/kptoolbrush.h index 69498495..4b86ab9f 100644 --- a/kolourpaint/tools/kptoolbrush.h +++ b/kolourpaint/tools/kptoolbrush.h @@ -34,6 +34,7 @@ class kpToolBrush : public kpToolPen { Q_OBJECT + TQ_OBJECT public: kpToolBrush (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolclear.cpp b/kolourpaint/tools/kptoolclear.cpp index 7b1a775b..b6fa2eab 100644 --- a/kolourpaint/tools/kptoolclear.cpp +++ b/kolourpaint/tools/kptoolclear.cpp @@ -108,7 +108,7 @@ void kpToolClearCommand::execute () kpPixmapFX::fill (&newPixmap, m_newColor); // TODO: maybe disable Image/Clear if transparent colour if (m_newColor.isOpaque ()) - newPixmap.setMask (sel->maskForOwnType ()); + newPixmap.setMask (sel->tqmaskForOwnType ()); sel->setPixmap (newPixmap); } diff --git a/kolourpaint/tools/kptoolcolorpicker.cpp b/kolourpaint/tools/kptoolcolorpicker.cpp index 615012cd..d02a9572 100644 --- a/kolourpaint/tools/kptoolcolorpicker.cpp +++ b/kolourpaint/tools/kptoolcolorpicker.cpp @@ -52,7 +52,7 @@ kpToolColorPicker::kpToolColorPicker (kpMainWindow *mainWindow) : kpTool (i18n ("Color Picker"), i18n ("Lets you select a color from the image"), - Qt::Key_C, + TQt::Key_C, mainWindow, "tool_color_picker") { } diff --git a/kolourpaint/tools/kptoolcolorpicker.h b/kolourpaint/tools/kptoolcolorpicker.h index 6ebaa6d7..b8e79370 100644 --- a/kolourpaint/tools/kptoolcolorpicker.h +++ b/kolourpaint/tools/kptoolcolorpicker.h @@ -42,6 +42,7 @@ class kpColorToolBar; class kpToolColorPicker : public kpTool { Q_OBJECT + TQ_OBJECT public: kpToolColorPicker (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolcolorwasher.cpp b/kolourpaint/tools/kptoolcolorwasher.cpp index 6c2d091f..27679276 100644 --- a/kolourpaint/tools/kptoolcolorwasher.cpp +++ b/kolourpaint/tools/kptoolcolorwasher.cpp @@ -33,7 +33,7 @@ kpToolColorWasher::kpToolColorWasher (kpMainWindow *mainWindow) : kpToolPen (kpToolPen::ColorWasher, i18n ("Color Eraser"), i18n ("Replaces pixels of the foreground color with the background color"), - Qt::Key_O, + TQt::Key_O, mainWindow, "tool_color_washer") { } diff --git a/kolourpaint/tools/kptoolcolorwasher.h b/kolourpaint/tools/kptoolcolorwasher.h index 1a707c3e..537e5723 100644 --- a/kolourpaint/tools/kptoolcolorwasher.h +++ b/kolourpaint/tools/kptoolcolorwasher.h @@ -34,6 +34,7 @@ class kpToolColorWasher : public kpToolPen { Q_OBJECT + TQ_OBJECT public: kpToolColorWasher (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolconverttograyscale.cpp b/kolourpaint/tools/kptoolconverttograyscale.cpp index 524e3e6d..7fe544f2 100644 --- a/kolourpaint/tools/kptoolconverttograyscale.cpp +++ b/kolourpaint/tools/kptoolconverttograyscale.cpp @@ -79,7 +79,7 @@ void kpToolConvertToGrayscaleCommand::execute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_oldPixmapPtr = new TQPixmap (); *m_oldPixmapPtr = *doc->pixmap (m_actOnSelection); diff --git a/kolourpaint/tools/kptoolcrop.cpp b/kolourpaint/tools/kptoolcrop.cpp index f1e530ca..e5483a90 100644 --- a/kolourpaint/tools/kptoolcrop.cpp +++ b/kolourpaint/tools/kptoolcrop.cpp @@ -68,7 +68,7 @@ public: virtual ~kpToolCropSetImageCommand (); /* (uninteresting child of macro cmd) */ - virtual TQString name () const { return TQString::null; } + virtual TQString name () const { return TQString(); } virtual int size () const { @@ -132,7 +132,7 @@ void kpToolCropSetImageCommand::execute () // // The selection is deleted. // - // TODO: Do not introduce a mask if the result will not contain + // TODO: Do not introduce a tqmask if the result will not contain // any transparent pixels. // @@ -167,7 +167,7 @@ void kpToolCropSetImageCommand::execute () kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap, TQPoint (0, 0), - m_fromSelection.maskForOwnType ()); + m_fromSelection.tqmaskForOwnType ()); kpPixmapFX::paintPixmapAt (&newDocPixmap, TQPoint (0, 0), @@ -274,7 +274,7 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow) #endif kpToolSelectionMoveCommand *moveCmd = new kpToolSelectionMoveCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow); moveCmd->moveTo (TQPoint (0, 0), true/*move on exec, not now*/); moveCmd->finalize (); @@ -291,7 +291,7 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow) #if 0 addCommand ( new kpToolSelectionCreateCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, selectionBorderAndMovedTo0_0 (*sel), mainWindow)); #endif diff --git a/kolourpaint/tools/kptoolcurve.cpp b/kolourpaint/tools/kptoolcurve.cpp index f889c1ba..65424026 100644 --- a/kolourpaint/tools/kptoolcurve.cpp +++ b/kolourpaint/tools/kptoolcurve.cpp @@ -35,7 +35,7 @@ kpToolCurve::kpToolCurve (kpMainWindow *mainWindow) : kpToolPolygon (Curve, i18n ("Curve"), i18n ("Draws curves"), - Qt::Key_V, + TQt::Key_V, mainWindow, "tool_curve") { } diff --git a/kolourpaint/tools/kptoolcurve.h b/kolourpaint/tools/kptoolcurve.h index 489ce1fb..29baaead 100644 --- a/kolourpaint/tools/kptoolcurve.h +++ b/kolourpaint/tools/kptoolcurve.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolCurve : public kpToolPolygon { Q_OBJECT + TQ_OBJECT public: kpToolCurve (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolellipse.cpp b/kolourpaint/tools/kptoolellipse.cpp index f3b31dbb..0f52a6ce 100644 --- a/kolourpaint/tools/kptoolellipse.cpp +++ b/kolourpaint/tools/kptoolellipse.cpp @@ -33,7 +33,7 @@ kpToolEllipse::kpToolEllipse (kpMainWindow *mainWindow) : kpToolRectangle (Ellipse, i18n ("Ellipse"), i18n ("Draws ellipses and circles"), - Qt::Key_E, + TQt::Key_E, mainWindow, "tool_ellipse") { } diff --git a/kolourpaint/tools/kptoolellipse.h b/kolourpaint/tools/kptoolellipse.h index fc9bf798..fde8708d 100644 --- a/kolourpaint/tools/kptoolellipse.h +++ b/kolourpaint/tools/kptoolellipse.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolEllipse : public kpToolRectangle { Q_OBJECT + TQ_OBJECT public: kpToolEllipse (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolellipticalselection.cpp b/kolourpaint/tools/kptoolellipticalselection.cpp index 13daf799..353fea9f 100644 --- a/kolourpaint/tools/kptoolellipticalselection.cpp +++ b/kolourpaint/tools/kptoolellipticalselection.cpp @@ -35,7 +35,7 @@ kpToolEllipticalSelection::kpToolEllipticalSelection (kpMainWindow *mainWindow) : kpToolSelection (Ellipse, i18n ("Selection (Elliptical)"), i18n ("Makes an elliptical or circular selection"), - Qt::Key_I, + TQt::Key_I, mainWindow, "tool_elliptical_selection") { } diff --git a/kolourpaint/tools/kptooleraser.cpp b/kolourpaint/tools/kptooleraser.cpp index 1acbf66e..7349f01c 100644 --- a/kolourpaint/tools/kptooleraser.cpp +++ b/kolourpaint/tools/kptooleraser.cpp @@ -32,7 +32,7 @@ kpToolEraser::kpToolEraser (kpMainWindow *mainWindow) : kpToolPen (kpToolPen::Eraser, i18n ("Eraser"), i18n ("Lets you rub out mistakes"), - Qt::Key_A, + TQt::Key_A, mainWindow, "tool_eraser") { } diff --git a/kolourpaint/tools/kptooleraser.h b/kolourpaint/tools/kptooleraser.h index 4dd7704a..8626c67b 100644 --- a/kolourpaint/tools/kptooleraser.h +++ b/kolourpaint/tools/kptooleraser.h @@ -33,7 +33,8 @@ class kpToolEraser : public kpToolPen { -Q_OBJECT +Q_OBJECT +TQ_OBJECT public: kpToolEraser (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolflip.cpp b/kolourpaint/tools/kptoolflip.cpp index 146b639f..1d85dc46 100644 --- a/kolourpaint/tools/kptoolflip.cpp +++ b/kolourpaint/tools/kptoolflip.cpp @@ -80,7 +80,7 @@ TQString kpToolFlipCommand::name () const else { kdError () << "kpToolFlipCommand::name() not asked to flip" << endl; - return TQString::null; + return TQString(); } #endif @@ -120,7 +120,7 @@ void kpToolFlipCommand::flip () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (m_actOnSelection) @@ -149,8 +149,8 @@ void kpToolFlipCommand::flip () bool kpToolFlipDialog::s_lastIsVerticalFlip = true; -kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, TQWidget *parent) - : KDialogBase (parent, 0/*name*/, true/*modal*/, +kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, TQWidget *tqparent) + : KDialogBase (tqparent, 0/*name*/, true/*modal*/, actOnSelection ? i18n ("Flip Selection") : i18n ("Flip Image"), KDialogBase::Ok | KDialogBase::Cancel) { diff --git a/kolourpaint/tools/kptoolflip.h b/kolourpaint/tools/kptoolflip.h index 8399cf40..279fcec7 100644 --- a/kolourpaint/tools/kptoolflip.h +++ b/kolourpaint/tools/kptoolflip.h @@ -65,9 +65,10 @@ private: class kpToolFlipDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - kpToolFlipDialog (bool actOnSelection, TQWidget *parent); + kpToolFlipDialog (bool actOnSelection, TQWidget *tqparent); ~kpToolFlipDialog (); private: diff --git a/kolourpaint/tools/kptoolfloodfill.cpp b/kolourpaint/tools/kptoolfloodfill.cpp index 518820ba..51e35707 100644 --- a/kolourpaint/tools/kptoolfloodfill.cpp +++ b/kolourpaint/tools/kptoolfloodfill.cpp @@ -53,7 +53,7 @@ kpToolFloodFill::kpToolFloodFill (kpMainWindow *mainWindow) : kpTool (i18n ("Flood Fill"), i18n ("Fills regions in the image"), - Qt::Key_F, + TQt::Key_F, mainWindow, "tool_flood_fill"), m_currentCommand (0) { @@ -80,7 +80,7 @@ void kpToolFloodFill::beginDraw () kdDebug () << "kpToolFloodFill::beginDraw()" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); // Flood Fill is an expensive CPU operation so we only fill at a // mouse click (beginDraw ()), not on mouse move (virtually draw()) diff --git a/kolourpaint/tools/kptoolfloodfill.h b/kolourpaint/tools/kptoolfloodfill.h index 73f5aae2..f048f3f1 100644 --- a/kolourpaint/tools/kptoolfloodfill.h +++ b/kolourpaint/tools/kptoolfloodfill.h @@ -48,6 +48,7 @@ class kpToolFloodFillCommand; class kpToolFloodFill : public kpTool { Q_OBJECT + TQ_OBJECT public: kpToolFloodFill (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolfreeformselection.cpp b/kolourpaint/tools/kptoolfreeformselection.cpp index 7c736728..6beab422 100644 --- a/kolourpaint/tools/kptoolfreeformselection.cpp +++ b/kolourpaint/tools/kptoolfreeformselection.cpp @@ -35,7 +35,7 @@ kpToolFreeFormSelection::kpToolFreeFormSelection (kpMainWindow *mainWindow) : kpToolSelection (kpToolSelection::FreeForm, i18n ("Selection (Free-Form)"), i18n ("Makes a free-form selection"), - Qt::Key_M, + TQt::Key_M, mainWindow, "tool_free_form_selection") { } diff --git a/kolourpaint/tools/kptoolline.cpp b/kolourpaint/tools/kptoolline.cpp index 809824d9..e9cf57dd 100644 --- a/kolourpaint/tools/kptoolline.cpp +++ b/kolourpaint/tools/kptoolline.cpp @@ -35,7 +35,7 @@ kpToolLine::kpToolLine (kpMainWindow *mainWindow) : kpToolPolygon (Line, i18n ("Line"), i18n ("Draws lines"), - Qt::Key_L, + TQt::Key_L, mainWindow, "tool_line") { } diff --git a/kolourpaint/tools/kptoolline.h b/kolourpaint/tools/kptoolline.h index 7a956245..82d99510 100644 --- a/kolourpaint/tools/kptoolline.h +++ b/kolourpaint/tools/kptoolline.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolLine : public kpToolPolygon { Q_OBJECT + TQ_OBJECT public: kpToolLine (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolpen.cpp b/kolourpaint/tools/kptoolpen.cpp index b738060c..5c7ff6ea 100644 --- a/kolourpaint/tools/kptoolpen.cpp +++ b/kolourpaint/tools/kptoolpen.cpp @@ -73,7 +73,7 @@ kpToolPen::kpToolPen (Mode mode, kpToolPen::kpToolPen (kpMainWindow *mainWindow) : kpTool (i18n ("Pen"), i18n ("Draws dots and freehand strokes"), - Qt::Key_P, + TQt::Key_P, mainWindow, "tool_pen"), m_mode (Pen), m_toolWidgetBrush (0), @@ -116,7 +116,7 @@ TQString kpToolPen::haventBegunDrawUserMessage () const case ColorWasher: return i18n ("Click or drag to erase pixels of the foreground color."); default: - return TQString::null; + return TQString(); } } @@ -179,7 +179,7 @@ void kpToolPen::end () if (vm) { if (vm->tempPixmap () && vm->tempPixmap ()->isBrush ()) - vm->invalidateTempPixmap (); + vm->tqinvalidateTempPixmap (); if (m_mode & (SquareBrushes | DiverseBrushes)) vm->unsetCursor (); @@ -218,7 +218,7 @@ void kpToolPen::beginDraw () // user starts drawing in the background color, we don't want to leave // the cursor in the foreground colour -- just hide it in all cases // to avoid confusion - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); setUserMessage (cancelUserMessage ()); } @@ -266,15 +266,15 @@ void kpToolPen::hover (const TQPoint &point) } #if DEBUG_KP_TOOL_PEN && 0 - if (document ()->rect ().contains (point)) + if (document ()->rect ().tqcontains (point)) { TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ()); - QRgb v = image.pixel (point.x (), point.y ()); - kdDebug () << "(" << point << "): r=" << qRed (v) - << " g=" << qGreen (v) - << " b=" << qBlue (v) - << " a=" << qAlpha (v) + TQRgb v = image.pixel (point.x (), point.y ()); + kdDebug () << "(" << point << "): r=" << tqRed (v) + << " g=" << tqGreen (v) + << " b=" << tqBlue (v) + << " a=" << tqAlpha (v) << endl; } #endif @@ -282,15 +282,15 @@ void kpToolPen::hover (const TQPoint &point) setUserShapePoints (point); } -bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, +bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, int plotx, int ploty) { - return wash (painter, maskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty)); + return wash (painter, tqmaskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty)); } -bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, +bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, const TQRect &drawRect) @@ -308,8 +308,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, { \ if (painter && painter->isActive ()) \ painter->drawLine (startDrawX, y, x - 1, y); \ - if (maskPainter && maskPainter->isActive ()) \ - maskPainter->drawLine (startDrawX, y, x - 1, y); \ + if (tqmaskPainter && tqmaskPainter->isActive ()) \ + tqmaskPainter->drawLine (startDrawX, y, x - 1, y); \ didSomething = true; \ startDrawX = -1; \ } @@ -331,8 +331,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, #if DEBUG_KP_TOOL_PEN && 0 fprintf (stderr, "y=%i x=%i colorAtPixel=%08X colorToReplace=%08X ... ", y, x, - kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).toQRgb (), - colorToReplace.toQRgb ()); + kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).toTQRgb (), + colorToReplace.toTQRgb ()); #endif if (kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).isSimilarTo (colorToReplace, processedColorSimilarity ())) { @@ -383,33 +383,33 @@ void kpToolPen::globalDraw () if (foregroundColor () == backgroundColor () && processedColorSimilarity () == 0) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); kpToolPenCommand *cmd = new kpToolPenCommand ( i18n ("Color Eraser"), mainWindow ()); - TQPainter painter, maskPainter; - TQBitmap maskBitmap; + TQPainter painter, tqmaskPainter; + TQBitmap tqmaskBitmap; if (backgroundColor ().isOpaque ()) { painter.begin (document ()->pixmap ()); - painter.setPen (backgroundColor ().toQColor ()); + painter.setPen (backgroundColor ().toTQColor ()); } if (backgroundColor ().isTransparent () || - document ()->pixmap ()->mask ()) + document ()->pixmap ()->tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ()); - maskPainter.begin (&maskBitmap); + tqmaskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ()); + tqmaskPainter.begin (&tqmaskBitmap); - maskPainter.setPen (backgroundColor ().maskColor ()); + tqmaskPainter.setPen (backgroundColor ().tqmaskColor ()); } const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ()); TQRect rect = document ()->rect (); - const bool didSomething = wash (&painter, &maskPainter, image, + const bool didSomething = wash (&painter, &tqmaskPainter, image, foregroundColor ()/*replace foreground*/, rect, rect); @@ -417,13 +417,13 @@ void kpToolPen::globalDraw () if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (didSomething) { - if (!maskBitmap.isNull ()) - document ()->pixmap ()->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + document ()->pixmap ()->setMask (tqmaskBitmap); document ()->slotContentsChanged (rect); @@ -471,14 +471,14 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const // OPT: this seems hopelessly inefficient if (c.isOpaque ()) { - pixmap.fill (c.toQColor ()); + pixmap.fill (c.toTQColor ()); } else { - TQBitmap mask (1, 1); - mask.fill (Qt::color0/*transparent*/); + TQBitmap tqmask (1, 1); + tqmask.fill (TQt::color0/*transparent*/); - pixmap.setMask (mask); + pixmap.setMask (tqmask); } // draw onto doc @@ -519,38 +519,38 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const #if DEBUG_KP_TOOL_PEN kdDebug () << "\tconvert to image: " << timer.restart () << "ms" << endl; #endif - TQPainter painter, maskPainter; - TQBitmap maskBitmap; + TQPainter painter, tqmaskPainter; + TQBitmap tqmaskBitmap; if (color (m_mouseButton).isOpaque ()) { painter.begin (&pixmap); - painter.setPen (color (m_mouseButton).toQColor ()); + painter.setPen (color (m_mouseButton).toTQColor ()); } if (color (m_mouseButton).isTransparent () || - pixmap.mask ()) + pixmap.tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (color (m_mouseButton).maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (color (m_mouseButton).tqmaskColor ()); } - bool didSomething = wash (&painter, &maskPainter, + bool didSomething = wash (&painter, &tqmaskPainter, image, - color (1 - m_mouseButton)/*color to replace*/, + color (1 - m_mouseButton)/*color to tqreplace*/, rect, rect); if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (didSomething) { - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); #if DEBUG_KP_TOOL_PEN kdDebug () << "\twashed: " << timer.restart () << "ms" << endl; @@ -594,23 +594,23 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const bool transparent = c.isTransparent (); TQPixmap pixmap = document ()->getPixmapAt (rect); - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; if (m_mode & (DrawsPixels | WashesPixmaps)) { if (!transparent) { painter.begin (&pixmap); - painter.setPen (c.toQColor ()); + painter.setPen (c.toTQColor ()); } - if (transparent || pixmap.mask ()) + if (transparent || pixmap.tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (c.maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (c.tqmaskColor ()); } } @@ -635,8 +635,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (painter.isActive ()) painter.drawLine (sp, ep); - if (maskPainter.isActive ()) - maskPainter.drawLine (sp, ep); + if (tqmaskPainter.isActive ()) + tqmaskPainter.drawLine (sp, ep); didSomething = true; } @@ -678,7 +678,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (m_mode & WashesPixmaps) { - if (wash (&painter, &maskPainter, image, + if (wash (&painter, &tqmaskPainter, image, colorToReplace, rect, plotx + rect.left (), ploty + rect.top ())) { @@ -746,7 +746,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (m_mode & WashesPixmaps) { - if (wash (&painter, &maskPainter, image, + if (wash (&painter, &tqmaskPainter, image, colorToReplace, rect, plotx + rect.left (), oldploty + rect.top ())) { @@ -774,7 +774,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (m_mode & WashesPixmaps) { - if (wash (&painter, &maskPainter, image, + if (wash (&painter, &tqmaskPainter, image, colorToReplace, rect, plotx + rect.left (), ploty + rect.top ())) { @@ -806,8 +806,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); #if DEBUG_KP_TOOL_PEN if (m_mode & WashesPixmaps) @@ -824,8 +824,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (didSomething) { - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); // draw onto doc document ()->setPixmapAt (pixmap, rect.topLeft ()); @@ -920,7 +920,7 @@ void kpToolPen::slotForegroundColorChanged (const kpColor &col) kdDebug () << "kpToolPen::slotForegroundColorChanged()" << endl; #endif if (col.isOpaque ()) - m_brushPixmap [(m_mode & SwappedColors) ? 1 : 0].fill (col.toQColor ()); + m_brushPixmap [(m_mode & SwappedColors) ? 1 : 0].fill (col.toTQColor ()); updateBrushCursor (); } @@ -933,7 +933,7 @@ void kpToolPen::slotBackgroundColorChanged (const kpColor &col) #endif if (col.isOpaque ()) - m_brushPixmap [(m_mode & SwappedColors) ? 0 : 1].fill (col.toQColor ()); + m_brushPixmap [(m_mode & SwappedColors) ? 0 : 1].fill (col.toTQColor ()); updateBrushCursor (); } @@ -948,7 +948,7 @@ void kpToolPen::slotBrushChanged (const TQPixmap &pixmap, bool isDiagonalLine) { m_brushPixmap [i] = pixmap; if (color (i).isOpaque ()) - m_brushPixmap [i].fill (color (i).toQColor ()); + m_brushPixmap [i].fill (color (i).toTQColor ()); } m_brushIsDiagonalLine = isDiagonalLine; @@ -966,7 +966,7 @@ void kpToolPen::slotEraserSizeChanged (int size) for (int i = 0; i < 2; i++) { // Note: No matter what, the eraser's brush pixmap is never given - // a mask. + // a tqmask. // // With a transparent color, since we don't fill anything, the // resize by itself will leave us with garbage pixels. This @@ -978,7 +978,7 @@ void kpToolPen::slotEraserSizeChanged (int size) // which only cares about the opaqueness. m_brushPixmap [i].resize (size, size); if (color (i).isOpaque ()) - m_brushPixmap [i].fill (color (i).toQColor ()); + m_brushPixmap [i].fill (color (i).toTQColor ()); } updateBrushCursor (); diff --git a/kolourpaint/tools/kptoolpen.h b/kolourpaint/tools/kptoolpen.h index 6bf8976a..77d7c33c 100644 --- a/kolourpaint/tools/kptoolpen.h +++ b/kolourpaint/tools/kptoolpen.h @@ -48,6 +48,7 @@ class kpViewManager; class kpToolPen : public kpTool { Q_OBJECT + TQ_OBJECT public: enum Mode @@ -102,11 +103,11 @@ private slots: void slotEraserSizeChanged (int size); private: - bool wash (TQPainter *painter, TQPainter *maskPainter, + bool wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, int plotx, int ploty); - bool wash (TQPainter *painter, TQPainter *maskPainter, + bool wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, const TQRect &drawRect); diff --git a/kolourpaint/tools/kptoolpolygon.cpp b/kolourpaint/tools/kptoolpolygon.cpp index 56c7941d..0e298759 100644 --- a/kolourpaint/tools/kptoolpolygon.cpp +++ b/kolourpaint/tools/kptoolpolygon.cpp @@ -81,7 +81,7 @@ static const char *pointArrayToString (const TQPointArray &pointArray) static TQPen makeMaskPen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle) { - return TQPen (color.maskColor (), + return TQPen (color.tqmaskColor (), lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle, Qt::RoundCap, Qt::RoundJoin); } @@ -90,7 +90,7 @@ static TQPen makePen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyl { if (color.isOpaque ()) { - return TQPen (color.toQColor (), + return TQPen (color.toTQColor (), lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle, Qt::RoundCap, Qt::RoundJoin); } @@ -103,7 +103,7 @@ static TQBrush makeMaskBrush (const kpColor &foregroundColor, kpToolWidgetFillStyle *toolWidgetFillStyle) { if (toolWidgetFillStyle) - return toolWidgetFillStyle->maskBrush (foregroundColor, backgroundColor); + return toolWidgetFillStyle->tqmaskBrush (foregroundColor, backgroundColor); else return Qt::NoBrush; } @@ -155,38 +155,38 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, // draw TQPen pen = makePen (foregroundColor, lineWidth, lineStyle), - maskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle); + tqmaskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle); TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle), - maskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle); + tqmaskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle); TQPixmap pixmap = oldPixmap; - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; - if (pixmap.mask () || - (maskPen.style () != Qt::NoPen && - maskPen.color () == Qt::color0/*transparent*/) || - (maskBrush.style () != Qt::NoBrush && - maskBrush.color () == Qt::color0/*transparent*/)) + if (pixmap.tqmask () || + (tqmaskPen.style () != TQt::NoPen && + tqmaskPen.color () == TQt::color0/*transparent*/) || + (tqmaskBrush.style () != TQt::NoBrush && + tqmaskBrush.color () == TQt::color0/*transparent*/)) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (maskPen); - maskPainter.setBrush (maskBrush); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (tqmaskPen); + tqmaskPainter.setBrush (tqmaskBrush); #if DEBUG_KP_TOOL_POLYGON && 0 - kdDebug () << "\tmaskPainter begin because:" << endl - << "\t\tpixmap.mask=" << pixmap.mask () << endl - << "\t\t(maskPenStyle!=NoPen)=" << (maskPen.style () != Qt::NoPen) << endl - << "\t\t(maskPenColor==trans)=" << (maskPen.color () == Qt::color0) << endl - << "\t\t(maskBrushStyle!=NoBrush)=" << (maskBrush.style () != Qt::NoBrush) << endl - << "\t\t(maskBrushColor==trans)=" << (maskBrush.color () == Qt::color0) << endl; + kdDebug () << "\ttqmaskPainter begin because:" << endl + << "\t\tpixmap.tqmask=" << pixmap.tqmask () << endl + << "\t\t(tqmaskPenStyle!=NoPen)=" << (tqmaskPen.style () != TQt::NoPen) << endl + << "\t\t(tqmaskPenColor==trans)=" << (tqmaskPen.color () == TQt::color0) << endl + << "\t\t(tqmaskBrushStyle!=NoBrush)=" << (tqmaskBrush.style () != TQt::NoBrush) << endl + << "\t\t(tqmaskBrushColor==trans)=" << (tqmaskBrush.color () == TQt::color0) << endl; #endif } - if (pen.style () != Qt::NoPen || - brush.style () != Qt::NoBrush) + if (pen.style () != TQt::NoPen || + brush.style () != TQt::NoBrush) { painter.begin (&pixmap); painter.setPen (pen); @@ -204,11 +204,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, if (painter.isActive ()) \ painter . cmd ; \ \ - if (maskPainter.isActive ()) \ - maskPainter . cmd ; \ + if (tqmaskPainter.isActive ()) \ + tqmaskPainter . cmd ; \ } - // SYNC: Qt bug + // SYNC: TQt bug if (only1PixelInPointArray (pointsInRect)) { PAINTER_CALL (drawPoint (pointsInRect [0])); @@ -234,25 +234,25 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, if (painter.isActive ()) { TQPen XORpen = painter.pen (); - XORpen.setColor (Qt::white); + XORpen.setColor (TQt::white); painter.setPen (XORpen); - painter.setRasterOp (Qt::XorROP); + painter.setRasterOp (TQt::XorROP); } - if (maskPainter.isActive ()) + if (tqmaskPainter.isActive ()) { - TQPen XORpen = maskPainter.pen (); + TQPen XORpen = tqmaskPainter.pen (); // TODO??? #if 0 if (kpTool::isColorTransparent (foregroundColor)) - XORpen.setColor (Qt::color1/*opaque*/); + XORpen.setColor (TQt::color1/*opaque*/); else - XORpen.setColor (Qt::color0/*transparent*/); + XORpen.setColor (TQt::color0/*transparent*/); #endif - maskPainter.setPen (XORpen); + tqmaskPainter.setPen (XORpen); } PAINTER_CALL (drawLine (pointsInRect [0], pointsInRect [count - 1])); @@ -288,11 +288,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); return pixmap; } @@ -315,7 +315,7 @@ kpToolPolygon::kpToolPolygon (Mode mode, kpToolPolygon::kpToolPolygon (kpMainWindow *mainWindow) : kpTool (i18n ("Polygon"), i18n ("Draws polygons"), - Qt::Key_G, + TQt::Key_G, mainWindow, "tool_polygon"), m_mode (Polygon), m_toolWidgetFillStyle (0), @@ -346,7 +346,7 @@ TQString kpToolPolygon::haventBegunShapeUserMessage () const case Curve: return i18n ("Drag out the start and end points."); default: - return TQString::null; + return TQString(); } } @@ -479,7 +479,7 @@ void kpToolPolygon::beginDraw () break; default: - kdError () << "kpToolPolygon::beginDraw() shape" << endl; + kdError () << "kpToolPolygon::beginDraw() tqshape" << endl; break; } } @@ -565,8 +565,8 @@ void kpToolPolygon::applyModifiers () #define sgn(a) ((a)<0?-1:1) // Round distances _before_ adding to any coordinate // (ensures consistent rounding behaviour in x & y directions) - const int newdx = qRound (dist * cos (angle) * sgn (diffx)); - const int newdy = qRound (dist * sin (angle) * sgn (diffy)); + const int newdx = tqRound (dist * cos (angle) * sgn (diffx)); + const int newdy = tqRound (dist * sin (angle) * sgn (diffy)); #undef sgn m_toolLineEndPoint = TQPoint (m_toolLineStartPoint.x () + newdx, @@ -671,7 +671,7 @@ void kpToolPolygon::cancelShape () endDraw (TQPoint (), TQRect ()); commandHistory ()->undo (); #else - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); #endif m_points.resize (0); @@ -781,7 +781,7 @@ void kpToolPolygon::endShape (const TQPoint &, const TQRect &) if (!hasBegunShape ()) return; - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth); diff --git a/kolourpaint/tools/kptoolpolygon.h b/kolourpaint/tools/kptoolpolygon.h index 289fb9ab..50129be3 100644 --- a/kolourpaint/tools/kptoolpolygon.h +++ b/kolourpaint/tools/kptoolpolygon.h @@ -60,6 +60,7 @@ class kpViewManager; class kpToolPolygon : public kpTool { Q_OBJECT + TQ_OBJECT public: enum Mode diff --git a/kolourpaint/tools/kptoolpolyline.cpp b/kolourpaint/tools/kptoolpolyline.cpp index 6299b5b7..aa388ef4 100644 --- a/kolourpaint/tools/kptoolpolyline.cpp +++ b/kolourpaint/tools/kptoolpolyline.cpp @@ -35,7 +35,7 @@ kpToolPolyline::kpToolPolyline (kpMainWindow *mainWindow) : kpToolPolygon (Polyline, i18n ("Connected Lines"), i18n ("Draws connected lines"), - Qt::Key_N, + TQt::Key_N, mainWindow, "tool_polyline") { } diff --git a/kolourpaint/tools/kptoolpolyline.h b/kolourpaint/tools/kptoolpolyline.h index f76a3959..96cfcac5 100644 --- a/kolourpaint/tools/kptoolpolyline.h +++ b/kolourpaint/tools/kptoolpolyline.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolPolyline : public kpToolPolygon { Q_OBJECT + TQ_OBJECT public: kpToolPolyline (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolpreviewdialog.cpp b/kolourpaint/tools/kptoolpreviewdialog.cpp index 5149664b..a9542989 100644 --- a/kolourpaint/tools/kptoolpreviewdialog.cpp +++ b/kolourpaint/tools/kptoolpreviewdialog.cpp @@ -51,14 +51,14 @@ kpToolPreviewDialog::kpToolPreviewDialog (Features features, const TQString &caption, const TQString &afterActionText, bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name) - : KDialogBase (parent, name, true/*modal*/, + : KDialogBase (tqparent, name, true/*modal*/, caption, KDialogBase::Ok | KDialogBase::Cancel), m_afterActionText (afterActionText), m_actOnSelection (actOnSelection), - m_mainWindow (parent), + m_mainWindow (tqparent), m_dimensionsGroupBox (0), m_afterTransformDimensionsLabel (0), m_previewGroupBox (0), @@ -149,10 +149,10 @@ void kpToolPreviewDialog::createDimensionsGroupBox () 2, 2, marginHint () * 2, spacingHint ()); - dimensionsLayout->addWidget (originalLabel, 0, 0, Qt::AlignBottom); - dimensionsLayout->addWidget (originalDimensionsLabel, 0, 1, Qt::AlignBottom); - dimensionsLayout->addWidget (afterTransformLabel, 1, 0, Qt::AlignTop); - dimensionsLayout->addWidget (m_afterTransformDimensionsLabel, 1, 1, Qt::AlignTop); + dimensionsLayout->addWidget (originalLabel, 0, 0, TQt::AlignBottom); + dimensionsLayout->addWidget (originalDimensionsLabel, 0, 1, TQt::AlignBottom); + dimensionsLayout->addWidget (afterTransformLabel, 1, 0, TQt::AlignTop); + dimensionsLayout->addWidget (m_afterTransformDimensionsLabel, 1, 1, TQt::AlignTop); } // private @@ -173,10 +173,10 @@ void kpToolPreviewDialog::createPreviewGroupBox () TQVBoxLayout *previewLayout = new TQVBoxLayout (m_previewGroupBox, marginHint () * 2, - QMAX (1, spacingHint () / 2)); + TQMAX (1, spacingHint () / 2)); previewLayout->addWidget (m_previewPixmapLabel, 1/*stretch*/); - previewLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter); + previewLayout->addWidget (updatePushButton, 0/*stretch*/, TQt::AlignHCenter); } @@ -231,15 +231,15 @@ double kpToolPreviewDialog::aspectScale (int newWidth, int newHeight, double heightScale = double (newHeight) / double (oldHeight); // Keeps aspect ratio - return QMIN (widthScale, heightScale); + return TQMIN (widthScale, heightScale); } // public static int kpToolPreviewDialog::scaleDimension (int dimension, double scale, int min, int max) { - return QMAX (min, - QMIN (max, - qRound (dimension * scale))); + return TQMAX (min, + TQMIN (max, + tqRound (dimension * scale))); } @@ -389,7 +389,7 @@ void kpToolPreviewDialog::updatePreview () m_previewPixmapLabel->setPixmap (previewPixmap); // immediate update esp. for expensive previews - m_previewPixmapLabel->repaint (false/*no erase*/); + m_previewPixmapLabel->tqrepaint (false/*no erase*/); #if DEBUG_KP_TOOL_PREVIEW_DIALOG kdDebug () << "\tafter TQLabel::setPixmap() previewPixmapLabel: w=" @@ -420,7 +420,7 @@ void kpToolPreviewDialog::slotUpdateWithWaitCursor () << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); slotUpdate (); diff --git a/kolourpaint/tools/kptoolpreviewdialog.h b/kolourpaint/tools/kptoolpreviewdialog.h index 074a03ec..98cf28dc 100644 --- a/kolourpaint/tools/kptoolpreviewdialog.h +++ b/kolourpaint/tools/kptoolpreviewdialog.h @@ -46,6 +46,7 @@ class kpResizeSignallingLabel; class kpToolPreviewDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum Features @@ -62,7 +63,7 @@ public: // (in the Dimensions Group Box) e.g. "After Skew:" const TQString &afterActionText, bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name = 0); virtual ~kpToolPreviewDialog (); @@ -76,7 +77,7 @@ public: protected: kpDocument *document () const; - // All widgets must have mainWidget() as their parent + // All widgets must have mainWidget() as their tqparent void addCustomWidgetToFront (TQWidget *w); // see in ctor void addCustomWidget (TQWidget *w); void addCustomWidgetToBack (TQWidget *w) diff --git a/kolourpaint/tools/kptoolrectangle.cpp b/kolourpaint/tools/kptoolrectangle.cpp index 2c717fee..ea749da6 100644 --- a/kolourpaint/tools/kptoolrectangle.cpp +++ b/kolourpaint/tools/kptoolrectangle.cpp @@ -53,43 +53,43 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, kpDocument *document, const TQRect &rect, const TQPoint &startPoint, const TQPoint &endPoint, - const TQPen &pen, const TQPen &maskPen, - const TQBrush &brush, const TQBrush &maskBrush) + const TQPen &pen, const TQPen &tqmaskPen, + const TQBrush &brush, const TQBrush &tqmaskBrush) { TQPixmap pixmap = document->getPixmapAt (rect); - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; #if DEBUG_KP_TOOL_RECTANGLE && 1 kdDebug () << "pixmap: rect=" << rect << " startPoint=" << startPoint << " endPoint=" << endPoint << endl; - kdDebug () << "\tm: p=" << (maskPen.style () != Qt::NoPen) - << " b=" << (maskBrush.style () != Qt::NoBrush) - << " o: p=" << (pen.style () != Qt::NoPen) - << " b=" << (brush.style () != Qt::NoBrush) + kdDebug () << "\tm: p=" << (tqmaskPen.style () != TQt::NoPen) + << " b=" << (tqmaskBrush.style () != TQt::NoBrush) + << " o: p=" << (pen.style () != TQt::NoPen) + << " b=" << (brush.style () != TQt::NoBrush) << endl; - kdDebug () << "\tmaskPen.color()=" << (int *) maskPen.color ().rgb () - << " transparent=" << (int *) Qt::color0.rgb ()/*transparent*/ + kdDebug () << "\ttqmaskPen.color()=" << (int *) tqmaskPen.color ().rgb () + << " transparent=" << (int *) TQt::color0.rgb ()/*transparent*/ << endl; #endif - if (pixmap.mask () || - (maskPen.style () != Qt::NoPen && - maskPen.color () == Qt::color0/*transparent*/) || - (maskBrush.style () != Qt::NoBrush && - maskBrush.color () == Qt::color0/*transparent*/)) + if (pixmap.tqmask () || + (tqmaskPen.style () != TQt::NoPen && + tqmaskPen.color () == TQt::color0/*transparent*/) || + (tqmaskBrush.style () != TQt::NoBrush && + tqmaskBrush.color () == TQt::color0/*transparent*/)) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (maskPen); - maskPainter.setBrush (maskBrush); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (tqmaskPen); + tqmaskPainter.setBrush (tqmaskBrush); } - if (pen.style () != Qt::NoPen || - brush.style () != Qt::NoBrush) + if (pen.style () != TQt::NoPen || + brush.style () != TQt::NoBrush) { painter.begin (&pixmap); painter.setPen (pen); @@ -101,14 +101,14 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, if (painter.isActive ()) \ painter . cmd ; \ \ - if (maskPainter.isActive ()) \ - maskPainter . cmd ; \ + if (tqmaskPainter.isActive ()) \ + tqmaskPainter . cmd ; \ } if (startPoint != endPoint) { #if DEBUG_KP_TOOL_RECTANGLE && 1 - kdDebug () << "\tdraw shape" << endl; + kdDebug () << "\tdraw tqshape" << endl; #endif // TODO: Rectangle of pen width 1, height 1 and width X is rendered @@ -134,7 +134,7 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, #if DEBUG_KP_TOOL_RECTANGLE && 1 kdDebug () << "\tstartPoint == endPoint" << endl; #endif - // SYNC: Work around Qt bug: can't draw 1x1 rectangle + // SYNC: Work around TQt bug: can't draw 1x1 rectangle // Not strictly correct for border width > 1 // but better than not drawing at all PAINTER_CALL (drawPoint (startPoint - rect.topLeft ())); @@ -144,11 +144,11 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); return pixmap; } @@ -173,7 +173,7 @@ kpToolRectangle::kpToolRectangle (Mode mode, kpToolRectangle::kpToolRectangle (kpMainWindow *mainWindow) : kpTool (i18n ("Rectangle"), i18n ("Draws rectangles and squares"), - Qt::Key_R, + TQt::Key_R, mainWindow, "tool_rectangle"), m_mode (Rectangle), m_toolWidgetLineWidth (0), @@ -231,29 +231,29 @@ void kpToolRectangle::slotBackgroundColorChanged (const kpColor &) // private void kpToolRectangle::updatePen (int mouseButton) { - TQColor maskPenColor = color (mouseButton).maskColor (); + TQColor tqmaskPenColor = color (mouseButton).tqmaskColor (); if (!m_toolWidgetLineWidth) { if (color (mouseButton).isOpaque ()) - m_pen [mouseButton] = TQPen (color (mouseButton).toQColor ()); + m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor ()); else - m_pen [mouseButton] = Qt::NoPen; - m_maskPen [mouseButton] = TQPen (maskPenColor); + m_pen [mouseButton] = TQPen(Qt::NoPen); + m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor); } else { if (color (mouseButton).isOpaque ()) { - m_pen [mouseButton] = TQPen (color (mouseButton).toQColor (), + m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor (), m_toolWidgetLineWidth->lineWidth (), - Qt::SolidLine); + TQt::SolidLine); } else - m_pen [mouseButton] = Qt::NoPen; - m_maskPen [mouseButton] = TQPen (maskPenColor, + m_pen [mouseButton] = TQPen(Qt::NoPen); + m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor, m_toolWidgetLineWidth->lineWidth (), - Qt::SolidLine); + TQt::SolidLine); } } @@ -270,14 +270,14 @@ void kpToolRectangle::updateBrush (int mouseButton) color (mouseButton)/*foreground colour*/, color (1 - mouseButton)/*background colour*/); - m_maskBrush [mouseButton] = m_toolWidgetFillStyle->maskBrush ( + m_tqmaskBrush [mouseButton] = m_toolWidgetFillStyle->tqmaskBrush ( color (mouseButton)/*foreground colour*/, color (1 - mouseButton)/*background colour*/); } else { - m_brush [mouseButton] = Qt::NoBrush; - m_maskBrush [mouseButton] = Qt::NoBrush; + m_brush [mouseButton] = TQBrush(Qt::NoBrush); + m_tqmaskBrush [mouseButton] = TQBrush(Qt::NoBrush); } } @@ -436,8 +436,8 @@ void kpToolRectangle::applyModifiers () m_toolRectangleEndPoint = rect.bottomRight (); m_toolRectangleRectWithoutLineWidth = rect; - m_toolRectangleRect = kpTool::neededRect (rect, QMAX (m_pen [m_mouseButton].width (), - m_maskPen [m_mouseButton].width ())); + m_toolRectangleRect = kpTool::neededRect (rect, TQMAX (m_pen [m_mouseButton].width (), + m_tqmaskPen [m_mouseButton].width ())); } void kpToolRectangle::beginDraw () @@ -451,8 +451,8 @@ void kpToolRectangle::updateShape () TQPixmap newPixmap = pixmap (m_mode, document (), m_toolRectangleRect, m_toolRectangleStartPoint, m_toolRectangleEndPoint, - m_pen [m_mouseButton], m_maskPen [m_mouseButton], - m_brush [m_mouseButton], m_maskBrush [m_mouseButton]); + m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton], + m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton]); kpTempPixmap newTempPixmap (false/*always display*/, kpTempPixmap::SetPixmap/*render mode*/, m_toolRectangleRect.topLeft (), @@ -511,7 +511,7 @@ void kpToolRectangle::cancelShape () endDraw (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); mainWindow ()->commandHistory ()->undo (); #else - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); #endif setUserMessage (i18n ("Let go of all the mouse buttons.")); @@ -527,13 +527,13 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &) applyModifiers (); // TODO: flicker - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); mainWindow ()->commandHistory ()->addCommand ( new kpToolRectangleCommand (m_mode, - m_pen [m_mouseButton], m_maskPen [m_mouseButton], - m_brush [m_mouseButton], m_maskBrush [m_mouseButton], + m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton], + m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton], m_toolRectangleRect, m_toolRectangleStartPoint, m_toolRectangleEndPoint, mainWindow ())); @@ -546,15 +546,15 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &) */ kpToolRectangleCommand::kpToolRectangleCommand (kpToolRectangle::Mode mode, - const TQPen &pen, const TQPen &maskPen, - const TQBrush &brush, const TQBrush &maskBrush, + const TQPen &pen, const TQPen &tqmaskPen, + const TQBrush &brush, const TQBrush &tqmaskBrush, const TQRect &rect, const TQPoint &startPoint, const TQPoint &endPoint, kpMainWindow *mainWindow) : kpCommand (mainWindow), m_mode (mode), - m_pen (pen), m_maskPen (maskPen), - m_brush (brush), m_maskBrush (maskBrush), + m_pen (pen), m_tqmaskPen (tqmaskPen), + m_brush (brush), m_tqmaskBrush (tqmaskBrush), m_rect (rect), m_startPoint (startPoint), m_endPoint (endPoint), @@ -581,7 +581,7 @@ TQString kpToolRectangleCommand::name () const return i18n ("Ellipse"); default: kdError () << "kpToolRectangleCommand::name() passed unknown mode: " << int (m_mode) << endl; - return TQString::null; + return TQString(); } } @@ -612,8 +612,8 @@ void kpToolRectangleCommand::execute () doc->setPixmapAt (pixmap (m_mode, doc, m_rect, m_startPoint, m_endPoint, - m_pen, m_maskPen, - m_brush, m_maskBrush), + m_pen, m_tqmaskPen, + m_brush, m_tqmaskBrush), m_rect.topLeft ()); } diff --git a/kolourpaint/tools/kptoolrectangle.h b/kolourpaint/tools/kptoolrectangle.h index a412a475..03ade5a7 100644 --- a/kolourpaint/tools/kptoolrectangle.h +++ b/kolourpaint/tools/kptoolrectangle.h @@ -50,9 +50,10 @@ class kpViewManager; class kpToolRectangle : public kpTool { Q_OBJECT + TQ_OBJECT public: - // it turns out that these shapes are all really the same thing + // it turns out that these tqshapes are all really the same thing // (same options, same feel) - the only real difference is the // drawing functions (a one line change) enum Mode {Rectangle, RoundedRectangle, Ellipse}; @@ -102,10 +103,10 @@ private: kpToolWidgetFillStyle *m_toolWidgetFillStyle; void updatePen (int mouseButton); - TQPen m_pen [2], m_maskPen [2]; + TQPen m_pen [2], m_tqmaskPen [2]; void updateBrush (int mouseButton); - TQBrush m_brush [2], m_maskBrush [2]; + TQBrush m_brush [2], m_tqmaskBrush [2]; void applyModifiers (); TQPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint; @@ -116,8 +117,8 @@ class kpToolRectangleCommand : public kpCommand { public: kpToolRectangleCommand (kpToolRectangle::Mode mode, - const TQPen &pen, const TQPen &maskPen, - const TQBrush &brush, const TQBrush &maskBrush, + const TQPen &pen, const TQPen &tqmaskPen, + const TQBrush &brush, const TQBrush &tqmaskBrush, const TQRect &rect, const TQPoint &startPoint, const TQPoint &endPoint, kpMainWindow *mainWindow); @@ -132,8 +133,8 @@ public: private: kpToolRectangle::Mode m_mode; - TQPen m_pen, m_maskPen; - TQBrush m_brush, m_maskBrush; + TQPen m_pen, m_tqmaskPen; + TQBrush m_brush, m_tqmaskBrush; TQRect m_rect; TQPoint m_startPoint, m_endPoint; TQPixmap *m_oldPixmapPtr; diff --git a/kolourpaint/tools/kptoolrectselection.cpp b/kolourpaint/tools/kptoolrectselection.cpp index 3726cbfe..4c5b2b78 100644 --- a/kolourpaint/tools/kptoolrectselection.cpp +++ b/kolourpaint/tools/kptoolrectselection.cpp @@ -35,7 +35,7 @@ kpToolRectSelection::kpToolRectSelection (kpMainWindow *mainWindow) : kpToolSelection (Rectangle, i18n ("Selection (Rectangular)"), i18n ("Makes a rectangular selection"), - Qt::Key_S, + TQt::Key_S, mainWindow, "tool_rect_selection") { } diff --git a/kolourpaint/tools/kptoolresizescale.cpp b/kolourpaint/tools/kptoolresizescale.cpp index e7f14c5d..40270e1f 100644 --- a/kolourpaint/tools/kptoolresizescale.cpp +++ b/kolourpaint/tools/kptoolresizescale.cpp @@ -138,7 +138,7 @@ TQString kpToolResizeScaleCommand::name () const } } - return TQString::null; + return TQString(); } // public virtual [base kpCommand] @@ -283,7 +283,7 @@ void kpToolResizeScaleCommand::execute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); document ()->selection ()->textResize (m_newWidth, m_newHeight); if (m_mainWindow->tool ()) @@ -294,7 +294,7 @@ void kpToolResizeScaleCommand::execute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (m_newWidth < m_oldWidth) @@ -321,7 +321,7 @@ void kpToolResizeScaleCommand::execute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap = *document ()->pixmap (m_actOnSelection); @@ -395,7 +395,7 @@ void kpToolResizeScaleCommand::unexecute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); document ()->selection ()->textResize (m_oldWidth, m_oldHeight); if (m_mainWindow->tool ()) @@ -406,7 +406,7 @@ void kpToolResizeScaleCommand::unexecute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap newPixmap (m_oldWidth, m_oldHeight); @@ -436,7 +436,7 @@ void kpToolResizeScaleCommand::unexecute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap; @@ -634,7 +634,7 @@ static void toolButtonSetLook (TQToolButton *button, button->setUsesTextLabel (true); button->setTextLabel (name, false/*no tooltip*/); button->setAccel (TQAccel::shortcutKey (name)); - button->setFocusPolicy (TQWidget::StrongFocus); + button->setFocusPolicy (TQ_StrongFocus); button->setToggleButton (true); } @@ -665,17 +665,17 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget) // TODO: ALT+R doesn't select the button. m_resizeButton = new TQToolButton (m_operationGroupBox); toolButtonSetLook (m_resizeButton, - TQString::fromLatin1 ("resize"), + TQString::tqfromLatin1 ("resize"), i18n ("&Resize")); m_scaleButton = new TQToolButton (m_operationGroupBox); toolButtonSetLook (m_scaleButton, - TQString::fromLatin1 ("scale"), + TQString::tqfromLatin1 ("scale"), i18n ("&Scale")); m_smoothScaleButton = new TQToolButton (m_operationGroupBox); toolButtonSetLook (m_smoothScaleButton, - TQString::fromLatin1 ("smooth_scale"), + TQString::tqfromLatin1 ("smooth_scale"), i18n ("S&mooth Scale")); @@ -684,9 +684,9 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget) //m_smoothScaleLabel = new TQLabel (i18n ("S&mooth scale"), m_operationGroupBox); - //m_resizeLabel->setAlignment (m_resizeLabel->alignment () | Qt::ShowPrefix); - //m_scaleLabel->setAlignment (m_scaleLabel->alignment () | Qt::ShowPrefix); - //m_smoothScaleLabel->setAlignment (m_smoothScaleLabel->alignment () | Qt::ShowPrefix); + //m_resizeLabel->tqsetAlignment (m_resizeLabel->tqalignment () | TQt::ShowPrefix); + //m_scaleLabel->tqsetAlignment (m_scaleLabel->tqalignment () | TQt::ShowPrefix); + //m_smoothScaleLabel->tqsetAlignment (m_smoothScaleLabel->tqalignment () | TQt::ShowPrefix); TQButtonGroup *resizeScaleButtonGroup = new TQButtonGroup (baseWidget); @@ -703,14 +703,14 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget) marginHint () * 2/*don't overlap groupbox title*/, spacingHint ()); - operationLayout->addWidget (m_resizeButton, 0, 0, Qt::AlignCenter); - //operationLayout->addWidget (m_resizeLabel, 1, 0, Qt::AlignCenter); + operationLayout->addWidget (m_resizeButton, 0, 0, TQt::AlignCenter); + //operationLayout->addWidget (m_resizeLabel, 1, 0, TQt::AlignCenter); - operationLayout->addWidget (m_scaleButton, 0, 1, Qt::AlignCenter); - //operationLayout->addWidget (m_scaleLabel, 1, 1, Qt::AlignCenter); + operationLayout->addWidget (m_scaleButton, 0, 1, TQt::AlignCenter); + //operationLayout->addWidget (m_scaleLabel, 1, 1, TQt::AlignCenter); - operationLayout->addWidget (m_smoothScaleButton, 0, 2, Qt::AlignCenter); - //operationLayout->addWidget (m_smoothScaleLabel, 1, 2, Qt::AlignCenter); + operationLayout->addWidget (m_smoothScaleButton, 0, 2, TQt::AlignCenter); + //operationLayout->addWidget (m_smoothScaleLabel, 1, 2, TQt::AlignCenter); connect (m_resizeButton, TQT_SIGNAL (toggled (bool)), @@ -727,9 +727,9 @@ void kpToolResizeScaleDialog::createDimensionsGroupBox (TQWidget *baseWidget) m_dimensionsGroupBox = new TQGroupBox (i18n ("Dimensions"), baseWidget); TQLabel *widthLabel = new TQLabel (i18n ("Width:"), m_dimensionsGroupBox); - widthLabel->setAlignment (widthLabel->alignment () | Qt::AlignHCenter); + widthLabel->tqsetAlignment (widthLabel->tqalignment () | TQt::AlignHCenter); TQLabel *heightLabel = new TQLabel (i18n ("Height:"), m_dimensionsGroupBox); - heightLabel->setAlignment (heightLabel->alignment () | Qt::AlignHCenter); + heightLabel->tqsetAlignment (heightLabel->tqalignment () | TQt::AlignHCenter); TQLabel *originalLabel = new TQLabel (i18n ("Original:"), m_dimensionsGroupBox); m_originalWidthInput = new KIntNumInput ( @@ -822,7 +822,7 @@ void kpToolResizeScaleDialog::widthFitHeightToAspectRatio () { // width / height = oldWidth / oldHeight // height = width * oldHeight / oldWidth - const int newHeight = qRound (double (imageWidth ()) * double (originalHeight ()) + const int newHeight = tqRound (double (imageWidth ()) * double (originalHeight ()) / double (originalWidth ())); IGNORE_KEEP_ASPECT_RATIO (m_newHeightInput->setValue (newHeight)); } @@ -835,7 +835,7 @@ void kpToolResizeScaleDialog::heightFitWidthToAspectRatio () { // width / height = oldWidth / oldHeight // width = height * oldWidth / oldHeight - const int newWidth = qRound (double (imageHeight ()) * double (originalWidth ()) + const int newWidth = tqRound (double (imageHeight ()) * double (originalWidth ()) / double (originalHeight ())); IGNORE_KEEP_ASPECT_RATIO (m_newWidthInput->setValue (newWidth)); } @@ -979,7 +979,7 @@ void kpToolResizeScaleDialog::slotPercentWidthChanged (double percentWidth) #endif SET_VALUE_WITHOUT_SIGNAL_EMISSION (m_newWidthInput, - qRound (percentWidth * originalWidth () / 100.0)); + tqRound (percentWidth * originalWidth () / 100.0)); widthFitHeightToAspectRatio (); @@ -996,7 +996,7 @@ void kpToolResizeScaleDialog::slotPercentHeightChanged (double percentHeight) #endif SET_VALUE_WITHOUT_SIGNAL_EMISSION (m_newHeightInput, - qRound (percentHeight * originalHeight () / 100.0)); + tqRound (percentHeight * originalHeight () / 100.0)); heightFitWidthToAspectRatio (); diff --git a/kolourpaint/tools/kptoolresizescale.h b/kolourpaint/tools/kptoolresizescale.h index 1dd95aa0..f0fa2150 100644 --- a/kolourpaint/tools/kptoolresizescale.h +++ b/kolourpaint/tools/kptoolresizescale.h @@ -107,6 +107,7 @@ protected: class kpToolResizeScaleDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: kpToolResizeScaleDialog (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolrotate.cpp b/kolourpaint/tools/kptoolrotate.cpp index fe3a4cbe..5def33ca 100644 --- a/kolourpaint/tools/kptoolrotate.cpp +++ b/kolourpaint/tools/kptoolrotate.cpp @@ -97,7 +97,7 @@ void kpToolRotateCommand::execute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (!m_losslessRotation) @@ -181,7 +181,7 @@ void kpToolRotateCommand::unexecute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap; @@ -294,10 +294,10 @@ void kpToolRotateDialog::createDirectionGroupBox () TQGridLayout *directionLayout = new TQGridLayout (directionGroupBox, 2, 2, marginHint () * 2, spacingHint ()); - directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, Qt::AlignCenter); - directionLayout->addWidget (clockwisePixmapLabel, 0, 1, Qt::AlignCenter); - directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, Qt::AlignCenter); - directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, Qt::AlignCenter); + directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, TQt::AlignCenter); + directionLayout->addWidget (clockwisePixmapLabel, 0, 1, TQt::AlignCenter); + directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, TQt::AlignCenter); + directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, TQt::AlignCenter); connect (m_antiClockwiseRadioButton, TQT_SIGNAL (toggled (bool)), diff --git a/kolourpaint/tools/kptoolrotate.h b/kolourpaint/tools/kptoolrotate.h index 1cff0884..618b29c0 100644 --- a/kolourpaint/tools/kptoolrotate.h +++ b/kolourpaint/tools/kptoolrotate.h @@ -81,10 +81,11 @@ private: class kpToolRotateDialog : public kpToolPreviewDialog { Q_OBJECT + TQ_OBJECT public: kpToolRotateDialog (bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name = 0); virtual ~kpToolRotateDialog (); diff --git a/kolourpaint/tools/kptoolroundedrectangle.cpp b/kolourpaint/tools/kptoolroundedrectangle.cpp index b0f4ba05..0c4c6b6d 100644 --- a/kolourpaint/tools/kptoolroundedrectangle.cpp +++ b/kolourpaint/tools/kptoolroundedrectangle.cpp @@ -33,7 +33,7 @@ kpToolRoundedRectangle::kpToolRoundedRectangle (kpMainWindow *mainWindow) : kpToolRectangle (RoundedRectangle, i18n ("Rounded Rectangle"), i18n ("Draws rectangles and squares with rounded corners"), - Qt::Key_U, + TQt::Key_U, mainWindow, "tool_rounded_rectangle") { } diff --git a/kolourpaint/tools/kptoolroundedrectangle.h b/kolourpaint/tools/kptoolroundedrectangle.h index 924c1b34..cedd3e7f 100644 --- a/kolourpaint/tools/kptoolroundedrectangle.h +++ b/kolourpaint/tools/kptoolroundedrectangle.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolRoundedRectangle : public kpToolRectangle { Q_OBJECT + TQ_OBJECT public: kpToolRoundedRectangle (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolselection.cpp b/kolourpaint/tools/kptoolselection.cpp index 7812c4f9..dc689c4b 100644 --- a/kolourpaint/tools/kptoolselection.cpp +++ b/kolourpaint/tools/kptoolselection.cpp @@ -141,7 +141,7 @@ TQString kpToolSelection::haventBegunDrawUserMessage () const else return i18n ("Left drag to scale selection."); } - else if (sel && sel->contains (m_currentPoint)) + else if (sel && sel->tqcontains (m_currentPoint)) { if (m_mode == Text) { @@ -300,7 +300,7 @@ void kpToolSelection::beginDraw () } viewManager ()->restoreQueueUpdates (); } - else if (sel->contains (m_currentPoint)) + else if (sel->tqcontains (m_currentPoint)) { if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ()) { @@ -391,24 +391,24 @@ const TQCursor &kpToolSelection::cursor () const { case (kpView::Top | kpView::Left): case (kpView::Bottom | kpView::Right): - return Qt::sizeFDiagCursor; + return TQt::sizeFDiagCursor; case (kpView::Bottom | kpView::Left): case (kpView::Top | kpView::Right): - return Qt::sizeBDiagCursor; + return TQt::sizeBDiagCursor; case kpView::Top: case kpView::Bottom: - return Qt::sizeVerCursor; + return TQt::sizeVerCursor; case kpView::Left: case kpView::Right: - return Qt::sizeHorCursor; + return TQt::sizeHorCursor; } - return Qt::arrowCursor; + return TQt::arrowCursor; } - else if (sel && sel->contains (m_currentPoint)) + else if (sel && sel->tqcontains (m_currentPoint)) { #if DEBUG_KP_TOOL_SELECTION && 1 kdDebug () << "\tsel contains currentPoint; selecting text? " @@ -416,16 +416,16 @@ const TQCursor &kpToolSelection::cursor () const #endif if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ()) - return Qt::ibeamCursor; + return TQt::ibeamCursor; else - return Qt::sizeAllCursor; + return TQt::sizeAllCursor; } else { #if DEBUG_KP_TOOL_SELECTION && 1 kdDebug () << "\tnot on sel" << endl; #endif - return Qt::crossCursor; + return TQt::crossCursor; } } @@ -617,8 +617,8 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo mainWindow ()->selectionTransparency ())); setUserShapePoints (m_startPoint, - TQPoint (QMAX (0, QMIN (m_currentPoint.x (), document ()->width () - 1)), - QMAX (0, QMIN (m_currentPoint.y (), document ()->height () - 1)))); + TQPoint (TQMAX (0, TQMIN (m_currentPoint.x (), document ()->width () - 1)), + TQMAX (0, TQMIN (m_currentPoint.y (), document ()->height () - 1)))); break; } case kpToolSelection::Text: @@ -646,7 +646,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.x () + minimumWidth - 1 >= document ()->width ()) { - minimumWidth = QMAX (kpSelection::minimumWidthForTextStyle (textStyle), + minimumWidth = TQMAX (kpSelection::minimumWidthForTextStyle (textStyle), document ()->width () - m_startPoint.x ()); } } @@ -654,7 +654,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.x () - minimumWidth + 1 < 0) { - minimumWidth = QMAX (kpSelection::minimumWidthForTextStyle (textStyle), + minimumWidth = TQMAX (kpSelection::minimumWidthForTextStyle (textStyle), m_startPoint.x () + 1); } } @@ -664,7 +664,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.y () + minimumHeight - 1 >= document ()->height ()) { - minimumHeight = QMAX (kpSelection::minimumHeightForTextStyle (textStyle), + minimumHeight = TQMAX (kpSelection::minimumHeightForTextStyle (textStyle), document ()->height () - m_startPoint.y ()); } } @@ -672,7 +672,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.y () - minimumHeight + 1 < 0) { - minimumHeight = QMAX (kpSelection::minimumHeightForTextStyle (textStyle), + minimumHeight = TQMAX (kpSelection::minimumHeightForTextStyle (textStyle), m_startPoint.y () + 1); } } @@ -845,7 +845,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo if (!sel->pixmap () && !m_currentPullFromDocumentCommand) { m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow ()); m_currentPullFromDocumentCommand->execute (); } @@ -853,7 +853,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo if (!m_currentMoveCommand) { m_currentMoveCommand = new kpToolSelectionMoveCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow ()); m_currentMoveCommandIsSmear = false; } @@ -903,7 +903,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo if (!sel->pixmap () && !m_currentPullFromDocumentCommand) { m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow ()); m_currentPullFromDocumentCommand->execute (); } @@ -929,7 +929,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo int newWidth = oldWidth + userXSign * (thisPoint.x () - m_startPoint.x ()); - newWidth = QMAX (originalSelection.minimumWidth (), newWidth); + newWidth = TQMAX (originalSelection.minimumWidth (), newWidth); // Determine new height. @@ -942,7 +942,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo int newHeight = oldHeight + userYSign * (thisPoint.y () - m_startPoint.y ()); - newHeight = QMAX (originalSelection.minimumHeight (), newHeight); + newHeight = TQMAX (originalSelection.minimumHeight (), newHeight); // Keep aspect ratio? @@ -954,7 +954,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo (userYSign ? double (newHeight) / oldHeight : 0)) { newHeight = newWidth * oldHeight / oldWidth; - newHeight = QMAX (originalSelection.minimumHeight (), + newHeight = TQMAX (originalSelection.minimumHeight (), newHeight); } // Height changed more than width? @@ -962,7 +962,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo else { newWidth = newHeight * oldWidth / oldHeight; - newWidth = QMAX (originalSelection.minimumWidth (), newWidth); + newWidth = TQMAX (originalSelection.minimumWidth (), newWidth); } } @@ -1243,7 +1243,7 @@ void kpToolSelection::keyPressEvent (TQKeyEvent *e) if (document ()->selection () && !hasBegunDraw () && - e->key () == Qt::Key_Escape) + e->key () == TQt::Key_Escape) { #if DEBUG_KP_TOOL_SELECTION && 0 kdDebug () << "\tescape pressed with sel when not begun draw - deselecting" << endl; @@ -1307,7 +1307,7 @@ void kpToolSelection::selectionTransparencyChanged (const TQString & /*name*/) // Undo. // The rectangle is no longer invisible. // - //if (document ()->selection ()->setTransparency (st, true/*check harder for no change in mask*/)) + //if (document ()->selection ()->setTransparency (st, true/*check harder for no change in tqmask*/)) document ()->selection ()->setTransparency (st); if (true) @@ -1356,7 +1356,7 @@ void kpToolSelection::slotIsOpaqueChanged () kdDebug () << "\thave sel - set transparency" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (hasBegunShape ()) endShapeInternal (); @@ -1400,7 +1400,7 @@ void kpToolSelection::slotBackgroundColorChanged (const kpColor &) kdDebug () << "\thave sel - set transparency" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); kpSelectionTransparency st = mainWindow ()->selectionTransparency (); kpSelectionTransparency oldST = st; @@ -1439,7 +1439,7 @@ void kpToolSelection::slotColorSimilarityChanged (double, int) kdDebug () << "\thave sel - set transparency" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); kpSelectionTransparency st = mainWindow ()->selectionTransparency (); kpSelectionTransparency oldST = st; @@ -1747,7 +1747,7 @@ void kpToolSelectionTransparencyCommand::execute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_mainWindow->setSelectionTransparency (m_st, true/*force colour change*/); @@ -1768,7 +1768,7 @@ void kpToolSelectionTransparencyCommand::unexecute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_mainWindow->setSelectionTransparency (m_oldST, true/*force colour change*/); @@ -2203,7 +2203,7 @@ void kpToolSelectionResizeScaleCommand::finalize () // public virtual [base kpToolResizeScaleCommand] void kpToolSelectionResizeScaleCommand::execute () { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); killSmoothScaleTimer (); @@ -2218,7 +2218,7 @@ void kpToolSelectionResizeScaleCommand::execute () // public virtual [base kpToolResizeScaleCommand] void kpToolSelectionResizeScaleCommand::unexecute () { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); killSmoothScaleTimer (); diff --git a/kolourpaint/tools/kptoolselection.h b/kolourpaint/tools/kptoolselection.h index 1f209d86..531f1b78 100644 --- a/kolourpaint/tools/kptoolselection.h +++ b/kolourpaint/tools/kptoolselection.h @@ -59,6 +59,7 @@ class kpToolWidgetOpaqueOrTransparent; class kpToolSelection : public kpTool { Q_OBJECT + TQ_OBJECT public: enum Mode {Rectangle, Ellipse, FreeForm, Text}; @@ -242,6 +243,7 @@ class kpToolSelectionResizeScaleCommand : public TQObject, public kpNamedCommand { Q_OBJECT + TQ_OBJECT public: kpToolSelectionResizeScaleCommand (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolskew.cpp b/kolourpaint/tools/kptoolskew.cpp index dff1d19b..7cc4aa7b 100644 --- a/kolourpaint/tools/kptoolskew.cpp +++ b/kolourpaint/tools/kptoolskew.cpp @@ -100,7 +100,7 @@ void kpToolSkewCommand::execute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_oldPixmapPtr = new TQPixmap (); @@ -181,7 +181,7 @@ void kpToolSkewCommand::unexecute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap = *m_oldPixmapPtr; @@ -218,13 +218,13 @@ int kpToolSkewDialog::s_lastHorizontalAngle = 0, kpToolSkewDialog::s_lastVerticalAngle = 0; -kpToolSkewDialog::kpToolSkewDialog (bool actOnSelection, kpMainWindow *parent, +kpToolSkewDialog::kpToolSkewDialog (bool actOnSelection, kpMainWindow *tqparent, const char *name) : kpToolPreviewDialog (kpToolPreviewDialog::AllFeatures, false/*don't reserve top row*/, actOnSelection ? i18n ("Skew Selection") : i18n ("Skew Image"), i18n ("After Skew:"), - actOnSelection, parent, name) + actOnSelection, tqparent, name) { // Too confusing - disable for now s_lastHorizontalAngle = s_lastVerticalAngle = 0; diff --git a/kolourpaint/tools/kptoolskew.h b/kolourpaint/tools/kptoolskew.h index ae368020..63703c9b 100644 --- a/kolourpaint/tools/kptoolskew.h +++ b/kolourpaint/tools/kptoolskew.h @@ -76,9 +76,10 @@ private: class kpToolSkewDialog : public kpToolPreviewDialog { Q_OBJECT + TQ_OBJECT public: - kpToolSkewDialog (bool actOnSelection, kpMainWindow *parent, + kpToolSkewDialog (bool actOnSelection, kpMainWindow *tqparent, const char *name = 0); virtual ~kpToolSkewDialog (); diff --git a/kolourpaint/tools/kptooltext.cpp b/kolourpaint/tools/kptooltext.cpp index e2261278..352715ed 100644 --- a/kolourpaint/tools/kptooltext.cpp +++ b/kolourpaint/tools/kptooltext.cpp @@ -46,7 +46,7 @@ kpToolText::kpToolText (kpMainWindow *mainWindow) : kpToolSelection (Text, i18n ("Text"), i18n ("Writes text"), - Qt::Key_T, + TQt::Key_T, mainWindow, "tool_text"), m_isIMStarted (false), m_IMStartCursorRow (0), @@ -193,7 +193,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) #define IS_SPACE(c) ((c).isSpace () || (c).isNull ()) - if (e->key () == Qt::Key_Enter || e->key () == Qt::Key_Return) + if (e->key () == TQt::Key_Enter || e->key () == TQt::Key_Return) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tenter pressed" << endl; @@ -214,7 +214,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Backspace) + else if (e->key () == TQt::Key_Backspace) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tbackspace pressed" << endl; @@ -235,7 +235,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Delete) + else if (e->key () == TQt::Key_Delete) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tdelete pressed" << endl; @@ -256,7 +256,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Up) + else if (e->key () == TQt::Key_Up) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tup pressed" << endl; @@ -268,13 +268,13 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (cursorRow > 0) { cursorRow--; - cursorCol = QMIN (cursorCol, (int) textLines [cursorRow].length ()); + cursorCol = TQMIN (cursorCol, (int) textLines [cursorRow].length ()); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } e->accept (); } - else if (e->key () == Qt::Key_Down) + else if (e->key () == TQt::Key_Down) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tdown pressed" << endl; @@ -286,13 +286,13 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (cursorRow < (int) textLines.size () - 1) { cursorRow++; - cursorCol = QMIN (cursorCol, (int) textLines [cursorRow].length ()); + cursorCol = TQMIN (cursorCol, (int) textLines [cursorRow].length ()); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } e->accept (); } - else if (e->key () == Qt::Key_Left) + else if (e->key () == TQt::Key_Left) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tleft pressed" << endl; @@ -318,7 +318,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if ((e->state () & Qt::ControlButton) == 0) + if ((e->state () & TQt::ControlButton) == 0) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tmove single char" << endl; @@ -367,7 +367,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Right) + else if (e->key () == TQt::Key_Right) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tright pressed" << endl; @@ -393,7 +393,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if ((e->state () & Qt::ControlButton) == 0) + if ((e->state () & TQt::ControlButton) == 0) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tmove single char" << endl; @@ -438,7 +438,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Home) + else if (e->key () == TQt::Key_Home) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\thome pressed" << endl; @@ -447,7 +447,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if (e->state () & Qt::ControlButton) + if (e->state () & TQt::ControlButton) cursorRow = 0; cursorCol = 0; @@ -456,7 +456,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_End) + else if (e->key () == TQt::Key_End) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tend pressed" << endl; @@ -465,7 +465,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if (e->state () & Qt::ControlButton) + if (e->state () & TQt::ControlButton) cursorRow = textLines.size () - 1; cursorCol = textLines [cursorRow].length (); @@ -545,7 +545,7 @@ void kpToolText::imStartEvent (TQIMEvent *e) m_IMStartCursorRow = viewManager ()->textCursorRow (); m_IMStartCursorCol = viewManager ()->textCursorCol (); - m_IMPreeditStr = TQString::null; + m_IMPreeditStr = TQString(); } void kpToolText::imComposeEvent (TQIMEvent *e) @@ -651,7 +651,7 @@ void kpToolText::imEndEvent (TQIMEvent *e) m_deleteCommand->addDelete (); } } - m_IMPreeditStr = TQString::null; + m_IMPreeditStr = TQString(); // commit string TQString inputStr = e->text(); @@ -1056,7 +1056,7 @@ void kpToolTextInsertCommand::execute () viewManager ()->setTextCursorPosition (m_row, m_col); TQString text = m_newText; - m_newText = TQString::null; + m_newText = TQString(); addText (text); } @@ -1242,7 +1242,7 @@ void kpToolTextBackspaceCommand::execute () { viewManager ()->setTextCursorPosition (m_row, m_col); - m_deletedText = TQString::null; + m_deletedText = TQString(); int oldNumBackspaces = m_numBackspaces; m_numBackspaces = 0; @@ -1279,7 +1279,7 @@ void kpToolTextBackspaceCommand::unexecute () } } - m_deletedText = TQString::null; + m_deletedText = TQString(); selection ()->setTextLines (textLines); @@ -1350,7 +1350,7 @@ void kpToolTextDeleteCommand::execute () { viewManager ()->setTextCursorPosition (m_row, m_col); - m_deletedText = TQString::null; + m_deletedText = TQString(); int oldNumDeletes = m_numDeletes; m_numDeletes = 0; @@ -1383,7 +1383,7 @@ void kpToolTextDeleteCommand::unexecute () } } - m_deletedText = TQString::null; + m_deletedText = TQString(); selection ()->setTextLines (textLines); diff --git a/kolourpaint/tools/kptooltext.h b/kolourpaint/tools/kptooltext.h index 15cda865..44edc0f9 100644 --- a/kolourpaint/tools/kptooltext.h +++ b/kolourpaint/tools/kptooltext.h @@ -44,6 +44,7 @@ class kpViewManager; class kpToolText : public kpToolSelection { Q_OBJECT + TQ_OBJECT public: kpToolText (kpMainWindow *mainWindow); diff --git a/kolourpaint/views/kpthumbnailview.cpp b/kolourpaint/views/kpthumbnailview.cpp index 179f7c92..7332433a 100644 --- a/kolourpaint/views/kpthumbnailview.cpp +++ b/kolourpaint/views/kpthumbnailview.cpp @@ -39,12 +39,12 @@ kpThumbnailView::kpThumbnailView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { } @@ -77,7 +77,7 @@ void kpThumbnailView::resizeEvent (TQResizeEvent *e) << endl; #endif - // For QResizeEvent's, Qt already throws an entire widget repaint into + // For TQResizeEvent's, TQt already throws an entire widget tqrepaint into // the event loop. So eat useless update() calls that can only slow // things down. // TODO: this doesn't seem to work. diff --git a/kolourpaint/views/kpthumbnailview.h b/kolourpaint/views/kpthumbnailview.h index 9bc4dad8..5f2e1664 100644 --- a/kolourpaint/views/kpthumbnailview.h +++ b/kolourpaint/views/kpthumbnailview.h @@ -41,6 +41,7 @@ class kpThumbnailView : public kpView { Q_OBJECT + TQ_OBJECT public: /** @@ -53,7 +54,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs this thumbnail view. @@ -69,7 +70,7 @@ public: protected: /** - * Sets the mask to cover the rectangle with top-left, origin() and + * Sets the tqmask to cover the rectangle with top-left, origin() and * dimensions equal to or slightly less than (in case of rounding * error) the size of the document in view coordinates. This ensures * that all pixels are initialised with either document pixels or the diff --git a/kolourpaint/views/kpunzoomedthumbnailview.cpp b/kolourpaint/views/kpunzoomedthumbnailview.cpp index 4f019905..dea4e089 100644 --- a/kolourpaint/views/kpunzoomedthumbnailview.cpp +++ b/kolourpaint/views/kpunzoomedthumbnailview.cpp @@ -50,12 +50,12 @@ kpUnzoomedThumbnailView::kpUnzoomedThumbnailView ( kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpThumbnailView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name), + tqparent, name), d (new kpUnzoomedThumbnailViewPrivate ()) { if (buddyViewScrollableContainer ()) @@ -112,7 +112,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () if (document ()->width () > width ()) { x = (int) buddyView ()->transformViewToDocX (scrollViewContentsX); - const int rightMostAllowedX = QMAX (0, document ()->width () - width ()); + const int rightMostAllowedX = TQMAX (0, document ()->width () - width ()); #if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW kdDebug () << "\tdocX=" << x << " docWidth=" << document ()->width () @@ -135,7 +135,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () if (document ()->height () > height ()) { y = (int) buddyView ()->transformViewToDocY (scrollViewContentsY); - const int bottomMostAllowedY = QMAX (0, document ()->height () - height ()); + const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ()); #if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW kdDebug () << "\tdocY=" << y << " docHeight=" << document ()->height () @@ -163,12 +163,12 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () TQRect docRect = buddyView ()->transformViewToDoc ( TQRect (buddyViewScrollableContainer ()->contentsXSoon (), buddyViewScrollableContainer ()->contentsYSoon (), - QMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), - QMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); + TQMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), + TQMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); x = docRect.x () - (width () - docRect.width ()) / 2; kdDebug () << "\tnew suggest x=" << x << endl; - const int rightMostAllowedX = QMAX (0, document ()->width () - width ()); + const int rightMostAllowedX = TQMAX (0, document ()->width () - width ()); if (x < 0) x = 0; if (x > rightMostAllowedX) @@ -176,7 +176,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () y = docRect.y () - (height () - docRect.height ()) / 2; kdDebug () << "\tnew suggest y=" << y << endl; - const int bottomMostAllowedY = QMAX (0, document ()->height () - height ()); + const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ()); if (y < 0) y = 0; if (y > bottomMostAllowedY) diff --git a/kolourpaint/views/kpunzoomedthumbnailview.h b/kolourpaint/views/kpunzoomedthumbnailview.h index cff6bdab..7e81a5db 100644 --- a/kolourpaint/views/kpunzoomedthumbnailview.h +++ b/kolourpaint/views/kpunzoomedthumbnailview.h @@ -55,6 +55,7 @@ class kpViewScrollableContainer; /*sealed*/ class kpUnzoomedThumbnailView : public kpThumbnailView { Q_OBJECT + TQ_OBJECT public: /** @@ -65,7 +66,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs an unzoomed thumbnail view. @@ -86,7 +87,7 @@ public slots: * container will be visible. * * It tries to maximise the used area of this view. Unused areas will - * be set to the widget background thanks to the mask. + * be set to the widget background thanks to the tqmask. * * Call this if the size of the document changes. * Already connected to buddyViewScrollableContainer()'s diff --git a/kolourpaint/views/kpzoomedthumbnailview.cpp b/kolourpaint/views/kpzoomedthumbnailview.cpp index c5bde48d..adef47c0 100644 --- a/kolourpaint/views/kpzoomedthumbnailview.cpp +++ b/kolourpaint/views/kpzoomedthumbnailview.cpp @@ -43,12 +43,12 @@ kpZoomedThumbnailView::kpZoomedThumbnailView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpThumbnailView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { // Call to virtual function - this is why the class is sealed adjustToEnvironment (); @@ -97,8 +97,8 @@ void kpZoomedThumbnailView::adjustToEnvironment () } - int hzoom = QMAX (1, width () * 100 / document ()->width ()); - int vzoom = QMAX (1, height () * 100 / document ()->height ()); + int hzoom = TQMAX (1, width () * 100 / document ()->width ()); + int vzoom = TQMAX (1, height () * 100 / document ()->height ()); // keep aspect ratio if (hzoom < vzoom) diff --git a/kolourpaint/views/kpzoomedthumbnailview.h b/kolourpaint/views/kpzoomedthumbnailview.h index 882c6d08..c35c22bb 100644 --- a/kolourpaint/views/kpzoomedthumbnailview.h +++ b/kolourpaint/views/kpzoomedthumbnailview.h @@ -50,6 +50,7 @@ /*sealed*/ class kpZoomedThumbnailView : public kpThumbnailView { Q_OBJECT + TQ_OBJECT public: /** @@ -60,7 +61,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs a zoomed thumbnail view. @@ -77,7 +78,7 @@ public: public slots: /** * Changes its zoom level to accommodate the display of entire document - * in the view. It maintains aspect by changing the origin and mask. + * in the view. It maintains aspect by changing the origin and tqmask. * * Call this if the size of the document changes. * Already called by @ref kpThumbnailView resizeEvent(). diff --git a/kolourpaint/views/kpzoomedview.cpp b/kolourpaint/views/kpzoomedview.cpp index c2b1f47d..402b8e39 100644 --- a/kolourpaint/views/kpzoomedview.cpp +++ b/kolourpaint/views/kpzoomedview.cpp @@ -43,12 +43,12 @@ kpZoomedView::kpZoomedView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { // Call to virtual function - this is why the class is sealed adjustToEnvironment (); diff --git a/kolourpaint/views/kpzoomedview.h b/kolourpaint/views/kpzoomedview.h index 12565ab4..e0228fde 100644 --- a/kolourpaint/views/kpzoomedview.h +++ b/kolourpaint/views/kpzoomedview.h @@ -51,6 +51,7 @@ /*sealed*/ class kpZoomedView : public kpView { Q_OBJECT + TQ_OBJECT public: /** @@ -61,7 +62,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs an unzoomed view. diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.cpp b/kolourpaint/widgets/kpcolorsimilaritycube.cpp index c09e495a..07693130 100644 --- a/kolourpaint/widgets/kpcolorsimilaritycube.cpp +++ b/kolourpaint/widgets/kpcolorsimilaritycube.cpp @@ -49,9 +49,9 @@ const double kpColorSimilarityCube::colorCubeDiagonalDistance = kpColorSimilarityCube::kpColorSimilarityCube (int look, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/), + : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/), m_mainWindow (mainWindow), m_colorSimilarity (-1) { @@ -133,12 +133,12 @@ void kpColorSimilarityCube::setColorSimilarity (double similarity) m_colorSimilarity = similarity; - repaint (false/*no erase*/); + tqrepaint (false/*no erase*/); } -// protected virtual [base QWidget] -TQSize kpColorSimilarityCube::sizeHint () const +// protected virtual [base TQWidget] +TQSize kpColorSimilarityCube::tqsizeHint () const { return TQSize (52, 52); } @@ -193,8 +193,8 @@ static void drawQuadrant (TQPainter *p, points.resize (3); - p->setPen (Qt::black); - p->setBrush (Qt::NoBrush); + p->setPen (TQt::black); + p->setBrush (TQt::NoBrush); p->drawPolyline (points); @@ -233,7 +233,7 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, const TQPoint mm (::pointBetween (ml, mr)); - const int baseBrightness = QMAX (127, + const int baseBrightness = TQMAX (127, 255 - int (kpColorSimilarityDialog::maximumColorSimilarity * kpColorSimilarityCube::colorCubeDiagonalDistance / 2)); TQColor colors [2] = @@ -247,8 +247,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, #if DEBUG_KP_COLOR_SIMILARITY_CUBE kdDebug () << "\tnot enabled - making us grey" << endl; #endif - colors [0] = colorGroup ().background (); - colors [1] = colorGroup ().background (); + colors [0] = tqcolorGroup ().background (); + colors [1] = tqcolorGroup ().background (); } #if DEBUG_KP_COLOR_SIMILARITY_CUBE @@ -256,8 +256,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, << " colorCubeDiagDist=" << kpColorSimilarityCube::colorCubeDiagonalDistance << endl << "\tbaseBrightness=" << baseBrightness - << " color[0]=" << ((colors [0].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) - << " color[1]=" << ((colors [1].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) + << " color[0]=" << ((colors [0].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) + << " color[1]=" << ((colors [1].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) << endl; #endif @@ -268,17 +268,17 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, ::drawQuadrant (p, colors [0], bm, br, mr, mm); } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpColorSimilarityCube::drawContents (TQPainter *p) { TQRect cr (contentsRect ()); TQPixmap backBuffer (cr.width (), cr.height ()); - backBuffer.fill (colorGroup ().background ()); + backBuffer.fill (tqcolorGroup ().background ()); TQPainter backBufferPainter (&backBuffer); - int cubeRectSize = QMIN (cr.width () * 6 / 8, cr.height () * 6 / 8); + int cubeRectSize = TQMIN (cr.width () * 6 / 8, cr.height () * 6 / 8); int dx = (cr.width () - cubeRectSize) / 2, dy = (cr.height () - cubeRectSize) / 2; backBufferPainter.translate (dx, dy); @@ -336,7 +336,7 @@ void kpColorSimilarityCube::drawContents (TQPainter *p) #if 0 backBufferPainter.save (); - backBufferPainter.setPen (Qt::cyan); + backBufferPainter.setPen (TQt::cyan); backBufferPainter.drawRect (0, 0, cubeRectSize, cubeRectSize); backBufferPainter.restore (); #endif diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.h b/kolourpaint/widgets/kpcolorsimilaritycube.h index ee074d55..d2fb85d2 100644 --- a/kolourpaint/widgets/kpcolorsimilaritycube.h +++ b/kolourpaint/widgets/kpcolorsimilaritycube.h @@ -34,7 +34,7 @@ class kpColor; class kpMainWindow; -class kpColorSimilarityCube : public QFrame +class kpColorSimilarityCube : public TQFrame { public: enum Look @@ -46,7 +46,7 @@ public: kpColorSimilarityCube (int look, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~kpColorSimilarityCube (); @@ -55,7 +55,7 @@ public: double colorSimilarity () const; void setColorSimilarity (double similarity); - virtual TQSize sizeHint () const; + virtual TQSize tqsizeHint () const; protected: TQColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const; diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp index 5831c62f..ee4ff1b0 100644 --- a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp +++ b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp @@ -44,9 +44,9 @@ const double kpColorSimilarityDialog::maximumColorSimilarity = .30; kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : KDialogBase (parent, name, true/*modal*/, + : KDialogBase (tqparent, name, true/*modal*/, i18n ("Color Similarity"), KDialogBase::Ok | KDialogBase::Cancel), m_mainWindow (mainWindow) @@ -66,7 +66,7 @@ kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow, TQVBoxLayout *cubeLayout = new TQVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ()); cubeLayout->addWidget (m_colorSimilarityCube, 1/*stretch*/); - cubeLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter); + cubeLayout->addWidget (updatePushButton, 0/*stretch*/, TQt::AlignHCenter); connect (updatePushButton, TQT_SIGNAL (clicked ()), @@ -109,7 +109,7 @@ double kpColorSimilarityDialog::colorSimilarity () const // public void kpColorSimilarityDialog::setColorSimilarity (double similarity) { - m_colorSimilarityInput->setValue (qRound (similarity * 100)); + m_colorSimilarityInput->setValue (tqRound (similarity * 100)); } diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.h b/kolourpaint/widgets/kpcolorsimilaritydialog.h index 7dee17b8..df4e2445 100644 --- a/kolourpaint/widgets/kpcolorsimilaritydialog.h +++ b/kolourpaint/widgets/kpcolorsimilaritydialog.h @@ -38,10 +38,11 @@ class kpMainWindow; class kpColorSimilarityDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: kpColorSimilarityDialog (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~kpColorSimilarityDialog (); diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp index 327229df..89357d1c 100644 --- a/kolourpaint/widgets/kpcolortoolbar.cpp +++ b/kolourpaint/widgets/kpcolortoolbar.cpp @@ -61,8 +61,8 @@ */ kpDualColorButton::kpDualColorButton (kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/), + TQWidget *tqparent, const char *name) + : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/), m_mainWindow (mainWindow), m_backBuffer (0) { @@ -149,8 +149,8 @@ kpColor kpDualColorButton::oldBackgroundColor () const } -// public virtual [base QWidget] -TQSize kpDualColorButton::sizeHint () const +// public virtual [base TQWidget] +TQSize kpDualColorButton::tqsizeHint () const { return TQSize (52, 52); } @@ -200,15 +200,15 @@ TQRect kpDualColorButton::backgroundRect () const // TODO: drag a colour from this widget -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e) { - e->accept ((foregroundRect ().contains (e->pos ()) || - backgroundRect ().contains (e->pos ())) && + e->accept ((foregroundRect ().tqcontains (e->pos ()) || + backgroundRect ().tqcontains (e->pos ())) && KColorDrag::canDecode (e)); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::dropEvent (TQDropEvent *e) { TQColor col; @@ -216,35 +216,35 @@ void kpDualColorButton::dropEvent (TQDropEvent *e) if (col.isValid ()) { - if (foregroundRect ().contains (e->pos ())) + if (foregroundRect ().tqcontains (e->pos ())) setForegroundColor (kpColor (col.rgb ())); - else if (backgroundRect ().contains (e->pos ())) + else if (backgroundRect ().tqcontains (e->pos ())) setBackgroundColor (kpColor (col.rgb ())); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::mousePressEvent (TQMouseEvent * /*e*/) { // eat right-mouse click to prevent it from getting to the toolbar } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e) { int whichColor = -1; - if (foregroundRect ().contains (e->pos ())) + if (foregroundRect ().tqcontains (e->pos ())) whichColor = 0; - else if (backgroundRect ().contains (e->pos ())) + else if (backgroundRect ().tqcontains (e->pos ())) whichColor = 1; if (whichColor == 0 || whichColor == 1) { - TQColor col = Qt::black; + TQColor col = TQt::black; if (color (whichColor).isOpaque ()) - col = color (whichColor).toQColor (); + col = color (whichColor).toTQColor (); else { // TODO: If you double-click on a transparent color and press OK, you get @@ -257,16 +257,16 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e) // to opaque colors. } - // TODO: parent + // TODO: tqparent if (KColorDialog::getColor (col/*ref*/)) setColor (whichColor, kpColor (col.rgb ())); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e) { - if (swapPixmapRect ().contains (e->pos ()) && + if (swapPixmapRect ().tqcontains (e->pos ()) && m_color [0] != m_color [1]) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 @@ -288,7 +288,7 @@ void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e) } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpDualColorButton::drawContents (TQPainter *p) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 @@ -318,14 +318,14 @@ void kpDualColorButton::drawContents (TQPainter *p) else { backBufferPainter.fillRect (m_backBuffer->rect (), - colorGroup ().color (TQColorGroup::Background)); + tqcolorGroup ().color (TQColorGroup::Background)); } TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16"); if (!isEnabled ()) { - // swapPixmap has a mask after all - swapPixmap.fill (colorGroup ().color (TQColorGroup::Dark)); + // swapPixmap has a tqmask after all + swapPixmap.fill (tqcolorGroup ().color (TQColorGroup::Dark)); } backBufferPainter.drawPixmap (swapPixmapRect ().topLeft (), swapPixmap); @@ -337,17 +337,17 @@ void kpDualColorButton::drawContents (TQPainter *p) if (isEnabled ()) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 - kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toQRgb () + kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toTQRgb () << endl; #endif if (m_color [1].isOpaque ()) - backBufferPainter.fillRect (bgRectInside, m_color [1].toQColor ()); + backBufferPainter.fillRect (bgRectInside, m_color [1].toTQColor ()); else backBufferPainter.drawPixmap (bgRectInside, UserIcon ("color_transparent_26x26")); } else - backBufferPainter.fillRect (bgRectInside, colorGroup ().color (TQColorGroup::Button)); - qDrawShadePanel (&backBufferPainter, bgRect, colorGroup (), + backBufferPainter.fillRect (bgRectInside, tqcolorGroup ().color (TQColorGroup::Button)); + qDrawShadePanel (&backBufferPainter, bgRect, tqcolorGroup (), false/*not sunken*/, 2/*lineWidth*/, 0/*never fill*/); @@ -357,17 +357,17 @@ void kpDualColorButton::drawContents (TQPainter *p) if (isEnabled ()) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 - kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toQRgb () + kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toTQRgb () << endl; #endif if (m_color [0].isOpaque ()) - backBufferPainter.fillRect (fgRectInside, m_color [0].toQColor ()); + backBufferPainter.fillRect (fgRectInside, m_color [0].toTQColor ()); else backBufferPainter.drawPixmap (fgRectInside, UserIcon ("color_transparent_26x26")); } else - backBufferPainter.fillRect (fgRectInside, colorGroup ().color (TQColorGroup::Button)); - qDrawShadePanel (&backBufferPainter, fgRect, colorGroup (), + backBufferPainter.fillRect (fgRectInside, tqcolorGroup ().color (TQColorGroup::Button)); + qDrawShadePanel (&backBufferPainter, fgRect, tqcolorGroup (), false/*not sunken*/, 2/*lineWidth*/, 0/*never fill*/); @@ -421,8 +421,8 @@ static TQColor add (const TQColor &a, const TQColor &b) // -// make our own colors in case weird ones like "Qt::cyan" -// (turquoise) get changed by Qt +// make our own colors in case weird ones like "TQt::cyan" +// (turquoise) get changed by TQt // // primary colors + B&W @@ -461,10 +461,10 @@ static bool ownColorsInitialised = false; */ #define rows 2 #define cols 11 -kpColorCells::kpColorCells (TQWidget *parent, +kpColorCells::kpColorCells (TQWidget *tqparent, Qt::Orientation o, const char *name) - : KColorCells (parent, rows, cols), + : KColorCells (tqparent, rows, cols), m_mouseButton (-1) { setName (name); @@ -657,7 +657,7 @@ void kpColorCells::mouseReleaseEvent (TQMouseEvent *e) { m_mouseButton = -1; - Qt::ButtonState button = e->button (); + TQt::ButtonState button = e->button (); #if DEBUG_KP_COLOR_TOOL_BAR kdDebug () << "kpColorCells::mouseReleaseEvent(left=" << (button & Qt::LeftButton) @@ -729,7 +729,7 @@ void kpColorCells::slotColorDoubleClicked (int cell) TQColor color = KColorCells::color (cell); - // TODO: parent + // TODO: tqparent if (KColorDialog::getColor (color/*ref*/)) KColorCells::setColor (cell, color); } @@ -739,8 +739,8 @@ void kpColorCells::slotColorDoubleClicked (int cell) * kpTransparentColorCell */ -kpTransparentColorCell::kpTransparentColorCell (TQWidget *parent, const char *name) - : TQFrame (parent, name) +kpTransparentColorCell::kpTransparentColorCell (TQWidget *tqparent, const char *name) + : TQFrame (tqparent, name) { #if DEBUG_KP_COLOR_TOOL_BAR kdDebug () << "kpTransparentColorCell::kpTransparentColorCell()" << endl; @@ -767,23 +767,23 @@ kpTransparentColorCell::~kpTransparentColorCell () } -// public virtual [base QWidget] -TQSize kpTransparentColorCell::sizeHint () const +// public virtual [base TQWidget] +TQSize kpTransparentColorCell::tqsizeHint () const { return TQSize (m_pixmap.width () + frameWidth () * 2, m_pixmap.height () + frameWidth () * 2); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/) { // eat right-mouse click to prevent it from getting to the toolbar } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e) { - if (rect ().contains (e->pos ())) + if (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())) { if (e->button () == Qt::LeftButton) { @@ -798,7 +798,7 @@ void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e) } } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpTransparentColorCell::drawContents (TQPainter *p) { TQFrame::drawContents (p); @@ -818,10 +818,10 @@ void kpTransparentColorCell::drawContents (TQPainter *p) * kpColorPalette */ -kpColorPalette::kpColorPalette (TQWidget *parent, +kpColorPalette::kpColorPalette (TQWidget *tqparent, Qt::Orientation o, const char *name) - : TQWidget (parent, name), + : TQWidget (tqparent, name), m_boxLayout (0) { #if DEBUG_KP_COLOR_TOOL_BAR @@ -829,7 +829,7 @@ kpColorPalette::kpColorPalette (TQWidget *parent, #endif m_transparentColorCell = new kpTransparentColorCell (this); - m_transparentColorCell->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_transparentColorCell->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); connect (m_transparentColorCell, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), this, TQT_SIGNAL (foregroundColorChanged (const kpColor &))); connect (m_transparentColorCell, TQT_SIGNAL (backgroundColorChanged (const kpColor &)), @@ -863,13 +863,13 @@ void kpColorPalette::setOrientation (Qt::Orientation o) if (o == Qt::Horizontal) { m_boxLayout = new TQBoxLayout (this, TQBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/); - m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignVCenter); + m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignVCenter); m_boxLayout->addWidget (m_colorCells); } else { m_boxLayout = new TQBoxLayout (this, TQBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/); - m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignHCenter); + m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignHCenter); m_boxLayout->addWidget (m_colorCells); } @@ -882,11 +882,11 @@ void kpColorPalette::setOrientation (Qt::Orientation o) */ kpColorSimilarityToolBarItem::kpColorSimilarityToolBarItem (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) : kpColorSimilarityCube (kpColorSimilarityCube::Depressed | kpColorSimilarityCube::DoubleClickInstructions, - mainWindow, parent, name), + mainWindow, tqparent, name), m_mainWindow (mainWindow), m_processedColorSimilarity (kpColor::Exact) { @@ -912,7 +912,7 @@ void kpColorSimilarityToolBarItem::setColorSimilarity (double similarity) kpColorSimilarityCube::setColorSimilarity (similarity); if (similarity > 0) - TQToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100))); + TQToolTip::add (this, i18n ("Color similarity: %1%").arg (tqRound (similarity * 100))); else TQToolTip::add (this, i18n ("Color similarity: Exact")); @@ -930,13 +930,13 @@ double kpColorSimilarityToolBarItem::oldColorSimilarity () const } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpColorSimilarityToolBarItem::mousePressEvent (TQMouseEvent * /*e*/) { // eat right-mouse click to prevent it from getting to the toolbar } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (TQMouseEvent * /*e*/) { kpColorSimilarityDialog dialog (m_mainWindow, this); @@ -964,7 +964,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, 5/*margin*/, (10 * 4)/*spacing*/); m_dualColorButton = new kpDualColorButton (mainWindow, base); - m_dualColorButton->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_dualColorButton->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); connect (m_dualColorButton, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)), this, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &))); connect (m_dualColorButton, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), @@ -981,7 +981,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, m_boxLayout->addWidget (m_colorPalette, 0/*stretch*/); m_colorSimilarityToolBarItem = new kpColorSimilarityToolBarItem (mainWindow, base); - m_colorSimilarityToolBarItem->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_colorSimilarityToolBarItem->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); connect (m_colorSimilarityToolBarItem, TQT_SIGNAL (colorSimilarityChanged (double, int)), this, TQT_SIGNAL (colorSimilarityChanged (double, int))); m_boxLayout->addWidget (m_colorSimilarityToolBarItem, 0/*stretch*/); diff --git a/kolourpaint/widgets/kpcolortoolbar.h b/kolourpaint/widgets/kpcolortoolbar.h index 3b50c825..b1e8faa8 100644 --- a/kolourpaint/widgets/kpcolortoolbar.h +++ b/kolourpaint/widgets/kpcolortoolbar.h @@ -56,13 +56,14 @@ class kpMainWindow; // used by kpTransparentColorCell // - no obscure "current" colour // -class kpDualColorButton : public QFrame +class kpDualColorButton : public TQFrame { Q_OBJECT + TQ_OBJECT public: kpDualColorButton (kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpDualColorButton (); kpColor color (int which) const; @@ -90,7 +91,7 @@ public: kpColor oldBackgroundColor () const; public: - virtual TQSize sizeHint () const; + virtual TQSize tqsizeHint () const; protected: TQRect swapPixmapRect () const; @@ -118,9 +119,10 @@ protected: class kpColorCells : public KColorCells { Q_OBJECT + TQ_OBJECT public: - kpColorCells (TQWidget *parent, + kpColorCells (TQWidget *tqparent, Qt::Orientation o = Qt::Horizontal, const char *name = 0); virtual ~kpColorCells (); @@ -152,15 +154,16 @@ protected slots: }; -class kpTransparentColorCell : public QFrame +class kpTransparentColorCell : public TQFrame { Q_OBJECT + TQ_OBJECT public: - kpTransparentColorCell (TQWidget *parent, const char *name = 0); + kpTransparentColorCell (TQWidget *tqparent, const char *name = 0); virtual ~kpTransparentColorCell (); - virtual TQSize sizeHint () const; + virtual TQSize tqsizeHint () const; signals: void transparentColorSelected (int mouseButton); @@ -179,12 +182,13 @@ protected: }; -class kpColorPalette : public QWidget +class kpColorPalette : public TQWidget { Q_OBJECT + TQ_OBJECT public: - kpColorPalette (TQWidget *parent, + kpColorPalette (TQWidget *tqparent, Qt::Orientation o = Qt::Horizontal, const char *name = 0); virtual ~kpColorPalette (); @@ -208,10 +212,11 @@ protected: class kpColorSimilarityToolBarItem : public kpColorSimilarityCube { Q_OBJECT + TQ_OBJECT public: kpColorSimilarityToolBarItem (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~kpColorSimilarityToolBarItem (); @@ -243,6 +248,7 @@ private: class kpColorToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name = 0); diff --git a/kolourpaint/widgets/kpresizesignallinglabel.cpp b/kolourpaint/widgets/kpresizesignallinglabel.cpp index cb5a2311..b62f3679 100644 --- a/kolourpaint/widgets/kpresizesignallinglabel.cpp +++ b/kolourpaint/widgets/kpresizesignallinglabel.cpp @@ -34,15 +34,15 @@ kpResizeSignallingLabel::kpResizeSignallingLabel (const TQString &string, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TQLabel (string, parent, name) + : TQLabel (string, tqparent, name) { } -kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *parent, +kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *tqparent, const char *name) - : TQLabel (parent, name) + : TQLabel (tqparent, name) { } @@ -51,7 +51,7 @@ kpResizeSignallingLabel::~kpResizeSignallingLabel () } -// protected virtual [base QLabel] +// protected virtual [base TQLabel] void kpResizeSignallingLabel::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_RESIZE_SIGNALLING_LABEL diff --git a/kolourpaint/widgets/kpresizesignallinglabel.h b/kolourpaint/widgets/kpresizesignallinglabel.h index 5a53dcf2..88f4477c 100644 --- a/kolourpaint/widgets/kpresizesignallinglabel.h +++ b/kolourpaint/widgets/kpresizesignallinglabel.h @@ -32,13 +32,14 @@ #include -class kpResizeSignallingLabel : public QLabel +class kpResizeSignallingLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - kpResizeSignallingLabel (const TQString &string, TQWidget *parent, const char *name = 0); - kpResizeSignallingLabel (TQWidget *parent, const char *name = 0); + kpResizeSignallingLabel (const TQString &string, TQWidget *tqparent, const char *name = 0); + kpResizeSignallingLabel (TQWidget *tqparent, const char *name = 0); virtual ~kpResizeSignallingLabel (); signals: diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.cpp b/kolourpaint/widgets/kpsqueezedtextlabel.cpp index 613c93a9..8cd4dfbb 100644 --- a/kolourpaint/widgets/kpsqueezedtextlabel.cpp +++ b/kolourpaint/widgets/kpsqueezedtextlabel.cpp @@ -25,7 +25,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_SQUEEZED_TEXT_LABEL 0 +#define DEBUG_KP_STQUEEZED_TEXT_LABEL 0 #include @@ -38,14 +38,14 @@ #include -kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *parent, const char *name) - : TQLabel (parent, name), +kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *tqparent, const char *name) + : TQLabel (tqparent, name), m_showEllipsis (true) { } -kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name) - : TQLabel (parent, name), +kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name) + : TQLabel (tqparent, name), m_showEllipsis (true) { setText (text); @@ -53,11 +53,11 @@ kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent // public virtual -TQSize kpSqueezedTextLabel::minimumSizeHint () const +TQSize kpSqueezedTextLabel::tqminimumSizeHint () const { -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 - kdDebug () << "kpSqueezedTextLabel::minimumSizeHint() qLabel prefers" - << TQLabel::minimumSizeHint () << endl; +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 + kdDebug () << "kpSqueezedTextLabel::tqminimumSizeHint() qLabel prefers" + << TQLabel::tqminimumSizeHint () << endl; #endif return TQSize (-1/*no minimum width*/, TQLabel::minimumHeight ()); } @@ -88,7 +88,7 @@ void kpSqueezedTextLabel::setShowEllipsis (bool yes) } -// public slots virtual [base QLabel] +// public slots virtual [base TQLabel] void kpSqueezedTextLabel::setText (const TQString &text) { m_fullText = text; @@ -96,10 +96,10 @@ void kpSqueezedTextLabel::setText (const TQString &text) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e) { -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "kpSqueezedTextLabeL::resizeEvent() size=" << e->size () << " oldSize=" << e->oldSize () << endl; @@ -111,19 +111,19 @@ void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e) // protected TQString kpSqueezedTextLabel::ellipsisText () const { - return m_showEllipsis ? i18n ("...") : TQString::null; + return m_showEllipsis ? i18n ("...") : TQString(); } // protected void kpSqueezedTextLabel::squeezeText () { -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "kpSqueezedTextLabeL::squeezeText" << endl; #endif TQFontMetrics fontMetrics (font ()); int fullTextWidth = fontMetrics.width (m_fullText); -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tfullText=" << m_fullText << " fullTextWidth=" << fullTextWidth << " labelWidth=" << width () @@ -132,14 +132,14 @@ void kpSqueezedTextLabel::squeezeText () if (fullTextWidth <= width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tfullText will fit - display" << endl; #endif TQLabel::setText (m_fullText); } else { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tfullText won't fit :( - squeeze" << endl; kdDebug () << "\t\twidth of \"...\"=" << fontMetrics.width (ellipsisText ()) @@ -148,10 +148,10 @@ void kpSqueezedTextLabel::squeezeText () #endif if (fontMetrics.width (ellipsisText ()) > width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\t\tcan't even fit \"...\" - forget it" << endl; #endif - TQLabel::setText (TQString::null); + TQLabel::setText (TQString()); return; } @@ -164,7 +164,7 @@ void kpSqueezedTextLabel::squeezeText () { int numLettersToUseMid = (numLettersToUseLo + numLettersToUseHi) / 2; int squeezedWidth = fontMetrics.width (m_fullText.left (numLettersToUseMid) + ellipsisText ()); - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tbsearch: lo=" << numLettersToUseLo << " hi=" << numLettersToUseHi << " mid=" << numLettersToUseMid @@ -175,7 +175,7 @@ void kpSqueezedTextLabel::squeezeText () if (squeezedWidth == width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\tperfect match!" << endl; #endif numLettersToUse = numLettersToUseMid; @@ -183,14 +183,14 @@ void kpSqueezedTextLabel::squeezeText () } else if (squeezedWidth < width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\tsmall enough - numLettersToUse=" << numLettersToUse << endl; #endif if (numLettersToUseMid > numLettersToUse) { numLettersToUse = numLettersToUseMid; - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\t\tset numLettersToUse=" << numLettersToUse << endl; @@ -201,7 +201,7 @@ void kpSqueezedTextLabel::squeezeText () } else { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\ttoo big" << endl; #endif numLettersToUseHi = numLettersToUseMid - 1; diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.h b/kolourpaint/widgets/kpsqueezedtextlabel.h index f4bd320d..1169be63 100644 --- a/kolourpaint/widgets/kpsqueezedtextlabel.h +++ b/kolourpaint/widgets/kpsqueezedtextlabel.h @@ -34,15 +34,16 @@ // KSqueezedTextLabel done properly - squeeze at the end of the string, // not the middle. -class kpSqueezedTextLabel : public QLabel +class kpSqueezedTextLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - kpSqueezedTextLabel (TQWidget *parent, const char *name = 0); - kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name = 0); + kpSqueezedTextLabel (TQWidget *tqparent, const char *name = 0); + kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name = 0); - virtual TQSize minimumSizeHint () const; + virtual TQSize tqminimumSizeHint () const; // TODO: maybe text() should return the full text? TQString fullText () const; diff --git a/kolourpaint/widgets/kptooltoolbar.cpp b/kolourpaint/widgets/kptooltoolbar.cpp index 26c610e9..163a7f49 100644 --- a/kolourpaint/widgets/kptooltoolbar.cpp +++ b/kolourpaint/widgets/kptooltoolbar.cpp @@ -55,11 +55,11 @@ #include -class kpToolButton : public QToolButton +class kpToolButton : public TQToolButton { public: - kpToolButton (kpTool *tool, TQWidget *parent) - : TQToolButton (parent), + kpToolButton (kpTool *tool, TQWidget *tqparent) + : TQToolButton (tqparent), m_tool (tool) { } @@ -69,7 +69,7 @@ public: } protected: - // virtual [base QWidget] + // virtual [base TQWidget] void mouseDoubleClickEvent (TQMouseEvent *e) { if (e->button () == Qt::LeftButton && m_tool) @@ -144,7 +144,7 @@ kpToolToolBar::kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, i setOrientation (orientation ()); #if DEBUG_KP_TOOL_TOOL_BAR - kdDebug () << "kpToolToolBar:: layout tool widgets msec=" + kdDebug () << "kpToolToolBar:: tqlayout tool widgets msec=" << timer.elapsed () << endl; #endif @@ -199,7 +199,7 @@ int kpToolToolBar::defaultIconSize () if (m_defaultIconSize <= 0) { - // Adapt according to screen geometry + // Adapt according to screen tqgeometry const TQRect desktopSize = KGlobalSettings::desktopGeometry (this); #if DEBUG_KP_TOOL_TOOL_BAR kdDebug () << "\tadapting to screen size=" << desktopSize << endl; @@ -547,7 +547,7 @@ void kpToolToolBar::slotToolActionToolTipChanged () } -// public slot virtual [base QDockWindow] +// public slot virtual [base TQDockWindow] void kpToolToolBar::setOrientation (Qt::Orientation o) { #if DEBUG_KP_TOOL_TOOL_BAR @@ -616,7 +616,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o) { m_baseLayout->addWidget (*it, 0/*stretch*/, - o == Qt::Vertical ? Qt::AlignHCenter : Qt::AlignVCenter); + o == Qt::Vertical ? TQt::AlignHCenter : TQt::AlignVCenter); } } diff --git a/kolourpaint/widgets/kptooltoolbar.h b/kolourpaint/widgets/kptooltoolbar.h index 417ae022..5005396f 100644 --- a/kolourpaint/widgets/kptooltoolbar.h +++ b/kolourpaint/widgets/kptooltoolbar.h @@ -54,6 +54,7 @@ class kpToolWidgetSpraycanSize; class kpToolToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0); diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp index 0d0a9245..c230c1ee 100644 --- a/kolourpaint/widgets/kptoolwidgetbase.cpp +++ b/kolourpaint/widgets/kptoolwidgetbase.cpp @@ -45,8 +45,8 @@ #include -kpToolWidgetBase::kpToolWidgetBase (TQWidget *parent, const char *name) - : TQFrame (parent, name), +kpToolWidgetBase::kpToolWidgetBase (TQWidget *tqparent, const char *name) + : TQFrame (tqparent, name), m_invertSelectedPixmap (true), m_selectedRow (-1), m_selectedCol (-1) { @@ -92,9 +92,9 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol) << endl; #endif - relayoutOptions (); + retqlayoutOptions (); - const QPair rowColPair = defaultSelectedRowAndCol (); + const TQPair rowColPair = defaultSelectedRowAndCol (); if (!setSelected (rowColPair.first, rowColPair.second, false/*don't save*/)) { if (!setSelected (fallBackRow, fallBackCol)) @@ -166,7 +166,7 @@ TQValueVector kpToolWidgetBase::spreadOutElements (const TQValueVector kpToolWidgetBase::defaultSelectedRowAndCol () const +TQPair kpToolWidgetBase::defaultSelectedRowAndCol () const { int row = -1, col = -1; @@ -175,10 +175,10 @@ QPair kpToolWidgetBase::defaultSelectedRowAndCol () const KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools); KConfigBase *cfg = cfgGroupSaver.config (); - TQString nameString = TQString::fromLatin1 (name ()); + TQString nameString = TQString::tqfromLatin1 (name ()); - row = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Row"), -1); - col = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Col"), -1); + row = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Row"), -1); + col = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Col"), -1); } #if DEBUG_KP_TOOL_WIDGET_BASE @@ -188,7 +188,7 @@ QPair kpToolWidgetBase::defaultSelectedRowAndCol () const << endl; #endif - return qMakePair (row, col); + return tqMakePair (row, col); } // public @@ -218,18 +218,18 @@ void kpToolWidgetBase::saveSelectedAsDefault () const KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools); KConfigBase *cfg = cfgGroupSaver.config (); - TQString nameString = TQString::fromLatin1 (name ()); - cfg->writeEntry (nameString + TQString::fromLatin1 (" Row"), m_selectedRow); - cfg->writeEntry (nameString + TQString::fromLatin1 (" Col"), m_selectedCol); + TQString nameString = TQString::tqfromLatin1 (name ()); + cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Row"), m_selectedRow); + cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Col"), m_selectedCol); cfg->sync (); } // public -void kpToolWidgetBase::relayoutOptions () +void kpToolWidgetBase::retqlayoutOptions () { #if DEBUG_KP_TOOL_WIDGET_BASE - kdDebug () << "kpToolWidgetBase::relayoutOptions()" << endl; + kdDebug () << "kpToolWidgetBase::retqlayoutOptions()" << endl; #endif while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0) @@ -536,7 +536,7 @@ bool kpToolWidgetBase::selectNextOption () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e) { e->ignore (); @@ -549,7 +549,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e) { for (int j = 0; j < (int) m_pixmapRects [i].count (); j++) { - if (m_pixmapRects [i][j].contains (e->pos ())) + if (m_pixmapRects [i][j].tqcontains (e->pos ())) { setSelected (i, j); e->accept (); @@ -559,7 +559,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e) } } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpToolWidgetBase::drawContents (TQPainter *painter) { #if DEBUG_KP_TOOL_WIDGET_BASE && 1 @@ -583,7 +583,7 @@ void kpToolWidgetBase::drawContents (TQPainter *painter) if (i == m_selectedRow && j == m_selectedCol) { - painter->fillRect (rect, Qt::blue/*selection color*/); + painter->fillRect (rect, TQt::blue/*selection color*/); if (m_invertSelectedPixmap) kpEffectInvertCommand::apply (&pixmap); diff --git a/kolourpaint/widgets/kptoolwidgetbase.h b/kolourpaint/widgets/kptoolwidgetbase.h index 1a4c8a6f..033f4946 100644 --- a/kolourpaint/widgets/kptoolwidgetbase.h +++ b/kolourpaint/widgets/kptoolwidgetbase.h @@ -40,17 +40,18 @@ class TQPainter; -// TODO: frame becomes a combobox when its parent kpToolToolBar becomes too small -class kpToolWidgetBase : public QFrame +// TODO: frame becomes a combobox when its tqparent kpToolToolBar becomes too small +class kpToolWidgetBase : public TQFrame { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetBase (TQWidget *parent, const char *name); // must provide a name for config to work + kpToolWidgetBase (TQWidget *tqparent, const char *name); // must provide a name for config to work virtual ~kpToolWidgetBase (); public: - void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString::null); + void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString()); void startNewOptionRow (); // Call this at the end of your constructor. @@ -63,13 +64,13 @@ private: public: // (only have to use these if you don't use finishConstruction()) // (rereads from config file) - QPair defaultSelectedRowAndCol () const; + TQPair defaultSelectedRowAndCol () const; int defaultSelectedRow () const; int defaultSelectedCol () const; void saveSelectedAsDefault () const; - void relayoutOptions (); + void retqlayoutOptions (); public: int selectedRow () const; diff --git a/kolourpaint/widgets/kptoolwidgetbrush.cpp b/kolourpaint/widgets/kptoolwidgetbrush.cpp index 1e53891e..69445905 100644 --- a/kolourpaint/widgets/kptoolwidgetbrush.cpp +++ b/kolourpaint/widgets/kptoolwidgetbrush.cpp @@ -52,14 +52,14 @@ static int brushSize [][3] = #define BRUSH_SIZE_NUM_COLS (int (sizeof (brushSize [0]) / sizeof (brushSize [0][0]))) #define BRUSH_SIZE_NUM_ROWS (int (sizeof (brushSize) / sizeof (brushSize [0]))) -kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); TQPixmap *pm = m_brushBitmaps; - for (int shape = 0; shape < BRUSH_SIZE_NUM_ROWS; shape++) + for (int tqshape = 0; tqshape < BRUSH_SIZE_NUM_ROWS; tqshape++) { for (int i = 0; i < BRUSH_SIZE_NUM_COLS; i++) { @@ -68,7 +68,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) pm->resize ((w <= 0 ? width () : w), (h <= 0 ? height () : h)); - const int s = brushSize [shape][i]; + const int s = brushSize [tqshape][i]; TQRect rect; if (s >= pm->width () || s >= pm->height ()) @@ -85,14 +85,14 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) kdDebug () << "kpToolWidgetBrush::kpToolWidgetBrush() rect=" << rect << endl; #endif - pm->fill (Qt::white); + pm->fill (TQt::white); TQPainter painter (pm); - painter.setPen (Qt::black); - painter.setBrush (Qt::black); + painter.setPen (TQt::black); + painter.setBrush (TQt::black); // sync: - switch (shape) + switch (tqshape) { case 0: painter.drawEllipse (rect); @@ -110,7 +110,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) painter.end (); pm->setMask (pm->createHeuristicMask ()); - addOption (*pm, brushName (shape, i)/*tooltip*/); + addOption (*pm, brushName (tqshape, i)/*tooltip*/); pm++; } @@ -127,38 +127,38 @@ kpToolWidgetBrush::~kpToolWidgetBrush () // private -TQString kpToolWidgetBrush::brushName (int shape, int whichSize) +TQString kpToolWidgetBrush::brushName (int tqshape, int whichSize) { - int s = brushSize [shape][whichSize]; + int s = brushSize [tqshape][whichSize]; if (s == 1) return i18n ("1x1"); - TQString shapeName; + TQString tqshapeName; // sync: - switch (shape) + switch (tqshape) { case 0: - shapeName = i18n ("Circle"); + tqshapeName = i18n ("Circle"); break; case 1: - shapeName = i18n ("Square"); + tqshapeName = i18n ("Square"); break; case 2: - // TODO: is this really the name of a shape? :) - shapeName = i18n ("Slash"); + // TODO: is this really the name of a tqshape? :) + tqshapeName = i18n ("Slash"); break; case 3: - // TODO: is this really the name of a shape? :) - shapeName = i18n ("Backslash"); + // TODO: is this really the name of a tqshape? :) + tqshapeName = i18n ("Backslash"); break; } - if (shapeName.isEmpty ()) - return TQString::null; + if (tqshapeName.isEmpty ()) + return TQString(); - return i18n ("%1x%2 %3").arg (s).arg (s).arg (shapeName); + return i18n ("%1x%2 %3").arg (s).arg (s).arg (tqshapeName); } TQPixmap kpToolWidgetBrush::brush () const diff --git a/kolourpaint/widgets/kptoolwidgetbrush.h b/kolourpaint/widgets/kptoolwidgetbrush.h index 563d9625..7fc2ffe0 100644 --- a/kolourpaint/widgets/kptoolwidgetbrush.h +++ b/kolourpaint/widgets/kptoolwidgetbrush.h @@ -36,13 +36,14 @@ class kpToolWidgetBrush : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetBrush (TQWidget *parent, const char *name); + kpToolWidgetBrush (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetBrush (); private: - TQString brushName (int shape, int whichSize); + TQString brushName (int tqshape, int whichSize); public: TQPixmap brush () const; diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.cpp b/kolourpaint/widgets/kptoolwidgeterasersize.cpp index 9b9ffe8a..effd631f 100644 --- a/kolourpaint/widgets/kptoolwidgeterasersize.cpp +++ b/kolourpaint/widgets/kptoolwidgeterasersize.cpp @@ -44,8 +44,8 @@ static int eraserSizes [] = {2, 3, 5, 9, 17, 29}; static const int numEraserSizes = int (sizeof (eraserSizes) / sizeof (eraserSizes [0])); -kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); @@ -60,29 +60,29 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *na int s = eraserSizes [i]; cursorPixmap->resize (s, s); - cursorPixmap->fill (Qt::black); + cursorPixmap->fill (TQt::black); TQPixmap previewPixmap (s, s); if (i < 3) { - // HACK: kpToolWidgetBase's layout code sucks and gives uneven spacing + // HACK: kpToolWidgetBase's tqlayout code sucks and gives uneven spacing previewPixmap.resize ((width () - 4) / 3, 9); } TQPainter painter (&previewPixmap); TQRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s); - painter.fillRect (rect, Qt::black); + painter.fillRect (rect, TQt::black); painter.end (); - TQBitmap mask (previewPixmap.width (), previewPixmap.height ()); - mask.fill (Qt::color0/*transparent*/); + TQBitmap tqmask (previewPixmap.width (), previewPixmap.height ()); + tqmask.fill (TQt::color0/*transparent*/); - TQPainter maskPainter (&mask); - maskPainter.fillRect (rect, Qt::color1/*opaque*/); - maskPainter.end (); + TQPainter tqmaskPainter (&tqmask); + tqmaskPainter.fillRect (rect, TQt::color1/*opaque*/); + tqmaskPainter.end (); - previewPixmap.setMask (mask); + previewPixmap.setMask (tqmask); addOption (previewPixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/); @@ -115,7 +115,7 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const // TODO: why are we even storing m_cursorPixmaps? TQPixmap pixmap = m_cursorPixmaps [selected ()]; if (color.isOpaque ()) - pixmap.fill (color.toQColor ()); + pixmap.fill (color.toTQColor ()); bool showBorder = (pixmap.width () > 2 && pixmap.height () > 2); @@ -123,26 +123,26 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const if (showBorder) { TQPainter painter (&pixmap); - painter.setPen (Qt::black); + painter.setPen (TQt::black); painter.drawRect (pixmap.rect ()); } if (color.isTransparent ()) { - TQBitmap maskBitmap (pixmap.width (), pixmap.height ()); - maskBitmap.fill (Qt::color0/*transparent*/); + TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ()); + tqmaskBitmap.fill (TQt::color0/*transparent*/); if (showBorder) { - TQPainter maskBitmapPainter (&maskBitmap); - maskBitmapPainter.setPen (Qt::color1/*opaque*/); - maskBitmapPainter.drawRect (maskBitmap.rect ()); + TQPainter tqmaskBitmapPainter (&tqmaskBitmap); + tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/); + tqmaskBitmapPainter.drawRect (tqmaskBitmap.rect ()); } - pixmap.setMask (maskBitmap); + pixmap.setMask (tqmaskBitmap); } diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.h b/kolourpaint/widgets/kptoolwidgeterasersize.h index 09b8c0f8..1568088d 100644 --- a/kolourpaint/widgets/kptoolwidgeterasersize.h +++ b/kolourpaint/widgets/kptoolwidgeterasersize.h @@ -38,9 +38,10 @@ class kpColor; class kpToolWidgetEraserSize : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetEraserSize (TQWidget *parent, const char *name); + kpToolWidgetEraserSize (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetEraserSize (); int eraserSize () const; diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp index 9b780b3f..c59b730e 100644 --- a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp +++ b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp @@ -42,8 +42,8 @@ #include -kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); @@ -71,34 +71,34 @@ kpToolWidgetFillStyle::~kpToolWidgetFillStyle () TQPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h) { TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h)); - pixmap.fill (Qt::white); + pixmap.fill (TQt::white); TQPainter painter (&pixmap); - painter.setPen (TQPen (Qt::black, 2)); + painter.setPen (TQPen (TQt::black, 2)); painter.setBrush (brushForFillStyle (fs, - kpColor (Qt::black.rgb ())/*foreground*/, - kpColor (Qt::gray.rgb ())/*background*/)); + kpColor (TQt::black.rgb ())/*foreground*/, + kpColor (TQt::gray.rgb ())/*background*/)); painter.drawRect (2, 2, w - 3, h - 3); painter.end (); - TQBitmap mask (pixmap.width (), pixmap.height ()); - mask.fill (Qt::color0); + TQBitmap tqmask (pixmap.width (), pixmap.height ()); + tqmask.fill (TQt::color0); - painter.begin (&mask); - painter.setPen (TQPen (Qt::color1, 2)); + painter.begin (&tqmask); + painter.setPen (TQPen (TQt::color1, 2)); if (fs == FillWithBackground || fs == FillWithForeground) - painter.setBrush (Qt::color1); + painter.setBrush (TQt::color1); painter.drawRect (2, 2, w - 3, h - 3); painter.end (); - pixmap.setMask (mask); + pixmap.setMask (tqmask); return pixmap; } @@ -121,7 +121,7 @@ TQString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const return i18n ("Fill with Foreground Color"); break; default: - return TQString::null; + return TQString(); break; } } @@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const } // public static -TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs, +TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs, const kpColor &foregroundColor, const kpColor &backgroundColor) { @@ -152,10 +152,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs, return Qt::NoBrush; break; case FillWithBackground: - return TQBrush (backgroundColor.maskColor ()); + return TQBrush (backgroundColor.tqmaskColor ()); break; case FillWithForeground: - return TQBrush (foregroundColor.maskColor ()); + return TQBrush (foregroundColor.tqmaskColor ()); break; default: return Qt::NoBrush; @@ -163,10 +163,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs, } } -TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor, +TQBrush kpToolWidgetFillStyle::tqmaskBrush (const kpColor &foregroundColor, const kpColor &backgroundColor) { - return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor); + return tqmaskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor); } // public static @@ -186,13 +186,13 @@ TQBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs, break; case FillWithBackground: if (backgroundColor.isOpaque ()) - return TQBrush (backgroundColor.toQColor ()); + return TQBrush (backgroundColor.toTQColor ()); else return Qt::NoBrush; break; case FillWithForeground: if (foregroundColor.isOpaque ()) - return TQBrush (foregroundColor.toQColor ()); + return TQBrush (foregroundColor.toTQColor ()); else return Qt::NoBrush; break; diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.h b/kolourpaint/widgets/kptoolwidgetfillstyle.h index 86a47270..221d0245 100644 --- a/kolourpaint/widgets/kptoolwidgetfillstyle.h +++ b/kolourpaint/widgets/kptoolwidgetfillstyle.h @@ -38,9 +38,10 @@ class kpColor; class kpToolWidgetFillStyle : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetFillStyle (TQWidget *parent, const char *name); + kpToolWidgetFillStyle (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetFillStyle (); enum FillStyle @@ -58,10 +59,10 @@ private: public: FillStyle fillStyle () const; - static TQBrush maskBrushForFillStyle (FillStyle fs, + static TQBrush tqmaskBrushForFillStyle (FillStyle fs, const kpColor &foregroundColor, const kpColor &backgroundColor); - TQBrush maskBrush (const kpColor &foregroundColor, + TQBrush tqmaskBrush (const kpColor &foregroundColor, const kpColor &backgroundColor); static TQBrush brushForFillStyle (FillStyle fs, diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp index ded51a03..e7804149 100644 --- a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp +++ b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp @@ -36,8 +36,8 @@ static int lineWidths [] = {1, 2, 3, 5, 8}; -kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); @@ -50,24 +50,24 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name { TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h)); - pixmap.fill (Qt::white); + pixmap.fill (TQt::white); - TQBitmap maskBitmap (pixmap.width (), pixmap.height ()); - maskBitmap.fill (Qt::color0/*transparent*/); + TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ()); + tqmaskBitmap.fill (TQt::color0/*transparent*/); - TQPainter painter (&pixmap), maskPainter (&maskBitmap); - painter.setPen (Qt::black), maskPainter.setPen (Qt::color1/*opaque*/); - painter.setBrush (Qt::black), maskPainter.setBrush (Qt::color1/*opaque*/); + TQPainter painter (&pixmap), tqmaskPainter (&tqmaskBitmap); + painter.setPen (TQt::black), tqmaskPainter.setPen (TQt::color1/*opaque*/); + painter.setBrush (TQt::black), tqmaskPainter.setBrush (TQt::color1/*opaque*/); TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2, pixmap.width (), lineWidths [i]); - painter.drawRect (rect), maskPainter.drawRect (rect); + painter.drawRect (rect), tqmaskPainter.drawRect (rect); - painter.end (), maskPainter.end (); + painter.end (), tqmaskPainter.end (); - pixmap.setMask (maskBitmap); + pixmap.setMask (tqmaskBitmap); addOption (pixmap, TQString::number (lineWidths [i])); startNewOptionRow (); diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.h b/kolourpaint/widgets/kptoolwidgetlinewidth.h index 8fa041a0..8ac76909 100644 --- a/kolourpaint/widgets/kptoolwidgetlinewidth.h +++ b/kolourpaint/widgets/kptoolwidgetlinewidth.h @@ -34,9 +34,10 @@ class kpToolWidgetLineWidth : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetLineWidth (TQWidget *parent, const char *name); + kpToolWidgetLineWidth (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetLineWidth (); int lineWidth () const; diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp index 4cd5b6f6..6479d891 100644 --- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp +++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp @@ -35,8 +35,8 @@ #include -kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (false); diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h index 82ea3f50..45e49a2f 100644 --- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h +++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h @@ -35,9 +35,10 @@ class kpToolWidgetOpaqueOrTransparent : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name); + kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetOpaqueOrTransparent (); bool isOpaque () const; diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp index 2f426df5..cce8f1b5 100644 --- a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp +++ b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp @@ -44,8 +44,8 @@ static int spraycanSizes [] = {9, 17, 29}; -kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { #if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE kdDebug () << "kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize() CALLED!" << endl; @@ -54,14 +54,14 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++) { int s = spraycanSizes [i]; - TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s); + TQString iconName = TQString ("tool_spraycan_%1x%1").tqarg (s).tqarg(s); #if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE kdDebug () << "\ticonName=" << iconName << endl; #endif TQPixmap pixmap (s, s); - pixmap.fill (Qt::white); + pixmap.fill (TQt::white); TQPainter painter (&pixmap); painter.drawPixmap (0, 0, UserIcon (iconName)); @@ -69,24 +69,24 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char TQImage image = kpPixmapFX::convertToImage (pixmap); - TQBitmap mask (pixmap.width (), pixmap.height ()); - mask.fill (Qt::color0); + TQBitmap tqmask (pixmap.width (), pixmap.height ()); + tqmask.fill (TQt::color0); - painter.begin (&mask); - painter.setPen (Qt::color1); + painter.begin (&tqmask); + painter.setPen (TQt::color1); for (int y = 0; y < image.height (); y++) { for (int x = 0; x < image.width (); x++) { - if ((image.pixel (x, y) & RGB_MASK) == 0/*black*/) + if ((image.pixel (x, y) & TQRGB_MASK) == 0/*black*/) painter.drawPoint (x, y); // mark as opaque } } painter.end (); - pixmap.setMask (mask); + pixmap.setMask (tqmask); addOption (pixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/); if (i == 1) diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.h b/kolourpaint/widgets/kptoolwidgetspraycansize.h index 6cc7d11e..ef86891f 100644 --- a/kolourpaint/widgets/kptoolwidgetspraycansize.h +++ b/kolourpaint/widgets/kptoolwidgetspraycansize.h @@ -34,9 +34,10 @@ class kpToolWidgetSpraycanSize : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetSpraycanSize (TQWidget *parent, const char *name); + kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetSpraycanSize (); int spraycanSize () const; diff --git a/kooka/CHANGES b/kooka/CHANGES index 0b384de6..550637d7 100644 --- a/kooka/CHANGES +++ b/kooka/CHANGES @@ -20,7 +20,7 @@ scanned with about 150 dpi. via mime mechanism of KDE (KRun). OCR-Parameter get stored via KConfig. OCR may be performed on the entire image or the selection. -* Reworked the save assistant: New layout and fully KDE2-Compliant. +* Reworked the save assistant: New tqlayout and fully KDE2-Compliant. Still no new Image format help texts. * Reworked the startup dialog: Allows to select the scan device from a diff --git a/kooka/dwmenuaction.cpp b/kooka/dwmenuaction.cpp index 920fb433..d77c8d16 100644 --- a/kooka/dwmenuaction.cpp +++ b/kooka/dwmenuaction.cpp @@ -22,8 +22,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -32,9 +32,9 @@ //------------------------------------- dwMenuAction::dwMenuAction( const TQString& text, const KShortcut& cut, - KDockWidget *dw,TQObject* parent, + KDockWidget *dw,TQObject* tqparent, KDockMainWindow *mw, const char* name ) - :KToggleAction(text,cut,parent,name),m_dw(dw),m_mw(mw) + :KToggleAction(text,cut,tqparent,name),m_dw(dw),m_mw(mw) { connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool))); connect(m_dw->dockManager(),TQT_SIGNAL(change()),this,TQT_SLOT(anDWChanged())); diff --git a/kooka/dwmenuaction.h b/kooka/dwmenuaction.h index e260a094..d6cac229 100644 --- a/kooka/dwmenuaction.h +++ b/kooka/dwmenuaction.h @@ -22,8 +22,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -35,7 +35,7 @@ /** * This class is just a helper class since the KDockWidget classes do not yet - * export KActions but only a QPopup-Pointer, which is quite useless in case + * export KActions but only a TQPopup-Pointer, which is quite useless in case * you have a xml-file driven gui. * This class provides Actions for show and hide parts of the GUI (dockwidgets) * Maybe that classes can be removed as soon the DockWidget know Actions @@ -43,10 +43,11 @@ class dwMenuAction:public KToggleAction { Q_OBJECT + TQ_OBJECT public: dwMenuAction( const TQString& text, const KShortcut& cut = KShortcut(), - KDockWidget *dw=0, TQObject* parent = 0, + KDockWidget *dw=0, TQObject* tqparent = 0, KDockMainWindow * mw=0, const char* name = 0 ); virtual ~dwMenuAction(); diff --git a/kooka/formathelp.h b/kooka/formathelp.h index 7887a240..9e754bdb 100644 --- a/kooka/formathelp.h +++ b/kooka/formathelp.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ diff --git a/kooka/imageselectline.cpp b/kooka/imageselectline.cpp index 4145cc30..99ba935e 100644 --- a/kooka/imageselectline.cpp +++ b/kooka/imageselectline.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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 @@ -47,8 +47,8 @@ * together in a row. The button opens a file selector box to pick a file. */ -ImageSelectLine::ImageSelectLine( TQWidget *parent, const TQString& text ) - : TQHBox( parent ) +ImageSelectLine::ImageSelectLine( TQWidget *tqparent, const TQString& text ) + : TQHBox( tqparent ) { setSpacing( 5 ); (void) new TQLabel( text, this ); diff --git a/kooka/imageselectline.h b/kooka/imageselectline.h index 92cfec17..a9672edf 100644 --- a/kooka/imageselectline.h +++ b/kooka/imageselectline.h @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -40,11 +40,12 @@ class KURLComboBox; class TQPushButton; class TQStringList; -class ImageSelectLine:public QHBox +class ImageSelectLine:public TQHBox { Q_OBJECT + TQ_OBJECT public: - ImageSelectLine( TQWidget *parent, const TQString& text ); + ImageSelectLine( TQWidget *tqparent, const TQString& text ); KURL selectedURL() const; void setURL( const KURL& ); diff --git a/kooka/img_saver.cpp b/kooka/img_saver.cpp index b8c789fc..01a19461 100644 --- a/kooka/img_saver.cpp +++ b/kooka/img_saver.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -58,8 +58,8 @@ #include "previewer.h" #include "kookaimage.h" -FormatDialog::FormatDialog( TQWidget *parent, const TQString&, const char *name ) - :KDialogBase( parent, name, true, +FormatDialog::FormatDialog( TQWidget *tqparent, const TQString&, const char *name ) + :KDialogBase( tqparent, name, true, /* Tabbed,*/ i18n( "Kooka Save Assistant" ), Ok|Cancel, Ok ) @@ -116,7 +116,7 @@ FormatDialog::FormatDialog( TQWidget *parent, const TQString&, const char *name Q_CHECK_PTR(l_help); l_help->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); l_help->setText( i18n("-No format selected-" )); - l_help->setAlignment( AlignVCenter | AlignHCenter ); + l_help->tqsetAlignment( AlignVCenter | AlignHCenter ); l_help->setMinimumWidth(230); // Insert Selbox for subformat @@ -176,7 +176,7 @@ void FormatDialog::check_subformat( const TQString & format ) void FormatDialog::setSelectedFormat( TQString fo ) { - TQListBoxItem *item = lb_format->findItem( fo ); + TQListBoxItem *item = lb_format->tqfindItem( fo ); if( item ) { @@ -208,18 +208,18 @@ TQCString FormatDialog::getSubFormat( ) const #include "formathelp.h" void FormatDialog::buildHelp( void ) { - format_help.insert( TQString::fromLatin1("BMP"), HELP_BMP ); - format_help.insert( TQString::fromLatin1("PNM"), HELP_PNM ); - format_help.insert( TQString::fromLatin1("JPEG"), HELP_JPG ); - format_help.insert( TQString::fromLatin1("JPG"), HELP_JPG ); - format_help.insert( TQString::fromLatin1("EPS"), HELP_EPS ); + format_help.insert( TQString::tqfromLatin1("BMP"), HELP_BMP ); + format_help.insert( TQString::tqfromLatin1("PNM"), HELP_PNM ); + format_help.insert( TQString::tqfromLatin1("JPEG"), HELP_JPG ); + format_help.insert( TQString::tqfromLatin1("JPG"), HELP_JPG ); + format_help.insert( TQString::tqfromLatin1("EPS"), HELP_EPS ); } /* ********************************************************************** */ -ImgSaver::ImgSaver( TQWidget *parent, const KURL dir_name ) - : TQObject( parent ) +ImgSaver::ImgSaver( TQWidget *tqparent, const KURL dir_name ) + : TQObject( tqparent ) { if( dir_name.isEmpty() || dir_name.protocol() != "file" ) @@ -250,8 +250,8 @@ ImgSaver::ImgSaver( TQWidget *parent, const KURL dir_name ) } -ImgSaver::ImgSaver( TQWidget *parent ) - :TQObject( parent ) +ImgSaver::ImgSaver( TQWidget *tqparent ) + :TQObject( tqparent ) { directory = Previewer::galleryRoot(); createDir( directory ); @@ -276,14 +276,14 @@ void ImgSaver::createDir( const TQString& dir ) if( KIO::mkdir( KURL(dir))) { KMessageBox::sorry(0, i18n("The folder\n%1\n does not exist and could not be created;\n" - "please check the permissions.").arg(dir)); + "please check the permissions.").tqarg(dir)); } } #if 0 if( ! fi.isWritable() ) { KMessageBox::sorry(0, i18n("The directory\n%1\n is not writeable;\nplease check the permissions.") - .arg(dir)); + .tqarg(dir)); } #endif } @@ -395,7 +395,7 @@ TQString ImgSaver::createFilename( TQString format ) } /** - * This function gets a filename from the parent. The filename must not be relative. + * This function gets a filename from the tqparent. The filename must not be relative. **/ ImgSaveStat ImgSaver::saveImage( TQImage *image, const KURL& filename, const TQString& imgFormat ) { @@ -728,7 +728,7 @@ TQString ImgSaver::extension( const KURL& url ) { TQString extension = url.fileName(); - int dotPos = extension.findRev( '.' ); + int dotPos = extension.tqfindRev( '.' ); if( dotPos > 0 ) { int len = extension.length(); @@ -766,7 +766,7 @@ bool ImgSaver::renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt, TQWi TQString s; s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? "); - s += i18n( "That would result in the new filename: %1" ).arg( fName); + s += i18n( "That would result in the new filename: %1" ).tqarg( fName); result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"), i18n("Add Extension"), i18n("Do Not Add"), @@ -863,7 +863,7 @@ bool ImgSaver::copyImage( const KURL& fromUrl, const KURL& toUrl, TQWidget *over TQString s; s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? "); - s += i18n( "That would result in the new filename: %1" ).arg( fName); + s += i18n( "That would result in the new filename: %1" ).tqarg( fName); result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"), i18n("Add Extension"), i18n("Do Not Add"), diff --git a/kooka/img_saver.h b/kooka/img_saver.h index 95204ad7..31f6d8ab 100644 --- a/kooka/img_saver.h +++ b/kooka/img_saver.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -101,8 +101,9 @@ class KookaImage; class FormatDialog:public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FormatDialog( TQWidget *parent, const TQString&, const char * ); + FormatDialog( TQWidget *tqparent, const TQString&, const char * ); TQString getFormat( ) const; @@ -129,7 +130,7 @@ private: TQComboBox *cb_subf; TQListBox *lb_format; TQLabel *l_help; - QLabel *l2; + TQLabel *l2; TQCheckBox *cbRemember; TQCheckBox *cbDontAsk; }; @@ -144,6 +145,7 @@ private: class ImgSaver:public TQObject { Q_OBJECT + TQ_OBJECT public: /** * constructor of the image-saver object. @@ -153,8 +155,8 @@ public: * @param dir Name of the save root directory * @param name Name of a subdirectory in the saveroot. **/ - ImgSaver( TQWidget *parent, const KURL ); - ImgSaver( TQWidget *parent ); + ImgSaver( TQWidget *tqparent, const KURL ); + ImgSaver( TQWidget *tqparent ); TQString errorString( ImgSaveStat ); /** diff --git a/kooka/imgnamecombo.cpp b/kooka/imgnamecombo.cpp index 0e06646b..94faa083 100644 --- a/kooka/imgnamecombo.cpp +++ b/kooka/imgnamecombo.cpp @@ -20,8 +20,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -38,8 +38,8 @@ #include "imgnamecombo.h" #include "img_saver.h" -ImageNameCombo::ImageNameCombo( TQWidget *parent ) - : KComboBox( parent ) +ImageNameCombo::ImageNameCombo( TQWidget *tqparent ) + : KComboBox( tqparent ) { setInsertionPolicy( TQComboBox::AtTop ); } @@ -51,12 +51,12 @@ ImageNameCombo::~ImageNameCombo() void ImageNameCombo::slotPathRemove( KFileTreeBranch *branch, const TQString& relPath ) { - TQString path = branch->name() + TQString::fromLatin1(" - ") + relPath; + TQString path = branch->name() + TQString::tqfromLatin1(" - ") + relPath; kdDebug(28000) << "ImageNameCombo: Removing " << path << endl; TQString select = currentText(); - if( items.contains( path )) + if( items.tqcontains( path )) { kdDebug(28000) << "ImageNameCombo: Item exists-> deleting" << endl; items.remove( path ); @@ -74,7 +74,7 @@ void ImageNameCombo::rewriteList( KFileTreeBranch *branch, const TQString& selTe insertItem( branch->pixmap(), *it ); } - int index = items.findIndex( selText ); + int index = items.tqfindIndex( selText ); setCurrentItem( index ); } @@ -82,7 +82,7 @@ void ImageNameCombo::slotGalleryPathChanged( KFileTreeBranch* branch, const TQSt { TQString newPath; - newPath = branch->name() + TQString::fromLatin1(" - ") + relativPath; + newPath = branch->name() + TQString::tqfromLatin1(" - ") + relativPath; kdDebug( 28000) << "Inserting " << newPath << " to combobox" << endl; diff --git a/kooka/imgnamecombo.h b/kooka/imgnamecombo.h index 1beb1235..3a44aee3 100644 --- a/kooka/imgnamecombo.h +++ b/kooka/imgnamecombo.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -41,6 +41,7 @@ class KFileBranch; class ImageNameCombo: public KComboBox { Q_OBJECT + TQ_OBJECT public: ImageNameCombo( TQWidget* ); ~ImageNameCombo(); diff --git a/kooka/imgprintdialog.cpp b/kooka/imgprintdialog.cpp index fa7ee620..98a783f4 100644 --- a/kooka/imgprintdialog.cpp +++ b/kooka/imgprintdialog.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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 "imgprintdialog.h" @@ -47,15 +47,15 @@ #define ID_CUSTOM 2 #define ID_FIT_PAGE 3 -ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *parent, const char* name ) - : KPrintDialogPage( parent, name ), +ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *tqparent, const char* name ) + : KPrintDialogPage( tqparent, name ), m_image(img), m_ignoreSignal(false) { setTitle(i18n("Image Printing")); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - // layout->setMargin( KDialog::marginHint() ); - // layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + // tqlayout->setMargin( KDialog::marginHint() ); + // tqlayout->setSpacing( KDialog::spacingHint() ); m_scaleRadios = new TQButtonGroup( 2, Qt::Vertical, i18n("Image Print Size"), this ); m_scaleRadios->setRadioButtonExclusive(true); @@ -84,11 +84,11 @@ ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *parent, const char* n TQToolTip::add( m_rbFitPage, i18n("Printout uses maximum space on the selected pager. Aspect ratio is maintained.")); m_scaleRadios->insert( m_rbFitPage, ID_FIT_PAGE ); - layout->addWidget( m_scaleRadios ); + tqlayout->addWidget( m_scaleRadios ); TQHBoxLayout *hbox = new TQHBoxLayout( this ); - layout->addLayout( hbox ); + tqlayout->addLayout( hbox ); /** Box for Image Resolutions **/ TQVGroupBox *group1 = new TQVGroupBox( i18n("Resolutions"), this ); @@ -127,8 +127,8 @@ ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *parent, const char* n TQWidget *spaceEater = new TQWidget( this ); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); - layout->addWidget( spaceEater ); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + tqlayout->addWidget( spaceEater ); /* Set start values */ m_rbScreen->setChecked(true); @@ -167,7 +167,7 @@ void ImgPrintDialog::setOptions(const TQMap& opts) m_sizeH->setValue( help ); help = opts[OPT_SCREEN_RES].toInt(); - m_screenRes->setText(i18n( "Screen resolution: %1 dpi").arg(help)); + m_screenRes->setText(i18n( "Screen resolution: %1 dpi").tqarg(help)); help = opts[OPT_PSGEN_DRAFT].toInt(); m_psDraft->setChecked( help == 1 ); diff --git a/kooka/imgprintdialog.h b/kooka/imgprintdialog.h index f710820e..389a546c 100644 --- a/kooka/imgprintdialog.h +++ b/kooka/imgprintdialog.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -53,8 +53,9 @@ class TQCheckBox; class ImgPrintDialog: public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: - ImgPrintDialog( KookaImage *img, TQWidget *parent=0L, const char* name=0L ); + ImgPrintDialog( KookaImage *img, TQWidget *tqparent=0L, const char* name=0L ); void setOptions(const TQMap& opts); void getOptions(TQMap& opts, bool include_def = false); diff --git a/kooka/kadmosocr.cpp b/kooka/kadmosocr.cpp index d0d41e13..3110451f 100644 --- a/kooka/kadmosocr.cpp +++ b/kooka/kadmosocr.cpp @@ -25,8 +25,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -313,12 +313,12 @@ void CRep::partStrings( int line, int graphKnode, TQString soFar ) void CRep::drawCharBox( TQPixmap *pix, const TQRect& r ) { - drawBox( pix, r, TQColor( Qt::red )); + drawBox( pix, r, TQColor( TQt::red )); } void CRep::drawLineBox( TQPixmap* pix, const TQRect& r ) { - drawBox( pix, r, TQColor( Qt::blue )); + drawBox( pix, r, TQColor( TQt::blue )); } void CRep::drawBox( TQPixmap* pix, const TQRect& r, const TQColor& color ) @@ -356,7 +356,7 @@ KADMOS_ERROR CRep::SetImage(TQImage *Image) m_RepData.image.width = Image->width(); m_RepData.image.height = Image->height(); m_RepData.image.bitsperpixel = Image->depth(); - m_RepData.image.alignment = 1; + m_RepData.image.tqalignment = 1; m_RepData.image.fillorder = FILLORDER_MSB2LSB; // color if( Image->depth() == 1 || (Image->numColors()==2 && Image->depth() == 8) ) diff --git a/kooka/kadmosocr.h b/kooka/kadmosocr.h index cc4d225f..ca7edcb4 100644 --- a/kooka/kadmosocr.h +++ b/kooka/kadmosocr.h @@ -23,8 +23,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -66,9 +66,10 @@ namespace Kadmos { const char CPP_ERROR[] = "Kadmos CPP interface error"; /* ==== CRep ========================================= */ - class CRep : public QObject + class CRep : public TQObject { Q_OBJECT + TQ_OBJECT public: CRep(); virtual ~CRep(); diff --git a/kooka/kocrbase.cpp b/kooka/kocrbase.cpp index 3ede6ef0..4c9ccc14 100644 --- a/kooka/kocrbase.cpp +++ b/kooka/kocrbase.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -59,10 +59,10 @@ #include #include -KOCRBase::KOCRBase( TQWidget *parent, KSpellConfig *spellConfig, +KOCRBase::KOCRBase( TQWidget *tqparent, KSpellConfig *spellConfig, KDialogBase::DialogType face ) :KDialogBase( face, i18n("Optical Character Recognition"), - User2|Close|User1, User1, parent,0, false, true, + User2|Close|User1, User1, tqparent,0, false, true, KGuiItem( i18n("Start OCR" ), "launch", i18n("Start the Optical Character Recognition process" )), KGuiItem( i18n("Cancel" ), "stopocr", @@ -98,11 +98,11 @@ KOCRBase::KOCRBase( TQWidget *parent, KSpellConfig *spellConfig, } -KAnimWidget* KOCRBase::getAnimation(TQWidget *parent) +KAnimWidget* KOCRBase::getAnimation(TQWidget *tqparent) { if( ! m_animation ) { - m_animation = new KAnimWidget( TQString("kde"), 48, parent, "ANIMATION" ); + m_animation = new KAnimWidget( TQString("kde"), 48, tqparent, "ANIMATION" ); } return( m_animation ); } @@ -129,7 +129,7 @@ void KOCRBase::imgIntro() m_previewPix = new TQLabel( m_imgHBox ); m_previewPix->setPixmap(TQPixmap()); m_previewPix->setFixedSize(m_previewSize); - m_previewPix->setAlignment( Qt::AlignCenter ); + m_previewPix->tqsetAlignment( TQt::AlignCenter ); m_previewPix->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); // m_previewPix->resize(m_previewSize); @@ -164,7 +164,7 @@ void KOCRBase::ocrIntro( ) hb_cap->setSpacing( KDialog::spacingHint()); TQLabel *imgLab = new TQLabel( hb_cap ); - imgLab->setAlignment( Qt::AlignHCenter | Qt::AlignTop ); + imgLab->tqsetAlignment( TQt::AlignHCenter | TQt::AlignTop ); imgLab->setPixmap( pix ); pa = hb_cap; } @@ -188,7 +188,7 @@ void KOCRBase::spellCheckIntro() KSpellConfig *sCfg = new KSpellConfig( m_gbSpellOpts, "SPELLCHK", m_spellConfig, false ); /* A space eater */ TQWidget *spaceEater = new TQWidget(m_spellchkPage); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); /* connect toggle button */ connect( m_cbWantCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slWantSpellcheck(bool))); @@ -285,7 +285,7 @@ void KOCRBase::introduceImage( KookaImage* img) } } TQWidget *spaceEater = new TQWidget( m_metaBox ); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); m_metaBox->show(); } diff --git a/kooka/kocrbase.h b/kooka/kocrbase.h index a2a04342..5f7e55a9 100644 --- a/kooka/kocrbase.h +++ b/kooka/kocrbase.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -54,6 +54,7 @@ class TQGroupBox; class KOCRBase: public KDialogBase { Q_OBJECT + TQ_OBJECT public: KOCRBase( TQWidget *, KSpellConfig *spellConfig, KDialogBase::DialogType face = KDialogBase::Plain ); @@ -106,7 +107,7 @@ protected: * ocr engine used. * It calls the virtual subs ocrEngineName, ocrEngineLogo and ocrEngineDesc which * must return the approbiate values for the engines. - * @return a pointer to a VBox in which further elements can be layouted + * @return a pointer to a VBox in which further elements can be tqlayouted */ virtual void ocrIntro(); diff --git a/kooka/kocrgocr.cpp b/kooka/kocrgocr.cpp index aa6eb333..dbb255c4 100644 --- a/kooka/kocrgocr.cpp +++ b/kooka/kocrgocr.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -58,8 +58,8 @@ -KGOCRDialog::KGOCRDialog( TQWidget *parent, KSpellConfig *spellConfig ) - :KOCRBase( parent, spellConfig, KDialogBase::Tabbed ), +KGOCRDialog::KGOCRDialog( TQWidget *tqparent, KSpellConfig *spellConfig ) + :KOCRBase( tqparent, spellConfig, KDialogBase::Tabbed ), m_ocrCmd( TQString()) { kdDebug(28000) << "Starting KOCR-Start-Dialog!" << endl; @@ -96,7 +96,7 @@ EngineError KGOCRDialog::setupGui() KConfig *conf = KGlobal::config (); conf->setGroup( CFG_GROUP_OCR_DIA ); - // Horizontal line + //Qt::Horizontal line // (void) new KSeparator( KSeparator::HLine, page); // Entry-Field. diff --git a/kooka/kocrgocr.h b/kooka/kocrgocr.h index f17cdd0a..2b42ebfb 100644 --- a/kooka/kocrgocr.h +++ b/kooka/kocrgocr.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -45,6 +45,7 @@ class KSpellConfig; class KGOCRDialog: public KOCRBase { Q_OBJECT + TQ_OBJECT public: KGOCRDialog( TQWidget*, KSpellConfig* ); ~KGOCRDialog(); diff --git a/kooka/kocrkadmos.cpp b/kooka/kocrkadmos.cpp index 6ac6fb12..97d8310f 100644 --- a/kooka/kocrkadmos.cpp +++ b/kooka/kocrkadmos.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -64,8 +64,8 @@ #define CNTRY_CZ i18n( "Czech Republic, Slovakia") #define CNTRY_GB i18n( "Great Britain, USA" ) -KadmosDialog::KadmosDialog( TQWidget *parent, KSpellConfig *spellConfig ) - :KOCRBase( parent, spellConfig, KDialogBase::Tabbed ), +KadmosDialog::KadmosDialog( TQWidget *tqparent, KSpellConfig *spellConfig ) + :KOCRBase( tqparent, spellConfig, KDialogBase::Tabbed ), m_cbNoise(0), m_cbAutoscale(0), m_haveNorm(false) @@ -163,7 +163,7 @@ EngineError KadmosDialog::findClassifiers() if( name.startsWith( "ttf" ) ) { TQString lang = name.mid(3,2); - if( allCountries.contains(lang) ) + if( allCountries.tqcontains(lang) ) { TQString lngCountry = locale->twoAlphaToCountryName(lang); if( lngCountry.isEmpty() ) @@ -188,7 +188,7 @@ EngineError KadmosDialog::findClassifiers() else if( name.startsWith( "hand" ) ) { TQString lang = name.mid(4,2); - if( allCountries.contains(lang) ) + if( allCountries.tqcontains(lang) ) { TQString lngCountry = locale->twoAlphaToCountryName(lang); if( lngCountry.isEmpty() ) @@ -271,7 +271,7 @@ EngineError KadmosDialog::setupGui() /* continue page setup on the first page */ TQVBox *page = ocrPage(); - // Horizontal line + //Qt::Horizontal line (void) new KSeparator( KSeparator::HLine, page); // FIXME: dynamic classifier reading. @@ -422,14 +422,14 @@ bool KadmosDialog::getSelClassifier( TQString& path ) const if( res && ! fi.exists() ) { kdDebug(28000) << "Classifier file does not exist" << endl; - path = i18n("Classifier file %1 does not exist").arg(classifier); + path = i18n("Classifier file %1 does not exist").tqarg(classifier); res = false; } if( res && ! fi.isReadable() ) { kdDebug(28000) << "Classifier file could not be read" << endl; - path = i18n("Classifier file %1 is not readable").arg(classifier); + path = i18n("Classifier file %1 is not readable").tqarg(classifier); res = false; } @@ -461,7 +461,7 @@ TQString KadmosDialog::getSelClassifierName() const /* Get the long text from the combo box */ TQString selLang = m_cbLang->currentText(); TQString trans; - if( fType != "norm" && m_longCountry2short.contains( selLang )) + if( fType != "norm" && m_longCountry2short.tqcontains( selLang )) { TQString langType = m_longCountry2short[selLang]; trans = fType+langType+".rec"; diff --git a/kooka/kocrkadmos.h b/kooka/kocrkadmos.h index 567af55b..ac9a4176 100644 --- a/kooka/kocrkadmos.h +++ b/kooka/kocrkadmos.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -66,6 +66,7 @@ private: class KadmosDialog: public KOCRBase { Q_OBJECT + TQ_OBJECT public: KadmosDialog( TQWidget *, KSpellConfig *spellConfig ); ~KadmosDialog(); @@ -105,7 +106,7 @@ private: TQCheckBox *m_cbAutoscale; TQString m_customClassifierPath; - QButtonGroup *m_bbFont; + TQButtonGroup *m_bbFont; TQRadioButton *m_rbMachine; TQRadioButton *m_rbHand; diff --git a/kooka/kocrocrad.cpp b/kooka/kocrocrad.cpp index aab63405..31c3bc40 100644 --- a/kooka/kocrocrad.cpp +++ b/kooka/kocrocrad.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -54,8 +54,8 @@ -ocradDialog::ocradDialog( TQWidget *parent, KSpellConfig *spellConfig ) - :KOCRBase( parent, spellConfig, KDialogBase::Tabbed ), +ocradDialog::ocradDialog( TQWidget *tqparent, KSpellConfig *spellConfig ) + :KOCRBase( tqparent, spellConfig, KDialogBase::Tabbed ), m_ocrCmd( TQString()), m_orfUrlRequester(0L), m_layoutMode(0), @@ -92,7 +92,7 @@ TQString ocradDialog::ocrEngineDesc() const } -int ocradDialog::layoutDetectionMode() const +int ocradDialog::tqlayoutDetectionMode() const { return m_layoutMode->currentItem(); } @@ -107,7 +107,7 @@ EngineError ocradDialog::setupGui() KConfig *conf = KGlobal::config (); conf->setGroup( CFG_GROUP_OCR_DIA ); - // Horizontal line + //Qt::Horizontal line // (void) new KSeparator( KSeparator::HLine, page); // Entry-Field. @@ -129,20 +129,20 @@ EngineError ocradDialog::setupGui() else m_ocrCmd = res; - /** layout detection button **/ + /** tqlayout detection button **/ conf->setGroup( CFG_GROUP_OCRAD ); - int layoutDetect = conf->readNumEntry( CFG_OCRAD_LAYOUT_DETECTION, 0 ); - kdDebug(28000) << "Layout detection from config: " << layoutDetect << endl; + int tqlayoutDetect = conf->readNumEntry( CFG_OCRAD_LAYOUT_DETECTION, 0 ); + kdDebug(28000) << "Layout detection from config: " << tqlayoutDetect << endl; (void) new KSeparator( KSeparator::HLine, page); TQHBox *hb1 = new TQHBox(page); hb1->setSpacing( KDialog::spacingHint() ); - (void) new TQLabel( i18n("OCRAD layout analysis mode: "), hb1); + (void) new TQLabel( i18n("OCRAD tqlayout analysis mode: "), hb1); m_layoutMode = new TQComboBox(hb1); m_layoutMode->insertItem(i18n("No Layout Detection"), 0 ); m_layoutMode->insertItem(i18n("Column Detection"), 1 ); m_layoutMode->insertItem(i18n("Full Layout Detection"), 2); - m_layoutMode->setCurrentItem(layoutDetect); + m_layoutMode->setCurrentItem(tqlayoutDetect); /** stating the ocrad binary **/ (void) new KSeparator( KSeparator::HLine, page); diff --git a/kooka/kocrocrad.h b/kooka/kocrocrad.h index 828aceed..d33f03a3 100644 --- a/kooka/kocrocrad.h +++ b/kooka/kocrocrad.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -38,7 +38,7 @@ #include "kocrbase.h" #define CFG_GROUP_OCRAD "ocrad" -#define CFG_OCRAD_LAYOUT_DETECTION "layoutDetection" +#define CFG_OCRAD_LAYOUT_DETECTION "tqlayoutDetection" #define CFG_OCRAD_EXTRA_ARGUMENTS "extraArguments" #define CFG_OCRAD_FORMAT "format" #define CFG_OCRAD_CHARSET "charset" @@ -55,6 +55,7 @@ class TQComboBox; class ocradDialog: public KOCRBase { Q_OBJECT + TQ_OBJECT public: ocradDialog( TQWidget*, KSpellConfig* ); ~ocradDialog(); @@ -70,7 +71,7 @@ public: TQString orfUrl() const; - int layoutDetectionMode() const; + int tqlayoutDetectionMode() const; /** * returns the numeric version of the ocrad program. diff --git a/kooka/kooka.cpp b/kooka/kooka.cpp index aea6c2d8..dc05a622 100644 --- a/kooka/kooka.cpp +++ b/kooka/kooka.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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 "kooka.h" @@ -96,7 +96,7 @@ Kooka::Kooka( const TQCString& deviceToUse) changeCaption( i18n( "KDE Scanning" )); - setAutoSaveSettings( TQString::fromLatin1("General Options"), + setAutoSaveSettings( TQString::tqfromLatin1("General Options"), true ); } @@ -125,14 +125,14 @@ void Kooka::startup( void ) void Kooka::setupActions() { - KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection()); - KStdAction::quit(this , TQT_SLOT(close()), actionCollection()); + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(filePrint()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this) , TQT_SLOT(close()), actionCollection()); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection()); m_view->createDockMenu(actionCollection(), this, "settings_show_docks" ); @@ -161,7 +161,7 @@ actionCollection()); actionCollection(), "scaleOriginal" ); m_view->connectViewerAction( act ); -#ifdef QICONSET_HONOUR_ON_OFF +#ifdef TQICONSET_HONOUR_ON_OFF /* The Toggleaction does not seem to handle the on/off icon from TQIconSet */ TQIconSet lockSet; lockSet.setPixmap(BarIcon("lock") , TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::On ); @@ -180,68 +180,68 @@ actionCollection()); /* thumbview and gallery actions */ act = new KAction(i18n("Set Zoom..."), "viewmag", 0, - m_view, TQT_SLOT( slIVShowZoomDialog()), + TQT_TQOBJECT(m_view), TQT_SLOT( slIVShowZoomDialog()), actionCollection(), "showZoomDialog" ); m_view->connectViewerAction( act ); (void) new KAction(i18n("Create From Selectio&n"), "crop", CTRL+Key_N, - m_view, TQT_SLOT( slCreateNewImgFromSelection() ), + TQT_TQOBJECT(m_view), TQT_SLOT( slCreateNewImgFromSelection() ), actionCollection(), "createFromSelection" ); (void) new KAction(i18n("Mirror Image &Vertically"), "mirror-vert", CTRL+Key_V, - this, TQT_SLOT( slMirrorVertical() ), + TQT_TQOBJECT(this), TQT_SLOT( slMirrorVertical() ), actionCollection(), "mirrorVertical" ); - (void) new KAction(i18n("&Mirror Image Horizontally"), "mirror-horiz", CTRL+Key_M, - this, TQT_SLOT( slMirrorHorizontal() ), + (void) new KAction(i18n("&Mirror ImageQt::Horizontally"), "mirror-horiz", CTRL+Key_M, + TQT_TQOBJECT(this), TQT_SLOT( slMirrorHorizontal() ), actionCollection(), "mirrorHorizontal" ); (void) new KAction(i18n("Mirror Image &Both Directions"), "mirror-both", CTRL+Key_B, - this, TQT_SLOT( slMirrorBoth() ), + TQT_TQOBJECT(this), TQT_SLOT( slMirrorBoth() ), actionCollection(), "mirrorBoth" ); (void) new KAction(i18n("Open Image in &Graphic Application..."), "fileopen", CTRL+Key_G, - m_view, TQT_SLOT( slOpenCurrInGraphApp() ), + TQT_TQOBJECT(m_view), TQT_SLOT( slOpenCurrInGraphApp() ), actionCollection(), "openInGraphApp" ); act = new KAction(i18n("&Rotate Image Clockwise"), "rotate_cw", CTRL+Key_R, - this, TQT_SLOT( slRotateClockWise() ), + TQT_TQOBJECT(this), TQT_SLOT( slRotateClockWise() ), actionCollection(), "rotateClockwise" ); m_view->connectViewerAction( act ); act = new KAction(i18n("Rotate Image Counter-Clock&wise"), "rotate_ccw", CTRL+Key_W, - this, TQT_SLOT( slRotateCounterClockWise() ), + TQT_TQOBJECT(this), TQT_SLOT( slRotateCounterClockWise() ), actionCollection(), "rotateCounterClockwise" ); m_view->connectViewerAction( act ); act = new KAction(i18n("Rotate Image 180 &Degrees"), "rotate", CTRL+Key_D, - this, TQT_SLOT( slRotate180() ), + TQT_TQOBJECT(this), TQT_SLOT( slRotate180() ), actionCollection(), "upsitedown" ); m_view->connectViewerAction( act ); /* Gallery actions */ act = new KAction(i18n("&Create Folder..."), "folder_new", 0, - m_view->gallery(), TQT_SLOT( slotCreateFolder() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotCreateFolder() ), actionCollection(), "foldernew" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Save Image..."), "filesave", 0, - m_view->gallery(), TQT_SLOT( slotExportFile() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotExportFile() ), actionCollection(), "saveImage" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Import Image..."), "inline_image", 0, - m_view->gallery(), TQT_SLOT( slotImportFile() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotImportFile() ), actionCollection(), "importImage" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Delete Image"), "edittrash", 0, - m_view->gallery(), TQT_SLOT( slotDeleteItems() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotDeleteItems() ), actionCollection(), "deleteImage" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Unload Image"), "fileclose", 0, - m_view->gallery(), TQT_SLOT( slotUnloadItems() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotUnloadItems() ), actionCollection(), "unloadImage" ); m_view->connectGalleryAction( act ); @@ -257,11 +257,11 @@ actionCollection()); #endif (void) new KAction(i18n("Select Scan Device"), "scanner", 0, - m_view, TQT_SLOT( slSelectDevice()), + TQT_TQOBJECT(m_view), TQT_SLOT( slSelectDevice()), actionCollection(), "selectsource" ); (void) new KAction( i18n("Enable All Warnings && Messages"), 0, - this, TQT_SLOT(slEnableWarnings()), + TQT_TQOBJECT(this), TQT_SLOT(slEnableWarnings()), actionCollection(), "enable_msgs"); @@ -308,7 +308,7 @@ void Kooka::dragEnterEvent(TQDragEnterEvent *event) void Kooka::dropEvent(TQDropEvent *event) { // this is a very simplistic implementation of a drop event. we - // will only accept a dropped URL. the Qt dnd code can do *much* + // will only accept a dropped URL. the TQt dnd code can do *much* // much more, so please read the docs there KURL::List uri; diff --git a/kooka/kooka.h b/kooka/kooka.h index 91a98fea..6fa12078 100644 --- a/kooka/kooka.h +++ b/kooka/kooka.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -55,6 +55,7 @@ class KookaView; class Kooka : public KParts::DockMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -74,7 +75,7 @@ public: protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ virtual void dragEnterEvent(TQDragEnterEvent *event); // virtual void dropEvent(TQDropEvent *event); diff --git a/kooka/kookaimage.cpp b/kooka/kookaimage.cpp index 5857440a..a89a97cb 100644 --- a/kooka/kookaimage.cpp +++ b/kooka/kookaimage.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -167,7 +167,7 @@ bool KookaImage::loadFromUrl( const KURL& url ) #endif if( !haveTiff ) { - /* Qt can only read one image */ + /* TQt can only read one image */ ret = load(filename); if( ret ) { @@ -205,15 +205,15 @@ void KookaImage::extractNow() { kdDebug(28000) << "extracting a subimage number " << m_subNo << endl; - KookaImage *parent = parentImage(); + KookaImage *tqparent = tqparentImage(); - if( parent ) + if( tqparent ) { - loadTiffDir( parent->localFileName(), m_subNo ); + loadTiffDir( tqparent->localFileName(), m_subNo ); } else { - kdDebug(28000) << "ERR: No parent defined - can not laod subimage" << endl; + kdDebug(28000) << "ERR: No tqparent defined - can not laod subimage" << endl; } } @@ -300,7 +300,7 @@ bool KookaImage::loadTiffDir( const TQString& filename, int no ) float yScalefactor = xReso / yReso; kdDebug(28000) << "Different resolution x/y, rescaling with factor " << yScalefactor << endl; /* rescale the image */ - *this = smoothScale( imgWidth, int(imgHeight*yScalefactor), TQImage::ScaleFree ); + *this = smoothScale( imgWidth, int(imgHeight*yScalefactor), TQ_ScaleFree ); } else { @@ -308,7 +308,7 @@ bool KookaImage::loadTiffDir( const TQString& filename, int no ) float scalefactor = yReso / xReso; kdDebug(28000) << "Different resolution x/y, rescaling x with factor " << scalefactor << endl; /* rescale the image */ - *this = smoothScale( int(imgWidth*scalefactor), imgHeight, TQImage::ScaleFree ); + *this = smoothScale( int(imgWidth*scalefactor), imgHeight, TQ_ScaleFree ); } } @@ -328,7 +328,7 @@ KookaImage::~KookaImage() } -KookaImage* KookaImage::parentImage() const +KookaImage* KookaImage::tqparentImage() const { return( m_parent ); } diff --git a/kooka/kookaimage.h b/kooka/kookaimage.h index c75c2dae..53ae5eaf 100644 --- a/kooka/kookaimage.h +++ b/kooka/kookaimage.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -47,15 +47,15 @@ class KFileItem; typedef enum { MaxCut, MediumCut } TileMode; -class KookaImage: public QImage +class KookaImage: public TQImage { public: KookaImage( ); /** - * creating a subimage for a parent image. + * creating a subimage for a tqparent image. * @param subNo contains the sequence number of subimages to create. - * @param p is the parent image. + * @param p is the tqparent image. */ KookaImage( int subNo, KookaImage *p ); KookaImage( const TQImage& img ); @@ -76,9 +76,9 @@ public: int subImagesCount() const; /** - * the parent image. + * the tqparent image. */ - KookaImage* parentImage() const; + KookaImage* tqparentImage() const; /** * returns true if this is a subimage. @@ -144,7 +144,7 @@ private: bool loadTiffDir( const TQString&, int ); /* if subNo is 0, the image is the one and only. If it is larger than 0, the - * parent contains the filename */ + * tqparent contains the filename */ int m_subNo; /* In case being a subimage */ diff --git a/kooka/kookaimagemeta.cpp b/kooka/kookaimagemeta.cpp index 7ba1963d..cac78bdc 100644 --- a/kooka/kookaimagemeta.cpp +++ b/kooka/kookaimagemeta.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ diff --git a/kooka/kookaimagemeta.h b/kooka/kookaimagemeta.h index fd269ddd..7b090037 100644 --- a/kooka/kookaimagemeta.h +++ b/kooka/kookaimagemeta.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ diff --git a/kooka/kookapref.cpp b/kooka/kookapref.cpp index 06274670..b453045a 100644 --- a/kooka/kookapref.cpp +++ b/kooka/kookapref.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -149,7 +149,7 @@ void KookaPreferences::setupOCRPage() #endif top->addWidget( kgp ); TQWidget *spaceEater = new TQWidget( page ); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); top->addWidget( spaceEater ); /* @@ -176,17 +176,17 @@ void KookaPreferences::setupOCRPage() } } -KURLRequester* KookaPreferences::binaryCheckBox( TQWidget *parent, const TQString& program ) +KURLRequester* KookaPreferences::binaryCheckBox( TQWidget *tqparent, const TQString& program ) { - TQHBox *hbox = new TQHBox( parent ); + TQHBox *hbox = new TQHBox( tqparent ); - (void) new TQLabel( i18n("Select the %1 binary to use:").arg( program ), hbox ); - KURLRequester* urlRequester = new KURLRequester( parent ); + (void) new TQLabel( i18n("Select the %1 binary to use:").tqarg( program ), hbox ); + KURLRequester* urlRequester = new KURLRequester( tqparent ); urlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); TQToolTip::add( urlRequester, i18n( "Enter the path to %1, the optical-character-recognition " - "command line tool.").arg(program)); + "command line tool.").tqarg(program)); return urlRequester; } @@ -207,7 +207,7 @@ TQString KookaPreferences::tryFindBinary( const TQString& bin, const TQString& c if( res != "notFound" ) { TQFileInfo fi( res ); - if( fi.exists() && fi.isExecutable() && !fi.isDir() && res.contains(bin) ) + if( fi.exists() && fi.isExecutable() && !fi.isDir() && res.tqcontains(bin) ) { return res; } @@ -272,7 +272,7 @@ void KookaPreferences::checkOCRBinarySilent( const TQString& cmd ) #endif bool KookaPreferences::checkOCRBinIntern( const TQString& cmd, const TQString& tool, bool show_msg ) { - if( ! cmd.contains( tool )) return false; + if( ! cmd.tqcontains( tool )) return false; bool ret = true; TQFileInfo fi( cmd ); @@ -316,7 +316,7 @@ void KookaPreferences::setupStartupPage() /* Query for network scanner (Checkbox) */ cbNetQuery = new TQCheckBox( i18n("Query network for available scanners"), - page, "CB_NET_QUERY" ); + page, "CB_NET_TQUERY" ); TQToolTip::add( cbNetQuery, i18n( "Check this if you want a network query for available scanners.\nNote that this does not mean a query over the entire network but only the stations configured for SANE!" )); cbNetQuery->setChecked( ! (konf->readBoolEntry( STARTUP_ONLY_LOCAL, false )) ); @@ -356,7 +356,7 @@ void KookaPreferences::setupSaveFormatPage( ) /* Skip the format asking if a format entry exists */ cbSkipFormatAsk = new TQCheckBox( i18n("Always display image save assistant"), - page, "CB_IMGASSIST_QUERY" ); + page, "CB_IMGASSIST_TQUERY" ); cbSkipFormatAsk->setChecked( konf->readBoolEntry( OP_FILE_ASK_FORMAT, true )); TQToolTip::add( cbSkipFormatAsk, i18n("Check this if you want to see the image save assistant even if there is a default format for the image type." )); top->addWidget( cbSkipFormatAsk ); @@ -418,8 +418,8 @@ void KookaPreferences::setupThumbnailPage() /* Frame Stuff */ int frameWidth = konf->readNumEntry( THUMB_MARGIN, 3 ); - TQColor col1 = konf->readColorEntry( MARGIN_COLOR1, &(colorGroup().base())); - TQColor col2 = konf->readColorEntry( MARGIN_COLOR2, &(colorGroup().foreground())); + TQColor col1 = konf->readColorEntry( MARGIN_COLOR1, &(tqcolorGroup().base())); + TQColor col2 = konf->readColorEntry( MARGIN_COLOR2, &(tqcolorGroup().foreground())); TQGrid *fGrid = new TQGrid( 2, hgb3 ); fGrid->setSpacing( 2 ); @@ -457,7 +457,7 @@ void KookaPreferences::slotApply( void ) /* ** startup options ** */ /** write the global one, to read from libkscan also */ - konf->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + konf->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); bool cbVal = !(cbShowScannerSelection->isChecked()); kdDebug(28000) << "Writing for " << STARTUP_SKIP_ASK << ": " << cbVal << endl; konf->writeEntry( STARTUP_SKIP_ASK, cbVal, true, true ); /* global flag goes to kdeglobals */ @@ -532,8 +532,8 @@ void KookaPreferences::slotDefault( void ) m_tileSelector->setURL( KURL(bgImg) ); m_thumbWidth->setValue( 100 ); m_thumbHeight->setValue( 120 ); - TQColor col1 = TQColor( colorGroup().base()); - TQColor col2 = TQColor( colorGroup().foreground()); + TQColor col1 = TQColor( tqcolorGroup().base()); + TQColor col2 = TQColor( tqcolorGroup().foreground()); m_frameWidth->setValue( 3 ); m_colButt1->setColor( col1 ); diff --git a/kooka/kookapref.h b/kooka/kookapref.h index 46f27bb4..e199fabd 100644 --- a/kooka/kookapref.h +++ b/kooka/kookapref.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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 KOOKAPREF_H @@ -47,6 +47,7 @@ class TQCheckBox; class KookaPreferences : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KookaPreferences(); static TQString tryFindGocr( void ); diff --git a/kooka/kookaprint.cpp b/kooka/kookaprint.cpp index 5dad1f33..829cd8a5 100644 --- a/kooka/kookaprint.cpp +++ b/kooka/kookaprint.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -112,7 +112,7 @@ bool KookaPrint::printImage( KookaImage *img ) kdDebug(28000) << "Scaling to printer size " << newWidth << " x " << newHeight << endl; - tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree); + tmpImg = img->smoothScale(newWidth, newHeight, TQ_ScaleFree); TQSize sz = tmpImg.size(); // the current image size TQSize maxOnPage = maxPageSize(); // the maximum space on one side @@ -177,7 +177,7 @@ void KookaPrint::printFittingToPage(KookaImage *img) newHeight = int( double( img->height() ) * hAspect ); } - tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree); + tmpImg = img->smoothScale(newWidth, newHeight, TQ_ScaleFree); m_painter->drawImage( 0,0, tmpImg ); @@ -201,7 +201,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) int start = 0; const int radius=20; - TQColor brushColor( Qt::red ); + TQColor brushColor( TQt::red ); int toffX=0; int toffY=0; TQString numStr = TQString::number(num); @@ -215,7 +215,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) { case SW: start = -90; - brushColor = Qt::green; + brushColor = TQt::green; toffX =-1; toffY = 1; textXOff = -1*textWidth; @@ -223,7 +223,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) break; case NW: start = -180; - brushColor = Qt::blue; + brushColor = TQt::blue; toffX =-1; toffY =-1; textXOff = -1*textWidth; @@ -231,7 +231,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) break; case NO: start = -270; - brushColor = Qt::yellow; + brushColor = TQt::yellow; toffX = 1; toffY = -1; textXOff = -1*textWidth; @@ -240,7 +240,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) break; case SO: start = 0; - brushColor = Qt::magenta; + brushColor = TQt::magenta; toffX = 1; toffY = 1; textXOff = -1*textWidth; diff --git a/kooka/kookaprint.h b/kooka/kookaprint.h index 0373b642..d1470251 100644 --- a/kooka/kookaprint.h +++ b/kooka/kookaprint.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -52,9 +52,10 @@ private: }; -class KookaPrint:public QObject +class KookaPrint:public TQObject { Q_OBJECT + TQ_OBJECT public: KookaPrint(KPrinter*); diff --git a/kooka/kookarc b/kooka/kookarc index 13875fff..a604a280 100644 --- a/kooka/kookarc +++ b/kooka/kookarc @@ -2,17 +2,17 @@ Kookas MainDock,Preview ,Thumbs:first_name=Kookas MainDock,Preview\s Kookas MainDock,Preview ,Thumbs:last_name=Thumbs Kookas MainDock,Preview ,Thumbs:orientation=0 -Kookas MainDock,Preview ,Thumbs:parent=yes +Kookas MainDock,Preview ,Thumbs:tqparent=yes Kookas MainDock,Preview ,Thumbs:sepPos=72 Kookas MainDock,Preview ,Thumbs:stayButton=false Kookas MainDock,Preview ,Thumbs:type=GROUP Kookas MainDock,Preview :curTab=0 -Kookas MainDock,Preview :parent=yes +Kookas MainDock,Preview :tqparent=yes Kookas MainDock,Preview :stayButton=false Kookas MainDock,Preview :tabNames=Kookas MainDock,Preview\s Kookas MainDock,Preview :type=TAB_GROUP Kookas MainDock,Thumbs,Preview :curTab=1 -Kookas MainDock,Thumbs,Preview :parent=yes +Kookas MainDock,Thumbs,Preview :tqparent=yes Kookas MainDock,Thumbs,Preview :stayButton=false Kookas MainDock,Thumbs,Preview :tabNames=Kookas MainDock,Thumbs,Preview\s Kookas MainDock,Thumbs,Preview :type=TAB_GROUP @@ -20,7 +20,7 @@ Kookas MainDock,Thumbs:curTab=1 Kookas MainDock,Thumbs:first_name=Kookas MainDock Kookas MainDock,Thumbs:last_name=Thumbs Kookas MainDock,Thumbs:orientation=0 -Kookas MainDock,Thumbs:parent=yes +Kookas MainDock,Thumbs:tqparent=yes Kookas MainDock,Thumbs:sepPos=54 Kookas MainDock,Thumbs:stayButton=false Kookas MainDock,Thumbs:tabNames=Kookas MainDock,Thumbs @@ -35,28 +35,28 @@ NameList=Kookas MainDock,Thumbs,Scanpackager,Recent,Scan Parameter,Preview ,Kook Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:first_name=Preview ,Scanpackager,Recent,Scan Parameter Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:last_name=Kookas MainDock,Thumbs Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:orientation=1 -Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:parent=yes +Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:tqparent=yes Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:sepPos=38 Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:stayButton=false Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:type=GROUP Preview ,Scanpackager,Recent,Scan Parameter:first_name=Preview ,Scanpackager,Recent Preview ,Scanpackager,Recent,Scan Parameter:last_name=Scan Parameter Preview ,Scanpackager,Recent,Scan Parameter:orientation=0 -Preview ,Scanpackager,Recent,Scan Parameter:parent=yes +Preview ,Scanpackager,Recent,Scan Parameter:tqparent=yes Preview ,Scanpackager,Recent,Scan Parameter:sepPos=50 Preview ,Scanpackager,Recent,Scan Parameter:stayButton=false Preview ,Scanpackager,Recent,Scan Parameter:type=GROUP Preview ,Scanpackager,Recent:first_name=Preview ,Scanpackager Preview ,Scanpackager,Recent:last_name=Recent Preview ,Scanpackager,Recent:orientation=0 -Preview ,Scanpackager,Recent:parent=yes +Preview ,Scanpackager,Recent:tqparent=yes Preview ,Scanpackager,Recent:sepPos=84 Preview ,Scanpackager,Recent:stayButton=false Preview ,Scanpackager,Recent:type=GROUP Preview ,Scanpackager:first_name=Preview\s Preview ,Scanpackager:last_name=Scanpackager Preview ,Scanpackager:orientation=0 -Preview ,Scanpackager:parent=yes +Preview ,Scanpackager:tqparent=yes Preview ,Scanpackager:sepPos=50 Preview ,Scanpackager:stayButton=false Preview ,Scanpackager:type=GROUP @@ -65,7 +65,7 @@ Preview :type=DOCK Recent,Scan Parameter:first_name=Recent Recent,Scan Parameter:last_name=Scan Parameter Recent,Scan Parameter:orientation=0 -Recent,Scan Parameter:parent=yes +Recent,Scan Parameter:tqparent=yes Recent,Scan Parameter:sepPos=14 Recent,Scan Parameter:stayButton=false Recent,Scan Parameter:type=GROUP @@ -76,40 +76,40 @@ Scan Parameter:type=DOCK Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:first_name=Scanpackager,Preview ,Recent,Scan Parameter Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:last_name=Kookas MainDock,Thumbs Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:orientation=1 -Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:parent=yes +Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:tqparent=yes Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:sepPos=38 Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:stayButton=false Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:type=GROUP Scanpackager,Preview ,Recent,Scan Parameter:first_name=Scanpackager,Preview\s Scanpackager,Preview ,Recent,Scan Parameter:last_name=Recent,Scan Parameter Scanpackager,Preview ,Recent,Scan Parameter:orientation=0 -Scanpackager,Preview ,Recent,Scan Parameter:parent=yes +Scanpackager,Preview ,Recent,Scan Parameter:tqparent=yes Scanpackager,Preview ,Recent,Scan Parameter:sepPos=48 Scanpackager,Preview ,Recent,Scan Parameter:stayButton=false Scanpackager,Preview ,Recent,Scan Parameter:type=GROUP Scanpackager,Preview :curTab=0 -Scanpackager,Preview :parent=yes +Scanpackager,Preview :tqparent=yes Scanpackager,Preview :stayButton=false Scanpackager,Preview :tabNames=Scanpackager,Preview\s Scanpackager,Preview :type=TAB_GROUP Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:first_name=Scanpackager,Recent,Scan Parameter Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:last_name=Kookas MainDock,Preview ,Thumbs Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:orientation=1 -Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:parent=yes +Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:tqparent=yes Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:sepPos=41 Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:stayButton=false Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:type=GROUP Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :first_name=Scanpackager,Recent,Scan Parameter Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :last_name=Kookas MainDock,Thumbs,Preview\s Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :orientation=1 -Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :parent=yes +Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :tqparent=yes Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :sepPos=38 Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :stayButton=false Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :type=GROUP Scanpackager,Recent,Scan Parameter:first_name=Scanpackager Scanpackager,Recent,Scan Parameter:last_name=Recent,Scan Parameter Scanpackager,Recent,Scan Parameter:orientation=0 -Scanpackager,Recent,Scan Parameter:parent=yes +Scanpackager,Recent,Scan Parameter:tqparent=yes Scanpackager,Recent,Scan Parameter:sepPos=42 Scanpackager,Recent,Scan Parameter:stayButton=false Scanpackager,Recent,Scan Parameter:type=GROUP diff --git a/kooka/kookaview.cpp b/kooka/kookaview.cpp index 2843535f..fb0d57fc 100644 --- a/kooka/kookaview.cpp +++ b/kooka/kookaview.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -82,7 +82,7 @@ #define STARTUP_IMG_SELECTION "SelectedImageOnStartup" -KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToUse) +KookaView::KookaView( KParts::DockMainWindow *tqparent, const TQCString& deviceToUse) : TQObject(), m_ocrResultImg(0), ocrFabric(0), @@ -93,21 +93,21 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU m_dockRecent(0), m_dockPreview(0), m_dockOCRText(0), - m_mainWindow(parent), + m_mainWindow(tqparent), m_ocrResEdit(0) { KIconLoader *loader = KGlobal::iconLoader(); scan_params = 0L; preview_canvas = 0L; - m_mainDock = parent->createDockWidget( "Kookas MainDock", + m_mainDock = tqparent->createDockWidget( "Kookas MainDock", loader->loadIcon( "folder_image", KIcon::Small ), 0L, i18n("Image Viewer")); m_mainDock->setEnableDocking(KDockWidget::DockNone ); m_mainDock->setDockSite( KDockWidget::DockFullSite ); - parent->setView( m_mainDock); - parent->setMainDockWidget( m_mainDock); + tqparent->setView( m_mainDock); + tqparent->setMainDockWidget( m_mainDock); img_canvas = new ImageCanvas( m_mainDock ); img_canvas->setMinimumSize(100,200); @@ -121,7 +121,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU m_mainDock->setWidget( img_canvas ); /** Thumbview **/ - m_dockThumbs = parent->createDockWidget( "Thumbs", + m_dockThumbs = tqparent->createDockWidget( "Thumbs", loader->loadIcon( "thumbnail", KIcon::Small ), 0L, i18n("Thumbnails")); m_dockThumbs->setDockSite(KDockWidget::DockFullSite ); @@ -136,7 +136,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU /** Packager Dock **/ /* A new packager to contain the already scanned images */ - m_dockPackager = parent->createDockWidget( "Scanpackager", + m_dockPackager = tqparent->createDockWidget( "Scanpackager", loader->loadIcon( "palette_color", KIcon::Small ), 0L, i18n("Gallery")); m_dockPackager->setDockSite(KDockWidget::DockFullSite); @@ -155,7 +155,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU /* * Create a Kombobox that holds the last folders visible even on the preview page */ - m_dockRecent = parent->createDockWidget( "Recent", + m_dockRecent = tqparent->createDockWidget( "Recent", loader->loadIcon( "image", KIcon::Small ), 0L, i18n("Gallery Folders")); @@ -164,7 +164,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU TQHBox *recentBox = new TQHBox( m_dockRecent ); recentBox->setMargin(KDialog::marginHint()); TQLabel *lab = new TQLabel( i18n("Gallery:"), recentBox ); - lab->setSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed) ); + lab->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed) ); recentFolder = new ImageNameCombo( recentBox ); m_dockRecent->setWidget( recentBox ); @@ -184,14 +184,14 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU packager, TQT_SLOT(slotSelectDirectory( const TQString& ))); /* the object from the kscan lib to handle low level scanning */ - m_dockScanParam = parent->createDockWidget( "Scan Parameter", + m_dockScanParam = tqparent->createDockWidget( "Scan Parameter", loader->loadIcon( "folder", KIcon::Small ), 0L, i18n("Scan Parameter")); // m_dockScanParam->setDockSite(KDockWidget::DockFullSite); m_dockScanParam->setWidget( 0 ); // later - sane = new KScanDevice( m_dockScanParam ); + sane = new KScanDevice( TQT_TQOBJECT(m_dockScanParam) ); Q_CHECK_PTR(sane); m_dockScanParam->manualDock( m_dockRecent, // dock target @@ -203,7 +203,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU * the complete scanner options dialog * scan_params must be zero for that */ - m_dockPreview = parent->createDockWidget( "Preview ", + m_dockPreview = tqparent->createDockWidget( "Preview ", loader->loadIcon( "viewmag", KIcon::Small ), 0L, i18n("Scan Preview")); @@ -222,7 +222,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU /* Create a text editor part for ocr results */ - m_dockOCRText = parent->createDockWidget( "OCRResults", + m_dockOCRText = tqparent->createDockWidget( "OCRResults", loader->loadIcon("edit", KIcon::Small ), 0L, i18n("OCR Result Text")); // m_textEdit @@ -235,7 +235,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU KDockWidget::DockCenter, // dock site 100 ); // relation target/this (in percent) - m_ocrResEdit->setTextFormat( Qt::PlainText ); + m_ocrResEdit->setTextFormat( TQt::PlainText ); m_ocrResEdit->setWordWrap( TQTextEdit::NoWrap ); // m_dockOCRText->hide(); } @@ -277,7 +277,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU packager->openRoots(); - /* Status Bar */ + /* tqStatus Bar */ KStatusBar *statBar = m_mainWindow->statusBar(); // statBar->insertItem(TQString("1"), SBAR_ZOOM, 0, true ); @@ -472,7 +472,7 @@ void KookaView::print() printer.setUsePrinterResolution(true); printer.addDialogPage( new ImgPrintDialog( img )); - if( printer.setup( m_mainWindow, i18n("Print %1").arg(img->localFileName().section('/', -1)) )) + if( printer.setup( m_mainWindow, i18n("Print %1").tqarg(img->localFileName().section('/', -1)) )) { KookaPrint kookaprint( &printer ); kookaprint.printImage(img); @@ -564,8 +564,8 @@ void KookaView::startOCR( KookaImage *img ) connect( ocrFabric, TQT_SIGNAL( newOCRResultText( const TQString& )), m_dockOCRText, TQT_SLOT( show() )); - connect( ocrFabric, TQT_SIGNAL( repaintOCRResImage( )), - img_canvas, TQT_SLOT(repaint())); + connect( ocrFabric, TQT_SIGNAL( tqrepaintOCRResImage( )), + img_canvas, TQT_SLOT(tqrepaint())); connect( ocrFabric, TQT_SIGNAL( clearOCRResultText()), m_ocrResEdit, TQT_SLOT(clear())); @@ -626,7 +626,7 @@ void KookaView::slScanStart( ) KLed *led = scan_params->operationLED(); if( led ) { - led->setColor( Qt::red ); + led->setColor( TQt::red ); led->setState( KLed::On ); } } @@ -640,7 +640,7 @@ void KookaView::slAcquireStart( ) KLed *led = scan_params->operationLED(); if( led ) { - led->setColor( Qt::green ); + led->setColor( TQt::green ); } } } @@ -663,7 +663,7 @@ void KookaView::slScanFinished( KScanStat stat ) KLed *led = scan_params->operationLED(); if( led ) { - led->setColor( Qt::green ); + led->setColor( TQt::green ); led->setState( KLed::Off ); } } @@ -842,7 +842,7 @@ void KookaView::slShowAImage( KookaImage *img ) ocrFabric->slSetImage( img ); } - /* Status Bar */ + /* tqStatus Bar */ KStatusBar *statBar = m_mainWindow->statusBar(); if( img_canvas ) statBar->changeItem( img_canvas->imageInfoString(), StatusImage ); @@ -876,7 +876,7 @@ void KookaView::slShowThumbnails(KFileTreeViewItem *dirKfi, bool forceRedraw ) } else { - kftvi = static_cast(static_cast(kftvi)->parent()); + kftvi = static_cast(static_cast(kftvi)->tqparent()); dirKfi = kftvi; forceRedraw = true; packager->setSelected( static_cast(dirKfi), true ); @@ -913,7 +913,7 @@ void KookaView::slShowThumbnails(KFileTreeViewItem *dirKfi, bool forceRedraw ) */ void KookaView::slStartLoading( const KURL& url ) { - emit( signalChangeStatusbar( i18n("Loading %1" ).arg( url.prettyURL() ) )); + emit( signalChangeStatusbar( i18n("Loading %1" ).tqarg( url.prettyURL() ) )); // if( m_stack->visibleWidget() != img_canvas ) // { diff --git a/kooka/kookaview.h b/kooka/kookaview.h index 10017e88..21d5509a 100644 --- a/kooka/kookaview.h +++ b/kooka/kookaview.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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 KOOKAVIEW_H @@ -66,9 +66,10 @@ class ocrResEdit; * @author Klaas Freitag * @version 0.1 */ -class KookaView : public QObject +class KookaView : public TQObject { Q_OBJECT + TQ_OBJECT public: typedef enum { MirrorVertical, MirrorHorizontal, MirrorBoth } MirrorType; typedef enum { StatusTemp, StatusImage } StatusBarIDs; @@ -76,7 +77,7 @@ public: /** * Default constructor */ - KookaView(KParts::DockMainWindow *parent, const TQCString& deviceToUse); + KookaView(KParts::DockMainWindow *tqparent, const TQCString& deviceToUse); /** * Destructor diff --git a/kooka/ksaneocr.cpp b/kooka/ksaneocr.cpp index 365624c6..709b1f1f 100644 --- a/kooka/ksaneocr.cpp +++ b/kooka/ksaneocr.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -183,26 +183,26 @@ void KSANEOCR::slLineBox( const TQRect& ) * starts visual ocr process. Depending on the ocr engine, this function creates * a new dialog, and shows it. */ -bool KSANEOCR::startOCRVisible( TQWidget *parent ) +bool KSANEOCR::startOCRVisible( TQWidget *tqparent ) { if( visibleOCRRunning ) return( false ); bool res = true; - m_parent = parent; + m_parent = tqparent; if( m_ocrEngine == GOCR ) { - m_ocrProcessDia = new KGOCRDialog ( parent, m_spellInitialConfig ); + m_ocrProcessDia = new KGOCRDialog ( tqparent, m_spellInitialConfig ); } else if( m_ocrEngine == OCRAD ) { - m_ocrProcessDia = new ocradDialog( parent, m_spellInitialConfig ); + m_ocrProcessDia = new ocradDialog( tqparent, m_spellInitialConfig ); } else if( m_ocrEngine == KADMOS ) { #ifdef HAVE_KADMOS /*** Kadmos Engine OCR ***/ - m_ocrProcessDia = new KadmosDialog( parent, m_spellInitialConfig ); + m_ocrProcessDia = new KadmosDialog( tqparent, m_spellInitialConfig ); #else KMessageBox::sorry(0, i18n("This version of Kooka was not compiled with KADMOS support.\n" "Please select another OCR engine in Kooka's options dialog.")); @@ -399,9 +399,9 @@ void KSANEOCR::startOCRAD( ) *daemon << cmd; *daemon << TQString("-x"); *daemon << m_tmpOrfName; // the orf result file - *daemon << TQFile::encodeName( m_ocrImagePBM ); // The name of the image + *daemon << TQFile::encodeName( m_ocrImagePBM ).data(); // The name of the image *daemon << TQString("-l"); - *daemon << TQString::number( ocrDia->layoutDetectionMode()); + *daemon << TQString::number( ocrDia->tqlayoutDetectionMode()); KConfig *konf = KGlobal::config (); KConfigGroupSaver( konf, CFG_GROUP_OCRAD ); @@ -543,7 +543,7 @@ void KSANEOCR::startOCRProcess( void ) this, TQT_SLOT( gocrStdErr(KProcess*, char*, int))); TQString opt; - *daemon << TQFile::encodeName(cmd); + *daemon << TQFile::encodeName(cmd).data(); *daemon << "-x"; *daemon << "-"; if( !( m_img->numColors() > 0 && m_img->numColors() <3 )) /* not a bw-image */ @@ -566,7 +566,7 @@ void KSANEOCR::startOCRProcess( void ) // Unfortunately this is fixed by gocr. m_ocrResultImage = "out30.bmp"; - *daemon << TQFile::encodeName(tmpFile); + *daemon << TQFile::encodeName(tmpFile).data(); m_ocrCurrLine = 0; // Important in gocrStdIn to store the results @@ -631,7 +631,7 @@ void KSANEOCR::startOCRProcess( void ) // rep.Recognize(); m_rep.run(); - /* Dealing with threads or no threads (using QT_THREAD_SUPPORT to distinguish) + /* Dealing with threads or no threads (using TQT_THREAD_SUPPORT to distinguish) * If threads are here, the recognition task is started in its own thread. The gui thread * needs to wait until the recognition thread is finished. Therefore, a timer is fired once * that calls slotKadmosResult and checks if the recognition task is finished. If it is not, @@ -647,7 +647,7 @@ void KSANEOCR::startOCRProcess( void ) * It does not :( That is why it is not used here. Maybe some day... */ } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT /* start a timer and wait until it fires. */ TQTimer::singleShot( 500, this, TQT_SLOT( slotKadmosResult() )); #else @@ -660,7 +660,7 @@ void KSANEOCR::startOCRProcess( void ) /* * This method is called to check if the kadmos process was already finished, if - * thread support is enabled (check for preprocessor variable QT_THREAD_SUPPORT) + * thread support is enabled (check for preprocessor variable TQT_THREAD_SUPPORT) * The problem is that the kadmos library seems not to be thread stable so thread * support should not be enabled by default. In case threads are enabled, this slot * checks if the KADMOS engine is finished already and if not it fires a timer. @@ -814,11 +814,11 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) TQFileInfo fi( fileName ); if( ! fi.exists() ) { error = true; - errStr = i18n("The orf %1 does not exist.").arg(fileName); + errStr = i18n("The orf %1 does not exist.").tqarg(fileName); } if( ! error && ! fi.isReadable() ) { error = true; - errStr = i18n("Permission denied on file %1.").arg(fileName); + errStr = i18n("Permission denied on file %1.").tqarg(fileName); } @@ -890,7 +890,7 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) { /* Read one line per character */ TQString charLine = stream.readLine(); - int semiPos = charLine.find(';'); + int semiPos = charLine.tqfind(';'); if( semiPos == -1 ) { kdDebug(28000) << "invalid line: " << charLine << endl; @@ -906,7 +906,7 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) // find the amount of alternatives. int altCount = 0; - int h = results.find(','); // search the first comma + int h = results.tqfind(','); // search the first comma if( h > -1 ) { // kdDebug(28000) << "Results of count search: " << results.left(h) << endl; altCount = results.left(h).toInt(); @@ -1127,7 +1127,7 @@ bool KSANEOCR::eventFilter( TQObject *object, TQEvent *event ) { if( event->type() == TQEvent::MouseButtonDblClick ) { - TQMouseEvent *mev = static_cast(event); + TQMouseEvent *mev = TQT_TQMOUSEEVENT(event); int x = mev->x(); int y = mev->y(); @@ -1328,7 +1328,7 @@ void KSANEOCR::slMisspelling( const TQString& originalword, const TQStringList& /* draw a line under the word to check */ /* copy the source */ - emit repaintOCRResImage(); + emit tqrepaintOCRResImage(); } else { diff --git a/kooka/ksaneocr.h b/kooka/ksaneocr.h index fabb25e8..4996819a 100644 --- a/kooka/ksaneocr.h +++ b/kooka/ksaneocr.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -72,16 +72,17 @@ class KConfig; */ typedef enum{ ENG_ERROR, ENG_OK, ENG_DATA_MISSING, ENG_BAD_SETUP } EngineError; -class KSANEOCR : public QObject +class KSANEOCR : public TQObject { Q_OBJECT + TQ_OBJECT public: enum OCREngines{ GOCR, OCRAD, KADMOS }; KSANEOCR( TQWidget*, KConfig *); ~KSANEOCR(); - bool startOCRVisible( TQWidget* parent=0); + bool startOCRVisible( TQWidget* tqparent=0); void finishedOCRVisible( bool ); @@ -161,7 +162,7 @@ signals: /** * signal the tells that the result image was modified. */ - void repaintOCRResImage( ); + void tqrepaintOCRResImage( ); /** * indicates that the text editor holding the text that came through diff --git a/kooka/main.cpp b/kooka/main.cpp index 67f014c9..f0f3c32a 100644 --- a/kooka/main.cpp +++ b/kooka/main.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -58,8 +58,8 @@ static const char license[] = "Kreuzlingen and distribute the resulting executable without\n" "including the source code for KADMOS in the source distribution.\n\n" "As a special exception, permission is given to link this program\n" -"with any edition of Qt, and distribute the resulting executable,\n" -"without including the source code for Qt in the source distribution.\n"; +"with any edition of TQt, and distribute the resulting executable,\n" +"without including the source code for TQt in the source distribution.\n"; static KCmdLineOptions options[] = diff --git a/kooka/ocrresedit.cpp b/kooka/ocrresedit.cpp index a8d842a1..8465d09c 100644 --- a/kooka/ocrresedit.cpp +++ b/kooka/ocrresedit.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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 @@ -36,8 +36,8 @@ /* -------------------- ocrResEdit -------------------- */ -ocrResEdit::ocrResEdit( TQWidget *parent ) - : TQTextEdit(parent) +ocrResEdit::ocrResEdit( TQWidget *tqparent ) + : TQTextEdit(tqparent) { m_updateColor.setNamedColor( "SeaGreen"); m_ignoreColor.setNamedColor( "CadetBlue4" ); @@ -75,11 +75,11 @@ void ocrResEdit::slSelectWord( int line, const ocrWord& word ) if( line < paragraphs() ) { TQString editLine = text(line); - int cnt = editLine.contains( word); + int cnt = editLine.tqcontains( word); if( cnt > 0 ) { - int pos = editLine.find(word); + int pos = editLine.tqfind(word); setCursorPosition( line, pos ); setSelection( line, pos, line, pos + word.length()); } @@ -96,11 +96,11 @@ void ocrResEdit::slReplaceWord( int line, const TQString& wordFrom, if( line < paragraphs() ) { TQString editLine = text(line); - int cnt = editLine.contains( wordFrom ); + int cnt = editLine.tqcontains( wordFrom ); if( cnt > 0 ) { - int pos = editLine.find(wordFrom); + int pos = editLine.tqfind(wordFrom); setSelection( line, pos, line, pos+wordFrom.length()); TQColor saveCol = this->color(); diff --git a/kooka/ocrresedit.h b/kooka/ocrresedit.h index 19191266..f7e40dca 100644 --- a/kooka/ocrresedit.h +++ b/kooka/ocrresedit.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -33,11 +33,12 @@ class TQString; class TQColor; class ocrWord; -class ocrResEdit : public QTextEdit +class ocrResEdit : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - ocrResEdit( TQWidget *parent ); + ocrResEdit( TQWidget *tqparent ); public slots: void slUpdateOCRResult( int line, const TQString& wordFrom, diff --git a/kooka/ocrword.cpp b/kooka/ocrword.cpp index 4b04ea6e..2260e770 100644 --- a/kooka/ocrword.cpp +++ b/kooka/ocrword.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -76,7 +76,7 @@ TQStringList ocrWordList::stringList() * decided. Solution: KSpell should treat dash-linked words correctly. * We live with the problem here that dashes bring confusion ;-) */ - if( (*it).contains( rx ) ) + if( (*it).tqcontains( rx ) ) res += TQStringList::split( rx, (*it) ); else #endif @@ -95,9 +95,9 @@ bool ocrWordList::updateOCRWord( const TQString& from, const TQString& to ) { TQString word = (*it); kdDebug(28000) << "updateOCRWord in list: Comparing word " << word << endl; - if( word.contains( from, true ) ) // case sensitive search + if( word.tqcontains( from, true ) ) // case sensitive search { - word.replace( from, to ); + word.tqreplace( from, to ); *it = ocrWord( word ); res = true; break; diff --git a/kooka/ocrword.h b/kooka/ocrword.h index fd906367..5fbc209e 100644 --- a/kooka/ocrword.h +++ b/kooka/ocrword.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -37,7 +37,7 @@ class TQRect; /* ==== ocrWord ====================================== */ -class ocrWord : public QString +class ocrWord : public TQString { public: ocrWord(const TQString& s); diff --git a/kooka/resource.h b/kooka/resource.h index 51c9488f..687a7ddc 100644 --- a/kooka/resource.h +++ b/kooka/resource.h @@ -20,8 +20,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -52,7 +52,7 @@ #define ID_FILE_PRINT 10080 -#define ID_FILE_QUIT 10100 +#define ID_FILE_TQUIT 10100 /////////////////////////////////////////////////////////////////// diff --git a/kooka/scanpackager.cpp b/kooka/scanpackager.cpp index 2dd3096b..230acae1 100644 --- a/kooka/scanpackager.cpp +++ b/kooka/scanpackager.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -71,7 +71,7 @@ /* ----------------------------------------------------------------------- */ /* Constructor Scan Packager */ -ScanPackager::ScanPackager( TQWidget *parent ) : KFileTreeView( parent ) +ScanPackager::ScanPackager( TQWidget *tqparent ) : KFileTreeView( tqparent ) { // TODO: setItemsRenameable (true ); @@ -245,7 +245,7 @@ void ScanPackager::slotDecorate( KFileTreeViewItem* item ) } /* set image size in pixels */ - TQString t = i18n( "%1 x %2" ).arg( img->width()).arg(img->height()); + TQString t = i18n( "%1 x %2" ).tqarg( img->width()).tqarg(img->height()); item->setText( 1, t ); kdDebug( 28000) << "Image loaded and decorated!" << endl; } @@ -412,7 +412,7 @@ TQString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relati if( ! item ) { kdDebug(28000) << "ERR: itemDirectory without item" << endl; - return TQString::null; + return TQString(); } TQString relativUrl= (item->url()).prettyURL(); @@ -420,7 +420,7 @@ TQString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relati if( ! item->isDir() ) { // Cut off the filename in case it is not a dir - relativUrl.truncate( relativUrl.findRev( '/' )+1); + relativUrl.truncate( relativUrl.tqfindRev( '/' )+1); } else { @@ -463,8 +463,8 @@ void ScanPackager::slotSelectDirectory( const TQString & dirString ) { kdDebug(28000) << "Trying to decode directory string " << dirString << endl; - TQString searchFor = TQString::fromLatin1(" - "); - int pos = dirString.find( searchFor ); + TQString searchFor = TQString::tqfromLatin1(" - "); + int pos = dirString.tqfind( searchFor ); if( pos > -1 ) { @@ -531,7 +531,7 @@ void ScanPackager::slClicked( TQListViewItem *newItem ) } else { - emit( showThumbnails( static_cast(item->parent()))); + emit( showThumbnails( static_cast(item->tqparent()))); } } else @@ -600,7 +600,7 @@ void ScanPackager::loadImageForItem( KFileTreeViewItem *item ) prevItem = subImgItem; subImgItem->setPixmap( 0, loader->loadIcon( "editcopy", KIcon::Small )); - subImgItem->setText( 0, i18n("Sub-image %1").arg( i ) ); + subImgItem->setText( 0, i18n("Sub-image %1").tqarg( i ) ); KookaImage *subImgImg = new KookaImage( i, img ); subImgImg->setFileItem( newKfi ); newKfi->setExtraData( (void*) this, (void*) subImgImg ); @@ -711,7 +711,7 @@ TQCString ScanPackager::getImgFormat( KFileTreeViewItem* item ) const TQString ScanPackager::localFileName( KFileTreeViewItem *it ) const { - if( ! it ) return( TQString::null ); + if( ! it ) return( TQString() ); KURL url = it->url(); @@ -853,15 +853,15 @@ void ScanPackager::slAddImage( TQImage *img, KookaImageMeta* ) m_nextUrlToShow = lurl; TQString s; - /* Count amount of children of the father */ - TQListViewItem *paps = curr->parent(); + /* Count amount of tqchildren of the father */ + TQListViewItem *paps = curr->tqparent(); if( curr->isDir() ) /* take only father if the is no directory */ paps = curr; if( paps ) { int childcount = paps->childCount(); - s = i18n("%1 images").arg(childcount); + s = i18n("%1 images").tqarg(childcount); paps->setText( 1, s); setOpen( paps, true ); } @@ -1012,7 +1012,7 @@ void ScanPackager::slotImportFile() if( ! curr->isDir() ) { - KFileTreeViewItem *pa = static_cast(curr->parent()); + KFileTreeViewItem *pa = static_cast(curr->tqparent()); impTarget = pa->url(); } kdDebug(28000) << "Importing to " << impTarget.url() << endl; @@ -1136,7 +1136,7 @@ void ScanPackager::slotDeleteItems( ) s = i18n("Do you really want to delete this image?\nIt cannot be restored!" ); if( item->isDir() ) { - s = i18n("Do you really want to delete the folder %1\nand all the images inside?").arg(""); + s = i18n("Do you really want to delete the folder %1\nand all the images inside?").tqarg(""); } result = KMessageBox::warningContinueCancel(this, s, i18n( "Delete Collection Item"), KStdGuiItem::del(), "AskForDeleteFiles" ); @@ -1168,7 +1168,7 @@ void ScanPackager::slotCreateFolder( ) { bool ok; TQString folder = KInputDialog::getText( i18n( "New Folder" ), - i18n( "Please enter a name for the new folder:" ), TQString::null, + i18n( "Please enter a name for the new folder:" ), TQString(), &ok, this ); if( ok ) @@ -1214,7 +1214,7 @@ TQString ScanPackager::getImgName( TQString name_on_disk ) TQString s; (void) name_on_disk; - s = i18n("image %1").arg(img_counter++); + s = i18n("image %1").tqarg(img_counter++); return( s ); } @@ -1239,12 +1239,12 @@ void ScanPackager::contentsDragMoveEvent( TQDragMoveEvent *e ) } TQListViewItem *afterme = 0; - TQListViewItem *parent = 0; + TQListViewItem *tqparent = 0; - findDrop( e->pos(), parent, afterme ); + findDrop( e->pos(), tqparent, afterme ); // "afterme" is 0 when aiming at a directory itself - TQListViewItem *item = afterme ? afterme : parent; + TQListViewItem *item = afterme ? afterme : tqparent; if( item ) { diff --git a/kooka/scanpackager.h b/kooka/scanpackager.h index 496d6dee..c50c4d56 100644 --- a/kooka/scanpackager.h +++ b/kooka/scanpackager.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -74,8 +74,9 @@ private: class ScanPackager : public KFileTreeView { Q_OBJECT + TQ_OBJECT public: - ScanPackager( TQWidget *parent); + ScanPackager( TQWidget *tqparent); ~ScanPackager(); virtual TQString getImgName( TQString name_on_disk ); @@ -142,7 +143,7 @@ private: KFileTreeViewItem *spFindItem( SearchType type, const TQString name, const KFileTreeBranch* branch = 0 ); TQString itemDirectory( const KFileTreeViewItem*, bool relativ = false ) const; - // int readDir( TQListViewItem *parent, TQString dir_to_read ); + // int readDir( TQListViewItem *tqparent, TQString dir_to_read ); void showContextMenu( TQPoint p, bool show_folder = true ); TQString m_currImportDir; diff --git a/kooka/thumbview.cpp b/kooka/thumbview.cpp index b085e197..60312bad 100644 --- a/kooka/thumbview.cpp +++ b/kooka/thumbview.cpp @@ -22,8 +22,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -47,8 +47,8 @@ -ThumbView::ThumbView( TQWidget *parent, const char *name ) - : TQVBox( parent ), +ThumbView::ThumbView( TQWidget *tqparent, const char *name ) + : TQVBox( tqparent ), m_iconView(0), m_job(0) { @@ -91,14 +91,14 @@ bool ThumbView::readSettings() bool dirty = false; TQColor color; - color = cfg->readColorEntry( MARGIN_COLOR1, &(colorGroup().base())); + color = cfg->readColorEntry( MARGIN_COLOR1, &(tqcolorGroup().base())); if( color != m_marginColor1 ) { dirty = true; m_marginColor1 = color; } - color = cfg->readColorEntry( MARGIN_COLOR2, &(colorGroup().foreground())); + color = cfg->readColorEntry( MARGIN_COLOR2, &(tqcolorGroup().foreground())); if( color != m_marginColor2 ) { dirty = true; @@ -238,7 +238,7 @@ void ThumbView::slCheckForUpdate( KFileItem *kfit ) bool haveItem = false; /* iterate over all icon items and compare urls. - * TODO: Check the parent url to avoid iteration over all */ + * TODO: Check the tqparent url to avoid iteration over all */ for ( TQIconViewItem *item = m_iconView->firstItem(); item && !haveItem; item = item->nextItem() ) { @@ -269,7 +269,7 @@ bool ThumbView::deleteImage( KFileItem *kfit ) bool haveItem = false; /* iterate over all icon items and compare urls. - * TODO: Check the parent url to avoid iteration over all */ + * TODO: Check the tqparent url to avoid iteration over all */ for ( TQIconViewItem *item = m_iconView->firstItem(); item && !haveItem; item = item->nextItem() ) { if( searchUrl == static_cast(item)->itemUrl() ) diff --git a/kooka/thumbview.h b/kooka/thumbview.h index e1bc78cb..52b2bf05 100644 --- a/kooka/thumbview.h +++ b/kooka/thumbview.h @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -59,10 +59,11 @@ class KIO::PreviewJob; class ThumbView: public TQVBox /* KIconView */ { Q_OBJECT + TQ_OBJECT public: - ThumbView( TQWidget *parent, const char *name=0 ); + ThumbView( TQWidget *tqparent, const char *name=0 ); ~ThumbView(); void setCurrentDir( const KURL& s) diff --git a/kooka/thumbviewitem.cpp b/kooka/thumbviewitem.cpp index c8f8dab3..fe62e7e8 100644 --- a/kooka/thumbviewitem.cpp +++ b/kooka/thumbviewitem.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -32,10 +32,10 @@ #include "thumbview.h" #include "thumbviewitem.h" -ThumbViewItem::ThumbViewItem(TQIconView *parent, const TQString &text, +ThumbViewItem::ThumbViewItem(TQIconView *tqparent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi ) - :KFileIconViewItem( parent, text, pixmap,fi ) + :KFileIconViewItem( tqparent, text, pixmap,fi ) { } diff --git a/kooka/thumbviewitem.h b/kooka/thumbviewitem.h index 74dad84b..5bf829dd 100644 --- a/kooka/thumbviewitem.h +++ b/kooka/thumbviewitem.h @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * 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. * * * ***************************************************************************/ @@ -41,7 +41,7 @@ class KFileTreeViewItem; class ThumbViewItem: public KFileIconViewItem { public: - ThumbViewItem( TQIconView *parent, + ThumbViewItem( TQIconView *tqparent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi ); diff --git a/kpdf/conf/dlgaccessibility.ui b/kpdf/conf/dlgaccessibility.ui index a9f6495d..3aa7eb2f 100644 --- a/kpdf/conf/dlgaccessibility.ui +++ b/kpdf/conf/dlgaccessibility.ui @@ -1,6 +1,6 @@ DlgAccessibility - + DlgAccessibility @@ -19,7 +19,7 @@ 0 - + kcfg_HighlightImages @@ -27,7 +27,7 @@ Draw border around &Images - + kcfg_HighlightLinks @@ -35,7 +35,7 @@ Draw border around &Links - + kcfg_ChangeColors @@ -60,7 +60,7 @@ unnamed - + warn @@ -86,7 +86,7 @@ PlainText - + kcfg_RenderMode @@ -117,7 +117,7 @@ 0 - + radioInverted @@ -128,7 +128,7 @@ true - + radioNormal @@ -136,9 +136,9 @@ Change &paper color - + - layout5 + tqlayout5 @@ -154,14 +154,14 @@ Fixed - + 16 20 - + textLabel1 @@ -196,7 +196,7 @@ Expanding - + 30 20 @@ -205,7 +205,7 @@ - + radioRecolor @@ -213,9 +213,9 @@ &Change dark and light colors - + - layout2 + tqlayout2 @@ -234,7 +234,7 @@ Expanding - + 48 21 @@ -262,7 +262,7 @@ Fixed - + 16 20 @@ -290,14 +290,14 @@ Expanding - + 48 21 - + textLabel3_2 @@ -318,14 +318,14 @@ Fixed - + 16 20 - + textLabel3 @@ -338,7 +338,7 @@ - + radioContrast @@ -346,15 +346,15 @@ Convert to &black and white - + - layout5 + tqlayout5 unnamed - + textLabel2_2 @@ -375,7 +375,7 @@ Expanding - + 48 21 @@ -392,7 +392,7 @@ Fixed - + 16 20 @@ -409,7 +409,7 @@ Fixed - + 16 20 @@ -426,14 +426,14 @@ Expanding - + 48 21 - + kcfg_BWContrast @@ -455,7 +455,7 @@ Horizontal - + kcfg_BWThreshold @@ -477,7 +477,7 @@ Horizontal - + textLabel2 @@ -567,7 +567,7 @@ kdialog.h - + kcolorbutton.h kcolorbutton.h diff --git a/kpdf/conf/dlggeneral.ui b/kpdf/conf/dlggeneral.ui index 0319d1b4..e577b81b 100644 --- a/kpdf/conf/dlggeneral.ui +++ b/kpdf/conf/dlggeneral.ui @@ -1,6 +1,6 @@ DlgGeneral - + DlgGeneral @@ -19,7 +19,7 @@ 0 - + groupBox2 @@ -30,15 +30,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + kcfg_ShowSearchBar @@ -49,7 +49,7 @@ Show &search bar in thumbnails list - + kcfg_SyncThumbnailsViewport @@ -60,7 +60,7 @@ Link the &thumbnails with the page - + kcfg_ShowScrollBars @@ -68,7 +68,7 @@ Show scroll&bars - + kcfg_ShowOSD @@ -76,7 +76,7 @@ Show &hints and info messages - + kcfg_ObeyDRM @@ -84,7 +84,7 @@ &Obey DRM limitations - + kcfg_WatchFile @@ -94,15 +94,15 @@ - + - layout3_2 + tqlayout3_2 unnamed - + pixmapLabel1_2 @@ -128,7 +128,7 @@ Minimum - + 20 1 @@ -149,7 +149,7 @@ Expanding - + 20 20 @@ -164,8 +164,8 @@ dlggeneral.ui.h - showEvent( QShowEvent * ) + showEvent( TQShowEvent * ) DesktopIcon - + diff --git a/kpdf/conf/dlggeneral.ui.h b/kpdf/conf/dlggeneral.ui.h index 316b009f..c7b9b6ec 100644 --- a/kpdf/conf/dlggeneral.ui.h +++ b/kpdf/conf/dlggeneral.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/kpdf/conf/dlgperformance.ui b/kpdf/conf/dlgperformance.ui index c0c90eb1..408075b0 100644 --- a/kpdf/conf/dlgperformance.ui +++ b/kpdf/conf/dlgperformance.ui @@ -1,6 +1,6 @@ DlgPerformance - + DlgPerformance @@ -19,7 +19,7 @@ 0 - + groupBox1 @@ -38,15 +38,15 @@ unnamed - + - layout9 + tqlayout9 unnamed - + kcfg_EnableCompositing @@ -54,7 +54,7 @@ Enable &transparency effects - + kcfg_EnableThreading @@ -64,15 +64,15 @@ - + - layout6_2 + tqlayout6_2 unnamed - + pixmapLabel1_2 @@ -98,7 +98,7 @@ Minimum - + 21 1 @@ -109,7 +109,7 @@ - + kcfg_MemoryLevel @@ -128,7 +128,7 @@ unnamed - + descLabel @@ -138,19 +138,19 @@ PlainText - + WordBreak|AlignVCenter - + - layout5 + tqlayout5 unnamed - + lowRadio @@ -158,7 +158,7 @@ &Low - + normalRadio @@ -166,7 +166,7 @@ &Normal (default) - + aggressiveRadio @@ -176,15 +176,15 @@ - + - layout6 + tqlayout6 unnamed - + pixmapLabel1 @@ -210,7 +210,7 @@ Minimum - + 21 1 @@ -231,7 +231,7 @@ Expanding - + 21 16 @@ -265,14 +265,14 @@ kiconloader.h dlgperformance.ui.h - + lowRadio_toggled( bool on ) normalRadio_toggled( bool on ) aggressiveRadio_toggled( bool on ) - + init() DesktopIcon - + diff --git a/kpdf/conf/dlgpresentation.ui b/kpdf/conf/dlgpresentation.ui index ba65f7b1..9df30f3d 100644 --- a/kpdf/conf/dlgpresentation.ui +++ b/kpdf/conf/dlgpresentation.ui @@ -1,6 +1,6 @@ DlgPresentation - + DlgPresentation @@ -19,7 +19,7 @@ 0 - + groupBox1 @@ -30,15 +30,15 @@ unnamed - + - layout1 + tqlayout1 unnamed - + kcfg_SlidesAdvanceTime @@ -52,7 +52,7 @@ 5 - + kcfg_SlidesAdvance @@ -60,7 +60,7 @@ Advance every: - + kcfg_SlidesLoop @@ -72,7 +72,7 @@ - + groupBox2 @@ -83,15 +83,15 @@ unnamed - + - Blinds Vertical + BlindsQt::Vertical - Blinds Horizontal + BlindsQt::Horizontal @@ -136,22 +136,22 @@ - Split Horizontal In + SplitQt::Horizontal In - Split Horizontal Out + SplitQt::Horizontal Out - Split Vertical In + SplitQt::Vertical In - Split Vertical Out + SplitQt::Vertical Out @@ -178,7 +178,7 @@ kcfg_SlidesTransition - + textLabel1 @@ -186,7 +186,7 @@ Default transition: - + textLabel2 @@ -194,7 +194,7 @@ Mouse cursor: - + Hidden After Delay @@ -214,7 +214,7 @@ kcfg_SlidesCursor - + textLabel3 @@ -230,7 +230,7 @@ - + kcfg_SlidesShowSummary @@ -238,7 +238,7 @@ Show s&ummary page - + kcfg_SlidesShowProgress @@ -258,7 +258,7 @@ Expanding - + 20 1 @@ -275,7 +275,7 @@ setEnabled(bool) - + kcolorbutton.h diff --git a/kpdf/conf/preferencesdialog.cpp b/kpdf/conf/preferencesdialog.cpp index 61211008..418517a1 100644 --- a/kpdf/conf/preferencesdialog.cpp +++ b/kpdf/conf/preferencesdialog.cpp @@ -18,8 +18,8 @@ // reimplementing this #include "preferencesdialog.h" -PreferencesDialog::PreferencesDialog( TQWidget * parent, KConfigSkeleton * skeleton ) - : KConfigDialog( parent, "preferences", skeleton ) +PreferencesDialog::PreferencesDialog( TQWidget * tqparent, KConfigSkeleton * skeleton ) + : KConfigDialog( tqparent, "preferences", skeleton ) { m_general = new DlgGeneral(0); m_performance = new DlgPerformance(0); diff --git a/kpdf/conf/preferencesdialog.h b/kpdf/conf/preferencesdialog.h index 36aaa909..316aa05b 100644 --- a/kpdf/conf/preferencesdialog.h +++ b/kpdf/conf/preferencesdialog.h @@ -25,7 +25,7 @@ class PreferencesDialog : public KConfigDialog { public: - PreferencesDialog( TQWidget * parent, KConfigSkeleton * config ); + PreferencesDialog( TQWidget * tqparent, KConfigSkeleton * config ); protected: // void updateSettings(); // Called when OK/Apply is pressed. diff --git a/kpdf/configure.in.in b/kpdf/configure.in.in index db883adb..f8c6eac2 100644 --- a/kpdf/configure.in.in +++ b/kpdf/configure.in.in @@ -117,8 +117,11 @@ AC_ARG_ENABLE(force-kpdf-drm, , AC_DEFINE(KPDF_FORCE_DRM, 0, [Defines if force the use DRM in kpdf]) ) +kde_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $qt_includes" KDE_CHECK_COMPILER_FLAG([fno-regmove], SUPPORTS_NOREGMOVE=true, SUPPORTS_NOREGMOVE=false) if test "x$SUPPORTS_NOREGMOVE" = xtrue; then NOREGMOVE="-fno-regmove" fi AC_SUBST(NOREGMOVE) +CXXFLAGS="$kde_save_CXXFLAGS" diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp index 02395747..6c918a4d 100644 --- a/kpdf/core/document.cpp +++ b/kpdf/core/document.cpp @@ -118,7 +118,7 @@ KPDFDocument::KPDFDocument(TQWidget *widget) TQStringList::Iterator it = list.begin(); while( it != list.end() ) { - d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").arg(*it), 0, true)->name(); + d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").tqarg(*it), 0, true)->name(); ++it; } } @@ -139,13 +139,13 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con TQFile fileReadTest( docFile ); if ( !fileReadTest.open( IO_ReadOnly ) ) { - d->docFileName = TQString::null; + d->docFileName = TQString(); return false; } // determine the related "xml document-info" filename d->url = url; d->docFileName = docFile; - TQString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile; + TQString fn = docFile.tqcontains('/') ? docFile.section('/', -1, -1) : docFile; fn = "kpdf/" + TQString::number(fileReadTest.size()) + "." + fn + ".xml"; fileReadTest.close(); d->xmlFileName = locateLocal( "data", fn ); @@ -298,7 +298,7 @@ void KPDFDocument::addObserver( DocumentObserver * pObserver ) void KPDFDocument::removeObserver( DocumentObserver * pObserver ) { // remove observer from the map. it won't receive notifications anymore - if ( d->observers.contains( pObserver->observerId() ) ) + if ( d->observers.tqcontains( pObserver->observerId() ) ) { // free observer's pixmap data int observerId = pObserver->observerId(); @@ -331,7 +331,7 @@ void KPDFDocument::reparseConfig() // reparse generator config and if something changed clear KPDFPages if ( generator && generator->reparseConfig() ) { - // invalidate pixmaps + // tqinvalidate pixmaps TQValueVector::iterator it = pages_vector.begin(), end = pages_vector.end(); for ( ; it != end; ++it ) (*it)->deletePixmapsAndRects(); @@ -357,7 +357,7 @@ void KPDFDocument::reparseConfig() TQWidget *KPDFDocument::widget() const { - return static_cast(parent()); + return TQT_TQWIDGET(tqparent()); } bool KPDFDocument::isOpened() const @@ -633,7 +633,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta return false; // if searchID search not recorded, create new descriptor and init params - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) { RunningSearch * search = new RunningSearch(); search->continueOnPage = -1; @@ -707,12 +707,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.contains( pageNumber ) ) + if ( !pagesToNotify.tqcontains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // send page lists if found anything new @@ -747,7 +747,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { if ( currentPage >= pageCount ) { - if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes ) + if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes ) currentPage = 0; else break; @@ -764,7 +764,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // if a match has been found.. @@ -779,7 +779,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta pages_vector[ currentPage ]->setHighlight( searchID, match, color ); // ..queue page for notifying changes.. - if ( !pagesToNotify.contains( currentPage ) ) + if ( !pagesToNotify.tqcontains( currentPage ) ) pagesToNotify.append( currentPage ); // ..move the viewport to show the searched word centered @@ -793,7 +793,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta } } else if ( !noDialogs ) - KMessageBox::information( widget(), i18n("No matches found for '%1'.").arg( text ) ); + KMessageBox::information( widget(), i18n("No matches found for '%1'.").tqarg( text ) ); } // 3. PREVMATCH //TODO else if ( type == PrevMatch ) @@ -860,12 +860,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.contains( pageNumber ) ) + if ( !pagesToNotify.tqcontains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // send page lists to update observers (since some filter on bookmarks) @@ -884,7 +884,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta bool KPDFDocument::continueSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) return false; // start search with cached parameters from last search by searchID @@ -897,7 +897,7 @@ bool KPDFDocument::continueSearch( int searchID ) void KPDFDocument::resetSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) return; // get previous parameters for search @@ -1016,7 +1016,7 @@ void KPDFDocument::processLink( const KPDFLink * link ) KRun::run( *ptr, lst ); } else - KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).arg( mime->name() ) ); + KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).tqarg( mime->name() ) ); } break; case KPDFLink::Action: { @@ -1067,14 +1067,14 @@ void KPDFDocument::processLink( const KPDFLink * link ) case KPDFLink::Browse: { const KPDFLinkBrowse * browse = static_cast< const KPDFLinkBrowse * >( link ); // if the url is a mailto one, invoke mailer - if ( browse->url().startsWith( "mailto:", false ) ) + if ( browse->url().tqstartsWith( "mailto:", false ) ) kapp->invokeMailer( browse->url() ); else { TQString url = browse->url(); // fix for #100366, documents with relative links that are the form of http:foo.pdf - if (url.find("http:") == 0 && url.find("http://") == -1 && url.right(4) == ".pdf") + if (url.tqfind("http:") == 0 && url.tqfind("http://") == -1 && url.right(4) == ".pdf") { openRelativeFile(url.mid(5)); return; @@ -1117,7 +1117,7 @@ void KPDFDocument::requestDone( PixmapRequest * req ) break; } - if ( d->observers.contains( req->id ) ) + if ( d->observers.tqcontains( req->id ) ) { // [MEM] 1.2 append memory allocation descriptor to the FIFO int memoryBytes = 4 * req->width * req->height; @@ -1381,7 +1381,7 @@ void KPDFDocument::loadDocumentInfo() TQString KPDFDocument::giveAbsolutePath( const TQString & fileName ) { if ( !d->url.isValid() ) - return TQString::null; + return TQString(); return d->url.upURL().url() + fileName; } diff --git a/kpdf/core/document.h b/kpdf/core/document.h index c1eb840a..ee5a8a88 100644 --- a/kpdf/core/document.h +++ b/kpdf/core/document.h @@ -47,9 +47,10 @@ class KURL; * For a better understanding of hieracies @see README.internals.png * @see DocumentObserver, KPDFPage */ -class KPDFDocument : public QObject +class KPDFDocument : public TQObject { Q_OBJECT + TQ_OBJECT public: KPDFDocument( TQWidget *widget ); ~KPDFDocument(); @@ -184,7 +185,7 @@ class DocumentViewport * The Info structure can be filled in by generators to display metadata * about the currently opened file. */ -class DocumentInfo : public QDomDocument +class DocumentInfo : public TQDomDocument { public: DocumentInfo(); @@ -216,7 +217,7 @@ class DocumentInfo : public QDomDocument * - ViewportName: A 'named reference' to the viewport that must be converted * using getMetaData( "NamedViewport", *viewport_name* ) */ -class DocumentSynopsis : public QDomDocument +class DocumentSynopsis : public TQDomDocument { public: DocumentSynopsis(); diff --git a/kpdf/core/generator.h b/kpdf/core/generator.h index 841915a2..a3c1f985 100644 --- a/kpdf/core/generator.h +++ b/kpdf/core/generator.h @@ -40,7 +40,7 @@ class PixmapRequest; * class stores the resulting data into 'KPDFPage's. The data will then be * displayed by the GUI components (pageView, thumbnailList, etc..). */ -class Generator : public QObject +class Generator : public TQObject { public: /** virtual methods to reimplement **/ diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp index 9540d2fd..8ad34900 100644 --- a/kpdf/core/generator_pdf/generator_pdf.cpp +++ b/kpdf/core/generator_pdf/generator_pdf.cpp @@ -57,7 +57,7 @@ * internal: thread race prevention is done via the 'docLock' mutex. the * mutex is needed only because we have the asyncronous thread; else * the operations are all within the 'gui' thread, scheduled by the - * Qt scheduler and no mutex is needed. + * TQt scheduler and no mutex is needed. * external: dangerous operations are all locked via mutex internally, and the * only needed external thing is the 'canGeneratePixmap' method * that tells if the generator is free (since we don't want an @@ -152,7 +152,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector", "PDF v. %1" ) - .arg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) ); + .tqarg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) ); docInfo.set( "encryption", pdfdoc->isEncrypted() ? i18n( "Encrypted" ) : i18n( "Unencrypted" ), i18n("Security") ); docInfo.set( "optimization", pdfdoc->isLinearized() ? i18n( "Yes" ) : i18n( "No" ), @@ -423,18 +423,18 @@ bool PDFGenerator::print( KPrinter& printer ) marginBottom = (int)printer.option("kde-margin-bottom").toDouble(); bool forceRasterize = printer.option("kde-kpdf-forceRaster").toInt(); - if (ps.find(TQRegExp("w\\d+h\\d+")) == 0) + if (ps.tqfind(TQRegExp("w\\d+h\\d+")) == 0) { - // size not supported by Qt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester + // size not supported by TQt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester // remove the w ps = ps.mid(1); - int hPos = ps.find("h"); + int hPos = ps.tqfind("h"); paperWidth = ps.left(hPos).toInt(); paperHeight = ps.mid(hPos+1).toInt(); } else { - // size is supported by Qt, we get either the pageSize name or nothing because the CUPS driver + // size is supported by TQt, we get either the pageSize name or nothing because the CUPS driver // does not do any translation, then use KPrinter::pageSize to get the page size KPrinter::PageSize qtPageSize; if (!ps.isEmpty()) qtPageSize = pageNameToPageSize(ps); @@ -449,7 +449,7 @@ bool PDFGenerator::print( KPrinter& printer ) paperHeight = metrics.height(); } - KTempFile tf( TQString::null, ".ps" ); + KTempFile tf( TQString(), ".ps" ); globalParams->setPSPaperWidth(paperWidth); globalParams->setPSPaperHeight(paperHeight); TQString pstitle = getDocumentInfo("Title", true); @@ -457,7 +457,7 @@ bool PDFGenerator::print( KPrinter& printer ) { pstitle = m_document->currentDocument().fileName( false ); } - // this looks non-unicode-safe and it is. anything other than ASCII is not specified + // this looks non-tqunicode-safe and it is. anything other than ASCII is not specified // and some printers actually stop printing when they encounter non-ASCII characters in the // Postscript %%Title tag TQCString pstitle8Bit = pstitle.latin1(); @@ -524,18 +524,18 @@ bool PDFGenerator::print( KPrinter& printer ) } } -static GString *QStringToGString(const TQString &s) { +static GString *TQStringToGString(const TQString &s) { int len = s.length(); char *cstring = (char *)gmallocn(s.length(), sizeof(char)); for (int i = 0; i < len; ++i) - cstring[i] = s.at(i).unicode(); + cstring[i] = s.tqat(i).tqunicode(); return new GString(cstring, len); } -static TQString unicodeToQString(Unicode* u, int len) { +static TQString tqunicodeToTQString(Unicode* u, int len) { TQString ret; ret.setLength(len); - TQChar* qch = (TQChar*) ret.unicode(); + TQChar* qch = (TQChar*) ret.tqunicode(); for (;len;--len) *qch++ = (TQChar) *u++; return ret; @@ -568,7 +568,7 @@ static TQString UnicodeParsedString(GString *s1) { u = s1->getChar(i) & 0xff; ++i; } - result += unicodeToQString( &u, 1 ); + result += tqunicodeToTQString( &u, 1 ); } return result; } @@ -586,7 +586,7 @@ TQString PDFGenerator::getMetaData( const TQString & key, const TQString & optio // asking for the page related to a 'named link destination'. the // option is the link name. @see addSynopsisChildren. DocumentViewport viewport; - GString * namedDest = QStringToGString(option); + GString * namedDest = TQStringToGString(option); docLock.lock(); LinkDest * destination = pdfdoc->findDest( namedDest ); if ( destination ) @@ -610,7 +610,7 @@ bool PDFGenerator::reparseConfig() { // load paper color from Settings or use the white default color TQColor color = ( (KpdfSettings::renderMode() == KpdfSettings::EnumRenderMode::Paper ) && - KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : Qt::white; + KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : TQt::white; // if paper color is changed we have to rebuild every visible pixmap in addition // to the outputDevice. it's the 'heaviest' case, other effect are just recoloring // over the page rendered on 'standard' white background. @@ -789,11 +789,11 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul // [Albert] Code adapted from pdfinfo.cc on xpdf Object info; if ( !pdfdoc ) - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); pdfdoc->getDocInfo( &info ); if ( !info.isDict() ) - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); Object obj; Dict *infoDict = info.getDict(); @@ -807,7 +807,7 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul } obj.free(); info.free(); - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); } TQString PDFGenerator::getDocumentDate( const TQString & data ) const @@ -856,7 +856,7 @@ TQString PDFGenerator::getDocumentDate( const TQString & data ) const return result; } -void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) +void PDFGenerator::addSynopsisChildren( TQDomNode * tqparent, GList * items ) { int numItems = items->getLength(); for ( int i = 0; i < numItems; ++i ) @@ -868,11 +868,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) TQString name; Unicode * uniChar = outlineItem->getTitle(); int titleLength = outlineItem->getTitleLength(); - name = unicodeToQString(uniChar, titleLength); + name = tqunicodeToTQString(uniChar, titleLength); if ( name.isEmpty() ) continue; TQDomElement item = docSyn.createElement( name ); - parent->appendChild( item ); + tqparent->appendChild( item ); // 2. find the page the link refers to LinkAction * a = outlineItem->getAction(); @@ -888,7 +888,7 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) // so better storing the reference and provide the viewport as metadata // on demand GString *s = g->getNamedDest(); - TQChar *charArray = new QChar[s->getLength()]; + TQChar *charArray = new TQChar[s->getLength()]; for (int i = 0; i < s->getLength(); ++i) charArray[i] = TQChar(s->getCString()[i]); TQString option(charArray, s->getLength()); item.setAttribute( "ViewportName", option ); @@ -909,11 +909,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) item.setAttribute( "Open", TQVariant( (bool)outlineItem->isOpen() ).toString() ); - // 3. recursively descend over children + // 3. recursively descend over tqchildren outlineItem->open(); - GList * children = outlineItem->getKids(); - if ( children ) - addSynopsisChildren( &item, children ); + GList * tqchildren = outlineItem->getKids(); + if ( tqchildren ) + addSynopsisChildren( &item, tqchildren ); } } @@ -1017,10 +1017,10 @@ void PDFGenerator::addTransition( int pageNumber, KPDFPage * page ) switch ( pdfTransition->getAlignment() ) { case PageTransition::Horizontal: - transition->setAlignment( KPDFPageTransition::Horizontal ); + transition->tqsetAlignment( KPDFPageTransition::Horizontal ); break; case PageTransition::Vertical: - transition->setAlignment( KPDFPageTransition::Vertical ); + transition->tqsetAlignment( KPDFPageTransition::Vertical ); break; } diff --git a/kpdf/core/generator_pdf/generator_pdf.h b/kpdf/core/generator_pdf/generator_pdf.h index 662c19fd..b7d2deb2 100644 --- a/kpdf/core/generator_pdf/generator_pdf.h +++ b/kpdf/core/generator_pdf/generator_pdf.h @@ -95,7 +95,7 @@ class PDFGenerator : public Generator TQString getDocumentInfo( const TQString & data, bool canReturnNull = false ) const; TQString getDocumentDate( const TQString & data ) const; // private function for creating the document synopsis hieracy - void addSynopsisChildren( TQDomNode * parent, GList * items ); + void addSynopsisChildren( TQDomNode * tqparent, GList * items ); // private function for creating the transition information void addTransition( int pageNumber, KPDFPage * page ); // (async related) receive data from the generator thread @@ -124,7 +124,7 @@ class PDFGenerator : public Generator * @short A thread that builds contents for PDFGenerator in the background. * */ -class PDFPixmapGeneratorThread : public QThread +class PDFPixmapGeneratorThread : public TQThread { public: PDFPixmapGeneratorThread( PDFGenerator * generator ); diff --git a/kpdf/core/generator_pdf/gp_outputdev.cpp b/kpdf/core/generator_pdf/gp_outputdev.cpp index df3fd85b..b6c40520 100644 --- a/kpdf/core/generator_pdf/gp_outputdev.cpp +++ b/kpdf/core/generator_pdf/gp_outputdev.cpp @@ -109,7 +109,7 @@ void KPDFOutputDev::endPage() for (int j = 0; j < bh; j++) { getBitmap()->getPixel(i, j, pixel); - img->setPixel( i, j, qRgb( pixel[0], pixel[1], pixel[2] ) ); + img->setPixel( i, j, tqRgb( pixel[0], pixel[1], pixel[2] ) ); } } delete [] pixel; @@ -172,7 +172,7 @@ void KPDFOutputDev::processLink( Link * link, Catalog * catalog ) } void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str, - int _width, int _height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg ) + int _width, int _height, GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg ) { if ( m_generateImages ) { @@ -207,7 +207,7 @@ void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str, m_rects.push_back( rect ); } } - SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, maskColors, inlineImg ); + SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, tqmaskColors, inlineImg ); } //END - OutputDev hooked calls @@ -246,7 +246,7 @@ KPDFLink * KPDFOutputDev::generateLink( LinkAction * a ) { LinkGoTo * g = (LinkGoTo *) a; // ceate link: no ext file, namedDest, object pointer - link = new KPDFLinkGoto( TQString::null, decodeViewport( g->getNamedDest(), g->getDest() ) ); + link = new KPDFLinkGoto( TQString(), decodeViewport( g->getNamedDest(), g->getDest() ) ); } break; diff --git a/kpdf/core/generator_pdf/gp_outputdev.h b/kpdf/core/generator_pdf/gp_outputdev.h index 7788b1db..a4d33b04 100644 --- a/kpdf/core/generator_pdf/gp_outputdev.h +++ b/kpdf/core/generator_pdf/gp_outputdev.h @@ -32,7 +32,7 @@ class DocumentViewport; * @short A SplashOutputDev renderer that grabs text and links. * * This output device: - * - renders the page using SplashOutputDev (its parent) + * - renders the page using SplashOutputDev (its tqparent) * - harvests text into a textPage (for searching text) * - harvests links and collects them * - collects images and collects them @@ -63,7 +63,7 @@ class KPDFOutputDev : public SplashOutputDev virtual void processLink(Link *link, Catalog *catalog); //----- image drawing virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, - GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg); + GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg); private: // delete all interal objects and data diff --git a/kpdf/core/link.cpp b/kpdf/core/link.cpp index 33d0fe98..a872ba60 100644 --- a/kpdf/core/link.cpp +++ b/kpdf/core/link.cpp @@ -18,12 +18,12 @@ KPDFLink::~KPDFLink() TQString KPDFLinkGoto::linkTip() const { - return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).arg( m_vp.pageNumber + 1 ) : TQString::null ) : i18n("Open external file"); + return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).tqarg( m_vp.pageNumber + 1 ) : TQString() ) : i18n("Open external file"); } TQString KPDFLinkExecute::linkTip() const { - return i18n( "Execute '%1'..." ).arg( m_fileName ); + return i18n( "Execute '%1'..." ).tqarg( m_fileName ); } TQString KPDFLinkBrowse::linkTip() const @@ -61,5 +61,5 @@ TQString KPDFLinkAction::linkTip() const default: ; } - return TQString::null; + return TQString(); } diff --git a/kpdf/core/link.h b/kpdf/core/link.h index eff3573e..839292fd 100644 --- a/kpdf/core/link.h +++ b/kpdf/core/link.h @@ -27,7 +27,7 @@ class KPDFLink // get link type (inherited classes mustreturn an unique identifier) enum LinkType { Goto, Execute, Browse, Action, Movie }; virtual LinkType linkType() const = 0; - virtual TQString linkTip() const { return TQString::null; } + virtual TQString linkTip() const { return TQString(); } // virtual destructor (remove warnings) virtual ~KPDFLink(); diff --git a/kpdf/core/page.cpp b/kpdf/core/page.cpp index 6b611360..630c9480 100644 --- a/kpdf/core/page.cpp +++ b/kpdf/core/page.cpp @@ -74,7 +74,7 @@ void KPDFPage::setRotation( int r ) bool KPDFPage::hasPixmap( int id, int width, int height ) const { - if ( !m_pixmaps.contains( id ) ) + if ( !m_pixmaps.tqcontains( id ) ) return false; if ( width == -1 || height == -1 ) return true; @@ -98,7 +98,7 @@ bool KPDFPage::hasObjectRect( double x, double y ) const return false; TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->contains( x, y ) ) + if ( (*it)->tqcontains( x, y ) ) return true; return false; } @@ -131,11 +131,11 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor return 0; // create a xpf's Unicode (unsigned int) array for the given text - const TQChar * str = text.unicode(); + const TQChar * str = text.tqunicode(); int len = text.length(); TQMemArray u(len); for (int i = 0; i < len; ++i) - u[i] = str[i].unicode(); + u[i] = str[i].tqunicode(); // find out the direction of search enum SearchDir { FromTop, NextMatch, PrevMatch } dir = lastRect ? NextMatch : FromTop; @@ -175,7 +175,7 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor const TQString KPDFPage::getText( const NormalizedRect & rect ) const { if ( !m_text ) - return TQString::null; + return TQString(); int left = (int)( rect.left * m_width ), top = (int)( rect.top * m_height ), right = (int)( rect.right * m_width ), @@ -190,7 +190,7 @@ const ObjectRect * KPDFPage::hasObject( ObjectRect::ObjectType type, double x, d { TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->contains( x, y ) ) + if ( (*it)->tqcontains( x, y ) ) if ((*it)->objectType() == type) return *it; return 0; } @@ -203,7 +203,7 @@ const KPDFPageTransition * KPDFPage::getTransition() const void KPDFPage::setPixmap( int id, TQPixmap * pixmap ) { - if ( m_pixmaps.contains( id ) ) + if ( m_pixmaps.tqcontains( id ) ) delete m_pixmaps[id]; m_pixmaps[id] = pixmap; } @@ -252,7 +252,7 @@ void KPDFPage::setTransition( KPDFPageTransition * transition ) void KPDFPage::deletePixmap( int id ) { - if ( m_pixmaps.contains( id ) ) + if ( m_pixmaps.tqcontains( id ) ) { delete m_pixmaps[ id ]; m_pixmaps.remove( id ); @@ -304,7 +304,7 @@ NormalizedRect::NormalizedRect( const TQRect & r, double xScale, double yScale ) : left( (double)r.left() / xScale ), top( (double)r.top() / yScale ), right( (double)r.right() / xScale ), bottom( (double)r.bottom() / yScale ) {} -bool NormalizedRect::contains( double x, double y ) const +bool NormalizedRect::tqcontains( double x, double y ) const { return x >= left && x <= right && y >= top && y <= bottom; } @@ -319,7 +319,7 @@ bool NormalizedRect::intersects( double l, double t, double r, double b ) const return (l < right) && (r > left) && (t < bottom) && (b > top); } -TQRect NormalizedRect::geometry( int xScale, int yScale ) const +TQRect NormalizedRect::tqgeometry( int xScale, int yScale ) const { int l = (int)( left * xScale ), t = (int)( top * yScale ), diff --git a/kpdf/core/page.h b/kpdf/core/page.h index 2de7aceb..51d7781c 100644 --- a/kpdf/core/page.h +++ b/kpdf/core/page.h @@ -32,11 +32,11 @@ class NormalizedRect NormalizedRect( double l, double t, double r, double b ); NormalizedRect( const TQRect & r, double xScale, double yScale ); - bool contains( double x, double y ) const; + bool tqcontains( double x, double y ) const; bool intersects( const NormalizedRect & normRect ) const; bool intersects( double l, double t, double r, double b ) const; - TQRect geometry( int xScale, int yScale ) const; + TQRect tqgeometry( int xScale, int yScale ) const; }; /** diff --git a/kpdf/core/pagetransition.cpp b/kpdf/core/pagetransition.cpp index cdf04a7f..41d743c6 100644 --- a/kpdf/core/pagetransition.cpp +++ b/kpdf/core/pagetransition.cpp @@ -15,7 +15,7 @@ KPDFPageTransition::KPDFPageTransition( Type type ) : m_type( type ), m_duration( 1 ), - m_alignment( Horizontal ), + m_tqalignment(Horizontal ), m_direction( Inward ), m_angle( 0 ), m_scale( 1.0 ), diff --git a/kpdf/core/pagetransition.h b/kpdf/core/pagetransition.h index 70792355..25280437 100644 --- a/kpdf/core/pagetransition.h +++ b/kpdf/core/pagetransition.h @@ -51,7 +51,7 @@ class KPDFPageTransition inline int duration() const { return m_duration; } // Get dimension in which the transition effect occurs. - inline Alignment alignment() const { return m_alignment; } + inline Alignment tqalignment() const { return m_tqalignment; } // Get direction of motion of the transition effect. inline Direction direction() const { return m_direction; } @@ -67,7 +67,7 @@ class KPDFPageTransition inline void setType( Type type ) { m_type = type; } inline void setDuration( int duration ) { m_duration = duration; } - inline void setAlignment( Alignment alignment ) { m_alignment = alignment; } + inline void tqsetAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; } inline void setDirection( Direction direction ) { m_direction = direction; } inline void setAngle( int angle ) { m_angle = angle; } inline void setScale( double scale ) { m_scale = scale; } @@ -76,7 +76,7 @@ class KPDFPageTransition private: Type m_type; int m_duration; - Alignment m_alignment; + Alignment m_tqalignment; Direction m_direction; int m_angle; double m_scale; diff --git a/kpdf/error.cpp b/kpdf/error.cpp index 00d3581e..ca62437f 100644 --- a/kpdf/error.cpp +++ b/kpdf/error.cpp @@ -32,7 +32,7 @@ void CDECL error(int pos, char *msg, ...) { return; } if (pos >= 0) { - emsg = TQString("Error (%1): ").arg(pos); + emsg = TQString("Error (%1): ").tqarg(pos); } else { emsg = "Error: "; } diff --git a/kpdf/part.cpp b/kpdf/part.cpp index b2775255..e1212817 100644 --- a/kpdf/part.cpp +++ b/kpdf/part.cpp @@ -80,12 +80,12 @@ class PDFOptionsPage : public KPrintDialogPage PDFOptionsPage() { setTitle( i18n( "PDF Options" ) ); - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); m_forceRaster = new TQCheckBox(i18n("Force rasterization"), this); TQToolTip::add(m_forceRaster, i18n("Rasterize into an image before printing")); TQWhatsThis::add(m_forceRaster, i18n("Forces the rasterization of each page into an image before printing it. This usually gives somewhat worse results, but is useful when printing documents that appear to print incorrectly.")); - layout->addWidget(m_forceRaster); - layout->addStretch(1); + tqlayout->addWidget(m_forceRaster); + tqlayout->addStretch(1); } void getOptions( TQMap& opts, bool incldef = false ) @@ -113,10 +113,10 @@ using namespace KPDF; unsigned int Part::m_count = 0; -Part::Part(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +Part::Part(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList & /*args*/ ) - : DCOPObject("kpdf"), KParts::ReadOnlyPart(parent, name), m_showMenuBarAction(0), m_showFullScreenAction(0), + : DCOPObject("kpdf"), KParts::ReadOnlyPart(tqparent, name), m_showMenuBarAction(0), m_showFullScreenAction(0), m_actionsSearched(false), m_searchStarted(false) { // connect the started signal to tell the job the mimetypes we like @@ -151,13 +151,13 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, connect( m_document, TQT_SIGNAL( openURL(const KURL &) ), this, TQT_SLOT( openURLFromDocument(const KURL &) ) ); connect( m_document, TQT_SIGNAL( close() ), this, TQT_SLOT( close() ) ); - if (parent && parent->metaObject()->slotNames(true).contains("slotQuit()")) - connect( m_document, TQT_SIGNAL( quit() ), parent, TQT_SLOT( slotQuit() ) ); + if (tqparent && tqparent->tqmetaObject()->slotNames(true).tqcontains("slotQuit()")) + connect( m_document, TQT_SIGNAL( quit() ), tqparent, TQT_SLOT( slotQuit() ) ); else connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) ); // widgets: ^searchbar (toolbar containing label and SearchWidget) -// m_searchToolBar = new KToolBar( parentWidget, "searchBar" ); +// m_searchToolBar = new KToolBar( tqparentWidget, "searchBar" ); // m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() ); // TQLabel * sLabel = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" ); // m_searchWidget = new SearchWidget( m_searchToolBar, m_document ); @@ -165,7 +165,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, // m_searchToolBar->setStretchableWidget( m_searchWidget ); // widgets: [] splitter [] - m_splitter = new TQSplitter( parentWidget, widgetName ); + m_splitter = new TQSplitter( tqparentWidget, widgetName ); m_splitter->setOpaqueResize( true ); setWidget( m_splitter ); @@ -186,7 +186,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, int index; // [left toolbox: Table of Contents] | [] - // dummy wrapper with layout to enable horizontal scroll bars (bug: 147233) + // dummy wrapper with tqlayout to enable horizontal scroll bars (bug: 147233) TQWidget *tocWrapper = new TQWidget(m_toolBox); TQVBoxLayout *tocWrapperLayout = new TQVBoxLayout(tocWrapper); m_tocFrame = new TOC( tocWrapper, m_document ); @@ -278,8 +278,8 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_historyNext->setWhatsThis( i18n( "Go to the place you were after" ) ); // Find and other actions - m_find = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "find" ); - m_find->setEnabled( false ); + m_tqfind = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "tqfind" ); + m_tqfind->setEnabled( false ); m_findNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac, "find_next" ); m_findNext->setEnabled( false ); @@ -297,7 +297,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, TQT_SLOT(slotShowPresentation()), ac, "presentation"); m_showPresentation->setEnabled( false ); - // attach the actions of the children widgets too + // attach the actions of the tqchildren widgets too m_pageView->setupActions( ac ); // apply configuration (both internal settings and GUI configured items) @@ -310,7 +310,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, } m_splitter->setSizes( splitterSizes ); // get notified about splitter size changes (HACK that will be removed - // by connecting to Qt4::QSplitter's sliderMoved()) + // by connecting to TQt4::TQSplitter's sliderMoved()) m_pageView->installEventFilter( this ); m_watcher = new KDirWatch( this ); connect( m_watcher, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileDirty( const TQString& ) ) ); @@ -422,7 +422,7 @@ bool Part::openFile() { if ( TQFile::exists(m_file) ) { - KTempFile tf( TQString::null, ".pdf" ); + KTempFile tf( TQString(), ".pdf" ); if ( tf.status() == 0 ) { tf.close(); @@ -447,12 +447,12 @@ bool Part::openFile() } } - m_temporaryLocalFile = TQString::null; + m_temporaryLocalFile = TQString(); bool ok = m_document->openDocument( m_file, url(), mime ); // update one-time actions - m_find->setEnabled( ok && m_document-> supportsSearching()); + m_tqfind->setEnabled( ok && m_document-> supportsSearching()); m_findNext->setEnabled( ok && m_document-> supportsSearching()); m_saveAs->setEnabled( ok ); m_printPreview->setEnabled( ok ); @@ -482,7 +482,7 @@ bool Part::openFile() // if the 'StartFullScreen' flag is set, start presentation if ( m_document->getMetaData( "StartFullScreen" ) == "yes" ) { - KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString::null, "autoPresentationWarning"); + KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString(), "autoPresentationWarning"); slotShowPresentation(); } @@ -502,7 +502,7 @@ bool Part::openURL(const KURL &url) // if it matches then: download it (if not local) extract to a temp file using // KTar and proceed with the URL of the temporary file - m_jobMime = TQString::null; + m_jobMime = TQString(); // this calls the above 'openURL' method bool b = KParts::ReadOnlyPart::openURL(url); @@ -510,7 +510,7 @@ bool Part::openURL(const KURL &url) // these setWindowCaption calls only work for local files if ( !b ) { - KMessageBox::error( widget(), i18n("Could not open %1").arg( url.prettyURL() ) ); + KMessageBox::error( widget(), i18n("Could not open %1").tqarg( url.prettyURL() ) ); emit setWindowCaption(""); } else @@ -548,11 +548,11 @@ bool Part::closeURL() if (!m_temporaryLocalFile.isNull()) { TQFile::remove( m_temporaryLocalFile ); - m_temporaryLocalFile = TQString::null; + m_temporaryLocalFile = TQString(); } slotHidePresentation(); - m_find->setEnabled( false ); + m_tqfind->setEnabled( false ); m_findNext->setEnabled( false ); m_saveAs->setEnabled( false ); m_printPreview->setEnabled( false ); @@ -571,7 +571,7 @@ bool Part::closeURL() bool Part::eventFilter( TQObject * watched, TQEvent * e ) { // if pageView has been resized, save splitter sizes - if ( watched == m_pageView && e->type() == TQEvent::Resize ) + if ( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_pageView) && e->type() == TQEvent::Resize ) m_saveSplitterSizeTimer->start(500, true); // only intercept events, don't block them @@ -634,11 +634,11 @@ void Part::slotDoFileDirty() void Part::close() { - if (parent() && strcmp(parent()->name(), "KPDF::Shell") == 0) + if (tqparent() && strcmp(tqparent()->name(), "KPDF::Shell") == 0) { closeURL(); } - else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), TQString::null, "warnNoCloseIfNotInKPDF"); + else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), TQString(), "warnNoCloseIfNotInKPDF"); } void Part::updateViewActions() @@ -686,7 +686,7 @@ void Part::psTransformEnded() void Part::cannotQuit() { - KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString::null, "warnNoQuitIfNotInKPDF"); + KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString(), "warnNoQuitIfNotInKPDF"); } void Part::saveSplitterSize() @@ -789,7 +789,7 @@ void Part::slotFind() m_searchStarted = true; m_document->resetSearch( PART_SEARCH_ID ); m_document->searchText( PART_SEARCH_ID, dlg.pattern(), false, savedCaseSensitive, - KPDFDocument::NextMatch, true, qRgb( 255, 255, 64 ) ); + KPDFDocument::NextMatch, true, tqRgb( 255, 255, 64 ) ); } } @@ -801,22 +801,22 @@ void Part::slotFindNext() void Part::slotSaveFileAs() { - KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString::null, widget() ); + KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString(), widget() ); if ( saveURL.isValid() && !saveURL.isEmpty() ) { if (saveURL == url()) { - KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").arg(saveURL.filename()) ); + KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").tqarg(saveURL.filename()) ); return; } if ( KIO::NetAccess::exists( saveURL, false, widget() ) ) { - if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), TQString::null, i18n("Overwrite")) != KMessageBox::Continue) + if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").tqarg(saveURL.filename()), TQString(), i18n("Overwrite")) != KMessageBox::Continue) return; } if ( !KIO::NetAccess::file_copy( m_file, saveURL, -1, true ) ) - KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").arg( saveURL.prettyURL() ) ); + KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").tqarg( saveURL.prettyURL() ) ); } } @@ -894,7 +894,7 @@ void Part::slotPrintPreview() page = m_document->page(i); width = page->width(); height = page->height(); - if (page->rotation() == 90 || page->rotation() == 270) qSwap(width, height); + if (page->rotation() == 90 || page->rotation() == 270) tqSwap(width, height); if (width > height) landscape++; else portrait++; } @@ -939,7 +939,7 @@ void Part::slotShowMenu(const KPDFPage *page, const TQPoint &point) KPopupMenu *popup = new KPopupMenu( widget(), "rmb popup" ); if (page) { - popup->insertTitle( i18n( "Page %1" ).arg( page->number() + 1 ) ); + popup->insertTitle( i18n( "Page %1" ).tqarg( page->number() + 1 ) ); if ( page->hasBookmark() ) popup->insertItem( SmallIcon("bookmark"), i18n("Remove Bookmark"), 1 ); else @@ -1041,7 +1041,7 @@ void Part::slotPrint() page = m_document->page(i); width = page->width(); height = page->height(); - if (page->rotation() == 90 || page->rotation() == 270) qSwap(width, height); + if (page->rotation() == 90 || page->rotation() == 270) tqSwap(width, height); if (width > height) landscape++; else portrait++; } @@ -1085,8 +1085,8 @@ void Part::saveDocumentRestoreInfo(KConfig* config) /* * BrowserExtension class */ -BrowserExtension::BrowserExtension(Part* parent) - : KParts::BrowserExtension( parent, "KPDF::BrowserExtension" ) +BrowserExtension::BrowserExtension(Part* tqparent) + : KParts::BrowserExtension( tqparent, "KPDF::BrowserExtension" ) { emit enableAction("print", true); setURLDropHandlingEnabled(true); @@ -1094,7 +1094,7 @@ BrowserExtension::BrowserExtension(Part* parent) void BrowserExtension::print() { - static_cast(parent())->slotPrint(); + static_cast(tqparent())->slotPrint(); } #include "part.moc" diff --git a/kpdf/part.h b/kpdf/part.h index 70a3119e..23a12271 100644 --- a/kpdf/part.h +++ b/kpdf/part.h @@ -59,11 +59,12 @@ class BrowserExtension; class Part : public KParts::ReadOnlyPart, public DocumentObserver, virtual public kpdf_dcop { Q_OBJECT + TQ_OBJECT public: // Default constructor - Part(TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, const TQStringList& args); + Part(TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, const TQStringList& args); // Destructor ~Part(); @@ -178,7 +179,7 @@ private: KAction *m_lastPage; KAction *m_historyBack; KAction *m_historyNext; - KAction *m_find; + KAction *m_tqfind; KAction *m_findNext; KAction *m_saveAs; KAction *m_printPreview; @@ -196,6 +197,7 @@ private: class BrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: BrowserExtension(Part*); diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp index 8b6d185a..9a2f99b1 100644 --- a/kpdf/shell/shell.cpp +++ b/kpdf/shell/shell.cpp @@ -66,7 +66,7 @@ void Shell::init() { // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", this, 0, "KParts::ReadOnlyPart"); + m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", TQT_TQOBJECT(this), 0, "KParts::ReadOnlyPart"); if (m_part) { // then, setup our actions @@ -146,19 +146,19 @@ void Shell::writeSettings() void Shell::setupActions() { - KAction * openAction = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - m_recent = KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); + KAction * openAction = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + m_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); connect( m_recent, TQT_SIGNAL( activated() ), openAction, TQT_SLOT( activate() ) ); m_recent->setWhatsThis( i18n( "Click to open a file or Click and hold to select a recent file" ) ); m_printAction = KStdAction::print( m_part, TQT_SLOT( slotPrint() ), actionCollection() ); m_printAction->setEnabled( false ); - KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); setStandardToolBarMenuEnabled(true); - m_showMenuBarAction = KStdAction::showMenubar( this, TQT_SLOT( slotShowMenubar() ), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - m_fullScreenAction = KStdAction::fullScreen( this, TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); + m_showMenuBarAction = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotShowMenubar() ), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + m_fullScreenAction = KStdAction::fullScreen( TQT_TQOBJECT(this), TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); } void Shell::saveProperties(KConfig* config) @@ -187,7 +187,7 @@ Shell::fileOpen() // this slot is called whenever the File->Open menu is selected, // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar // button is clicked - KURL url = KFileDialog::getOpenURL( TQString::null, "application/pdf application/postscript" );//getOpenFileName(); + KURL url = KFileDialog::getOpenURL( TQString(), "application/pdf application/postscript" );//getOpenFileName(); if (!url.isEmpty()) openURL(url); diff --git a/kpdf/shell/shell.h b/kpdf/shell/shell.h index f92df5ce..d14cfd05 100644 --- a/kpdf/shell/shell.h +++ b/kpdf/shell/shell.h @@ -36,6 +36,7 @@ namespace KPDF class Shell : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kpdf/ui/minibar.cpp b/kpdf/ui/minibar.cpp index be3c9383..df3ebfce 100644 --- a/kpdf/ui/minibar.cpp +++ b/kpdf/ui/minibar.cpp @@ -25,10 +25,10 @@ #include "minibar.h" // [private widget] show progress -class ProgressWidget : public QWidget +class ProgressWidget : public TQWidget { public: - ProgressWidget( MiniBar * parent ); + ProgressWidget( MiniBar * tqparent ); void setProgress( float percentage ); protected: @@ -43,10 +43,10 @@ class ProgressWidget : public QWidget }; // [private widget] lineEdit for entering/validating page numbers -class PagesEdit : public QLineEdit +class PagesEdit : public TQLineEdit { public: - PagesEdit( MiniBar * parent ); + PagesEdit( MiniBar * tqparent ); void setPagesNumber( int pages ); void setText( const TQString & ); @@ -64,10 +64,10 @@ class PagesEdit : public QLineEdit }; // [private widget] a flat qpushbutton that enlights on hover -class HoverButton : public QPushButton +class HoverButton : public TQPushButton { public: - HoverButton( TQWidget * parent ); + HoverButton( TQWidget * tqparent ); protected: void paintEvent( TQPaintEvent * e ); @@ -78,8 +78,8 @@ class HoverButton : public QPushButton /** MiniBar **/ -MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) - : TQFrame( parent, "miniBar" ), m_document( document ), +MiniBar::MiniBar( TQWidget * tqparent, KPDFDocument * document ) + : TQFrame( tqparent, "miniBar" ), m_document( document ), m_currentPage( -1 ) { // left spacer @@ -87,7 +87,7 @@ MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) TQSpacerItem * spacerL = new TQSpacerItem( 20, 10, TQSizePolicy::Expanding ); horLayout->addItem( spacerL ); - // central 2r by 3c grid layout that contains all components + // central 2r by 3c grid tqlayout that contains all components TQGridLayout * gridLayout = new TQGridLayout( 0, 3,5, 2,1 ); // top spacer 6x6 px // TQSpacerItem * spacerTop = new TQSpacerItem( 6, 6, TQSizePolicy::Fixed, TQSizePolicy::Fixed ); @@ -127,7 +127,7 @@ MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) connect( m_nextButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( nextPage() ) ); // widget starts hidden (will be shown after opening a document) - parent->hide(); + tqparent->hide(); } MiniBar::~MiniBar() @@ -146,7 +146,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool if ( pages < 1 ) { m_currentPage = -1; - static_cast( parent() )->hide(); + TQT_TQWIDGET( tqparent() )->hide(); return; } @@ -171,7 +171,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool m_pagesButton->setText( TQString::number( pages ) ); m_prevButton->setEnabled( false ); m_nextButton->setEnabled( false ); - static_cast( parent() )->show(); + TQT_TQWIDGET( tqparent() )->show(); } void MiniBar::notifyViewportChanged( bool /*smoothMove*/ ) @@ -198,7 +198,7 @@ void MiniBar::notifyViewportChanged( bool /*smoothMove*/ ) void MiniBar::resizeEvent( TQResizeEvent * e ) { // auto-hide 'prev' and 'next' buttons if not enough space - const TQSize & myHint = minimumSizeHint(); + const TQSize & myHint = tqminimumSizeHint(); bool shown = m_prevButton->isVisible() && m_nextButton->isVisible(); if ( shown && e->size().width() < myHint.width() ) { @@ -208,7 +208,7 @@ void MiniBar::resizeEvent( TQResizeEvent * e ) } else if ( !shown ) { - int histeresis = m_prevButton->sizeHint().width() * 2 + 2; + int histeresis = m_prevButton->tqsizeHint().width() * 2 + 2; if ( e->size().width() > (myHint.width() + histeresis) ) { m_prevButton->show(); @@ -259,9 +259,9 @@ void MiniBar::slotEmitPrevPage() /** ProgressWidget **/ -ProgressWidget::ProgressWidget( MiniBar * parent ) - : TQWidget( parent, "progress", WNoAutoErase ), - m_miniBar( parent ), m_progressPercentage( -1 ) +ProgressWidget::ProgressWidget( MiniBar * tqparent ) + : TQWidget( tqparent, "progress", WNoAutoErase ), + m_miniBar( tqparent ), m_progressPercentage( -1 ) { setFixedHeight( 4 ); setMouseTracking( true ); @@ -308,36 +308,36 @@ void ProgressWidget::paintEvent( TQPaintEvent * e ) // paint rects and a separator line TQPainter p( this ); if ( cRect.isValid() ) - p.fillRect( cRect, palette().active().highlightedText() ); + p.fillRect( cRect, tqpalette().active().highlightedText() ); if ( fRect.isValid() ) - p.fillRect( fRect, palette().active().highlight() ); + p.fillRect( fRect, tqpalette().active().highlight() ); if ( l && l != w ) { - p.setPen( palette().active().highlight().dark( 120 ) ); + p.setPen( tqpalette().active().highlight().dark( 120 ) ); int delta = TQApplication::reverseLayout() ? w - l : l; p.drawLine( delta, 0, delta, h ); } // draw a frame-like outline - //p.setPen( palette().active().mid() ); + //p.setPen( tqpalette().active().mid() ); //p.drawRect( 0,0, w, h ); } /** PagesEdit **/ -PagesEdit::PagesEdit( MiniBar * parent ) - : TQLineEdit( parent ), m_miniBar( parent ), m_eatClick( false ) +PagesEdit::PagesEdit( MiniBar * tqparent ) + : TQLineEdit( tqparent ), m_miniBar( tqparent ), m_eatClick( false ) { // customize look setFrameShadow( TQFrame::Raised ); focusOutEvent( 0 ); // use an integer validator - m_validator = new TQIntValidator( 1, 1, this ); + m_validator = new TQIntValidator( 1, 1, TQT_TQOBJECT(this) ); setValidator( m_validator ); // customize text properties - setAlignment( Qt::AlignCenter ); + tqsetAlignment( TQt::AlignCenter ); setMaxLength( 4 ); } @@ -363,7 +363,7 @@ void PagesEdit::focusInEvent( TQFocusEvent * e ) m_eatClick = true; // change background color to the default 'edit' color setLineWidth( 2 ); - setPaletteBackgroundColor( Qt::white ); + setPaletteBackgroundColor( TQt::white ); // call default handler TQLineEdit::focusInEvent( e ); } @@ -372,7 +372,7 @@ void PagesEdit::focusOutEvent( TQFocusEvent * e ) { // change background color to a dark tone setLineWidth( 1 ); - setPaletteBackgroundColor( palette().active().background().light( 105 ) ); + setPaletteBackgroundColor( tqpalette().active().background().light( 105 ) ); // restore text TQLineEdit::setText( backString ); // call default handler @@ -398,8 +398,8 @@ void PagesEdit::wheelEvent( TQWheelEvent * e ) /** HoverButton **/ -HoverButton::HoverButton( TQWidget * parent ) - : TQPushButton( parent ) +HoverButton::HoverButton( TQWidget * tqparent ) + : TQPushButton( tqparent ) { setMouseTracking( true ); #if KDE_IS_VERSION(3,3,90) @@ -428,7 +428,7 @@ void HoverButton::paintEvent( TQPaintEvent * e ) else { TQPainter p( this ); - p.fillRect(e->rect(), parentWidget() ? parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor()); + p.fillRect(e->rect(), tqparentWidget() ? tqparentWidget()->tqpalette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor()); drawButtonLabel( &p ); } } diff --git a/kpdf/ui/minibar.h b/kpdf/ui/minibar.h index f532999c..99bc13aa 100644 --- a/kpdf/ui/minibar.h +++ b/kpdf/ui/minibar.h @@ -25,8 +25,9 @@ class ProgressWidget; class MiniBar : public TQFrame, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - MiniBar( TQWidget *parent, KPDFDocument * document ); + MiniBar( TQWidget *tqparent, KPDFDocument * document ); ~MiniBar(); // [INHERITED] from DocumentObserver diff --git a/kpdf/ui/pagepainter.cpp b/kpdf/ui/pagepainter.cpp index 899be054..96fb1edf 100644 --- a/kpdf/ui/pagepainter.cpp +++ b/kpdf/ui/pagepainter.cpp @@ -26,7 +26,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, TQPixmap * pixmap = 0; // if a pixmap is present for given id, use it - if ( page->m_pixmaps.contains( id ) ) + if ( page->m_pixmaps.tqcontains( id ) ) pixmap = page->m_pixmaps[ id ]; // else find the closest match using pixmaps of other IDs (great optim!) @@ -49,13 +49,13 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // if have no pixmap, draw blank page with gray cross and exit if ( !pixmap ) { - TQColor color = Qt::white; + TQColor color = TQt::white; if ( KpdfSettings::changeColors() ) { switch ( KpdfSettings::renderMode() ) { case KpdfSettings::EnumRenderMode::Inverted: - color = Qt::black; + color = TQt::black; break; case KpdfSettings::EnumRenderMode::Paper: color = KpdfSettings::paperColor(); @@ -70,7 +70,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // draw a cross (to that the pixmap as not yet been loaded) // helps a lot on pages that take much to render - destPainter->setPen( Qt::gray ); + destPainter->setPen( TQt::gray ); destPainter->drawLine( 0, 0, width-1, height-1 ); destPainter->drawLine( 0, height-1, width-1, 0 ); // idea here: draw a hourglass (or kpdf icon :-) on top-left corner @@ -122,7 +122,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, else { p->save(); - // TODO paint only the needed part (note: hope that Qt4 transforms are faster) + // TODO paint only the needed part (note: hope that TQt4 transforms are faster) p->scale( width / (double)pixmap->width(), height / (double)pixmap->height() ); p->drawPixmap( 0,0, *pixmap, 0,0, pixmap->width(), pixmap->height() ); p->restore(); @@ -139,7 +139,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, { case KpdfSettings::EnumRenderMode::Inverted: // Invert image pixels using TQImage internal function - backImage.invertPixels(false); + backImage.tqinvertPixels(false); break; case KpdfSettings::EnumRenderMode::Recolor: // Recolor image using KImageEffect::flatten with dither:0 @@ -152,7 +152,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, con = KpdfSettings::bWContrast(), thr = 255 - KpdfSettings::bWThreshold(); for( int i = 0; i < pixels; ++i ) { - val = qGray( data[i] ); + val = tqGray( data[i] ); if ( val > thr ) val = 128 + (127 * (val - thr)) / (255 - thr); else if ( val < thr ) @@ -165,7 +165,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, else if ( val < 0 ) val = 0; } - data[i] = qRgba( val, val, val, 255 ); + data[i] = tqRgba( val, val, val, 255 ); } break; } @@ -178,7 +178,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, for ( ; hIt != hEnd; ++hIt ) { HighlightRect * r = *hIt; - TQRect highlightRect = r->geometry( width, height ); + TQRect highlightRect = r->tqgeometry( width, height ); if ( highlightRect.isValid() && highlightRect.intersects( limits ) ) { // find out the rect to highlight on pixmap @@ -197,10 +197,10 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, for( int x = highlightRect.left(); x <= highlightRect.right(); ++x ) { val = data[ x + offset ]; - newR = (qRed(val) * rh) / 255; - newG = (qGreen(val) * gh) / 255; - newB = (qBlue(val) * bh) / 255; - data[ x + offset ] = qRgba( newR, newG, newB, 255 ); + newR = (tqRed(val) * rh) / 255; + newG = (tqGreen(val) * gh) / 255; + newB = (tqBlue(val) * bh) / 255; + data[ x + offset ] = tqRgba( newR, newG, newB, 255 ); } offset += backImage.width(); } @@ -213,7 +213,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // 3. visually enchance links and images if requested if ( enhanceLinks || enhanceImages ) { - TQColor normalColor = TQApplication::palette().active().highlight(); + TQColor normalColor = TQApplication::tqpalette().active().highlight(); TQColor lightColor = normalColor.light( 140 ); // enlarging limits for intersection is like growing the 'rectGeometry' below TQRect limitsEnlarged = limits; @@ -226,7 +226,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, if ( (enhanceLinks && rect->objectType() == ObjectRect::Link) || (enhanceImages && rect->objectType() == ObjectRect::Image) ) { - TQRect rectGeometry = rect->geometry( width, height ); + TQRect rectGeometry = rect->tqgeometry( width, height ); if ( rectGeometry.intersects( limitsEnlarged ) ) { // expand rect and draw inner border diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp index 3b0baecd..7172c6d3 100644 --- a/kpdf/ui/pageview.cpp +++ b/kpdf/ui/pageview.cpp @@ -68,7 +68,7 @@ public: TQValueVector< PageViewItem * > items; TQValueList< PageViewItem * > visibleItems; - // view layout (columns and continuous in Settings), zoom and mouse + // view tqlayout (columns and continuous in Settings), zoom and mouse PageView::ZoomMode zoomMode; float zoomFactor; int rotation; @@ -80,7 +80,7 @@ public: TQRect mouseSelectionRect; TQColor selectionRectColor; - // type ahead find + // type ahead tqfind bool typeAheadActive; TQString typeAheadString; TQTimer * findTimeoutTimer; @@ -119,7 +119,7 @@ public: -class PageViewTip : public QToolTip +class PageViewTip : public TQToolTip { public: PageViewTip( PageView * view ) @@ -146,8 +146,8 @@ void PageViewTip::maybeTip( const TQPoint &_p ) PageViewItem * pageItem = m_view->pickItemOnPoint( p.x(), p.y() ); if ( pageItem && m_view->d->mouseMode == PageView::MouseNormal ) { - double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); // if over a ObjectRect (of type Link) change cursor to hand const ObjectRect * object = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); @@ -158,8 +158,8 @@ void PageViewTip::maybeTip( const TQPoint &_p ) TQString strtip = link->linkTip(); if ( !strtip.isEmpty() ) { - TQRect linkRect = object->geometry( pageItem->width(), pageItem->height() ); - linkRect.moveBy( - m_view->contentsX() + pageItem->geometry().left(), - m_view->contentsY() + pageItem->geometry().top() ); + TQRect linkRect = object->tqgeometry( pageItem->width(), pageItem->height() ); + linkRect.moveBy( - m_view->contentsX() + pageItem->tqgeometry().left(), - m_view->contentsY() + pageItem->tqgeometry().top() ); tip( linkRect, strtip ); } } @@ -173,13 +173,13 @@ void PageViewTip::maybeTip( const TQPoint &_p ) * 160 - constructor and creating actions plus their connected slots (empty stuff) * 70 - DocumentObserver inherited methodes (important) * 550 - events: mouse, keyboard, drag/drop - * 170 - slotRelayoutPages: set contents of the scrollview on continuous/single modes + * 170 - slotRetqlayoutPages: set contents of the scrollview on continuous/single modes * 100 - zoom: zooming pages in different ways, keeping update the toolbar actions, etc.. * other misc functions: only slotRequestVisiblePixmaps and pickItemOnPoint noticeable, * and many insignificant stuff like this comment :-) */ -PageView::PageView( TQWidget *parent, KPDFDocument *document ) - : TQScrollView( parent, "KPDF::pageView", WStaticContents | WNoAutoErase ) +PageView::PageView( TQWidget *tqparent, KPDFDocument *document ) + : TQScrollView( tqparent, "KPDF::pageView", WStaticContents | WNoAutoErase ) { // create and initialize private storage structure d = new PageViewPrivate(); @@ -206,9 +206,9 @@ PageView::PageView( TQWidget *parent, KPDFDocument *document ) // widget setup: setup focus, accept drops and track mouse viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( StrongFocus ); - //viewport()->setPaletteBackgroundColor( Qt::white ); - viewport()->setBackgroundMode( Qt::NoBackground ); + viewport()->setFocusPolicy( TQ_StrongFocus ); + //viewport()->setPaletteBackgroundColor( TQt::white ); + viewport()->setBackgroundMode( TQt::NoBackground ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); @@ -245,16 +245,16 @@ PageView::~PageView() void PageView::setupActions( KActionCollection * ac ) { // Zoom actions ( higher scales takes lots of memory! ) - d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, this, TQT_SLOT( slotZoom() ), ac, "zoom_to" ); + d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotZoom() ), ac, "zoom_to" ); d->aZoom->setEditable( true ); #if KDE_IS_VERSION(3,4,89) d->aZoom->setMaxComboViewCount( 13 ); #endif updateZoomText(); - KStdAction::zoomIn( this, TQT_SLOT( slotZoomIn() ), ac, "zoom_in" ); + KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( slotZoomIn() ), ac, "zoom_in" ); - KStdAction::zoomOut( this, TQT_SLOT( slotZoomOut() ), ac, "zoom_out" ); + KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( slotZoomOut() ), ac, "zoom_out" ); d->aZoomFitWidth = new KToggleAction( i18n("Fit to Page &Width"), "view_fit_width", 0, ac, "zoom_fit_width" ); connect( d->aZoomFitWidth, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToWidthToggled( bool ) ) ); @@ -268,10 +268,10 @@ void PageView::setupActions( KActionCollection * ac ) // rotate actions KAction *action; action = new KAction( i18n("Rotate Right"), "rotate_cw", KShortcut( "Ctrl+Shift++" ), - this, TQT_SLOT( slotRotateRight() ), ac, "rotate_right" ); + TQT_TQOBJECT(this), TQT_SLOT( slotRotateRight() ), ac, "rotate_right" ); action = new KAction( i18n("Rotate Left"), "rotate_ccw", KShortcut( "Ctrl+Shift+-" ), - this, TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" ); + TQT_TQOBJECT(this), TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" ); // View-Layout actions d->aViewTwoPages = new KToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" ); @@ -283,25 +283,25 @@ void PageView::setupActions( KActionCollection * ac ) d->aViewContinuous->setChecked( KpdfSettings::viewContinuous() ); // Mouse-Mode actions - d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, this, TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); + d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); d->aMouseNormal->setExclusiveGroup( "MouseType" ); d->aMouseNormal->setChecked( true ); - KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, this, TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); + KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); mz->setExclusiveGroup( "MouseType" ); - d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, this, TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); + d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); d->aMouseSelect->setExclusiveGroup( "MouseType" ); -/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, this, TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); +/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); d->aMouseEdit->setExclusiveGroup("MouseType"); d->aMouseEdit->setEnabled( false ); // implement feature before removing this line*/ // Other actions - KAction * su = new KAction( i18n("Scroll Up"), 0, this, TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); + KAction * su = new KAction( i18n("Scroll Up"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); su->setShortcut( "Shift+Up" ); - KAction * sd = new KAction( i18n("Scroll Down"), 0, this, TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); + KAction * sd = new KAction( i18n("Scroll Down"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); sd->setShortcut( "Shift+Down" ); } @@ -337,18 +337,18 @@ void PageView::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool do d->items.clear(); d->visibleItems.clear(); - // create children widgets + // create tqchildren widgets TQValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end(); for ( ; setIt != setEnd; ++setIt ) d->items.push_back( new PageViewItem( *setIt ) ); if ( pageSet.count() > 0 ) - // TODO for Enrico: Check if doing always the slotRelayoutPages() is not + // TODO for Enrico: Check if doing always the slotRetqlayoutPages() is not // suboptimal in some cases, i'd say it is not but a recheck will not hurt - // Need slotRelayoutPages() here instead of d->dirtyLayout = true + // Need slotRetqlayoutPages() here instead of d->dirtyLayout = true // because opening a pdf from another pdf will not trigger a viewportchange - // so pages are never relayouted - TQTimer::singleShot(0, this, TQT_SLOT(slotRelayoutPages())); + // so pages are never retqlayouted + TQTimer::singleShot(0, this, TQT_SLOT(slotRetqlayoutPages())); else { // update the mouse cursor when closing because we may have close through a link and @@ -392,13 +392,13 @@ void PageView::notifyViewportChanged( bool smoothMove ) return; } - // relayout in "Single Pages" mode or if a relayout is pending + // retqlayout in "Single Pages" mode or if a retqlayout is pending d->blockPixmapsRequest = true; if ( !KpdfSettings::viewContinuous() || d->dirtyLayout ) - slotRelayoutPages(); + slotRetqlayoutPages(); - // restore viewport center or use default {x-center,v-top} alignment - const TQRect & r = item->geometry(); + // restore viewport center or use default {x-center,v-top} tqalignment + const TQRect & r = item->tqgeometry(); int newCenterX = r.left(), newCenterY = r.top(); if ( vp.rePos.enabled ) @@ -462,18 +462,18 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags ) if ( changedFlags & DocumentObserver::Bookmark ) return; - // iterate over visible items: if page(pageNumber) is one of them, repaint it + // iterate over visible items: if page(pageNumber) is one of them, tqrepaint it TQValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end(); for ( ; iIt != iEnd; ++iIt ) if ( (*iIt)->pageNumber() == pageNumber ) { // update item's rectangle plus the little outline - TQRect expandedRect = (*iIt)->geometry(); + TQRect expandedRect = (*iIt)->tqgeometry(); expandedRect.addCoords( -1, -1, 3, 3 ); updateContents( expandedRect ); // if we were "zoom-dragging" do not overwrite the "zoom-drag" cursor - if ( cursor().shape() != Qt::SizeVerCursor ) + if ( cursor().shape() != TQt::SizeVerCursor ) { // since the page has been regenerated below cursor, update it updateCursor( viewportToContents( mapFromGlobal( TQCursor::pos() ) ) ); @@ -532,10 +532,10 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) selectionRectInternal.addCoords( 1, 1, -1, -1 ); // color for blending TQColor selBlendColor = (selectionRect.width() > 8 || selectionRect.height() > 8) ? - d->selectionRectColor : Qt::red; + d->selectionRectColor : TQt::red; // subdivide region into rects - TQMemArray allRects = pe->region().rects(); + TQMemArray allRects = TQRegion(pe->region()).tqrects(); uint numRects = allRects.count(); // preprocess rects area to see if it worths or not using subdivision @@ -577,7 +577,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: pixmap manipulated areas // 3) Layer 2: paint (blend) transparent selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.contains( contentsRect ) ) + !selectionRectInternal.tqcontains( contentsRect ) ) { TQRect blendRect = selectionRectInternal.intersect( contentsRect ); // skip rectangles covered by the selection's border @@ -592,7 +592,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) TQImage blendedImage = blendedPixmap.convertToImage(); KImageEffect::blend( selBlendColor.dark(140), blendedImage, 0.2 ); // copy the blended pixmap back to its place - pixmapPainter.drawPixmap( blendRect.left(), blendRect.top(), blendedImage ); + pixmapPainter.tqdrawPixmap( blendRect.left(), blendRect.top(), blendedImage ); } // draw border (red if the selection is too small) pixmapPainter.setPen( selBlendColor ); @@ -601,7 +601,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 4) Layer 3: overlays if ( KpdfSettings::debugDrawBoundaries() ) { - pixmapPainter.setPen( Qt::blue ); + pixmapPainter.setPen( TQt::blue ); pixmapPainter.drawRect( contentsRect ); } @@ -616,15 +616,15 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: opaque manipulated ares (filled / contours) // 3) Layer 2: paint opaque selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.contains( contentsRect ) ) + !selectionRectInternal.tqcontains( contentsRect ) ) { - screenPainter.setPen( palette().active().highlight().dark(110) ); + screenPainter.setPen( tqpalette().active().highlight().dark(110) ); screenPainter.drawRect( selectionRect ); } // 4) Layer 3: overlays if ( KpdfSettings::debugDrawBoundaries() ) { - screenPainter.setPen( Qt::red ); + screenPainter.setPen( TQt::red ); screenPainter.drawRect( contentsRect ); } } @@ -637,7 +637,7 @@ void PageView::viewportResizeEvent( TQResizeEvent * ) if ( !d->delayResizeTimer ) { d->delayResizeTimer = new TQTimer( this ); - connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRelayoutPages() ) ); + connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRetqlayoutPages() ) ); } d->delayResizeTimer->start( 333, true ); } @@ -647,7 +647,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) e->accept(); // if performing a selection or dyn zooming, disable keys handling - if ( ( !d->mouseSelectionRect.isNull() && e->key() != Qt::Key_Escape ) || d->mouseMidStartY != -1 ) + if ( ( !d->mouseSelectionRect.isNull() && e->key() != TQt::Key_Escape ) || d->mouseMidStartY != -1 ) return; // handle 'find as you type' (based on khtml/khtmlview.cpp) @@ -660,9 +660,9 @@ void PageView::keyPressEvent( TQKeyEvent * e ) { d->typeAheadString = d->typeAheadString.left( d->typeAheadString.length() - 1 ); bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, true, false, - KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); + KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } @@ -682,7 +682,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) // because it activates the accel releaseKeyboard(); if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) ) - d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()), + d->messageWindow->display( i18n("Text found: \"%1\".").tqarg(d->typeAheadString.lower()), PageViewMessage::Find, 3000 ); d->findTimeoutTimer->start( 3000, true ); // it is needed to grab the keyboard becase people may have Space assigned to a @@ -784,7 +784,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) case Key_Right: horizontalScrollBar()->addLine(); break; - case Qt::Key_Escape: + case TQt::Key_Escape: selectionClear(); d->mousePressPos = TQPoint(); if ( d->aPrevAction ) @@ -840,19 +840,19 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) return; // if holding mouse mid button, perform zoom - if ( (e->state() & MidButton) && d->mouseMidStartY >= 0 ) + if ( (e->state() & Qt::MidButton) && d->mouseMidStartY >= 0 ) { int deltaY = d->mouseMidStartY - e->globalPos().y(); d->mouseMidStartY = e->globalPos().y(); d->zoomFactor *= ( 1.0 + ( (double)deltaY / 500.0 ) ); updateZoom( ZoomRefreshCurrent ); // uncomment following line to force a complete redraw - viewport()->repaint( false ); + viewport()->tqrepaint( false ); return; } - bool leftButton = e->state() & LeftButton, - rightButton = e->state() & RightButton; + bool leftButton = e->state() & Qt::LeftButton, + rightButton = e->state() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal: @@ -876,7 +876,7 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) { d->aPrevAction = d->aMouseNormal; d->aMouseSelect->activate(); - TQColor selColor = palette().active().highlight().light( 120 ); + TQColor selColor = tqpalette().active().highlight().light( 120 ); selectionStart( e->x() + deltaX, e->y() + deltaY, selColor, false ); selectionEndPoint( e->x(), e->y() ); break; @@ -920,7 +920,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) } // if pressing mid mouse button while not doing other things, begin 'comtinous zoom' mode - if ( e->button() & MidButton ) + if ( e->button() & Qt::MidButton ) { d->mouseMidStartY = e->globalPos().y(); setCursor( KCursor::sizeVerCursor() ); @@ -931,8 +931,8 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) d->mousePressPos = e->globalPos(); // handle mode dependant mouse press actions - bool leftButton = e->button() & LeftButton, - rightButton = e->button() & RightButton; + bool leftButton = e->button() & Qt::LeftButton, + rightButton = e->button() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal: // drag start / click / link following @@ -946,7 +946,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) case MouseZoom: // set first corner of the zoom rect if ( leftButton ) - selectionStart( e->x(), e->y(), palette().active().highlight(), false ); + selectionStart( e->x(), e->y(), tqpalette().active().highlight(), false ); else if ( rightButton ) updateZoom( ZoomOut ); break; @@ -954,7 +954,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) case MouseSelect: // set first corner of the selection rect if ( leftButton ) { - TQColor selColor = palette().active().highlight().light( 120 ); + TQColor selColor = tqpalette().active().highlight().light( 120 ); selectionStart( e->x(), e->y(), selColor, false ); } break; @@ -973,7 +973,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( d->items.isEmpty() ) { // ..except for right Clicks (emitted even it viewport is empty) - if ( e->button() == RightButton ) + if ( e->button() == Qt::RightButton ) emit rightClick( 0, e->globalPos() ); return; } @@ -983,7 +983,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; // handle mode indepent mid buttom zoom - bool midButton = e->button() & MidButton; + bool midButton = e->button() & Qt::MidButton; if ( midButton && d->mouseMidStartY > 0 ) { d->mouseMidStartY = -1; @@ -992,13 +992,13 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; } - bool leftButton = e->button() & LeftButton, - rightButton = e->button() & RightButton; + bool leftButton = e->button() & Qt::LeftButton, + rightButton = e->button() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal:{ // return the cursor to its normal state after dragging - if ( cursor().shape() == Qt::SizeAllCursor ) + if ( cursor().shape() == TQt::SizeAllCursor ) updateCursor( e->pos() ); PageViewItem * pageItem = pickItemOnPoint( e->x(), e->y() ); @@ -1006,8 +1006,8 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) // if the mouse has not moved since the press, that's a -click- if ( leftButton && pageItem && d->mousePressPos == e->globalPos()) { - double nX = (double)(e->x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(e->y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(e->x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(e->y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); const ObjectRect * linkRect, * imageRect; linkRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); if ( linkRect ) @@ -1052,7 +1052,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) } // find out new zoom ratio and normalized view center (relative to the contentsRect) - double zoom = QMIN( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); + double zoom = TQMIN( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); double nX = (double)(selRect.left() + selRect.right()) / (2.0 * (double)contentsWidth()); double nY = (double)(selRect.top() + selRect.bottom()) / (2.0 * (double)contentsHeight()); @@ -1105,16 +1105,16 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) for ( ; iIt != iEnd; ++iIt ) { PageViewItem * item = *iIt; - const TQRect & itemRect = item->geometry(); - if ( selectionRect.intersects( itemRect ) ) + const TQRect & tqitemRect = item->tqgeometry(); + if ( selectionRect.intersects( tqitemRect ) ) { // request the textpage if there isn't one const KPDFPage * kpdfPage = item->page(); if ( !kpdfPage->hasSearchPage() ) d->document->requestTextPage( kpdfPage->number() ); - // grab text in the rect that intersects itemRect - TQRect relativeRect = selectionRect.intersect( itemRect ); - relativeRect.moveBy( -itemRect.left(), -itemRect.top() ); + // grab text in the rect that intersects tqitemRect + TQRect relativeRect = selectionRect.intersect( tqitemRect ); + relativeRect.moveBy( -tqitemRect.left(), -tqitemRect.top() ); NormalizedRect normRect( relativeRect, item->width(), item->height() ); selectedText += kpdfPage->getText( normRect ); } @@ -1131,7 +1131,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( KpdfSettings::useKTTSD() ) menu.insertItem( SmallIcon("kttsd"), i18n( "Speak Text" ), 2 ); } - menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).arg( selectionRect.width() ).arg( selectionRect.height() ) ); + menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).tqarg( selectionRect.width() ).tqarg( selectionRect.height() ) ); menu.insertItem( SmallIcon("image"), i18n( "Copy to Clipboard" ), 3 ); menu.insertItem( SmallIcon("filesave"), i18n( "Save to File..." ), 4 ); int choice = menu.exec( e->globalPos() ); @@ -1147,16 +1147,16 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( choice == 3 ) { // [2] copy pixmap to clipboard - QClipboard *cb = TQApplication::clipboard(); - cb->setPixmap( copyPix, QClipboard::Clipboard ); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setPixmap( copyPix, TQClipboard::Clipboard ); if ( cb->supportsSelection() ) - cb->setPixmap( copyPix, QClipboard::Selection ); - d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).arg( copyPix.width() ).arg( copyPix.height() ) ); + cb->setPixmap( copyPix, TQClipboard::Selection ); + d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ) ); } else if ( choice == 4 ) { // [3] save pixmap to file - TQString fileName = KFileDialog::getSaveFileName( TQString::null, "image/png image/jpeg", this ); + TQString fileName = KFileDialog::getSaveFileName( TQString(), "image/png image/jpeg", this ); if ( fileName.isNull() ) d->messageWindow->display( i18n( "File not saved." ), PageViewMessage::Warning ); else @@ -1165,7 +1165,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( type.isNull() ) type = "PNG"; copyPix.save( fileName, type.latin1() ); - d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).arg( copyPix.width() ).arg( copyPix.height() ).arg( type ) ); + d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ).tqarg( type ) ); } } } @@ -1175,10 +1175,10 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( choice == 1 ) { // [1] copy text to clipboard - QClipboard *cb = TQApplication::clipboard(); - cb->setText( selectedText, QClipboard::Clipboard ); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setText( selectedText, TQClipboard::Clipboard ); if ( cb->supportsSelection() ) - cb->setText( selectedText, QClipboard::Selection ); + cb->setText( selectedText, TQClipboard::Selection ); } else if ( choice == 2 ) { @@ -1194,7 +1194,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) TQString error; if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error)) { - d->messageWindow->display( i18n("Starting KTTSD Failed: %1").arg(error) ); + d->messageWindow->display( i18n("Starting KTTSD Failed: %1").tqarg(error) ); KpdfSettings::setUseKTTSD(false); KpdfSettings::writeConfig(); } @@ -1221,7 +1221,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) } } - // clear widget selection and invalidate rect + // clear widget selection and tqinvalidate rect selectionClear(); // restore previous action if came from it using right button @@ -1323,39 +1323,39 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect ) for ( ; iIt != iEnd; ++iIt ) { // check if a piece of the page intersects the contents rect - if ( !(*iIt)->geometry().intersects( checkRect ) ) + if ( !(*iIt)->tqgeometry().intersects( checkRect ) ) continue; PageViewItem * item = *iIt; - TQRect pixmapGeometry = item->geometry(); + TQRect pixmapGeometry = item->tqgeometry(); // translate the painter so we draw top-left pixmap corner in 0,0 p->save(); p->translate( pixmapGeometry.left(), pixmapGeometry.top() ); - // item pixmap and outline geometry + // item pixmap and outline tqgeometry TQRect outlineGeometry = pixmapGeometry; outlineGeometry.addCoords( -1, -1, 3, 3 ); // draw the page outline (little black border and 2px shadow) - if ( !pixmapGeometry.contains( contentsRect ) ) + if ( !pixmapGeometry.tqcontains( contentsRect ) ) { int pixmapWidth = pixmapGeometry.width(), pixmapHeight = pixmapGeometry.height(); // draw simple outline - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( -1, -1, pixmapWidth + 2, pixmapHeight + 2 ); // draw bottom/right gradient int levels = 2; - int r = Qt::gray.red() / (levels + 2), - g = Qt::gray.green() / (levels + 2), - b = Qt::gray.blue() / (levels + 2); + int r = TQt::gray.red() / (levels + 2), + g = TQt::gray.green() / (levels + 2), + b = TQt::gray.blue() / (levels + 2); for ( int i = 0; i < levels; i++ ) { p->setPen( TQColor( r * (i+2), g * (i+2), b * (i+2) ) ); p->drawLine( i, i + pixmapHeight + 1, i + pixmapWidth + 1, i + pixmapHeight + 1 ); p->drawLine( i + pixmapWidth + 1, i, i + pixmapWidth + 1, i + pixmapHeight ); - p->setPen( Qt::gray ); + p->setPen( TQt::gray ); p->drawLine( -1, i + pixmapHeight + 1, i - 1, i + pixmapHeight + 1 ); p->drawLine( i + pixmapWidth + 1, -1, i + pixmapWidth + 1, i - 1 ); } @@ -1378,10 +1378,10 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect ) } // paint with background color the unpainted area - TQMemArray backRects = remainingArea.rects(); + TQMemArray backRects = remainingArea.tqrects(); uint backRectsNumber = backRects.count(); for ( uint jr = 0; jr < backRectsNumber; jr++ ) - p->fillRect( backRects[ jr ], Qt::gray ); + p->fillRect( backRects[ jr ], TQt::gray ); } void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight ) @@ -1407,7 +1407,7 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight { double scaleW = (double)colWidth / (double)width; double scaleH = (double)rowHeight / (double)height; - zoom = QMIN( scaleW, scaleH ); + zoom = TQMIN( scaleW, scaleH ); item->setWHZ( (int)(zoom * width), (int)(zoom * height), zoom ); d->zoomFactor = zoom; } @@ -1424,7 +1424,7 @@ PageViewItem * PageView::pickItemOnPoint( int x, int y ) for ( ; iIt != iEnd; ++iIt ) { PageViewItem * i = *iIt; - const TQRect & r = i->geometry(); + const TQRect & r = i->tqgeometry(); if ( x < r.right() && x > r.left() && y < r.bottom() ) { if ( y > r.top() ) @@ -1465,8 +1465,8 @@ void PageView::selectionEndPoint( int x, int y ) // clip selection to the viewport TQRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() ); - x = QMAX( QMIN( x, viewportRect.right() ), viewportRect.left() ); - y = QMAX( QMIN( y, viewportRect.bottom() ), viewportRect.top() ); + x = TQMAX( TQMIN( x, viewportRect.right() ), viewportRect.left() ); + y = TQMAX( TQMIN( y, viewportRect.bottom() ), viewportRect.top() ); // if selection changed update rect if ( d->mouseSelectionRect.right() != x || d->mouseSelectionRect.bottom() != y ) { @@ -1485,7 +1485,7 @@ void PageView::selectionEndPoint( int x, int y ) compoundRegion -= intersection; } // tassellate region with rects and enqueue paint events - TQMemArray rects = compoundRegion.rects(); + TQMemArray rects = compoundRegion.tqrects(); for ( uint i = 0; i < rects.count(); i++ ) updateContents( rects[i] ); } @@ -1513,7 +1513,7 @@ void PageView::updateZoom( ZoomMode newZoomMode ) { case ZoomFixed:{ //ZoomFixed case TQString z = d->aZoom->currentText(); - newFactor = KGlobal::locale()->readNumber( z.remove( z.find( '%' ), 1 ) ) / 100.0; + newFactor = KGlobal::locale()->readNumber( z.remove( z.tqfind( '%' ), 1 ) ) / 100.0; }break; case ZoomIn: newFactor += (newFactor > 0.99) ? ( newFactor > 1.99 ? 0.5 : 0.2 ) : 0.1; @@ -1544,13 +1544,13 @@ void PageView::updateZoom( ZoomMode newZoomMode ) if ( newZoomMode != d->zoomMode || (newZoomMode == ZoomFixed && newFactor != d->zoomFactor ) ) { - // rebuild layout and update the whole viewport + // rebuild tqlayout and update the whole viewport d->zoomMode = newZoomMode; d->zoomFactor = newFactor; // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -1572,7 +1572,7 @@ void PageView::updateZoomText() { // use current page zoom as zoomFactor if in ZoomFit/* mode if ( d->zoomMode != ZoomFixed && d->items.count() > 0 ) - d->zoomFactor = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]->zoomFactor(); + d->zoomFactor = d->items[ TQMAX( 0, (int)d->document->currentPage() ) ]->zoomFactor(); float newFactor = d->zoomFactor; d->aZoom->clear(); @@ -1599,7 +1599,7 @@ void PageView::updateZoomText() selIdx++; TQString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) ); localValue.remove( KGlobal::locale()->decimalSymbol() + double_oh ); - translated << TQString( "%1%" ).arg( localValue ); + translated << TQString( "%1%" ).tqarg( localValue ); } d->aZoom->setItems( translated ); @@ -1619,8 +1619,8 @@ void PageView::updateCursor( const TQPoint &p ) PageViewItem * pageItem = pickItemOnPoint( p.x(), p.y() ); if ( pageItem && d->mouseMode == MouseNormal ) { - double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); // if over a ObjectRect (of type Link) change cursor to hand d->mouseOnRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); @@ -1641,15 +1641,15 @@ void PageView::updateCursor( const TQPoint &p ) void PageView::doTypeAheadSearch() { bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, false, false, - KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); + KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } //BEGIN private SLOTS -void PageView::slotRelayoutPages() +void PageView::slotRetqlayoutPages() // called by: notifySetup, viewportResizeEvent, slotTwoPagesToggled, slotContinuousToggled, updateZoom { // set an empty container if we have no pages @@ -1677,7 +1677,7 @@ void PageView::slotRelayoutPages() fullHeight = 0; TQRect viewportRect( contentsX(), contentsY(), viewportWidth, viewportHeight ); - // set all items geometry and resize contents. handle 'continuous' and 'single' modes separately + // set all items tqgeometry and resize contents. handle 'continuous' and 'single' modes separately if ( KpdfSettings::viewContinuous() ) { // Here we find out column's width and row's height to compute a table @@ -1746,7 +1746,7 @@ void PageView::slotRelayoutPages() } else // viewContinuous is FALSE { - PageViewItem * currentItem = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]; + PageViewItem * currentItem = d->items[ TQMAX( 0, (int)d->document->currentPage() ) ]; // setup varialbles for a 1(row) x N(columns) grid int nCols = KpdfSettings::viewColumns(), @@ -1816,11 +1816,11 @@ void PageView::slotRelayoutPages() { int prevX = contentsX(), prevY = contentsY(); - const TQRect & geometry = d->items[ vp.pageNumber ]->geometry(); + const TQRect & tqgeometry = d->items[ vp.pageNumber ]->tqgeometry(); double nX = vp.rePos.enabled ? vp.rePos.normalizedX : 0.5, nY = vp.rePos.enabled ? vp.rePos.normalizedY : 0.0; - center( geometry.left() + ROUND( nX * (double)geometry.width() ), - geometry.top() + ROUND( nY * (double)geometry.height() ) ); + center( tqgeometry.left() + ROUND( nX * (double)tqgeometry.width() ), + tqgeometry.top() + ROUND( nY * (double)tqgeometry.height() ) ); // center() usually moves the viewport, that requests pixmaps too. // if that doesn't happen we have to request them by hand if ( prevX == contentsX() && prevY == contentsY() ) @@ -1867,7 +1867,7 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop ) PageViewItem * i = *iIt; // if the item doesn't intersect the viewport, skip it - if ( !viewportRect.intersects( i->geometry() ) ) + if ( !viewportRect.intersects( i->tqgeometry() ) ) continue; // add the item to the 'visible list' @@ -1885,18 +1885,18 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop ) // position between the item and the viewport center if ( isEvent ) { - const TQRect & geometry = i->geometry(); + const TQRect & tqgeometry = i->tqgeometry(); // compute distance between item center and viewport center - double distance = hypot( (geometry.left() + geometry.right()) / 2 - viewportCenterX, - (geometry.top() + geometry.bottom()) / 2 - viewportCenterY ); + double distance = hypot( (tqgeometry.left() + tqgeometry.right()) / 2 - viewportCenterX, + (tqgeometry.top() + tqgeometry.bottom()) / 2 - viewportCenterY ); if ( distance >= minDistance && nearPageNumber != -1 ) continue; nearPageNumber = i->pageNumber(); minDistance = distance; - if ( geometry.height() > 0 && geometry.width() > 0 ) + if ( tqgeometry.height() > 0 && tqgeometry.width() > 0 ) { - focusedX = ( viewportCenterX - (double)geometry.left() ) / (double)geometry.width(); - focusedY = ( viewportCenterY - (double)geometry.top() ) / (double)geometry.height(); + focusedX = ( viewportCenterX - (double)tqgeometry.left() ) / (double)tqgeometry.width(); + focusedY = ( viewportCenterY - (double)tqgeometry.top() ) / (double)tqgeometry.height(); } } } @@ -2070,7 +2070,7 @@ void PageView::slotRotateRight() // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -2094,7 +2094,7 @@ void PageView::slotRotateLeft() // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -2108,7 +2108,7 @@ void PageView::slotTwoPagesToggled( bool on ) KpdfSettings::setViewColumns( newColumns ); KpdfSettings::writeConfig(); if ( d->document->pages() > 0 ) - slotRelayoutPages(); + slotRetqlayoutPages(); } } @@ -2119,7 +2119,7 @@ void PageView::slotContinuousToggled( bool on ) KpdfSettings::setViewContinuous( on ); KpdfSettings::writeConfig(); if ( d->document->pages() > 0 ) - slotRelayoutPages(); + slotRetqlayoutPages(); } } diff --git a/kpdf/ui/pageview.h b/kpdf/ui/pageview.h index 3742e804..97114dcc 100644 --- a/kpdf/ui/pageview.h +++ b/kpdf/ui/pageview.h @@ -39,11 +39,12 @@ class PageViewTip; class PageView : public TQScrollView, public DocumentObserver { Q_OBJECT + TQ_OBJECT friend class PageViewTip; public: - PageView( TQWidget *parent, KPDFDocument *document ); + PageView( TQWidget *tqparent, KPDFDocument *document ); ~PageView(); // Zoom mode ( last 4 are internally used only! ) @@ -100,7 +101,7 @@ class PageView : public TQScrollView, public DocumentObserver void selectionStart( int x, int y, const TQColor & color, bool aboveAll = false ); void selectionEndPoint( int x, int y ); void selectionClear(); - // update internal zoom values and end in a slotRelayoutPages(); + // update internal zoom values and end in a slotRetqlayoutPages(); void updateZoom( ZoomMode newZm ); // update the text on the label using global zoom value or current page's one void updateZoomText(); @@ -114,7 +115,7 @@ class PageView : public TQScrollView, public DocumentObserver private slots: // activated either directly or via TQTimer on the viewportResizeEvent - void slotRelayoutPages(); + void slotRetqlayoutPages(); // activated either directly or via the contentsMoving(int,int) signal void slotRequestVisiblePixmaps( int left = -1, int top = -1 ); // activated by the viewport move timer diff --git a/kpdf/ui/pageviewutils.cpp b/kpdf/ui/pageviewutils.cpp index eaf5fc95..ed5c637a 100644 --- a/kpdf/ui/pageviewutils.cpp +++ b/kpdf/ui/pageviewutils.cpp @@ -21,13 +21,13 @@ #include "core/page.h" #include "conf/settings.h" -PageViewMessage::PageViewMessage( TQWidget * parent ) - : TQWidget( parent, "pageViewMessage" ), m_timer( 0 ) +PageViewMessage::PageViewMessage( TQWidget * tqparent ) + : TQWidget( tqparent, "pageViewMessage" ), m_timer( 0 ) { - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); setBackgroundMode( NoBackground ); setPaletteBackgroundColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Background)); - // if the layout is LtR, we can safely place it in the right position + // if the tqlayout is LtR, we can safely place it in the right position if ( !TQApplication::reverseLayout() ) move( 10, 10 ); resize( 0, 0 ); @@ -54,7 +54,7 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration iconXOffset = 0, shadowOffset = 1; - // load icon (if set) and update geometry + // load icon (if set) and update tqgeometry TQPixmap symbol; if ( icon != None ) { @@ -82,46 +82,46 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration textXOffset = 2 + symbol.width(); } width += 2 + symbol.width(); - height = QMAX( height, symbol.height() ); + height = TQMAX( height, symbol.height() ); } - TQRect geometry( 0, 0, width + 10, height + 8 ); + TQRect tqgeometry( 0, 0, width + 10, height + 8 ); - // resize pixmap, mask and widget - static TQBitmap mask; - mask.resize( geometry.size() ); - m_pixmap.resize( geometry.size() ); - resize( geometry.size() ); + // resize pixmap, tqmask and widget + static TQBitmap tqmask; + tqmask.resize( tqgeometry.size() ); + m_pixmap.resize( tqgeometry.size() ); + resize( tqgeometry.size() ); - // create and set transparency mask - TQPainter maskPainter( &mask); - mask.fill( Qt::black ); - maskPainter.setBrush( Qt::white ); - maskPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() ); - setMask( mask ); + // create and set transparency tqmask + TQPainter tqmaskPainter( &tqmask); + tqmask.fill( TQt::black ); + tqmaskPainter.setBrush( TQt::white ); + tqmaskPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); + setMask( tqmask ); // draw background TQPainter bufferPainter( &m_pixmap ); - bufferPainter.setPen( Qt::black ); + bufferPainter.setPen( TQt::black ); bufferPainter.setBrush( paletteBackgroundColor() ); - bufferPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() ); + bufferPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); // draw icon if present if ( !symbol.isNull() ) bufferPainter.drawPixmap( 5 + iconXOffset, 4, symbol, 0, 0, symbol.width(), symbol.height() ); // draw shadow and text - int yText = geometry.height() - height / 2; + int yText = tqgeometry.height() - height / 2; bufferPainter.setPen( paletteBackgroundColor().dark( 115 ) ); bufferPainter.drawText( 5 + textXOffset + shadowOffset, yText + 1, message ); bufferPainter.setPen( foregroundColor() ); bufferPainter.drawText( 5 + textXOffset, yText, message ); - // if the layout is RtL, we can move it to the right place only after we + // if the tqlayout is RtL, we can move it to the right place only after we // know how much size it will take if ( TQApplication::reverseLayout() ) - move( parentWidget()->width() - geometry.width() - 10, 10 ); + move( tqparentWidget()->width() - tqgeometry.width() - 10, 10 ); - // show widget and schedule a repaint + // show widget and schedule a tqrepaint show(); update(); @@ -168,19 +168,19 @@ int PageViewItem::pageNumber() const return m_page->number(); } -const TQRect& PageViewItem::geometry() const +const TQRect& PageViewItem::tqgeometry() const { - return m_geometry; + return m_tqgeometry; } int PageViewItem::width() const { - return m_geometry.width(); + return m_tqgeometry.width(); } int PageViewItem::height() const { - return m_geometry.height(); + return m_tqgeometry.height(); } double PageViewItem::zoomFactor() const @@ -190,18 +190,18 @@ double PageViewItem::zoomFactor() const void PageViewItem::setGeometry( int x, int y, int width, int height ) { - m_geometry.setRect( x, y, width, height ); + m_tqgeometry.setRect( x, y, width, height ); } void PageViewItem::setWHZ( int w, int h, double z ) { - m_geometry.setWidth( w ); - m_geometry.setHeight( h ); + m_tqgeometry.setWidth( w ); + m_tqgeometry.setHeight( h ); m_zoomFactor = z; } void PageViewItem::moveTo( int x, int y ) { - m_geometry.moveLeft( x ); - m_geometry.moveTop( y ); + m_tqgeometry.moveLeft( x ); + m_tqgeometry.moveTop( y ); } diff --git a/kpdf/ui/pageviewutils.h b/kpdf/ui/pageviewutils.h index d1e5cecf..0bd6bd32 100644 --- a/kpdf/ui/pageviewutils.h +++ b/kpdf/ui/pageviewutils.h @@ -23,7 +23,7 @@ class KPDFPage; /** * @short PageViewItem represents graphically a kpdfpage into the PageView. * - * It has methods for settings Item's geometry and other visual properties such + * It has methods for settings Item's tqgeometry and other visual properties such * as the individual zoom factor. */ class PageViewItem @@ -33,7 +33,7 @@ class PageViewItem const KPDFPage * page() const; int pageNumber() const; - const TQRect& geometry() const; + const TQRect& tqgeometry() const; int width() const; int height() const; double zoomFactor() const; @@ -45,17 +45,17 @@ class PageViewItem private: const KPDFPage * m_page; double m_zoomFactor; - TQRect m_geometry; + TQRect m_tqgeometry; }; /** * @short A widget that displays messages in the top-left corner. */ -class PageViewMessage : public QWidget +class PageViewMessage : public TQWidget { public: - PageViewMessage( TQWidget * parent ); + PageViewMessage( TQWidget * tqparent ); enum Icon { None, Info, Warning, Error, Find }; void display( const TQString & message, Icon icon = Info, int durationMs = 4000 ); diff --git a/kpdf/ui/presentationwidget.cpp b/kpdf/ui/presentationwidget.cpp index 450f25df..6767db2c 100644 --- a/kpdf/ui/presentationwidget.cpp +++ b/kpdf/ui/presentationwidget.cpp @@ -43,25 +43,25 @@ #define ENABLE_PROGRESS_OVERLAY -// a frame contains a pointer to the page object, its geometry and the +// a frame contains a pointer to the page object, its tqgeometry and the // transition effect to the next frame struct PresentationFrame { const KPDFPage * page; - TQRect geometry; + TQRect tqgeometry; }; -PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc ) - : TQDialog( parent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder), +PresentationWidget::PresentationWidget( TQWidget * tqparent, KPDFDocument * doc ) + : TQDialog( tqparent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder), m_pressedLink( 0 ), m_handCursor( false ), m_document( doc ), m_frameIndex( -1 ) { - // set look and geometry - setBackgroundMode( Qt::NoBackground ); + // set look and tqgeometry + setBackgroundMode( TQt::NoBackground ); m_width = -1; - m_accel = new KAccel( this, this, "presentationmode-accel" ); + m_accel = new KAccel( this, TQT_TQOBJECT(this), "presentationmode-accel" ); // show widget and take control showFullScreen(); @@ -100,11 +100,11 @@ PresentationWidget::~PresentationWidget() void PresentationWidget::setupActions( KActionCollection * ac ) { - m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), this, TQT_SLOT( slotPrevPage() ), false, true ); - m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), this, TQT_SLOT( slotNextPage() ), false, true ); - m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), this, TQT_SLOT( slotFirstPage() ), false, true ); - m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), this, TQT_SLOT( slotLastPage() ), false, true ); - m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), this, TQT_SLOT( close() ), false, true ); + m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ), false, true ); + m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ), false, true ); + m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotFirstPage() ), false, true ); + m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotLastPage() ), false, true ); + m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( close() ), false, true ); } void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool /*documentChanged*/ ) @@ -124,7 +124,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe { PresentationFrame * frame = new PresentationFrame(); frame->page = *setIt; - // calculate frame geometry keeping constant aspect ratio + // calculate frame tqgeometry keeping constant aspect ratio float pageRatio = frame->page->ratio(); int pageWidth = m_width, pageHeight = m_height; @@ -132,7 +132,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe pageWidth = (int)( (float)pageHeight / pageRatio ); else pageHeight = (int)( (float)pageWidth * pageRatio ); - frame->geometry.setRect( (m_width - pageWidth) / 2, + frame->tqgeometry.setRect( (m_width - pageWidth) / 2, (m_height - pageHeight) / 2, pageWidth, pageHeight ); // add the frame to the vector @@ -145,11 +145,11 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe if ( info ) { if ( !info->get( "title" ).isNull() ) - m_metaStrings += i18n( "Title: %1" ).arg( info->get( "title" ) ); + m_metaStrings += i18n( "Title: %1" ).tqarg( info->get( "title" ) ); if ( !info->get( "author" ).isNull() ) - m_metaStrings += i18n( "Author: %1" ).arg( info->get( "author" ) ); + m_metaStrings += i18n( "Author: %1" ).tqarg( info->get( "author" ) ); } - m_metaStrings += i18n( "Pages: %1" ).arg( m_document->pages() ); + m_metaStrings += i18n( "Pages: %1" ).tqarg( m_document->pages() ); m_metaStrings += i18n( "Click to begin" ); } @@ -242,7 +242,7 @@ void PresentationWidget::mousePressEvent( TQMouseEvent * e ) return; // handle clicking on top-right overlay - if ( m_overlayGeometry.contains( e->pos() ) ) + if ( m_overlayGeometry.tqcontains( e->pos() ) ) { overlayClick( e->pos() ); return; @@ -287,10 +287,10 @@ void PresentationWidget::mouseMoveEvent( TQMouseEvent * e ) else { // show the bar if reaching top 2 pixels - if ( e->y() <= (geometry().top() + 1) ) + if ( e->y() <= (tqgeometry().top() + 1) ) m_topBar->show(); - // handle "dragging the wheel" if clicking on its geometry - else if ( e->state() == Qt::LeftButton && m_overlayGeometry.contains( e->pos() ) ) + // handle "dragging the wheel" if clicking on its tqgeometry + else if ( e->state() == Qt::LeftButton && m_overlayGeometry.tqcontains( e->pos() ) ) overlayClick( e->pos() ); } } @@ -307,16 +307,16 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) m_topBar = new KToolBar( this, "presentationBar" ); m_topBar->setIconSize( 32 ); m_topBar->setMovingEnabled( false ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotPrevPage() ) ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNextPage() ) ); - m_topBar->insertButton( "exit", 1, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ) ); + m_topBar->insertButton( "exit", 1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( close() ) ); m_topBar->setGeometry( 0, 0, m_width, 32 + 10 ); m_topBar->alignItemRight( 1 ); m_topBar->hide(); // change topbar background color - TQPalette p = m_topBar->palette(); - p.setColor( TQPalette::Active, TQColorGroup::Button, Qt::gray ); - p.setColor( TQPalette::Active, TQColorGroup::Background, Qt::darkGray ); + TQPalette p = m_topBar->tqpalette(); + p.setColor( TQPalette::Active, TQColorGroup::Button, TQt::gray ); + p.setColor( TQPalette::Active, TQColorGroup::Background, TQt::darkGray ); m_topBar->setPalette( p ); // register this observer in document. events will come immediately @@ -326,16 +326,16 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) if ( KpdfSettings::slidesShowSummary() ) generatePage(); - KMessageBox::information(this, i18n("There are two ways of exiting presentation mode, you can press either ESC key or click with the quit button that appears when placing the mouse in the top-right corner. Of course you can cycle windows (Alt+TAB by default)"), TQString::null, "presentationInfo"); + KMessageBox::information(this, i18n("There are two ways of exiting presentation mode, you can press either ESC key or click with the quit button that appears when placing the mouse in the top-right corner. Of course you can cycle windows (Alt+TAB by default)"), TQString(), "presentationInfo"); } // check painting rect consistancy - TQRect r = pe->rect().intersect( geometry() ); + TQRect r = pe->rect().intersect( tqgeometry() ); if ( r.isNull() || m_lastRenderedPixmap.isNull() ) return; // blit the pixmap to the screen - TQMemArray allRects = pe->region().rects(); + TQMemArray allRects = TQRegion(pe->region()).tqrects(); uint numRects = allRects.count(); for ( uint i = 0; i < numRects; i++ ) { @@ -370,18 +370,18 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) // -const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) const +const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * tqgeometry ) const { // no links on invalid pages - if ( geometry && !geometry->isNull() ) - geometry->setRect( 0, 0, -1, -1 ); + if ( tqgeometry && !tqgeometry->isNull() ) + tqgeometry->setRect( 0, 0, -1, -1 ); if ( m_frameIndex < 0 || m_frameIndex >= (int)m_frames.size() ) return 0; - // get frame, page and geometry + // get frame, page and tqgeometry const PresentationFrame * frame = m_frames[ m_frameIndex ]; const KPDFPage * page = frame->page; - const TQRect & frameGeometry = frame->geometry; + const TQRect & frameGeometry = frame->tqgeometry; // compute normalized x and y double nx = (double)(x - frameGeometry.left()) / (double)frameGeometry.width(); @@ -396,11 +396,11 @@ const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) if ( !object ) return 0; - // compute link geometry if destination rect present - if ( geometry ) + // compute link tqgeometry if destination rect present + if ( tqgeometry ) { - *geometry = object->geometry( frameGeometry.width(), frameGeometry.height() ); - geometry->moveBy( frameGeometry.left(), frameGeometry.top() ); + *tqgeometry = object->tqgeometry( frameGeometry.width(), frameGeometry.height() ); + tqgeometry->moveBy( frameGeometry.left(), frameGeometry.top() ); } // return the link pointer @@ -416,12 +416,12 @@ void PresentationWidget::testCursorOnLink( int x, int y ) // only react on changes (in/out from a link) if ( (link && !m_handCursor) || (!link && m_handCursor) ) { - // change cursor shape + // change cursor tqshape m_handCursor = link != 0; setCursor( m_handCursor ? KCursor::handCursor() : KCursor::arrowCursor()); // set tooltip over link's rect - TQString tip = link ? link->linkTip() : TQString::null; + TQString tip = link ? link->linkTip() : TQString(); if ( m_handCursor && !tip.isEmpty() ) TQToolTip::add( this, linkRect, tip ); } @@ -451,8 +451,8 @@ void PresentationWidget::changePage( int newPage ) // check if pixmap exists or else request it m_frameIndex = newPage; PresentationFrame * frame = m_frames[ m_frameIndex ]; - int pixW = frame->geometry.width(); - int pixH = frame->geometry.height(); + int pixW = frame->tqgeometry.width(); + int pixH = frame->tqgeometry.height(); // if pixmap not inside the KPDFPage we request it and wait for // notifyPixmapChanged call or else we can proceed to pixmap generation @@ -470,16 +470,16 @@ void PresentationWidget::changePage( int newPage ) if (newPage + 1 < (int)m_document->pages()) { PresentationFrame *nextFrame = m_frames[ newPage + 1 ]; - pixW = nextFrame->geometry.width(); - pixH = nextFrame->geometry.height(); + pixW = nextFrame->tqgeometry.width(); + pixH = nextFrame->tqgeometry.height(); if ( !nextFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage + 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); } if (newPage - 1 >= 0) { PresentationFrame *prevFrame = m_frames[ newPage - 1 ]; - pixW = prevFrame->geometry.width(); - pixH = prevFrame->geometry.height(); + pixW = prevFrame->tqgeometry.width(); + pixH = prevFrame->tqgeometry.height(); if ( !prevFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage - 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); } @@ -542,7 +542,7 @@ void PresentationWidget::generateIntroPage( TQPainter & p ) // use a vertical gray gradient background int blend1 = m_height / 10, blend2 = 9 * m_height / 10; - int baseTint = Qt::gray.red(); + int baseTint = TQt::gray.red(); for ( int i = 0; i < m_height; i++ ) { int k = baseTint; @@ -580,7 +580,7 @@ void PresentationWidget::generateIntroPage( TQPainter & p ) p.setFont( f ); // text shadow - p.setPen( Qt::darkGray ); + p.setPen( TQt::darkGray ); p.drawText( 2, m_height / 4 + strHeight * i + 2, m_width, strHeight, AlignHCenter | AlignVCenter, m_metaStrings[i] ); // text body @@ -595,7 +595,7 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) PresentationFrame * frame = m_frames[ pageNum ]; // translate painter and contents rect - TQRect geom( frame->geometry ); + TQRect geom( frame->tqgeometry ); p.translate( geom.left(), geom.top() ); geom.moveBy( -geom.left(), -geom.top() ); @@ -605,11 +605,11 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) &p, geom, geom.width(), geom.height() ); // restore painter - p.translate( -frame->geometry.left(), -frame->geometry.top() ); + p.translate( -frame->tqgeometry.left(), -frame->tqgeometry.top() ); // fill unpainted areas with background color TQRegion unpainted( TQRect( 0, 0, m_width, m_height ) ); - TQMemArray rects = unpainted.subtract( frame->geometry ).rects(); + TQMemArray rects = TQRegion(unpainted.subtract( frame->tqgeometry )).tqrects(); for ( uint i = 0; i < rects.count(); i++ ) { const TQRect & r = rects[i]; @@ -617,12 +617,12 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) } } -// from Arthur - Qt4 - (is defined elsewhere as 'qt_div_255' to not break final compilation) +// from Arthur - TQt4 - (is defined elsewhere as 'qt_div_255' to not break final compilation) inline int qt_div255(int x) { return (x + (x>>8) + 0x80) >> 8; } void PresentationWidget::generateOverlay() { #ifdef ENABLE_PROGRESS_OVERLAY - // calculate overlay geometry and resize pixmap if needed + // calculate overlay tqgeometry and resize pixmap if needed int side = m_width / 16; m_overlayGeometry.setRect( m_width - side - 4, 4, side, side ); if ( m_lastRenderedOverlay.width() != side ) @@ -633,7 +633,7 @@ void PresentationWidget::generateOverlay() // painter on the double sized pixmap. side *= 2; TQPixmap doublePixmap( side, side ); - doublePixmap.fill( Qt::black ); + doublePixmap.fill( TQt::black ); TQPainter pixmapPainter( &doublePixmap ); // draw PIE SLICES in blue levels (the levels will then be the alpha component) @@ -642,10 +642,10 @@ void PresentationWidget::generateOverlay() { // draw continuous slices int degrees = (int)( 360 * (float)(m_frameIndex + 1) / (float)pages ); pixmapPainter.setPen( 0x05 ); - pixmapPainter.setBrush( 0x40 ); + pixmapPainter.setBrush( TQBrush(0x40) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, 90*16, (360-degrees)*16 ); pixmapPainter.setPen( 0x40 ); - pixmapPainter.setBrush( 0xF0 ); + pixmapPainter.setBrush( TQBrush(0xF0) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, 90*16, -degrees*16 ); } else @@ -655,15 +655,15 @@ void PresentationWidget::generateOverlay() { float newCoord = -90 + 360 * (float)(i + 1) / (float)pages; pixmapPainter.setPen( i <= m_frameIndex ? 0x40 : 0x05 ); - pixmapPainter.setBrush( i <= m_frameIndex ? 0xF0 : 0x40 ); + pixmapPainter.setBrush( TQBrush(i <= m_frameIndex ? 0xF0 : 0x40) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, (int)( -16*(oldCoord + 1) ), (int)( -16*(newCoord - (oldCoord + 2)) ) ); oldCoord = newCoord; } } int circleOut = side / 4; - pixmapPainter.setPen( Qt::black ); - pixmapPainter.setBrush( Qt::black ); + pixmapPainter.setPen( TQt::black ); + pixmapPainter.setBrush( TQBrush(TQt::black) ); pixmapPainter.drawEllipse( circleOut, circleOut, side - 2*circleOut, side - 2*circleOut ); // draw TEXT using maximum opacity @@ -672,7 +672,7 @@ void PresentationWidget::generateOverlay() pixmapPainter.setFont( f ); pixmapPainter.setPen( 0xFF ); // use a little offset to prettify output - pixmapPainter.drawText( 2, 2, side, side, Qt::AlignCenter, TQString::number( m_frameIndex + 1 ) ); + pixmapPainter.drawText( 2, 2, side, side, TQt::AlignCenter, TQString::number( m_frameIndex + 1 ) ); // end drawing pixmap and halve image pixmapPainter.end(); @@ -680,19 +680,19 @@ void PresentationWidget::generateOverlay() image.setAlphaBuffer( true ); // draw circular shadow using the same technique - doublePixmap.fill( Qt::black ); + doublePixmap.fill( TQt::black ); pixmapPainter.begin( &doublePixmap ); pixmapPainter.setPen( 0x40 ); - pixmapPainter.setBrush( 0x80 ); + pixmapPainter.setBrush( TQBrush(0x80) ); pixmapPainter.drawEllipse( 0, 0, side, side ); pixmapPainter.end(); TQImage shadow( doublePixmap.convertToImage().smoothScale( side / 2, side / 2 ) ); // generate a 2 colors pixmap using mixing shadow (made with highlight color) // and image (made with highlightedText color) - TQColor color = palette().active().highlightedText(); + TQColor color = tqpalette().active().highlightedText(); int red = color.red(), green = color.green(), blue = color.blue(); - color = palette().active().highlight(); + color = tqpalette().active().highlight(); int sRed = color.red(), sGreen = color.green(), sBlue = color.blue(); // pointers unsigned int * data = (unsigned int *)image.bits(), @@ -712,7 +712,7 @@ void PresentationWidget::generateOverlay() c1 = srcAlpha; c2 = shadowAlpha; // fuse color components and alpha value of image over shadow - data[i] = qRgba( + data[i] = tqRgba( cR = qt_div255( srcAlpha * red + (255 - srcAlpha) * sRed ), cG = qt_div255( srcAlpha * green + (255 - srcAlpha) * sGreen ), cB = qt_div255( srcAlpha * blue + (255 - srcAlpha) * sBlue ), @@ -720,12 +720,12 @@ void PresentationWidget::generateOverlay() ); } else - data[i] = qRgba( cR, cG, cB, cA ); + data[i] = tqRgba( cR, cG, cB, cA ); } m_lastRenderedOverlay.convertFromImage( image ); // start the autohide timer - repaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line + tqrepaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line //update( m_overlayGeometry ); m_overlayHideTimer->start( 2500, true ); #endif @@ -837,14 +837,14 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::BlindsHorizontal: { KPDFPageTransition transition( KPDFPageTransition::Blinds ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); return transition; break; } case KpdfSettings::EnumSlidesTransition::BlindsVertical: { KPDFPageTransition transition( KPDFPageTransition::Blinds ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); return transition; break; } @@ -896,7 +896,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitHorizontalIn: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); transition.setDirection( KPDFPageTransition::Inward ); return transition; break; @@ -904,7 +904,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitHorizontalOut: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); transition.setDirection( KPDFPageTransition::Outward ); return transition; break; @@ -912,7 +912,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitVerticalIn: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); transition.setDirection( KPDFPageTransition::Inward ); return transition; break; @@ -920,7 +920,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitVerticalOut: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); transition.setDirection( KPDFPageTransition::Outward ); return transition; break; @@ -963,7 +963,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const /** ONLY the TRANSITIONS GENERATION function from here on **/ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) { - // if it's just a 'replace' transition, repaint the screen + // if it's just a 'tqreplace' transition, tqrepaint the screen if ( transition->type() == KPDFPageTransition::Replace ) { update(); @@ -971,7 +971,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) } const bool isInward = transition->direction() == KPDFPageTransition::Inward; - const bool isHorizontal = transition->alignment() == KPDFPageTransition::Horizontal; + const bool isHorizontal = transition->tqalignment() == KPDFPageTransition::Horizontal; const float totalTime = transition->duration(); m_transitionRects.clear(); @@ -1175,7 +1175,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) m_transitionDelay = (int)( (totalTime * 1000) / steps ); } break; - // dissolve: replace 'random' rects + // dissolve: tqreplace 'random' rects case KPDFPageTransition::Dissolve: { const int gridXsteps = 50; @@ -1183,7 +1183,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) const int steps = gridXsteps * gridYsteps; int oldX = 0; int oldY = 0; - // create a grid of gridXstep by gridYstep QRects + // create a grid of gridXstep by gridYstep TQRects for ( int y = 0; y < gridYsteps; y++ ) { int newY = (int)( m_height * ((float)(y+1) / (float)gridYsteps) ); diff --git a/kpdf/ui/presentationwidget.h b/kpdf/ui/presentationwidget.h index 00ff5b35..00ae2bfb 100644 --- a/kpdf/ui/presentationwidget.h +++ b/kpdf/ui/presentationwidget.h @@ -35,8 +35,9 @@ class PresentationFrame; class PresentationWidget : public TQDialog, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - PresentationWidget( TQWidget * parent, KPDFDocument * doc ); + PresentationWidget( TQWidget * tqparent, KPDFDocument * doc ); ~PresentationWidget(); void setupActions( KActionCollection * ac ); @@ -59,7 +60,7 @@ class PresentationWidget : public TQDialog, public DocumentObserver void paintEvent( TQPaintEvent * e ); private: - const KPDFLink * getLink( int x, int y, TQRect * geometry = 0 ) const; + const KPDFLink * getLink( int x, int y, TQRect * tqgeometry = 0 ) const; void testCursorOnLink( int x, int y ); void overlayClick( const TQPoint & position ); void changePage( int newPage ); diff --git a/kpdf/ui/propertiesdialog.cpp b/kpdf/ui/propertiesdialog.cpp index df03422e..02743ccb 100644 --- a/kpdf/ui/propertiesdialog.cpp +++ b/kpdf/ui/propertiesdialog.cpp @@ -19,23 +19,23 @@ #include "propertiesdialog.h" #include "core/document.h" -PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) - : KDialogBase( Tabbed, i18n( "Unknown File" ), Ok, Ok, parent, 0, true, true ) +PropertiesDialog::PropertiesDialog(TQWidget *tqparent, KPDFDocument *doc) + : KDialogBase( Tabbed, i18n( "Unknown File" ), Ok, Ok, tqparent, 0, true, true ) { // Properties TQFrame *page = addPage(i18n("Properties")); - TQGridLayout *layout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); + TQGridLayout *tqlayout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); // get document info, if not present display blank data and a warning const DocumentInfo * info = doc->documentInfo(); if ( !info ) { - layout->addWidget( new TQLabel( i18n( "No document opened." ), page ), 0, 0 ); + tqlayout->addWidget( new TQLabel( i18n( "No document opened." ), page ), 0, 0 ); return; } // mime name based on mimetype id TQString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper(); - setCaption( i18n("%1 Properties").arg( mimeName ) ); + setCaption( i18n("%1 Properties").tqarg( mimeName ) ); TQDomElement docElement = info->documentElement(); @@ -49,15 +49,15 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) if ( titleString.isEmpty() || valueString.isEmpty() ) continue; - // create labels and layout them - TQLabel *key = new TQLabel( i18n( "%1:" ).arg( titleString ), page ); + // create labels and tqlayout them + TQLabel *key = new TQLabel( i18n( "%1:" ).tqarg( titleString ), page ); TQLabel *value = new KSqueezedTextLabel( valueString, page ); - layout->addWidget( key, row, 0, AlignRight ); - layout->addWidget( value, row, 1 ); + tqlayout->addWidget( key, row, 0, AlignRight ); + tqlayout->addWidget( value, row, 1 ); row++; // refine maximum width of 'value' labels - valMaxWidth = QMAX( valMaxWidth, fontMetrics().width( valueString ) ); + valMaxWidth = TQMAX( valMaxWidth, fontMetrics().width( valueString ) ); } // add the number of pages if the generator hasn't done it already @@ -66,8 +66,8 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) TQLabel *key = new TQLabel( i18n( "Pages:" ), page ); TQLabel *value = new TQLabel( TQString::number( doc->pages() ), page ); - layout->addWidget( key, row, 0 ); - layout->addWidget( value, row, 1 ); + tqlayout->addWidget( key, row, 0 ); + tqlayout->addWidget( value, row, 1 ); } // Fonts @@ -82,13 +82,13 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) } // current width: left column + right column + dialog borders - int width = layout->minimumSize().width() + valMaxWidth + marginHint() + spacingHint() + marginHint() + 30; + int width = tqlayout->tqminimumSize().width() + valMaxWidth + marginHint() + spacingHint() + marginHint() + 30; if (page2Layout) { - width = QMAX( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 ); + width = TQMAX( width, page2Layout->tqsizeHint().width() + marginHint() + spacingHint() + 31 ); } // stay inside the 2/3 of the screen width TQRect screenContainer = KGlobalSettings::desktopGeometry( this ); - width = QMIN( width, 2*screenContainer.width()/3 ); + width = TQMIN( width, 2*screenContainer.width()/3 ); resize(width, 1); } diff --git a/kpdf/ui/propertiesdialog.h b/kpdf/ui/propertiesdialog.h index d5e3229a..f5541e34 100644 --- a/kpdf/ui/propertiesdialog.h +++ b/kpdf/ui/propertiesdialog.h @@ -17,7 +17,7 @@ class KPDFDocument; class PropertiesDialog : public KDialogBase { public: - PropertiesDialog( TQWidget *parent, KPDFDocument *doc ); + PropertiesDialog( TQWidget *tqparent, KPDFDocument *doc ); }; #endif diff --git a/kpdf/ui/searchwidget.cpp b/kpdf/ui/searchwidget.cpp index 36b8dd19..116df031 100644 --- a/kpdf/ui/searchwidget.cpp +++ b/kpdf/ui/searchwidget.cpp @@ -28,8 +28,8 @@ #define LEDIT_ID 2 #define FIND_ID 3 -SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) - : KToolBar( parent, "iSearchBar" ), m_document( document ), +SearchWidget::SearchWidget( TQWidget * tqparent, KPDFDocument * document ) + : KToolBar( tqparent, "iSearchBar" ), m_document( document ), m_searchType( 0 ), m_caseSensitive( false ) { // change toolbar appearance @@ -44,14 +44,14 @@ SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) this, TQT_SLOT( startSearch() ) ); // 1. text line - insertLined( TQString::null, LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ), - this, TQT_SLOT( slotTextChanged(const TQString &) ), true, + insertLined( TQString(), LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ), + TQT_TQOBJECT(this), TQT_SLOT( slotTextChanged(const TQString &) ), true, i18n( "Enter at least 3 letters to filter pages" ), 0/*size*/, 1 ); // 2. clear button (uses a lineEdit slot, so it must be created after) insertButton( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", CLEAR_ID, TQT_SIGNAL( clicked() ), - getLined( LEDIT_ID ), TQT_SLOT( clear() ), true, + TQT_TQOBJECT(getLined( LEDIT_ID )), TQT_SLOT( clear() ), true, i18n( "Clear filter" ), 0/*index*/ ); // 3.1. create the popup menu for changing filtering features @@ -79,10 +79,10 @@ void SearchWidget::clearText() void SearchWidget::slotTextChanged( const TQString & text ) { // if 0 0 && text.length() < 3 ? Qt::darkRed : palette().active().text(); + TQColor color = text.length() > 0 && text.length() < 3 ? TQt::darkRed : tqpalette().active().text(); KLineEdit * lineEdit = getLined( LEDIT_ID ); lineEdit->setPaletteForegroundColor( color ); - lineEdit->setPaletteBackgroundColor( palette().active().base() ); + lineEdit->setPaletteBackgroundColor( tqpalette().active().base() ); m_inputDelayTimer->stop(); m_inputDelayTimer->start(333, true); } @@ -119,7 +119,7 @@ void SearchWidget::startSearch() ( (m_searchType > 1) ? KPDFDocument::GoogleAny : KPDFDocument::GoogleAll ); ok = m_document->searchText( SW_SEARCH_ID, text, true, m_caseSensitive, - type, false, qRgb( 0, 183, 255 ) ); + type, false, tqRgb( 0, 183, 255 ) ); } else m_document->resetSearch( SW_SEARCH_ID ); @@ -127,8 +127,8 @@ void SearchWidget::startSearch() if ( !ok ) { KLineEdit * lineEdit = getLined( LEDIT_ID ); - lineEdit->setPaletteForegroundColor( Qt::white ); - lineEdit->setPaletteBackgroundColor( Qt::red ); + lineEdit->setPaletteForegroundColor( TQt::white ); + lineEdit->setPaletteBackgroundColor( TQt::red ); } } diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h index 33fb1459..45ecae99 100644 --- a/kpdf/ui/searchwidget.h +++ b/kpdf/ui/searchwidget.h @@ -20,7 +20,7 @@ class m_inputDelayTimer; #define SW_SEARCH_ID 3 /** - * @short A widget for find-as-you-type search. Outputs to the Document. + * @short A widget for tqfind-as-you-type search. Outputs to the Document. * * This widget accepts keyboard input and performs a call to findTextAll(..) * in the KPDFDocument class when there are 3 or more chars to search for. @@ -30,8 +30,9 @@ class m_inputDelayTimer; class SearchWidget : public KToolBar { Q_OBJECT + TQ_OBJECT public: - SearchWidget( TQWidget *parent, KPDFDocument *document ); + SearchWidget( TQWidget *tqparent, KPDFDocument *document ); void clearText(); private: diff --git a/kpdf/ui/thumbnaillist.cpp b/kpdf/ui/thumbnaillist.cpp index 49d22ee3..8c6ab951 100644 --- a/kpdf/ui/thumbnaillist.cpp +++ b/kpdf/ui/thumbnaillist.cpp @@ -27,10 +27,10 @@ #include "conf/settings.h" // ThumbnailWidget represents a single thumbnail in the ThumbnailList -class ThumbnailWidget : public QWidget +class ThumbnailWidget : public TQWidget { public: - ThumbnailWidget( TQWidget * parent, const KPDFPage * page, ThumbnailList * tl ); + ThumbnailWidget( TQWidget * tqparent, const KPDFPage * page, ThumbnailList * tl ); // set internal parameters to fit the page in the given width void resizeFitWidth( int width ); @@ -63,8 +63,8 @@ class ThumbnailWidget : public QWidget /** ThumbnailList implementation **/ -ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) - : TQScrollView( parent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ), +ThumbnailList::ThumbnailList( TQWidget *tqparent, KPDFDocument *document ) + : TQScrollView( tqparent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ), m_document( document ), m_selected( 0 ), m_delayTimer( 0 ), m_bookmarkOverlay( 0 ) { // set scrollbars @@ -76,13 +76,13 @@ ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) // widget setup: can be focused by tab and mouse click (not wheel) viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( StrongFocus ); + viewport()->setFocusPolicy( TQ_StrongFocus ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); // set contents background to the 'base' color - viewport()->setPaletteBackgroundColor( palette().active().base() ); + viewport()->setPaletteBackgroundColor( tqpalette().active().base() ); setFrameStyle( StyledPanel | Raised ); connect( this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotRequestVisiblePixmaps(int, int)) ); @@ -184,7 +184,7 @@ void ThumbnailList::notifyViewportChanged( bool /*smoothMove*/ ) m_selected->setSelected( true ); if ( KpdfSettings::syncThumbnailsViewport() ) { - int yOffset = QMAX( visibleHeight() / 4, m_selected->height() / 2 ); + int yOffset = TQMAX( visibleHeight() / 4, m_selected->height() / 2 ); ensureVisible( 0, childY( m_selected ) + m_selected->height()/2, 0, yOffset ); } break; @@ -199,7 +199,7 @@ void ThumbnailList::notifyPageChanged( int pageNumber, int /*changedFlags*/ ) //if ( !(changedFlags & DocumentObserver::Pixmap) ) // return; - // iterate over visible items: if page(pageNumber) is one of them, repaint it + // iterate over visible items: if page(pageNumber) is one of them, tqrepaint it TQValueList::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end(); for ( ; vIt != vEnd; ++vIt ) if ( (*vIt)->pageNumber() == pageNumber ) @@ -362,7 +362,7 @@ void ThumbnailList::viewportResizeEvent( TQResizeEvent * e ) else if ( e->size().height() <= e->oldSize().height() ) return; - // invalidate the bookmark overlay + // tqinvalidate the bookmark overlay if ( m_bookmarkOverlay ) { delete m_bookmarkOverlay; @@ -452,8 +452,8 @@ void ThumbnailList::delayedRequestVisiblePixmaps( int delayMs ) /** ThumbnailWidget implementation **/ -ThumbnailWidget::ThumbnailWidget( TQWidget * parent, const KPDFPage * kp, ThumbnailList * tl ) - : TQWidget( parent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ), +ThumbnailWidget::ThumbnailWidget( TQWidget * tqparent, const KPDFPage * kp, ThumbnailList * tl ) + : TQWidget( tqparent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ), m_selected( false ), m_pixmapWidth( 10 ), m_pixmapHeight( 10 ) { m_labelNumber = m_page->number() + 1; @@ -495,10 +495,10 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) TQPainter p( this ); // draw the bottom label + highlight mark - TQColor fillColor = m_selected ? palette().active().highlight() : palette().active().base(); + TQColor fillColor = m_selected ? tqpalette().active().highlight() : tqpalette().active().base(); p.fillRect( 0, 0, width, height, fillColor ); - p.setPen( m_selected ? palette().active().highlightedText() : palette().active().text() ); - p.drawText( 0, m_pixmapHeight + m_margin, width, m_labelHeight, Qt::AlignCenter, TQString::number( m_labelNumber ) ); + p.setPen( m_selected ? tqpalette().active().highlightedText() : tqpalette().active().text() ); + p.drawText( 0, m_pixmapHeight + m_margin, width, m_labelHeight, TQt::AlignCenter, TQString::number( m_labelNumber ) ); // draw page outline and pixmap if ( clipRect.top() < m_pixmapHeight + m_margin ) @@ -506,10 +506,10 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) // if page is bookmarked draw a colored border bool isBookmarked = m_page->hasBookmark(); // draw the inner rect - p.setPen( isBookmarked ? TQColor( 0xFF8000 ) : Qt::black ); + p.setPen( isBookmarked ? TQColor( 0xFF8000 ) : TQt::black ); p.drawRect( m_margin/2 - 1, m_margin/2 - 1, m_pixmapWidth + 2, m_pixmapHeight + 2 ); // draw the clear rect - p.setPen( isBookmarked ? TQColor( 0x804000 ) : palette().active().base() ); + p.setPen( isBookmarked ? TQColor( 0x804000 ) : tqpalette().active().base() ); // draw the bottom and right shadow edges if ( !isBookmarked ) { @@ -518,7 +518,7 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) right = m_margin/2 + m_pixmapWidth + 1; bottom = m_pixmapHeight + m_margin/2 + 1; top = m_margin/2 + 1; - p.setPen( Qt::gray ); + p.setPen( TQt::gray ); p.drawLine( left, bottom, right, bottom ); p.drawLine( right, top, right, bottom ); } @@ -552,8 +552,8 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) #define FILTERB_ID 1 -ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * list ) - : KToolBar( parent, "ThumbsControlBar" ) +ThumbnailController::ThumbnailController( TQWidget * tqparent, ThumbnailList * list ) + : KToolBar( tqparent, "ThumbsControlBar" ) { // change toolbar appearance setMargin( 3 ); @@ -564,7 +564,7 @@ ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * lis // insert a togglebutton [show only bookmarked pages] //insertSeparator(); insertButton( "bookmark", FILTERB_ID, TQT_SIGNAL( toggled( bool ) ), - list, TQT_SLOT( slotFilterBookmarks( bool ) ), + TQT_TQOBJECT(list), TQT_SLOT( slotFilterBookmarks( bool ) ), true, i18n( "Show bookmarked pages only" ) ); setToggle( FILTERB_ID ); setButton( FILTERB_ID, KpdfSettings::filterBookmarks() ); diff --git a/kpdf/ui/thumbnaillist.h b/kpdf/ui/thumbnaillist.h index a3f81b11..b28bd741 100644 --- a/kpdf/ui/thumbnaillist.h +++ b/kpdf/ui/thumbnaillist.h @@ -30,8 +30,9 @@ class ThumbnailWidget; class ThumbnailList : public TQScrollView, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - ThumbnailList(TQWidget *parent, KPDFDocument *document); + ThumbnailList(TQWidget *tqparent, KPDFDocument *document); ~ThumbnailList(); // inherited: return thumbnails observer id @@ -97,11 +98,11 @@ Q_OBJECT /** * @short A vertical boxed container with zero size hint (for insertion on left toolbox) */ -class ThumbnailsBox : public QVBox +class ThumbnailsBox : public TQVBox { public: - ThumbnailsBox( TQWidget * parent ) : TQVBox( parent ) {}; - TQSize sizeHint() const { return TQSize(); } + ThumbnailsBox( TQWidget * tqparent ) : TQVBox( tqparent ) {}; + TQSize tqsizeHint() const { return TQSize(); } }; /** @@ -115,7 +116,7 @@ class ThumbnailsBox : public QVBox class ThumbnailController : public KToolBar { public: - ThumbnailController( TQWidget * parent, ThumbnailList * thumbnailList ); + ThumbnailController( TQWidget * tqparent, ThumbnailList * thumbnailList ); }; #endif diff --git a/kpdf/ui/toc.cpp b/kpdf/ui/toc.cpp index 015ba313..a453f20d 100644 --- a/kpdf/ui/toc.cpp +++ b/kpdf/ui/toc.cpp @@ -25,8 +25,8 @@ class TOCItem : public KListViewItem { public: - TOCItem( KListView *parent, TOCItem *after, const TQDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( KListView *tqparent, TOCItem *after, const TQDomElement & e ) + : KListViewItem( tqparent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -35,8 +35,8 @@ class TOCItem : public KListViewItem setMultiLinesEnabled(true); } - TOCItem( KListViewItem *parent, TOCItem *after, const TQDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( KListViewItem *tqparent, TOCItem *after, const TQDomElement & e ) + : KListViewItem( tqparent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -54,7 +54,7 @@ class TOCItem : public KListViewItem TQDomElement m_element; }; -TOC::TOC(TQWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document) +TOC::TOC(TQWidget *tqparent, KPDFDocument *document) : KListView(tqparent), m_document(document) { addColumn( i18n("Topic") ); #ifdef TOC_ENABLE_PAGE_COLUMN @@ -104,21 +104,21 @@ void TOC::notifySetup( const TQValueVector< KPDFPage * > & /*pages*/, bool docum emit hasTOC( true ); } -void TOC::addChildren( const TQDomNode & parentNode, KListViewItem * parentItem ) +void TOC::addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem ) { // keep track of the current listViewItem TOCItem * currentItem = 0; - TQDomNode n = parentNode.firstChild(); + TQDomNode n = tqparentNode.firstChild(); while( !n.isNull() ) { // convert the node to an element (sure it is) TQDomElement e = n.toElement(); - // insert the entry as top level (listview parented) or 2nd+ level - if ( !parentItem ) + // insert the entry as top level (listview tqparented) or 2nd+ level + if ( !tqparentItem ) currentItem = new TOCItem( this, currentItem, e ); else - currentItem = new TOCItem( parentItem, currentItem, e ); + currentItem = new TOCItem( tqparentItem, currentItem, e ); // descend recursively and advance to the next node if ( e.hasChildNodes() ) diff --git a/kpdf/ui/toc.h b/kpdf/ui/toc.h index 0f2915fd..2d0c76d7 100644 --- a/kpdf/ui/toc.h +++ b/kpdf/ui/toc.h @@ -20,8 +20,9 @@ class KPDFDocument; class TOC : public KListView, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - TOC(TQWidget *parent, KPDFDocument *document); + TOC(TQWidget *tqparent, KPDFDocument *document); ~TOC(); // inherited from DocumentObserver @@ -35,7 +36,7 @@ Q_OBJECT void slotExecuted(TQListViewItem *i); private: - void addChildren( const TQDomNode & parentNode, KListViewItem * parentItem = 0 ); + void addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem = 0 ); DocumentViewport getViewport( const TQDomElement &e ) const; KPDFDocument *m_document; }; diff --git a/kpdf/xpdf/xpdf/GlobalParams.cc b/kpdf/xpdf/xpdf/GlobalParams.cc index 519e81a4..24552664 100644 --- a/kpdf/xpdf/xpdf/GlobalParams.cc +++ b/kpdf/xpdf/xpdf/GlobalParams.cc @@ -2057,7 +2057,7 @@ FILE *GlobalParams::findToUnicodeFile(GString *name) { void parseStyle(TQString& name, int& weight, int& slant, int& width) { - if (name.find("MS-") == 0) name = "MS " + name.remove(0,3); + if (name.tqfind("MS-") == 0) name = "MS " + name.remove(0,3); if (!name.contains('-') && !name.contains(',')) return; TQString type = name.section(TQRegExp("[-,]"),-1); diff --git a/kpovmodeler/StyleConvention b/kpovmodeler/StyleConvention index eddc404f..f4951d75 100644 --- a/kpovmodeler/StyleConvention +++ b/kpovmodeler/StyleConvention @@ -201,11 +201,11 @@ things are set multiple times. But it works :-) (load-library "vc") ;;for QT - (setq c-C++-access-key "\\<\\(signals\\|public\\|protected\\|private - \\|public slots\\|protected slots\\|private slots\\)\\>[ \t]*:") - ;; modify the colour of slots to match public, private, etc ... + (setq c-C++-access-key "\\<\\(Q_SIGNALS\\|public\\|protected\\|private + \\|public Q_SLOTS\\|protected Q_SLOTS\\|private Q_SLOTS\\)\\>[ \t]*:") + ;; modify the colour of Q_SLOTS to match public, private, etc ... (font-lock-add-keywords 'c++-mode - '(("\\<\\(slots\\|signals\\)\\>" . font-lock-type-face))) + '(("\\<\\(Q_SLOTS\\|Q_SIGNALS\\)\\>" . font-lock-type-face))) ;; make new font for rest of qt keywords (make-face 'qt-keywords-face) (set-face-foreground 'qt-keywords-face "green") diff --git a/kpovmodeler/baseinsertrules.xml b/kpovmodeler/baseinsertrules.xml index 24aa7dd5..1d6547ce 100644 --- a/kpovmodeler/baseinsertrules.xml +++ b/kpovmodeler/baseinsertrules.xml @@ -166,7 +166,7 @@ - + @@ -182,11 +182,11 @@ - + - + @@ -211,16 +211,16 @@ - + - + - + @@ -236,11 +236,11 @@ - + - + @@ -297,15 +297,15 @@ - + - + - + @@ -420,9 +420,9 @@ - + - + @@ -435,9 +435,9 @@ - + - + @@ -450,9 +450,9 @@ - + - + @@ -485,7 +485,7 @@ - + @@ -493,31 +493,31 @@ - + - + - + - + - + @@ -534,11 +534,11 @@ - + - + @@ -549,11 +549,11 @@ - + - + @@ -563,14 +563,14 @@ - + - + - + @@ -613,17 +613,17 @@ - + - + - + @@ -639,11 +639,11 @@ - + - + @@ -652,10 +652,10 @@ - + - + @@ -695,18 +695,18 @@ - + - + - + @@ -734,56 +734,56 @@ - + - + - + - + - + - + - + - + - + - + @@ -795,12 +795,12 @@ - + - + @@ -809,12 +809,12 @@ - + - + @@ -829,10 +829,10 @@ - + - + @@ -860,56 +860,56 @@ - + - + - + - + - + - + - + - + - + - + @@ -921,12 +921,12 @@ - + - + @@ -935,12 +935,12 @@ - + - + @@ -955,10 +955,10 @@ - + - + diff --git a/kpovmodeler/pm2dcontrolpoint.cpp b/kpovmodeler/pm2dcontrolpoint.cpp index f8450715..244b106f 100644 --- a/kpovmodeler/pm2dcontrolpoint.cpp +++ b/kpovmodeler/pm2dcontrolpoint.cpp @@ -197,7 +197,7 @@ PMVector PM2DControlPoint::to3D( const PMVector& v ) const void PM2DControlPoint::addLinkedPoint( PM2DControlPoint* p ) { - if( !m_linkedPoints.containsRef( p ) ) + if( !m_linkedPoints.tqcontainsRef( p ) ) m_linkedPoints.append( p ); } diff --git a/kpovmodeler/pmactions.cpp b/kpovmodeler/pmactions.cpp index 12bb479b..d13ddf06 100644 --- a/kpovmodeler/pmactions.cpp +++ b/kpovmodeler/pmactions.cpp @@ -29,31 +29,31 @@ #include "pmdebug.h" // Fixed widths are calculated wrong in a toolbar. -// Fixed sizeHint for the combo box to return +// Fixed tqsizeHint for the combo box to return // at least the minimum size -class PMComboBox : public QComboBox +class PMComboBox : public TQComboBox { public: - PMComboBox( TQWidget* parent, const char* name = 0 ) - : TQComboBox( parent, name ) + PMComboBox( TQWidget* tqparent, const char* name = 0 ) + : TQComboBox( tqparent, name ) { } - virtual TQSize minimumSizeHint( ) const + virtual TQSize tqminimumSizeHint( ) const { - TQSize s = TQComboBox::minimumSizeHint( ); - return s.expandedTo( minimumSize( ) ); + TQSize s = TQComboBox::tqminimumSizeHint( ); + return s.expandedTo( tqminimumSize( ) ); } - virtual TQSize sizeHint( ) const + virtual TQSize tqsizeHint( ) const { - TQSize s = TQComboBox::sizeHint( ); - return s.expandedTo( minimumSize( ) ); + TQSize s = TQComboBox::tqsizeHint( ); + return s.expandedTo( tqminimumSize( ) ); } }; PMComboAction::PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, - TQObject* parent, const char* name ) - : KAction( text, accel, parent, name ) + TQObject* tqparent, const char* name ) + : KAction( text, accel, tqparent, name ) { m_receiver = receiver; m_member = member; @@ -117,16 +117,16 @@ void PMComboAction::unplug( TQWidget *w ) // Use a toolbutton instead of a label so it is styled correctly. // copied from konq_actions.cc -class PMToolBarLabel : public QToolButton +class PMToolBarLabel : public TQToolButton { public: - PMToolBarLabel( const TQString& text, TQWidget* parent = 0, const char* name = 0 ) - : TQToolButton( parent, name ) + PMToolBarLabel( const TQString& text, TQWidget* tqparent = 0, const char* name = 0 ) + : TQToolButton( tqparent, name ) { setText( text ); } protected: - TQSize sizeHint( ) const + TQSize tqsizeHint( ) const { int w = fontMetrics( ).width( text( ) ); int h = fontMetrics( ).height( ); @@ -134,21 +134,17 @@ protected: } void drawButton( TQPainter* p ) { -#if ( QT_VERSION >= 300 ) // Draw the background - style( ).drawComplexControl( TQStyle::CC_ToolButton, p, this, rect( ), colorGroup( ), + tqstyle( ).tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, rect( ), tqcolorGroup( ), TQStyle::Style_Enabled, TQStyle::SC_ToolButton ); // Draw the label - style( ).drawControl( TQStyle::CE_ToolButtonLabel, p, this, rect( ), colorGroup( ), + tqstyle( ).tqdrawControl( TQStyle::CE_ToolButtonLabel, p, this, rect( ), tqcolorGroup( ), TQStyle::Style_Enabled ); -#else - p->drawText( rect( ), Qt::AlignVCenter | Qt::AlignLeft, text( ) ); -#endif } }; -PMLabelAction::PMLabelAction( const TQString &text, TQObject *parent, const char *name ) - : KAction( text, 0, parent, name ) +PMLabelAction::PMLabelAction( const TQString &text, TQObject *tqparent, const char *name ) + : KAction( text, 0, tqparent, name ) { m_button = 0; } @@ -197,8 +193,8 @@ void PMLabelAction::unplug( TQWidget *widget ) PMSpinBoxAction::PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, - TQObject* parent, const char* name ) - : KAction( text, accel, parent, name ) + TQObject* tqparent, const char* name ) + : KAction( text, accel, tqparent, name ) { m_receiver = receiver; m_member = member; diff --git a/kpovmodeler/pmactions.h b/kpovmodeler/pmactions.h index 6575caa8..4e058273 100644 --- a/kpovmodeler/pmactions.h +++ b/kpovmodeler/pmactions.h @@ -36,8 +36,9 @@ class TQToolButton; class PMComboAction : public KAction { Q_OBJECT + TQ_OBJECT public: - PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name ); + PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* tqparent, const char* name ); ~PMComboAction( ); virtual int plug( TQWidget* w, int index = -1 ); @@ -67,8 +68,9 @@ private: class PMLabelAction : public KAction { Q_OBJECT + TQ_OBJECT public: - PMLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 ); + PMLabelAction( const TQString &text, TQObject *tqparent = 0, const char *name = 0 ); virtual int plug( TQWidget *widget, int index = -1 ); virtual void unplug( TQWidget *widget ); @@ -84,8 +86,9 @@ private: class PMSpinBoxAction : public KAction { Q_OBJECT + TQ_OBJECT public: - PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name ); + PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* tqparent, const char* name ); ~PMSpinBoxAction( ); virtual int plug( TQWidget* w, int index = -1 ); diff --git a/kpovmodeler/pmaddcommand.cpp b/kpovmodeler/pmaddcommand.cpp index b8d4ea49..1f34e82c 100644 --- a/kpovmodeler/pmaddcommand.cpp +++ b/kpovmodeler/pmaddcommand.cpp @@ -26,11 +26,11 @@ #include -PMAddCommand::PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after ) - : PMCommand( i18n( "Add New %1" ).arg( obj->description( ) ) ) +PMAddCommand::PMAddCommand( PMObject* obj, PMObject* tqparent, PMObject* after ) + : PMCommand( i18n( "Add New %1" ).tqarg( obj->description( ) ) ) { m_objects.append( obj ); - m_pParent = parent; + m_pParent = tqparent; m_pAfter = after; m_executed = false; m_firstExecution = true; @@ -38,12 +38,12 @@ PMAddCommand::PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after ) m_pParentChangeMemento = 0; } -PMAddCommand::PMAddCommand( const PMObjectList& list, PMObject* parent, +PMAddCommand::PMAddCommand( const PMObjectList& list, PMObject* tqparent, PMObject* after ) : PMCommand( i18n( "Add Objects" ) ) { m_objects = list; - m_pParent = parent; + m_pParent = tqparent; m_pAfter = after; m_executed = false; m_firstExecution = true; @@ -116,8 +116,8 @@ void PMAddCommand::execute( PMCommandManager* theManager ) for( ; links.current( ); ++links ) { PMObject* l = links.current( ); - if( l->parent( ) ) - l->parent( )->takeChild( l ); + if( l->tqparent( ) ) + l->tqparent( )->takeChild( l ); else m_objects.removeRef( l ); m_insertErrors.append( l ); @@ -186,7 +186,7 @@ void PMAddCommand::undo( PMCommandManager* theManager ) if( decl ) { m_links.append( lit.current( ) ); - if( !m_linkedDeclares.containsRef( decl ) ) + if( !m_linkedDeclares.tqcontainsRef( decl ) ) m_linkedDeclares.append( decl ); } } @@ -204,8 +204,8 @@ void PMAddCommand::undo( PMCommandManager* theManager ) // signal has to be emitted before the item is removed theManager->cmdObjectChanged( obj, PMCRemove ); - if( obj->parent( ) ) - obj->parent( )->takeChild( obj ); + if( obj->tqparent( ) ) + obj->tqparent( )->takeChild( obj ); } if( m_pParentChangeMemento ) diff --git a/kpovmodeler/pmaddcommand.h b/kpovmodeler/pmaddcommand.h index 97793d03..a5759ea8 100644 --- a/kpovmodeler/pmaddcommand.h +++ b/kpovmodeler/pmaddcommand.h @@ -38,22 +38,22 @@ public: /** * Command that adds a new PMObject. * - * The object obj will be inserted as child of parent after + * The object obj will be inserted as child of tqparent after * the object after. * * If after is 0, the object becomes the first child. */ - PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after ); + PMAddCommand( PMObject* obj, PMObject* tqparent, PMObject* after ); /** * Command that adds a list of new PMObjects. * - * The object in the list will be inserted as children of parent after + * The object in the list will be inserted as tqchildren of tqparent after * the object after. * - * If after is 0, the objects will be inserted as first children. + * If after is 0, the objects will be inserted as first tqchildren. */ - PMAddCommand( const PMObjectList& list, PMObject* parent, PMObject* after ); + PMAddCommand( const PMObjectList& list, PMObject* tqparent, PMObject* after ); /** * Deletes the command. The inserted object will be deleted, if the command was not executed (or undo-ed) */ diff --git a/kpovmodeler/pmbicubicpatch.cpp b/kpovmodeler/pmbicubicpatch.cpp index 2c1c99dd..df66ec52 100644 --- a/kpovmodeler/pmbicubicpatch.cpp +++ b/kpovmodeler/pmbicubicpatch.cpp @@ -177,10 +177,10 @@ void PMBicubicPatch::serialize( TQDomElement& e, TQDomDocument& doc ) const e.setAttribute( "uvEnabled", m_uvEnabled ); for( i = 0; i < 16; i++ ) - e.setAttribute( TQString( "cp%1" ).arg( i ), m_point[i].serializeXML( ) ); + e.setAttribute( TQString( "cp%1" ).tqarg( i ), m_point[i].serializeXML( ) ); for( i = 0; i < 4; ++i ) - e.setAttribute( TQString( "uv%1" ).arg( i ), m_uvVectors[i].serializeXML( ) ); + e.setAttribute( TQString( "uv%1" ).tqarg( i ), m_uvVectors[i].serializeXML( ) ); Base::serialize( e, doc ); } @@ -198,7 +198,7 @@ void PMBicubicPatch::readAttributes( const PMXMLHelper& h ) for( v = 0; v < 4; v++ ) for( u = 0; u < 4; u++ ) - m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).arg( u+v*4 ), + m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).tqarg( u+v*4 ), PMVector( o + s * u, 0, o + s * v ) ); m_uvVectors[0] = h.vectorAttribute( "uv0", c_defaultUVVector0 ); @@ -209,11 +209,11 @@ void PMBicubicPatch::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBicubicPatch::metaObject( ) const +PMMetaObject* PMBicubicPatch::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BicubicPatch", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BicubicPatch", Base::tqmetaObject( ), createNewBicubicPatch ); s_pMetaObject->addProperty( new PMBicubicPatchProperty( "patchType", &PMBicubicPatch::setPatchType, @@ -365,9 +365,9 @@ PMVector PMBicubicPatch::uvVector( int i ) const return PMVector( 0.0, 0.0 ); } -PMDialogEditBase* PMBicubicPatch::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBicubicPatch::editWidget( TQWidget* tqparent ) const { - return new PMBicubicPatchEdit( parent ); + return new PMBicubicPatchEdit( tqparent ); } void PMBicubicPatch::restoreMemento( PMMemento* s ) @@ -527,7 +527,7 @@ void PMBicubicPatch::controlPoints( PMControlPointList& list ) for( v = 0; v < 4; v++ ) for( u = 0; u < 4; u++ ) list.append( new PM3DControlPoint( m_point[u+v*4], u+v*4, - i18n( "Point (%1, %2)" ).arg( u ).arg( v ) ) ); + i18n( "Point (%1, %2)" ).tqarg( u ).tqarg( v ) ) ); } void PMBicubicPatch::controlPointsChanged( PMControlPointList& list ) diff --git a/kpovmodeler/pmbicubicpatch.h b/kpovmodeler/pmbicubicpatch.h index d14f7821..2c1a623b 100644 --- a/kpovmodeler/pmbicubicpatch.h +++ b/kpovmodeler/pmbicubicpatch.h @@ -55,7 +55,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMBicubicPatchEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmbicubicpatchedit.cpp b/kpovmodeler/pmbicubicpatchedit.cpp index 8dff49b0..64cb3db8 100644 --- a/kpovmodeler/pmbicubicpatchedit.cpp +++ b/kpovmodeler/pmbicubicpatchedit.cpp @@ -29,8 +29,8 @@ #include #include -PMBicubicPatchEdit::PMBicubicPatchEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBicubicPatchEdit::PMBicubicPatchEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -39,32 +39,32 @@ void PMBicubicPatchEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pType = new TQComboBox( false, this ); m_pType->insertItem( i18n( "Normal (type 0)" ) ); m_pType->insertItem( i18n( "Preprocessed (type 1)" ) ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); - layout->addWidget( m_pType ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); + tqlayout->addWidget( m_pType ); + tqlayout->addStretch( 1 ); m_pUSteps = new PMIntEdit( this ); m_pUSteps->setValidation( true, 0, false, 0 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Steps:" ) + " u", this ) ); - layout->addWidget( m_pUSteps ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Steps:" ) + " u", this ) ); + tqlayout->addWidget( m_pUSteps ); m_pVSteps = new PMIntEdit( this ); m_pVSteps->setValidation( true, 0, false, 0 ); - layout->addWidget( new TQLabel( "v", this ) ); - layout->addWidget( m_pVSteps ); + tqlayout->addWidget( new TQLabel( "v", this ) ); + tqlayout->addWidget( m_pVSteps ); m_pFlatness = new PMFloatEdit( this ); m_pFlatness->setValidation( true, 0.0, false, 0.0 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Flatness:" ), this ) ); - layout->addWidget( m_pFlatness ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Flatness:" ), this ) ); + tqlayout->addWidget( m_pFlatness ); + tqlayout->addStretch( 1 ); topLayout( )->addWidget( new TQLabel( i18n( "Points:" ), this ) ); diff --git a/kpovmodeler/pmbicubicpatchedit.h b/kpovmodeler/pmbicubicpatchedit.h index ac00f00a..cb27810f 100644 --- a/kpovmodeler/pmbicubicpatchedit.h +++ b/kpovmodeler/pmbicubicpatchedit.h @@ -39,12 +39,13 @@ class TQCheckBox; class PMBicubicPatchEdit : public PMGraphicalObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMGraphicalObjectEdit Base; public: /** - * Creates a PMBicubicPatchEdit with parent and name + * Creates a PMBicubicPatchEdit with tqparent and name */ - PMBicubicPatchEdit( TQWidget* parent, const char* name = 0 ); + PMBicubicPatchEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblendmapmodifiers.cpp b/kpovmodeler/pmblendmapmodifiers.cpp index 9d26419e..22511200 100644 --- a/kpovmodeler/pmblendmapmodifiers.cpp +++ b/kpovmodeler/pmblendmapmodifiers.cpp @@ -57,11 +57,11 @@ PMBlendMapModifiers::~PMBlendMapModifiers( ) { } -PMMetaObject* PMBlendMapModifiers::metaObject( ) const +PMMetaObject* PMBlendMapModifiers::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BlendMapModifiers", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BlendMapModifiers", Base::tqmetaObject( ), createBlendMapModifiers ); s_pMetaObject->addProperty( new PMBlendMapModifiersProperty( "frequencyEnabled", &PMBlendMapModifiers::enableFrequency, @@ -236,9 +236,9 @@ void PMBlendMapModifiers::setWaveFormType( PMWaveFormType c ) } } -PMDialogEditBase* PMBlendMapModifiers::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlendMapModifiers::editWidget( TQWidget* tqparent ) const { - return new PMBlendMapModifiersEdit( parent ); + return new PMBlendMapModifiersEdit( tqparent ); } void PMBlendMapModifiers::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblendmapmodifiers.h b/kpovmodeler/pmblendmapmodifiers.h index ecf0bfed..fb7d2623 100644 --- a/kpovmodeler/pmblendmapmodifiers.h +++ b/kpovmodeler/pmblendmapmodifiers.h @@ -57,7 +57,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMBlendMapModifiersEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmblendmapmodifiers" ); } diff --git a/kpovmodeler/pmblendmapmodifiersedit.cpp b/kpovmodeler/pmblendmapmodifiersedit.cpp index fd443623..b18f3eed 100644 --- a/kpovmodeler/pmblendmapmodifiersedit.cpp +++ b/kpovmodeler/pmblendmapmodifiersedit.cpp @@ -37,8 +37,8 @@ #include #include -PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmblendmapmodifiersedit.h b/kpovmodeler/pmblendmapmodifiersedit.h index 18f3fa87..db3c764e 100644 --- a/kpovmodeler/pmblendmapmodifiersedit.h +++ b/kpovmodeler/pmblendmapmodifiersedit.h @@ -43,12 +43,13 @@ class TQPushButton; class PMBlendMapModifiersEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMBlendMapModifiersEdit with parent and name + * Creates a PMBlendMapModifiersEdit with tqparent and name */ - PMBlendMapModifiersEdit( TQWidget* parent, const char* name = 0 ); + PMBlendMapModifiersEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblob.cpp b/kpovmodeler/pmblob.cpp index 6621cadf..5dc5bb6c 100644 --- a/kpovmodeler/pmblob.cpp +++ b/kpovmodeler/pmblob.cpp @@ -77,11 +77,11 @@ void PMBlob::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBlob::metaObject( ) const +PMMetaObject* PMBlob::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Blob", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Blob", Base::tqmetaObject( ), createNewBlob ); s_pMetaObject->addProperty( new PMBlobProperty( "threshold", &PMBlob::setThreshold, &PMBlob::threshold ) ); @@ -139,9 +139,9 @@ void PMBlob::setHierarchy( bool h ) } } -PMDialogEditBase* PMBlob::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlob::editWidget( TQWidget* tqparent ) const { - return new PMBlobEdit( parent ); + return new PMBlobEdit( tqparent ); } void PMBlob::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblob.h b/kpovmodeler/pmblob.h index 2c764590..801e5338 100644 --- a/kpovmodeler/pmblob.h +++ b/kpovmodeler/pmblob.h @@ -52,7 +52,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -63,7 +63,7 @@ public: /** * Returns a new @ref PMBlobEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmblobcylinder.cpp b/kpovmodeler/pmblobcylinder.cpp index d166a6a3..217a5743 100644 --- a/kpovmodeler/pmblobcylinder.cpp +++ b/kpovmodeler/pmblobcylinder.cpp @@ -93,11 +93,11 @@ void PMBlobCylinder::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBlobCylinder::metaObject( ) const +PMMetaObject* PMBlobCylinder::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BlobCylinder", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BlobCylinder", Base::tqmetaObject( ), createNewBlobCylinder ); s_pMetaObject->addProperty( new PMBlobCylinderProperty( "end1", &PMBlobCylinder::setEnd1, @@ -160,9 +160,9 @@ void PMBlobCylinder::setStrength( double s ) } } -PMDialogEditBase* PMBlobCylinder::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlobCylinder::editWidget( TQWidget* tqparent ) const { - return new PMBlobCylinderEdit( parent ); + return new PMBlobCylinderEdit( tqparent ); } void PMBlobCylinder::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblobcylinder.h b/kpovmodeler/pmblobcylinder.h index 1e9a10f1..8959cee9 100644 --- a/kpovmodeler/pmblobcylinder.h +++ b/kpovmodeler/pmblobcylinder.h @@ -57,7 +57,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMBlobCylinderEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmblobcylinderedit.cpp b/kpovmodeler/pmblobcylinderedit.cpp index 34910df0..f3e702d0 100644 --- a/kpovmodeler/pmblobcylinderedit.cpp +++ b/kpovmodeler/pmblobcylinderedit.cpp @@ -26,8 +26,8 @@ #include #include -PMBlobCylinderEdit::PMBlobCylinderEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlobCylinderEdit::PMBlobCylinderEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,7 +36,7 @@ void PMBlobCylinderEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); @@ -50,13 +50,13 @@ void PMBlobCylinderEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 ); gl->addWidget( m_pStrength, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmblobcylinderedit.h b/kpovmodeler/pmblobcylinderedit.h index b9ab169e..dbe24134 100644 --- a/kpovmodeler/pmblobcylinderedit.h +++ b/kpovmodeler/pmblobcylinderedit.h @@ -33,12 +33,13 @@ class PMBlobCylinder; class PMBlobCylinderEdit : public PMDetailObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMDetailObjectEdit Base; public: /** - * Creates a PMBlobCylinderEdit with parent and name + * Creates a PMBlobCylinderEdit with tqparent and name */ - PMBlobCylinderEdit( TQWidget* parent, const char* name = 0 ); + PMBlobCylinderEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblobedit.cpp b/kpovmodeler/pmblobedit.cpp index a38d9639..b7dc2034 100644 --- a/kpovmodeler/pmblobedit.cpp +++ b/kpovmodeler/pmblobedit.cpp @@ -25,8 +25,8 @@ #include #include -PMBlobEdit::PMBlobEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlobEdit::PMBlobEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmblobedit.h b/kpovmodeler/pmblobedit.h index 5677fb9b..bada56da 100644 --- a/kpovmodeler/pmblobedit.h +++ b/kpovmodeler/pmblobedit.h @@ -36,12 +36,13 @@ class TQCheckBox; class PMBlobEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMBlobEdit with parent and name + * Creates a PMBlobEdit with tqparent and name */ - PMBlobEdit( TQWidget* parent, const char* name = 0 ); + PMBlobEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblobsphere.cpp b/kpovmodeler/pmblobsphere.cpp index cbcd33a4..fc8af594 100644 --- a/kpovmodeler/pmblobsphere.cpp +++ b/kpovmodeler/pmblobsphere.cpp @@ -72,11 +72,11 @@ TQString PMBlobSphere::description( ) const return i18n( "blob sphere" ); } -PMMetaObject* PMBlobSphere::metaObject( ) const +PMMetaObject* PMBlobSphere::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BlobSphere", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BlobSphere", Base::tqmetaObject( ), createNewBlobSphere ); s_pMetaObject->addProperty( new PMBlobSphereProperty( "center", &PMBlobSphere::setCentre, @@ -107,9 +107,9 @@ void PMBlobSphere::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMBlobSphere::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlobSphere::editWidget( TQWidget* tqparent ) const { - return new PMBlobSphereEdit( parent ); + return new PMBlobSphereEdit( tqparent ); } void PMBlobSphere::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblobsphere.h b/kpovmodeler/pmblobsphere.h index 0abe983e..4ae57e5c 100644 --- a/kpovmodeler/pmblobsphere.h +++ b/kpovmodeler/pmblobsphere.h @@ -55,7 +55,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMBlobSphereEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmblobsphereedit.cpp b/kpovmodeler/pmblobsphereedit.cpp index ba4e226b..6b569b93 100644 --- a/kpovmodeler/pmblobsphereedit.cpp +++ b/kpovmodeler/pmblobsphereedit.cpp @@ -24,8 +24,8 @@ #include #include -PMBlobSphereEdit::PMBlobSphereEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlobSphereEdit::PMBlobSphereEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,23 +34,23 @@ void PMBlobSphereEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pCentre = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); m_pStrength = new PMFloatEdit( this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); - layout->addWidget( m_pCentre ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); + tqlayout->addWidget( m_pCentre ); - layout = new TQHBoxLayout( topLayout( ) ); - TQGridLayout* gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 ); gl->addWidget( m_pStrength, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); connect( m_pCentre, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmblobsphereedit.h b/kpovmodeler/pmblobsphereedit.h index 53b65ab2..d4f18058 100644 --- a/kpovmodeler/pmblobsphereedit.h +++ b/kpovmodeler/pmblobsphereedit.h @@ -34,12 +34,13 @@ class PMFloatEdit ; class PMBlobSphereEdit : public PMDetailObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMDetailObjectEdit Base; public: /** - * Creates a PMBlobSphereEdit with parent and name + * Creates a PMBlobSphereEdit with tqparent and name */ - PMBlobSphereEdit( TQWidget* parent, const char* name = 0 ); + PMBlobSphereEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmboundedby.cpp b/kpovmodeler/pmboundedby.cpp index 5cc66e55..3e123d29 100644 --- a/kpovmodeler/pmboundedby.cpp +++ b/kpovmodeler/pmboundedby.cpp @@ -40,11 +40,11 @@ PMBoundedBy::~PMBoundedBy( ) { } -PMMetaObject* PMBoundedBy::metaObject( ) const +PMMetaObject* PMBoundedBy::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BoundedBy", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BoundedBy", Base::tqmetaObject( ), createNewBoundedBy ); s_pMetaObject->addProperty( new PMBoundedByProperty( "clippedBy", 0, &PMBoundedBy::clippedBy ) ); @@ -91,9 +91,9 @@ void PMBoundedBy::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMBoundedBy::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBoundedBy::editWidget( TQWidget* tqparent ) const { - return new PMBoundedByEdit( parent ); + return new PMBoundedByEdit( tqparent ); } void PMBoundedBy::childRemoved( PMObject* o ) diff --git a/kpovmodeler/pmboundedby.h b/kpovmodeler/pmboundedby.h index 7c88a6aa..997cef0f 100644 --- a/kpovmodeler/pmboundedby.h +++ b/kpovmodeler/pmboundedby.h @@ -49,7 +49,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMBoundedByEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmboundedbyedit.cpp b/kpovmodeler/pmboundedbyedit.cpp index 8a41fa52..db0b7b01 100644 --- a/kpovmodeler/pmboundedbyedit.cpp +++ b/kpovmodeler/pmboundedbyedit.cpp @@ -23,8 +23,8 @@ #include #include -PMBoundedByEdit::PMBoundedByEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBoundedByEdit::PMBoundedByEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmboundedbyedit.h b/kpovmodeler/pmboundedbyedit.h index 53da66f2..f575fbb8 100644 --- a/kpovmodeler/pmboundedbyedit.h +++ b/kpovmodeler/pmboundedbyedit.h @@ -35,12 +35,13 @@ class TQLabel; class PMBoundedByEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMBoundedByEdit with parent and name + * Creates a PMBoundedByEdit with tqparent and name */ - PMBoundedByEdit( TQWidget* parent, const char* name = 0 ); + PMBoundedByEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmbox.cpp b/kpovmodeler/pmbox.cpp index 155ebc68..0f2bedb3 100644 --- a/kpovmodeler/pmbox.cpp +++ b/kpovmodeler/pmbox.cpp @@ -76,11 +76,11 @@ void PMBox::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBox::metaObject( ) const +PMMetaObject* PMBox::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Box", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Box", Base::tqmetaObject( ), createNewBox ); s_pMetaObject->addProperty( new PMBoxProperty( "corner1", &PMBox::setCorner1, &PMBox::corner1 ) ); @@ -114,9 +114,9 @@ void PMBox::setCorner2( const PMVector& p ) } } -PMDialogEditBase* PMBox::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBox::editWidget( TQWidget* tqparent ) const { - return new PMBoxEdit( parent ); + return new PMBoxEdit( tqparent ); } void PMBox::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmbox.h b/kpovmodeler/pmbox.h index e6abcf75..bf499042 100644 --- a/kpovmodeler/pmbox.h +++ b/kpovmodeler/pmbox.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMBoxEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmboxedit.cpp b/kpovmodeler/pmboxedit.cpp index 6b6a2f2a..c13da80d 100644 --- a/kpovmodeler/pmboxedit.cpp +++ b/kpovmodeler/pmboxedit.cpp @@ -24,8 +24,8 @@ #include #include -PMBoxEdit::PMBoxEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBoxEdit::PMBoxEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmboxedit.h b/kpovmodeler/pmboxedit.h index 7fd6fadc..f9f0bf6d 100644 --- a/kpovmodeler/pmboxedit.h +++ b/kpovmodeler/pmboxedit.h @@ -35,12 +35,13 @@ class PMVectorEdit; class PMBoxEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMBoxEdit with parent and name + * Creates a PMBoxEdit with tqparent and name */ - PMBoxEdit( TQWidget* parent, const char* name = 0 ); + PMBoxEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmbumpmap.cpp b/kpovmodeler/pmbumpmap.cpp index 21fb29a3..ebdabab5 100644 --- a/kpovmodeler/pmbumpmap.cpp +++ b/kpovmodeler/pmbumpmap.cpp @@ -200,11 +200,11 @@ void PMBumpMap::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBumpMap::metaObject( ) const +PMMetaObject* PMBumpMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BumpMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BumpMap", Base::tqmetaObject( ), createNewBumpMap ); PMBitmapTypeProperty* bp = new PMBitmapTypeProperty( @@ -336,9 +336,9 @@ void PMBumpMap::setBumpSize( double c ) } } -PMDialogEditBase* PMBumpMap::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBumpMap::editWidget( TQWidget* tqparent ) const { - return new PMBumpMapEdit( parent ); + return new PMBumpMapEdit( tqparent ); } void PMBumpMap::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmbumpmap.h b/kpovmodeler/pmbumpmap.h index ccdf5b98..64fb632f 100644 --- a/kpovmodeler/pmbumpmap.h +++ b/kpovmodeler/pmbumpmap.h @@ -72,7 +72,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -87,7 +87,7 @@ public: /** * Returns a new @ref PMBumpMapEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Gets the bitmap type diff --git a/kpovmodeler/pmbumpmapedit.cpp b/kpovmodeler/pmbumpmapedit.cpp index f5de7a55..011e9873 100644 --- a/kpovmodeler/pmbumpmapedit.cpp +++ b/kpovmodeler/pmbumpmapedit.cpp @@ -38,8 +38,8 @@ #include #include -PMBumpMapEdit::PMBumpMapEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBumpMapEdit::PMBumpMapEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -307,7 +307,7 @@ void PMBumpMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) void PMBumpMapEdit::slotImageFileBrowseClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmbumpmapedit.h b/kpovmodeler/pmbumpmapedit.h index 109128d6..8404229b 100644 --- a/kpovmodeler/pmbumpmapedit.h +++ b/kpovmodeler/pmbumpmapedit.h @@ -45,12 +45,13 @@ class TQPushButton; class PMBumpMapEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMBumpMapEdit with parent and name + * Creates a PMBumpMapEdit with tqparent and name */ - PMBumpMapEdit( TQWidget* parent, const char* name = 0 ); + PMBumpMapEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); /** */ diff --git a/kpovmodeler/pmcamera.cpp b/kpovmodeler/pmcamera.cpp index ca37f751..697628a4 100644 --- a/kpovmodeler/pmcamera.cpp +++ b/kpovmodeler/pmcamera.cpp @@ -165,11 +165,11 @@ void PMCamera::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMCamera::metaObject( ) const +PMMetaObject* PMCamera::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Camera", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Camera", Base::tqmetaObject( ), createNewCamera ); s_pMetaObject->addProperty( new PMCameraProperty( "location", &PMCamera::setLocation, @@ -443,9 +443,9 @@ void PMCamera::setExportPovray( bool ex ) } } -PMDialogEditBase* PMCamera::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMCamera::editWidget( TQWidget* tqparent ) const { - return new PMCameraEdit( parent ); + return new PMCameraEdit( tqparent ); } void PMCamera::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcamera.h b/kpovmodeler/pmcamera.h index 7d385909..1c93c718 100644 --- a/kpovmodeler/pmcamera.h +++ b/kpovmodeler/pmcamera.h @@ -60,7 +60,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -70,7 +70,7 @@ public: /** * Returns a new @ref PMCameraEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmcamera" ); } diff --git a/kpovmodeler/pmcameraedit.cpp b/kpovmodeler/pmcameraedit.cpp index 471fa19a..1376efb9 100644 --- a/kpovmodeler/pmcameraedit.cpp +++ b/kpovmodeler/pmcameraedit.cpp @@ -30,8 +30,8 @@ #include -PMCameraEdit::PMCameraEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCameraEdit::PMCameraEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -40,7 +40,7 @@ void PMCameraEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQGridLayout* layout; + TQGridLayout* tqlayout; TQLabel* label; m_pCameraType = new TQComboBox( false, this ); @@ -53,10 +53,10 @@ void PMCameraEdit::createTopWidgets( ) m_pCameraType->insertItem( i18n( "Cylinder" ) ); m_pCylinderType = new TQComboBox( false, this ); - m_pCylinderType->insertItem( i18n( "1: Vertical, Fixed Viewpoint" ) ); - m_pCylinderType->insertItem( i18n( "2: Horizontal, Fixed Viewpoint" ) ); - m_pCylinderType->insertItem( i18n( "3: Vertical, Variable Viewpoint" ) ); - m_pCylinderType->insertItem( i18n( "4: Horizontal, Variable Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "1:Qt::Vertical, Fixed Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "2:Qt::Horizontal, Fixed Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "3:Qt::Vertical, Variable Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "4:Qt::Horizontal, Variable Viewpoint" ) ); m_pLocation = new PMVectorEdit( "x", "y", "z", this ); m_pSky = new PMVectorEdit( "x", "y", "z", this ); @@ -75,28 +75,28 @@ void PMCameraEdit::createTopWidgets( ) hl->addWidget( m_pCylinderTypeLabel ); hl->addWidget( m_pCylinderType ); - layout = new TQGridLayout( topLayout( ), 7, 2 ); - layout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 ); - layout->addWidget( m_pLocation, 0, 1 ); + tqlayout = new TQGridLayout( topLayout( ), 7, 2 ); + tqlayout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 ); + tqlayout->addWidget( m_pLocation, 0, 1 ); - layout->addWidget( new TQLabel( i18n( "Sky:" ), this ), 1, 0 ); - layout->addWidget( m_pSky, 1, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Sky:" ), this ), 1, 0 ); + tqlayout->addWidget( m_pSky, 1, 1 ); - layout->addWidget( new TQLabel( i18n( "Direction:" ), this ), 2, 0 ); - layout->addWidget( m_pDirection, 2, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Direction:" ), this ), 2, 0 ); + tqlayout->addWidget( m_pDirection, 2, 1 ); - layout->addWidget( new TQLabel( i18n( "Right:" ), this ), 3, 0 ); - layout->addWidget( m_pRight, 3, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Right:" ), this ), 3, 0 ); + tqlayout->addWidget( m_pRight, 3, 1 ); - layout->addWidget( new TQLabel( i18n( "Up:" ), this ), 4, 0 ); - layout->addWidget( m_pUp, 4, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Up:" ), this ), 4, 0 ); + tqlayout->addWidget( m_pUp, 4, 1 ); - layout->addWidget( new TQLabel( i18n( "Look at:" ), this ), 5, 0 ); - layout->addWidget( m_pLookAt, 5, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Look at:" ), this ), 5, 0 ); + tqlayout->addWidget( m_pLookAt, 5, 1 ); m_pEnableAngle = new TQCheckBox( i18n( "Angle:" ), this ); - layout->addWidget( m_pEnableAngle, 6, 0 ); - layout->addWidget( m_pAngle, 6, 1, AlignLeft ); + tqlayout->addWidget( m_pEnableAngle, 6, 0 ); + tqlayout->addWidget( m_pAngle, 6, 1, AlignLeft ); m_pFocalBlur = new TQCheckBox( i18n( "Focal blur" ), this ); topLayout( )->addWidget( m_pFocalBlur ); @@ -116,27 +116,27 @@ void PMCameraEdit::createTopWidgets( ) m_pVariance->setValidation( true, 0, false, 0 ); m_focalWidgets.append( m_pVariance ); - layout = new TQGridLayout( topLayout( ), 5, 2 ); + tqlayout = new TQGridLayout( topLayout( ), 5, 2 ); label = new TQLabel( i18n( "Aperture:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 0, 0 ); - layout->addWidget( m_pAperture, 0, 1 ); + tqlayout->addWidget( label, 0, 0 ); + tqlayout->addWidget( m_pAperture, 0, 1 ); label = new TQLabel( i18n( "Blur samples:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 1, 0 ); - layout->addWidget( m_pBlurSamples, 1, 1 ); + tqlayout->addWidget( label, 1, 0 ); + tqlayout->addWidget( m_pBlurSamples, 1, 1 ); label = new TQLabel( i18n( "Focal point:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 2, 0 ); - layout->addWidget( m_pFocalPoint, 2, 1 ); + tqlayout->addWidget( label, 2, 0 ); + tqlayout->addWidget( m_pFocalPoint, 2, 1 ); label = new TQLabel( i18n( "Confidence:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 3, 0 ); - layout->addWidget( m_pConfidence, 3, 1 ); + tqlayout->addWidget( label, 3, 0 ); + tqlayout->addWidget( m_pConfidence, 3, 1 ); label = new TQLabel( i18n( "Variance:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 4, 0 ); - layout->addWidget( m_pVariance, 4, 1 ); + tqlayout->addWidget( label, 4, 0 ); + tqlayout->addWidget( m_pVariance, 4, 1 ); m_pExport = new TQCheckBox( i18n( "Export to renderer" ), this ); topLayout( )->addWidget( m_pExport ); diff --git a/kpovmodeler/pmcameraedit.h b/kpovmodeler/pmcameraedit.h index a9ed5ee9..33b9c39b 100644 --- a/kpovmodeler/pmcameraedit.h +++ b/kpovmodeler/pmcameraedit.h @@ -41,12 +41,13 @@ class TQCheckBox; class PMCameraEdit : public PMNamedObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMNamedObjectEdit Base; public: /** - * Creates a PMCameraEdit with parent and name + * Creates a PMCameraEdit with tqparent and name */ - PMCameraEdit( TQWidget* parent, const char* name = 0 ); + PMCameraEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmclippedby.cpp b/kpovmodeler/pmclippedby.cpp index 24ea4e46..529e0962 100644 --- a/kpovmodeler/pmclippedby.cpp +++ b/kpovmodeler/pmclippedby.cpp @@ -40,11 +40,11 @@ PMClippedBy::~PMClippedBy( ) { } -PMMetaObject* PMClippedBy::metaObject( ) const +PMMetaObject* PMClippedBy::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ClippedBy", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ClippedBy", Base::tqmetaObject( ), createNewClippedBy ); s_pMetaObject->addProperty( new PMClippedByProperty( "boundedBy", 0, &PMClippedBy::boundedBy ) ); @@ -91,9 +91,9 @@ void PMClippedBy::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMClippedBy::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMClippedBy::editWidget( TQWidget* tqparent ) const { - return new PMClippedByEdit( parent ); + return new PMClippedByEdit( tqparent ); } void PMClippedBy::childRemoved( PMObject* o ) diff --git a/kpovmodeler/pmclippedby.h b/kpovmodeler/pmclippedby.h index 0e76e2cf..6c9d21a1 100644 --- a/kpovmodeler/pmclippedby.h +++ b/kpovmodeler/pmclippedby.h @@ -48,7 +48,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -63,7 +63,7 @@ public: /** * Returns a new @ref PMClippedByEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmclippedbyedit.cpp b/kpovmodeler/pmclippedbyedit.cpp index 8afa0285..486b58f2 100644 --- a/kpovmodeler/pmclippedbyedit.cpp +++ b/kpovmodeler/pmclippedbyedit.cpp @@ -23,8 +23,8 @@ #include #include -PMClippedByEdit::PMClippedByEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMClippedByEdit::PMClippedByEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmclippedbyedit.h b/kpovmodeler/pmclippedbyedit.h index 5b22f564..9050f406 100644 --- a/kpovmodeler/pmclippedbyedit.h +++ b/kpovmodeler/pmclippedbyedit.h @@ -35,12 +35,13 @@ class TQLabel; class PMClippedByEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMClippedByEdit with parent and name + * Creates a PMClippedByEdit with tqparent and name */ - PMClippedByEdit( TQWidget* parent, const char* name = 0 ); + PMClippedByEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcolor.cpp b/kpovmodeler/pmcolor.cpp index cac668e7..1f895861 100644 --- a/kpovmodeler/pmcolor.cpp +++ b/kpovmodeler/pmcolor.cpp @@ -76,7 +76,7 @@ PMColor::PMColor( const TQColor& c ) m_colorValue[4] = 0.0; } -TQColor PMColor::toQColor( ) const +TQColor PMColor::toTQColor( ) const { double r, g, b, max = 0; r = red( ); diff --git a/kpovmodeler/pmcolor.h b/kpovmodeler/pmcolor.h index 5c3c4ec8..61fd4c63 100644 --- a/kpovmodeler/pmcolor.h +++ b/kpovmodeler/pmcolor.h @@ -95,9 +95,9 @@ public: double transmit( ) const { return m_colorValue[4]; } /** - * Returns the rgb value as QColor + * Returns the rgb value as TQColor */ - TQColor toQColor( ) const; + TQColor toTQColor( ) const; /** * Returns a string for serialization diff --git a/kpovmodeler/pmcoloredit.cpp b/kpovmodeler/pmcoloredit.cpp index 9695f9eb..1c282f78 100644 --- a/kpovmodeler/pmcoloredit.cpp +++ b/kpovmodeler/pmcoloredit.cpp @@ -24,8 +24,8 @@ #include #include -PMColorEdit::PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMColorEdit::PMColorEdit( bool filterAndTransmit, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_bFilterAndTransmit = filterAndTransmit; @@ -106,7 +106,7 @@ void PMColorEdit::updateButton( ) { bool b = m_pButton->signalsBlocked( ); m_pButton->blockSignals( true ); - m_pButton->setColor( m_color.toQColor( ) ); + m_pButton->setColor( m_color.toTQColor( ) ); m_pButton->blockSignals( b ); } diff --git a/kpovmodeler/pmcoloredit.h b/kpovmodeler/pmcoloredit.h index a4be0083..4ef27e00 100644 --- a/kpovmodeler/pmcoloredit.h +++ b/kpovmodeler/pmcoloredit.h @@ -34,14 +34,15 @@ class TQColor; /** * Edit widget for @ref PMColor */ -class PMColorEdit : public QWidget +class PMColorEdit : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Creates an edit widget for rgbft colors. */ - PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name = 0 ); + PMColorEdit( bool filterAndTransmit, TQWidget* tqparent, const char* name = 0 ); /** * Sets the displayed color diff --git a/kpovmodeler/pmcolorsettings.cpp b/kpovmodeler/pmcolorsettings.cpp index c0dafa37..2b444407 100644 --- a/kpovmodeler/pmcolorsettings.cpp +++ b/kpovmodeler/pmcolorsettings.cpp @@ -25,63 +25,63 @@ #include #include -PMColorSettings::PMColorSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMColorSettings::PMColorSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQGridLayout* grid; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - grid = new TQGridLayout( vlayout, 6, 3 ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + grid = new TQGridLayout( vtqlayout, 6, 3 ); grid->addWidget( new TQLabel( i18n( "Background:" ), this ), 0, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 0, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 0, 2 ); m_pBackgroundColor = new KColorButton( this ); - hlayout->addWidget( m_pBackgroundColor ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pBackgroundColor ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Wire frame:" ), this ), 1, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 1, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 1, 2 ); m_pGraphicalObjectsColor[0] = new KColorButton( this ); - hlayout->addWidget( m_pGraphicalObjectsColor[0] ); - hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); + htqlayout->addWidget( m_pGraphicalObjectsColor[0] ); + htqlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); m_pGraphicalObjectsColor[1] = new KColorButton( this ); - hlayout->addWidget( m_pGraphicalObjectsColor[1] ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pGraphicalObjectsColor[1] ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Control points:" ), this ), 2, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 2, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 2, 2 ); m_pControlPointsColor[0] = new KColorButton( this ); - hlayout->addWidget( m_pControlPointsColor[0] ); - hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); + htqlayout->addWidget( m_pControlPointsColor[0] ); + htqlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); m_pControlPointsColor[1] = new KColorButton( this ); - hlayout->addWidget( m_pControlPointsColor[1] ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pControlPointsColor[1] ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Axes:" ), this ), 3, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 3, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 3, 2 ); grid->addWidget( new TQLabel( "x", this ), 3, 1 ); m_pAxesColor[0] = new KColorButton( this ); - hlayout->addWidget( m_pAxesColor[0] ); - hlayout->addWidget( new TQLabel( "y", this ) ); + htqlayout->addWidget( m_pAxesColor[0] ); + htqlayout->addWidget( new TQLabel( "y", this ) ); m_pAxesColor[1] = new KColorButton( this ); - hlayout->addWidget( m_pAxesColor[1] ); - hlayout->addWidget( new TQLabel( "z", this ) ); + htqlayout->addWidget( m_pAxesColor[1] ); + htqlayout->addWidget( new TQLabel( "z", this ) ); m_pAxesColor[2] = new KColorButton( this ); - hlayout->addWidget( m_pAxesColor[2] ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pAxesColor[2] ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Field of view:" ), this ), 4, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 4, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 4, 2 ); m_pFieldOfViewColor = new KColorButton( this ); - hlayout->addWidget( m_pFieldOfViewColor ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pFieldOfViewColor ); + htqlayout->addStretch( 1 ); } void PMColorSettings::displaySettings( ) @@ -118,21 +118,21 @@ bool PMColorSettings::validateData( ) void PMColorSettings::applySettings( ) { - bool repaint = false; + bool tqrepaint = false; int i; PMRenderManager* rm = PMRenderManager::theManager( ); if( rm->backgroundColor( ) != m_pBackgroundColor->color( ) ) { rm->setBackgroundColor( m_pBackgroundColor->color( ) ); - repaint = true; + tqrepaint = true; } for( i = 0; i < 2; i++ ) { if( rm->graphicalObjectColor( i ) != m_pGraphicalObjectsColor[i]->color( ) ) { rm->setGraphicalObjectColor( i, m_pGraphicalObjectsColor[i]->color( ) ); - repaint = true; + tqrepaint = true; } } for( i = 0; i < 2; i++ ) @@ -140,7 +140,7 @@ void PMColorSettings::applySettings( ) if( rm->controlPointColor( i ) != m_pControlPointsColor[i]->color( ) ) { rm->setControlPointColor( i, m_pControlPointsColor[i]->color( ) ); - repaint = true; + tqrepaint = true; } } for( i = 0; i < 3; i++ ) @@ -148,16 +148,16 @@ void PMColorSettings::applySettings( ) if( rm->axesColor( i ) != m_pAxesColor[i]->color( ) ) { rm->setAxesColor( i, m_pAxesColor[i]->color( ) ); - repaint = true; + tqrepaint = true; } } if( rm->fieldOfViewColor( ) != m_pFieldOfViewColor->color( ) ) { rm->setFieldOfViewColor( m_pFieldOfViewColor->color( ) ); - repaint = true; + tqrepaint = true; } - if( repaint ) - emit repaintViews( ); + if( tqrepaint ) + emit tqrepaintViews( ); } #include "pmcolorsettings.moc" diff --git a/kpovmodeler/pmcolorsettings.h b/kpovmodeler/pmcolorsettings.h index 8b903d47..703bf6cf 100644 --- a/kpovmodeler/pmcolorsettings.h +++ b/kpovmodeler/pmcolorsettings.h @@ -32,11 +32,12 @@ class KColorButton; class PMColorSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMColorSettings( TQWidget* parent, const char* name = 0 ); + PMColorSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmcommand.h b/kpovmodeler/pmcommand.h index 5d32b9d4..d1e53c99 100644 --- a/kpovmodeler/pmcommand.h +++ b/kpovmodeler/pmcommand.h @@ -42,8 +42,8 @@ class PMPart; * PMCRemove: An object was removed. A signal with this constant has * to be emitted _before_ the object is removed. * - * PMCChildren: Some children are added or removed. Do not use. Use PMCAdd and - * PMCRemove for all childrens. + * PMCChildren: Some tqchildren are added or removed. Do not use. Use PMCAdd and + * PMCRemove for all tqchildrens. * * PMCData: Data (for dialog views) is changed * diff --git a/kpovmodeler/pmcommandmanager.cpp b/kpovmodeler/pmcommandmanager.cpp index f122a7a4..8e02f988 100644 --- a/kpovmodeler/pmcommandmanager.cpp +++ b/kpovmodeler/pmcommandmanager.cpp @@ -45,7 +45,7 @@ void PMCommandManager::execute( PMCommand* cmd ) m_commands.removeFirst( ); m_redoCommands.clear( ); - emit updateUndoRedo( cmd->text( ), TQString::null ); + emit updateUndoRedo( cmd->text( ), TQString() ); } void PMCommandManager::undo( ) @@ -58,7 +58,7 @@ void PMCommandManager::undo( ) m_redoCommands.append( m_commands.take( ) ); if( m_commands.isEmpty( ) ) - emit updateUndoRedo( TQString::null, last->text( ) ); + emit updateUndoRedo( TQString(), last->text( ) ); else emit updateUndoRedo( m_commands.last( )->text( ), last->text( ) ); } @@ -74,7 +74,7 @@ void PMCommandManager::redo( ) m_commands.append( m_redoCommands.take( ) ); if( m_redoCommands.isEmpty( ) ) - emit updateUndoRedo( last->text( ), TQString::null ); + emit updateUndoRedo( last->text( ), TQString() ); else emit updateUndoRedo( last->text( ), m_redoCommands.last( )->text( ) ); } @@ -84,7 +84,7 @@ void PMCommandManager::clear( ) { m_redoCommands.clear( ); m_commands.clear( ); - emit updateUndoRedo( TQString::null, TQString::null ); + emit updateUndoRedo( TQString(), TQString() ); } void PMCommandManager::cmdObjectChanged( PMObject* obj, const int mode ) diff --git a/kpovmodeler/pmcommandmanager.h b/kpovmodeler/pmcommandmanager.h index 5fc960d1..4a86e2d9 100644 --- a/kpovmodeler/pmcommandmanager.h +++ b/kpovmodeler/pmcommandmanager.h @@ -36,9 +36,10 @@ class PMPart; * The class PMCommandManager stores stacks of commands for undo/redo * operations. */ -class PMCommandManager : public QObject +class PMCommandManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Creates a new PMCommandManager diff --git a/kpovmodeler/pmcomment.cpp b/kpovmodeler/pmcomment.cpp index 90c817fd..7d12dfbc 100644 --- a/kpovmodeler/pmcomment.cpp +++ b/kpovmodeler/pmcomment.cpp @@ -108,11 +108,11 @@ void PMComment::setText( const TQString& text ) } } -PMMetaObject* PMComment::metaObject( ) const +PMMetaObject* PMComment::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Comment", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Comment", Base::tqmetaObject( ), createNewComment ); s_pMetaObject->addProperty( new PMCommentProperty( "text", &PMComment::setText, &PMComment::text ) ); @@ -143,9 +143,9 @@ void PMComment::readAttributes( const PMXMLHelper& h ) m_text = e.toText( ).data( ); } -PMDialogEditBase* PMComment::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMComment::editWidget( TQWidget* tqparent ) const { - return new PMCommentEdit( parent ); + return new PMCommentEdit( tqparent ); } void PMComment::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcomment.h b/kpovmodeler/pmcomment.h index d435423d..64514452 100644 --- a/kpovmodeler/pmcomment.h +++ b/kpovmodeler/pmcomment.h @@ -62,7 +62,7 @@ public: virtual PMObject* copy( ) const { return new PMComment( *this ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -75,7 +75,7 @@ public: virtual void readAttributes( const PMXMLHelper& h ); /** */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmcomment" ); } /** */ diff --git a/kpovmodeler/pmcommentedit.cpp b/kpovmodeler/pmcommentedit.cpp index 28e98ed3..b9f5daac 100644 --- a/kpovmodeler/pmcommentedit.cpp +++ b/kpovmodeler/pmcommentedit.cpp @@ -23,8 +23,8 @@ #include #include -PMCommentEdit::PMCommentEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCommentEdit::PMCommentEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,10 +34,8 @@ void PMCommentEdit::createTopWidgets( ) Base::createTopWidgets( ); m_pEdit = new TQMultiLineEdit( this ); -#if ( QT_VERSION >= 300 ) - m_pEdit->setTextFormat( Qt::PlainText ); + m_pEdit->setTextFormat( TQt::PlainText ); m_pEdit->setWordWrap( TQTextEdit::NoWrap ); -#endif m_pEdit->setFont( KGlobalSettings::fixedFont( ) ); topLayout( )->addWidget( m_pEdit, 2 ); diff --git a/kpovmodeler/pmcommentedit.h b/kpovmodeler/pmcommentedit.h index 3d3fb0c1..da44246b 100644 --- a/kpovmodeler/pmcommentedit.h +++ b/kpovmodeler/pmcommentedit.h @@ -35,12 +35,13 @@ class TQMultiLineEdit; class PMCommentEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMCommentEdit with parent and name + * Creates a PMCommentEdit with tqparent and name */ - PMCommentEdit( TQWidget* parent, const char* name = 0 ); + PMCommentEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcompositeobject.cpp b/kpovmodeler/pmcompositeobject.cpp index d8b61e8c..e9369ea4 100644 --- a/kpovmodeler/pmcompositeobject.cpp +++ b/kpovmodeler/pmcompositeobject.cpp @@ -67,10 +67,10 @@ PMCompositeObject::~PMCompositeObject( ) delete m_pViewStructure; } -PMMetaObject* PMCompositeObject::metaObject( ) const +PMMetaObject* PMCompositeObject::tqmetaObject( ) const { if( !s_pMetaObject ) - s_pMetaObject = new PMMetaObject( "CompositeObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "CompositeObject", Base::tqmetaObject( ) ); return s_pMetaObject; } @@ -84,7 +84,7 @@ void PMCompositeObject::cleanUp( ) const Base::cleanUp( ); } -PMObject* PMCompositeObject::childAt( uint index ) const +PMObject* PMCompositeObject::tqchildAt( uint index ) const { PMObject* tmp; uint i = 0; @@ -96,7 +96,7 @@ PMObject* PMCompositeObject::childAt( uint index ) const int PMCompositeObject::findChild( PMObject* o ) { - if( o->parent( ) != this ) + if( o->tqparent( ) != this ) return -1; PMObject* tmp; @@ -136,7 +136,7 @@ bool PMCompositeObject::insertChild( PMObject* o, int i ) } else { - PMObject* tmp = childAt( ( uint ) ( i - 1 ) ); + PMObject* tmp = tqchildAt( ( uint ) ( i - 1 ) ); if( !tmp ) { kdError( PMArea ) << "Index too big" << "\n"; @@ -272,7 +272,7 @@ bool PMCompositeObject::takeChild( PMObject* o ) bool PMCompositeObject::takeChild( uint i ) { - PMObject* tmp = childAt( i ); + PMObject* tmp = tqchildAt( i ); if( tmp ) return takeChild( tmp ); kdError( PMArea ) << "Index too big"; diff --git a/kpovmodeler/pmcompositeobject.h b/kpovmodeler/pmcompositeobject.h index 350180db..0d7ae6df 100644 --- a/kpovmodeler/pmcompositeobject.h +++ b/kpovmodeler/pmcompositeobject.h @@ -44,12 +44,12 @@ public: */ PMCompositeObject( const PMCompositeObject& o ); /** - * Deletes the object and all children. + * Deletes the object and all tqchildren. */ virtual ~PMCompositeObject( ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,13 +65,13 @@ public: * Returns a pointer to the child object at position index, * or null if the index is out of range. */ - virtual PMObject* childAt( uint index ) const; + virtual PMObject* tqchildAt( uint index ) const; /** * Returns true if the object contains the child object o */ virtual bool containsChild( PMObject* o ) const - { return ( ( PMObject* )this == o->parent( ) ); } + { return ( ( PMObject* )this == o->tqparent( ) ); } /** * Returns the index of the object or -1 if not found */ @@ -96,7 +96,7 @@ public: */ virtual bool appendChild( PMObject* ); /** - * Returns the number of children. + * Returns the number of tqchildren. */ virtual int countChildren( ) const; /** @@ -135,7 +135,7 @@ public: protected: /** * Adds num to the number of selected objects in this object and all - * parent objects. num can be negative. + * tqparent objects. num can be negative. */ virtual void adjustSelectedChildren( int num ); diff --git a/kpovmodeler/pmcone.cpp b/kpovmodeler/pmcone.cpp index c6fd719e..3a90d131 100644 --- a/kpovmodeler/pmcone.cpp +++ b/kpovmodeler/pmcone.cpp @@ -100,11 +100,11 @@ void PMCone::readAttributes( const PMXMLHelper & h ) Base::readAttributes( h ); } -PMMetaObject* PMCone::metaObject( ) const +PMMetaObject* PMCone::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Cone", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Cone", Base::tqmetaObject( ), createNewCone ); s_pMetaObject->addProperty( new PMConeProperty( "end1", &PMCone::setEnd1, &PMCone::end1 ) ); @@ -176,9 +176,9 @@ void PMCone::setOpen( bool op ) } } -PMDialogEditBase* PMCone::editWidget( TQWidget * parent ) const +PMDialogEditBase* PMCone::editWidget( TQWidget * tqparent ) const { - return new PMConeEdit( parent ); + return new PMConeEdit( tqparent ); } void PMCone::restoreMemento( PMMemento * s ) diff --git a/kpovmodeler/pmcone.h b/kpovmodeler/pmcone.h index c41f9325..aa452b64 100644 --- a/kpovmodeler/pmcone.h +++ b/kpovmodeler/pmcone.h @@ -62,7 +62,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -71,7 +71,7 @@ public: /** * Returns a new @ref PMConeEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmconeedit.cpp b/kpovmodeler/pmconeedit.cpp index 9969e4d7..006add43 100644 --- a/kpovmodeler/pmconeedit.cpp +++ b/kpovmodeler/pmconeedit.cpp @@ -26,8 +26,8 @@ #include #include -PMConeEdit::PMConeEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMConeEdit::PMConeEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,7 +36,7 @@ void PMConeEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); @@ -51,13 +51,13 @@ void PMConeEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius 1:" ), this ), 0, 0 ); gl->addWidget( m_pRadius1, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Radius 2:" ), this ), 1, 0 ); gl->addWidget( m_pRadius2, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); topLayout( )->addWidget( m_pOpen ); diff --git a/kpovmodeler/pmconeedit.h b/kpovmodeler/pmconeedit.h index f4e689fc..d5210124 100644 --- a/kpovmodeler/pmconeedit.h +++ b/kpovmodeler/pmconeedit.h @@ -35,12 +35,13 @@ class PMCone; class PMConeEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMConeEdit with parent and name + * Creates a PMConeEdit with tqparent and name */ - PMConeEdit( TQWidget* parent, const char* name = 0 ); + PMConeEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcsg.cpp b/kpovmodeler/pmcsg.cpp index 0ac7e58a..c8316a53 100644 --- a/kpovmodeler/pmcsg.cpp +++ b/kpovmodeler/pmcsg.cpp @@ -130,11 +130,11 @@ void PMCSG::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMCSG::metaObject( ) const +PMMetaObject* PMCSG::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "CSG", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "CSG", Base::tqmetaObject( ), createNewCSG ); PMCSGTypeProperty* p = new PMCSGTypeProperty( "csgType", &PMCSG::setCSGType, &PMCSG::csgType ); p->addEnumValue( "union", CSGUnion ); @@ -169,9 +169,9 @@ void PMCSG::setCSGType( const PMCSGType t ) } } -PMDialogEditBase* PMCSG::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMCSG::editWidget( TQWidget* tqparent ) const { - return new PMCSGEdit( parent ); + return new PMCSGEdit( tqparent ); } void PMCSG::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcsg.h b/kpovmodeler/pmcsg.h index 380bf0ef..3424a6c7 100644 --- a/kpovmodeler/pmcsg.h +++ b/kpovmodeler/pmcsg.h @@ -62,7 +62,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -74,7 +74,7 @@ public: /** * Returns a new @ref PMCSGEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmcsgedit.cpp b/kpovmodeler/pmcsgedit.cpp index 114e22f6..bdbbe3da 100644 --- a/kpovmodeler/pmcsgedit.cpp +++ b/kpovmodeler/pmcsgedit.cpp @@ -24,8 +24,8 @@ #include #include -PMCSGEdit::PMCSGEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCSGEdit::PMCSGEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,17 +34,17 @@ void PMCSGEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pTypeCombo = new TQComboBox( false, this ); m_pTypeCombo->insertItem( i18n( "Union" ) ); m_pTypeCombo->insertItem( i18n( "Intersection" ) ); m_pTypeCombo->insertItem( i18n( "Difference" ) ); m_pTypeCombo->insertItem( i18n( "Merge" ) ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); - layout->addWidget( m_pTypeCombo ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); + tqlayout->addWidget( m_pTypeCombo ); + tqlayout->addStretch( 1 ); connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotTypeSelected( int ) ) ); } diff --git a/kpovmodeler/pmcsgedit.h b/kpovmodeler/pmcsgedit.h index d7efc75d..1ec5d205 100644 --- a/kpovmodeler/pmcsgedit.h +++ b/kpovmodeler/pmcsgedit.h @@ -35,12 +35,13 @@ class TQComboBox; class PMCSGEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMCSGEdit with parent and name + * Creates a PMCSGEdit with tqparent and name */ - PMCSGEdit( TQWidget* parent, const char* name = 0 ); + PMCSGEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcylinder.cpp b/kpovmodeler/pmcylinder.cpp index 358cb542..b595d6e1 100644 --- a/kpovmodeler/pmcylinder.cpp +++ b/kpovmodeler/pmcylinder.cpp @@ -97,11 +97,11 @@ void PMCylinder::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMCylinder::metaObject( ) const +PMMetaObject* PMCylinder::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Cylinder", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Cylinder", Base::tqmetaObject( ), createNewCylinder ); s_pMetaObject->addProperty( new PMCylinderProperty( "end1", &PMCylinder::setEnd1, &PMCylinder::end1 ) ); @@ -160,9 +160,9 @@ void PMCylinder::setOpen( bool op ) } } -PMDialogEditBase* PMCylinder::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMCylinder::editWidget( TQWidget* tqparent ) const { - return new PMCylinderEdit( parent ); + return new PMCylinderEdit( tqparent ); } void PMCylinder::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcylinder.h b/kpovmodeler/pmcylinder.h index 1bd10901..66174d59 100644 --- a/kpovmodeler/pmcylinder.h +++ b/kpovmodeler/pmcylinder.h @@ -58,7 +58,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMCylinderEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmcylinderedit.cpp b/kpovmodeler/pmcylinderedit.cpp index b15a0d16..b471cb29 100644 --- a/kpovmodeler/pmcylinderedit.cpp +++ b/kpovmodeler/pmcylinderedit.cpp @@ -26,8 +26,8 @@ #include #include -PMCylinderEdit::PMCylinderEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCylinderEdit::PMCylinderEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,7 +36,7 @@ void PMCylinderEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); @@ -50,13 +50,13 @@ void PMCylinderEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); - layout->addWidget( m_pRadius ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); + tqlayout->addWidget( m_pRadius ); + tqlayout->addStretch( 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( m_pOpen ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( m_pOpen ); connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmcylinderedit.h b/kpovmodeler/pmcylinderedit.h index 9f2c0993..9b25ec2a 100644 --- a/kpovmodeler/pmcylinderedit.h +++ b/kpovmodeler/pmcylinderedit.h @@ -34,12 +34,13 @@ class TQCheckBox; class PMCylinderEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMCylinderEdit with parent and name + * Creates a PMCylinderEdit with tqparent and name */ - PMCylinderEdit( TQWidget* parent, const char* name = 0 ); + PMCylinderEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdatachangecommand.cpp b/kpovmodeler/pmdatachangecommand.cpp index 99ac75d3..4188d253 100644 --- a/kpovmodeler/pmdatachangecommand.cpp +++ b/kpovmodeler/pmdatachangecommand.cpp @@ -28,7 +28,7 @@ PMDataChangeCommand::PMDataChangeCommand( PMMemento* memento ) TQString text = memento->originator( )->name( ); if( text.isEmpty( ) ) text = memento->originator( )->description( ); - setText( i18n( "Change %1" ).arg( text ) ); + setText( i18n( "Change %1" ).tqarg( text ) ); // the data is already changed when the command is created m_executed = true; diff --git a/kpovmodeler/pmdeclare.cpp b/kpovmodeler/pmdeclare.cpp index 3f290e2f..0fd7d115 100644 --- a/kpovmodeler/pmdeclare.cpp +++ b/kpovmodeler/pmdeclare.cpp @@ -44,14 +44,14 @@ PMDeclare::PMDeclare( const PMDeclare& d ) { m_id = d.m_id; // CAUTION! Duplication of the id which has to be unique m_pDeclareType = 0; // will be set automatically in the - // base constuctor when the children are copied + // base constuctor when the tqchildren are copied } -PMMetaObject* PMDeclare::metaObject( ) const +PMMetaObject* PMDeclare::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Declare", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Declare", Base::tqmetaObject( ), createNewDeclare ); s_pMetaObject->addProperty( new PMDeclareProperty( "id", &PMDeclare::setID, &PMDeclare::id ) ); @@ -131,9 +131,9 @@ void PMDeclare::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMDeclare::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMDeclare::editWidget( TQWidget* tqparent ) const { - return new PMDeclareEdit( parent ); + return new PMDeclareEdit( tqparent ); } void PMDeclare::setID( const TQString& newID ) @@ -180,9 +180,9 @@ void PMDeclare::updateDeclareType( ) if( o ) { if( o->isA( "GraphicalObject" ) ) - type = m->metaObject( "GraphicalObject" ); + type = m->tqmetaObject( "GraphicalObject" ); else - type = o->metaObject( ); + type = o->tqmetaObject( ); } setDeclareType( type ); } diff --git a/kpovmodeler/pmdeclare.h b/kpovmodeler/pmdeclare.h index 89468bf4..05782866 100644 --- a/kpovmodeler/pmdeclare.h +++ b/kpovmodeler/pmdeclare.h @@ -55,7 +55,7 @@ public: virtual TQString pixmap( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMDeclareEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the id of the declare */ diff --git a/kpovmodeler/pmdeclareedit.cpp b/kpovmodeler/pmdeclareedit.cpp index a461d710..49ee6366 100644 --- a/kpovmodeler/pmdeclareedit.cpp +++ b/kpovmodeler/pmdeclareedit.cpp @@ -33,8 +33,8 @@ #include #include -PMDeclareEdit::PMDeclareEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDeclareEdit::PMDeclareEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; m_pSelectedObject = 0; @@ -44,13 +44,13 @@ void PMDeclareEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pNameEdit = new TQLineEdit( this ); m_pNameEdit->setMaxLength( 40 ); TQLabel* label = new TQLabel( i18n( "Identifier:" ), this ); - layout->addWidget( label ); - layout->addWidget( m_pNameEdit ); + tqlayout->addWidget( label ); + tqlayout->addWidget( m_pNameEdit ); connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotNameChanged( const TQString& ) ) ); @@ -67,13 +67,13 @@ void PMDeclareEdit::createBottomWidgets( ) TQT_SLOT( slotItemSelected( TQListBoxItem* ) ) ); topLayout( )->addWidget( m_pLinkedObjects, 1 ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pSelectButton = new TQPushButton( i18n( "Select..." ), this ); m_pSelectButton->setEnabled( false ); connect( m_pSelectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSelect( ) ) ); - layout->addStretch( ); - layout->addWidget( m_pSelectButton ); + tqlayout->addStretch( ); + tqlayout->addWidget( m_pSelectButton ); Base::createBottomWidgets( ); } @@ -162,14 +162,14 @@ bool PMDeclareEdit::isDataValid( ) // valid identifer! PMReservedWordDict* dict = PMScanner::reservedWords( ); - if( dict->find( text.latin1( ) ) != -1 ) + if( dict->tqfind( text.latin1( ) ) != -1 ) { KMessageBox::error( this, i18n( "You can't use a povray reserved word" " as an identifier!" ), i18n( "Error" ) ); return false; } dict = PMScanner::directives( ); - if( dict->find( text.latin1( ) ) != -1 ) + if( dict->tqfind( text.latin1( ) ) != -1 ) { KMessageBox::error( this, i18n( "You can't use a povray directive" " as an identifier!" ), i18n( "Error" ) ); @@ -178,7 +178,7 @@ bool PMDeclareEdit::isDataValid( ) // no reserved word PMSymbolTable* st = part( )->symbolTable( ); - if( st->find( text ) ) + if( st->tqfind( text ) ) { KMessageBox::error( this, i18n( "Please enter a unique identifier!" ), i18n( "Error" ) ); @@ -201,6 +201,6 @@ void PMDeclareEdit::slotItemSelected( TQListBoxItem* item ) void PMDeclareEdit::slotSelect( ) { if( m_pSelectedObject ) - part( )->slotObjectChanged( m_pSelectedObject, PMCNewSelection, this ); + part( )->slotObjectChanged( m_pSelectedObject, PMCNewSelection, TQT_TQOBJECT(this) ); } #include "pmdeclareedit.moc" diff --git a/kpovmodeler/pmdeclareedit.h b/kpovmodeler/pmdeclareedit.h index 2a40b869..0b40eb2a 100644 --- a/kpovmodeler/pmdeclareedit.h +++ b/kpovmodeler/pmdeclareedit.h @@ -38,12 +38,13 @@ class TQListBoxItem; class PMDeclareEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMDeclareEdit with parent and name + * Creates a PMDeclareEdit with tqparent and name */ - PMDeclareEdit( TQWidget* parent, const char* name = 0 ); + PMDeclareEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdeletecommand.cpp b/kpovmodeler/pmdeletecommand.cpp index a4629728..663dae09 100644 --- a/kpovmodeler/pmdeletecommand.cpp +++ b/kpovmodeler/pmdeletecommand.cpp @@ -27,14 +27,14 @@ #include PMDeleteCommand::PMDeleteCommand( PMObject* obj ) - : PMCommand( i18n( "Delete %1" ).arg( obj->name( ) ) ) + : PMCommand( i18n( "Delete %1" ).tqarg( obj->name( ) ) ) { // the scene can not be deleted! - if( obj->parent( ) ) + if( obj->tqparent( ) ) m_infoList.append( new PMDeleteInfo( obj ) ); else { - // object has no parent! + // object has no tqparent! // top level objects can't be moved, move all child items PMObject* tmp; for( tmp = obj->firstChild( ); tmp; tmp = tmp->nextSibling( ) ) @@ -55,11 +55,11 @@ PMDeleteCommand::PMDeleteCommand( const PMObjectList& list ) { obj = it.current( ); - if( obj->parent( ) ) + if( obj->tqparent( ) ) m_infoList.append( new PMDeleteInfo( obj ) ); else { - // object has no parent! + // object has no tqparent! // top level objects can't be moved, move all child items PMObject* tmp; for( tmp = obj->firstChild( ); tmp; tmp = tmp->nextSibling( ) ) @@ -91,7 +91,7 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) { PMDeleteInfoListIterator it( m_infoList ); PMDeleteInfo* info = 0; - PMObject* parent; + PMObject* tqparent; if( !m_linksCreated ) { @@ -105,8 +105,8 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) if( decl ) { m_links.append( oit.current( ) ); - if( !m_linkedDeclares.containsRef( decl ) ) - m_linkedDeclares.append( decl ); + if( !m_linkedDeclares.tqcontainsRef( decl ) ) + m_linkedDeclares.append( decl ); } } } @@ -120,23 +120,23 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) for( it.toLast( ); it.current( ); --it ) { info = it.current( ); - parent = info->parent( ); + tqparent = info->tqparent( ); // signal has to be emitted before the item is removed theManager->cmdObjectChanged( info->deletedObject( ), PMCRemove ); if( m_firstExecution ) - if( parent->dataChangeOnInsertRemove( ) - && !parent->mementoCreated( ) ) - parent->createMemento( ); - parent->takeChild( info->deletedObject( ) ); + if( tqparent->dataChangeOnInsertRemove( ) + && !tqparent->mementoCreated( ) ) + tqparent->createMemento( ); + tqparent->takeChild( info->deletedObject( ) ); } if( m_firstExecution ) { for( it.toLast( ); it.current( ); --it ) { - parent = it.current( )->parent( ); - if( parent->mementoCreated( ) ) - m_dataChanges.append( parent->takeMemento( ) ); + tqparent = it.current( )->tqparent( ); + if( tqparent->mementoCreated( ) ) + m_dataChanges.append( tqparent->takeMemento( ) ); } } @@ -166,11 +166,11 @@ void PMDeleteCommand::undo( PMCommandManager* theManager ) for( ; it.current( ); ++it ) { if( it.current( )->prevSibling( ) ) - it.current( )->parent( ) + it.current( )->tqparent( ) ->insertChildAfter( it.current( )->deletedObject( ), it.current( )->prevSibling( ) ); else - it.current( )->parent( ) + it.current( )->tqparent( ) ->insertChild( it.current( )->deletedObject( ), 0 ); theManager->cmdObjectChanged( it.current( )->deletedObject( ), PMCAdd ); } @@ -230,18 +230,18 @@ int PMDeleteCommand::errorFlags( PMPart* ) { insideSelection = false; for( obj = links.current( ); obj && !insideSelection; - obj = obj->parent( ) ) + obj = obj->tqparent( ) ) { - if( m_deletedObjects.find( obj ) ) + if( m_deletedObjects.tqfind( obj ) ) insideSelection = true; } if( insideSelection ) { bool stop = false; - for( obj = links.current( ); obj && !stop; obj = obj->parent( ) ) + for( obj = links.current( ); obj && !stop; obj = obj->tqparent( ) ) { - if( m_deletedObjects.find( obj ) ) + if( m_deletedObjects.tqfind( obj ) ) stop = true; else m_deletedObjects.insert( obj, new bool( true ) ); @@ -256,7 +256,7 @@ int PMDeleteCommand::errorFlags( PMPart* ) { m_errors.prepend( i18n( "The declare \"%1\" can't be removed " "because of some remaining links." ) - .arg( decl->id( ) ) ); + .tqarg( decl->id( ) ) ); PMDeleteInfo* tmp = info; info = m_infoList.prev( ); diff --git a/kpovmodeler/pmdeletecommand.h b/kpovmodeler/pmdeletecommand.h index d11cf348..4c384e1f 100644 --- a/kpovmodeler/pmdeletecommand.h +++ b/kpovmodeler/pmdeletecommand.h @@ -39,12 +39,12 @@ class PMDeleteInfo public: /** * Creates undo information for the object deletedObject. - * The object has to have a parent! + * The object has to have a tqparent! */ PMDeleteInfo( PMObject* deletedObject ) { m_pDeletedObject = deletedObject; - m_pParent = deletedObject->parent( ); + m_pParent = deletedObject->tqparent( ); m_pPrevSibling = deletedObject->prevSibling( ); m_insertError = false; } @@ -57,9 +57,9 @@ public: */ PMObject* deletedObject( ) const { return m_pDeletedObject; } /** - * Returns a pointer to the parent of the deleted object + * Returns a pointer to the tqparent of the deleted object */ - PMObject* parent( ) const { return m_pParent; } + PMObject* tqparent( ) const { return m_pParent; } /** * Returns the previous sibling of the deleted object */ diff --git a/kpovmodeler/pmdensity.cpp b/kpovmodeler/pmdensity.cpp index 3935b6be..5743a5b4 100644 --- a/kpovmodeler/pmdensity.cpp +++ b/kpovmodeler/pmdensity.cpp @@ -43,11 +43,11 @@ PMDensity::~PMDensity( ) { } -PMMetaObject* PMDensity::metaObject( ) const +PMMetaObject* PMDensity::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Density", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Density", Base::tqmetaObject( ), createNewDensity ); } return s_pMetaObject; @@ -69,8 +69,8 @@ TQString PMDensity::description( ) const } -PMDialogEditBase* PMDensity::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMDensity::editWidget( TQWidget* tqparent ) const { - return new PMDensityEdit( parent ); + return new PMDensityEdit( tqparent ); } diff --git a/kpovmodeler/pmdensity.h b/kpovmodeler/pmdensity.h index b1502fe2..ca32ac99 100644 --- a/kpovmodeler/pmdensity.h +++ b/kpovmodeler/pmdensity.h @@ -52,14 +52,14 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; /** * Returns a new @ref PMDensityEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmdensity" ); } diff --git a/kpovmodeler/pmdensityedit.cpp b/kpovmodeler/pmdensityedit.cpp index 407a4f80..8213d27c 100644 --- a/kpovmodeler/pmdensityedit.cpp +++ b/kpovmodeler/pmdensityedit.cpp @@ -25,8 +25,8 @@ #include -PMDensityEdit::PMDensityEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDensityEdit::PMDensityEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmdensityedit.h b/kpovmodeler/pmdensityedit.h index a3963ca9..a8241117 100644 --- a/kpovmodeler/pmdensityedit.h +++ b/kpovmodeler/pmdensityedit.h @@ -34,12 +34,13 @@ class PMDensity; class PMDensityEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMDensityEdit with parent and name + * Creates a PMDensityEdit with tqparent and name */ - PMDensityEdit( TQWidget* parent, const char* name = 0 ); + PMDensityEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdetailobject.cpp b/kpovmodeler/pmdetailobject.cpp index 5abc7e22..050729a4 100644 --- a/kpovmodeler/pmdetailobject.cpp +++ b/kpovmodeler/pmdetailobject.cpp @@ -47,11 +47,11 @@ PMDetailObject::~PMDetailObject() { } -PMMetaObject* PMDetailObject::metaObject( ) const +PMMetaObject* PMDetailObject::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "DetailObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "DetailObject", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMDetailObjectProperty( "globalDetail", &PMDetailObject::setGlobalDetail, &PMDetailObject::globalDetail ) ); s_pMetaObject->addProperty( diff --git a/kpovmodeler/pmdetailobject.h b/kpovmodeler/pmdetailobject.h index 846ef8c0..10efae07 100644 --- a/kpovmodeler/pmdetailobject.h +++ b/kpovmodeler/pmdetailobject.h @@ -43,7 +43,7 @@ public: virtual ~PMDetailObject(); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmdetailobjectedit.cpp b/kpovmodeler/pmdetailobjectedit.cpp index 661cd892..0fbd3a8a 100644 --- a/kpovmodeler/pmdetailobjectedit.cpp +++ b/kpovmodeler/pmdetailobjectedit.cpp @@ -23,8 +23,8 @@ #include #include -PMDetailObjectEdit::PMDetailObjectEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDetailObjectEdit::PMDetailObjectEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -33,7 +33,7 @@ void PMDetailObjectEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pGlobalDetail = new TQCheckBox( i18n( "Global detail" ), this ); m_pLocalDetailLevelLabel = new TQLabel( i18n( "Detail level:" ), this ); m_pLocalDetailLevel = new TQComboBox( this ); @@ -43,10 +43,10 @@ void PMDetailObjectEdit::createTopWidgets( ) m_pLocalDetailLevel->insertItem( i18n( "High" ) ); m_pLocalDetailLevel->insertItem( i18n( "Very High" ) ); - layout->addWidget( m_pGlobalDetail ); - layout->addWidget( m_pLocalDetailLevelLabel ); - layout->addWidget( m_pLocalDetailLevel ); - layout->addStretch( ); + tqlayout->addWidget( m_pGlobalDetail ); + tqlayout->addWidget( m_pLocalDetailLevelLabel ); + tqlayout->addWidget( m_pLocalDetailLevel ); + tqlayout->addStretch( ); connect( m_pGlobalDetail, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotGlobalDetailClicked( ) ) ); connect( m_pLocalDetailLevel, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmdetailobjectedit.h b/kpovmodeler/pmdetailobjectedit.h index 74aa3a29..e6224d59 100644 --- a/kpovmodeler/pmdetailobjectedit.h +++ b/kpovmodeler/pmdetailobjectedit.h @@ -35,12 +35,13 @@ class TQComboBox; class PMDetailObjectEdit : public PMNamedObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMNamedObjectEdit Base; public: /** - * Creates a PMNamedObjectEdit with parent and name + * Creates a PMNamedObjectEdit with tqparent and name */ - PMDetailObjectEdit( TQWidget* parent, const char* name = 0 ); + PMDetailObjectEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdialogeditbase.cpp b/kpovmodeler/pmdialogeditbase.cpp index ea601be3..21430704 100644 --- a/kpovmodeler/pmdialogeditbase.cpp +++ b/kpovmodeler/pmdialogeditbase.cpp @@ -95,8 +95,8 @@ const TQString c_boxCode = TQString( const TQString c_globalSettingsCode = TQString( "global_settings { assumed_gamma %1 }\n" ); -PMDialogEditBase::PMDialogEditBase( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMDialogEditBase::PMDialogEditBase( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_pDisplayedObject = 0; m_pPart = 0; @@ -318,7 +318,7 @@ void PMDialogEditBase::findTextures( PMObject*& global, PMObject*& local ) const global = 0; local = 0; - for( o = m_pDisplayedObject; o; o = o->parent( ) ) + for( o = m_pDisplayedObject; o; o = o->tqparent( ) ) { if( o->type( ) == "Material" || o->type( ) == "Interior" || o->type( ) == "Texture" || o->type( ) == "Pigment" || @@ -390,7 +390,7 @@ void PMDialogEditBase::slotTexturePreview( ) buffer.open( IO_WriteOnly ); TQTextStream str( &buffer ); PMPovray31Format format; - PMSerializer* dev = format.newSerializer( &buffer ); + PMSerializer* dev = format.newSerializer( TQT_TQIODEVICE(&buffer) ); PMRenderMode mode; PMObjectList neededDeclares, objectsToCheck; TQPtrDict objectsToSerialize( 101 ); @@ -408,8 +408,8 @@ void PMDialogEditBase::slotTexturePreview( ) { link = rit.current( )->linkedObject( ); if( link ) - if( !neededDeclares.containsRef( link ) ) - if( !objectsToSerialize.find( link ) ) + if( !neededDeclares.tqcontainsRef( link ) ) + if( !objectsToSerialize.tqfind( link ) ) neededDeclares.append( link ); } objectsToSerialize.insert( it.current( ), it.current( ) ); @@ -427,14 +427,14 @@ void PMDialogEditBase::slotTexturePreview( ) PMObject* otr = o; // find the scene - while( otr->parent( ) ) otr = otr->parent( ); + while( otr->tqparent( ) ) otr = otr->tqparent( ); for( otr = otr->firstChild( ); otr && ( numDeclares > 0 ); otr = otr->nextSibling( ) ) { if( otr->type( ) == "Declare" ) { - if( objectsToSerialize.find( otr ) ) + if( objectsToSerialize.tqfind( otr ) ) { dev->serialize( otr ); numDeclares--; @@ -451,17 +451,17 @@ void PMDialogEditBase::slotTexturePreview( ) str << "union {\n"; if( s_showBox ) { - str << c_boxCode.arg( numObjects ); + str << c_boxCode.tqarg( numObjects ); numObjects++; } if( s_showCylinder ) { - str << c_cylinderCode.arg( numObjects ); + str << c_cylinderCode.tqarg( numObjects ); numObjects++; } if( s_showSphere ) { - str << c_sphereCode.arg( numObjects ); + str << c_sphereCode.tqarg( numObjects ); numObjects++; } @@ -495,18 +495,18 @@ void PMDialogEditBase::slotTexturePreview( ) { c1 = PMColor( s_wallColor1 ); c2 = PMColor( s_wallColor2 ); - str << c_wallCode.arg( c1.serialize( true ) ).arg( c2.serialize( true ) ); + str << c_wallCode.tqarg( c1.serialize( true ) ).tqarg( c2.serialize( true ) ); } if( s_showFloor ) { c1 = PMColor( s_floorColor1 ); c2 = PMColor( s_floorColor2 ); - str << c_floorCode.arg( c1.serialize( true ) ).arg( c2.serialize( true ) ); + str << c_floorCode.tqarg( c1.serialize( true ) ).tqarg( c2.serialize( true ) ); } str << c_lightCode; str << c_cameraCode[numObjects-1]; - str << c_globalSettingsCode.arg( s_previewGamma ); + str << c_globalSettingsCode.tqarg( s_previewGamma ); // Set the render mode mode.setHeight( s_previewSize ); @@ -519,7 +519,7 @@ void PMDialogEditBase::slotTexturePreview( ) m_pRenderFrame->setFixedSize( s_previewSize + m_pRenderFrame->frameWidth( ) * 2, s_previewSize + m_pRenderFrame->frameWidth( ) * 2 ); m_pRenderFrame->updateGeometry( ); - m_pTexturePreviewWidget->layout( )->activate( ); + m_pTexturePreviewWidget->tqlayout( )->activate( ); emit sizeChanged( ); m_pOutputWidget->slotClear( ); m_pRenderWidget->render( scene, mode, m_pPart->url( ) ); @@ -540,9 +540,9 @@ void PMDialogEditBase::slotPreviewFinished( int exitStatus ) KMessageBox::error( this, i18n( "Povray exited abnormally with " "exit code %1.\n" "See the povray output for details." ) - .arg( exitStatus ) ); + .tqarg( exitStatus ) ); } - else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) ) + else if( m_pRenderWidget->povrayOutput( ).tqcontains( "ERROR" ) ) { KMessageBox::error( this, i18n( "There were errors while rendering.\n" "See the povray output for details." ) ); diff --git a/kpovmodeler/pmdialogeditbase.h b/kpovmodeler/pmdialogeditbase.h index 6057648e..04a3dad7 100644 --- a/kpovmodeler/pmdialogeditbase.h +++ b/kpovmodeler/pmdialogeditbase.h @@ -42,7 +42,7 @@ class PMPovrayOutputWidget; /** * Base class for all widgets for editing object attributes. * - * Ensures a consistent layout for all widgets. Widgets should not + * Ensures a consistent tqlayout for all widgets. Widgets should not * created within the constructor, but with the functions @ref createTopWidgets * and @ref createBottomWidgets. * @@ -51,9 +51,10 @@ class PMPovrayOutputWidget; * of solid objects. Subclasses like the widget for the box object add their * object specific controls. */ -class PMDialogEditBase : public QWidget +class PMDialogEditBase : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Creates a new PMDialogEditBase widget objectType is @@ -62,7 +63,7 @@ public: * No widgets are created within the constructor! You have to call * @ref createWidgets after creating a new edit widget. */ - PMDialogEditBase( TQWidget* parent, const char* name = 0 ); + PMDialogEditBase( TQWidget* tqparent, const char* name = 0 ); /** * Destructor */ @@ -275,7 +276,7 @@ protected: * of the sub class. * * First call the function of the base class, then create and append - * the widgets to the top layout. + * the widgets to the top tqlayout. */ virtual void createTopWidgets( ) { }; @@ -283,7 +284,7 @@ protected: * Create widgets here, that should be placed under the widgets * of the sub class. * - * First create and append the widgets to the top layout, then + * First create and append the widgets to the top tqlayout, then * call the function of the base class */ virtual void createBottomWidgets( ); @@ -295,7 +296,7 @@ protected: virtual void saveContents( ); /** - * Returns a pointer to the top layout + * Returns a pointer to the top tqlayout */ TQBoxLayout* topLayout( ) const { return m_pTopLayout; } diff --git a/kpovmodeler/pmdialogview.cpp b/kpovmodeler/pmdialogview.cpp index 243427b5..1df22c26 100644 --- a/kpovmodeler/pmdialogview.cpp +++ b/kpovmodeler/pmdialogview.cpp @@ -39,8 +39,8 @@ #include #include -PMDialogEditContent::PMDialogEditContent( TQWidget* parent, const char* name ) - : TQScrollView( parent, name ) +PMDialogEditContent::PMDialogEditContent( TQWidget* tqparent, const char* name ) + : TQScrollView( tqparent, name ) { m_pContents = 0; setVScrollBarMode( AlwaysOff ); @@ -69,7 +69,7 @@ void PMDialogEditContent::calculateSize( ) int fw = lineWidth( ) * 2; if( m_pContents ) { - TQSize newSize = m_pContents->minimumSizeHint( ); + TQSize newSize = m_pContents->tqminimumSizeHint( ); setVScrollBarMode( AlwaysOff ); setHScrollBarMode( AlwaysOff ); @@ -111,8 +111,8 @@ void PMDialogEditContent::resizeEvent( TQResizeEvent* /* ev */ ) calculateSize( ); } -PMDialogView::PMDialogView( PMPart* part, TQWidget* parent, const char* name ) - : PMViewBase( parent, name ) +PMDialogView::PMDialogView( PMPart* part, TQWidget* tqparent, const char* name ) + : PMViewBase( tqparent, name ) { m_pDisplayedWidget = 0; m_unsavedData = false; @@ -174,7 +174,7 @@ PMDialogView::~PMDialogView( ) void PMDialogView::slotObjectChanged( PMObject* obj, const int mode, TQObject* sender ) { - if( sender == this ) + if( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(this) ) return; if( mode & PMCNewSelection ) { @@ -314,10 +314,10 @@ void PMDialogView::slotDataChanged( ) void PMDialogView::slotSizeChanged( ) { - // force recalculating of the layout + // force recalculating of the tqlayout if( m_pDisplayedWidget ) - if( m_pDisplayedWidget->layout( ) ) - m_pDisplayedWidget->layout( )->activate( ); + if( m_pDisplayedWidget->tqlayout( ) ) + m_pDisplayedWidget->tqlayout( )->activate( ); m_pHelper->calculateSize( ); } @@ -325,7 +325,7 @@ void PMDialogView::slotControlPointSelectionChanged( ) { if( m_pDisplayedWidget && m_pDisplayedWidget->displayedObject( ) ) emit objectChanged( m_pDisplayedWidget->displayedObject( ), - PMCControlPointSelection, this ); + PMCControlPointSelection, TQT_TQOBJECT(this) ); } void PMDialogView::displayObject( PMObject* obj, bool updateDescription ) diff --git a/kpovmodeler/pmdialogview.h b/kpovmodeler/pmdialogview.h index 680cbbc9..0b6209c3 100644 --- a/kpovmodeler/pmdialogview.h +++ b/kpovmodeler/pmdialogview.h @@ -40,11 +40,12 @@ class TQLabel; /** * Helper class for @ref PMDialogView */ -class PMDialogEditContent : public QScrollView +class PMDialogEditContent : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - PMDialogEditContent( TQWidget* parent, const char* name = 0 ); + PMDialogEditContent( TQWidget* tqparent, const char* name = 0 ); void setContents( TQWidget* wid ); void calculateSize( ); protected: @@ -63,11 +64,12 @@ private: class PMDialogView : public PMViewBase { Q_OBJECT + TQ_OBJECT public: /** * Creates a new PMDialogView widget */ - PMDialogView( PMPart* part, TQWidget* parent, const char* name = 0 ); + PMDialogView( PMPart* part, TQWidget* tqparent, const char* name = 0 ); /** * Deletes the widget */ @@ -154,9 +156,9 @@ public: virtual TQString viewType( ) const { return TQString( "dialogview" ); } virtual TQString description( ) const; virtual TQString iconName( ) const { return TQString( "pmdialogview" ); } - virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const + virtual PMViewBase* newInstance( TQWidget* tqparent, PMPart* part ) const { - return new PMDialogView( part, parent ); + return new PMDialogView( part, tqparent ); } }; diff --git a/kpovmodeler/pmdisc.cpp b/kpovmodeler/pmdisc.cpp index bda89579..4a526288 100644 --- a/kpovmodeler/pmdisc.cpp +++ b/kpovmodeler/pmdisc.cpp @@ -96,11 +96,11 @@ void PMDisc::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMDisc::metaObject( ) const +PMMetaObject* PMDisc::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Disc", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Disc", Base::tqmetaObject( ), createNewDisc ); s_pMetaObject->addProperty( new PMDiscProperty( "center", &PMDisc::setCenter, &PMDisc::center ) ); @@ -176,9 +176,9 @@ void PMDisc::setHoleRadius( double hradius ) } } -PMDialogEditBase* PMDisc::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMDisc::editWidget( TQWidget* tqparent ) const { - return new PMDiscEdit( parent ); + return new PMDiscEdit( tqparent ); } void PMDisc::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmdisc.h b/kpovmodeler/pmdisc.h index 62201bcf..482e5e1d 100644 --- a/kpovmodeler/pmdisc.h +++ b/kpovmodeler/pmdisc.h @@ -58,7 +58,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMDiscEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmdiscedit.cpp b/kpovmodeler/pmdiscedit.cpp index 0197a806..6b06207d 100644 --- a/kpovmodeler/pmdiscedit.cpp +++ b/kpovmodeler/pmdiscedit.cpp @@ -27,8 +27,8 @@ #include #include -PMDiscEdit::PMDiscEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDiscEdit::PMDiscEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -37,7 +37,7 @@ void PMDiscEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pCenter = new PMVectorEdit( "x", "y", "z", this ); @@ -53,18 +53,18 @@ void PMDiscEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "Normal:" ), this ), 1, 0 ); gl->addWidget( m_pNormal, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Hole radius:" ), this ), 1, 0 ); gl->addWidget( m_pHRadius, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); TQPushButton* nb = new TQPushButton( i18n( "Normalize" ), this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( nb ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( nb ); + tqlayout->addStretch( 1 ); connect( m_pCenter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmdiscedit.h b/kpovmodeler/pmdiscedit.h index 5ce4d111..73466f32 100644 --- a/kpovmodeler/pmdiscedit.h +++ b/kpovmodeler/pmdiscedit.h @@ -33,12 +33,13 @@ class PMDisc; class PMDiscEdit : public PMGraphicalObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMGraphicalObjectEdit Base; public: /** - * Creates a PMPlaneEdit with parent and name + * Creates a PMPlaneEdit with tqparent and name */ - PMDiscEdit( TQWidget* parent, const char* name = 0 ); + PMDiscEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdockwidget.cpp b/kpovmodeler/pmdockwidget.cpp index 67fbc1c7..1d13712f 100644 --- a/kpovmodeler/pmdockwidget.cpp +++ b/kpovmodeler/pmdockwidget.cpp @@ -36,7 +36,7 @@ #include #include #include -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include #include #endif @@ -134,15 +134,15 @@ public: * * @author Max Judin. */ -PMDockMainWindow::PMDockMainWindow( TQWidget* parent, const char *name, WFlags f) -:KMainWindow( parent, name, f ) +PMDockMainWindow::PMDockMainWindow( TQWidget* tqparent, const char *name, WFlags f) +:KMainWindow( tqparent, name, f ) { TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new PMDockManager( this, new_name.latin1() ); mainDockWidget = 0L; d = new PMDockMainWindowPrivate( ); - PartBase::setPartObject( this ); + PartBase::setPartObject( TQT_TQOBJECT(this) ); } PMDockMainWindow::~PMDockMainWindow() @@ -154,7 +154,7 @@ PMDockMainWindow::~PMDockMainWindow() // kparts/dockmainwindow stuff void PMDockMainWindow::createGUI( Part * part ) { - kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl; + kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").tqarg(part?part->name():"0L") << endl; KXMLGUIFactory *factory = guiFactory(); @@ -164,7 +164,7 @@ void PMDockMainWindow::createGUI( Part * part ) if ( d->m_activePart ) { - kdDebug(1000) << TQString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl; + kdDebug(1000) << TQString("deactivating GUI for %1").tqarg(d->m_activePart->name()) << endl; GUIActivateEvent ev( false ); TQApplication::sendEvent( d->m_activePart, &ev ); @@ -179,7 +179,7 @@ void PMDockMainWindow::createGUI( Part * part ) if( !d->m_bShellGUIActivated ) { - loadPlugins( this, this, KGlobal::instance() ); + loadPlugins( TQT_TQOBJECT(this), this, KGlobal::instance() ); createShellGUI(); d->m_bShellGUIActivated = true; } @@ -256,7 +256,7 @@ void PMDockMainWindow::setMainDockWidget( PMDockWidget* mdw ) void PMDockMainWindow::setView( TQWidget *view ) { if ( view->isA("PMDockWidget") ){ - if ( view->parent() != this ) ((PMDockWidget*)view)->applyToWidget( this ); + if ( TQT_BASE_OBJECT(view->tqparent()) != TQT_BASE_OBJECT(this) ) ((PMDockWidget*)view)->applyToWidget( this ); } #ifndef NO_KDE2 @@ -266,9 +266,9 @@ void PMDockMainWindow::setView( TQWidget *view ) #endif } -PMDockWidget* PMDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) +PMDockWidget* PMDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel) { - return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); + return new PMDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel ); } void PMDockMainWindow::makeDockVisible( PMDockWidget* dock ) @@ -319,15 +319,15 @@ void PMDockMainWindow::slotDockWidgetUndocked() } /*************************************************************************/ -PMDockWidgetAbstractHeaderDrag::PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, const char* name ) -:TQFrame( parent, name ) +PMDockWidgetAbstractHeaderDrag::PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name ) +:TQFrame( tqparent, name ) { dw = dock; installEventFilter( dock->dockManager() ); } /*************************************************************************/ -PMDockWidgetHeaderDrag::PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, const char* name ) -:PMDockWidgetAbstractHeaderDrag( parent, dock, name ) +PMDockWidgetHeaderDrag::PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name ) +:PMDockWidgetAbstractHeaderDrag( tqparent, dock, name ) { } @@ -337,33 +337,33 @@ void PMDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) paint.begin( this ); - style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); + tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); paint.end(); } /*************************************************************************/ -PMDockWidgetAbstractHeader::PMDockWidgetAbstractHeader( PMDockWidget* parent, const char* name ) -:TQFrame( parent, name ) +PMDockWidgetAbstractHeader::PMDockWidgetAbstractHeader( PMDockWidget* tqparent, const char* name ) +:TQFrame( tqparent, name ) { } /*************************************************************************/ -PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) -:PMDockWidgetAbstractHeader( parent, name ) +PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* tqparent, const char* name ) +:PMDockWidgetAbstractHeader( tqparent, name ) { - layout = new TQHBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQHBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); - drag = new PMDockWidgetHeaderDrag( this, parent ); + drag = new PMDockWidgetHeaderDrag( this, tqparent ); closeButton = new PMDockButton_Private( this, "DockCloseButton" ); closeButton->setPixmap( const_cast< const char** >(close_xpm) ); int buttonWidth = 9, buttonHeight = 9; closeButton->setFixedSize(buttonWidth,buttonHeight); - connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked())); + connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerCloseButtonClicked())); // MODIFICATION (zehender) // The shell will delete the widget // undock is unnecessary - // connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock())); + // connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(undock())); stayButton = new PMDockButton_Private( this, "DockStayButton" ); stayButton->setToggleButton( true ); @@ -375,8 +375,8 @@ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) dockbackButton = new PMDockButton_Private( this, "DockbackButton" ); dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm)); dockbackButton->setFixedSize(buttonWidth,buttonHeight); - connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked())); - connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack())); + connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerDockbackButtonClicked())); + connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(dockBack())); // MODIFICATION (zehender) // Add a button to undock the widget and dock it as top level @@ -384,21 +384,21 @@ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) toDesktopButton = new PMDockButton_Private( this, "ToDesktopButton" ); toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm)); toDesktopButton->setFixedSize(buttonWidth,buttonHeight); - connect( toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop())); + connect( toDesktopButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(toDesktop())); - layout->addWidget( drag ); - layout->addWidget( dockbackButton ); - layout->addWidget( toDesktopButton ); - layout->addWidget( stayButton ); - layout->addWidget( closeButton ); - layout->activate(); - drag->setFixedHeight( layout->minimumSize().height() ); + tqlayout->addWidget( drag ); + tqlayout->addWidget( dockbackButton ); + tqlayout->addWidget( toDesktopButton ); + tqlayout->addWidget( stayButton ); + tqlayout->addWidget( closeButton ); + tqlayout->activate(); + drag->setFixedHeight( tqlayout->tqminimumSize().height() ); } void PMDockWidgetHeader::setTopLevel( bool isTopLevel ) { if ( isTopLevel ){ - PMDockWidget* par = (PMDockWidget*)parent(); + PMDockWidget* par = (PMDockWidget*)tqparent(); if( par) { if( par->isDockBackPossible()) dockbackButton->show(); @@ -415,7 +415,7 @@ void PMDockWidgetHeader::setTopLevel( bool isTopLevel ) closeButton->show(); toDesktopButton->show(); } - layout->activate(); + tqlayout->activate(); updateGeometry(); } @@ -423,20 +423,20 @@ void PMDockWidgetHeader::setDragPanel( PMDockWidgetHeaderDrag* nd ) { if ( !nd ) return; - delete layout; - layout = new TQHBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + delete tqlayout; + tqlayout = new TQHBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); delete drag; drag = nd; - layout->addWidget( drag ); - layout->addWidget( dockbackButton ); - layout->addWidget( toDesktopButton ); - layout->addWidget( stayButton ); - layout->addWidget( closeButton ); - layout->activate(); - drag->setFixedHeight( layout->minimumSize().height() ); + tqlayout->addWidget( drag ); + tqlayout->addWidget( dockbackButton ); + tqlayout->addWidget( toDesktopButton ); + tqlayout->addWidget( stayButton ); + tqlayout->addWidget( closeButton ); + tqlayout->activate(); + drag->setFixedHeight( tqlayout->tqminimumSize().height() ); } void PMDockWidgetHeader::slotStayClicked() @@ -459,18 +459,18 @@ void PMDockWidgetHeader::setDragEnabled(bool b) #ifndef NO_KDE2 void PMDockWidgetHeader::saveConfig( KConfig* c ) { - c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); + c->writeEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), stayButton->isOn() ); } void PMDockWidgetHeader::loadConfig( KConfig* c ) { - setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); + setDragEnabled( !c->readBoolEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), false ) ); } #endif /*************************************************************************/ -PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f) -: TQWidget( parent, name, f ) +PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f) +: TQWidget( tqparent, name, f ) ,formerBrotherDockWidget(0L) ,currentDockPos(DockNone) ,formerDockPos(DockNone) @@ -479,13 +479,13 @@ PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const { d = new PMDockWidgetPrivate(); // create private data - d->_parent = parent; + d->_parent = tqparent; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); manager = dockManager; - manager->childDock->append( this ); + manager->childDock->append( TQT_TQOBJECT(this) ); installEventFilter( manager ); header = 0L; @@ -510,7 +510,7 @@ PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const widget = 0L; TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) ); - applyToWidget( parent, TQPoint(0,0) ); + applyToWidget( tqparent, TQPoint(0,0) ); } void PMDockWidget::slotSetCaption( const TQString& str ) @@ -527,7 +527,7 @@ PMDockWidget::~PMDockWidget() d->blockHasUndockedSignal = false; } emit iMBeingClosed(); - manager->childDock->remove( this ); + manager->childDock->remove( TQT_TQOBJECT(this) ); delete pix; delete d; // destroy private data } @@ -538,15 +538,15 @@ void PMDockWidget::setHeader( PMDockWidgetAbstractHeader* h ) if ( header ){ delete header; - delete layout; + delete tqlayout; header = h; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); - layout->addWidget( header ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); + tqlayout->addWidget( header ); setWidget( widget ); } else { header = h; - layout->addWidget( header ); + tqlayout->addWidget( header ); } } @@ -558,8 +558,8 @@ void PMDockWidget::setEnableDocking( int pos ) void PMDockWidget::updateHeader() { - if ( parent() ){ - if ( (parent() == manager->main) || isGroup || (eDocking == PMDockWidget::DockNone) ){ + if ( tqparent() ){ + if ( (TQT_BASE_OBJECT(tqparent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == PMDockWidget::DockNone) ){ header->hide(); } else { header->setTopLevel( false ); @@ -573,7 +573,7 @@ void PMDockWidget::updateHeader() void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) { - if ( parent() != s ) + if ( TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(s) ) { hide(); reparent(s, 0, TQPoint(0,0), false); @@ -584,7 +584,7 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) } if ( s == manager->main ){ - setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) ); + setGeometry( TQRect(TQPoint(0,0), manager->main->tqgeometry().size()) ); } if ( !s ) @@ -592,7 +592,7 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) move(p); #ifndef NO_KDE2 -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (d->transient && d->_parent) XSetTransientForHint( qt_xdisplay(), winId(), d->_parent->winId() ); @@ -608,11 +608,11 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) void PMDockWidget::show() { - if ( parent() || manager->main->isVisible() ) - if ( !parent() ){ + if ( tqparent() || manager->main->isVisible() ) + if ( !tqparent() ){ emit manager->setDockDefaultPos( this ); emit setDockDefaultPos(); - if ( parent() ){ + if ( tqparent() ){ makeDockVisible(); } else { TQWidget::show(); @@ -627,16 +627,16 @@ void PMDockWidget::show() void PMDockWidget::setDockWindowType (NET::WindowType windowType) { d->windowType = windowType; - applyToWidget( parentWidget(), TQPoint(0,0) ); + applyToWidget( tqparentWidget(), TQPoint(0,0) ); } #endif -void PMDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled) +void PMDockWidget::setDockWindowTransient (TQWidget *tqparent, bool transientEnabled) { - d->_parent = parent; + d->_parent = tqparent; d->transient = transientEnabled; - applyToWidget( parentWidget(), TQPoint(0,0) ); + applyToWidget( tqparentWidget(), TQPoint(0,0) ); } bool PMDockWidget::event( TQEvent* pevent ) @@ -663,13 +663,13 @@ bool PMDockWidget::event( TQEvent* pevent ) emit manager->change(); break; case TQEvent::CaptionChange: - if ( parentWidget() ){ - if ( parent()->inherits("PMDockSplitter") ){ - ((PMDockSplitter*)(parent()))->updateName(); + if ( tqparentWidget() ){ + if ( tqparent()->inherits("PMDockSplitter") ){ + ((PMDockSplitter*)(tqparent()))->updateName(); } - if ( parentDockTabGroup() ){ - setDockTabName( parentDockTabGroup() ); - parentDockTabGroup()->setTabLabel( this, tabPageLabel() ); + if ( tqparentDockTabGroup() ){ + setDockTabName( tqparentDockTabGroup() ); + tqparentDockTabGroup()->setTabLabel( this, tabPageLabel() ); } } break; @@ -686,10 +686,10 @@ bool PMDockWidget::event( TQEvent* pevent ) } #undef KeyPress bool processed = TQWidget::event( pevent ); - if( pevent->type( ) == TQEvent::AccelOverride && !processed && !parent( ) ){ + if( pevent->type( ) == TQEvent::AccelOverride && !processed && !tqparent( ) ){ // MODIFICATION (zehender) // floating widget, post event to main window - processed = qApp->sendEvent( manager->dockMainWidget( ), pevent ); + processed = tqApp->sendEvent( manager->dockMainWidget( ), pevent ); } return processed; } @@ -702,7 +702,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP bool succes = true; // tested flag // do not dock into a floating widget - if( target && !target->parent( ) ) + if( target && !target->tqparent( ) ) target = 0; // check allowed this dock submit this operations @@ -715,18 +715,18 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP succes = false; } - if ( parent() && !parent()->inherits("PMDockSplitter") && !parentDockTabGroup() ){ + if ( tqparent() && !tqparent()->inherits("PMDockSplitter") && !tqparentDockTabGroup() ){ succes = false; } // if docking to a tab group, and position is not center - // dock to the parent of the tab group + // dock to the tqparent of the tab group if( target && ( dockPos != PMDockWidget::DockCenter ) && ( dockPos != PMDockWidget::DockNone ) ) { - TQWidget* pdt = target->parentDockTabGroup( ); + TQWidget* pdt = target->tqparentDockTabGroup( ); if( pdt ) - return manualDock( ( PMDockWidget* ) ( pdt->parent( ) ), + return manualDock( ( PMDockWidget* ) ( pdt->tqparent( ) ), dockPos, spliPos, pos, check, tabIndex ); } @@ -759,25 +759,25 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP return this; } - PMDockTabGroup* parentTab = target->parentDockTabGroup(); - if ( parentTab ){ + PMDockTabGroup* tqparentTab = target->tqparentDockTabGroup(); + if ( tqparentTab ){ // add to existing TabGroup - applyToWidget( parentTab ); - parentTab->insertTab( this, icon() ? *icon() : TQPixmap(), + applyToWidget( tqparentTab ); + tqparentTab->insertTab( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); - setDockTabName( parentTab ); + setDockTabName( tqparentTab ); if( !toolTipStr.isEmpty()) - parentTab->setTabToolTip( this, toolTipStr); + tqparentTab->setTabToolTip( this, toolTipStr); currentDockPos = PMDockWidget::DockCenter; emit manager->change(); - return (PMDockWidget*)parentTab->parent(); + return (PMDockWidget*)tqparentTab->tqparent(); } // MODIFICATION (Zehender): // If DockPosition is DockLeft or DockRight, add the widget // left or right of the target, so that a new vertical splitter - // (a splitter with horizontal widget layout :-) is created + // (a splitter with horizontal widget tqlayout :-) is created // that spawns the full height of the main view if( ( dockPos == PMDockWidget::DockLeft ) || @@ -792,18 +792,18 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP { PMDockWidget* dw = ( PMDockWidget* ) wtarget; newTarget = dw; - TQWidget* pw = wtarget->parentWidget( ); + TQWidget* pw = wtarget->tqparentWidget( ); if( pw ) { if( pw->inherits( "PMDockSplitter" ) ) { PMDockSplitter* ds = ( PMDockSplitter* ) pw; - if( ds->splitterOrientation( ) == Vertical ) + if( ds->splitterOrientation( ) ==Qt::Vertical ) found = true; } } } - wtarget = wtarget->parentWidget( ); + wtarget = wtarget->tqparentWidget( ); } if( newTarget != target ) @@ -813,8 +813,8 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP // END MODIFICATION // create a new dockwidget that will contain the target and this - TQWidget* parentDock = target->parentWidget(); - PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(""), parentDock ); + TQWidget* tqparentDock = target->tqparentWidget(); + PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(TQString("")), tqparentDock ); newDock->currentDockPos = target->currentDockPos; if ( dockPos == PMDockWidget::DockCenter ){ @@ -824,12 +824,12 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP } newDock->eDocking = (target->eDocking & eDocking) & (~(int)PMDockWidget::DockCenter); - newDock->applyToWidget( parentDock ); + newDock->applyToWidget( tqparentDock ); - if ( !parentDock ){ + if ( !tqparentDock ){ // dock to a toplevel dockwidget means newDock is toplevel now newDock->move( target->frameGeometry().topLeft() ); - newDock->resize( target->geometry().size() ); + newDock->resize( target->tqgeometry().size() ); if ( target->isVisibleToTLW() ) newDock->show(); } @@ -874,13 +874,13 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP // if to dock not to the center of the target dockwidget, // dock to newDock PMDockSplitter* panner = 0L; - if ( dockPos == PMDockWidget::DockTop || dockPos == PMDockWidget::DockBottom ) panner = new PMDockSplitter( newDock, "_dock_split_", Horizontal, spliPos, manager->splitterHighResolution() ); - if ( dockPos == PMDockWidget::DockLeft || dockPos == PMDockWidget::DockRight ) panner = new PMDockSplitter( newDock, "_dock_split_", Vertical , spliPos, manager->splitterHighResolution() ); + if ( dockPos == PMDockWidget::DockTop || dockPos == PMDockWidget::DockBottom ) panner = new PMDockSplitter( newDock, "_dock_split_",Qt::Horizontal, spliPos, manager->splitterHighResolution() ); + if ( dockPos == PMDockWidget::DockLeft || dockPos == PMDockWidget::DockRight ) panner = new PMDockSplitter( newDock, "_dock_split_",Qt::Vertical , spliPos, manager->splitterHighResolution() ); newDock->setWidget( panner ); panner->setOpaqueResize(manager->splitterOpaqueResize()); panner->setKeepSize(manager->splitterKeepSize()); - panner->setFocusPolicy( NoFocus ); + panner->setFocusPolicy( TQ_NoFocus ); target->applyToWidget( panner ); applyToWidget( panner ); target->formerDockPos = target->currentDockPos; @@ -909,9 +909,9 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP panner->show(); } - if ( parentDock ){ - if ( parentDock->inherits("PMDockSplitter") ){ - PMDockSplitter* sp = (PMDockSplitter*)parentDock; + if ( tqparentDock ){ + if ( tqparentDock->inherits("PMDockSplitter") ){ + PMDockSplitter* sp = (PMDockSplitter*)tqparentDock; sp->deactivate(); if ( sp->getFirst() == target ) sp->activate( newDock, 0L ); @@ -928,10 +928,10 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP return newDock; } -PMDockTabGroup* PMDockWidget::parentDockTabGroup() const +PMDockTabGroup* PMDockWidget::tqparentDockTabGroup() const { - if ( !parent() ) return 0L; - TQWidget* candidate = parentWidget()->parentWidget(); + if ( !tqparent() ) return 0L; + TQWidget* candidate = tqparentWidget()->tqparentWidget(); if ( candidate && candidate->inherits("PMDockTabGroup") ) return (PMDockTabGroup*)candidate; return 0L; } @@ -948,8 +948,8 @@ void PMDockWidget::toDesktop() void PMDockWidget::undock() { - TQWidget* parentW = parentWidget(); - if ( !parentW ){ + TQWidget* tqparentW = tqparentWidget(); + if ( !tqparentW ){ hide(); if (!d->blockHasUndockedSignal) emit hasUndocked(); @@ -962,73 +962,73 @@ void PMDockWidget::undock() manager->blockSignals(true); manager->undockProcess = true; - bool isV = parentW->isVisibleToTLW(); + bool isV = tqparentW->isVisibleToTLW(); - PMDockTabGroup* parentTab = parentDockTabGroup(); - if ( parentTab ){ - d->index = parentTab->indexOf( this); // memorize the page position in the tab widget - parentTab->removePage( this ); - formerBrotherDockWidget = (PMDockWidget*)parentTab->page(0); + PMDockTabGroup* tqparentTab = tqparentDockTabGroup(); + if ( tqparentTab ){ + d->index = tqparentTab->indexOf( this); // memorize the page position in the tab widget + tqparentTab->removePage( this ); + formerBrotherDockWidget = (PMDockWidget*)tqparentTab->page(0); TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); applyToWidget( 0L ); - if ( parentTab->count() == 1 ){ + if ( tqparentTab->count() == 1 ){ // last subdock widget in the tab control - PMDockWidget* lastTab = (PMDockWidget*)parentTab->page(0); - parentTab->removePage( lastTab ); + PMDockWidget* lastTab = (PMDockWidget*)tqparentTab->page(0); + tqparentTab->removePage( lastTab ); lastTab->applyToWidget( 0L ); - lastTab->move( parentTab->mapToGlobal(parentTab->frameGeometry().topLeft()) ); + lastTab->move( tqparentTab->mapToGlobal(tqparentTab->frameGeometry().topLeft()) ); - // PMDockTabGroup always have a parent that is a PMDockWidget - PMDockWidget* parentOfTab = (PMDockWidget*)parentTab->parent(); - delete parentTab; // PMDockTabGroup + // PMDockTabGroup always have a tqparent that is a PMDockWidget + PMDockWidget* tqparentOfTab = (PMDockWidget*)tqparentTab->tqparent(); + delete tqparentTab; // PMDockTabGroup - TQWidget* parentOfDockWidget = parentOfTab->parentWidget(); - if ( parentOfDockWidget == 0L ){ + TQWidget* tqparentOfDockWidget = tqparentOfTab->tqparentWidget(); + if ( tqparentOfDockWidget == 0L ){ if ( isV ) lastTab->show(); } else { - if ( parentOfDockWidget->inherits("PMDockSplitter") ){ - PMDockSplitter* split = (PMDockSplitter*)parentOfDockWidget; + if ( tqparentOfDockWidget->inherits("PMDockSplitter") ){ + PMDockSplitter* split = (PMDockSplitter*)tqparentOfDockWidget; lastTab->applyToWidget( split ); split->deactivate(); - if ( split->getFirst() == parentOfTab ){ + if ( split->getFirst() == tqparentOfTab ){ split->activate( lastTab ); - if ( ((PMDockWidget*)split->parent())->splitterOrientation == Vertical ) - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockLeft ); + if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical ) + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockLeft ); else - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockTop ); + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockTop ); } else { split->activate( 0L, lastTab ); - if ( ((PMDockWidget*)split->parent())->splitterOrientation == Vertical ) - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockRight ); + if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical ) + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockRight ); else - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockBottom ); + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockBottom ); } split->show(); } else { - lastTab->applyToWidget( parentOfDockWidget ); + lastTab->applyToWidget( tqparentOfDockWidget ); } lastTab->show(); } manager->blockSignals(false); - emit manager->replaceDock( parentOfTab, lastTab ); - lastTab->currentDockPos = parentOfTab->currentDockPos; - emit parentOfTab->iMBeingClosed(); + emit manager->replaceDock( tqparentOfTab, lastTab ); + lastTab->currentDockPos = tqparentOfTab->currentDockPos; + emit tqparentOfTab->iMBeingClosed(); manager->blockSignals(true); - delete parentOfTab; + delete tqparentOfTab; } else { - setDockTabName( parentTab ); + setDockTabName( tqparentTab ); } } else { /*********************************************************************************************/ - if ( parentW->inherits("PMDockSplitter") ){ - PMDockSplitter* parentSplitterOfDockWidget = (PMDockSplitter*)parentW; - d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos(); + if ( tqparentW->inherits("PMDockSplitter") ){ + PMDockSplitter* tqparentSplitterOfDockWidget = (PMDockSplitter*)tqparentW; + d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos(); - PMDockWidget* secondWidget = (PMDockWidget*)parentSplitterOfDockWidget->getAnother( this ); - PMDockWidget* group = (PMDockWidget*)parentSplitterOfDockWidget->parentWidget(); + PMDockWidget* secondWidget = (PMDockWidget*)tqparentSplitterOfDockWidget->getAnother( this ); + PMDockWidget* group = (PMDockWidget*)tqparentSplitterOfDockWidget->tqparentWidget(); formerBrotherDockWidget = secondWidget; applyToWidget( 0L ); group->hide(); @@ -1037,25 +1037,25 @@ void PMDockWidget::undock() TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); - if ( !group->parentWidget() ){ + if ( !group->tqparentWidget() ){ secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() ); secondWidget->resize( group->width(), group->height() ); } else { - TQWidget* obj = group->parentWidget(); + TQWidget* obj = group->tqparentWidget(); secondWidget->applyToWidget( obj ); if ( obj->inherits("PMDockSplitter") ){ - PMDockSplitter* parentOfGroup = (PMDockSplitter*)obj; - parentOfGroup->deactivate(); + PMDockSplitter* tqparentOfGroup = (PMDockSplitter*)obj; + tqparentOfGroup->deactivate(); - if ( parentOfGroup->getFirst() == group ) - parentOfGroup->activate( secondWidget ); + if ( tqparentOfGroup->getFirst() == group ) + tqparentOfGroup->activate( secondWidget ); else - parentOfGroup->activate( 0L, secondWidget ); + tqparentOfGroup->activate( 0L, secondWidget ); } } secondWidget->currentDockPos = group->currentDockPos; secondWidget->formerDockPos = group->formerDockPos; - delete parentSplitterOfDockWidget; + delete tqparentSplitterOfDockWidget; manager->blockSignals(false); emit manager->replaceDock( group, secondWidget ); emit group->iMBeingClosed(); @@ -1081,18 +1081,18 @@ void PMDockWidget::setWidget( TQWidget* mw ) { if ( !mw ) return; - if ( mw->parent() != this ){ + if ( TQT_BASE_OBJECT(mw->tqparent()) != TQT_BASE_OBJECT(this) ){ mw->reparent(this, 0, TQPoint(0,0), false); } widget = mw; - delete layout; + delete tqlayout; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); - layout->addWidget( header ); - layout->addWidget( widget,1 ); + tqlayout->addWidget( header ); + tqlayout->addWidget( widget,1 ); } void PMDockWidget::setDockTabName( PMDockTabGroup* tab ) @@ -1107,24 +1107,24 @@ void PMDockWidget::setDockTabName( PMDockTabGroup* tab ) listOfCaption.remove( listOfCaption.length()-1, 1 ); listOfName.remove( listOfName.length()-1, 1 ); - tab->parentWidget()->setName( listOfName.utf8() ); - tab->parentWidget()->setCaption( listOfCaption ); + tab->tqparentWidget()->setName( listOfName.utf8() ); + tab->tqparentWidget()->setCaption( listOfCaption ); - tab->parentWidget()->repaint( false ); // PMDockWidget->repaint - if ( tab->parentWidget()->parent() ) - if ( tab->parentWidget()->parent()->inherits("PMDockSplitter") ) - ((PMDockSplitter*)(tab->parentWidget()->parent()))->updateName(); + tab->tqparentWidget()->tqrepaint( false ); // PMDockWidget->tqrepaint + if ( tab->tqparentWidget()->tqparent() ) + if ( tab->tqparentWidget()->tqparent()->inherits("PMDockSplitter") ) + ((PMDockSplitter*)(tab->tqparentWidget()->tqparent()))->updateName(); } bool PMDockWidget::mayBeHide() const { - bool f = (parent() != manager->main); + bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main)); return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)PMDockWidget::DockNone ) ); } bool PMDockWidget::mayBeShow() const { - bool f = (parent() != manager->main); + bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main)); return ( !isGroup && !isTabGroup && f && !isVisible() ); } @@ -1146,18 +1146,18 @@ void PMDockWidget::changeHideShowState() void PMDockWidget::makeDockVisible() { - if ( parentDockTabGroup() ){ - parentDockTabGroup()->showPage( this ); + if ( tqparentDockTabGroup() ){ + tqparentDockTabGroup()->showPage( this ); } if ( isVisible() ) return; - TQWidget* p = parentWidget(); + TQWidget* p = tqparentWidget(); while ( p ){ if ( !p->isVisible() ) p->show(); - p = p->parentWidget(); + p = p->tqparentWidget(); } - if( parent() == 0L) // is undocked + if( tqparent() == 0L) // is undocked dockBack(); show(); } @@ -1168,13 +1168,13 @@ void PMDockWidget::loseFormerBrotherDockWidget() TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); formerBrotherDockWidget = 0L; - repaint(); + tqrepaint(); } void PMDockWidget::dockBack() { if( formerBrotherDockWidget) { - // search all children if it tries to dock back to a child + // search all tqchildren if it tries to dock back to a child bool found = false; TQObjectList* cl = queryList("PMDockWidget"); TQObjectListIt it( *cl ); @@ -1199,7 +1199,7 @@ void PMDockWidget::dockBack() // else dockback to the dockmainwindow (default behaviour) manualDock( ((PMDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index); formerBrotherDockWidget = 0L; - if (parent()) + if (tqparent()) makeDockVisible(); } @@ -1306,7 +1306,7 @@ void PMDockManager::activate() while ( (obj=(PMDockWidget*)it.current()) ) { ++it; if ( obj->widget ) obj->widget->show(); - if ( !obj->parentDockTabGroup() ){ + if ( !obj->tqparentDockTabGroup() ){ obj->show(); } } @@ -1316,21 +1316,21 @@ void PMDockManager::activate() bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) { /* This doesn't seem to fullfill any sense, other than breaking - QMainWindow's layout all over the place + TQMainWindow's tqlayout all over the place The first child of the mainwindow is not necessarily a meaningful - content widget but in Qt3's TQMainWindow it can easily be a TQToolBar. - In short: TQMainWindow knows how to layout its children, no need to + content widget but in TQt3's TQMainWindow it can easily be a TQToolBar. + In short: TQMainWindow knows how to tqlayout its tqchildren, no need to mess that up. >>>>>I need this in the PMDockArea at the moment (JoWenn) - if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast(main) && main->children() ){ + if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast(main) && main->tqchildren() ){ #ifndef NO_KDE2 - kdDebug()<<"PMDockManager::eventFilter(): main is a PMDockArea and there are children"<children()->getFirst(); + TQWidget* fc = (TQWidget*)main->tqchildren()->getFirst(); if ( fc ) - fc->setGeometry( TQRect(TQPoint(0,0), main->geometry().size()) ); + fc->setGeometry( TQRect(TQPoint(0,0), main->tqgeometry().size()) ); } */ @@ -1343,11 +1343,11 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) else curdw->toDesktop( ); break; case TQEvent::MouseButtonPress: - if ( ((TQMouseEvent*)event)->button() == LeftButton ){ + if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ if ( curdw->eDocking != (int)PMDockWidget::DockNone ){ dropCancel = true; curdw->setFocus(); - qApp->processOneEvent(); + tqApp->processOneEvent(); currentDragWidget = curdw; currentMoveWidget = 0L; @@ -1356,7 +1356,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) findChildDockWidget( curdw, *childDockWidgetList ); d->oldDragRect = TQRect(); - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); @@ -1367,7 +1367,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) } break; case TQEvent::MouseButtonRelease: - if ( ((TQMouseEvent*)event)->button() == LeftButton ){ + if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ if ( draging ){ if ( !dropCancel ) drop(); @@ -1377,7 +1377,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; d->oldDragRect = TQRect(); - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); @@ -1398,7 +1398,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) break; } else { if (dropCancel && curdw) { - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); }else @@ -1426,7 +1426,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; } - if ( (((TQMouseEvent*)event)->state() == LeftButton) && + if ( (((TQMouseEvent*)event)->state() == Qt::LeftButton) && (curdw->eDocking != (int)PMDockWidget::DockNone) ) { startDrag( curdw); } @@ -1454,7 +1454,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) return 0L; } #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) - p = p->topLevelWidget(); + p = p->tqtopLevelWidget(); #endif TQWidget* w = 0L; findChildDockWidget( w, p, p->mapFromGlobal(pos) ); @@ -1464,11 +1464,11 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) } w = p; } - if ( qt_find_obj_child( w, "PMDockSplitter", "_dock_split_" ) ) return 0L; - if ( qt_find_obj_child( w, "PMDockTabGroup", "_dock_tab" ) ) return 0L; + if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockSplitter", "_dock_split_" ) ) return 0L; + if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockTabGroup", "_dock_tab" ) ) return 0L; if (!childDockWidgetList) return 0L; - if ( childDockWidgetList->find(w) != -1 ) return 0L; - if ( currentDragWidget->isGroup && ((PMDockWidget*)w)->parentDockTabGroup() ) return 0L; + if ( childDockWidgetList->tqfind(w) != -1 ) return 0L; + if ( currentDragWidget->isGroup && ((PMDockWidget*)w)->tqparentDockTabGroup() ) return 0L; PMDockWidget* www = (PMDockWidget*)w; if ( www->dockSite( ) == (int)PMDockWidget::DockNone ) return 0L; @@ -1503,14 +1503,15 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos ) { - if ( p->children() ) { + TQObjectList clo = p->childrenListObject(); + if ( !clo.isEmpty() ) { TQWidget *w; - TQObjectListIt it( *p->children() ); + TQObjectListIt it( clo ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { w = (TQWidget*)it.current(); - if ( w->isVisible() && w->geometry().contains(pos) ) { + if ( w->isVisible() && w->tqgeometry().tqcontains(pos) ) { if ( w->inherits("PMDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); return; @@ -1524,9 +1525,10 @@ void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const void PMDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList& list ) { - if ( p->children() ) { + TQObjectList clo = p->childrenListObject(); + if ( !clo.isEmpty() ) { TQWidget *w; - TQObjectListIt it( *p->children() ); + TQObjectListIt it( clo ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { @@ -1547,7 +1549,7 @@ void PMDockManager::findFloatingWidgets( TQPtrList& l ) TQObjectListIt it( *childDock ); for( ; it.current( ); ++it ) if( it.current( )->inherits( "PMDockWidget" ) && - !it.current( )->parent( ) ) + !it.current( )->tqparent( ) ) l.append( ( PMDockWidget* ) it.current( ) ); } @@ -1557,9 +1559,9 @@ void PMDockManager::startDrag( PMDockWidget* w ) || ( w->currentDockPos == PMDockWidget::DockTop) || ( w->currentDockPos == PMDockWidget::DockBottom)) { w->prevSideDockPosBeforeDrag = w->currentDockPos; - if ( w->parentWidget()->inherits("PMDockSplitter") ){ - PMDockSplitter* parentSplitterOfDockWidget = (PMDockSplitter*)(w->parentWidget()); - w->d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos(); + if ( w->tqparentWidget()->inherits("PMDockSplitter") ){ + PMDockSplitter* tqparentSplitterOfDockWidget = (PMDockSplitter*)(w->tqparentWidget()); + w->d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos(); } } @@ -1575,7 +1577,7 @@ void PMDockManager::dragMove( PMDockWidget* dw, TQPoint pos ) PMDockWidget::DockPosition oldPos = curPos; TQSize r = dw->widget->size(); - if ( dw->parentDockTabGroup() ){ + if ( dw->tqparentDockTabGroup() ){ curPos = PMDockWidget::DockCenter; if ( oldPos != curPos ) { d->dragRect.setRect( p.x()+2, p.y()+2, r.width()-4, r.height()-4 ); @@ -1586,7 +1588,7 @@ void PMDockManager::dragMove( PMDockWidget* dw, TQPoint pos ) int w = r.width() / 3; int h = r.height() / 3; - PMDockMainWindow* mw = ( PMDockMainWindow* ) parent( ); + PMDockMainWindow* mw = ( PMDockMainWindow* ) tqparent( ); TQWidget* cw = mw->centralWidget( ); TQPoint cwp = cw->mapToGlobal( TQPoint( 0, 0 ) ); int cwh = cw->height( ); @@ -1658,7 +1660,7 @@ void PMDockManager::drop() drawDragRectangle(); // only the old rect will be deleted return; } - if ( !currentMoveWidget && !currentDragWidget->parent() ) { + if ( !currentMoveWidget && !currentDragWidget->tqparent() ) { currentDragWidget->move( TQCursor::pos() - d->dragOffset ); } else { @@ -1690,7 +1692,7 @@ static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagNam static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b) { - return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false")); + return createStringEntry(doc, tagName, TQString::tqfromLatin1(b? "true" : "false")); } @@ -1729,7 +1731,7 @@ static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName, TQStrListIterator it(list); for (; it.current(); ++it) { TQDomElement subel = doc.createElement(subTagName); - subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current()))); + subel.appendChild(doc.createTextNode(TQString::tqfromLatin1(it.current()))); el.appendChild(subel); } @@ -1798,8 +1800,8 @@ void PMDockManager::writeConfig(TQDomElement &base) TQObjectListIt it(*childDock); PMDockWidget *obj1; while ( (obj1=(PMDockWidget*)it.current()) ) { - if ( obj1->parent() == main ) - mainWidgetStr = TQString::fromLatin1(obj1->name()); + if ( TQT_BASE_OBJECT(obj1->tqparent()) == TQT_BASE_OBJECT(main) ) + mainWidgetStr = TQString::tqfromLatin1(obj1->name()); nList.append(obj1->name()); ++it; } @@ -1807,9 +1809,9 @@ void PMDockManager::writeConfig(TQDomElement &base) nList.first(); while ( nList.current() ) { PMDockWidget *obj = getDockWidgetFromName( nList.current() ); - if (obj->isGroup && (nameList.find( obj->firstName.latin1() ) == -1 - || nameList.find(obj->lastName.latin1()) == -1)) { - // Skip until children are saved (why?) + if (obj->isGroup && (nameList.tqfind( obj->firstName.latin1() ) == -1 + || nameList.tqfind(obj->lastName.latin1()) == -1)) { + // Skip until tqchildren are saved (why?) nList.next(); if ( !nList.current() ) nList.first(); continue; @@ -1839,9 +1841,9 @@ void PMDockManager::writeConfig(TQDomElement &base) groupEl = doc.createElement("dock"); } - groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name()))); - groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent())); - if ( !obj->parent() ) { + groupEl.appendChild(createStringEntry(doc, "name", TQString::tqfromLatin1(obj->name()))); + groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->tqparent())); + if ( !obj->tqparent() ) { groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible())); } @@ -1889,7 +1891,7 @@ void PMDockManager::readConfig(TQDomElement &base) PMDockWidget *obj1; while ( (obj1=(PMDockWidget*)it.current()) ) { if ( !obj1->isGroup && !obj1->isTabGroup ) { - if ( obj1->parent() ) + if ( obj1->tqparent() ) obj1->undock(); else obj1->hide(); @@ -1913,7 +1915,7 @@ void PMDockManager::readConfig(TQDomElement &base) PMDockWidget *second = getDockWidgetFromName(secondName); if (first && second) { obj = first->manualDock(second, - (orientation == (int)Vertical)? PMDockWidget::DockLeft : PMDockWidget::DockTop, + (orientation == (int)Qt::Vertical)? PMDockWidget::DockLeft : PMDockWidget::DockTop, separatorPos); if (obj) obj->setName(name.latin1()); @@ -2018,7 +2020,7 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) ++it; //debug(" +Add subdock %s", obj->name()); nList.append( obj->name() ); - if ( obj->parent() == main ) + if ( TQT_BASE_OBJECT(obj->tqparent()) == TQT_BASE_OBJECT(main) ) c->writeEntry( "Main:view", obj->name() ); } @@ -2032,15 +2034,15 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) } /*************************************************************************************************/ if ( obj->isGroup ){ - if ( findList.find( obj->firstName.latin1() ) != -1 && findList.find( obj->lastName.latin1() ) != -1 ){ + if ( findList.tqfind( obj->firstName.latin1() ) != -1 && findList.tqfind( obj->lastName.latin1() ) != -1 ){ c->writeEntry( cname+":type", "GROUP"); - if ( !obj->parent() ){ - c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + if ( !obj->tqparent() ){ + c->writeEntry( cname+":tqparent", "___null___"); + c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { - c->writeEntry( cname+":parent", "yes"); + c->writeEntry( cname+":tqparent", "yes"); } c->writeEntry( cname+":first_name", obj->firstName ); c->writeEntry( cname+":last_name", obj->lastName ); @@ -2055,9 +2057,9 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) } else { /*************************************************************************************************/ //debug(" Skip %s", nList.current()); - //if ( findList.find( obj->firstName ) == -1 ) + //if ( findList.tqfind( obj->firstName ) == -1 ) // debug(" ? Not found %s", obj->firstName); - //if ( findList.find( obj->lastName ) == -1 ) + //if ( findList.tqfind( obj->lastName ) == -1 ) // debug(" ? Not found %s", obj->lastName); nList.next(); if ( !nList.current() ) nList.first(); @@ -2066,12 +2068,12 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) /*************************************************************************************************/ if ( obj->isTabGroup){ c->writeEntry( cname+":type", "TAB_GROUP"); - if ( !obj->parent() ){ - c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + if ( !obj->tqparent() ){ + c->writeEntry( cname+":tqparent", "___null___"); + c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { - c->writeEntry( cname+":parent", "yes"); + c->writeEntry( cname+":tqparent", "yes"); } TQStrList list; for ( int i = 0; i < ((PMDockTabGroup*)obj->widget)->count(); ++i ) @@ -2086,9 +2088,9 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) nList.first(); } else { /*************************************************************************************************/ - if ( !obj->parent() ){ + if ( !obj->tqparent() ){ c->writeEntry( cname+":type", "NULL_DOCK"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { c->writeEntry( cname+":type", "DOCK"); @@ -2147,7 +2149,7 @@ void PMDockManager::readConfig( KConfig* c, TQString group ) ++it; if ( !obj->isGroup && !obj->isTabGroup ) { - if ( obj->parent() ) obj->undock(); else obj->hide(); + if ( obj->tqparent() ) obj->undock(); else obj->hide(); } } @@ -2163,9 +2165,9 @@ void PMDockManager::readConfig( KConfig* c, TQString group ) PMDockWidget* last = getDockWidgetFromName( c->readEntry( oname + ":last_name" ) ); int sepPos = c->readNumEntry( oname + ":sepPos" ); - Orientation p = (Orientation)c->readNumEntry( oname + ":orientation" ); + Qt::Orientation p = (Qt::Orientation)c->readNumEntry( oname + ":orientation" ); if ( first && last ){ - obj = first->manualDock( last, ( p == Vertical ) ? PMDockWidget::DockLeft : PMDockWidget::DockTop, sepPos ); + obj = first->manualDock( last, ( p ==Qt::Vertical ) ? PMDockWidget::DockLeft : PMDockWidget::DockTop, sepPos ); if (obj){ obj->setName( oname.latin1() ); } @@ -2197,8 +2199,8 @@ void PMDockManager::readConfig( KConfig* c, TQString group ) obj = tabDockGroup; } - if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){ - TQRect r = c->readRectEntry( oname + ":geometry" ); + if ( type == "NULL_DOCK" || c->readEntry( oname + ":tqparent") == "___null___" ){ + TQRect r = c->readRectEntry( oname + ":tqgeometry" ); obj = getDockWidgetFromName( oname ); obj->applyToWidget( 0L ); obj->setGeometry(r); @@ -2268,8 +2270,8 @@ PMDockWidget* PMDockManager::getDockWidgetFromName( const TQString& dockName ) PMDockWidget* autoCreate = 0L; if ( autoCreateDock ){ - autoCreate = new PMDockWidget( this, dockName.latin1(), TQPixmap("") ); - autoCreateDock->append( autoCreate ); + autoCreate = new PMDockWidget( this, dockName.latin1(), TQPixmap(TQString("")) ); + autoCreateDock->append( TQT_TQOBJECT(autoCreate) ); } return autoCreate; } @@ -2370,14 +2372,14 @@ void PMDockManager::drawDragRectangle() PMDockMainWindow* pMain = 0L; PMDockWidget* pTLDockWdg = 0L; TQWidget* topWdg; - if (pDockWdgAtRect->topLevelWidget() == main) { + if (pDockWdgAtRect->tqtopLevelWidget() == main) { isOverMainWdg = true; topWdg = pMain = (PMDockMainWindow*) main; unclipped = pMain->testWFlags( WPaintUnclipped ); pMain->setWFlags( WPaintUnclipped ); } else { - topWdg = pTLDockWdg = (PMDockWidget*) pDockWdgAtRect->topLevelWidget(); + topWdg = pTLDockWdg = (PMDockWidget*) pDockWdgAtRect->tqtopLevelWidget(); unclipped = pTLDockWdg->testWFlags( WPaintUnclipped ); pTLDockWdg->setWFlags( WPaintUnclipped ); } @@ -2392,7 +2394,7 @@ void PMDockManager::drawDragRectangle() pTLDockWdg->clearWFlags(WPaintUnclipped); } // draw the rectangle - p.setRasterOp(Qt::NotXorROP); + p.setRasterOp(TQt::NotXorROP); TQRect r = oldAndNewDragRect[i]; r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) ); p.drawRect(r.x(), r.y(), r.width(), r.height()); @@ -2406,8 +2408,8 @@ void PMDockManager::drawDragRectangle() #ifdef _JOWENN_EXPERIMENTAL_ -PMDockArea::PMDockArea( TQWidget* parent, const char *name) -:TQWidget( parent, name) +PMDockArea::PMDockArea( TQWidget* tqparent, const char *name) +:TQWidget( tqparent, name) { TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new PMDockManager( this, new_name.latin1() ); @@ -2419,9 +2421,9 @@ PMDockArea::~PMDockArea() delete dockManager; } -PMDockWidget* PMDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) +PMDockWidget* PMDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel) { - return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); + return new PMDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel ); } void PMDockArea::makeDockVisible( PMDockWidget* dock ) @@ -2462,7 +2464,7 @@ void PMDockArea::slotDockWidgetUndocked() void PMDockArea::resizeEvent(TQResizeEvent *rsize) { TQWidget::resizeEvent(rsize); - if (children()){ + if (!childrenListObject().isEmpty()){ #ifndef NO_KDE2 kdDebug()<<"PMDockArea::resize"<count();i++) +// for (unsigned int i=0;icount();i++) { -// TQPtrList list(children()); -// TQObject *obj=((TQPtrList)children())->at(i); - TQObject *obj=children()->getFirst(); +// TQPtrList list(tqchildren()); +// TQObject *obj=((TQPtrList)tqchildren())->at(i); + TQObject *obj=tqchildren()->getFirst(); if (split=dynamic_cast(obj)) { split->setGeometry( TQRect(TQPoint(0,0), size() )); @@ -2544,6 +2546,6 @@ void PMDockArea::virtual_hook( int, void* ) { /*KMainWindow::virtual_hook( id, data );*/ } -#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name +#ifndef NO_INCLUDE_TQMOCFILES // for TQt-only projects, because tmake doesn't take this name #include "pmdockwidget.moc" #endif diff --git a/kpovmodeler/pmdockwidget.h b/kpovmodeler/pmdockwidget.h index d6c083f2..28e85963 100644 --- a/kpovmodeler/pmdockwidget.h +++ b/kpovmodeler/pmdockwidget.h @@ -39,9 +39,9 @@ - PMDockWidget - IMPORTANT CLASS: the one and only dockwidget class - PMDockManager - helper class - PMDockMainWindow - IMPORTANT CLASS: a special KMainWindow that can have dockwidgets - - PMDockArea - like PMDockMainWindow but inherits just QWidget + - PMDockArea - like PMDockMainWindow but inherits just TQWidget - IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition! + IMPORTANT Note: This file compiles also in TQt-only mode by using the NO_KDE2 precompiler definition! */ /* @@ -106,18 +106,19 @@ class TQToolBar; * * @author Max Judin (documentation: Falk Brettschneider). */ -class PMDockWidgetAbstractHeader : public QFrame +class PMDockWidgetAbstractHeader : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget) + * @param tqparent the tqparent widget (usually a dockwidget) * @param name the object instance name */ - PMDockWidgetAbstractHeader( PMDockWidget* parent, const char* name = 0L ); + PMDockWidgetAbstractHeader( PMDockWidget* tqparent, const char* name = 0L ); /** * Destructs this. @@ -155,19 +156,20 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class PMDockWidgetAbstractHeaderDrag : public QFrame +class PMDockWidgetAbstractHeaderDrag : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget header) + * @param tqparent the tqparent widget (usually a dockwidget header) * @param dock the dockwidget where it belongs to * @param name the object instance name */ - PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* parent, + PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name = 0L ); /** @@ -203,16 +205,17 @@ private: class PMDockWidgetHeaderDrag : public PMDockWidgetAbstractHeaderDrag { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget header) + * @param tqparent the tqparent widget (usually a dockwidget header) * @param dock the dockwidget where it belongs to * @param name the object instance name */ - PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, + PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name = 0L ); /** @@ -244,15 +247,16 @@ private: class PMDockWidgetHeader : public PMDockWidgetAbstractHeader { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget) + * @param tqparent the tqparent widget (usually a dockwidget) * @param name the object instance name */ - PMDockWidgetHeader( PMDockWidget* parent, const char* name = 0L ); + PMDockWidgetHeader( PMDockWidget* tqparent, const char* name = 0L ); /** * Destructs this. @@ -301,9 +305,9 @@ protected slots: protected: /** - * A layout manager for placing the embedded buttons (close and stay) + * A tqlayout manager for placing the embedded buttons (close and stay) */ - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; /** * a little button for closing (undocking and hiding) the dockwidget @@ -346,15 +350,16 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class EXPORT_DOCKCLASS PMDockTabGroup : public QTabWidget +class EXPORT_DOCKCLASS PMDockTabGroup : public TQTabWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. It just calls the method of the base class. */ - PMDockTabGroup( TQWidget *parent = 0, const char *name = 0 ) - :TQTabWidget( parent, name ){}; + PMDockTabGroup( TQWidget *tqparent = 0, const char *name = 0 ) + :TQTabWidget( tqparent, name ){}; /** * Destructs a PMDockTabGroup. @@ -373,7 +378,7 @@ private: * encapsulate the actual widgets (and member of the dockwidget class * set). * - * You just grip the double-lined panel, tear it off its parent + * You just grip the double-lined panel, tear it off its tqparent * widget, drag it somewhere and let it loose. Depending on the * position where you leave it, the dockwidget becomes a toplevel * window on the desktop (floating mode) or docks to a new widget @@ -392,7 +397,7 @@ private: * PMDockMainWindow* mainWidget; * ... * PMDockWidget* dock = 0L; - * dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent + * dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no tqparent * TQWidget* actualWidget = new TQWidget( dock); * dock->setWidget( actualWidget); // embed it * dock->setToolTipString(i18n("That's me")); // available when appearing as tab page @@ -404,9 +409,10 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class EXPORT_DOCKCLASS PMDockWidget: public QWidget +class EXPORT_DOCKCLASS PMDockWidget: public TQWidget { Q_OBJECT + TQ_OBJECT friend class PMDockManager; friend class PMDockSplitter; friend class PMDockMainWindow; @@ -423,12 +429,12 @@ public: * @param dockManager The responsible manager (dock helper) * @param name Object instance name * @param pixmap An icon (for instance shown when docked centered) - * @param parent Parent widget + * @param tqparent Parent widget * @param strCaption Title of the dockwidget window (shown when toplevel) * @param strTabPageLabel The title of the tab page (shown when in tab page mode), if it is "", only the icon will be shown, if it is 0L, the label is set to strCaption */ PMDockWidget( PMDockManager* dockManager, const char* name, - const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, + const TQPixmap &pixmap, TQWidget* tqparent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " ", WFlags f = 0); /** @@ -462,8 +468,8 @@ public: * * If the target is null, it will become a toplevel dockwidget at position pos; * Note: Docking to another dockwidget means exactly: - * A new parent dockwidget will be created, that replaces the target dockwidget and contains another single helper widget (tab widget or panner) - * which contains both dockwidgets, this and the target dockwidget. So consider parent<->child relationships change completely during such actions. + * A new tqparent dockwidget will be created, that replaces the target dockwidget and contains another single helper widget (tab widget or panner) + * which contains both dockwidgets, this and the target dockwidget. So consider tqparent<->child relationships change completely during such actions. * * @param target The dockwidget to dock to * @param dockPos One of the DockPositions this is going to dock to @@ -471,7 +477,7 @@ public: * @param pos The dock position, mainly of interest for docking to the desktop (as toplevel dockwidget) * @param check Only for internal use; * @param tabIndex The position index of the tab widget (when in tab page mode), -1 (default) means append - * @return result The group dockwidget that replaces the target dockwidget and will be grandparent of target and @p this. + * @return result The group dockwidget that replaces the target dockwidget and will be grandtqparent of target and @p this. */ PMDockWidget* manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1); @@ -500,7 +506,7 @@ public: int dockSite() const { // no docking if a floating dock widget - if( !parent( ) ) + if( !tqparent( ) ) return 0; return sDocking; } @@ -544,7 +550,7 @@ public: * There are reasons that it's impossible: * @li It is a (tab) group. * @li It is already invisible ;-) - * @li The parent of this is the @ref PMDockMainWindow. + * @li The tqparent of this is the @ref PMDockMainWindow. * @li It isn't able to dock to another widget. */ bool mayBeHide() const; @@ -554,7 +560,7 @@ public: * There are reasons that it's impossible: * @li It is a (tab) group. * @li It is already visible ;-) - * @li The parent of this is the @p PMDockMainWindow. + * @li The tqparent of this is the @p PMDockMainWindow. */ bool mayBeShow() const; @@ -606,9 +612,9 @@ public: */ virtual void show(); /** - * @return the parent widget of this if it inherits class PMDockTabGroup + * @return the tqparent widget of this if it inherits class PMDockTabGroup */ - PMDockTabGroup* parentDockTabGroup() const; + PMDockTabGroup* tqparentDockTabGroup() const; #ifndef NO_KDE2 @@ -626,7 +632,7 @@ public: * * @param windowType is type of dock window */ - void setDockWindowTransient (TQWidget *parent, bool transientEnabled); + void setDockWindowTransient (TQWidget *tqparent, bool transientEnabled); // MODIFICATION (lpassos) /** @@ -669,7 +675,7 @@ protected: /** * Checks some conditions and shows or hides the dockwidget header (drag panel). * The header is hidden if: - * @li the parent widget is the PMDockMainWindow + * @li the tqparent widget is the PMDockMainWindow * @li this is a (tab) group dockwidget * @li it is not able to dock to another dockwidget */ @@ -748,7 +754,7 @@ private: void setDockTabName( PMDockTabGroup* g); /** - * Reparent to s or set this to the PMDockMainWindow's view if s is that dockmainwindow. + * Retqparent to s or set this to the PMDockMainWindow's view if s is that dockmainwindow. * If s is O, simply move the widget. * * @param s the target widget to reparent to @@ -767,9 +773,9 @@ private: TQWidget* widget; /** - * the layout manager that takes care about proper resizing and moving the embedded widget and the header + * the tqlayout manager that takes care about proper resizing and moving the embedded widget and the header */ - TQVBoxLayout* layout; + TQVBoxLayout* tqlayout; /** * the responsible dockmanager @@ -799,7 +805,7 @@ private: // GROUP data TQString firstName; TQString lastName; - Orientation splitterOrientation; + Qt::Orientation splitterOrientation; bool isGroup; bool isTabGroup; @@ -821,9 +827,10 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class EXPORT_DOCKCLASS PMDockManager: public QObject +class EXPORT_DOCKCLASS PMDockManager: public TQObject { Q_OBJECT + TQ_OBJECT friend class PMDockWidget; friend class PMDockMainWindow; @@ -836,7 +843,7 @@ public: * @li Some state variables are set * * @param mainWindow the main window controlled by this - * @param name the internal QOject name + * @param name the internal TQOject name */ PMDockManager( TQWidget* mainWindow, const char* name = 0L ); @@ -848,14 +855,14 @@ public: #ifndef NO_KDE2 /** * Saves the current state of the dockmanager and of all controlled widgets. - * State means here to save the geometry, visibility, parents, internal object names, orientation, + * State means here to save the tqgeometry, visibility, tqparents, internal object names, orientation, * separator positions, dockwidget-group information, tab widget states (if it is a tab group) and * last but not least some necessary things for recovering the dockmainwindow state. * * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void writeConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeConfig( KConfig* c = 0L, TQString group = TQString() ); /** * Like writeConfig but reads the whole stuff in. @@ -865,7 +872,7 @@ public: * (TQObject::name) in the childDock variable of * PMDockManager. This list in turn contains all * PMDockWidgets (according to the PMDockWidget constructor). - * So in principle, in order to restore a window layout, + * So in principle, in order to restore a window tqlayout, * one must first construct all widgets, put each of them in a * PMDockWidget and then call readConfig(). And for all that * to work, each widget must have a unique name. @@ -873,21 +880,21 @@ public: * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void readConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readConfig ( KConfig* c = 0L, TQString group = TQString() ); #endif /** - * Saves the current dock window layout into a DOM tree below the given element. + * Saves the current dock window tqlayout into a DOM tree below the given element. */ void writeConfig(TQDomElement &base); /** - * Reads the current dock window layout from a DOM tree below the given element. + * Reads the current dock window tqlayout from a DOM tree below the given element. */ void readConfig(TQDomElement &base); /** * Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are - * parent of a dockwidget tab group. + * tqparent of a dockwidget tab group. */ void activate(); @@ -982,7 +989,7 @@ signals: void replaceDock( PMDockWidget* oldDock, PMDockWidget* newDock ); /** - * Signals a dockwidget without parent (toplevel) is shown. + * Signals a dockwidget without tqparent (toplevel) is shown. */ void setDockDefaultPos( PMDockWidget* ); @@ -1036,7 +1043,7 @@ private: * Finds the TQWidget recursively at the position given as parameter * * @param w a variable where the method puts the TQWidget at that position (instead of a return value) - * @param p the parent widget where the recursive search should start from + * @param p the tqparent widget where the recursive search should start from * @param pos global (desktop) position of the wanted dockwidget */ void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos ); @@ -1046,7 +1053,7 @@ public: /** * Finds all dockwidgets which are child, grandchild and so on of p. * - * @param p the parent widget where the recursive search starts from + * @param p the tqparent widget where the recursive search starts from * @param l the widget list that contains the search result after the return of this method */ void findChildDockWidget( const TQWidget* p, TQWidgetList& l); @@ -1108,7 +1115,7 @@ private: PMDockWidget::DockPosition curPos; /** - * A QList of all objects that are important for docking. + * A TQList of all objects that are important for docking. * Some serve as group widgets of dockwidgets, others encapsulate normal widgets. */ TQObjectList* childDock; @@ -1208,6 +1215,7 @@ private: class EXPORT_DOCKCLASS PMDockMainWindow : public KMainWindow, virtual public PartBase { Q_OBJECT + TQ_OBJECT friend class PMDockManager; @@ -1216,14 +1224,14 @@ public: /** * Constructs a dockmainwindow. It calls its base class constructor and does additional things concerning * to the dock stuff: - * @li information about the dock state of this' children gets initialized + * @li information about the dock state of this' tqchildren gets initialized * @li a dockmanager is created... * @li ...and gets initialized * @li the main dockwidget is set to 0 * * @param name object name */ - PMDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); + PMDockMainWindow( TQWidget* tqparent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); /** * Destructs a dockmainwindow. @@ -1258,19 +1266,19 @@ public: * * @param name TQObject name (default dockwidget caption) * @param pixmap window icon (for instance shown when docked as tabwidget entry) - * @param parent parent widget for the new dockwidget + * @param tqparent tqparent widget for the new dockwidget * @param strCaption window title (shown when toplevel) * @param strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption * @return a pointer to the new created dockwidget */ - PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); + PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); /** - * Saves the current dock window layout into a DOM tree below the given element. + * Saves the current dock window tqlayout into a DOM tree below the given element. */ void writeDockConfig(TQDomElement &base); /** - * Reads the current dock window layout from a DOM tree below the given element. + * Reads the current dock window tqlayout from a DOM tree below the given element. */ void readDockConfig(TQDomElement &base); @@ -1281,7 +1289,7 @@ public: * @param c KDE class for saving configurations * @param group name of section to write to */ - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString() ); /** * It reads the current dock state from the given section of KConfig. @@ -1289,7 +1297,7 @@ public: * @param c KDE class for saving configurations * @param group name of section to read from */ - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString() ); #endif /** @@ -1409,16 +1417,17 @@ private: /* Joseph Wenninger jowenn@kde.org Experimental (Just all KMainWindow references changed to TQWidget, otherwise nearly exactly the same as PMDockMainWindow*/ -class EXPORT_DOCKCLASS PMDockArea : public QWidget +class EXPORT_DOCKCLASS PMDockArea : public TQWidget { Q_OBJECT + TQ_OBJECT friend class PMDockManager; public: - PMDockArea( TQWidget* parent = 0L, const char *name = 0L); + PMDockArea( TQWidget* tqparent = 0L, const char *name = 0L); virtual ~PMDockArea(); @@ -1428,14 +1437,14 @@ public: void setMainDockWidget( PMDockWidget* ); PMDockWidget* getMainDockWidget(){ return mainDockWidget; } - PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); + PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); void writeDockConfig(TQDomElement &base); void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString() ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString() ); #endif diff --git a/kpovmodeler/pmdockwidget_private.cpp b/kpovmodeler/pmdockwidget_private.cpp index 7fd72420..5a86e25a 100644 --- a/kpovmodeler/pmdockwidget_private.cpp +++ b/kpovmodeler/pmdockwidget_private.cpp @@ -22,8 +22,8 @@ #include #include -PMDockSplitter::PMDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos, bool highResolution) -: TQWidget(parent, name) +PMDockSplitter::PMDockSplitter(TQWidget *tqparent, const char *name, Qt::Orientation orient, int pos, bool highResolution) +: TQWidget(tqparent, name) { divider = 0L; child0 = 0L; @@ -49,7 +49,7 @@ void PMDockSplitter::activate(TQWidget *c0, TQWidget *c1) divider->setLineWidth(1); divider->raise(); - if (orientation == Horizontal) + if (orientation ==Qt::Horizontal) divider->setCursor(TQCursor(sizeVerCursor)); else divider->setCursor(TQCursor(sizeHorCursor)); @@ -68,21 +68,21 @@ void PMDockSplitter::setupMinMaxSize() { // Set the minimum and maximum sizes int minx, maxx, miny, maxy; - if (orientation == Horizontal) { - miny = child0->minimumSize().height() + child1->minimumSize().height()+4; - maxy = child0->maximumSize().height() + child1->maximumSize().height()+4; - minx = (child0->minimumSize().width() > child1->minimumSize().width()) ? child0->minimumSize().width() : child1->minimumSize().width(); - maxx = (child0->maximumSize().width() > child1->maximumSize().width()) ? child0->maximumSize().width() : child1->maximumSize().width(); + if (orientation ==Qt::Horizontal) { + miny = child0->tqminimumSize().height() + child1->tqminimumSize().height()+4; + maxy = child0->tqmaximumSize().height() + child1->tqmaximumSize().height()+4; + minx = (child0->tqminimumSize().width() > child1->tqminimumSize().width()) ? child0->tqminimumSize().width() : child1->tqminimumSize().width(); + maxx = (child0->tqmaximumSize().width() > child1->tqmaximumSize().width()) ? child0->tqmaximumSize().width() : child1->tqmaximumSize().width(); miny = (miny > 4) ? miny : 4; maxy = (maxy < 32000) ? maxy : 32000; minx = (minx > 2) ? minx : 2; maxx = (maxx < 32000) ? maxx : 32000; } else { - minx = child0->minimumSize().width() + child1->minimumSize().width()+4; - maxx = child0->maximumSize().width() + child1->maximumSize().width()+4; - miny = (child0->minimumSize().height() > child1->minimumSize().height()) ? child0->minimumSize().height() : child1->minimumSize().height(); - maxy = (child0->maximumSize().height() > child1->maximumSize().height()) ? child0->maximumSize().height() : child1->maximumSize().height(); + minx = child0->tqminimumSize().width() + child1->tqminimumSize().width()+4; + maxx = child0->tqmaximumSize().width() + child1->tqmaximumSize().width()+4; + miny = (child0->tqminimumSize().height() > child1->tqminimumSize().height()) ? child0->tqminimumSize().height() : child1->tqminimumSize().height(); + maxy = (child0->tqmaximumSize().height() > child1->tqmaximumSize().height()) ? child0->tqmaximumSize().height() : child1->tqmaximumSize().height(); minx = (minx > 4) ? minx : 4; maxx = (maxx < 32000) ? maxx : 32000; @@ -118,7 +118,7 @@ void PMDockSplitter::resizeEvent(TQResizeEvent *ev) int factor = (mHighResolution)? 10000:100; // real resize event, recalculate xpos if (ev && mKeepSize && isVisible()) { - if (orientation == Horizontal) { + if (orientation ==Qt::Horizontal) { if (ev->oldSize().height() != ev->size().height()) xpos = factor * checkValue( child0->height()+1 ) / height(); } else { @@ -126,8 +126,8 @@ void PMDockSplitter::resizeEvent(TQResizeEvent *ev) xpos = factor * checkValue( child0->width()+1 ) / width(); } } - int position = checkValue( (orientation == Vertical ? width() : height()) * xpos/factor ); - if (orientation == Horizontal){ + int position = checkValue( (orientation ==Qt::Vertical ? width() : height()) * xpos/factor ); + if (orientation ==Qt::Horizontal){ child0->setGeometry(0, 0, width(), position); child1->setGeometry(0, position+4, width(), height()-position-4); divider->setGeometry(0, position, width(), 4); @@ -142,24 +142,24 @@ void PMDockSplitter::resizeEvent(TQResizeEvent *ev) int PMDockSplitter::checkValue( int position ) const { if (initialised){ - if (orientation == Vertical){ - if (position < (child0->minimumSize().width())) - position = child0->minimumSize().width(); - if ((width()-4-position) < (child1->minimumSize().width())) - position = width() - (child1->minimumSize().width()) -4; + if (orientation ==Qt::Vertical){ + if (position < (child0->tqminimumSize().width())) + position = child0->tqminimumSize().width(); + if ((width()-4-position) < (child1->tqminimumSize().width())) + position = width() - (child1->tqminimumSize().width()) -4; } else { - if (position < (child0->minimumSize().height())) - position = (child0->minimumSize().height()); - if ((height()-4-position) < (child1->minimumSize().height())) - position = height() - (child1->minimumSize().height()) -4; + if (position < (child0->tqminimumSize().height())) + position = (child0->tqminimumSize().height()); + if ((height()-4-position) < (child1->tqminimumSize().height())) + position = height() - (child1->tqminimumSize().height()) -4; } } if (position < 0) position = 0; - if ((orientation == Vertical) && (position > width())) + if ((orientation ==Qt::Vertical) && (position > width())) position = width(); - if ((orientation == Horizontal) && (position > height())) + if ((orientation ==Qt::Horizontal) && (position > height())) position = height(); return position; @@ -176,14 +176,14 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) mev= (TQMouseEvent*)e; child0->setUpdatesEnabled(mOpaqueResize); child1->setUpdatesEnabled(mOpaqueResize); - if (orientation == Horizontal) { + if (orientation ==Qt::Horizontal) { if (!mOpaqueResize) { int position = checkValue( mapFromGlobal(mev->globalPos()).y() ); divider->move( 0, position ); } else { xpos = factor * checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } } else { if (!mOpaqueResize) { @@ -192,7 +192,7 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) } else { xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } } handled= true; @@ -201,14 +201,14 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) child0->setUpdatesEnabled(true); child1->setUpdatesEnabled(true); mev= (TQMouseEvent*)e; - if (orientation == Horizontal){ + if (orientation ==Qt::Horizontal){ xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } else { xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).x() ) / width(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } handled= true; break; @@ -221,7 +221,7 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) bool PMDockSplitter::event( TQEvent* e ) { if ( e->type() == TQEvent::LayoutHint ){ - // change children min/max size + // change tqchildren min/max size setupMinMaxSize(); setSeparatorPos(xpos); } @@ -238,15 +238,15 @@ void PMDockSplitter::updateName() if ( !initialised ) return; TQString new_name = TQString( child0->name() ) + "," + child1->name(); - parentWidget()->setName( new_name.latin1() ); - parentWidget()->setCaption( child0->caption() + "," + child1->caption() ); - parentWidget()->repaint( false ); + tqparentWidget()->setName( new_name.latin1() ); + tqparentWidget()->setCaption( child0->caption() + "," + child1->caption() ); + tqparentWidget()->tqrepaint( false ); - ((PMDockWidget*)parentWidget())->firstName = child0->name(); - ((PMDockWidget*)parentWidget())->lastName = child1->name(); - ((PMDockWidget*)parentWidget())->splitterOrientation = orientation; + ((PMDockWidget*)tqparentWidget())->firstName = child0->name(); + ((PMDockWidget*)tqparentWidget())->lastName = child1->name(); + ((PMDockWidget*)tqparentWidget())->splitterOrientation = orientation; - TQWidget* p = parentWidget()->parentWidget(); + TQWidget* p = tqparentWidget()->tqparentWidget(); if ( p != 0L && p->inherits("PMDockSplitter" ) ) ((PMDockSplitter*)p)->updateName(); } @@ -288,11 +288,11 @@ bool PMDockSplitter::highResolution() const /*************************************************************************/ -PMDockButton_Private::PMDockButton_Private( TQWidget *parent, const char * name ) -:TQPushButton( parent, name ) +PMDockButton_Private::PMDockButton_Private( TQWidget *tqparent, const char * name ) +:TQPushButton( tqparent, name ) { moveMouse = false; - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); } PMDockButton_Private::~PMDockButton_Private() @@ -301,7 +301,7 @@ PMDockButton_Private::~PMDockButton_Private() void PMDockButton_Private::drawButton( TQPainter* p ) { - p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) ); + p->fillRect( 0,0, width(), height(), TQBrush(tqcolorGroup().brush(TQColorGroup::Background)) ); p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() ); if ( moveMouse && !isDown() ){ p->setPen( white ); @@ -309,12 +309,12 @@ void PMDockButton_Private::drawButton( TQPainter* p ) p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); - p->setPen( colorGroup().dark() ); + p->setPen( tqcolorGroup().dark() ); p->lineTo( width() - 1, height() - 1 ); p->lineTo( 0, height() - 1 ); } if ( isOn() || isDown() ){ - p->setPen( colorGroup().dark() ); + p->setPen( tqcolorGroup().dark() ); p->moveTo( 0, height() - 1 ); p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); @@ -328,13 +328,13 @@ void PMDockButton_Private::drawButton( TQPainter* p ) void PMDockButton_Private::enterEvent( TQEvent * ) { moveMouse = true; - repaint(); + tqrepaint(); } void PMDockButton_Private::leaveEvent( TQEvent * ) { moveMouse = false; - repaint(); + tqrepaint(); } /*************************************************************************/ @@ -361,12 +361,12 @@ void PMDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w) { if (w) { TQWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget(); - if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) { + if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQ_ClickFocus) || (embeddedWdg->focusPolicy() == TQ_StrongFocus))) { embeddedWdg->setFocus(); } } } -#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name +#ifndef NO_INCLUDE_TQMOCFILES // for TQt-only projects, because tmake doesn't take this name #include "pmdockwidget_private.moc" #endif diff --git a/kpovmodeler/pmdockwidget_private.h b/kpovmodeler/pmdockwidget_private.h index efd8cd14..a2111a90 100644 --- a/kpovmodeler/pmdockwidget_private.h +++ b/kpovmodeler/pmdockwidget_private.h @@ -18,7 +18,7 @@ */ /* - IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition + IMPORTANT Note: This file compiles also in TQt-only mode by using the NO_KDE2 precompiler definition */ #ifndef KDOCKWIDGET_PRIVATE_H @@ -39,11 +39,12 @@ class TQFrame; * * @author Max Judin. */ -class PMDockSplitter : public QWidget +class PMDockSplitter : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PMDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false); + PMDockSplitter(TQWidget *tqparent= 0, const char *name= 0, Qt::Orientation orient=Qt::Vertical, int pos= 50, bool highResolution=false); virtual ~PMDockSplitter(){}; void activate(TQWidget *c0, TQWidget *c1 = 0L); @@ -70,7 +71,7 @@ public: bool highResolution() const; // MODIFICATION (Zehender) - Orientation splitterOrientation( ) const { return orientation; } + Qt::Orientation splitterOrientation( ) const { return orientation; } protected: int checkValue( int ) const; @@ -80,7 +81,7 @@ private: void setupMinMaxSize(); TQWidget *child0, *child1; - Orientation orientation; + Qt::Orientation orientation; bool initialised; TQFrame* divider; int xpos; @@ -93,11 +94,12 @@ private: * * @author Max Judin. */ -class PMDockButton_Private : public QPushButton +class PMDockButton_Private : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - PMDockButton_Private( TQWidget *parent=0, const char *name=0 ); + PMDockButton_Private( TQWidget *tqparent=0, const char *name=0 ); ~PMDockButton_Private(); protected: @@ -112,9 +114,10 @@ private: /** * additional PMDockWidget stuff (private) */ -class PMDockWidgetPrivate : public QObject +class PMDockWidgetPrivate : public TQObject { Q_OBJECT + TQ_OBJECT public: PMDockWidgetPrivate(); ~PMDockWidgetPrivate(); diff --git a/kpovmodeler/pmdocumentationmap.cpp b/kpovmodeler/pmdocumentationmap.cpp index df2bf620..8fe29ce6 100644 --- a/kpovmodeler/pmdocumentationmap.cpp +++ b/kpovmodeler/pmdocumentationmap.cpp @@ -30,7 +30,7 @@ KStaticDeleter PMDocumentationMap::s_staticDeleter; TQString PMDocumentationVersion::documentation( const TQString& className ) const { - if( m_map.contains( className ) ) + if( m_map.tqcontains( className ) ) return m_map[className]; return m_index; } diff --git a/kpovmodeler/pmdragwidget.cpp b/kpovmodeler/pmdragwidget.cpp index bc097c46..7e800f72 100644 --- a/kpovmodeler/pmdragwidget.cpp +++ b/kpovmodeler/pmdragwidget.cpp @@ -17,8 +17,8 @@ #include "pmdragwidget.h" -PMDragWidget::PMDragWidget( TQWidget* parent, const char* name, WFlags f ) - : TQWidget( parent, name, f ) +PMDragWidget::PMDragWidget( TQWidget* tqparent, const char* name, WFlags f ) + : TQWidget( tqparent, name, f ) { dragging = false; } diff --git a/kpovmodeler/pmdragwidget.h b/kpovmodeler/pmdragwidget.h index 10c30e16..79efb3f6 100644 --- a/kpovmodeler/pmdragwidget.h +++ b/kpovmodeler/pmdragwidget.h @@ -31,11 +31,12 @@ * * It will emit startDrag when it's time to start a drag. */ -class PMDragWidget : public QWidget +class PMDragWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PMDragWidget( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + PMDragWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0 ); virtual void startDrag( ); diff --git a/kpovmodeler/pmenumproperty.cpp b/kpovmodeler/pmenumproperty.cpp index f82579ad..73a3446f 100644 --- a/kpovmodeler/pmenumproperty.cpp +++ b/kpovmodeler/pmenumproperty.cpp @@ -40,7 +40,7 @@ TQStringList PMEnumProperty::enumValues( ) const bool PMEnumProperty::setProtected( PMObject* obj, const PMVariant& v ) { - PMEnumStringValueMap::iterator it = m_stringMap.find( v.stringData( ) ); + PMEnumStringValueMap::iterator it = m_stringMap.tqfind( v.stringData( ) ); if( it == m_stringMap.end( ) ) return false; setEnum( obj, it.data( ) ); @@ -50,8 +50,8 @@ bool PMEnumProperty::setProtected( PMObject* obj, const PMVariant& v ) PMVariant PMEnumProperty::getProtected( const PMObject* obj ) { int v = getEnum( obj ); - PMEnumValueStringMap::const_iterator it = m_valueMap.find( v ); + PMEnumValueStringMap::const_iterator it = m_valueMap.tqfind( v ); if( it == m_valueMap.end( ) ) - return PMVariant( TQString::null ); + return PMVariant( TQString() ); return it.data( ); } diff --git a/kpovmodeler/pmerrordialog.cpp b/kpovmodeler/pmerrordialog.cpp index eb920fb0..b8a11630 100644 --- a/kpovmodeler/pmerrordialog.cpp +++ b/kpovmodeler/pmerrordialog.cpp @@ -29,8 +29,8 @@ TQSize PMErrorDialog::s_size = TQSize( 150, 200 ); PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, - TQWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "Messages" ), + TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "Messages" ), Ok | Cancel, Cancel ) { TQVBox* page = makeVBoxMainWidget( ); @@ -51,16 +51,16 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, for( ; pit.current( ); ++pit ) { PMObject* obj = pit.current( )->linkedObject( ); - for( ; obj; obj = obj->parent( ) ) + for( ; obj; obj = obj->tqparent( ) ) { - TQPtrList* pList = m_messageDict.find( obj ); + TQPtrList* pList = m_messageDict.tqfind( obj ); if( !pList ) { pList = new TQPtrList; m_messageDict.insert( obj, pList ); } pList->append( pit.current( ) ); - if( !obj->parent( ) ) + if( !obj->tqparent( ) ) { if( obj->type( ) != "scene" ) { diff --git a/kpovmodeler/pmerrordialog.h b/kpovmodeler/pmerrordialog.h index 93981eab..8310b3ad 100644 --- a/kpovmodeler/pmerrordialog.h +++ b/kpovmodeler/pmerrordialog.h @@ -42,9 +42,10 @@ class PMObject; class PMErrorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** - * Creates a modal PMErrorDialog with parent and name. + * Creates a modal PMErrorDialog with tqparent and name. * * messages is the message list. If the list contains a message of type * FatalError, the 'Proceed" button will not be shown. @@ -53,7 +54,7 @@ public: * should be continued. */ PMErrorDialog( const PMMessageList& messages, int errorFlags, - TQWidget* parent = 0, const char* name = 0 ); + TQWidget* tqparent = 0, const char* name = 0 ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); diff --git a/kpovmodeler/pmfactory.cpp b/kpovmodeler/pmfactory.cpp index 488db1ce..a9bdaee8 100644 --- a/kpovmodeler/pmfactory.cpp +++ b/kpovmodeler/pmfactory.cpp @@ -54,9 +54,9 @@ PMFactory::~PMFactory( ) s_aboutData = 0L; } -KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget, +KParts::Part* PMFactory::createPartObject( TQWidget* tqparentWidget, const char* widgetName, - TQObject* parent, const char* name, + TQObject* tqparent, const char* name, const char* classname, const TQStringList& /*args*/ ) { @@ -65,8 +65,8 @@ KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget, bool readwrite = !( ( strcmp( classname, "Browser/View" ) == 0 ) || ( strcmp( classname, "KParts::ReadOnlyPart" ) == 0 ) ); - KParts::ReadWritePart *part = new PMPart( parentWidget, widgetName, - parent, name, readwrite ); + KParts::ReadWritePart *part = new PMPart( tqparentWidget, widgetName, + tqparent, name, readwrite ); return part; } diff --git a/kpovmodeler/pmfactory.h b/kpovmodeler/pmfactory.h index 56797935..ee649d84 100644 --- a/kpovmodeler/pmfactory.h +++ b/kpovmodeler/pmfactory.h @@ -28,13 +28,14 @@ class KInstance; class PMFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: PMFactory( ); virtual ~PMFactory( ); - virtual KParts::Part* createPartObject( TQWidget* parentWidget, + virtual KParts::Part* createPartObject( TQWidget* tqparentWidget, const char* widgetName, - TQObject* parent, const char* name, + TQObject* tqparent, const char* name, const char* classname, const TQStringList& args ); diff --git a/kpovmodeler/pmfiledialog.cpp b/kpovmodeler/pmfiledialog.cpp index d8da0f4d..65ad11c8 100644 --- a/kpovmodeler/pmfiledialog.cpp +++ b/kpovmodeler/pmfiledialog.cpp @@ -22,13 +22,13 @@ #include -PMFileDialog::PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal ) - : KFileDialog( startDir, filter, parent, name, modal ) +PMFileDialog::PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* tqparent, const char* name, bool modal ) + : KFileDialog( startDir, filter, tqparent, name, modal ) { } -TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part, +TQString PMFileDialog::getImportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format ) { PMIOManager* manager = part->ioManager( ); @@ -52,7 +52,7 @@ TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part, } } - PMFileDialog dlg( TQString::null, filter, parent, "import file dialog", true ); + PMFileDialog dlg( TQString(), filter, tqparent, "import file dialog", true ); dlg.setOperationMode( Opening ); dlg.setMode( KFile::File | KFile::LocalOnly ); dlg.setCaption( i18n( "Import" ) ); @@ -64,7 +64,7 @@ TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part, return dlg.selectedFile( ); } -TQString PMFileDialog::getExportFileName( TQWidget* parent, PMPart* part, +TQString PMFileDialog::getExportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format, TQString& selectedFilter ) { PMIOManager* manager = part->ioManager( ); @@ -88,7 +88,7 @@ TQString PMFileDialog::getExportFileName( TQWidget* parent, PMPart* part, } } - PMFileDialog dlg( TQString::null, filter, parent, "export file dialog", true ); + PMFileDialog dlg( TQString(), filter, tqparent, "export file dialog", true ); dlg.setOperationMode( Saving ); dlg.setMode( KFile::File | KFile::LocalOnly ); dlg.setCaption( i18n( "Export" ) ); diff --git a/kpovmodeler/pmfiledialog.h b/kpovmodeler/pmfiledialog.h index 7843b73d..7aa69b70 100644 --- a/kpovmodeler/pmfiledialog.h +++ b/kpovmodeler/pmfiledialog.h @@ -38,22 +38,23 @@ class PMPart; class PMFileDialog : public KFileDialog { Q_OBJECT + TQ_OBJECT public: /** * Default constructor, use the static methods * @ref getImportFileName or @ref getExportFileName instead */ - PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal ); + PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* tqparent, const char* name, bool modal ); /** * Opens a modal file dialog and returns a selected file and the chosen * file format. */ - static TQString getImportFileName( TQWidget* parent, PMPart* part, PMIOFormat*& format ); + static TQString getImportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format ); /** * Opens a modal file dialog and returns a selected file and the chosen * file format and filter. */ - static TQString getExportFileName( TQWidget* parent, PMPart* part, + static TQString getExportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format, TQString& filter ); }; diff --git a/kpovmodeler/pmfinish.cpp b/kpovmodeler/pmfinish.cpp index 52bd92c8..190925fb 100644 --- a/kpovmodeler/pmfinish.cpp +++ b/kpovmodeler/pmfinish.cpp @@ -130,11 +130,11 @@ PMFinish::~PMFinish( ) { } -PMMetaObject* PMFinish::metaObject( ) const +PMMetaObject* PMFinish::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Finish", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Finish", Base::tqmetaObject( ), createNewFinish ); s_pMetaObject->addProperty( new PMFinishProperty( "ambientColor", &PMFinish::setAmbientColor, &PMFinish::ambientColor ) ); @@ -637,9 +637,9 @@ void PMFinish::setIridTurbulence( double c ) } } -PMDialogEditBase* PMFinish::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMFinish::editWidget( TQWidget* tqparent ) const { - return new PMFinishEdit( parent ); + return new PMFinishEdit( tqparent ); } void PMFinish::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmfinish.h b/kpovmodeler/pmfinish.h index c12f31b1..a33f9d40 100644 --- a/kpovmodeler/pmfinish.h +++ b/kpovmodeler/pmfinish.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMFinishEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmfinish" ); } diff --git a/kpovmodeler/pmfinishedit.cpp b/kpovmodeler/pmfinishedit.cpp index 38766f94..997fe901 100644 --- a/kpovmodeler/pmfinishedit.cpp +++ b/kpovmodeler/pmfinishedit.cpp @@ -29,8 +29,8 @@ #include -PMFinishEdit::PMFinishEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMFinishEdit::PMFinishEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -42,80 +42,80 @@ void PMFinishEdit::createTopWidgets( ) Base::createTopWidgets( ); hl = new TQHBoxLayout( topLayout( ) ); - TQGridLayout* layout = new TQGridLayout( hl, 2, 2 ); + TQGridLayout* tqlayout = new TQGridLayout( hl, 2, 2 ); m_pEnableAmbientEdit = new TQCheckBox( i18n( "Ambient color" ), this ); m_pAmbientColorLabel = new TQLabel( i18n( "Color:" ), this ); m_pAmbientColorEdit = new PMColorEdit( true, this ); - layout->addMultiCellWidget( m_pEnableAmbientEdit, 0, 0, 0, 1 ); - layout->addWidget( m_pAmbientColorLabel, 1, 0, AlignTop ); - layout->addWidget( m_pAmbientColorEdit, 1, 1 ); + tqlayout->addMultiCellWidget( m_pEnableAmbientEdit, 0, 0, 0, 1 ); + tqlayout->addWidget( m_pAmbientColorLabel, 1, 0, AlignTop ); + tqlayout->addWidget( m_pAmbientColorEdit, 1, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 4, 2 ); + tqlayout = new TQGridLayout( hl, 4, 2 ); m_pEnableDiffuseEdit = new TQCheckBox( i18n( "Diffuse:" ), this ); m_pDiffuseEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableDiffuseEdit, 0, 0 ); - layout->addWidget( m_pDiffuseEdit, 0, 1 ); + tqlayout->addWidget( m_pEnableDiffuseEdit, 0, 0 ); + tqlayout->addWidget( m_pDiffuseEdit, 0, 1 ); m_pEnableBrillianceEdit = new TQCheckBox( i18n( "Brilliance:" ), this ); m_pBrillianceEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableBrillianceEdit, 1, 0 ); - layout->addWidget( m_pBrillianceEdit, 1, 1 ); + tqlayout->addWidget( m_pEnableBrillianceEdit, 1, 0 ); + tqlayout->addWidget( m_pBrillianceEdit, 1, 1 ); m_pEnableCrandEdit = new TQCheckBox( i18n( "Crand:" ), this ); m_pCrandEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableCrandEdit, 2, 0 ); - layout->addWidget( m_pCrandEdit, 2, 1 ); + tqlayout->addWidget( m_pEnableCrandEdit, 2, 0 ); + tqlayout->addWidget( m_pCrandEdit, 2, 1 ); m_pConserveEnergyEdit = new TQCheckBox( i18n( "Conserve energy for reflection" ), this ); - layout->addMultiCellWidget( m_pConserveEnergyEdit, 3, 3, 0, 1 ); + tqlayout->addMultiCellWidget( m_pConserveEnergyEdit, 3, 3, 0, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 2, 2 ); + tqlayout = new TQGridLayout( hl, 2, 2 ); m_pEnablePhongEdit = new TQCheckBox( i18n( "Phong:" ), this ); m_pPhongEdit = new PMFloatEdit( this ); m_pEnablePhongSizeEdit = new TQCheckBox( i18n( "Phong size:" ), this ); m_pPhongSizeEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnablePhongEdit, 0, 0 ); - layout->addWidget( m_pPhongEdit, 0, 1 ); - layout->addWidget( m_pEnablePhongSizeEdit, 1, 0 ); - layout->addWidget( m_pPhongSizeEdit, 1, 1 ); + tqlayout->addWidget( m_pEnablePhongEdit, 0, 0 ); + tqlayout->addWidget( m_pPhongEdit, 0, 1 ); + tqlayout->addWidget( m_pEnablePhongSizeEdit, 1, 0 ); + tqlayout->addWidget( m_pPhongSizeEdit, 1, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 3, 2 ); + tqlayout = new TQGridLayout( hl, 3, 2 ); m_pEnableSpecularEdit = new TQCheckBox( i18n( "Specular:" ), this ); m_pSpecularEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableSpecularEdit, 0, 0 ); - layout->addWidget( m_pSpecularEdit, 0, 1 ); + tqlayout->addWidget( m_pEnableSpecularEdit, 0, 0 ); + tqlayout->addWidget( m_pSpecularEdit, 0, 1 ); m_pEnableRoughnessEdit = new TQCheckBox( i18n( "Roughness:" ), this ); m_pRoughnessEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableRoughnessEdit, 1, 0 ); - layout->addWidget( m_pRoughnessEdit, 1, 1 ); + tqlayout->addWidget( m_pEnableRoughnessEdit, 1, 0 ); + tqlayout->addWidget( m_pRoughnessEdit, 1, 1 ); m_pEnableMetallicEdit = new TQCheckBox( i18n( "Metallic:" ), this ); m_pMetallicEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableMetallicEdit, 2, 0 ); - layout->addWidget( m_pMetallicEdit, 2, 1 ); + tqlayout->addWidget( m_pEnableMetallicEdit, 2, 0 ); + tqlayout->addWidget( m_pMetallicEdit, 2, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 6, 2 ); + tqlayout = new TQGridLayout( hl, 6, 2 ); m_pIridEdit = new TQCheckBox( i18n( "Iridiscence" ), this ); - layout->addMultiCellWidget( m_pIridEdit, 0, 0, 0, 1 ); + tqlayout->addMultiCellWidget( m_pIridEdit, 0, 0, 0, 1 ); m_pIridAmountLabel = new TQLabel( i18n( "Amount:" ), this ); m_pIridAmountEdit = new PMFloatEdit( this ); - layout->addWidget( m_pIridAmountLabel, 1, 0 ); - layout->addWidget( m_pIridAmountEdit, 1, 1 ); + tqlayout->addWidget( m_pIridAmountLabel, 1, 0 ); + tqlayout->addWidget( m_pIridAmountEdit, 1, 1 ); m_pIridThicknessLabel = new TQLabel( i18n( "Thickness:" ), this ); m_pIridThicknessEdit = new PMFloatEdit( this ); - layout->addWidget( m_pIridThicknessLabel, 2, 0 ); - layout->addWidget( m_pIridThicknessEdit, 2, 1 ); + tqlayout->addWidget( m_pIridThicknessLabel, 2, 0 ); + tqlayout->addWidget( m_pIridThicknessEdit, 2, 1 ); m_pIridTurbulenceEdit = new PMFloatEdit( this ); m_pIridTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), this ); - layout->addWidget( m_pIridTurbulenceLabel, 3, 0 ); - layout->addWidget( m_pIridTurbulenceEdit, 3, 1 ); + tqlayout->addWidget( m_pIridTurbulenceLabel, 3, 0 ); + tqlayout->addWidget( m_pIridTurbulenceEdit, 3, 1 ); m_pEnableReflectionEdit = new TQCheckBox( i18n( "Reflection" ), this ); - layout->addMultiCellWidget( m_pEnableReflectionEdit, 4, 4, 0, 1 ); + tqlayout->addMultiCellWidget( m_pEnableReflectionEdit, 4, 4, 0, 1 ); hl->addStretch( 1 ); m_pReflectionWidget = new TQWidget( this ); @@ -151,7 +151,7 @@ void PMFinishEdit::createTopWidgets( ) gl->addWidget( m_pEnableRefMetallicEdit, 3, 0 ); gl->addWidget( m_pReflectionMetallicEdit, 3, 1 ); vl->addStretch( 1 ); - layout->addMultiCellWidget( m_pReflectionWidget, 5, 5, 0, 1 ); + tqlayout->addMultiCellWidget( m_pReflectionWidget, 5, 5, 0, 1 ); connect( m_pAmbientColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmfinishedit.h b/kpovmodeler/pmfinishedit.h index e72aef73..9d37ce14 100644 --- a/kpovmodeler/pmfinishedit.h +++ b/kpovmodeler/pmfinishedit.h @@ -39,12 +39,13 @@ class TQWidget; class PMFinishEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMFinishEdit with parent and name + * Creates a PMFinishEdit with tqparent and name */ - PMFinishEdit( TQWidget* parent, const char* name = 0 ); + PMFinishEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmfog.cpp b/kpovmodeler/pmfog.cpp index 6af4a2cb..1ece2757 100644 --- a/kpovmodeler/pmfog.cpp +++ b/kpovmodeler/pmfog.cpp @@ -81,11 +81,11 @@ PMFog::~PMFog( ) { } -PMMetaObject* PMFog::metaObject( ) const +PMMetaObject* PMFog::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Fog", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Fog", Base::tqmetaObject( ), createNewFog ); s_pMetaObject->addProperty( new PMFogProperty( "fogType", &PMFog::setFogType, &PMFog::fogType ) ); @@ -284,9 +284,9 @@ void PMFog::setUp( const PMVector& c ) } } -PMDialogEditBase* PMFog::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMFog::editWidget( TQWidget* tqparent ) const { - return new PMFogEdit( parent ); + return new PMFogEdit( tqparent ); } void PMFog::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmfog.h b/kpovmodeler/pmfog.h index fc6d7095..2eac23a8 100644 --- a/kpovmodeler/pmfog.h +++ b/kpovmodeler/pmfog.h @@ -54,7 +54,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMFogEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmfog" ); } diff --git a/kpovmodeler/pmfogedit.cpp b/kpovmodeler/pmfogedit.cpp index ec9880c1..d993ad3f 100644 --- a/kpovmodeler/pmfogedit.cpp +++ b/kpovmodeler/pmfogedit.cpp @@ -30,8 +30,8 @@ #include #include -PMFogEdit::PMFogEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMFogEdit::PMFogEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmfogedit.h b/kpovmodeler/pmfogedit.h index 5a33cf95..3331f167 100644 --- a/kpovmodeler/pmfogedit.h +++ b/kpovmodeler/pmfogedit.h @@ -42,12 +42,13 @@ class TQLabel; class PMFogEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMFogEdit with parent and name + * Creates a PMFogEdit with tqparent and name */ - PMFogEdit( TQWidget* parent, const char* name = 0 ); + PMFogEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmformulalabel.cpp b/kpovmodeler/pmformulalabel.cpp index 71ba62b6..1f1ffbf9 100644 --- a/kpovmodeler/pmformulalabel.cpp +++ b/kpovmodeler/pmformulalabel.cpp @@ -46,8 +46,8 @@ TQString PMFormulaLabel::s_digit[10] = TQString PMFormulaLabel::s_nullString = TQString( "= 0" ); -PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_exponents[0] = exp.exponent( 0 ); m_exponents[1] = exp.exponent( 1 ); @@ -56,8 +56,8 @@ PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, calculateSizeHint( ); } -PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_exponents[0] = x; m_exponents[1] = y; @@ -78,13 +78,13 @@ void PMFormulaLabel::drawContents( TQPainter* p ) int sum = m_exponents[0] + m_exponents[1] + m_exponents[2]; if( sum == 0 ) - p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, s_nullString ); + p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_nullString ); else { // draw dot int center = ( cr.top( ) + cr.bottom( ) ) / 2; int rad = c_dotSize / 2; - p->setBrush( TQBrush( colorGroup( ).text( ) ) ); + p->setBrush( TQBrush( tqcolorGroup( ).text( ) ) ); p->drawEllipse( cr.left( ), center - rad, c_dotSize, c_dotSize ); cr.setLeft( cr.left( ) + c_dotSize + c_indent ); @@ -98,13 +98,13 @@ void PMFormulaLabel::drawContents( TQPainter* p ) if( m_exponents[i] > 0 ) { - p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, s_xyz[i] ); + p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_xyz[i] ); cr.setLeft( cr.left( ) + m1.width( s_xyz[i] ) ); if( m_exponents[i] > 1 ) { cr.setBottom( cr.bottom( ) - up ); p->setFont( f2 ); - p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, + p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_digit[m_exponents[i]] ); cr.setLeft( cr.left( ) + m2.width( s_digit[m_exponents[i]] ) + 1 ); cr.setBottom( cr.bottom( ) + up ); @@ -131,7 +131,7 @@ void PMFormulaLabel::calculateSizeHint( ) TQFontMetrics m1( font( ) ); if( sum == 0 ) - m_sizeHint.setWidth( m1.width( s_nullString ) ); + m_tqsizeHint.setWidth( m1.width( s_nullString ) ); else { TQFontMetrics m2( exponentFont( ) ); @@ -146,19 +146,19 @@ void PMFormulaLabel::calculateSizeHint( ) width += m2.width( s_digit[m_exponents[i]] ) + 1; } } - m_sizeHint.setWidth( width ); + m_tqsizeHint.setWidth( width ); } - m_sizeHint.setHeight( m1.height( ) + 7 ); + m_tqsizeHint.setHeight( m1.height( ) + 7 ); } -TQSize PMFormulaLabel::sizeHint( ) const +TQSize PMFormulaLabel::tqsizeHint( ) const { - return minimumSizeHint( ); + return tqminimumSizeHint( ); } -TQSize PMFormulaLabel::minimumSizeHint( ) const +TQSize PMFormulaLabel::tqminimumSizeHint( ) const { - return m_sizeHint; + return m_tqsizeHint; } void PMFormulaLabel::fontChange( const TQFont& ) diff --git a/kpovmodeler/pmformulalabel.h b/kpovmodeler/pmformulalabel.h index ee2cace5..bac843d2 100644 --- a/kpovmodeler/pmformulalabel.h +++ b/kpovmodeler/pmformulalabel.h @@ -31,23 +31,23 @@ class PMPolynomExponents; * TQLabel with a rich text to display a polynom for the quadric, * cubic, quartic and polynom objects. */ -class PMFormulaLabel : public QWidget +class PMFormulaLabel : public TQWidget { public: /** * Displays the exponents of the @ref PMPolynomExponents */ - PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name = 0 ); + PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* tqparent, const char* name = 0 ); /** * Displays the given exponents */ - PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name = 0 ); + PMFormulaLabel( int x, int y, int z, TQWidget* tqparent, const char* name = 0 ); /** * Destructor */ ~PMFormulaLabel( ); - virtual TQSize sizeHint( ) const; - virtual TQSize minimumSizeHint( ) const; + virtual TQSize tqsizeHint( ) const; + virtual TQSize tqminimumSizeHint( ) const; protected: virtual void drawContents( TQPainter* p ); @@ -58,7 +58,7 @@ private: TQFont exponentFont( ) const; void calculateSizeHint( ); - TQSize m_sizeHint; + TQSize m_tqsizeHint; int m_exponents[3]; static TQString s_xyz[3]; diff --git a/kpovmodeler/pmglobalphotons.cpp b/kpovmodeler/pmglobalphotons.cpp index ddf32258..78834bf0 100644 --- a/kpovmodeler/pmglobalphotons.cpp +++ b/kpovmodeler/pmglobalphotons.cpp @@ -101,11 +101,11 @@ PMGlobalPhotons::~PMGlobalPhotons( ) { } -PMMetaObject* PMGlobalPhotons::metaObject( ) const +PMMetaObject* PMGlobalPhotons::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "GlobalPhotons", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "GlobalPhotons", Base::tqmetaObject( ), createNewGlobalPhotons ); PMNumberProperty* p1 = new PMNumberProperty( "numberType", @@ -437,9 +437,9 @@ void PMGlobalPhotons::setRadiusMediaMulti( double rmm ) } } -PMDialogEditBase* PMGlobalPhotons::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMGlobalPhotons::editWidget( TQWidget* tqparent ) const { - return new PMGlobalPhotonsEdit( parent ); + return new PMGlobalPhotonsEdit( tqparent ); } void PMGlobalPhotons::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmglobalphotons.h b/kpovmodeler/pmglobalphotons.h index 549e6efc..ad50b5a9 100644 --- a/kpovmodeler/pmglobalphotons.h +++ b/kpovmodeler/pmglobalphotons.h @@ -55,7 +55,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMGlobalPhotonsEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmglobalphotonsedit.cpp b/kpovmodeler/pmglobalphotonsedit.cpp index 5a4a5572..01c6479e 100644 --- a/kpovmodeler/pmglobalphotonsedit.cpp +++ b/kpovmodeler/pmglobalphotonsedit.cpp @@ -29,8 +29,8 @@ #include -PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmglobalphotonsedit.h b/kpovmodeler/pmglobalphotonsedit.h index e2ae8f7b..61db154f 100644 --- a/kpovmodeler/pmglobalphotonsedit.h +++ b/kpovmodeler/pmglobalphotonsedit.h @@ -38,12 +38,13 @@ class TQCheckBox; class PMGlobalPhotonsEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMGlobalPhotonsEdit with parent and name + * Creates a PMGlobalPhotonsEdit with tqparent and name */ - PMGlobalPhotonsEdit( TQWidget* parent, const char* name = 0 ); + PMGlobalPhotonsEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmglobalsettings.cpp b/kpovmodeler/pmglobalsettings.cpp index efa7db36..739c45ff 100644 --- a/kpovmodeler/pmglobalsettings.cpp +++ b/kpovmodeler/pmglobalsettings.cpp @@ -104,11 +104,11 @@ PMGlobalSettings::~PMGlobalSettings( ) { } -PMMetaObject* PMGlobalSettings::metaObject( ) const +PMMetaObject* PMGlobalSettings::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "GlobalSettings", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "GlobalSettings", Base::tqmetaObject( ), createNewGlobalSettings ); s_pMetaObject->addProperty( new PMGlobalSettingsProperty( "adcBailout", &PMGlobalSettings::setAdcBailout, &PMGlobalSettings::adcBailout ) ); @@ -432,9 +432,9 @@ void PMGlobalSettings::setRecursionLimit( int c ) } } -PMDialogEditBase* PMGlobalSettings::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMGlobalSettings::editWidget( TQWidget* tqparent ) const { - return new PMGlobalSettingsEdit( parent ); + return new PMGlobalSettingsEdit( tqparent ); } void PMGlobalSettings::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmglobalsettings.h b/kpovmodeler/pmglobalsettings.h index a95f86d7..b254afe0 100644 --- a/kpovmodeler/pmglobalsettings.h +++ b/kpovmodeler/pmglobalsettings.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -68,7 +68,7 @@ public: /** * Returns a new @ref PMGlobalSettingsEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmglobalsettingsedit.cpp b/kpovmodeler/pmglobalsettingsedit.cpp index 7c8eddad..8e47e845 100644 --- a/kpovmodeler/pmglobalsettingsedit.cpp +++ b/kpovmodeler/pmglobalsettingsedit.cpp @@ -29,8 +29,8 @@ #include #include -PMGlobalSettingsEdit::PMGlobalSettingsEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMGlobalSettingsEdit::PMGlobalSettingsEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -74,26 +74,26 @@ void PMGlobalSettingsEdit::createTopWidgets( ) hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - TQGridLayout* layout = new TQGridLayout( hl, 4, 2 ); + TQGridLayout* tqlayout = new TQGridLayout( hl, 4, 2 ); lbl = new TQLabel( i18n( "Maximum intersections:" ), this ); m_pMaxIntersectionsEdit = new PMIntEdit( this ); - layout->addWidget( lbl, 0, 0 ); - layout->addWidget( m_pMaxIntersectionsEdit, 0, 1 ); + tqlayout->addWidget( lbl, 0, 0 ); + tqlayout->addWidget( m_pMaxIntersectionsEdit, 0, 1 ); lbl = new TQLabel( i18n( "Maximum trace level:" ), this ); m_pMaxTraceLevelEdit = new PMIntEdit( this ); - layout->addWidget( lbl, 1, 0 ); - layout->addWidget( m_pMaxTraceLevelEdit, 1, 1 ); + tqlayout->addWidget( lbl, 1, 0 ); + tqlayout->addWidget( m_pMaxTraceLevelEdit, 1, 1 ); lbl = new TQLabel( i18n( "Number of waves:" ), this ); m_pNumberWavesEdit = new PMIntEdit( this ); - layout->addWidget( lbl, 2, 0 ); - layout->addWidget( m_pNumberWavesEdit, 2, 1 ); + tqlayout->addWidget( lbl, 2, 0 ); + tqlayout->addWidget( m_pNumberWavesEdit, 2, 1 ); lbl = new TQLabel( i18n( "Noise generator:" ), this ); m_pNoiseGeneratorEdit = new TQComboBox( false, this ); m_pNoiseGeneratorEdit->insertItem( i18n( "Original" ) ); m_pNoiseGeneratorEdit->insertItem( i18n( "Range Corrected" ) ); m_pNoiseGeneratorEdit->insertItem( i18n( "Perlin" ) ); - layout->addWidget( lbl, 3, 0 ); - layout->addWidget( m_pNoiseGeneratorEdit, 3, 1 ); + tqlayout->addWidget( lbl, 3, 0 ); + tqlayout->addWidget( m_pNoiseGeneratorEdit, 3, 1 ); hl->addStretch( 1 ); m_pRadiosityEdit = new TQCheckBox( i18n( "Radiosity (Povray 3.1)" ), this ); @@ -101,43 +101,43 @@ void PMGlobalSettingsEdit::createTopWidgets( ) m_pRadiosityWidget = new TQWidget( this ); hl = new TQHBoxLayout( m_pRadiosityWidget, 0, KDialog::spacingHint( ) ); - layout = new TQGridLayout( hl, 7, 2 ); + tqlayout = new TQGridLayout( hl, 7, 2 ); lbl = new TQLabel( i18n( "Brightness:" ), m_pRadiosityWidget ); m_pBrightnessEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 0, 0 ); - layout->addWidget( m_pBrightnessEdit, 0, 1 ); + tqlayout->addWidget( lbl, 0, 0 ); + tqlayout->addWidget( m_pBrightnessEdit, 0, 1 ); lbl = new TQLabel( i18n( "Count:" ), m_pRadiosityWidget ); m_pCountEdit = new PMIntEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 1, 0 ); - layout->addWidget( m_pCountEdit, 1, 1 ); + tqlayout->addWidget( lbl, 1, 0 ); + tqlayout->addWidget( m_pCountEdit, 1, 1 ); lbl = new TQLabel( i18n( "Maximum distance:" ), m_pRadiosityWidget ); m_pDistanceMaximumEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 2, 0 ); - layout->addWidget( m_pDistanceMaximumEdit, 2, 1 ); + tqlayout->addWidget( lbl, 2, 0 ); + tqlayout->addWidget( m_pDistanceMaximumEdit, 2, 1 ); lbl = new TQLabel( i18n( "Error boundary:" ), m_pRadiosityWidget ); m_pErrorBoundEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 3, 0 ); - layout->addWidget( m_pErrorBoundEdit, 3, 1 ); + tqlayout->addWidget( lbl, 3, 0 ); + tqlayout->addWidget( m_pErrorBoundEdit, 3, 1 ); lbl = new TQLabel( i18n( "Gray threshold:" ), m_pRadiosityWidget ); m_pGrayThresholdEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 4, 0 ); - layout->addWidget( m_pGrayThresholdEdit, 4, 1 ); + tqlayout->addWidget( lbl, 4, 0 ); + tqlayout->addWidget( m_pGrayThresholdEdit, 4, 1 ); lbl = new TQLabel( i18n( "Low error factor:" ), m_pRadiosityWidget ); m_pLowErrorFactorEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 5, 0 ); - layout->addWidget( m_pLowErrorFactorEdit, 5, 1 ); + tqlayout->addWidget( lbl, 5, 0 ); + tqlayout->addWidget( m_pLowErrorFactorEdit, 5, 1 ); lbl = new TQLabel( i18n( "Minimum reuse:" ), m_pRadiosityWidget ); m_pMinimumReuseEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 6, 0 ); - layout->addWidget( m_pMinimumReuseEdit, 6, 1 ); + tqlayout->addWidget( lbl, 6, 0 ); + tqlayout->addWidget( m_pMinimumReuseEdit, 6, 1 ); lbl = new TQLabel( i18n( "Nearest count:" ), m_pRadiosityWidget ); m_pNearestCountEdit = new PMIntEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 7, 0 ); - layout->addWidget( m_pNearestCountEdit, 7, 1 ); + tqlayout->addWidget( lbl, 7, 0 ); + tqlayout->addWidget( m_pNearestCountEdit, 7, 1 ); lbl = new TQLabel( i18n( "Recursion limit:" ), m_pRadiosityWidget ); m_pRecursionLimitEdit = new PMIntEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 8, 0 ); - layout->addWidget( m_pRecursionLimitEdit, 8, 1 ); + tqlayout->addWidget( lbl, 8, 0 ); + tqlayout->addWidget( m_pRecursionLimitEdit, 8, 1 ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pRadiosityWidget ); diff --git a/kpovmodeler/pmglobalsettingsedit.h b/kpovmodeler/pmglobalsettingsedit.h index df0f99b0..fbe8623d 100644 --- a/kpovmodeler/pmglobalsettingsedit.h +++ b/kpovmodeler/pmglobalsettingsedit.h @@ -39,12 +39,13 @@ class TQComboBox; class PMGlobalSettingsEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMGlobalSettingsEdit with parent and name + * Creates a PMGlobalSettingsEdit with tqparent and name */ - PMGlobalSettingsEdit( TQWidget* parent, const char* name = 0 ); + PMGlobalSettingsEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmglview.cpp b/kpovmodeler/pmglview.cpp index e4a53088..823e3c19 100644 --- a/kpovmodeler/pmglview.cpp +++ b/kpovmodeler/pmglview.cpp @@ -106,8 +106,8 @@ bool PMGLView::s_bDirect = true; PMGLView::PMGLView( PMPart* part, PMViewType t, - TQWidget* parent, const char* name, WFlags f ) - : PMViewBase( parent, name, f | Qt::WWinOwnDC | Qt::WRepaintNoErase ) + TQWidget* tqparent, const char* name, WFlags f ) + : PMViewBase( tqparent, name, f | TQt::WWinOwnDC | TQt::WRepaintNoErase ) { m_pPart = part; m_type = t; @@ -143,7 +143,7 @@ PMGLView::PMGLView( PMPart* part, PMViewType t, initializeGL( ); setMouseTracking( true ); - setFocusPolicy( WheelFocus ); + setFocusPolicy( TQ_WheelFocus ); PMRenderManager* rm = PMRenderManager::theManager( ); rm->viewCreated( ); @@ -312,7 +312,7 @@ void PMGLView::initializeGL( ) Window p; p = RootWindow( display, vi->screen ); - TQWidget* pw = parentWidget( ); + TQWidget* pw = tqparentWidget( ); if( pw ) p = pw->winId( ); @@ -326,7 +326,7 @@ void PMGLView::initializeGL( ) Window* colorMapWindows = 0; Window* newWindows = 0; int num; - if( XGetWMColormapWindows( display, topLevelWidget( )->winId( ), + if( XGetWMColormapWindows( display, tqtopLevelWidget( )->winId( ), &colorMapWindows, &num ) ) { // create a new list and append the new window @@ -354,10 +354,10 @@ void PMGLView::initializeGL( ) newWindows = new Window[1]; newWindows[0] = w; } - // tell Qt to use this window + // tell TQt to use this window create( w ); - XSetWMColormapWindows( display, topLevelWidget( )->winId( ), + XSetWMColormapWindows( display, tqtopLevelWidget( )->winId( ), newWindows, num ); delete[] newWindows; @@ -367,7 +367,7 @@ void PMGLView::initializeGL( ) { TQVBoxLayout* topLayout = new TQVBoxLayout( this ); TQLabel* label = new TQLabel( i18n( "No OpenGL support" ), this ); - label->setAlignment( Qt::AlignCenter ); + label->tqsetAlignment( TQt::AlignCenter ); topLayout->addWidget( label ); } @@ -406,7 +406,7 @@ void PMGLView::setScale( double scale ) if( m_dScale > 0 ) { m_dScale = scale; - invalidateProjection( ); + tqinvalidateProjection( ); } else kdError( PMArea ) << "Scale <= 0 in PMGLView::setScale\n"; @@ -415,26 +415,26 @@ void PMGLView::setScale( double scale ) void PMGLView::setTranslationX( double d ) { m_dTransX = d; - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::setTranslationY( double d ) { m_dTransY = d; - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::resizeEvent( TQResizeEvent* ) { - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::paintEvent( TQPaintEvent* ) { - repaint( ); + tqrepaint( ); } -void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ ) +void PMGLView::tqinvalidateProjection( bool graphicalChange /*= true*/ ) { m_viewTransformation = PMMatrix::identity( ); @@ -480,7 +480,7 @@ void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ ) recalculateControlPointPosition( ); } m_projectionUpToDate = false; - repaint( graphicalChange ); + tqrepaint( graphicalChange ); } void PMGLView::enableTranslateMode( bool yes ) @@ -507,7 +507,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) { if( m_bScaleMode || m_bTranslateMode ) { - if( ( e->button( ) & LeftButton ) && ( e->state( ) == 0 ) ) + if( ( e->button( ) & Qt::LeftButton ) && ( e->state( ) == 0 ) ) { m_bMousePressed = true; m_mousePos = e->pos( ); @@ -517,7 +517,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) } else if( m_type != PMViewCamera ) { - if( ( e->button( ) & LeftButton ) && m_bInverseValid + if( ( e->button( ) & Qt::LeftButton ) && m_bInverseValid && m_pActiveObject ) { if( m_pUnderMouse ) @@ -578,7 +578,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) if( !( m_bGraphicalChangeMode || m_bMousePressed ) ) { - if( ( e->button( ) == RightButton ) && ( e->state( ) == 0 ) ) + if( ( e->button( ) == Qt::RightButton ) && ( e->state( ) == 0 ) ) { m_contextClickPosition = PMVector( screenToInternalX( e->x( ) ), screenToInternalY( e->y( ) ) ); @@ -599,7 +599,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) } } - if( e->button( ) == MidButton ) + if( e->button( ) == Qt::MidButton ) { m_bMidMousePressed = true; m_mousePos = e->pos( ); @@ -677,7 +677,7 @@ void PMGLView::mouseReleaseEvent( TQMouseEvent* e ) m_autoScrollTimer.stop( ); } - if( e->button( ) & TQEvent::MidButton ) + if( e->button( ) & Qt::MidButton ) m_bMidMousePressed = false; m_bSelectUnderMouse = false; @@ -698,14 +698,14 @@ void PMGLView::mouseMoveEvent( TQMouseEvent* e ) m_dTransX += m_scaleIntX * c; m_dTransY += m_scaleIntY * c; m_dScale *= s; - invalidateProjection( ); + tqinvalidateProjection( ); } } else if( m_bTranslateMode ) { m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale; m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale; - invalidateProjection( ); + tqinvalidateProjection( ); } m_mousePos = e->pos( ); } @@ -713,7 +713,7 @@ void PMGLView::mouseMoveEvent( TQMouseEvent* e ) { m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale; m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale; - invalidateProjection( ); + tqinvalidateProjection( ); m_mousePos = e->pos( ); } @@ -799,7 +799,7 @@ void PMGLView::wheelEvent( TQWheelEvent* e ) m_dTransX += deltaX * c; m_dTransY += deltaY * c; m_dScale *= s; - invalidateProjection( ); + tqinvalidateProjection( ); } } @@ -858,7 +858,7 @@ void PMGLView::keyPressEvent( TQKeyEvent* e ) accept = false; if( accept ) - invalidateProjection( ); + tqinvalidateProjection( ); else e->ignore( ); } @@ -885,7 +885,7 @@ void PMGLView::slotAutoScroll( ) m_dTransX += pixels * m_autoScrollDirectionX / m_dScale; m_dTransY -= pixels * m_autoScrollDirectionY / m_dScale; - invalidateProjection( ); + tqinvalidateProjection( ); if( m_bGraphicalChangeMode ) if( m_bMultipleSelectionMode ) @@ -900,7 +900,7 @@ void PMGLView::slotAutoScroll( ) if( m_bGraphicalChangeMode ) graphicalChange( mapFromGlobal( TQCursor::pos( ) ) ); else - repaint( ); + tqrepaint( ); m_lastAutoScrollUpdate = now; } @@ -955,12 +955,12 @@ void PMGLView::graphicalChange( const TQPoint& mousePos ) m_pActiveObject->controlPointsChangedList( m_controlPoints, changedObjects ); if( changedObjects.isEmpty( ) ) - emit objectChanged( m_pActiveObject, PMCGraphicalChange, this ); + emit objectChanged( m_pActiveObject, PMCGraphicalChange, TQT_TQOBJECT(this) ); else { PMObjectListIterator it( changedObjects ); for( ; it.current( ); ++it ) - emit objectChanged( it.current( ), PMCGraphicalChange, this ); + emit objectChanged( it.current( ), PMCGraphicalChange, TQT_TQOBJECT(this) ); } } @@ -1064,7 +1064,7 @@ PMVector PMGLView::mousePosition( PMControlPoint* cp, int x, int y ) result[1] = screenToInternalY( y ); if( cp ) { - index = m_controlPoints.findRef( cp ); + index = m_controlPoints.tqfindRef( cp ); if( index >= 0 ) { p = m_controlPointsPosition.at( ( uint ) index ); @@ -1101,7 +1101,7 @@ void PMGLView::setType( PMViewType t ) if( m_type != t ) m_viewTransformation = PMMatrix::identity( ); m_type = t; - invalidateProjection( ); + tqinvalidateProjection( ); emit viewTypeChanged( viewTypeAsString( t ) ); } @@ -1109,7 +1109,7 @@ void PMGLView::setType( PMViewType t ) void PMGLView::setCamera( PMCamera* c ) { m_pCamera = c; - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::slotRefresh( ) @@ -1118,7 +1118,7 @@ void PMGLView::slotRefresh( ) if( !m_pCamera ) setCamera( m_pPart->firstCamera( ) ); - repaint( ); + tqrepaint( ); } void PMGLView::slotClear( ) @@ -1135,7 +1135,7 @@ void PMGLView::slotClear( ) void PMGLView::slotActiveRenderModeChanged( ) { if( ( m_type == PMViewCamera ) && m_pCamera ) - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::slotStopRendering( ) @@ -1176,13 +1176,13 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, { if( obj->type( ) == "Camera" ) if( m_pCamera == ( PMCamera* ) obj ) - invalidateProjection( ); + tqinvalidateProjection( ); - if( obj->parent( ) ) - if( obj->parent( )->type( ) == "Camera" ) - if( m_pCamera == ( PMCamera* ) obj->parent( ) ) + if( obj->tqparent( ) ) + if( obj->tqparent( )->type( ) == "Camera" ) + if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( obj->hasTransformationMatrix( ) ) - invalidateProjection( ); + tqinvalidateProjection( ); } redraw = true; @@ -1209,11 +1209,11 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, if( obj->type( ) == "Camera" ) if( !m_pCamera ) setCamera( ( PMCamera* ) obj ); - if( obj->parent( ) ) - if( obj->parent( )->type( ) == "Camera" ) - if( m_pCamera == ( PMCamera* ) obj->parent( ) ) + if( obj->tqparent( ) ) + if( obj->tqparent( )->type( ) == "Camera" ) + if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( obj->hasTransformationMatrix( ) ) - invalidateProjection( ); + tqinvalidateProjection( ); } redraw = true; } @@ -1225,11 +1225,11 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, setCamera( 0 ); if( m_type == PMGLView::PMViewCamera ) - if( obj->parent( ) ) - if( obj->parent( )->type( ) == "Camera" ) - if( m_pCamera == ( PMCamera* ) obj->parent( ) ) + if( obj->tqparent( ) ) + if( obj->tqparent( )->type( ) == "Camera" ) + if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( obj->hasTransformationMatrix( ) ) - invalidateProjection( ); + tqinvalidateProjection( ); redraw = true; } @@ -1238,10 +1238,10 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, redraw = true; if( redraw ) - repaint( sender == this ); + tqrepaint( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(this) ); } -void PMGLView::repaint( bool graphicalChange ) +void PMGLView::tqrepaint( bool graphicalChange ) { if( isValid( ) ) { @@ -1296,7 +1296,7 @@ PMObject* PMGLView::topLevelRenderingObject( PMObject* o ) const else if( obj->isA( "Scene" ) || obj->isA( "Declare" ) ) stop = true; else - obj = obj->parent( ); + obj = obj->tqparent( ); } while( !stop ); } @@ -1353,7 +1353,7 @@ void PMGLView::selectControlPoint( PMControlPoint* cp, bool select, bool deselec } if( selectionChanged ) - emit objectChanged( m_pActiveObject, PMCControlPointSelection, this ); + emit objectChanged( m_pActiveObject, PMCControlPointSelection, TQT_TQOBJECT(this) ); } void PMGLView::startSelection( ) @@ -1652,7 +1652,7 @@ void PMGLView::slotControlPoint( int id ) PMControlPointListIterator cit( m_controlPoints ); for( ; cit.current( ); ++cit ) cit.current( )->setSelected( p == cit.current( ) ); - emit objectChanged( m_pActiveObject, PMCControlPointSelection, this ); + emit objectChanged( m_pActiveObject, PMCControlPointSelection, TQT_TQOBJECT(this) ); } } @@ -1754,16 +1754,16 @@ TQString PMGLViewFactory::description( PMViewOptions* vo ) const if( vo && vo->viewType( ) == "glview" ) { PMGLViewOptions* o = ( PMGLViewOptions* ) vo; - return i18n( "3D View (%1)" ).arg( + return i18n( "3D View (%1)" ).tqarg( PMGLView::viewTypeAsString( o->glViewType( ) ) ); } return description( ); } -PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( TQWidget* parent, +PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( TQWidget* tqparent, PMViewOptions* o ) { - return new PMGLViewOptionsWidget( parent, o ); + return new PMGLViewOptionsWidget( tqparent, o ); } PMViewOptions* PMGLViewFactory::newOptionsInstance( ) const @@ -1772,9 +1772,9 @@ PMViewOptions* PMGLViewFactory::newOptionsInstance( ) const return o; } -PMGLViewOptionsWidget::PMGLViewOptionsWidget( TQWidget* parent, +PMGLViewOptionsWidget::PMGLViewOptionsWidget( TQWidget* tqparent, PMViewOptions* o ) - : PMViewOptionsWidget( parent ) + : PMViewOptionsWidget( tqparent ) { m_pOptions = ( PMGLViewOptions* ) o; diff --git a/kpovmodeler/pmglview.h b/kpovmodeler/pmglview.h index 521d6911..48537b20 100644 --- a/kpovmodeler/pmglview.h +++ b/kpovmodeler/pmglview.h @@ -51,6 +51,7 @@ class TQComboBox; class PMGLView : public PMViewBase { Q_OBJECT + TQ_OBJECT public: /** * Type of the view @@ -61,7 +62,7 @@ public: * Constructor */ PMGLView( PMPart* part, PMViewType t, - TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0 ); /** * Destructor */ @@ -335,7 +336,7 @@ private: /** * Repaints the view */ - void repaint( bool graphicalChange = false ); + void tqrepaint( bool graphicalChange = false ); /** * Starts a graphical change */ @@ -350,9 +351,9 @@ private: */ void selectControlPoint( PMControlPoint* cp, bool select, bool deselectOthers = true ); /** - * Invalidates the projection and repaints the view + * Invalidates the projection and tqrepaints the view */ - void invalidateProjection( bool graphicaChange = false ); + void tqinvalidateProjection( bool graphicaChange = false ); /** * Starts multiple selection mode @@ -558,25 +559,26 @@ public: virtual TQString description( ) const; virtual TQString description( PMViewOptions* ) const; virtual TQString iconName( ) const { return TQString( "pmglview" ); } - virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const + virtual PMViewBase* newInstance( TQWidget* tqparent, PMPart* part ) const { - return new PMGLView( part, PMGLView::PMViewPosX, parent ); + return new PMGLView( part, PMGLView::PMViewPosX, tqparent ); } virtual PMViewOptions* newOptionsInstance( ) const; virtual PMViewOptionsWidget* newOptionsWidget( TQWidget*, PMViewOptions* ); }; /** - * Configuration widget for the view layout settings dialog + * Configuration widget for the view tqlayout settings dialog */ class PMGLViewOptionsWidget : public PMViewOptionsWidget { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMGLViewOptionsWidget( TQWidget* parent, PMViewOptions* o ); + PMGLViewOptionsWidget( TQWidget* tqparent, PMViewOptions* o ); protected slots: void slotGLViewTypeChanged( int ); diff --git a/kpovmodeler/pmgraphicalobject.cpp b/kpovmodeler/pmgraphicalobject.cpp index c60c40cb..59ace7cf 100644 --- a/kpovmodeler/pmgraphicalobject.cpp +++ b/kpovmodeler/pmgraphicalobject.cpp @@ -60,11 +60,11 @@ PMGraphicalObject::~PMGraphicalObject( ) { } -PMMetaObject* PMGraphicalObject::metaObject( ) const +PMMetaObject* PMGraphicalObject::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "GraphicalObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "GraphicalObject", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMGraphicalObjectProperty( "noShadow", &PMGraphicalObject::setNoShadow, &PMGraphicalObject::noShadow ) ); diff --git a/kpovmodeler/pmgraphicalobject.h b/kpovmodeler/pmgraphicalobject.h index 399e351d..662f7682 100644 --- a/kpovmodeler/pmgraphicalobject.h +++ b/kpovmodeler/pmgraphicalobject.h @@ -46,12 +46,12 @@ public: */ PMGraphicalObject( const PMGraphicalObject& o ); /** - * Deletes the object and all children + * Deletes the object and all tqchildren */ virtual ~PMGraphicalObject( ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -101,7 +101,7 @@ public: */ void setVisibilityLevel( int level ); /** - * Returns true if the visibility level is relative to the objects parent + * Returns true if the visibility level is relative to the objects tqparent */ bool isVisibilityLevelRelative( ) const { return m_relativeVisibility; } /** diff --git a/kpovmodeler/pmgraphicalobjectedit.cpp b/kpovmodeler/pmgraphicalobjectedit.cpp index c623c51f..106fbc2a 100644 --- a/kpovmodeler/pmgraphicalobjectedit.cpp +++ b/kpovmodeler/pmgraphicalobjectedit.cpp @@ -28,8 +28,8 @@ const int c_minValue = -1000; const int c_maxValue = 1000; -PMGraphicalObjectEdit::PMGraphicalObjectEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMGraphicalObjectEdit::PMGraphicalObjectEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -143,7 +143,7 @@ void PMGraphicalObjectEdit::slotLevelChanged( int ) void PMGraphicalObjectEdit::recalculateResultingVisibility( ) { - PMObject* o = m_pDisplayedObject->parent( ); + PMObject* o = m_pDisplayedObject->tqparent( ); PMGraphicalObject* go = 0; int level = 0; bool absoluteFound = false; @@ -152,7 +152,7 @@ void PMGraphicalObjectEdit::recalculateResultingVisibility( ) if( !m_pRelativeVisibility->isChecked( ) ) absoluteFound = true; - for( ; o && !absoluteFound; o = o->parent( ) ) + for( ; o && !absoluteFound; o = o->tqparent( ) ) { if( o->isA( "GraphicalObject" ) ) { @@ -162,7 +162,7 @@ void PMGraphicalObjectEdit::recalculateResultingVisibility( ) absoluteFound = true; } } - m_pResultingVisibility->setText( TQString( "(%1)" ).arg( level ) ); + m_pResultingVisibility->setText( TQString( "(%1)" ).tqarg( level ) ); } #include "pmgraphicalobjectedit.moc" diff --git a/kpovmodeler/pmgraphicalobjectedit.h b/kpovmodeler/pmgraphicalobjectedit.h index 29f53a0f..36758f63 100644 --- a/kpovmodeler/pmgraphicalobjectedit.h +++ b/kpovmodeler/pmgraphicalobjectedit.h @@ -37,12 +37,13 @@ class TQLabel; class PMGraphicalObjectEdit : public PMDetailObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMDetailObjectEdit Base; public: /** - * Creates a PMGraphicalObjectEdit with parent and name + * Creates a PMGraphicalObjectEdit with tqparent and name */ - PMGraphicalObjectEdit( TQWidget* parent, const char* name = 0 ); + PMGraphicalObjectEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmgridsettings.cpp b/kpovmodeler/pmgridsettings.cpp index 04bdbdd3..60803cd9 100644 --- a/kpovmodeler/pmgridsettings.cpp +++ b/kpovmodeler/pmgridsettings.cpp @@ -28,41 +28,41 @@ #include #include -PMGridSettings::PMGridSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMGridSettings::PMGridSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQVBoxLayout* gvl; TQGridLayout* grid; TQGroupBox* gb; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); gb = new TQGroupBox( i18n( "Displayed Grid" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Color:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Color:" ), gb ) ); m_pGridColor = new KColorButton( gb ); - hlayout->addWidget( m_pGridColor ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pGridColor ); + htqlayout->addStretch( 1 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Distance:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Distance:" ), gb ) ); m_pGridDistance = new PMIntEdit( gb ); m_pGridDistance->setValidation( true, 20, false, 0 ); - hlayout->addWidget( m_pGridDistance ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pGridDistance ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Control Point Grid" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - grid = new TQGridLayout( hlayout, 3, 2 ); + htqlayout = new TQHBoxLayout( gvl ); + grid = new TQGridLayout( htqlayout, 3, 2 ); grid->addWidget( new TQLabel( i18n( "2D/3D movement:" ), gb ), 0, 0 ); m_pMoveGrid = new PMFloatEdit( gb ); m_pMoveGrid->setValidation( true, 0.001, true, 100 ); @@ -78,9 +78,9 @@ PMGridSettings::PMGridSettings( TQWidget* parent, const char* name ) m_pRotateGrid->setValidation( true, 0.001, true, 180 ); grid->addWidget( m_pRotateGrid, 2, 1 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMGridSettings::displaySettings( ) @@ -133,23 +133,23 @@ bool PMGridSettings::validateData( ) void PMGridSettings::applySettings( ) { - bool repaint = false; + bool tqrepaint = false; PMRenderManager* rm = PMRenderManager::theManager( ); if( rm->gridColor( ) != m_pGridColor->color( ) ) { rm->setGridColor( m_pGridColor->color( ) ); - repaint = true; + tqrepaint = true; } if( rm->gridDistance( ) != m_pGridDistance->value( ) ) { rm->setGridDistance( m_pGridDistance->value( ) ); - repaint = true; + tqrepaint = true; } PMControlPoint::setMoveGrid( m_pMoveGrid->value( ) ); PMControlPoint::setScaleGrid( m_pScaleGrid->value( ) ); PMControlPoint::setRotateGrid( m_pRotateGrid->value( ) ); - if( repaint ) - emit repaintViews( ); + if( tqrepaint ) + emit tqrepaintViews( ); } #include "pmgridsettings.moc" diff --git a/kpovmodeler/pmgridsettings.h b/kpovmodeler/pmgridsettings.h index 214f3af3..20b4f01e 100644 --- a/kpovmodeler/pmgridsettings.h +++ b/kpovmodeler/pmgridsettings.h @@ -34,11 +34,12 @@ class PMFloatEdit; class PMGridSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMGridSettings( TQWidget* parent, const char* name = 0 ); + PMGridSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmheightfield.cpp b/kpovmodeler/pmheightfield.cpp index 6806437a..654cd43c 100644 --- a/kpovmodeler/pmheightfield.cpp +++ b/kpovmodeler/pmheightfield.cpp @@ -107,11 +107,11 @@ void PMHeightField::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMHeightField::metaObject( ) const +PMMetaObject* PMHeightField::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "HeightField", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "HeightField", Base::tqmetaObject( ), createNewHeightField ); s_pMetaObject->addProperty( new PMHeightFieldProperty( "fileName", &PMHeightField::setFileName, &PMHeightField::fileName ) ); @@ -200,9 +200,9 @@ void PMHeightField::setWaterLevel( double wl ) } } -PMDialogEditBase* PMHeightField::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMHeightField::editWidget( TQWidget* tqparent ) const { - return new PMHeightFieldEdit( parent ); + return new PMHeightFieldEdit( tqparent ); } void PMHeightField::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmheightfield.h b/kpovmodeler/pmheightfield.h index 443226ba..62afe95b 100644 --- a/kpovmodeler/pmheightfield.h +++ b/kpovmodeler/pmheightfield.h @@ -60,7 +60,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMHeightFieldEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmheightfieldedit.cpp b/kpovmodeler/pmheightfieldedit.cpp index 5f9346f0..b3de59fa 100644 --- a/kpovmodeler/pmheightfieldedit.cpp +++ b/kpovmodeler/pmheightfieldedit.cpp @@ -31,8 +31,8 @@ #include #include -PMHeightFieldEdit::PMHeightFieldEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMHeightFieldEdit::PMHeightFieldEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -189,7 +189,7 @@ void PMHeightFieldEdit::slotFileNameChanged( const TQString& ) void PMHeightFieldEdit::slotFileNameClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmheightfieldedit.h b/kpovmodeler/pmheightfieldedit.h index 8a32aa00..2b97b03a 100644 --- a/kpovmodeler/pmheightfieldedit.h +++ b/kpovmodeler/pmheightfieldedit.h @@ -39,12 +39,13 @@ class TQPushButton; class PMHeightFieldEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMHeightFieldEdit with parent and name + * Creates a PMHeightFieldEdit with tqparent and name */ - PMHeightFieldEdit( TQWidget* parent, const char* name = 0 ); + PMHeightFieldEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmheightfieldroam.cpp b/kpovmodeler/pmheightfieldroam.cpp index d4809aac..87856155 100644 --- a/kpovmodeler/pmheightfieldroam.cpp +++ b/kpovmodeler/pmheightfieldroam.cpp @@ -180,7 +180,7 @@ bool PMHeightFieldROAM::imageToData(const TQString &fileName) colourIndex = false; else { - scaledMap = scaledMap.convertDepthWithPalette( 8, mapFile.colorTable( ), 256 ); + scaledMap = scaledMap.convertDepthWithPalette( 8, mapFile.tqcolorTable( ), 256 ); colourIndex = true; } @@ -191,8 +191,8 @@ bool PMHeightFieldROAM::imageToData(const TQString &fileName) if ( colourIndex ) setHeight( x, y2, scaledMap.pixelIndex( x, y ) * 256 ); else - setHeight( x, y2, ( 256 * qRed( scaledMap.pixel( x, y ) ) ) + - qGreen( scaledMap.pixel( x, y ) ) ); + setHeight( x, y2, ( 256 * tqRed( scaledMap.pixel( x, y ) ) ) + + tqGreen( scaledMap.pixel( x, y ) ) ); } } diff --git a/kpovmodeler/pmimagemap.cpp b/kpovmodeler/pmimagemap.cpp index 5f28c49a..2040de46 100644 --- a/kpovmodeler/pmimagemap.cpp +++ b/kpovmodeler/pmimagemap.cpp @@ -275,11 +275,11 @@ void PMImageMap::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMImageMap::metaObject( ) const +PMMetaObject* PMImageMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ImageMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ImageMap", Base::tqmetaObject( ), createNewImageMap ); PMBitmapTypeProperty* bp = new PMBitmapTypeProperty( @@ -459,9 +459,9 @@ void PMImageMap::setTransmits( const TQValueList& c ) } } -PMDialogEditBase* PMImageMap::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMImageMap::editWidget( TQWidget* tqparent ) const { - return new PMImageMapEdit( parent ); + return new PMImageMapEdit( tqparent ); } void PMImageMap::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmimagemap.h b/kpovmodeler/pmimagemap.h index 3a43d949..859fb5f3 100644 --- a/kpovmodeler/pmimagemap.h +++ b/kpovmodeler/pmimagemap.h @@ -71,7 +71,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -86,7 +86,7 @@ public: /** * Returns a new @ref PMImageMapEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Gets the bitmap type diff --git a/kpovmodeler/pmimagemapedit.cpp b/kpovmodeler/pmimagemapedit.cpp index 09d5eb0a..5e322d95 100644 --- a/kpovmodeler/pmimagemapedit.cpp +++ b/kpovmodeler/pmimagemapedit.cpp @@ -38,8 +38,8 @@ #include #include -PMImageMapEdit::PMImageMapEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMImageMapEdit::PMImageMapEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -247,8 +247,8 @@ void PMImageMapEdit::displayPaletteEntries( const TQValueList& f TQPixmap removeButtonPixmap = SmallIcon( "pmremovepoint" ); // First let's deal with the filter entries... - if( m_pFiltersWidget->layout( ) ) - delete m_pFiltersWidget->layout( ); + if( m_pFiltersWidget->tqlayout( ) ) + delete m_pFiltersWidget->tqlayout( ); m_filterEntries.setAutoDelete( true ); m_filterAddButtons.setAutoDelete( true ); @@ -313,8 +313,8 @@ void PMImageMapEdit::displayPaletteEntries( const TQValueList& f m_transmitRemoveButtons.setAutoDelete( false ); // recreate the entry edits - if( m_pTransmitsWidget->layout( ) ) - delete m_pTransmitsWidget->layout( ); + if( m_pTransmitsWidget->tqlayout( ) ) + delete m_pTransmitsWidget->tqlayout( ); gl = new TQGridLayout( m_pTransmitsWidget, ntransmits + 1, 3, 0, KDialog::spacingHint( ) ); @@ -475,7 +475,7 @@ void PMImageMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) void PMImageMapEdit::slotImageFileBrowseClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { @@ -535,7 +535,7 @@ void PMImageMapEdit::slotAddFilterEntry( ) if( button ) { - int index = m_filterAddButtons.findRef( button ); + int index = m_filterAddButtons.tqfindRef( button ); if( index >= 0 ) { entriesFilters = filters( ); @@ -561,7 +561,7 @@ void PMImageMapEdit::slotRemoveFilterEntry( ) if( button ) { - int index = m_filterRemoveButtons.findRef( button ); + int index = m_filterRemoveButtons.tqfindRef( button ); if( index >= 0 ) { entriesFilters = filters( ); @@ -583,7 +583,7 @@ void PMImageMapEdit::slotAddTransmitEntry( ) if( button ) { - int index = m_transmitAddButtons.findRef( button ); + int index = m_transmitAddButtons.tqfindRef( button ); if( index >= 0 ) { entriesTransmits = transmits( ); @@ -609,7 +609,7 @@ void PMImageMapEdit::slotRemoveTransmitEntry( ) if( button ) { - int index = m_transmitRemoveButtons.findRef( button ); + int index = m_transmitRemoveButtons.tqfindRef( button ); if( index >= 0 ) { entriesTransmits = transmits( ); diff --git a/kpovmodeler/pmimagemapedit.h b/kpovmodeler/pmimagemapedit.h index 49ce3d8c..4b5d4b2e 100644 --- a/kpovmodeler/pmimagemapedit.h +++ b/kpovmodeler/pmimagemapedit.h @@ -45,12 +45,13 @@ class TQPushButton; class PMImageMapEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMImageMapEdit with parent and name + * Creates a PMImageMapEdit with tqparent and name */ - PMImageMapEdit( TQWidget* parent, const char* name = 0 ); + PMImageMapEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pminserterrordialog.cpp b/kpovmodeler/pminserterrordialog.cpp index 9dd7867a..65d1c66d 100644 --- a/kpovmodeler/pminserterrordialog.cpp +++ b/kpovmodeler/pminserterrordialog.cpp @@ -25,13 +25,13 @@ PMInsertErrorDialog::PMInsertErrorDialog( int numObj, int numErrors, const TQStringList& details, - TQWidget* parent /*= 0*/, const char* name /*= 0*/ ) - : KDialogBase( parent, name, true, i18n( "Insert Errors" ), + TQWidget* tqparent /*= 0*/, const char* name /*= 0*/ ) + : KDialogBase( tqparent, name, true, i18n( "Insert Errors" ), Help | Ok | User1, Ok, false, i18n( "Details" ) ) { TQVBox* page = makeVBoxMainWidget( ); new TQLabel( i18n( "%1 of %2 objects couldn't be inserted." ) - .arg( numErrors ).arg( numObj ), page ); + .tqarg( numErrors ).tqarg( numObj ), page ); m_pDetailsLabel = new TQLabel( i18n( "Objects not inserted:" ), page ); m_pDetailsLabel->hide( ); diff --git a/kpovmodeler/pminserterrordialog.h b/kpovmodeler/pminserterrordialog.h index 9a2c1d2e..09eb32dd 100644 --- a/kpovmodeler/pminserterrordialog.h +++ b/kpovmodeler/pminserterrordialog.h @@ -36,13 +36,14 @@ class TQLabel; class PMInsertErrorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** - * Creates a modal PMInsertErrorDialog with parent and name. + * Creates a modal PMInsertErrorDialog with tqparent and name. */ PMInsertErrorDialog( int NumberOfObjects, int NumberOfInsertErrors, const TQStringList& details, - TQWidget* parent = 0, const char* name = 0 ); + TQWidget* tqparent = 0, const char* name = 0 ); protected slots: void slotUser1( ); diff --git a/kpovmodeler/pminsertpopup.cpp b/kpovmodeler/pminsertpopup.cpp index 0f8ffb23..addab3cf 100644 --- a/kpovmodeler/pminsertpopup.cpp +++ b/kpovmodeler/pminsertpopup.cpp @@ -21,11 +21,11 @@ #include #include -PMInsertPopup::PMInsertPopup( TQWidget* parent, bool multipleObjects, +PMInsertPopup::PMInsertPopup( TQWidget* tqparent, bool multipleObjects, int items, bool canInsertAllAsFirstChildren, bool canInsertAllAsLastChildren, bool canInsertAllAsSiblings, const char* name ) - : KPopupMenu( parent, name ) + : KPopupMenu( tqparent, name ) { TQString itemText; if( multipleObjects ) @@ -71,13 +71,13 @@ PMInsertPopup::PMInsertPopup( TQWidget* parent, bool multipleObjects, } } -int PMInsertPopup::choosePlace( TQWidget* parent, bool multipleObjects, +int PMInsertPopup::choosePlace( TQWidget* tqparent, bool multipleObjects, int items, bool canInsertAllAsFirstChildren, bool canInsertAllAsLastChildren, bool canInsertAllAsSiblings ) { int result; - PMInsertPopup* popup = new PMInsertPopup( parent, multipleObjects, items, + PMInsertPopup* popup = new PMInsertPopup( tqparent, multipleObjects, items, canInsertAllAsFirstChildren, canInsertAllAsLastChildren, canInsertAllAsSiblings ); diff --git a/kpovmodeler/pminsertpopup.h b/kpovmodeler/pminsertpopup.h index 09aa796a..3ec3ecd3 100644 --- a/kpovmodeler/pminsertpopup.h +++ b/kpovmodeler/pminsertpopup.h @@ -39,13 +39,13 @@ public: /** * Creates a popup menu * - * @param parent The parent widget + * @param tqparent The tqparent widget * @param multipleObjects True if more than one object will be inserted * @param items Which items to display. Can be a bitwise combination * of PMIFirstChild, PMILastChild, PMISibling. * @param name Internal name of the popup menu */ - PMInsertPopup( TQWidget* parent, bool multipleObjects, + PMInsertPopup( TQWidget* tqparent, bool multipleObjects, int items = PMIFirstChild | PMILastChild | PMISibling, bool canInsertAllAsFirstChildren = true, bool canInsertAllAsLastChildren = true, @@ -59,7 +59,7 @@ public: /** * Popups a PMInsertPopup menu * - * @param parent The parent widget + * @param tqparent The tqparent widget * @param multipleObjects True if more than one object will be inserted * @param items Which items to display. Can be a bitwise combination * of PMIFirstChild, PMILastChild, PMISibling. @@ -70,7 +70,7 @@ public: * * Returns the selected item or 0 if no item was selected. */ - static int choosePlace( TQWidget* parent, bool multipleObjects, + static int choosePlace( TQWidget* tqparent, bool multipleObjects, int items = PMIFirstChild | PMILastChild | PMISibling, bool canInsertAllAsFirstChildren = true, diff --git a/kpovmodeler/pminsertrules.dtd b/kpovmodeler/pminsertrules.dtd index a3c2128c..4b9a46d7 100644 --- a/kpovmodeler/pminsertrules.dtd +++ b/kpovmodeler/pminsertrules.dtd @@ -39,23 +39,23 @@ Insert a list of groups and classes (the object classes that can be inserted) and one condition. If the condition is omitted, the classes can allways be inserted. --> - - + - + - + - - @@ -71,9 +71,9 @@ is less than the second. --> - - +
%1 %2
%1 %2
%1 %2
%1 %2
%1
%1
%1 %2
%1 %2
%1 %2
%1 %2